Skip to content

Commit

Permalink
feat: help on no args
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakiyo committed Aug 22, 2023
1 parent 5b7db80 commit f176064
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ func Execute() {
NoExtraNewlines: true,
})

if len(os.Args[1:]) < 1 {
rootCmd.Help()
os.Exit(1)
}

if err := rootCmd.Execute(); err != nil {
log.Error(err)
os.Exit(1)
Expand Down

0 comments on commit f176064

Please # to comment.