commands: Make the hugo command non-global

See #4598
This commit is contained in:
Bjørn Erik Pedersen
2018-04-10 09:19:26 +02:00
parent 018602c46d
commit 4d32f2fa89
23 changed files with 299 additions and 336 deletions

View File

@@ -23,15 +23,11 @@ import (
var _ cmder = (*envCmd)(nil)
type envCmd struct {
cmd *cobra.Command
}
func (c *envCmd) getCommand() *cobra.Command {
return c.cmd
*baseCmd
}
func newEnvCmd() *envCmd {
return &envCmd{cmd: &cobra.Command{
return &envCmd{baseCmd: newBaseCmd(&cobra.Command{
Use: "env",
Short: "Print Hugo version and environment info",
Long: `Print Hugo version and environment info. This is useful in Hugo bug reports.`,
@@ -43,6 +39,6 @@ func newEnvCmd() *envCmd {
return nil
},
},
}),
}
}