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+.
This commit is contained in:
Seth Hoenig
2022-06-09 10:43:54 -05:00
parent f8774369d2
commit 109f25feb5
6 changed files with 190 additions and 14 deletions

View File

@@ -0,0 +1,7 @@
// 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
}