Revert "External sources configuration (#1158)" (#1191)

reverted as functionality is to be merged with dev branch of kubecon draft
This commit is contained in:
Christopher Angelo Phillips
2022-09-01 15:45:35 -04:00
committed by GitHub
parent 1b0cfe7246
commit 586d3fe77f
14 changed files with 16 additions and 132 deletions
+1 -3
View File
@@ -57,7 +57,6 @@ type Application struct {
Exclusions []string `yaml:"exclude" json:"exclude" mapstructure:"exclude"`
Attest attest `yaml:"attest" json:"attest" mapstructure:"attest"`
Platform string `yaml:"platform" json:"platform" mapstructure:"platform"`
ExternalSources ExternalSources `yaml:"external_sources" json:"external_sources" mapstructure:"external_sources"`
}
func (cfg Application) ToCatalogerConfig() cataloger.Config {
@@ -67,8 +66,7 @@ func (cfg Application) ToCatalogerConfig() cataloger.Config {
IncludeUnindexedArchives: cfg.Package.SearchUnindexedArchives,
Scope: cfg.Package.Cataloger.ScopeOpt,
},
Catalogers: cfg.Catalogers,
ExternalSourcesEnabled: cfg.ExternalSources.ExternalSourcesEnabled,
Catalogers: cfg.Catalogers,
}
}
-11
View File
@@ -1,11 +0,0 @@
package config
import "github.com/spf13/viper"
type ExternalSources struct {
ExternalSourcesEnabled bool `yaml:"external-sources-enabled" json:"external-sources-enabled" mapstructure:"external-sources-enabled"`
}
func (e ExternalSources) loadDefaultValues(v *viper.Viper) {
v.SetDefault("external-sources-enabled", false)
}