Documentation
¶
Index ¶
- func Bool(s bool) *bool
- func BoolNoNonePtr(s bool) *bool
- func Byte(s byte) *byte
- func ByteNoNonePtr(s byte) *byte
- func Complex128(s complex128) *complex128
- func Complex128NoNonePtr(s complex128) *complex128
- func Complex64(s complex64) *complex64
- func Complex64NoNonePtr(s complex64) *complex64
- func Duration(s time.Duration) *time.Duration
- func DurationNoNonePtr(s time.Duration) *time.Duration
- func Error(s error) *error
- func ErrorNoNonePtr(s error) *error
- func Float32(s float32) *float32
- func Float32NoNonePtr(s float32) *float32
- func Float64(s float64) *float64
- func Float64NoNonePtr(s float64) *float64
- func Int(s int) *int
- func Int16(s int16) *int16
- func Int16NoNonePtr(s int16) *int16
- func Int32(s int32) *int32
- func Int32NoNonePtr(s int32) *int32
- func Int64(s int64) *int64
- func Int64NoNonePtr(s int64) *int64
- func Int8(s int8) *int8
- func Int8NoNonePtr(s int8) *int8
- func IntNoNonePtr(s int) *int
- func NoNonePtr[T comparable](s T) *T
- func PointerInt64ToTime(i *int64) *time.Time
- func PointerTimeToInt64(i *time.Time) *int64
- func Ptr[T any](s T) *T
- func ReflectType(s reflect.Type) *reflect.Type
- func ReflectValue(s reflect.Value) *reflect.Value
- func Rune(s rune) *rune
- func RuneNoNonePtr(s rune) *rune
- func String(s string) *string
- func StringNoNonePtr(s string) *string
- func Time(s time.Time) *time.Time
- func TimeNoNonePtr(s time.Time) *time.Time
- func UInt(s uint) *uint
- func UInt16(s uint16) *uint16
- func UInt16NoNonePtr(s uint16) *uint16
- func UInt32(s uint32) *uint32
- func UInt32NoNonePtr(s uint32) *uint32
- func UInt64(s uint64) *uint64
- func UInt64NoNonePtr(s uint64) *uint64
- func UInt8(s uint8) *uint8
- func UInt8NoNonePtr(s uint8) *uint8
- func UIntNoNonePtr(s uint) *uint
- func UIntptr(s uintptr) *uintptr
- func UIntptrNoNonePtr(s uintptr) *uintptr
- func Value[T any](s *T) T
- func ValueBool(s *bool) bool
- func ValueBoolWithDefault(s *bool, defaultValue bool) bool
- func ValueByte(s *byte) byte
- func ValueByteWithDefault(s *byte, defaultValue byte) byte
- func ValueComplex128(s *complex128) complex128
- func ValueComplex128WithDefault(s *complex128, defaultValue complex128) complex128
- func ValueComplex64(s *complex64) complex64
- func ValueComplex64WithDefault(s *complex64, defaultValue complex64) complex64
- func ValueDuration(s *time.Duration) time.Duration
- func ValueDurationWithDefault(s *time.Duration, defaultValue time.Duration) time.Duration
- func ValueError(s *error) error
- func ValueErrorWithDefault(s *error, defaultValue error) error
- func ValueFloat32(s *float32) float32
- func ValueFloat32WithDefault(s *float32, defaultValue float32) float32
- func ValueFloat64(s *float64) float64
- func ValueFloat64WithDefault(s *float64, defaultValue float64) float64
- func ValueInt(s *int) int
- func ValueInt16(s *int16) int16
- func ValueInt16WithDefault(s *int16, defaultValue int16) int16
- func ValueInt32(s *int32) int32
- func ValueInt32WithDefault(s *int32, defaultValue int32) int32
- func ValueInt64(s *int64) int64
- func ValueInt64WithDefault(s *int64, defaultValue int64) int64
- func ValueInt8(s *int8) int8
- func ValueInt8WithDefault(s *int8, defaultValue int8) int8
- func ValueIntWithDefault(s *int, defaultValue int) int
- func ValueRune(s *rune) rune
- func ValueRuneWithDefault(s *rune, defaultValue rune) rune
- func ValueString(s *string) string
- func ValueStringWithDefault(s *string, defaultValue string) string
- func ValueTime(s *time.Time) time.Time
- func ValueTimeWithDefault(s *time.Time, defaultValue time.Time) time.Time
- func ValueUInt(s *uint) uint
- func ValueUInt16(s *uint16) uint16
- func ValueUInt16WithDefault(s *uint16, defaultValue uint16) uint16
- func ValueUInt32(s *uint32) uint32
- func ValueUInt32WithDefault(s *uint32, defaultValue uint32) uint32
- func ValueUInt64(s *uint64) uint64
- func ValueUInt64WithDefault(s *uint64, defaultValue uint64) uint64
- func ValueUInt8(s *uint8) uint8
- func ValueUInt8WithDefault(s *uint8, defaultValue uint8) uint8
- func ValueUIntWithDefault(s *uint, defaultValue uint) uint
- func ValueUIntptr(s *uintptr) uintptr
- func ValueUIntptrWithDefault(s *uintptr, defaultValue uintptr) uintptr
- func ValueWithDefault[T any](s *T, defaultValue T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolNoNonePtr ¶ added in v1.2.0
BoolNoNonePtr returns the pointer of bool value, if the value is zero-value, it returns nil
func ByteNoNonePtr ¶ added in v1.2.0
ByteNoNonePtr returns the pointer of byte value, if the value is zero-value, it returns nil
func Complex128 ¶
func Complex128(s complex128) *complex128
Complex128 returns the pointer of complex128 value
func Complex128NoNonePtr ¶ added in v1.2.0
func Complex128NoNonePtr(s complex128) *complex128
Complex128NoNonePtr returns the pointer of complex128 value, if the value is zero-value, it returns nil
func Complex64NoNonePtr ¶ added in v1.2.0
Complex64NoNonePtr returns the pointer of complex64 value, if the value is zero-value, it returns nil
func DurationNoNonePtr ¶ added in v1.2.0
DurationNoNonePtr returns the pointer of time.Duration value, if the value is zero-value, it returns nil
func ErrorNoNonePtr ¶ added in v1.2.0
ErrorNoNonePtr returns the pointer of error value, if the value is zero-value, it returns nil
func Float32NoNonePtr ¶ added in v1.2.0
Float32NoNonePtr returns the pointer of float32 value, if the value is zero-value, it returns nil
func Float64NoNonePtr ¶ added in v1.2.0
Float64NoNonePtr returns the pointer of float64 value, if the value is zero-value, it returns nil
func Int16NoNonePtr ¶ added in v1.2.0
Int16NoNonePtr returns the pointer of int16 value, if the value is zero-value, it returns nil
func Int32NoNonePtr ¶ added in v1.2.0
Int32NoNonePtr returns the pointer of int32 value, if the value is zero-value, it returns nil
func Int64NoNonePtr ¶ added in v1.2.0
Int64NoNonePtr returns the pointer of int64 value, if the value is zero-value, it returns nil
func Int8NoNonePtr ¶ added in v1.2.0
Int8NoNonePtr returns the pointer of int8 value, if the value is zero-value, it returns nil
func IntNoNonePtr ¶ added in v1.2.0
IntNoNonePtr returns the pointer of int value, if the value is zero-value, it returns nil
func NoNonePtr ¶ added in v1.7.0
func NoNonePtr[T comparable](s T) *T
NoNonePtr returns the pointer of int value, if the value is zero-value, it returns nil.
func PointerInt64ToTime ¶ added in v1.3.0
PointerInt64ToTime converts a pointer of type *int64 to a time.Time.
func PointerTimeToInt64 ¶ added in v1.5.0
PointerTimeToInt64 converts a pointer of type *time.Time to a int64.
func ReflectType ¶ added in v1.4.0
ReflectType returns the pointer of reflect.Type value
func ReflectValue ¶ added in v1.4.0
ReflectValue returns the pointer of reflect.Value value
func RuneNoNonePtr ¶ added in v1.2.0
RuneNoNonePtr returns the pointer of rune value, if the value is zero-value, it returns nil
func StringNoNonePtr ¶ added in v1.2.0
StringNoNonePtr returns the pointer of string value, if the value is zero-value, it returns nil
func TimeNoNonePtr ¶ added in v1.2.0
TimeNoNonePtr returns the pointer of time.Time value, if the value is zero-value, it returns nil
func UInt16NoNonePtr ¶ added in v1.2.0
UInt16NoNonePtr returns the pointer of uint16 value, if the value is zero-value, it returns nil
func UInt32NoNonePtr ¶ added in v1.2.0
UInt32NoNonePtr returns the pointer of uint32 value, if the value is zero-value, it returns nil
func UInt64NoNonePtr ¶ added in v1.2.0
UInt64NoNonePtr returns the pointer of uint64 value, if the value is zero-value, it returns nil
func UInt8NoNonePtr ¶ added in v1.2.0
UInt8NoNonePtr returns the pointer of uint8 value, if the value is zero-value, it returns nil
func UIntNoNonePtr ¶ added in v1.2.0
UIntNoNonePtr returns the pointer of uint value, if the value is zero-value, it returns nil
func UIntptrNoNonePtr ¶ added in v1.2.0
UIntptrNoNonePtr returns the pointer of uintptr value, if the value is zero-value, it returns nil
func Value ¶ added in v1.7.0
func Value[T any](s *T) T
Value returns the value pointed to by the pointer
func ValueBoolWithDefault ¶ added in v1.1.0
func ValueByteWithDefault ¶ added in v1.1.0
func ValueComplex128 ¶ added in v1.1.0
func ValueComplex128(s *complex128) complex128
ValueComplex128 returns the value pointed to by the pointer
func ValueComplex128WithDefault ¶ added in v1.1.0
func ValueComplex128WithDefault(s *complex128, defaultValue complex128) complex128
func ValueComplex64 ¶ added in v1.1.0
ValueComplex64 returns the value pointed to by the pointer
func ValueComplex64WithDefault ¶ added in v1.1.0
func ValueDuration ¶ added in v1.3.1
ValueDuration returns the value pointed to by the pointer
func ValueDurationWithDefault ¶ added in v1.3.1
func ValueError ¶ added in v1.1.0
ValueError returns the value pointed to by the pointer
func ValueErrorWithDefault ¶ added in v1.1.0
func ValueFloat32 ¶ added in v1.1.0
ValueFloat32 returns the value pointed to by the pointer
func ValueFloat32WithDefault ¶ added in v1.1.0
func ValueFloat64 ¶ added in v1.1.0
ValueFloat64 returns the value pointed to by the pointer
func ValueFloat64WithDefault ¶ added in v1.1.0
func ValueInt16 ¶ added in v1.1.0
ValueInt16 returns the value pointed to by the pointer
func ValueInt16WithDefault ¶ added in v1.1.0
func ValueInt32 ¶ added in v1.1.0
ValueInt32 returns the value pointed to by the pointer
func ValueInt32WithDefault ¶ added in v1.1.0
func ValueInt64 ¶ added in v1.1.0
ValueInt64 returns the value pointed to by the pointer
func ValueInt64WithDefault ¶ added in v1.1.0
func ValueInt8WithDefault ¶ added in v1.1.0
func ValueIntWithDefault ¶ added in v1.1.0
func ValueRuneWithDefault ¶ added in v1.1.0
func ValueString ¶ added in v1.1.0
ValueString returns the value pointed to by the pointer
func ValueStringWithDefault ¶ added in v1.1.0
func ValueTimeWithDefault ¶ added in v1.3.1
func ValueUInt16 ¶ added in v1.1.0
ValueUInt16 returns the value pointed to by the pointer
func ValueUInt16WithDefault ¶ added in v1.1.0
func ValueUInt32 ¶ added in v1.1.0
ValueUInt32 returns the value pointed to by the pointer
func ValueUInt32WithDefault ¶ added in v1.1.0
func ValueUInt64 ¶ added in v1.1.0
ValueUInt64 returns the value pointed to by the pointer
func ValueUInt64WithDefault ¶ added in v1.1.0
func ValueUInt8 ¶ added in v1.1.0
ValueUInt8 returns the value pointed to by the pointer
func ValueUInt8WithDefault ¶ added in v1.1.0
func ValueUIntWithDefault ¶ added in v1.1.0
func ValueUIntptr ¶ added in v1.1.0
ValueUIntptr returns the value pointed to by the pointer
func ValueUIntptrWithDefault ¶ added in v1.1.0
func ValueWithDefault ¶ added in v1.6.0
func ValueWithDefault[T any](s *T, defaultValue T) T
Types ¶
This section is empty.