Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFromMap ¶
func WriteToMap ¶
func WriteToMap(k, v string)
如果注释掉 WriteToMap 和 ReadFromMap 中 locker 保护的代码,执行测试,加上 `-race` 一定会失败:`go test -v -race` ==================
TestReadFromMap: testing.go:906: race detected during execution of test TestWriteToMap: testing.go:906: race detected during execution of test
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.