Created
May 28, 2024 15:37
-
-
Save masih/bfd90c39350d787db5bd1781933b88f4 to your computer and use it in GitHub Desktop.
Update all go mod dependencies to latest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
go list -json -m all | jq -r 'select(.Indirect != true and .Main != true) | "\(.Path)@latest"' | while read -r pkg; do | |
go get "$pkg" | |
done | |
go mod tidy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment