Remove deadcode

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-13 16:50:35 +01:00
parent 7fd4221199
commit ef76a8d2e1
76 changed files with 137 additions and 4424 deletions

View File

@@ -100,29 +100,3 @@ func UserAgent(component string) string {
return strings.Join(parts, " ")
}
// Version returns the version string
func Version() string {
info := GetBuildInfo()
return info.Version
}
// FullVersion returns a detailed version string with all build information
func FullVersion() string {
info := GetBuildInfo()
parts := []string{
fmt.Sprintf("Version: %s", info.Version),
}
if info.Commit != "unknown" {
parts = append(parts, fmt.Sprintf("Commit: %s", info.Commit))
}
if info.BuildDate != "unknown" {
parts = append(parts, fmt.Sprintf("Built: %s", info.BuildDate))
}
parts = append(parts, fmt.Sprintf("Go: %s", info.GoVersion))
return strings.Join(parts, "\n")
}

View File

@@ -91,24 +91,6 @@ func TestUserAgent(t *testing.T) {
}
}
func TestVersion(t *testing.T) {
v := version.Version()
assert.NotEmpty(t, v, "Version should not be empty")
}
func TestFullVersion(t *testing.T) {
fv := version.FullVersion()
require.NotEmpty(t, fv, "Full version should not be empty")
// Check that it contains expected fields
assert.Contains(t, fv, "Version:", "Full version should contain Version field")
assert.Contains(t, fv, "Go:", "Full version should contain Go field")
// Check it's multiline
lines := strings.Split(fv, "\n")
assert.GreaterOrEqual(t, len(lines), 2, "Full version should have at least 2 lines")
}
func TestUserAgentConsistency(t *testing.T) {
// Test that multiple calls return consistent results
ua1 := version.UserAgent("test")