MCPcopy Create free account
hub / github.com/google/gapid / AllCommandsSorted

Method AllCommandsSorted

gapil/template/api.go:146–153  ·  view source on GitHub ↗

AllCommandsSorted returns the list of commands retuned by AllCommands, sorted lexicographically.

(api interface{})

Source from the content-addressed store, hash-verified

144// AllCommandsSorted returns the list of commands retuned by AllCommands, sorted
145// lexicographically.
146func (f *Functions) AllCommandsSorted(api interface{}) ([]*semantic.Function, error) {
147 cmds, err := f.AllCommands(api)
148 if err != nil {
149 return nil, err
150 }
151 sort.Slice(cmds, func(i, j int) bool { return cmds[i].Name() < cmds[j].Name() })
152 return cmds, nil
153}
154
155// TokenOf returns the cst token string that represents the supplied semantic node
156func (f *Functions) TokenOf(v semantic.Node) string {

Callers

nothing calls this directly

Calls 3

AllCommandsMethod · 0.95
SliceMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected