Documentation
¶
Overview ¶
Package util provides utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNegativeValue indicates that a negative value was provided where it is not allowed. ErrNegativeValue = errors.New("negative value provided") // ErrOverflow indicates that a value exceeds the maximum limit for the target type. ErrOverflow = errors.New("value exceeds maximum limit for target type") )
Functions ¶
func SafeInt32 ¶
SafeInt32 converts any integer type to int32, returning an error if it would overflow.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.