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

Method toString

cf/flags/flags_usage.go:80–91  ·  view source on GitHub ↗
(prefix string)

Source from the content-addressed store, hash-verified

78}
79
80func (f flags) toString(prefix string) string {
81 sort.Sort(f)
82
83 lines := make([]string, f.Len())
84 maxLength := f.maxLineLength()
85
86 for i, l := range f {
87 lines[i] = fmt.Sprintf("%s%s", prefix, l.line(maxLength))
88 }
89
90 return strings.Join(lines, "\n")
91}
92
93func (f flags) maxLineLength() int {
94 var l int

Callers 1

ShowUsageMethod · 0.95

Calls 4

LenMethod · 0.95
maxLineLengthMethod · 0.95
lineMethod · 0.80
SortMethod · 0.45

Tested by

no test coverage detected