summaryrefslogtreecommitdiffstats
path: root/commands/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/commands.go')
-rw-r--r--commands/commands.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/commands/commands.go b/commands/commands.go
index d0cc97b85..8ba28e10d 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -49,6 +49,7 @@ func (b *commandsBuilder) addAll() *commandsBuilder {
newListCmd(),
newImportCmd(),
newGenCmd(),
+ createReleaser(),
)
return b
@@ -62,7 +63,11 @@ func (b *commandsBuilder) build() *hugoCmd {
func addCommands(root *cobra.Command, commands ...cmder) {
for _, command := range commands {
- root.AddCommand(command.getCommand())
+ cmd := command.getCommand()
+ if cmd == nil {
+ continue
+ }
+ root.AddCommand(cmd)
}
}
@@ -110,6 +115,19 @@ type hugoCmd struct {
c *commandeer
}
+var _ cmder = (*nilCommand)(nil)
+
+type nilCommand struct {
+}
+
+func (c *nilCommand) getCommand() *cobra.Command {
+ return nil
+}
+
+func (c *nilCommand) flagsToConfig(cfg config.Provider) {
+
+}
+
func (b *commandsBuilder) newHugoCmd() *hugoCmd {
cc := &hugoCmd{}