Documentation
¶
Index ¶
- Constants
- func MapToSlice(m map[uint]struct{}) []uint
- func MustParse(v string) uint
- func Parse(v string) (uint, error)
- func Ptr(v uint) *uint
- func PtrDefToNil(v uint, def uint) *uint
- func PtrZeroToNil(v uint) *uint
- func SafeIndex(s []uint, i int) uint
- func SafeIndexDef(s []uint, i int, def uint) uint
- func SafeIndexPtr(s []uint, i int) *uint
- func SliceToMap(s []uint) map[uint]struct{}
- func Val(v *uint) uint
- func ValDef(v *uint, def uint) uint
- type Slice
Constants ¶
View Source
const ( // BitSize is the size in bits of this type. BitSize = 32 << (^uint(0) >> 63) )
Variables ¶
This section is empty.
Functions ¶
func PtrDefToNil ¶
PtrDefToNil returns a pointer to the value, or nil if "def".
func PtrZeroToNil ¶
PtrZeroToNil returns a pointer to the value, or nil if 0.
func SafeIndexDef ¶
SafeIndexDef returns "s[i]" if possible, and "def" otherwise.
func SafeIndexPtr ¶
SafeIndexPtr returns "s[i]" if possible, and nil otherwise.
Types ¶
Click to show internal directories.
Click to hide internal directories.