mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
* set package ID in catalogers and improve hashing performance Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * update setting ID + tests Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
22 lines
575 B
Go
22 lines
575 B
Go
package python
|
|
|
|
import "github.com/anchore/syft/syft/pkg"
|
|
|
|
type PoetryMetadataPackage struct {
|
|
Name string `toml:"name"`
|
|
Version string `toml:"version"`
|
|
Category string `toml:"category"`
|
|
Description string `toml:"description"`
|
|
Optional bool `toml:"optional"`
|
|
}
|
|
|
|
// Pkg returns the standard `pkg.Package` representation of the package referenced within the poetry.lock metadata.
|
|
func (p PoetryMetadataPackage) Pkg() *pkg.Package {
|
|
return &pkg.Package{
|
|
Name: p.Name,
|
|
Version: p.Version,
|
|
Language: pkg.Python,
|
|
Type: pkg.PythonPkg,
|
|
}
|
|
}
|