mirror of
https://github.com/hanzozt/foundation.git
synced 2026-10-30 14:42:04 +00:00
7 lines
151 B
Go
7 lines
151 B
Go
package util
|
|
|
|
// Ptr returns a pointer to the given value. Allows succinctly creating pointers to constants
|
|
func Ptr[T any](val T) *T {
|
|
return &val
|
|
}
|