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

Function Val

go/util/pointer/pointer.go:14–20  ·  view source on GitHub ↗

Val is a helper function to create a value from a pointer

(v *T)

Source from the content-addressed store, hash-verified

12
13// Val is a helper function to create a value from a pointer
14func Val[T any](v *T) T {
15 if v != nil {
16 return *v
17 }
18 var zero T
19 return zero
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected