Files
panel/pkg/version/version.go
T
2026-07-14 23:25:11 -07:00

21 lines
785 B
Go

// Package version holds the single build-time version string shared by
// every panel binary (controller, agent, panelctl).
//
// It defaults to "dev" and is injected at build time via:
//
// go build -ldflags "-X github.com/dbledeez/panel/pkg/version.Version=v1.2.3"
//
// The Makefile at the repo root and the install scripts (install.sh /
// install.ps1) wire this automatically from `git describe` or $PANEL_VERSION.
package version
// Version is the panel build version. Overridden by -ldflags -X; "dev"
// in ad-hoc `go build` / `go run` builds.
var Version = "dev"
// UserAgent returns the canonical User-Agent header value for outbound
// HTTP requests made by panel binaries.
func UserAgent() string {
return "panel/" + Version + " (+https://github.com/dbledeez/panel)"
}