aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-05-06 14:26:34 +0200
committerJakob Unterwurzacher2017-05-06 14:26:34 +0200
commita48893b653085b067f91e11806e4de017741d509 (patch)
treed4d176163a0b0ccca837be96b84536eb6662733f /main.go
parentc52e1abc5869dd27a28f71ff43ec4e1c1917acf4 (diff)
main: add "-race" to the version string
...if we were compiled with "-race".
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.go b/main.go
index 9301ae1..2a7d435 100644
--- a/main.go
+++ b/main.go
@@ -39,6 +39,9 @@ var GitVersionFuse = pleaseBuildBash
// BuildTime is the Unix timestamp, set by build.bash
var BuildTime = "0"
+// raceDetector is set to true by race.go if we are compiled with "go build -race"
+var raceDetector bool
+
func usageText() {
printVersion()
fmt.Printf(`
@@ -124,6 +127,9 @@ func printVersion() {
buildFlags = " without_openssl"
}
built := fmt.Sprintf("%s %s", humanTime, runtime.Version())
+ if raceDetector {
+ built += " -race"
+ }
fmt.Printf("%s %s%s; go-fuse %s; %s\n",
tlog.ProgramName, GitVersion, buildFlags, GitVersionFuse, built)
}