ijason7758
ijason7758
========================================================================================= WARNING: DATA RACE Read at 0x00c00072fe90 by goroutine 35: runtime.mapaccess2() /usr/local/Cellar/go/1.15.3/libexec/src/runtime/map.go:452 +0x0 github.com/go-playground/validator/v10.(*Validate).RegisterTranslation() /Users/zhanglijie/go/pkg/mod/github.com/go-playground/validator/[email protected]/validator_instance.go:261 +0x10f github.com/go-playground/validator/v10/translations/zh.RegisterDefaultTranslations() /Users/zhanglijie/go/pkg/mod/github.com/go-playground/validator/[email protected]/translations/zh/zh.go:1328 +0x3d9 github.com/go-programming-tour-book/blog-service/internal/middleware.Translations.func1() /Users/zhanglijie/qucode/blog-service/internal/middleware/translations.go:34 +0x2c4 ========================================================================================= wrk --timeout 10s -t 1 -c 2...
今天也发现了同样的问题,感觉就是universal-translator包里的RegisterTranslation方法中使用的map引起的DATA RACE
@marchtea 好的多谢,还是感谢你在这个项目上所做的付出