ptr package - github.com/gotidy/ptr - Go Packages (original) (raw)
- func Bool(v bool) *bool
- func Byte(v byte) *byte
- func Complex128(v complex128) *complex128
- func Complex64(v complex64) *complex64
- func Duration(v time.Duration) *time.Duration
- func Float32(v float32) *float32
- func Float64(v float64) *float64
- func Int(v int) *int
- func Int16(v int16) *int16
- func Int32(v int32) *int32
- func Int64(v int64) *int64
- func Int8(v int8) *int8
- func Rune(v rune) *rune
- func String(v string) *string
- func Time(v time.Time) *time.Time
- func ToBool(v *bool) bool
- func ToBoolDef(v *bool, def bool) bool
- func ToByte(v *byte) byte
- func ToByteDef(v *byte, def byte) byte
- func ToComplex128(v *complex128) complex128
- func ToComplex128Def(v *complex128, def complex128) complex128
- func ToComplex64(v *complex64) complex64
- func ToComplex64Def(v *complex64, def complex64) complex64
- func ToDuration(v *time.Duration) time.Duration
- func ToDurationDef(v *time.Duration, def time.Duration) time.Duration
- func ToFloat32(v *float32) float32
- func ToFloat32Def(v *float32, def float32) float32
- func ToFloat64(v *float64) float64
- func ToFloat64Def(v *float64, def float64) float64
- func ToInt(v *int) int
- func ToInt16(v *int16) int16
- func ToInt16Def(v *int16, def int16) int16
- func ToInt32(v *int32) int32
- func ToInt32Def(v *int32, def int32) int32
- func ToInt64(v *int64) int64
- func ToInt64Def(v *int64, def int64) int64
- func ToInt8(v *int8) int8
- func ToInt8Def(v *int8, def int8) int8
- func ToIntDef(v *int, def int) int
- func ToRune(v *rune) rune
- func ToRuneDef(v *rune, def rune) rune
- func ToString(v *string) string
- func ToStringDef(v *string, def string) string
- func ToTime(v *time.Time) time.Time
- func ToTimeDef(v *time.Time, def time.Time) time.Time
- func ToUInt(v *uint) uint
- func ToUInt16(v *uint16) uint16
- func ToUInt16Def(v *uint16, def uint16) uint16
- func ToUInt32(v *uint32) uint32
- func ToUInt32Def(v *uint32, def uint32) uint32
- func ToUInt64(v *uint64) uint64
- func ToUInt64Def(v *uint64, def uint64) uint64
- func ToUInt8(v *uint8) uint8
- func ToUInt8Def(v *uint8, def uint8) uint8
- func ToUIntDef(v *uint, def uint) uint
- func UInt(v uint) *uint
- func UInt16(v uint16) *uint16
- func UInt32(v uint32) *uint32
- func UInt64(v uint64) *uint64
- func UInt8(v uint8) *uint8
This section is empty.
This section is empty.
Bool returns pointer to bool value.
Byte returns pointer to byte value.
Complex128 returns pointer to complex128 value.
Complex64 returns pointer to complex64 value.
Duration returns pointer to time.Duration value.
Float32 returns pointer to float32 value.
Float64 returns pointer to float64 value.
Int returns pointer to int value.
Int16 returns pointer to int16 value.
Int32 returns pointer to int32 value.
Int64 returns pointer to int64 value.
Int8 returns pointer to int8 value.
Rune returns pointer to rune value.
String returns pointer to string value.
Time returns pointer to time.Time value.
ToBool returns the value of the bool pointer passed in or false if the pointer is nil.
ToBoolDef returns the value of the bool pointer passed in or default value if the pointer is nil.
ToByte returns the value of the byte pointer passed in or 0 if the pointer is nil.
ToByteDef returns the value of the byte pointer passed in or default value if the pointer is nil.
ToComplex128 returns the value of the complex128 pointer passed in or 0 if the pointer is nil.
ToComplex128Def returns the value of the complex128 pointer passed in or default value if the pointer is nil.
ToComplex64 returns the value of the complex64 pointer passed in or 0 if the pointer is nil.
ToComplex64Def returns the value of the complex64 pointer passed in or default value if the pointer is nil.
ToDuration returns the value of the time.Duration pointer passed in or 0 if the pointer is nil.
ToDurationDef returns the value of the time.Duration pointer passed in or default value if the pointer is nil.
ToFloat32 returns the value of the float32 pointer passed in or 0 if the pointer is nil.
ToFloat32Def returns the value of the float32 pointer passed in or default value if the pointer is nil.
ToFloat64 returns the value of the float64 pointer passed in or 0 if the pointer is nil.
ToFloat64Def returns the value of the float64 pointer passed in or default value if the pointer is nil.
ToInt returns the value of the int pointer passed in or int if the pointer is nil. ToInt returns the value of the int pointer passed in or 0 if the pointer is nil.
ToInt16 returns the value of the int16 pointer passed in or 0 if the pointer is nil.
ToInt16Def returns the value of the int16 pointer passed in or default value if the pointer is nil.
ToInt32 returns the value of the int32 pointer passed in or 0 if the pointer is nil.
ToInt32Def returns the value of the int32 pointer passed in or default value if the pointer is nil.
ToInt64 returns the value of the int64 pointer passed in or 0 if the pointer is nil.
ToInt64Def returns the value of the int64 pointer passed in or default value if the pointer is nil.
ToInt8 returns the value of the int8 pointer passed in or 0 if the pointer is nil.
ToInt8Def returns the value of the int8 pointer passed in or default value if the pointer is nil.
ToIntDef returns the value of the int pointer passed in or default value if the pointer is nil.
ToRune returns the value of the rune pointer passed in or 0 if the pointer is nil.
ToRuneDef returns the value of the rune pointer passed in or default value if the pointer is nil.
ToString returns the value of the string pointer passed in or empty string if the pointer is nil.
ToStringDef returns the value of the string pointer passed in or default value if the pointer is nil.
ToTime returns the value of the time.Time pointer passed in or Time{} if the pointer is nil.
ToTimeDef returns the value of the time.Time pointer passed in or default value if the pointer is nil.
ToUInt returns the value of the uint pointer passed in or 0 if the pointer is nil.
ToUInt16 returns the value of the uint16 pointer passed in or 0 if the pointer is nil.
ToUInt16Def returns the value of the uint16 pointer passed in or default value if the pointer is nil.
ToUInt32 returns the value of the uint32 pointer passed in or 0 if the pointer is nil.
ToUInt32Def returns the value of the uint32 pointer passed in or default value if the pointer is nil.
ToUInt64 returns the value of the uint64 pointer passed in or 0 if the pointer is nil.
ToUInt64Def returns the value of the uint64 pointer passed in or default value if the pointer is nil.
ToUInt8 returns the value of the uint8 pointer passed in or 0 if the pointer is nil.
ToUInt8Def returns the value of the uint8 pointer passed in or default value if the pointer is nil.
ToUIntDef returns the value of the uint pointer passed in or default value if the pointer is nil.
UInt returns pointer to uint value.
UInt16 returns pointer to uint16 value.
UInt32 returns pointer to uint32 value.
UInt64 returns pointer to uint64 value.
UInt8 returns pointer to uint8 value.
This section is empty.