a moved case of nakedret
Signed-off-by: Kai Xia <kaix+github@fastmail.com>
This commit is contained in:
parent
0c1d0c2c47
commit
17baf5fe5a
1 changed files with 4 additions and 6 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue