MCPcopy Create free account
hub / github.com/aliml92/anor / IntValue

Function IntValue

pointer.go:40–45  ·  view source on GitHub ↗

IntValue returns the value of the int pointer passed in or 0 if the pointer is nil.

(v *int)

Source from the content-addressed store, hash-verified

38// IntValue returns the value of the int pointer passed in or
39// 0 if the pointer is nil.
40func IntValue(v *int) int {
41 if v != nil {
42 return *v
43 }
44 return 0
45}
46
47// Int64 returns a pointer to the int64 value passed in.
48func Int64(v int64) *int64 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected