Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BuildTime = "unknown"
BuildTime is the build timestamp in RFC3339 format. Set via ldflags: -X github.com/hrygo/divinesense/internal/version.BuildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ)
var DevVersion = Version
DevVersion is the service current development version.
var GitBranch = "unknown"
GitBranch is the git branch at build time. Set via ldflags: -X github.com/hrygo/divinesense/internal/version.GitBranch=$(git rev-parse --abbrev-ref HEAD)
var GitCommit = "unknown"
GitCommit is the git commit hash at build time. Set via ldflags: -X github.com/hrygo/divinesense/internal/version.GitCommit=$(git rev-parse HEAD)
var Version = "0.0.0-dev"
Version is the service current released version. This value can be overridden at build time using ldflags:
go build -ldflags "-X github.com/hrygo/divinesense/internal/version.Version=v0.95.0"
Semantic versioning: https://semver.org/
Functions ¶
func GetCurrentVersion ¶
func GetMinorVersion ¶
GetMinorVersion extracts the minor version (e.g., "0.25") from a full version string (e.g., "0.25.1"). Returns the minor version string or empty string if the version format is invalid. Version format should be "major.minor.patch" (e.g., "0.25.1").
func IsVersionGreaterOrEqualThan ¶
IsVersionGreaterOrEqualThan returns true if version is greater than or equal to target.
func IsVersionGreaterThan ¶
IsVersionGreaterThan returns true if version is greater than target.
func String ¶ added in v0.94.0
func String() string
String returns the version string with optional commit hash.
func StringFull ¶ added in v0.94.0
func StringFull() string
StringFull returns the complete version information including build metadata.
Types ¶
type SortVersion ¶
type SortVersion []string
func (SortVersion) Len ¶
func (s SortVersion) Len() int
func (SortVersion) Less ¶
func (s SortVersion) Less(i, j int) bool
func (SortVersion) Swap ¶
func (s SortVersion) Swap(i, j int)