Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 746 Bytes

README.md

File metadata and controls

29 lines (18 loc) · 746 Bytes

buildinfo

Extract build information from Go binary

Install

go install github.com/veggiemonk/buildinfo@latest

Usage

Mostly used to update binaries that were install with go install.

buildinfo $(which pkgsite) | jq -r '.Path' | xargs -I {} go install "{}@latest"

Tips

  • Find the origin of the binary: buildinfo $(which hugo) | jq -r '.Main.Path'
  • Find the version of Go the binary was compiled with: buildinfo $(which gopls) | jq -r '.GoVersion'
  • Find the version of the binary: buildinfo $(which pkgsite) | jq -r '.Main.Version'
  • Filter dependencies: buildinfo $(which hugo) | jq -r -c '.Deps.[]' | grep yaml

Noteworthy:

  • Check for vulnerable binaries: govulncheck -mode=binary $(which hugo)