forked from mlafeldt/chef-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.go
30 lines (24 loc) · 850 Bytes
/
version.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package main
import "runtime"
// The current version of chef-runner. A ".dev" suffix denotes that the version
// is currently being developed.
const Version = "v0.9.0"
// GitVersion is the Git version that is being compiled. This string contains
// tag and commit information. It will be filled in by the compiler.
var GitVersion string
// VersionString returns the current program version, which is either the Git
// version if available or the static version defined above.
func VersionString() string {
if GitVersion != "" {
return GitVersion
}
return Version
}
// GoVersionString returns the Go version used to build the program.
func GoVersionString() string {
return runtime.Version()
}
// TargetString returns the target operating system and architecture.
func TargetString() string {
return runtime.GOOS + "/" + runtime.GOARCH
}