Documentation
¶
Overview ¶
Package version exposes build-time injected version metadata.
Variables are populated via -ldflags at build time:
go build -ldflags="\
-X github.com/ntt0601zcoder/open-streamer/pkg/version.Version=v0.0.7 \
-X github.com/ntt0601zcoder/open-streamer/pkg/version.Commit=abc1234 \
-X github.com/ntt0601zcoder/open-streamer/pkg/version.BuiltAt=2026-04-23T15:00:00Z"
Defaults below ("dev"/"unknown"/"") apply when running via `go run` or for unstamped local builds. The Makefile `build` target wires all three.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BuiltAt = ""
BuiltAt is the UTC RFC3339 timestamp of the build, or empty.
var Commit = "unknown"
Commit is the git commit SHA the binary was built from, or "unknown".
var Version = "dev"
Version is the release tag (vMAJ.MIN.PATCH), short SHA fallback, or "dev".
Functions ¶
func UserAgent ¶ added in v0.0.93
func UserAgent() string
UserAgent is the canonical product identifier this binary uses on outbound requests (HLS / HTTP-TS / RTSP pulls). Downstream servers surface this string in their play-session dashboards, so a stable "Open-Streamer/<version>" form makes our pulls identifiable in other operators' tooling.
Format follows RFC 9110 §10.1.5 product-token convention "<product>/<product-version>". When Version is the placeholder "dev" (unstamped local build) we still emit it — operators want to see that a dev build is calling them rather than guess.