MCPcopy Index your code
hub / github.com/cloudfoundry/cli / ShowUsage

Method ShowUsage

cf/flags/flags_usage.go:9–25  ·  view source on GitHub ↗
(leadingSpace int)

Source from the content-addressed store, hash-verified

7)
8
9func (c *flagContext) ShowUsage(leadingSpace int) string {
10 displayFlags := flags{}
11
12 for _, f := range c.cmdFlags {
13 if !f.Visible() {
14 continue
15 }
16
17 d := flagPresenter{
18 flagSet: f,
19 }
20
21 displayFlags = append(displayFlags, d)
22 }
23
24 return displayFlags.toString(strings.Repeat(" ", leadingSpace))
25}
26
27type flagPresenter struct {
28 flagSet FlagSet

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.95
VisibleMethod · 0.65

Tested by

no test coverage detected