MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / SearchOptions

Function SearchOptions

module/permit/dto/output.go:18–30  ·  view source on GitHub ↗
(ops []*Option, keyword string)

Source from the content-addressed store, hash-verified

16type Option = Grant
17
18func 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected