mirror of
https://github.com/golang/go
synced 2024-11-18 20:04:52 -07:00
improve testing.Init docs
This commit is contained in:
parent
3fbdcdee1e
commit
32b798d75f
@ -397,10 +397,8 @@ var initRan bool
|
||||
// Init registers testing flags. These flags are automatically registered by
|
||||
// the "go test" command before running test functions, so Init is only needed
|
||||
// when calling functions such as Benchmark without using "go test".
|
||||
// It must be called before these flags are accessed by the program.
|
||||
//
|
||||
// Init has no effect if it was already called, and note that
|
||||
// it is not safe to be called concurrently.
|
||||
// Init is not safe to call concurrently. It has no effect if it was already called.
|
||||
func Init() {
|
||||
if initRan {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user