cmd pkg for Subcommand type, use everywhere

This commit is contained in:
bth 2026-01-20 13:30:53 -08:00
commit c434005d39
7 changed files with 52 additions and 45 deletions

View file

@ -8,10 +8,9 @@ import (
"os/exec"
"regexp"
"strings"
)
// but this stinks:
const lcmd = "last"
cmdpkg "github.com/brtholomy/um/go/cmd"
)
const (
// NOTE: the -r flag:
@ -47,7 +46,7 @@ func last() (string, error) {
func Last() {
s, err := last()
if err != nil {
log.Fatalf("um %s: %v", lcmd, err)
log.Fatalf("um %s: %v", cmdpkg.Last, err)
}
// send to stdout, not stderr as is default for log.Print:
fmt.Println(s)