Skip to content

Instantly share code, notes, and snippets.

@jeesmon
Created February 28, 2022 13:35
Show Gist options
  • Save jeesmon/beebc909cce8b744dc9cd387db331322 to your computer and use it in GitHub Desktop.
Save jeesmon/beebc909cce8b744dc9cd387db331322 to your computer and use it in GitHub Desktop.

If you use go 1.17 in go.mod and run go mod tidy, you will see a second require block with indirect dependencies. Few things changed in 1.17 for dependency graph. More details here: https://go.dev/doc/go1.17#go-command

Also, few useful commands to manage dependencies

go mod tidy # fix up modules
go mod why -m <module> # shows where this module is used from main module
go mod graph # shows module requirement graph
go list -m all # list all dependencies
go list -m -u -versions -json <module> # shows versions of a module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment