Add func to get the pointer to some value
This commit is contained in:
parent
70f6d19476
commit
83e935df8a
1 changed files with 4 additions and 0 deletions
|
@ -13,3 +13,7 @@ func Must[T any](val T, err error) T {
|
||||||
}
|
}
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IntoPointer[T any](val T) *T {
|
||||||
|
return &val
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue