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

@ -7,11 +7,12 @@ import (
"slices"
"strings"
cmdpkg "github.com/brtholomy/um/go/cmd"
"github.com/brtholomy/um/go/flags"
"github.com/brtholomy/um/go/pipe"
)
const cmd = "sort"
const cmd = cmdpkg.Sort
type options struct {
Source flags.Flag[string]
@ -43,7 +44,7 @@ func parseArgs(args []string) options {
case arg == opts.Help.Long || arg == opts.Help.Short:
flags.Help(cmd, opts)
default:
log.Printf("um sort: invalid argument: %s", arg)
flags.HelpInvalidArg(cmd, arg)
flags.Help(cmd, opts)
}
}