mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 06:56:40 +01:00
* internalize majority of cmd package and migrate integration tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * add internal api encoder Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * create internal representation of all formats Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * export capability to get default encoders Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * restore test fixtures Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
23 lines
1.0 KiB
Go
23 lines
1.0 KiB
Go
package options
|
|
|
|
import "github.com/anchore/fangs"
|
|
|
|
var _ fangs.FieldDescriber = (*relationshipsConfig)(nil)
|
|
|
|
type relationshipsConfig struct {
|
|
PackageFileOwnership bool `mapstructure:"package-file-ownership" json:"package-file-ownership" yaml:"package-file-ownership"`
|
|
PackageFileOwnershipOverlap bool `mapstructure:"package-file-ownership-overlap" json:"package-file-ownership-overlap" yaml:"package-file-ownership-overlap"`
|
|
}
|
|
|
|
func defaultRelationshipsConfig() relationshipsConfig {
|
|
return relationshipsConfig{
|
|
PackageFileOwnership: true,
|
|
PackageFileOwnershipOverlap: true,
|
|
}
|
|
}
|
|
|
|
func (r *relationshipsConfig) DescribeFields(descriptions fangs.FieldDescriptionSet) {
|
|
descriptions.Add(&r.PackageFileOwnership, "include package-to-file relationships that indicate which files are owned by which packages.")
|
|
descriptions.Add(&r.PackageFileOwnershipOverlap, "include package-to-package relationships that indicate one package is owned by another due to files claimed to be owned by one package are also evidence of another package's existence.")
|
|
}
|