Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPointer ¶
func GetPointer[T comparable](value T) *T
GetPointer returns pointer from comparable type
func GetSlicePointer ¶ added in v1.0.13
func GetSlicePointer[T comparable](value []T) (result []*T)
GetSlicePointer returns pointer from comparable type slice
func GetStatusPointer ¶ added in v1.0.9
GetStatusPointer returns the status pointer in rpc
func GetTimePointer ¶ added in v1.0.9
GetTimePointer returns the time pointer from int64
func GetUnixMilliPointer ¶ added in v1.2.4
GetUnixMilliPointer returns nil when int64 is -621355968000, your time should not be from before 1970
Example:
var zeroTime time.Time zeroTimeP := GetUnixMilliPointer(zeroTime) fmt.Println(zeroTimeP)
Result: <nil>
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.