Documentation
¶
Index ¶
- Constants
- func MapToSlice(m map[uint16]struct{}) []uint16
- func MustParse(v string) uint16
- func Parse(v string) (uint16, error)
- func Ptr(v uint16) *uint16
- func PtrDefToNil(v uint16, def uint16) *uint16
- func PtrZeroToNil(v uint16) *uint16
- func SafeIndex(s []uint16, i int) uint16
- func SafeIndexDef(s []uint16, i int, def uint16) uint16
- func SafeIndexPtr(s []uint16, i int) *uint16
- func SliceToMap(s []uint16) map[uint16]struct{}
- func Val(v *uint16) uint16
- func ValDef(v *uint16, def uint16) uint16
- type Slice
Constants ¶
View Source
const (
// BitSize is the size in bits of this type.
BitSize = 16
)
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.