mirror of
https://github.com/la5nta/pat
synced 2026-08-07 22:32:06 -04:00
19 lines
282 B
Go
19 lines
282 B
Go
package cli
|
|
|
|
import (
|
|
"github.com/spf13/pflag"
|
|
)
|
|
|
|
func HelpHandle(args []string) {
|
|
// Print usage for the specified command
|
|
arg := args[0]
|
|
for _, cmd := range Commands {
|
|
if cmd.Str == arg {
|
|
cmd.PrintUsage()
|
|
return
|
|
}
|
|
}
|
|
|
|
// Fallback to main help text
|
|
pflag.Usage()
|
|
}
|