github.com/thediveo/gons@v0.9.9/scripts/vuln.sh (about)

     1  #!/bin/bash
     2  set -e
     3  
     4  if ! command -v govulncheck &>/dev/null; then
     5      export PATH="$(go env GOPATH)/bin:$PATH"
     6      if ! command -v govulncheck &>/dev/null; then
     7          echo "installing govulncheck..."
     8          go install golang.org/x/vuln/cmd/govulncheck@latest
     9      fi
    10  fi
    11  if [[ $(find "$(go env GOPATH)/bin/govulncheck" -mtime +1 -print) ]]; then
    12      echo "updating govulncheck to @latest..."
    13      go install golang.org/x/vuln/cmd/govulncheck@latest
    14  fi
    15  
    16  govulncheck ./...