diff --git a/gobin/exe.go b/gobin/exe.go index 21bf612c6..b40c3188b 100644 --- a/gobin/exe.go +++ b/gobin/exe.go @@ -54,7 +54,8 @@ func toPackages(ctx context.Context, out *[]*claircore.Package, p string, r io.R // TODO(hank) The "go version" is documented as the toolchain that produced // the binary, which may be distinct from the version of the stdlib used? // Need to investigate. - runtimeVer, err := ParseVersion(strings.TrimPrefix(bi.GoVersion, "go")) + goVer, _, _ := strings.Cut(strings.TrimPrefix(bi.GoVersion, "go"), " ") + runtimeVer, err := ParseVersion(goVer) switch { case errors.Is(err, nil): case errors.Is(err, ErrInvalidSemVer):