(opts []ListOption)
| 9 | type ListOption func(opts *listOptions) |
| 10 | |
| 11 | func matcher(opts []ListOption) *listOptions { |
| 12 | result := &listOptions{} |
| 13 | for _, opt := range opts { |
| 14 | opt(result) |
| 15 | } |
| 16 | return result |
| 17 | } |
| 18 | |
| 19 | func (opts *listOptions) Match(cred Credential) bool { |
| 20 | if opts.target != "" && cred.Target() != opts.target { |