Documentation ¶
Index ¶
- Variables
- func BoolPtr(b bool) *bool
- func Float64Ptr(f float64) *float64
- func Int64Ptr(d int64) *int64
- func IntPtr(d int) *int
- func SafeBool(ptr *bool) bool
- func SafeFloat64(ptr *float64) float64
- func SafeInt64(ptr *int64) int64
- func SafeString(ptr *string) string
- func SafeTime(t *time.Time) time.Time
- func StringPtr(str string) *string
- func StringPtrOrEmpty(str *string) *string
- func TimePtr(t time.Time) *time.Time
- func TimePtrOrEmpty(t *time.Time) *time.Time
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // True is true True bool = true // False is true False bool = false )
Functions ¶
func Float64Ptr ¶
Float64Ptr returns a pointer to the int passed as parameter
func SafeFloat64 ¶
SafeFloat64 returns the value from ptr or 0 if the pointer is nil
func SafeString ¶
SafeString returns the value from ptr or "" if the pointer is nil
func StringPtrOrEmpty ¶
StringPtrOrEmpty returns the passed pointer or a pointer to the empty string if str is nil
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.