diff --git a/filtering.go b/filtering.go index a56a4f9..e7a7c6e 100644 --- a/filtering.go +++ b/filtering.go @@ -22,6 +22,16 @@ func (f Filter) IsNotEmpty() bool { return len(f) > 0 } +func (f Filter) ValueAt(val string, index int) string { + if filter, ok := f[val]; ok { + if len(filter) > index { + return filter[index] + } + } + + return "" +} + func (fs Filter) validate(validFilters []string) (Filter, bool) { goodFilters := make(Filter) cnt, len := 0, 0