(ops []*Option, keyword string)
| 16 | type Option = Grant |
| 17 | |
| 18 | func SearchOptions(ops []*Option, keyword string) []*Option { |
| 19 | if keyword == "" { |
| 20 | return ops |
| 21 | } |
| 22 | rs := make([]*Option, 0, len(ops)) |
| 23 | |
| 24 | for _, op := range ops { |
| 25 | if op.Name == keyword || strings.Index(op.Name, keyword) > -1 || op.Label == keyword || strings.Index(op.Label, keyword) > -1 { |
| 26 | rs = append(rs, op) |
| 27 | } |
| 28 | } |
| 29 | return rs |
| 30 | } |
nothing calls this directly
no outgoing calls
no test coverage detected