MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / Ptr

Function Ptr

go/util/pointer/pointer.go:9–11  ·  view source on GitHub ↗

Ptr is a helper function to create a pointer to a value

(v T)

Source from the content-addressed store, hash-verified

7
8// Ptr is a helper function to create a pointer to a value
9func Ptr[T any](v T) *T {
10 return &v
11}
12
13// Val is a helper function to create a value from a pointer
14func Val[T any](v *T) T {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected