From b5ce187ba7b533de951ba41c92b379f4361c1728 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Mon, 28 Sep 2020 17:25:04 -0400 Subject: [PATCH] replace modfile with stdlib (#187) Signed-off-by: Alex Goodman --- go.mod | 2 +- syft/cataloger/golang/parse_go_mod.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1a3775036..af71131ea 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,6 @@ require ( github.com/olekukonko/tablewriter v0.0.4 github.com/package-url/packageurl-go v0.1.0 github.com/pelletier/go-toml v1.8.0 - github.com/rogpeppe/go-internal v1.5.2 github.com/sergi/go-diff v1.1.0 github.com/sirupsen/logrus v1.6.0 github.com/spf13/afero v1.2.2 @@ -33,5 +32,6 @@ require ( github.com/x-cray/logrus-prefixed-formatter v0.5.2 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 + golang.org/x/mod v0.3.0 gopkg.in/yaml.v2 v2.3.0 ) diff --git a/syft/cataloger/golang/parse_go_mod.go b/syft/cataloger/golang/parse_go_mod.go index 96d904bc8..c8facdc25 100644 --- a/syft/cataloger/golang/parse_go_mod.go +++ b/syft/cataloger/golang/parse_go_mod.go @@ -6,9 +6,8 @@ import ( "io/ioutil" "sort" - "github.com/rogpeppe/go-internal/modfile" - "github.com/anchore/syft/syft/pkg" + "golang.org/x/mod/modfile" ) // parseGoMod takes a go.mod and lists all packages discovered.