mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-14 02:33:03 +02:00
17 lines
319 B
Go
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
|
|
}
|
|
}
|