Documentation
¶
Index ¶
- func MapToSlice(m map[string]struct{}) []string
- func Ptr(v string) *string
- func PtrDefToNil(v string, def string) *string
- func PtrZeroToNil(v string) *string
- func SafeIndex(s []string, i int) string
- func SafeIndexDef(s []string, i int, def string) string
- func SafeIndexPtr(s []string, i int) *string
- func SliceToMap(s []string) map[string]struct{}
- func Val(v *string) string
- func ValDef(v *string, def string) string
- type Slice
Constants ¶
This section is empty.
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 "".
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.