I get this error, while I import gorm package into my project. I am using Goland on Ubuntu 22.
Build constraints exclude all the Go files in '/home/masoud/go/src/gorm.io/gorm'
I get this error, while I import gorm package into my project. I am using Goland on Ubuntu 22.
Build constraints exclude all the Go files in '/home/masoud/go/src/gorm.io/gorm'
It seems that the issue for me was as simple as using
go clean -modcache
and then following that with
go mod tidy
It fixed! I deleted project and its directory, and I cloned it again from git. after that I ran: go mod tidy and boom, I can develop smoothly.