Files
logwisp/internal/version/version.go
T
lixen 71d1b82f83
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
v0.22.0 several enhancements and fixes for security, network, doc, test, packaging
2026-10-03 14:52:16 -04:00

26 lines
671 B
Go

package version
import "fmt"
var (
// Version is the application version, set at compile time via -ldflags
Version = "dev"
// GitCommit is the git commit hash, set at compile time
GitCommit = "unknown"
// BuildTime is the application build time, set at compile time
BuildTime = "unknown"
)
// String returns a detailed, formatted version string including commit and build time
func String() string {
if Version == "dev" {
return fmt.Sprintf("dev (commit: %s, built: %s)", GitCommit, BuildTime)
}
return fmt.Sprintf("%s (commit: %s, built: %s)", Version, GitCommit, BuildTime)
}
// Short returns just the version tag
func Short() string {
return Version
}