mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 04:23:41 +00:00
all: refactor goenv.Version to add the git sha1 if needed
Previously all (except one!) usage of goenv.Version manually added the git sha1 hash, leading to duplicate code. I've moved this to do it all in one place, to avoid this duplication.
This commit is contained in:
committed by
Ron Evans
parent
2320b18953
commit
5cd8ba2421
@@ -10,8 +10,7 @@ func Callers(skip int, pc []uintptr) int {
|
||||
var buildVersion string
|
||||
|
||||
// Version returns the Tinygo tree's version string.
|
||||
// It is the same as goenv.Version, or in case of a development build,
|
||||
// it will be the concatenation of goenv.Version and the git commit hash.
|
||||
// It is the same as goenv.Version().
|
||||
func Version() string {
|
||||
return buildVersion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user