github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/command/version.go (about) 1 package command 2 3 import ( 4 "github.com/hashicorp/nomad/version" 5 "github.com/mitchellh/cli" 6 ) 7 8 // VersionCommand is a Command implementation prints the version. 9 type VersionCommand struct { 10 Version *version.VersionInfo 11 Ui cli.Ui 12 } 13 14 func (c *VersionCommand) Help() string { 15 return "" 16 } 17 18 func (c *VersionCommand) Run(_ []string) int { 19 c.Ui.Output(c.Version.FullVersionNumber(true)) 20 return 0 21 } 22 23 func (c *VersionCommand) Synopsis() string { 24 return "Prints the Nomad version" 25 }