多个 goroutine 对同一个 map 写会 panic,异常是否可以用 defer 捕获?

答案解析

并发写map会panic,但defer/recover只能捕获当前goroutine的panic,不能根本解决并发安全问题。