mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 23:32:47 +01:00
refactor: remove pocketbase (#1138)
This commit is contained in:
15
app/pointer/pointer.go
Normal file
15
app/pointer/pointer.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package pointer
|
||||
|
||||
func Pointer[T any](v T) *T {
|
||||
return &v
|
||||
}
|
||||
|
||||
func Dereference[T any](v *T) T {
|
||||
if v == nil {
|
||||
var zero T
|
||||
|
||||
return zero
|
||||
}
|
||||
|
||||
return *v
|
||||
}
|
||||
Reference in New Issue
Block a user