Documentation ¶
Overview ¶
Package to provides helpers to ease working with pointer values of marshalled structures.
Index ¶
- func Bool(b *bool) bool
- func BoolPtr(b bool) *bool
- func Float32(i *float32) float32
- func Float32Ptr(i float32) *float32
- func Float64(i *float64) float64
- func Float64Ptr(i float64) *float64
- func Int(i *int) int
- func Int32(i *int32) int32
- func Int32Ptr(i int32) *int32
- func Int64(i *int64) int64
- func Int64Ptr(i int64) *int64
- func IntPtr(i int) *int
- func String(s *string) string
- func StringMap(msp map[string]*string) map[string]string
- func StringMapPtr(ms map[string]string) *map[string]*string
- func StringPtr(s string) *string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool returns a bool value for the passed bool pointer. It returns false if the pointer is nil.
func Float32 ¶
Float32 returns an int value for the passed int pointer. It returns 0.0 if the pointer is nil.
func Float32Ptr ¶
Float32Ptr returns a pointer to the passed float32.
func Float64 ¶
Float64 returns an int value for the passed int pointer. It returns 0.0 if the pointer is nil.
func Float64Ptr ¶
Float64Ptr returns a pointer to the passed float64.
func Int32 ¶
Int32 returns an int value for the passed int pointer. It returns 0 if the pointer is nil.
func Int64 ¶
Int64 returns an int value for the passed int pointer. It returns 0 if the pointer is nil.
func String ¶
String returns a string value for the passed string pointer. It returns the empty string if the pointer is nil.
func StringMap ¶
StringMap returns a map of strings built from the map of string pointers. The empty string is used for nil pointers.
func StringMapPtr ¶
StringMapPtr returns a pointer to a map of string pointers built from the passed map of strings.
Types ¶
This section is empty.