mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
version: add func IsRace to report whether race detector enabled
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
ed9d825552
commit
314d15b3fb
11
version/race.go
Normal file
11
version/race.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build race
|
||||||
|
|
||||||
|
package version
|
||||||
|
|
||||||
|
// IsRace reports whether the current binary was built with the Go
|
||||||
|
// race detector enabled.
|
||||||
|
func IsRace() bool { return true }
|
11
version/race_off.go
Normal file
11
version/race_off.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build !race
|
||||||
|
|
||||||
|
package version
|
||||||
|
|
||||||
|
// IsRace reports whether the current binary was built with the Go
|
||||||
|
// race detector enabled.
|
||||||
|
func IsRace() bool { return false }
|
Loading…
Reference in New Issue
Block a user