weather/internal/version/prod.go

31 lines
597 B
Go
Raw Normal View History

// +build prod
2021-03-01 23:53:22 +00:00
package version
import (
"fmt"
version "github.com/hashicorp/go-version"
)
//Version ...
var Version = "1.0.0"
2021-03-01 23:53:22 +00:00
//Prerelease such as "dev" (in development), "beta", "rc1", etc.
var Prerelease = "prod"
2021-03-01 23:53:22 +00:00
//SemVer management
var SemVer *version.Version
func init() {
SemVer = version.Must(version.NewSemver(fmt.Sprintf("%s-%s", Version, Prerelease)))
2021-03-01 23:53:22 +00:00
}
// Header is the header name used to send the current in http requests.
const Header = "Weather-Version"
// String returns the complete version string, including prerelease
func String() string {
return SemVer.String()
2021-03-01 23:53:22 +00:00
}