summaryrefslogtreecommitdiffstats
path: root/commands/version.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/version.go')
-rw-r--r--commands/version.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/commands/version.go b/commands/version.go
index 4498c3611..71ffd625b 100644
--- a/commands/version.go
+++ b/commands/version.go
@@ -26,16 +26,12 @@ import (
var _ cmder = (*versionCmd)(nil)
type versionCmd struct {
- cmd *cobra.Command
-}
-
-func (c *versionCmd) getCommand() *cobra.Command {
- return c.cmd
+ *baseCmd
}
func newVersionCmd() *versionCmd {
return &versionCmd{
- &cobra.Command{
+ newBaseCmd(&cobra.Command{
Use: "version",
Short: "Print the version number of Hugo",
Long: `All software has versions. This is Hugo's.`,
@@ -43,7 +39,7 @@ func newVersionCmd() *versionCmd {
printHugoVersion()
return nil
},
- },
+ }),
}
}