v0.0.346
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m56s

This commit is contained in:
2023-12-13 16:22:15 +01:00
parent b2b93f570a
commit 2f915cb6c1
4 changed files with 18 additions and 3 deletions

View File

@@ -10,10 +10,23 @@ var PTrue = Ptr(true)
// PFalse := &false
var PFalse = Ptr(false)
// PNil := &nil
var PNil = Ptr[any](nil)
func Ptr[T any](v T) *T {
return &v
}
func DblPtr[T any](v T) **T {
v_ := &v
return &v_
}
func DblPtrNil[T any]() **T {
var v *T = nil
return &v
}
func PtrInt32(v int32) *int32 {
return &v
}