ZhangZhihui's Blog  

Usage

To help diagnose such bugs, Go includes a built-in data race detector. To use it, add the -race flag to the go command:

$ go test -race mypkg    // to test the package
$ go run -race mysrc.go  // to run the source file
$ go build -race mycmd   // to build the command
$ go install -race mypkg // to install the package

 

posted on 2024-02-22 17:28  ZhangZhihuiAAA  阅读(14)  评论(0)    收藏  举报