File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,17 +12,18 @@ import (
1212
1313// rootCmd represents the base command when called without any subcommands
1414var rootCmd = & cobra.Command {
15- Use : "apiview <packageDir> <outputDir>" ,
16- Short : "apiview will generate the JSON token output for APIView" ,
17- Long : `The apiview command can be used to generate the tokenized
18- output needed by the APIView tool to show a view of publicly
19- exposed portions of an SDK. The generated file will use the
20- following naming format: <module name>.json
21- NOTE: This command will overwrite any file with the same name
22- in the output directory.` ,
23- // Uncomment the following line if your bare application
24- // has an action associated with it:
15+ Use : "apiviewgo <moduleDir> <outputDir>" ,
16+ Long : `apiviewgo outputs a file representing the public API of an Azure SDK for Go
17+ module in APIView format. It writes this file to <outputDir>/<module name>.json,
18+ overwriting any file of the same name.` ,
2519 Run : func (cmd * cobra.Command , args []string ) {
20+ if len (args ) != 2 {
21+ err := cmd .Help ()
22+ if err != nil {
23+ fmt .Println (err )
24+ }
25+ return
26+ }
2627 err := CreateAPIView (args [0 ], args [1 ])
2728 if err != nil {
2829 fmt .Println (err )
You can’t perform that action at this time.
0 commit comments