Skip to content

Commit

Permalink
✨ main: call help if no argument
Browse files Browse the repository at this point in the history
  • Loading branch information
budougumi0617 committed Oct 10, 2020
1 parent 44d7d90 commit 997da09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/leetgode/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ func main() {
flag.Parse()
sub := flag.Arg(0)
if len(sub) == 0 {
fmt.Printf("TODO: show help\n")
cmd := &leetgode.HelpCmd{}
if err := cmd.Run(context.Background(), []string{}); err !=nil{
fmt.Printf("help comamnd is faield: %v", err)
}
return
}
// TODO: set os.Stderr if set debug mode
Expand Down

0 comments on commit 997da09

Please sign in to comment.