mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 08:56:41 +01:00
Normalize cataloger configuration patterns (#2365)
* normalize cataloger patterns Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove central reference for maven configurable 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:
@@ -15,16 +15,16 @@ import (
|
||||
|
||||
var _ pkg.Cataloger = (*LinuxKernelCataloger)(nil)
|
||||
|
||||
type LinuxCatalogerConfig struct {
|
||||
CatalogModules bool
|
||||
type LinuxKernelCatalogerConfig struct {
|
||||
CatalogModules bool `yaml:"catalog-modules" json:"catalog-modules" mapstructure:"catalog-modules"`
|
||||
}
|
||||
|
||||
type LinuxKernelCataloger struct {
|
||||
cfg LinuxCatalogerConfig
|
||||
cfg LinuxKernelCatalogerConfig
|
||||
}
|
||||
|
||||
func DefaultLinuxCatalogerConfig() LinuxCatalogerConfig {
|
||||
return LinuxCatalogerConfig{
|
||||
func DefaultLinuxCatalogerConfig() LinuxKernelCatalogerConfig {
|
||||
return LinuxKernelCatalogerConfig{
|
||||
CatalogModules: true,
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ var kernelModuleGlobs = []string{
|
||||
}
|
||||
|
||||
// NewLinuxKernelCataloger returns a new kernel files cataloger object.
|
||||
func NewLinuxKernelCataloger(cfg LinuxCatalogerConfig) *LinuxKernelCataloger {
|
||||
func NewLinuxKernelCataloger(cfg LinuxKernelCatalogerConfig) *LinuxKernelCataloger {
|
||||
return &LinuxKernelCataloger{
|
||||
cfg: cfg,
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ func Test_KernelCataloger(t *testing.T) {
|
||||
Expects(expectedPkgs, expectedRelationships).
|
||||
TestCataloger(t,
|
||||
NewLinuxKernelCataloger(
|
||||
LinuxCatalogerConfig{
|
||||
LinuxKernelCatalogerConfig{
|
||||
CatalogModules: true,
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user