gopkg.in/tools/godep.v56@v56.0.0-20160226230103-b32db8cfcaad/version.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "runtime" 6 ) 7 8 const version = 56 9 10 var cmdVersion = &Command{ 11 Name: "version", 12 Short: "show version info", 13 Long: ` 14 15 Displays the version of godep as well as the target OS, architecture and go runtime version. 16 `, 17 Run: runVersion, 18 } 19 20 func versionString() string { 21 return fmt.Sprintf("godep v%d (%s/%s/%s)", version, runtime.GOOS, runtime.GOARCH, runtime.Version()) 22 } 23 24 func runVersion(cmd *Command, args []string) { 25 fmt.Printf("%s\n", versionString()) 26 }