MCPcopy Index your code
hub / github.com/perkeep/perkeep / SearchHelp

Function SearchHelp

pkg/search/predicate.go:91–102  ·  view source on GitHub ↗

SearchHelp returns JSON of an array of predicate names and descriptions.

()

Source from the content-addressed store, hash-verified

89
90// SearchHelp returns JSON of an array of predicate names and descriptions.
91func SearchHelp() string {
92 type help struct{ Name, Description string }
93 h := []help{}
94 for _, p := range keywords {
95 h = append(h, help{p.Name(), p.Description()})
96 }
97 b, err := json.MarshalIndent(h, "", " ")
98 if err != nil {
99 return "Error marshalling"
100 }
101 return string(b)
102}
103
104func init() {
105 // Core predicates

Callers 2

formattedSearchHelpFunction · 0.92
TestSearchHelpFunction · 0.85

Calls 2

NameMethod · 0.65
DescriptionMethod · 0.65

Tested by 1

TestSearchHelpFunction · 0.68