github.com/noqcks/syft@v0.0.0-20230920222752-a9e2c4e288e5/cmd/syft/cli/options/pkg.go (about)

     1  package options
     2  
     3  import (
     4  	"github.com/anchore/syft/syft/pkg/cataloger"
     5  )
     6  
     7  type pkg struct {
     8  	Cataloger               scope `yaml:"cataloger" json:"cataloger" mapstructure:"cataloger"`
     9  	SearchUnindexedArchives bool  `yaml:"search-unindexed-archives" json:"search-unindexed-archives" mapstructure:"search-unindexed-archives"`
    10  	SearchIndexedArchives   bool  `yaml:"search-indexed-archives" json:"search-indexed-archives" mapstructure:"search-indexed-archives"`
    11  }
    12  
    13  func defaultPkg() pkg {
    14  	c := cataloger.DefaultSearchConfig()
    15  	return pkg{
    16  		SearchIndexedArchives:   c.IncludeIndexedArchives,
    17  		SearchUnindexedArchives: c.IncludeUnindexedArchives,
    18  		Cataloger: scope{
    19  			Enabled: true,
    20  			Scope:   c.Scope.String(),
    21  		},
    22  	}
    23  }