Documentation
¶
Index ¶
- func AppendIfAbsent(strings []string, s string) []string
- func Contract(m map[string]string, f func(string, string) string) []string
- func DefaultIf(value, defaultValue, condition string) string
- func DefaultIfEmpty(value, defaultValue string) string
- func ErrorMessages(errs []error) []string
- func Filter(strs []string, f func(string) bool) []string
- func IsAbsent(strings []string, s string) bool
- func Quote(s []string) []string
- func StringKeys(m map[string]string) []string
- func StringValues(m map[string]string) []string
- func Transform(s []string, f func(string) string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIfAbsent ¶
AppendIfAbsent appends a string to a slice, given that the string is not yet present in the slice
func DefaultIf ¶
DefaultIf falls back to a default value if the passed value is equal to the condition parameter.
func DefaultIfEmpty ¶
DefaultIfEmpty falls back to a default value if the passed value is empty
func ErrorMessages ¶
ErrorMessages accumulates the error messages from s lice of errors.
func Filter ¶
Filter takes a slice of strings and returns a slice of strings consisting of those strings from the input for which the filter evaluated to true.
func Quote ¶
Quote takes a slice of strings and returns a slice of strings where each element of the input is put in double quotation marks.
func StringKeys ¶
StringKeys extracts the key of a map[string]string and returns them as a slice of strings.
func StringValues ¶
StringValues extracts the values of a map[string]string and returns them as a slice of strings.
Types ¶
This section is empty.