sync.Once concurrent map iteration and map write map并发读写
作者:互联网
var AMap AMapS var once sync.Once func confCV(r *bizRepo) { // TODO once.Do(func() { b := r.data.confTODOBootstrap.DomainSonypathoid json.Unmarshal(b, &AMap) r.log.Info("once") }) // r.log.Info("once-skip") }
标签:Info,map,iteration,sync,AMap,var,once 来源: https://www.cnblogs.com/rsapaper/p/15831354.html