9
9
"github.com/spf13/cobra"
10
10
)
11
11
12
- // rootCmd represents the base command when called without any subcommands
13
- var rootCmd = & cobra.Command {
12
+ // RootCmd represents the base command when called without any subcommands
13
+ var RootCmd = & cobra.Command {
14
14
Use : "otto" ,
15
15
Short : "Document your code with ease" ,
16
16
Long : `Code documentation made easy using GPT.` ,
@@ -20,9 +20,9 @@ var rootCmd = &cobra.Command{
20
20
}
21
21
22
22
// Execute adds all child commands to the root command and sets flags appropriately.
23
- // This is called by main.main(). It only needs to happen once to the rootCmd .
23
+ // This is called by main.main(). It only needs to happen once to the RootCmd .
24
24
func Execute () {
25
- err := rootCmd .Execute ()
25
+ err := RootCmd .Execute ()
26
26
if err != nil {
27
27
os .Exit (1 )
28
28
}
@@ -33,9 +33,9 @@ func init() {
33
33
// Cobra supports persistent flags, which, if defined here,
34
34
// will be global for your application.
35
35
36
- // rootCmd .PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.ottodocs.yaml)")
36
+ // RootCmd .PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.ottodocs.yaml)")
37
37
38
38
// Cobra also supports local flags, which will only run
39
39
// when this action is called directly.
40
- // rootCmd .Flags().BoolP("toggle", "t", false, "Help message for toggle")
40
+ // RootCmd .Flags().BoolP("toggle", "t", false, "Help message for toggle")
41
41
}
0 commit comments