refactor: reorganize into internal packages, fix critical panics and error handling
Move browser, config, player, and radio logic into internal/{config,radio,player,ui,version}.
Add cached API host resolution, context-aware HTTP client, and nil/length guards to eliminate
RandomIP, nslookup, reverseLookup, and GetStations panics. Replace subExecute with clean
legacyPlayer using Run-only execution. Fix inverted -short test guards, unformatted config
error messages, and "Erorr" typo. Remove obsolete vendor/GOPATH logic from build scripts.
Update callers in stations.go and radiomenu.go to new paths; retain shims for transition.
2026-06-05 20:10:54 +00:00
|
|
|
package version
|
|
|
|
|
|
2026-06-05 22:39:40 +00:00
|
|
|
// These vars are set at build time via -ldflags (see Makefile and .gitea/workflows/release.yml), e.g.
|
|
|
|
|
// -ldflags "-X github.com/gmgauthier/gostations/internal/version.Version=2.0.0 -X .../Commit=... -X .../BuildDate=..."
|
refactor: reorganize into internal packages, fix critical panics and error handling
Move browser, config, player, and radio logic into internal/{config,radio,player,ui,version}.
Add cached API host resolution, context-aware HTTP client, and nil/length guards to eliminate
RandomIP, nslookup, reverseLookup, and GetStations panics. Replace subExecute with clean
legacyPlayer using Run-only execution. Fix inverted -short test guards, unformatted config
error messages, and "Erorr" typo. Remove obsolete vendor/GOPATH logic from build scripts.
Update callers in stations.go and radiomenu.go to new paths; retain shims for transition.
2026-06-05 20:10:54 +00:00
|
|
|
var (
|
|
|
|
|
Version = "dev"
|
|
|
|
|
Commit = ""
|
|
|
|
|
BuildDate = ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// String returns a human-friendly version string.
|
|
|
|
|
func String() string {
|
|
|
|
|
if Commit != "" {
|
|
|
|
|
return Version + "-" + Commit
|
|
|
|
|
}
|
|
|
|
|
return Version
|
|
|
|
|
}
|