go-gorm/gorm.io

[Question] cannot use map[string]gorm.Stmt{}

fastopencn opened this issue · 4 comments

gorm version

gorm.io/gorm v1.24.0
gorm.io/plugin/dbresolver v1.2.1 // indirect

error

../../../pkg/mod/gorm.io/plugin/dbresolver@v1.2.1/dbresolver.go:139:18: cannot use map[string]gorm.Stmt{} (value of type map[string]gorm.Stmt) as type map[string]*gorm.Stmt in struct literal

commit error

I also have this problem, I solve it by updating the version of gorm.io/plugin/dbresolver to latest

Thanks!! it works!! add 'require (gorm.io/plugin/dbresolver v1.3.0)' will be ok

Thanks!! it works!! add 'require (gorm.io/plugin/dbresolver v1.3.0)' will be ok

This worked for me. Thanks!