diff --git a/client/options.go b/client/options.go index 28a4e9c4..0ab07aa5 100644 --- a/client/options.go +++ b/client/options.go @@ -187,9 +187,9 @@ func DialTimeout(d time.Duration) Option { // Call Options -func WithSelectOption(so selector.SelectOption) CallOption { +func WithSelectOption(so ...selector.SelectOption) CallOption { return func(o *CallOptions) { - o.SelectOptions = append(o.SelectOptions, so) + o.SelectOptions = append(o.SelectOptions, so...) } } diff --git a/selector/options.go b/selector/options.go index a9fe796d..47bc81c0 100644 --- a/selector/options.go +++ b/selector/options.go @@ -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...) } }