This moves command() from cmd/ into core.Command() and uses it from the log and main package, ensuring we have a single implementation of path.Base(os.Args[0]) instead of scattering that method around. I put it in core/util.go as similar enough functions like the BuildID and revision info already live there, though I am not entirely sure it's the right place. This came up in @aarongable's review of #6750, where he pointed out I was manually hardcoding commands instead of using command() or similar. |
||
|---|---|---|
| .. | ||
| log.go | ||
| log_test.go | ||
| mock.go | ||