open-nomad/helper/pointer/pointer.go
Seth Hoenig c9a9cef9ae helpers: provide a few generic helper functions
This PR deprecates some functions in favor of generic alternatives.

The new functions are compatible only with Nomad v1.4+.

The old functions (nor their use) should not be removed until Nomad v1.6+.
2022-06-09 10:43:54 -05:00

8 lines
154 B
Go

// Package pointer provides helper functions related to Go pointers.
package pointer
// Of returns a pointer to a.
func Of[A any](a A) *A {
return &a
}