Package subcommand code
This commit is contained in:
26
cmd/config/config.go
Normal file
26
cmd/config/config.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/cmd/util"
|
||||
)
|
||||
|
||||
var ConfigCmd = &cobra.Command{
|
||||
Use: "config",
|
||||
Short: "Git Project Manager Configuration",
|
||||
Aliases: []string{"conf"},
|
||||
Long: util.ConfigCmdLong,
|
||||
PersistentPreRun: configCmdPreRun,
|
||||
}
|
||||
|
||||
var utils *util.Utils
|
||||
|
||||
func configCmdPreRun(cmd *cobra.Command, args []string) {
|
||||
utils = util.MustFromCtx(cmd.Context())
|
||||
}
|
||||
|
||||
func init() {
|
||||
ConfigCmd.AddCommand(configGenerateCmd)
|
||||
ConfigCmd.AddCommand(configShowCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user