MCPcopy Index your code
hub / github.com/coder/coder / NilOrZero

Function NilOrZero

coderd/util/ptr/ptr.go:38–40  ·  view source on GitHub ↗

NilOrZero returns true if v is nil or 0.

(v *T)

Source from the content-addressed store, hash-verified

36
37// NilOrZero returns true if v is nil or 0.
38func NilOrZero[T number](v *T) bool {
39 return v == nil || *v == 0
40}

Callers 4

validWorkspaceTTLMillisFunction · 0.92
Test_NilOrZeroFunction · 0.92
notifyConditionFunction · 0.92

Calls

no outgoing calls

Tested by 1

Test_NilOrZeroFunction · 0.74