Skip to content

Instantly share code, notes, and snippets.

@azhai
Last active January 16, 2020 08:41
Show Gist options
  • Save azhai/3ddf39cae84f6123d0d4b9fc246086fe to your computer and use it in GitHub Desktop.
Save azhai/3ddf39cae84f6123d0d4b9fc246086fe to your computer and use it in GitHub Desktop.
Usage: gawk -f go_mo_up.awk go.mod
/^replace \(/, /^\)/{
if($0~/^\s+/)
system("go get -u "$3)
}
/^require \(/, /^\)/{
if($0~/^\s+/)
system("go get -u "$1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment