MCPcopy
hub / github.com/tinygo-org/tinygo / Version

Function Version

goenv/version.go:17–25  ·  view source on GitHub ↗

Return TinyGo version, either in the form 0.30.0 or as a development version (like 0.30.0-dev-abcd012).

()

Source from the content-addressed store, hash-verified

15// Return TinyGo version, either in the form 0.30.0 or as a development version
16// (like 0.30.0-dev-abcd012).
17func Version() string {
18 v := version
19 if strings.HasSuffix(version, "-dev") {
20 if hash := readGitHash(); hash != "" {
21 v += "-" + hash
22 }
23 }
24 return v
25}
26
27func readGitHash() string {
28 if info, ok := debug.ReadBuildInfo(); ok {

Callers 3

usageFunction · 0.92
mainFunction · 0.92
BuildFunction · 0.92

Calls 1

readGitHashFunction · 0.85

Tested by

no test coverage detected