Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IntRange ¶
type IntRange struct {
// contains filtered or unexported fields
}
IntRange stores a max and min amount for range
type IntRanges ¶
type IntRanges []IntRange
IntRanges is a slice of IntRange
func ParseNumberMenu ¶
func ParseNumberMenu(input string) (include, exclude IntRanges, otherInclude, otherExclude stringset.StringSet)
ParseNumberMenu parses input for number menus split by spaces or commas supports individual selection: 1 2 3 4 supports range selections: 1-4 10-20 supports negation: ^1 ^1-4
include and excule holds numbers that should be added and should not be added respectively. other holds anything that can't be parsed as an int. This is intended to allow words inside of number menus. e.g. 'all' 'none' 'abort' of course the implementation is up to the caller, this function mearley parses the input and organizes it
Click to show internal directories.
Click to hide internal directories.