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