go-upgrade

Update outdated Go dependencies interactively
Pre-compiled binaries for Windows, OS X and Linux are available in
the releases page.
Alternatively, with the Go toolchain, goto Usage
Usage
In a Go project which uses modules, you can now run
go install github.com/devsolux/go-upgrade@latest
go-upgrade
To see what upgrades are available without any interactivity, use the --list flag:
go-upgrade --list
Global options
This will display all available module upgrades using the same color coding as the interactive mode, making it perfect
for CI/CD pipelines or when you just want to check what's available.
Colors in module names help identify the update type:
- yellow for a minor update
- green for a patch update
- red for a prerelease update
Additional options can be specified via the CLI global options:
GLOBAL OPTIONS:
--pagesize value, -p value Specify page size (default: 10)
--force, -f Force update all modules in non-interactive mode (default: false)
--list, -l List available module upgrades without interactivity (default: false)
--verbose, -v Verbose mode (default: false)
--hook value Hook to execute for each updated module
--ignore value, -i value Ignore modules matching the given regular expression
--help, -h show help (default: false)
--version print the version (default: false)
Helpful
GOPATH
echo 'export GOPATH="${GOPATH:-$HOME/go}"' >> ~/.zshrc
echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.zshrc
exec $SHELL -l
CLI
# List installed tool binaries
ls -lh "$(go env GOPATH)/bin"
# Remove installed tool binaries
rm -rf "$(go env GOPATH)/bin"
# Clear module and build caches
go clean -modcache -cache -testcache -fuzzcache
DOCTOR
which go
go env GOROOT GOPATH GOBIN
echo $PATH
ls -1 "$(go env GOPATH)/bin" | sed -n '1,10p'
which go-upgrade
$(go env GOPATH)/bin/go-upgrade --list