MCPcopy Create free account
hub / github.com/ProspectOne/perfops-cli / fmtShortUsage

Function fmtShortUsage

cmd/root.go:156–168  ·  view source on GitHub ↗
(f *flag.Flag)

Source from the content-addressed store, hash-verified

154}
155
156func fmtShortUsage(f *flag.Flag) string {
157 line := ""
158 if f.Shorthand != "" && f.ShorthandDeprecated == "" {
159 line = fmt.Sprintf(" -%s, --%s", f.Shorthand, f.Name)
160 } else {
161 line = fmt.Sprintf(" --%s", f.Name)
162 }
163 varname, _ := flag.UnquoteUsage(f)
164 if varname != "" {
165 line += " " + varname
166 }
167 return line
168}

Callers 1

invalidArgHelpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected