Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version holds the semantic version of the binary. // Defaults to a development placeholder when not set by the build system. Version = "0.0.0-dev" // Commit holds the VCS commit hash used to build the binary (optional). Commit = "" // Date holds the build timestamp (optional). Date = "" )
These variables are intended to be populated at build time via -ldflags. For example, GoReleaser injects:
-X github.com/tis24dev/proxsave/internal/version.Version=v0.9.0 -X github.com/tis24dev/proxsave/internal/version.Commit=abcdef123 -X github.com/tis24dev/proxsave/internal/version.Date=2025-01-01T12:34:56Z
Functions ¶
func String ¶
func String() string
String returns the effective version string used across the application. Preference order:
- Value injected into Version via ldflags (e.g., GoReleaser).
- Main module version from debug.ReadBuildInfo (if available and not "(devel)").
- Fallback development placeholder.
The returned version is normalized by stripping any leading "v" prefix.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.