Last active
November 14, 2023 15:00
-
-
Save suhlig/cb94e384c49febc20654e095905904d3 to your computer and use it in GitHub Desktop.
Update dependencies of all modules in a go workspace
This file contains 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
go work edit -json \ | |
| jq --raw-output '.Use.[].DiskPath' \ | |
| xargs -I MODULE zsh -o errexit -c " | |
cd MODULE | |
pwd | |
go get -d -u -t ./... | |
go mod tidy | |
[ -d vendor ] && go mod vendor | |
" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment