Documentation
¶
Overview ¶
Package utils provides public utility functions that are used by other functions within the module. Their interfaces are considered stable once released and can be imported into other modules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPattern = errors.New("invalid pattern format")
ErrInvalidPattern is returned for non-conforming patterns.
Functions ¶
func ExpandSeq ¶
ExpandSeq takes in a string sequence pattern and returns a string slice of the pattern expanded. The format of the pattern is `START..END[..INCR]`.
Examples:
"1..5" -> []string{"1", "2", "3", "4", "5"}
"a..e" -> []string{"a", "b", "c", "d", "e"}
"10..18..2" -> []string{"10", "12", "14", "16", "18"}
"a..z..3" -> []string{"a", "d", "g", "j", "m", "p", "s", "v", "y"}
For rune patterns, unicode ordering is preserved `z..|` equates to `[]string{"z", "{", "|"}`.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.