mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
rename Contents to FileContents in app config and documentation
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -38,7 +38,7 @@ type Application struct {
|
||||
Package packages `yaml:"package" json:"package" mapstructure:"package"`
|
||||
FileMetadata FileMetadata `yaml:"file-metadata" json:"file-metadata" mapstructure:"file-metadata"`
|
||||
FileClassification fileClassification `yaml:"file-classification" json:"file-classification" mapstructure:"file-classification"`
|
||||
Contents contents `yaml:"contents" json:"contents" mapstructure:"contents"`
|
||||
FileContents fileContents `yaml:"file-contents" json:"file-contents" mapstructure:"file-contents"`
|
||||
Secrets secrets `yaml:"secrets" json:"secrets" mapstructure:"secrets"`
|
||||
}
|
||||
|
||||
|
||||
@@ -6,19 +6,19 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
type contents struct {
|
||||
type fileContents struct {
|
||||
Cataloger catalogerOptions `yaml:"cataloger" json:"cataloger" mapstructure:"cataloger"`
|
||||
SkipFilesAboveSize int64 `yaml:"skip-files-above-size" json:"skip-files-above-size" mapstructure:"skip-files-above-size"`
|
||||
Globs []string `yaml:"globs" json:"globs" mapstructure:"globs"`
|
||||
}
|
||||
|
||||
func (cfg contents) loadDefaultValues(v *viper.Viper) {
|
||||
v.SetDefault("contents.cataloger.enabled", true)
|
||||
v.SetDefault("contents.cataloger.scope", source.SquashedScope)
|
||||
v.SetDefault("contents.skip-files-above-size", 1*file.MB)
|
||||
v.SetDefault("contents.globs", []string{})
|
||||
func (cfg fileContents) loadDefaultValues(v *viper.Viper) {
|
||||
v.SetDefault("file-contents.cataloger.enabled", true)
|
||||
v.SetDefault("file-contents.cataloger.scope", source.SquashedScope)
|
||||
v.SetDefault("file-contents.skip-files-above-size", 1*file.MB)
|
||||
v.SetDefault("file-contents.globs", []string{})
|
||||
}
|
||||
|
||||
func (cfg *contents) parseConfigValues() error {
|
||||
func (cfg *fileContents) parseConfigValues() error {
|
||||
return cfg.Cataloger.parseConfigValues()
|
||||
}
|
||||
@@ -206,7 +206,7 @@
|
||||
"scope": ""
|
||||
}
|
||||
},
|
||||
"contents": {
|
||||
"file-contents": {
|
||||
"cataloger": {
|
||||
"enabled": false,
|
||||
"scope": ""
|
||||
|
||||
Reference in New Issue
Block a user