Documentation ¶
Overview ¶
The util package contains basic string manipulation functions and definitions that could be used anywhere.
The util package should be very simple and make no imports from dexter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllPlatforms = []string{
"android", "darwin", "dragonfly", "freebsd",
"js", "linux", "nacl", "netbsd", "openbsd",
"plan9", "solaris", "windows", "zos",
}
All values for runtime.GOOS, derived from https://github.com/golang/go/blob/master/src/go/build/syslist.go
var UnixLike = []string{
"darwin", "dragonfly", "freebsd",
"linux", "nacl", "netbsd", "openbsd",
"plan9", "solaris",
}
A values for runtime.GOOS that are unix-like
Functions ¶
func AppendUnique ¶
Merge two string slices, only adding values from set2 that were not already present in set1. The resulting slice will not be unique if there are repeat entries in set1, but repeat entries in set2 will only be appended once.
func StringsInclude ¶
Check if the string in the check variable is a member of the set of strings.
func StringsSubtract ¶
Given a slice of strings, return the slice without the string in the rm variable, if it exists in the set.
Types ¶
This section is empty.