MCPcopy
hub / github.com/kptdev/kpt / FixDocs

Function FixDocs

internal/util/cmdutil/cmdutil.go:32–37  ·  view source on GitHub ↗

FixDocs replaces instances of old with new in the docs for c

(old, new string, c *cobra.Command)

Source from the content-addressed store, hash-verified

30
31// FixDocs replaces instances of old with new in the docs for c
32func FixDocs(old, new string, c *cobra.Command) {
33 c.Use = strings.ReplaceAll(c.Use, old, new)
34 c.Short = strings.ReplaceAll(c.Short, old, new)
35 c.Long = strings.ReplaceAll(c.Long, old, new)
36 c.Example = strings.ReplaceAll(c.Example, old, new)
37}
38
39func PrintErrorStacktrace(err error) {
40 e := os.Getenv(StackTraceOnErrors)

Callers 9

NewRunnerFunction · 0.92
NewRunnerFunction · 0.92
NewSetRunnerFunction · 0.92
NewRunnerFunction · 0.92
NewRunnerFunction · 0.92
NewRunnerFunction · 0.92
NewRunnerFunction · 0.92
NewRunnerFunction · 0.92
NewRunnerFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected