a moved case of nakedret

Signed-off-by: Kai Xia <kaix+github@fastmail.com>
This commit is contained in:
Kai Xia 2026-02-25 21:32:57 +11:00
parent 0c1d0c2c47
commit 17baf5fe5a

View file

@ -37,15 +37,13 @@ func FormatVersion() string {
} }
// FormatBuildInfo returns build time and go version info // FormatBuildInfo returns build time and go version info
func FormatBuildInfo() (build string, goVer string) { func FormatBuildInfo() (string, string) {
if buildTime != "" { build := buildTime
build = buildTime goVer := goVersion
}
goVer = goVersion
if goVer == "" { if goVer == "" {
goVer = runtime.Version() goVer = runtime.Version()
} }
return return build, goVer
} }
// GetVersion returns the version string // GetVersion returns the version string