diff --git a/opts/opts.go b/opts/opts.go index ae851537ec..9f66c039e7 100644 --- a/opts/opts.go +++ b/opts/opts.go @@ -108,6 +108,12 @@ func (opts *ListOpts) Type() string { return "list" } +// WithValidator returns the ListOpts with validator set. +func (opts *ListOpts) WithValidator(validator ValidatorFctType) *ListOpts { + opts.validator = validator + return opts +} + // NamedOption is an interface that list and map options // with names implement. type NamedOption interface {