1. Ross Light
  2. subcmd

Commits

Ross Light  committed e2b1f7a

Print usage when no commands given (matches flag package)

  • Participants
  • Parent commits c33d620
  • Branches default

Comments (0)

Files changed (1)

File subcmd.go

View file
 	if err := fset.Parse(args); err != nil {
 		return err
 	} else if fset.NArg() == 0 {
+		s.PrintUsage()
 		return flag.ErrHelp
 	}
 	cname := fset.Arg(0)