Skip to content

Commit 17c7c34

Browse files
authored
feat: Show help on root cmd (#123)
feat: show help on root cmd - add show help when no argument in provided for root cmd Signed-off-by: bupd <[email protected]>
1 parent fe2bdae commit 17c7c34

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cmd/root.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,10 @@ var rootConfig *config.Root
3434
var rootCmd = &cobra.Command{
3535
Use: "modctl",
3636
Short: "A command line tool for managing artifact bundled based on the Model Format Specification",
37-
Args: cobra.ExactArgs(1),
37+
Args: cobra.MaximumNArgs(1),
3838
DisableAutoGenTag: true,
3939
SilenceUsage: true,
4040
FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
41-
RunE: func(cmd *cobra.Command, args []string) error {
42-
return nil
43-
},
4441
}
4542

4643
// Execute adds all child commands to the root command and sets flags appropriately.

0 commit comments

Comments
 (0)