version: unexport all vars, turn Short/Long into funcs
The other formerly exported values aren't used outside the package, so just unexport them. Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
committed by
Dave Anderson
parent
9e6b4d7ad8
commit
8b2ae47c31
+6
-6
@@ -11,20 +11,20 @@ import (
|
||||
|
||||
func String() string {
|
||||
var ret strings.Builder
|
||||
ret.WriteString(Short)
|
||||
ret.WriteString(short)
|
||||
ret.WriteByte('\n')
|
||||
if IsUnstableBuild() {
|
||||
fmt.Fprintf(&ret, " track: unstable (dev); frequent updates and bugs are likely\n")
|
||||
}
|
||||
if GitCommit != "" {
|
||||
if gitCommit != "" {
|
||||
var dirty string
|
||||
if GitDirty {
|
||||
if gitDirty {
|
||||
dirty = "-dirty"
|
||||
}
|
||||
fmt.Fprintf(&ret, " tailscale commit: %s%s\n", GitCommit, dirty)
|
||||
fmt.Fprintf(&ret, " tailscale commit: %s%s\n", gitCommit, dirty)
|
||||
}
|
||||
if ExtraGitCommit != "" {
|
||||
fmt.Fprintf(&ret, " other commit: %s\n", ExtraGitCommit)
|
||||
if extraGitCommit != "" {
|
||||
fmt.Fprintf(&ret, " other commit: %s\n", extraGitCommit)
|
||||
}
|
||||
fmt.Fprintf(&ret, " go version: %s\n", runtime.Version())
|
||||
return strings.TrimSpace(ret.String())
|
||||
|
||||
Reference in New Issue
Block a user