Documentation
¶
Index ¶
- func CanonicalIndexes(indexes []int) []int
- func DeleteIndexedElem(list []string, indexes []int, k int) ([]string, []int)
- func ExtendedPatternMatcher(pat string, mode pattern.Mode) (func(string) bool, error)
- func IndexedMax(list []string, indexes []int) int
- func SetIndexedElem(list []string, indexes []int, k int, val string) ([]string, []int)
- func TestMainSetup()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalIndexes ¶
CanonicalIndexes returns nil when indexes is simply 0, 1, 2, and so on, as a dense array should leave the indexes nil.
func DeleteIndexedElem ¶
DeleteIndexedElem is like SetIndexedElem, but unsetting the element at index k, which may leave a hole.
func ExtendedPatternMatcher ¶
ExtendedPatternMatcher returns a regexp.Regexp.MatchString-like function to support !(pattern-list) extended patterns where possible. It can be used instead of pattern.Regexp for narrow use cases.
func IndexedMax ¶
IndexedMax returns the maximum index of an indexed array, or -1 when the array is empty.
func SetIndexedElem ¶
SetIndexedElem returns list and indexes with the element at index k set, converting a dense array to a sparse one when setting index k would otherwise leave a hole. The index k must not be negative.
func TestMainSetup ¶
func TestMainSetup()
TestMainSetup is used by the integration tests running shell scripts either via our interpreter or via real shells, to ensure a reasonably clean and consistent environment.
Types ¶
This section is empty.