all.bash: install go binaries the modern way

Change-Id: I73e3662c244e27b29834ff304715a6ea94404a52
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/367795
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/all.bash b/all.bash
index 33a7361..b93d6cc 100755
--- a/all.bash
+++ b/all.bash
@@ -43,9 +43,8 @@
   local binary=$(basename $1)
   if ! [ -x "$(command -v $binary)" ]; then
     info "Installing: $1"
-    # Run in a subshell for convenience, so that we don't have to worry about
-    # our PWD.
-    (set -x; cd && env GO111MODULE=on go get -u $1)
+    # Install the binary in a way that doesn't affect our go.mod file.
+    go install $1@latest
   fi
 }