Documentation
¶
Overview ¶
Package version provides build info and version strings Per AI.md PART 7: Common Go Modules - version/version.go
Index ¶
Constants ¶
View Source
const BrowserUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
BrowserUserAgent is the standard User-Agent string for browser-like HTTP requests. Windows 11 Edge - consistent across all engines for privacy and compatibility.
Variables ¶
View Source
var ( // Version is the semantic version (e.g., "1.0.0") Version = "dev" // Commit is the git commit hash Commit = "unknown" // BuildDate is the build timestamp BuildDate = "unknown" // Branch is the git branch name Branch = "unknown" // GoVersion is set at build time GoVersion = runtime.Version() )
Build-time variables - set via ldflags
Functions ¶
func GetCommitShort ¶
func GetCommitShort() string
GetCommitShort returns the first 7 characters of the commit hash
Types ¶
type Info ¶
type Info struct {
Version string `json:"version"`
Commit string `json:"commit"`
BuildDate string `json:"build_date"`
Branch string `json:"branch"`
GoVersion string `json:"go_version"`
OS string `json:"os"`
Arch string `json:"arch"`
Compiler string `json:"compiler"`
}
Info contains all version information
Click to show internal directories.
Click to hide internal directories.