Skip to content

Commit

Permalink
Update based on code review
Browse files Browse the repository at this point in the history
Signed-off-by: nathannaveen <[email protected]>
  • Loading branch information
nathannaveen committed Apr 19, 2024
1 parent 720fe4a commit a06a21f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/ingestor/parser/cyclonedx/parser_cyclonedx.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,13 @@ func (c *cyclonedxParser) findCDXPkgVersionIDs(ctx context.Context, pkgIdentifie
Name: &pkgIdentifier,
})
if err != nil {
return nil, fmt.Errorf("error querying for packages1: %w", err)
return nil, fmt.Errorf("error querying for packages: %w", err)
}

pkgVersionsMap := map[string]string{}
var pkgVersions []string
for _, depPkgVersion := range pkgResponse.Packages[0].Namespaces[0].Names[0].Versions {
pkgVersions = append(pkgVersions, depPkgVersion.Version)
pkgVersionsMap[depPkgVersion.Version] = depPkgVersion.Id
pkgVersionsMap[depPkgVersion.Version] = guacCDXPkgPurl(typeGUAC, depPkgVersion.Version, "", false)
}

Expand Down

0 comments on commit a06a21f

Please sign in to comment.