go mod tidy报错:verifying gorm.io/[email protected]: checksum mismatch

在项目中执行go mod tidy出现以下报错:

$ go mod tidy
go: downloading gorm.io/gorm v1.25.0
verifying gorm.io/[email protected]: checksum mismatch
        downloaded: h1:+KtYtb2roDz14EQe4bla8CbQlmb9dN3VejSai3lprfU=
        go.sum:     h1:Gdj8DFuEI4XSM++fNJtRqejWu11/ZtgUXOedl8I5cXE=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

解决方式:
在项目根目录执行:

rm go.sum && go mod tidy

你可能感兴趣的:(go,golang,开发语言,后端)