pointy

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

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

func GetStatusPointer(value *uint32) (result *uint8)

GetStatusPointer returns the status pointer in rpc

func GetTimeMilliPointer added in v1.3.1

func GetTimeMilliPointer(value *int64) (result *time.Time)

GetTimeMilliPointer returns the time pointer from unix milli time int64

func GetTimePointer added in v1.0.9

func GetTimePointer(value *int64, nsec int64) (result *time.Time)

GetTimePointer returns the time pointer from unix time int64

func GetUnixMilliPointer added in v1.2.4

func GetUnixMilliPointer(value int64) *int64

GetUnixMilliPointer returns nil when int64 is -621355968000, your time should not be from before 1970

Example:

 var zeroTime time.Time
	zeroTimeP := GetUnixMilliPointer(zeroTime.UnixMilli())
	fmt.Println(zeroTimeP)

Result: <nil>

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL