Add compiler version to version string
This commit is contained in:
parent
c1a1bf0b03
commit
248735710a
11
version.go
11
version.go
@ -1,14 +1,17 @@
|
|||||||
package apiary
|
package apiary
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"runtime"
|
||||||
|
)
|
||||||
|
|
||||||
var Version = "v0.1.2"
|
var Version = "v0.1.3"
|
||||||
var Build string
|
var Build string
|
||||||
|
|
||||||
func FullVersion() string {
|
func FullVersion() string {
|
||||||
if Build != "" {
|
if Build != "" {
|
||||||
return fmt.Sprintf("%s-%s", Version, Build)
|
return fmt.Sprintf("%s-%s (%s)", Version, Build, runtime.Version())
|
||||||
}
|
}
|
||||||
|
|
||||||
return Version
|
return fmt.Sprintf("%s (%s)", Version, runtime.Version())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user