Skip to content

Commit 1cdb089

Browse files
committed
Export LDA command
1 parent da5b3c0 commit 1cdb089

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

cmd/cmd.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ var (
2525
// Verbose Define verbose flag variables
2626
Verbose bool
2727

28-
ldaCmd = &cobra.Command{
28+
// LdaCmd is the main command for the LDA project
29+
LdaCmd = &cobra.Command{
2930
Use: "lda",
3031
Short: "Command line manager for LDA project.",
3132
Long: `Command line manager for LDA Project.
@@ -107,21 +108,21 @@ const (
107108

108109
func init() {
109110

110-
includeShowFlagsForLda(ldaCmd)
111+
includeShowFlagsForLda(LdaCmd)
111112
includeShowFlagsForServe(serveCmd)
112113
includeShowFlagsForInstall(installCmd)
113114

114115
cobra.OnInitialize(setupConfig)
115116

116-
ldaCmd.AddCommand(versionCmd)
117-
ldaCmd.AddCommand(collectCmd)
118-
ldaCmd.AddCommand(startCmd)
119-
ldaCmd.AddCommand(stopCmd)
120-
ldaCmd.AddCommand(installCmd)
121-
ldaCmd.AddCommand(uninstallCmd)
122-
ldaCmd.AddCommand(serveCmd)
123-
ldaCmd.AddCommand(reloadCmd)
124-
ldaCmd.AddCommand(configCmd)
117+
LdaCmd.AddCommand(versionCmd)
118+
LdaCmd.AddCommand(collectCmd)
119+
LdaCmd.AddCommand(startCmd)
120+
LdaCmd.AddCommand(stopCmd)
121+
LdaCmd.AddCommand(installCmd)
122+
LdaCmd.AddCommand(uninstallCmd)
123+
LdaCmd.AddCommand(serveCmd)
124+
LdaCmd.AddCommand(reloadCmd)
125+
LdaCmd.AddCommand(configCmd)
125126
}
126127

127128
func includeShowFlagsForLda(cmd *cobra.Command) {
@@ -202,7 +203,7 @@ func setupConfig() {
202203

203204
// Execute is the entry point for the command line
204205
func Execute() {
205-
if err := ldaCmd.Execute(); err != nil {
206+
if err := LdaCmd.Execute(); err != nil {
206207
logging.Log.Err(err).Msg("Failed to execute main lda command")
207208
os.Exit(1)
208209
}

0 commit comments

Comments
 (0)