mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 00:46:38 +01:00
Unexport types and functions cataloger packages (#2530)
* unexport as many types and functions from cataloger packages as possible Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * capture type and signature information in convention test Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * check that we return pkg.Cataloger from constructors Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -21,7 +21,7 @@ func DefaultCatalogerConfig() CatalogerConfig {
|
||||
}
|
||||
|
||||
// NewPackageCataloger returns a new cataloger for python packages referenced from poetry lock files, requirements.txt files, and setup.py files.
|
||||
func NewPackageCataloger(cfg CatalogerConfig) *generic.Cataloger {
|
||||
func NewPackageCataloger(cfg CatalogerConfig) pkg.Cataloger {
|
||||
rqp := newRequirementsParser(cfg)
|
||||
return generic.NewCataloger("python-package-cataloger").
|
||||
WithParserByGlobs(rqp.parseRequirementsTxt, "**/*requirements*.txt").
|
||||
|
||||
@@ -29,11 +29,11 @@ type pipfileLock struct {
|
||||
VerifySsl bool `json:"verify_ssl"`
|
||||
} `json:"sources"`
|
||||
} `json:"_meta"`
|
||||
Default map[string]Dependency `json:"default"`
|
||||
Develop map[string]Dependency `json:"develop"`
|
||||
Default map[string]pipfileLockDependency `json:"default"`
|
||||
Develop map[string]pipfileLockDependency `json:"develop"`
|
||||
}
|
||||
|
||||
type Dependency struct {
|
||||
type pipfileLockDependency struct {
|
||||
Hashes []string `json:"hashes"`
|
||||
Version string `json:"version"`
|
||||
Index string `json:"index"`
|
||||
|
||||
Reference in New Issue
Block a user