Tuesday 25 June 2024

go lang update packages might be revereted after go mod tidy && solutiions

 this is because in go.mode, require(

xxxxxxxxxx v1.11 //indirect this means its called by other libraries nothing u can do to upgrade unless calling it


)

*********************

To show traces of why a pkg can not be updated through go get -u ./..

or go get -u github.com/some/module@latest


use 

go mod graph | grep 

go mod graph | grep pkg/errors

******


go list -m all

go clean -modcache

// update all

 go get -u ./...

//

go mod tidy


go mod tidy is a command in the Go programming language that helps manage the go.mod file and go.sum file, which are used for tracking the dependencies of a Go module. The go mod tidy command cleans up these files by adding missing entries and removing those that are no longer needed. Here's a detailed explanation of what go mod tidy does:


-

No comments:

Post a Comment