Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUintTooLarge = fmt.Errorf("unsigned int value is too large, maximum: %d", uint64(math.MaxUint))
)
Errors that are specific to model conversion.
Functions ¶
func DerefOrZero ¶
func DerefOrZero[T any](s *T) T
DerefOrZero will dereference the value, or return the zero value if it's nil.
func TimePtrLocal ¶
TimePtrLocal converts a time to local time, or nil.
func TimePtrUTC ¶
TimePtrUTC converts a time to UTC time, or nil.
func Uint64ToUint ¶
Uint64ToUint converts a uint64 to uint, and errors if uint64 value is larger than what the uint type supports, such as having a value bigger than 2^32-1 in a 32-bit build of Dinkur.
func ZeroAsNil ¶
func ZeroAsNil[T comparable](s T) *T
ZeroAsNil will return a pointer to the value, or nil if the value is zero.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.