Documentation ¶
Index ¶
- func Contains(vs []uint8, v uint8) bool
- func FromString(s string) (uint8, error)
- func Max(v uint8, vs ...uint8) uint8
- func Min(v uint8, vs ...uint8) uint8
- func Pointer(v uint8) *uint8
- func Random() uint8
- func RandomN(n uint8) uint8
- func Sort(vs []uint8) []uint8
- func Uint8(v *uint8) uint8
- func Uint8OrDefault(v *uint8, defaultVal uint8) *uint8
- func Unique(vs []uint8) []uint8
- type Set
- type Uint8Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomN ¶
RandomN returns a non-negative pseudo-random number in [0,n) of type uint8. It panics if n <= 0.
func Uint8OrDefault ¶
Uint8OrDefault returns uint8 if it is not nil, and a pointer to defaultVal otherwise.
Types ¶
type Set ¶
type Set map[uint8]struct{}
type Uint8Slice ¶
type Uint8Slice []uint8
func (Uint8Slice) Len ¶
func (p Uint8Slice) Len() int
func (Uint8Slice) Less ¶
func (p Uint8Slice) Less(i, j int) bool
func (Uint8Slice) Swap ¶
func (p Uint8Slice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.