Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterList ¶
func FilterList( in_list []string, filters Filters, functions FilterFunctions, data map[string]interface{}, ) ( []string, error, )
Filters subject date passed by in_list, with filter set passed by filters. functions should contain functions asked by filters. data - additional data to pass to functions
func RemoveDuplicatedStrings ¶
func RemoveZeroLengthItems ¶
Types ¶
type FilterFunctions ¶
type FilterFunctions map[string]func( parameter string, case_sensitive bool, value_to_match string, data map[string]interface{}, ) (bool, error)
create functions for FilterList(). parameter - parameter defined in filter and passed to function case_sensitive - if function must take case into account value_to_match - value which function have to check data - can be user to pass some additional data to functions
type FilterItem ¶
type FilterItem struct { // if [function result]+[NotFunc] == true. // if Add == true, then value which is chacked by this filter item, // considered to be added to result, // else, if Add == false, - item should be removed from result Add bool // apply boolean not to function result NotFunc bool // name of function, which FilterList have to use Func string // if function have to be case sensetive CaseSensitive bool // some functioning data, to be passed to function FuncParam string }
structure for one of items of filter text parse result
type Filters ¶
type Filters []*FilterItem
func ParseFilterText ¶
func ParseFilterTextLines ¶
func ParseFilterTextMust ¶
Click to show internal directories.
Click to hide internal directories.