Documentation ¶
Index ¶
- func Abs(v int32) int32
- func Contains(vs []int32, v int32) bool
- func FromString(s string) (int32, error)
- func FromStringOrDefault(s string, defaultVal int32) int32
- func Int32OrDefault(v *int32, defaultVal int32) *int32
- func Max(v int32, vs ...int32) int32
- func Min(v int32, vs ...int32) int32
- func Pointer(v int32) *int32
- func Random() int32
- func RandomN(n int32) int32
- func Sort(vs []int32) []int32
- func Unique(vs []int32) []int32
- type Int32Slice
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
Abs returns the absolute value of v. NOTE: this method is deprecated. Use helpy.Abs instead.
func Contains ¶
Contains returns true if vs contains v. NOTE: this function is deprecated. Use slicey.Contains instead.
func FromStringOrDefault ¶ added in v0.1.0
FromStringOrDefault parses s and returns a int32.
func Int32OrDefault ¶
Int32OrDefault returns int32 if it is not nil, and a pointer to defaultVal otherwise. NOTE: this method is deprecated. Use helpy.DerefOrValue instead.
func Max ¶
Max returns the maximum value from v and vs. NOTE: this method is deprecated. Use helpy.Max instead.
func Min ¶
Min returns the minimum value from v and vs. NOTE: this method is deprecated. Use helpy.Min instead.
func Pointer ¶
Pointer returns a pointer to the given int32. NOTE: this method is deprecated. Use helpy.Pointer instead.
Types ¶
type Int32Slice ¶
type Int32Slice []int32
func (Int32Slice) Len ¶
func (p Int32Slice) Len() int
func (Int32Slice) Less ¶
func (p Int32Slice) Less(i, j int) bool
func (Int32Slice) Swap ¶
func (p Int32Slice) Swap(i, j int)
type Set ¶
type Set helpy.Set[int32]
NOTE: this type is deprecated. Use helpy.Set instead
func MakeSet ¶
MakeSet returns a lookup map for int32 NOTE: this function is deprecated. Use helpy.MakeSet instead.