Make it easier to add select filters

This commit is contained in:
Asim
2016-04-23 21:37:26 +01:00
parent ed764ca0b2
commit d6fdfc252e
2 changed files with 4 additions and 4 deletions

View File

@@ -37,8 +37,8 @@ func Registry(r registry.Registry) Option {
// WithFilter adds a filter function to the list of filters
// used during the Select call.
func WithFilter(fn Filter) SelectOption {
func WithFilter(fn ...Filter) SelectOption {
return func(o *SelectOptions) {
o.Filters = append(o.Filters, fn)
o.Filters = append(o.Filters, fn...)
}
}