Add compiler version to version string

This commit is contained in:
Torjus Håkestad 2021-06-18 14:47:32 +02:00
parent c1a1bf0b03
commit 248735710a

View File

@ -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())
} }