Documentation
¶
Index ¶
- func GetTimeUnix(source *time.Time) *int64
- func GetTimeUnixMilli(source *time.Time) *int64
- func GetVal[T any](source *T, fallbackValue T) T
- func Indirect[TIn any, TOut any](srcPtr *TIn, fn func(src TIn) *TOut) *TOut
- func SetDefaultStr[T string](target *T, defaultValue T)
- func SetDefaultValue[T any](target **T, defaultValue T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimeUnix ¶
func GetTimeUnixMilli ¶
func SetDefaultStr ¶
func SetDefaultStr[T string](target *T, defaultValue T)
func SetDefaultValue ¶
func SetDefaultValue[T any](target **T, defaultValue T)
if target is nil, set it to defaultValue target must keep the value when this function is returned
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.