aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands/gen.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-04-10 09:19:26 +0200
committerBjørn Erik Pedersen <[email protected]>2018-04-11 09:50:19 +0200
commit4d32f2fa8969f368b088dc9bcedb45f2c986cb27 (patch)
treea091c49f6011605f08b92b9dbdb2d2acdd87f9ce /commands/gen.go
parent018602c46db8d729af2871bd5f4c1e7480420f09 (diff)
downloadhugo-4d32f2fa8969f368b088dc9bcedb45f2c986cb27.tar.gz
hugo-4d32f2fa8969f368b088dc9bcedb45f2c986cb27.zip
commands: Make the hugo command non-global
See #4598
Diffstat (limited to 'commands/gen.go')
-rw-r--r--commands/gen.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/commands/gen.go b/commands/gen.go
index c22d8f8b0..6878cfe70 100644
--- a/commands/gen.go
+++ b/commands/gen.go
@@ -20,19 +20,15 @@ import (
var _ cmder = (*genCmd)(nil)
type genCmd struct {
- cmd *cobra.Command
-}
-
-func (c *genCmd) getCommand() *cobra.Command {
- return c.cmd
+ *baseCmd
}
func newGenCmd() *genCmd {
cc := &genCmd{}
- cc.cmd = &cobra.Command{
+ cc.baseCmd = newBaseCmd(&cobra.Command{
Use: "gen",
Short: "A collection of several useful generators.",
- }
+ })
cc.cmd.AddCommand(
newGenautocompleteCmd().getCommand(),