MCPcopy Create free account
hub / github.com/basecamp/hey-cli / collectSurface

Function collectSurface

internal/cmd/surface_test.go:83–101  ·  view source on GitHub ↗
(cmd *cobra.Command, prefix string)

Source from the content-addressed store, hash-verified

81}
82
83func collectSurface(cmd *cobra.Command, prefix string) []string {
84 var lines []string
85
86 path := prefix + cmd.Name()
87 lines = append(lines, path)
88
89 cmd.NonInheritedFlags().VisitAll(func(f *pflag.Flag) {
90 lines = append(lines, path+" --"+f.Name)
91 })
92
93 for _, sub := range cmd.Commands() {
94 if sub.Hidden || !sub.IsAvailableCommand() {
95 continue
96 }
97 lines = append(lines, collectSurface(sub, path+" ")...)
98 }
99
100 return lines
101}

Callers 1

TestSurfaceSnapshotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected