mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
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:
7
helper/pointer/pointer.go
Normal file
7
helper/pointer/pointer.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user