cmdName returns the name of the command currently being run.
()
| 85 | |
| 86 | // cmdName returns the name of the command currently being run. |
| 87 | func cmdName() string { |
| 88 | base := filepath.Base(os.Args[0]) |
| 89 | return strings.TrimSuffix(base, filepath.Ext(base)) |
| 90 | } |
| 91 | |
| 92 | // cmdString is a simple helper function that returns a string |
| 93 | // with [cmdName] and the given command name string combined |