package version

// These vars are set at build time via -ldflags, e.g.
// -ldflags "-X github.com/gmgauthier/gostations/internal/version.Version=0.3 -X .../Commit=$(git rev-list -1 HEAD)"
var (
	Version   = "dev"
	Commit    = ""
	BuildDate = ""
)

// String returns a human-friendly version string.
func String() string {
	if Commit != "" {
		return Version + "-" + Commit
	}
	return Version
}
