mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
util/racebuild: add package to export a race-is-enabled const
This commit is contained in:
parent
fc8bc76e58
commit
ff50ddf1ee
9
util/racebuild/off.go
Normal file
9
util/racebuild/off.go
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2020 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 racebuild
|
||||
|
||||
const On = false
|
9
util/racebuild/on.go
Normal file
9
util/racebuild/on.go
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2020 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 racebuild
|
||||
|
||||
const On = true
|
7
util/racebuild/racebuild.go
Normal file
7
util/racebuild/racebuild.go
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright (c) 2020 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.
|
||||
|
||||
// Package racebuild exports a constant about whether the current binary
|
||||
// was built with the race detector.
|
||||
package racebuild
|
Loading…
Reference in New Issue
Block a user