Documentation
¶
Index ¶
- func Bool(v bool) *bool
- func BoolIsUnset(v *bool) bool
- func BoolValue(v *bool) bool
- func Complex128(v complex128) *complex128
- func Complex128Value(v *complex128) complex128
- func Complex64(v complex64) *complex64
- func Complex64Value(v *complex64) complex64
- func Float32(v float32) *float32
- func Float32Value(v *float32) float32
- func Float64(v float64) *float64
- func Float64Value(v *float64) float64
- func Int(v int) *int
- func Int16(v int16) *int16
- func Int16Value(v *int16) int16
- func Int32(v int32) *int32
- func Int32Value(v *int32) int32
- func Int64(v int64) *int64
- func Int64Value(v *int64) int64
- func Int8(v int8) *int8
- func Int8Value(v *int8) int8
- func IntValue(v *int) int
- func String(v string) *string
- func StringValue(v *string) string
- func Uint(v uint) *uint
- func Uint16(v uint16) *uint16
- func Uint16Value(v *uint16) uint16
- func Uint32(v uint32) *uint32
- func Uint32Value(v *uint32) uint32
- func Uint64(v uint64) *uint64
- func Uint64Value(v *uint64) uint64
- func Uint8(v uint8) *uint8
- func Uint8Value(v *uint8) uint8
- func UintValue(v *uint) uint
- type BoolHelper
- type Complex128Helper
- type Complex64Helper
- type Float32Helper
- type Float64Helper
- type Int16Helper
- type Int32Helper
- type Int64Helper
- type Int8Helper
- type IntHelper
- type PointerHelper
- type StringHelper
- type Uint16Helper
- type Uint32Helper
- type Uint64Helper
- type Uint8Helper
- type UintHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolIsUnset ¶ added in v1.2.0
BoolIsUnset returns true if the pointer is nil
func BoolValue ¶ added in v1.2.0
BoolValue returns the value of the bool pointer passed in or 0 if the pointer is nil.
func Complex128 ¶ added in v1.3.0
func Complex128(v complex128) *complex128
Complex128 returns a pointer to the complex128 value passed in.
func Complex128Value ¶ added in v1.3.0
func Complex128Value(v *complex128) complex128
Complex128Value returns the value of the complex128 pointer passed in or 0 if the pointer is nil.
func Complex64Value ¶ added in v1.3.0
Complex64Value returns the value of the complex64 pointer passed in or 0 if the pointer is nil.
func Float32Value ¶ added in v1.3.0
Float32Value returns the value of the float32 pointer passed in or 0 if the pointer is nil.
func Float64Value ¶ added in v1.3.0
Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.
func Int16Value ¶ added in v1.3.0
Int16Value returns the value of the int16 pointer passed in or 0 if the pointer is nil.
func Int32Value ¶ added in v1.3.0
Int32Value returns the value of the int32 pointer passed in or 0 if the pointer is nil.
func Int64Value ¶ added in v1.1.0
Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.
func Int8Value ¶ added in v1.3.0
Int8Value returns the value of the int8 pointer passed in or 0 if the pointer is nil.
func IntValue ¶ added in v1.3.0
IntValue returns the value of the int pointer passed in or 0 if the pointer is nil.
func StringValue ¶
StringValue returns the value of the string pointer passed in or "" if the pointer is nil.
func Uint16Value ¶ added in v1.3.0
Uint16Value returns the value of the uint16 pointer passed in or 0 if the pointer is nil.
func Uint32Value ¶ added in v1.3.0
Uint32Value returns the value of the uint32 pointer passed in or 0 if the pointer is nil.
func Uint64Value ¶ added in v1.3.0
Uint64Value returns the value of the uint64 pointer passed in or 0 if the pointer is nil.
func Uint8Value ¶ added in v1.3.0
Uint8Value returns the value of the uint8 pointer passed in or 0 if the pointer is nil.
Types ¶
type BoolHelper ¶ added in v1.2.0
type BoolHelper struct {
}
BoolHelper contains all Bool related pointer helpers
func (*BoolHelper) Bool ¶ added in v1.2.0
func (b *BoolHelper) Bool(v bool) *bool
Bool returns a pointer to the bool value passed in.
func (*BoolHelper) BoolIsUnset ¶ added in v1.2.0
func (b *BoolHelper) BoolIsUnset(v *bool) bool
BoolIsUnset returns true if the pointer is nil
func (*BoolHelper) BoolValue ¶ added in v1.2.0
func (b *BoolHelper) BoolValue(v *bool) bool
BoolValue returns the value of the bool pointer passed in or 0 if the pointer is nil.
type Complex128Helper ¶ added in v1.3.0
type Complex128Helper struct {
}
Complex128Helper contains all Complex128 related pointer helpers
func (*Complex128Helper) Complex128 ¶ added in v1.3.0
func (i *Complex128Helper) Complex128(v complex128) *complex128
Complex128 returns a pointer to the complex128 value passed in.
func (*Complex128Helper) Complex128Value ¶ added in v1.3.0
func (i *Complex128Helper) Complex128Value(v *complex128) complex128
Complex128Value returns the value of the complex128 pointer passed in or 0 if the pointer is nil.
type Complex64Helper ¶ added in v1.3.0
type Complex64Helper struct {
}
Complex64Helper contains all Complex64 related pointer helpers
func (*Complex64Helper) Complex64 ¶ added in v1.3.0
func (i *Complex64Helper) Complex64(v complex64) *complex64
Complex64 returns a pointer to the complex64 value passed in.
func (*Complex64Helper) Complex64Value ¶ added in v1.3.0
func (i *Complex64Helper) Complex64Value(v *complex64) complex64
Complex64Value returns the value of the complex64 pointer passed in or 0 if the pointer is nil.
type Float32Helper ¶ added in v1.3.0
type Float32Helper struct {
}
Float32Helper contains all Float32 related pointer helpers
func (*Float32Helper) Float32 ¶ added in v1.3.0
func (i *Float32Helper) Float32(v float32) *float32
Float32 returns a pointer to the float32 value passed in.
func (*Float32Helper) Float32Value ¶ added in v1.3.0
func (i *Float32Helper) Float32Value(v *float32) float32
Float32Value returns the value of the float32 pointer passed in or 0 if the pointer is nil.
type Float64Helper ¶ added in v1.3.0
type Float64Helper struct {
}
Float64Helper contains all Float64 related pointer helpers
func (*Float64Helper) Float64 ¶ added in v1.3.0
func (i *Float64Helper) Float64(v float64) *float64
Float64 returns a pointer to the float64 value passed in.
func (*Float64Helper) Float64Value ¶ added in v1.3.0
func (i *Float64Helper) Float64Value(v *float64) float64
Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.
type Int16Helper ¶ added in v1.3.0
type Int16Helper struct {
}
Int16Helper contains all Int16 related pointer helpers
func (*Int16Helper) Int16 ¶ added in v1.3.0
func (i *Int16Helper) Int16(v int16) *int16
Int16 returns a pointer to the int16 value passed in.
func (*Int16Helper) Int16Value ¶ added in v1.3.0
func (i *Int16Helper) Int16Value(v *int16) int16
Int16Value returns the value of the int16 pointer passed in or 0 if the pointer is nil.
type Int32Helper ¶ added in v1.3.0
type Int32Helper struct {
}
Int32Helper contains all Int32 related pointer helpers
func (*Int32Helper) Int32 ¶ added in v1.3.0
func (i *Int32Helper) Int32(v int32) *int32
Int32 returns a pointer to the int32 value passed in.
func (*Int32Helper) Int32Value ¶ added in v1.3.0
func (i *Int32Helper) Int32Value(v *int32) int32
Int32Value returns the value of the int32 pointer passed in or 0 if the pointer is nil.
type Int64Helper ¶ added in v1.1.0
type Int64Helper struct {
}
Int64Helper contains all Int64 related pointer helpers
func (*Int64Helper) Int64 ¶ added in v1.1.0
func (i *Int64Helper) Int64(v int64) *int64
Int64 returns a pointer to the int64 value passed in.
func (*Int64Helper) Int64Value ¶ added in v1.1.0
func (i *Int64Helper) Int64Value(v *int64) int64
Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.
type Int8Helper ¶ added in v1.3.0
type Int8Helper struct {
}
Int8Helper contains all Int8 related pointer helpers
func (*Int8Helper) Int8 ¶ added in v1.3.0
func (i *Int8Helper) Int8(v int8) *int8
Int8 returns a pointer to the int8 value passed in.
func (*Int8Helper) Int8Value ¶ added in v1.3.0
func (i *Int8Helper) Int8Value(v *int8) int8
Int8Value returns the value of the int8 pointer passed in or 0 if the pointer is nil.
type IntHelper ¶ added in v1.3.0
type IntHelper struct {
}
IntHelper contains all int related pointer helpers
type PointerHelper ¶
type PointerHelper struct {
StringHelper
Int64Helper
BoolHelper
}
PointerHelper is a struct to include all the various helpers in this module to enable easier composition outside of this package
type StringHelper ¶
type StringHelper struct{}
StringHelper contains all String related pointer helpers
func (*StringHelper) String ¶
func (s *StringHelper) String(v string) *string
String returns a pointer to the string value passed in.
func (*StringHelper) StringValue ¶
func (s *StringHelper) StringValue(v *string) string
type Uint16Helper ¶ added in v1.3.0
type Uint16Helper struct {
}
Uint16Helper contains all Uint16 related pointer helpers
func (*Uint16Helper) Uint16 ¶ added in v1.3.0
func (i *Uint16Helper) Uint16(v uint16) *uint16
Uint16 returns a pointer to the uint16 value passed in.
func (*Uint16Helper) Uint16Value ¶ added in v1.3.0
func (i *Uint16Helper) Uint16Value(v *uint16) uint16
Uint16Value returns the value of the uint16 pointer passed in or 0 if the pointer is nil.
type Uint32Helper ¶ added in v1.3.0
type Uint32Helper struct {
}
Uint32Helper contains all Uint32 related pointer helpers
func (*Uint32Helper) Uint32 ¶ added in v1.3.0
func (i *Uint32Helper) Uint32(v uint32) *uint32
Uint32 returns a pointer to the uint32 value passed in.
func (*Uint32Helper) Uint32Value ¶ added in v1.3.0
func (i *Uint32Helper) Uint32Value(v *uint32) uint32
Uint32Value returns the value of the uint32 pointer passed in or 0 if the pointer is nil.
type Uint64Helper ¶ added in v1.3.0
type Uint64Helper struct {
}
Uint64Helper contains all Uint64 related pointer helpers
func (*Uint64Helper) Uint64 ¶ added in v1.3.0
func (i *Uint64Helper) Uint64(v uint64) *uint64
Uint64 returns a pointer to the uint64 value passed in.
func (*Uint64Helper) Uint64Value ¶ added in v1.3.0
func (i *Uint64Helper) Uint64Value(v *uint64) uint64
Uint64Value returns the value of the uint64 pointer passed in or 0 if the pointer is nil.
type Uint8Helper ¶ added in v1.3.0
type Uint8Helper struct {
}
Uint8Helper contains all Uint8 related pointer helpers
func (*Uint8Helper) Uint8 ¶ added in v1.3.0
func (i *Uint8Helper) Uint8(v uint8) *uint8
Uint8 returns a pointer to the uint8 value passed in.
func (*Uint8Helper) Uint8Value ¶ added in v1.3.0
func (i *Uint8Helper) Uint8Value(v *uint8) uint8
Uint8Value returns the value of the uint8 pointer passed in or 0 if the pointer is nil.
type UintHelper ¶ added in v1.3.0
type UintHelper struct {
}
UintHelper contains all Uint related pointer helpers
func (*UintHelper) Uint ¶ added in v1.3.0
func (i *UintHelper) Uint(v uint) *uint
Uint returns a pointer to the uint value passed in.
func (*UintHelper) UintValue ¶ added in v1.3.0
func (i *UintHelper) UintValue(v *uint) uint
UintValue returns the value of the uint pointer passed in or 0 if the pointer is nil.