Documentation ¶
Index ¶
- func FromBoolPointer(boolPointer *bool) bool
- func FromBoolPointerOrDefault(boolPointer *bool, defaultValue bool) bool
- func FromBytePointer(p *byte) byte
- func FromBytePointerOrDefaultIfNil(v *byte, defaultValue byte) byte
- func FromComplex128Pointer(p *complex128) complex128
- func FromComplex128PointerOrDefaultIfNil(v *complex128, defaultValue complex128) complex128
- func FromComplex64Pointer(p *complex64) complex64
- func FromComplex64PointerOrDefaultIfNil(v *complex64, defaultValue complex64) complex64
- func FromDurationPointer(p *time.Duration) time.Duration
- func FromDurationPointerOrDefaultIfNil(v *time.Duration, defaultValue time.Duration) time.Duration
- func FromFloat32Pointer(p *float32) float32
- func FromFloat32PointerOrDefaultIfNil(v *float32, defaultValue float32) float32
- func FromFloat64Pointer(p *float64) float64
- func FromFloat64PointerOrDefaultIfNil(v *float64, defaultValue float64) float64
- func FromInt16Pointer(p *int16) int16
- func FromInt16PointerOrDefaultIfNil(v *int16, defaultValue int16) int16
- func FromInt32Pointer(p *int32) int32
- func FromInt32PointerOrDefaultIfNil(v *int32, defaultValue int32) int32
- func FromInt64Pointer(p *int64) int64
- func FromInt64PointerOrDefaultIfNil(v *int64, defaultValue int64) int64
- func FromInt8Pointer(p *int8) int8
- func FromInt8PointerOrDefaultIfNil(v *int8, defaultValue int8) int8
- func FromIntPointer(p *int) int
- func FromIntPointerOrDefaultIfNil(v *int, defaultValue int) int
- func FromRunePointer(p *rune) rune
- func FromRunePointerOrDefaultIfNil(v *rune, defaultValue rune) rune
- func FromStringPointer(p *string) string
- func FromStringPointerOrDefaultIfNil(v *string, defaultValue string) string
- func FromTimePointer(t *time.Time) time.Time
- func FromTimePointerOrDefault(t *time.Time, defaultValue time.Time) time.Time
- func FromUint16Pointer(p *uint16) uint16
- func FromUint16PointerOrDefaultIfNil(v *uint16, defaultValue uint16) uint16
- func FromUint32Pointer(p *uint32) uint32
- func FromUint32PointerOrDefaultIfNil(v *uint32, defaultValue uint32) uint32
- func FromUint64Pointer(p *uint64) uint64
- func FromUint64PointerOrDefaultIfNil(v *uint64, defaultValue uint64) uint64
- func FromUint8Pointer(p *uint8) uint8
- func FromUint8PointerOrDefaultIfNil(v *uint8, defaultValue uint8) uint8
- func FromUintPointer(p *uint) uint
- func FromUintPointerOrDefaultIfNil(v *uint, defaultValue uint) uint
- func FromUintptrPointer(p *uintptr) uintptr
- func FromUintptrPointerOrDefaultIfNil(v *uintptr, defaultValue uintptr) uintptr
- func NowTimePointer() *time.Time
- func ToBoolPointer(boolValue bool) *bool
- func ToBoolPointerOrNilIfFalse(boolValue bool) *bool
- func ToBytePointer(v byte) *byte
- func ToBytePointerOrNilIfZero(v byte) *byte
- func ToComplex128Pointer(v complex128) *complex128
- func ToComplex128PointerOrNilIfZero(v complex128) *complex128
- func ToComplex64Pointer(v complex64) *complex64
- func ToComplex64PointerOrNilIfZero(v complex64) *complex64
- func ToDurationPointer(v time.Duration) *time.Duration
- func ToDurationPointerOrNilIfZero(v time.Duration) *time.Duration
- func ToFloat32Pointer(v float32) *float32
- func ToFloat32PointerOrNilIfZero(v float32) *float32
- func ToFloat64Pointer(v float64) *float64
- func ToFloat64PointerOrNilIfZero(v float64) *float64
- func ToInt16Pointer(v int16) *int16
- func ToInt16PointerOrNilIfZero(v int16) *int16
- func ToInt32Pointer(v int32) *int32
- func ToInt32PointerOrNilIfZero(v int32) *int32
- func ToInt64Pointer(v int64) *int64
- func ToInt64PointerOrNilIfZero(v int64) *int64
- func ToInt8Pointer(v int8) *int8
- func ToInt8PointerOrNilIfZero(v int8) *int8
- func ToIntPointer(v int) *int
- func ToIntPointerOrNilIfZero(v int) *int
- func ToRunePointer(v rune) *rune
- func ToRunePointerOrNilIfZero(v rune) *rune
- func ToStringPointer(v string) *string
- func ToStringPointerOrNilIfEmpty(v string) *string
- func ToTimePointer(t time.Time) *time.Time
- func ToUint16Pointer(v uint16) *uint16
- func ToUint16PointerOrNilIfZero(v uint16) *uint16
- func ToUint32Pointer(v uint32) *uint32
- func ToUint32PointerOrNilIfZero(v uint32) *uint32
- func ToUint64Pointer(v uint64) *uint64
- func ToUint64PointerOrNilIfZero(v uint64) *uint64
- func ToUint8Pointer(v uint8) *uint8
- func ToUint8PointerOrNilIfZero(v uint8) *uint8
- func ToUintPointer(v uint) *uint
- func ToUintPointerOrNilIfZero(v uint) *uint
- func ToUintptrPointer(v uintptr) *uintptr
- func ToUintptrPointerOrNilIfZero(v uintptr) *uintptr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromBoolPointer ¶
FromBoolPointer 获取布尔指针实际指向的值,如果指针为nil的话则返回false
func FromBoolPointerOrDefault ¶
FromBoolPointerOrDefault 获取布尔指针实际指向的值,如果指针为nil的话则返回defaultValue
func FromBytePointer ¶
FromBytePointer 获取*byte类型的指针的实际值,如果指针为nil的话则返回0
func FromBytePointerOrDefaultIfNil ¶
FromBytePointerOrDefaultIfNil 获取*byte类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromComplex128Pointer ¶
func FromComplex128Pointer(p *complex128) complex128
FromComplex128Pointer 获取*complex128类型的指针的实际值,如果指针为nil的话则返回0
func FromComplex128PointerOrDefaultIfNil ¶
func FromComplex128PointerOrDefaultIfNil(v *complex128, defaultValue complex128) complex128
FromComplex128PointerOrDefaultIfNil 获取*complex128类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromComplex64Pointer ¶
FromComplex64Pointer 获取*complex64类型的指针的实际值,如果指针为nil的话则返回0
func FromComplex64PointerOrDefaultIfNil ¶
FromComplex64PointerOrDefaultIfNil 获取*complex64类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromDurationPointer ¶
FromDurationPointer 获取*time.Duration类型的指针的实际值,如果指针为nil的话则返回0
func FromDurationPointerOrDefaultIfNil ¶
FromDurationPointerOrDefaultIfNil 获取*time.Duration类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromFloat32Pointer ¶
FromFloat32Pointer 获取*float32类型的指针的实际值,如果指针为nil的话则返回0
func FromFloat32PointerOrDefaultIfNil ¶
FromFloat32PointerOrDefaultIfNil 获取*float32类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromFloat64Pointer ¶
FromFloat64Pointer 获取*float64类型的指针的实际值,如果指针为nil的话则返回0
func FromFloat64PointerOrDefaultIfNil ¶
FromFloat64PointerOrDefaultIfNil 获取*float64类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromInt16Pointer ¶
FromInt16Pointer 获取*int16类型的指针的实际值,如果指针为nil的话则返回0
func FromInt16PointerOrDefaultIfNil ¶
FromInt16PointerOrDefaultIfNil 获取*int16类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromInt32Pointer ¶
FromInt32Pointer 获取*int32类型的指针的实际值,如果指针为nil的话则返回0
func FromInt32PointerOrDefaultIfNil ¶
FromInt32PointerOrDefaultIfNil 获取*int32类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromInt64Pointer ¶
FromInt64Pointer 获取*int64类型的指针的实际值,如果指针为nil的话则返回0
func FromInt64PointerOrDefaultIfNil ¶
FromInt64PointerOrDefaultIfNil 获取*int64类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromInt8Pointer ¶
FromInt8Pointer 获取*int8类型的指针的实际值,如果指针为nil的话则返回0
func FromInt8PointerOrDefaultIfNil ¶
FromInt8PointerOrDefaultIfNil 获取*int8类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromIntPointerOrDefaultIfNil ¶
FromIntPointerOrDefaultIfNil 获取*int类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromRunePointer ¶
FromRunePointer 获取*rune类型的指针的实际值,如果指针为nil的话则返回0
func FromRunePointerOrDefaultIfNil ¶
FromRunePointerOrDefaultIfNil 获取*rune类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromStringPointer ¶
FromStringPointer 获取*string类型的指针的实际值,如果指针为nil的话则返回空字符串
func FromStringPointerOrDefaultIfNil ¶
FromStringPointerOrDefaultIfNil 获取*string类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromTimePointer ¶
FromTimePointer 从time.Time类型的指针中读取时间,如果为空指针,则读取到零值
func FromTimePointerOrDefault ¶
FromTimePointerOrDefault 从time.Time类型的指针中读取时间,如果为空指针,则返回defaultValue
func FromUint16Pointer ¶
FromUint16Pointer 获取*uint16类型的指针的实际值,如果指针为nil的话则返回0
func FromUint16PointerOrDefaultIfNil ¶
FromUint16PointerOrDefaultIfNil 获取*uint16类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromUint32Pointer ¶
FromUint32Pointer 获取*uint32类型的指针的实际值,如果指针为nil的话则返回0
func FromUint32PointerOrDefaultIfNil ¶
FromUint32PointerOrDefaultIfNil 获取*uint32类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromUint64Pointer ¶
FromUint64Pointer 获取*uint64类型的指针的实际值,如果指针为nil的话则返回0
func FromUint64PointerOrDefaultIfNil ¶
FromUint64PointerOrDefaultIfNil 获取*uint64类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromUint8Pointer ¶
FromUint8Pointer 获取*uint8类型的指针的实际值,如果指针为nil的话则返回0
func FromUint8PointerOrDefaultIfNil ¶
FromUint8PointerOrDefaultIfNil 获取*uint8类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromUintPointer ¶
FromUintPointer 获取*uint类型的指针的实际值,如果指针为nil的话则返回0
func FromUintPointerOrDefaultIfNil ¶
FromUintPointerOrDefaultIfNil 获取*uint类型的指针的实际值,如果指针为nil的话则返回defaultValue
func FromUintptrPointer ¶
FromUintptrPointer 获取*uintptr类型的指针的实际值,如果指针为nil的话则返回0
func FromUintptrPointerOrDefaultIfNil ¶
FromUintptrPointerOrDefaultIfNil 获取*uintptr类型的指针的实际值,如果指针为nil的话则返回defaultValue
func ToBoolPointerOrNilIfFalse ¶
ToBoolPointerOrNilIfFalse 将布尔变量转换为布尔类型的指针,如果变量的值为false的话则转换为nil指针
func ToBytePointerOrNilIfZero ¶
ToBytePointerOrNilIfZero 将byte类型的变量转换为对应的*byte指针类型,如果变量的值为0的话则返回nil指针
func ToComplex128Pointer ¶
func ToComplex128Pointer(v complex128) *complex128
ToComplex128Pointer 将complex128类型的变量转换为对应的*complex128指针类型
func ToComplex128PointerOrNilIfZero ¶
func ToComplex128PointerOrNilIfZero(v complex128) *complex128
ToComplex128PointerOrNilIfZero 将complex128类型的变量转换为对应的*complex128指针类型,如果变量的值为0的话则返回nil指针
func ToComplex64Pointer ¶
ToComplex64Pointer 将complex64类型的变量转换为对应的*complex64指针类型
func ToComplex64PointerOrNilIfZero ¶
ToComplex64PointerOrNilIfZero 将complex64类型的变量转换为对应的*complex64指针类型,如果变量的值为0的话则返回nil指针
func ToDurationPointer ¶
ToDurationPointer 将time.Duration类型的变量转换为对应的*time.Duration指针类型
func ToDurationPointerOrNilIfZero ¶
ToDurationPointerOrNilIfZero 将time.Duration类型的变量转换为对应的*time.Duration指针类型,如果变量的值为0的话则返回nil指针
func ToFloat32Pointer ¶
ToFloat32Pointer 将float32类型的变量转换为对应的*float32指针类型
func ToFloat32PointerOrNilIfZero ¶
ToFloat32PointerOrNilIfZero 将float32类型的变量转换为对应的*float32指针类型,如果变量的值为0的话则返回nil指针
func ToFloat64Pointer ¶
ToFloat64Pointer 将float64类型的变量转换为对应的*float64指针类型
func ToFloat64PointerOrNilIfZero ¶
ToFloat64PointerOrNilIfZero 将float64类型的变量转换为对应的*float64指针类型,如果变量的值为0的话则返回nil指针
func ToInt16Pointer ¶
ToInt16Pointer 将int16类型的变量转换为对应的*int16指针类型
func ToInt16PointerOrNilIfZero ¶
ToInt16PointerOrNilIfZero 将int16类型的变量转换为对应的*int16指针类型,如果变量的值为0的话则返回nil指针
func ToInt32Pointer ¶
ToInt32Pointer 将int32类型的变量转换为对应的*int32指针类型
func ToInt32PointerOrNilIfZero ¶
ToInt32PointerOrNilIfZero 将int32类型的变量转换为对应的*int32指针类型,如果变量的值为0的话则返回nil指针
func ToInt64Pointer ¶
ToInt64Pointer 将int64类型的变量转换为对应的*int64指针类型
func ToInt64PointerOrNilIfZero ¶
ToInt64PointerOrNilIfZero 将int64类型的变量转换为对应的*int64指针类型,如果变量的值为0的话则返回nil指针
func ToInt8PointerOrNilIfZero ¶
ToInt8PointerOrNilIfZero 将int8类型的变量转换为对应的*int8指针类型,如果变量的值为0的话则返回nil指针
func ToIntPointerOrNilIfZero ¶
ToIntPointerOrNilIfZero 将int类型的变量转换为对应的*int指针类型,如果变量的值为0的话则返回nil指针
func ToRunePointerOrNilIfZero ¶
ToRunePointerOrNilIfZero 将rune类型的变量转换为对应的*rune指针类型,如果变量的值为0的话则返回nil指针
func ToStringPointer ¶
ToStringPointer 将string类型的变量转换为对应的*string指针类型
func ToStringPointerOrNilIfEmpty ¶
ToStringPointerOrNilIfEmpty 将string类型的变量转换为对应的*string指针类型,如果变量的值为空字符串的话则返回nil指针
func ToTimePointer ¶
ToTimePointer 将time.Time类型转换为指针,如果时间为零值则返回空指针
func ToUint16Pointer ¶
ToUint16Pointer 将uint16类型的变量转换为对应的*uint16指针类型
func ToUint16PointerOrNilIfZero ¶
ToUint16PointerOrNilIfZero 将uint16类型的变量转换为对应的*uint16指针类型,如果变量的值为0的话则返回nil指针
func ToUint32Pointer ¶
ToUint32Pointer 将uint32类型的变量转换为对应的*uint32指针类型
func ToUint32PointerOrNilIfZero ¶
ToUint32PointerOrNilIfZero 将uint32类型的变量转换为对应的*uint32指针类型,如果变量的值为0的话则返回nil指针
func ToUint64Pointer ¶
ToUint64Pointer 将uint64类型的变量转换为对应的*uint64指针类型
func ToUint64PointerOrNilIfZero ¶
ToUint64PointerOrNilIfZero 将uint64类型的变量转换为对应的*uint64指针类型,如果变量的值为0的话则返回nil指针
func ToUint8Pointer ¶
ToUint8Pointer 将uint8类型的变量转换为对应的*uint8指针类型
func ToUint8PointerOrNilIfZero ¶
ToUint8PointerOrNilIfZero 将uint8类型的变量转换为对应的*uint8指针类型,如果变量的值为0的话则返回nil指针
func ToUintPointerOrNilIfZero ¶
ToUintPointerOrNilIfZero 将uint类型的变量转换为对应的*uint指针类型,如果变量的值为0的话则返回nil指针
func ToUintptrPointer ¶
ToUintptrPointer 将uintptr类型的变量转换为对应的*uintptr指针类型
func ToUintptrPointerOrNilIfZero ¶
ToUintptrPointerOrNilIfZero 将uintptr类型的变量转换为对应的*uintptr指针类型,如果变量的值为0的话则返回nil指针
Types ¶
This section is empty.