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
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue