migrate location and file metadata to the file package

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman
2022-03-22 18:21:35 -04:00
parent a49c7e3c53
commit f999604a29
105 changed files with 804 additions and 757 deletions
+6 -4
View File
@@ -3,13 +3,15 @@ package config
import (
"errors"
"fmt"
"github.com/anchore/syft/internal/version"
"github.com/anchore/syft/syft"
"github.com/anchore/syft/syft/file"
"path"
"reflect"
"strings"
"github.com/anchore/syft/internal/version"
"github.com/anchore/syft/syft"
"github.com/anchore/syft/syft/file"
"github.com/anchore/syft/syft/file/cataloger/fileclassifier"
"github.com/adrg/xdg"
"github.com/anchore/syft/internal"
"github.com/mitchellh/go-homedir"
@@ -76,7 +78,7 @@ func (cfg Application) ToCatalogingConfig() (*syft.CatalogingConfig, error) {
SecretsConfig: *secretsConfig,
SecretsScope: cfg.Secrets.Cataloger.ScopeOpt,
ClassifyFiles: cfg.FileClassification.Cataloger.Enabled,
FileClassifiers: file.DefaultClassifiers(),
FileClassifiers: fileclassifier.DefaultClassifiers(),
ContentsConfig: cfg.FileContents.ToConfig(),
}, nil
}
+1
View File
@@ -2,6 +2,7 @@ package config
import (
"fmt"
"github.com/anchore/syft/syft/file"
"github.com/anchore/syft/syft/file/cataloger/secrets"
"github.com/anchore/syft/syft/source"