Documentation
¶
Index ¶
- Constants
- func MapToSlice(m map[uint32]struct{}) []uint32
- func MustParse(v string) uint32
- func Parse(v string) (uint32, error)
- func Ptr(v uint32) *uint32
- func PtrDefToNil(v uint32, def uint32) *uint32
- func PtrZeroToNil(v uint32) *uint32
- func SafeIndex(s []uint32, i int) uint32
- func SafeIndexDef(s []uint32, i int, def uint32) uint32
- func SafeIndexPtr(s []uint32, i int) *uint32
- func SliceToMap(s []uint32) map[uint32]struct{}
- func Val(v *uint32) uint32
- func ValDef(v *uint32, def uint32) uint32
- type Slice
Constants ¶
View Source
const (
// BitSize is the size in bits of this type.
BitSize = 32
)
Variables ¶
This section is empty.
Functions ¶
func MapToSlice ¶
MapToSlice converts a map to slice.
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.
func SliceToMap ¶
SliceToMap converts a slice to map.
Types ¶
Click to show internal directories.
Click to hide internal directories.