1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-14 02:33:03 +02:00
kratos/selector/options.go
2021-11-29 10:55:11 +08:00

17 lines
319 B
Go

package selector
// SelectOptions is Select Options.
type SelectOptions struct {
Filters []Filter
}
// SelectOption is Selector option.
type SelectOption func(*SelectOptions)
// WithFilter with filter options
func WithFilter(fn ...Filter) SelectOption {
return func(opts *SelectOptions) {
opts.Filters = fn
}
}