cmd pkg for Subcommand type, use everywhere
This commit is contained in:
parent
77e3e23446
commit
c434005d39
7 changed files with 52 additions and 45 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue