Troubles with go mod

Hi. I created a folder for my project, so i do this:

I got this message:

go: github.com/mattn/go-sqlite3@v1.14.34: verifying go.mod: github.com/mattn/go-sqlite3@v1.14.34/go.mod: initializing sumdb.Client: checking tree#50678276: downloaded inconsistent tile

When i check the .mod file it reports go 1.25.0. However go version shows :go1.26.0 windows/amd64

so is there a change that i need to run to update go tools ?

TIA,

Yamil

I can’t recreate your “downloaded inconsistent tile” problem

$ go mod init my_project
go: creating new go.mod: module my_project

$ go get github.com/mattn/go-sqlite3
go: downloading github.com/mattn/go-sqlite3 v1.14.34
go: added github.com/mattn/go-sqlite3 v1.14.34

$ cat go.mod
module my_project

go 1.25.0

require github.com/mattn/go-sqlite3 v1.14.34 // indirect

And it’s also fine if I explicitly specify the version, go get github.com/mattn/go-sqlite3@1.14.13.

Regarding the appearance of go 1.25.0 in the initialised go.mod, this is expected behaviour with 1.26. This was as a result of cmd/go: change go mod init default go directive to 1.(N-n).0. It looks like with proposal: cmd/go: change go mod init default go directive back to 1.N this behaviour may be changed back in 1.27.

Thanks for your response. I tried again with

go get GitHub - mattn/go-sqlite3: sqlite3 driver for go using database/sql · GitHub

But the result was the same:

go: github.com/mattn/go-sqlite3@v1.14.34: verifying go.mod: github.com/mattn/go-sqlite3@v1.14.34/go.mod: initializing sumdb.Client: checking tree#50678276: downloaded inconsistent tile

Then i tried setting the version : go get github.com/mattn/go-sqlite3@1.14.34

and I got : go: github.com/mattn/go-sqlite3@1.14.34: invalid version: unknown revision 1.14.34

Any other suggestion ?

using go mod tidy, said something about a sumdb package (??). Then I go to Go/pkg/mod/cache/download and deletes sumdb folder there and I use go mod tidy and everything works fine!!!

Thanks a lot!!!

That is strange. But glad you got it figured out!

yes, and it was working fine until i created a new project. This morning i checked an anrticule in medium (https://pub.huizhou92.com/go-1-26-changed-go-mod-init-and-nobody-asked-for-it-57ec19d909d1). I wrote the sample code and guess what ? Error because the version in go.mod is 1.25 and I am working with 1.26 (this particular sample refers to create pointers to a type with new syntax, say, x := new(42).

I guess my problem was caused for this, a differente version in mod and another version in your current working environment…

Thanks!!!