added DblPtrIfNotNil
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m31s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m31s
This commit is contained in:
parent
a9295bfabf
commit
fc5803493c
@ -22,6 +22,13 @@ func DblPtr[T any](v T) **T {
|
||||
return &v_
|
||||
}
|
||||
|
||||
func DblPtrIfNotNil[T any](v *T) **T {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
return &v
|
||||
}
|
||||
|
||||
func DblPtrNil[T any]() **T {
|
||||
var v *T = nil
|
||||
return &v
|
||||
|
Loading…
Reference in New Issue
Block a user