mcjones.ca

Go Module Handling

Starting from Scratch

go mod init <name of your app>
go mod download <dependency>
go mod tidy

Updating

https://go.dev/doc/modules/managing-dependencies#discovering_updates

go list -m -u all

go get -d -u -t ./...

go mod tidy

Removing

go get example.com/theirmodule@none

Or remove from your files and run

go mod tidy