Internal JSON and pointer wrappers.

This commit is contained in:
Nuno Cruces
2023-12-29 11:37:50 +00:00
parent 7e5a143214
commit 16b5d80ef7
5 changed files with 58 additions and 51 deletions

11
internal/util/pointer.go Normal file
View File

@@ -0,0 +1,11 @@
package util
type Pointer[T any] struct{ Value T }
func (p Pointer[T]) unwrap() any { return p.Value }
type PointerUnwrap interface{ unwrap() any }
func UnwrapPointer(p PointerUnwrap) any {
return p.unwrap()
}