A (very) simple go package for handling semver compliant application versions.
- Immutable application version, set via linker flags.
- Values from
runtime/debug
available. - Check for updates using public GitHub release/tag information.
Somewhere in your application, be sure that this package is imported:
import (
_ "github.com/neaas/go-version"
)
Set each configuration value using the linker flags as described below:
go build -ldflags "-X github.com/neaas/go-version.VARIABLE=VALUE" .
Variable | Description | Default Value |
---|---|---|
version |
The semver compliant version of the application being built. | v0.0.0+unversioned |
repositoryOwner |
The owner of the GitHub repository for the application. | neaas |
repositoryName |
The name of the application's GitHub repository. | go-version |
versionType |
The method in which versions are defined for the repository ( release , tag , none ) |
tag |