open-vault/command/version.go

26 lines
492 B
Go
Raw Normal View History

2015-03-04 07:03:24 +00:00
package command
import (
2015-11-09 18:52:55 +00:00
"github.com/hashicorp/vault/version"
2015-03-04 07:03:24 +00:00
"github.com/mitchellh/cli"
)
// VersionCommand is a Command implementation prints the version.
type VersionCommand struct {
2015-11-09 18:52:55 +00:00
VersionInfo *version.VersionInfo
Ui cli.Ui
2015-03-04 07:03:24 +00:00
}
func (c *VersionCommand) Help() string {
return ""
}
func (c *VersionCommand) Run(_ []string) int {
c.Ui.Output(c.VersionInfo.FullVersionNumber())
2015-03-04 07:03:24 +00:00
return 0
}
func (c *VersionCommand) Synopsis() string {
return "Prints the Vault version"
}