mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 23:46:35 +01:00
Preserve syft IDs on SBOM decode (#963)
This commit is contained in:
@@ -28,6 +28,10 @@ type Package struct {
|
||||
Metadata interface{} // additional data found while parsing the package source
|
||||
}
|
||||
|
||||
func (p *Package) OverrideID(id artifact.ID) {
|
||||
p.id = id
|
||||
}
|
||||
|
||||
func (p *Package) SetID() {
|
||||
id, err := artifact.IDByHash(p)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user