MCPcopy
hub / github.com/tailscale/tailscale / Short

Function Short

version/version.go:93–104  ·  view source on GitHub ↗

Short returns a short version number for this build, of the forms: - "x.y.z" for builds distributed by Tailscale or built with build_dist.sh - "x.y.z-devYYYYMMDD" for builds made with plain "go build" or "go install" - "x.y.z-ERR-BuildInfo" for builds made by plain "go run"

()

Source from the content-addressed store, hash-verified

91// - "x.y.z-devYYYYMMDD" for builds made with plain "go build" or "go install"
92// - "x.y.z-ERR-BuildInfo" for builds made by plain "go run"
93func Short() string {
94 return short.Get(func() string {
95 if shortStamp != "" {
96 return shortStamp
97 }
98 bi := getEmbeddedInfo()
99 if !bi.valid {
100 return strings.TrimSpace(tailscaleroot.VersionDotTxt) + "-ERR-BuildInfo"
101 }
102 return strings.TrimSpace(tailscaleroot.VersionDotTxt) + "-dev" + bi.commitDate
103 })
104}
105
106type embeddedInfo struct {
107 valid bool

Callers 10

TestShortAllocsFunction · 0.92
confirmUpdateFunction · 0.92
NewUpdaterFunction · 0.92
NewUpdateProgressFunction · 0.92
IsUnstableBuildFunction · 0.85
prop.goFile · 0.85
GetMetaFunction · 0.85
print.goFile · 0.85
majorMinorPatchFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by 1

TestShortAllocsFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…