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