MCPcopy Index your code
hub / github.com/AlekSi/pointer / GetString

Function GetString

value.go:120–125  ·  view source on GitHub ↗

GetString returns the value of the string pointer passed in or empty string if the pointer is nil.

(s *string)

Source from the content-addressed store, hash-verified

118
119// GetString returns the value of the string pointer passed in or empty string if the pointer is nil.
120func GetString(s *string) string {
121 if s == nil {
122 return ""
123 }
124 return *s
125}
126
127// GetUint returns the value of the uint pointer passed in or 0 if the pointer is nil.
128func GetUint(u *uint) uint {

Callers 1

TestStringFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestStringFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…