FixDocs replaces instances of old with new in the docs for c
(old, new string, c *cobra.Command)
| 30 | |
| 31 | // FixDocs replaces instances of old with new in the docs for c |
| 32 | func 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 | |
| 39 | func PrintErrorStacktrace(err error) { |
| 40 | e := os.Getenv(StackTraceOnErrors) |