mirror of
https://github.com/anchore/syft.git
synced 2025-11-20 01:43:17 +01:00
* Minor cleanup Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Update pkg Type definition to string Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Implement poetry.lock parsing Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Address CI issues Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Integrate Alex's changes Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
22 lines
573 B
Go
22 lines
573 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.PoetryPkg,
|
|
}
|
|
}
|