github.com/nextlinux/gosbom@v0.81.1-0.20230627115839-1ff50c281391/internal/config/file_classification.go (about)

     1  package config
     2  
     3  import (
     4  	"github.com/nextlinux/gosbom/gosbom/source"
     5  	"github.com/spf13/viper"
     6  )
     7  
     8  type fileClassification struct {
     9  	Cataloger catalogerOptions `yaml:"cataloger" json:"cataloger" mapstructure:"cataloger"`
    10  }
    11  
    12  func (cfg fileClassification) loadDefaultValues(v *viper.Viper) {
    13  	v.SetDefault("file-classification.cataloger.enabled", catalogerEnabledDefault)
    14  	v.SetDefault("file-classification.cataloger.scope", source.SquashedScope)
    15  }
    16  
    17  func (cfg *fileClassification) parseConfigValues() error {
    18  	return cfg.Cataloger.parseConfigValues()
    19  }