原子性 单例 package main import ( "fmt" "math/rand" "sync" "time" ) type A struct { Item int } var a *A var l sync.RWMutex func GetGlobalA() *A { if a »