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:
Alex Goodman
2023-11-28 17:02:43 +00:00
committed by GitHub
parent 4d0da703bf
commit 1cfc4c7387
49 changed files with 335 additions and 288 deletions
+6 -6
View File
@@ -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,
}
+1 -1
View File
@@ -87,7 +87,7 @@ func Test_KernelCataloger(t *testing.T) {
Expects(expectedPkgs, expectedRelationships).
TestCataloger(t,
NewLinuxKernelCataloger(
LinuxCatalogerConfig{
LinuxKernelCatalogerConfig{
CatalogModules: true,
},
),