Skip to content

Commit

Permalink
gobin: ignore flags in stdlib version
Browse files Browse the repository at this point in the history
Signed-off-by: RTann <[email protected]>
  • Loading branch information
RTann committed Nov 14, 2024
1 parent e7094c2 commit 479592e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gobin/exe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 479592e

Please sign in to comment.