README.md 319 Bytes
Newer Older
Juan Batiz-Benet's avatar
v1  
Juan Batiz-Benet committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# go-detect-race

Check if the race detector is running.

I didnt find a variable to check quickly enough so I made this.


## Usage

```go
import (
  detectrace "github.com/jbenet/go-detect-race"
)

func main() {
  if detectrace.WithRace() {
    // running with -race
  } else {
    // running without -race
  }
}
```