Documentation ¶
Overview ¶
Package ptr holds utilities for taking pointer references to values.
Index ¶
- func Bool(b bool) *bool
- func BoolValue(b *bool) bool
- func Duration(t time.Duration) *time.Duration
- func DurationValue(t *time.Duration) time.Duration
- func Float32(f float32) *float32
- func Float32Value(f *float32) float32
- func Float64(f float64) *float64
- func Float64Value(f *float64) float64
- func Int32(i int32) *int32
- func Int32Value(i *int32) int32
- func Int64(i int64) *int64
- func Int64Value(i *int64) int64
- func String(s string) *string
- func StringValue(s *string) string
- func Time(t time.Time) *time.Time
- func TimeValue(t *time.Time) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolValue ¶
BoolValue is a helper for turning pointers to bools into values for use in API types that want bool.
func Duration ¶
Duration is a helper for turning time.Duration into pointers for use in API types that want *time.Duration.
func DurationValue ¶
DurationValue is a helper for turning *time.Duration into values for use in API types that want time.Duration.
func Float32 ¶
Float32 is a helper for turning floats into pointers for use in API types that want *float32.
func Float32Value ¶
Float32Value is a helper for turning pointers to floats into values for use in API types that want float32.
func Float64 ¶
Float64 is a helper for turning floats into pointers for use in API types that want *float64.
func Float64Value ¶
Float64Value is a helper for turning pointers to floats into values for use in API types that want float64.
func Int32 ¶
Int32 is a helper for turning integers into pointers for use in API types that want *int32.
func Int32Value ¶
Int32Value is a helper for turning pointers to integers into values for use in API types that want int32.
func Int64 ¶
Int64 is a helper for turning integers into pointers for use in API types that want *int64.
func Int64Value ¶
Int64Value is a helper for turning pointers to integers into values for use in API types that want int64.
func String ¶
String is a helper for turning strings into pointers for use in API types that want *string.
func StringValue ¶
StringValue is a helper for turning pointers to strings into values for use in API types that want string.
Types ¶
This section is empty.