go-depdiffs

command module
v0.0.0-...-a7d8c73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

README

Go Dependency Update API Diffs!

This is an experimental attempt to give module consumers more insight into the risks of dependency updates, I've combined go list -u with golang.org/x/exp/apidiff.

This tool loads modules at their current and updated versions from the local Go module cache, and gets a report of their API differences. Updated modules, if not present, are fetched with go mod download.

  • If a module cannot be loaded for any reason, its risk is considered "unknown".
  • If a module update is found to have incompatible diffs (as defined by apidiff), the update is marked as high risk.
  • If no incompatible diffs are found, the update is considered low risk.

Usage

With no arguments, the tool will print the risk level of each update:

go-depdiffs 

✅ Low Risk Update: go get google.golang.org/[email protected]
🚩️ Incompatible Update to google.golang.org/[email protected]
Flags
  • -v will include details of the API diffs. It also adds some additional logging about module loading errors.
  • --risk (low|medium|high|unknown) limits the output to updates of only the specified risk. useful for examining diffs when combined with -v.
  • --json output json objects instead of strings. useful for piping into go get commands.
Examples
go-depdiffs 

✅ Low Risk Update: go get google.golang.org/[email protected]
🚩️ Incompatible Update to google.golang.org/[email protected]

To update all low-risk dependencies:

go-diffdeps --risk low --json 2>/dev/null | jq '. | "\(.Path)@\(.UpdateVersion)"' | xargs go get

To review high risk dependencies:

go-diffdeps --risk high -v 

🚩️ Incompatible Update to google.golang.org/[email protected]:
 google.golang.org/grpc.Version: value changed from "1.73.0" to "1.75.1"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL