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:
David Anderson
2023-02-10 22:20:36 -08:00
committed by Dave Anderson
parent 9e6b4d7ad8
commit 8b2ae47c31
20 changed files with 67 additions and 59 deletions
+7 -7
View File
@@ -110,7 +110,7 @@ func IsUnstableBuild() bool {
}
func initUnstable() {
_, rest, ok := strings.Cut(Short, ".")
_, rest, ok := strings.Cut(short, ".")
if !ok {
return
}
@@ -187,12 +187,12 @@ type Meta struct {
func GetMeta() Meta {
return Meta{
MajorMinorPatch: majorMinorPatch,
Short: Short,
Long: Long,
GitCommit: GitCommit,
GitDirty: GitDirty,
ExtraGitCommit: ExtraGitCommit,
IsDev: strings.Contains(Short, "-dev"), // TODO(bradfitz): could make a bool for this in init
Short: short,
Long: long,
GitCommit: gitCommit,
GitDirty: gitDirty,
ExtraGitCommit: extraGitCommit,
IsDev: strings.Contains(short, "-dev"), // TODO(bradfitz): could make a bool for this in init
UnstableBranch: IsUnstableBuild(),
Cap: int(tailcfg.CurrentCapabilityVersion),
}