MCPcopy Create free account
hub / github.com/coder/envbox / fmtUsage

Function fmtUsage

cli/cliflag/cliflag.go:172–183  ·  view source on GitHub ↗
(u string, env string)

Source from the content-addressed store, hash-verified

170}
171
172func fmtUsage(u string, env string) string {
173 if env != "" {
174 // Avoid double dotting.
175 dot := "."
176 if strings.HasSuffix(u, ".") {
177 dot = ""
178 }
179 u = fmt.Sprintf("%s%s\n(Consumes $%s", u, dot, env)
180 }
181
182 return u
183}

Callers 9

StringFunction · 0.85
StringVarPFunction · 0.85
StringArrayFunction · 0.85
StringArrayVarPFunction · 0.85
Uint8VarPFunction · 0.85
IntVarPFunction · 0.85
BoolFunction · 0.85
BoolVarPFunction · 0.85
DurationVarPFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected