Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Bump golang remove unsupported #56

Merged
merged 2 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- run: bundle config --local path $PWD/vendor/bundle

- name: Set up Node
Expand Down
62 changes: 32 additions & 30 deletions deplist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,45 @@ func BuildWant() []Dependency {
var deps []Dependency

golangPaths := []string{
"internal/cpu",
"unsafe",
"internal/bytealg",
"runtime/internal/atomic",
"runtime/internal/sys",
"runtime/internal/math",
"runtime",
"internal/reflectlite",
"errors",
"math/bits",
"math",
"unicode/utf8",
"strconv",
"internal/race",
"sync/atomic",
"sync",
"unicode",
"reflect",
"sort",
"fmt",
"github.com/mcoops/deplist",
"github.com/openshift/api/config/v1",
"golang.org/x/text/unicode",
"internal/abi",
"internal/bytealg",
"internal/cpu",
"internal/fmtsort",
"io",
"internal/goexperiment",
"internal/itoa",
"internal/oserror",
"syscall",
"time",
"internal/poll",
"internal/race",
"internal/reflectlite",
"internal/syscall/execenv",
"internal/syscall/unix",
"internal/testlog",
"internal/unsafeheader",
"io",
"io/fs",
"math",
"math/bits",
"os",
"fmt",
"path",
"io/fs",
"internal/unsafeheader",
"github.com/openshift/api/config/v1",
"golang.org/x/text/unicode",
"github.com/mcoops/deplist",
"reflect",
"runtime",
"runtime/internal/atomic",
"runtime/internal/math",
"runtime/internal/sys",
"sort",
"strconv",
"sync",
"sync/atomic",
"syscall",
"time",
"unicode",
"unicode/utf8",
"unsafe",
}

npmSet1 := []string{
Expand Down Expand Up @@ -203,8 +206,7 @@ func BuildWant() []Dependency {
deps = append(deps, d)
}

end := len(deps) - 2 // get the unicode ver
deps[end].Version = "v0.3.3"
deps[4].Version = "v0.3.3" // test golang.org/x/text/unicode version

for _, n := range npmSet1 {
d := Dependency{
Expand All @@ -231,7 +233,7 @@ func BuildWant() []Dependency {
deps = append(deps, d)
}

end = len(deps) - 2 // get the cryptography ver
end := len(deps) - 2 // get the cryptography ver
deps[end].Version = "0.5.1"

end = len(deps) - 1 // get the cryptography ver
Expand Down
8 changes: 6 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
module github.com/mcoops/deplist

go 1.16
go 1.17

require (
github.com/BurntSushi/toml v0.4.1
github.com/mcoops/jargo v1.0.1
github.com/mcoops/packageurl-go v0.2.0
github.com/sirupsen/logrus v1.8.1
golang.org/x/mod v0.4.2
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)

require (
github.com/vifraa/gopom v0.1.0 // indirect
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect
)
2 changes: 1 addition & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
4 changes: 2 additions & 2 deletions internal/scan/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ func runCmd(path string, mod bool) ([]byte, error) {
var cmd *exec.Cmd

if !mod {
cmd = exec.CommandContext(ctx, "go", "list", "-f", "'{{if not .Standard}}{{.Module}}{{end}}'", "-json", "-deps", "./...")
cmd = exec.CommandContext(ctx, "go", "list", "-json", "-deps", "./...")
} else {
vendorDir := filepath.Join(filepath.Dir(path), "vendor")
if _, err := os.Stat(vendorDir); err != nil {
if os.IsNotExist(err) {
return nil, errors.New("no 'vendor' directory, can't use '-mod=vendor'")
}
}
cmd = exec.CommandContext(ctx, "go", "list", "-mod=vendor", "-f", "'{{if not .Standard}}{{.Module}}{{end}}'", "-json", "-deps", "./...")
cmd = exec.CommandContext(ctx, "go", "list", "-mod=vendor", "-json", "-deps", "./...")
}

cmd.Dir = filepath.Dir(path) // // force directory
Expand Down
3 changes: 0 additions & 3 deletions vendor/github.com/BurntSushi/toml/go.mod

This file was deleted.

Empty file.
5 changes: 0 additions & 5 deletions vendor/github.com/mcoops/jargo/go.mod

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/github.com/mcoops/jargo/go.sum

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/mcoops/packageurl-go/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/github.com/sirupsen/logrus/go.mod

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/github.com/sirupsen/logrus/go.sum

This file was deleted.

5 changes: 0 additions & 5 deletions vendor/github.com/vifraa/gopom/go.mod

This file was deleted.

12 changes: 0 additions & 12 deletions vendor/github.com/vifraa/gopom/go.sum

This file was deleted.

5 changes: 0 additions & 5 deletions vendor/gopkg.in/yaml.v3/go.mod

This file was deleted.

13 changes: 7 additions & 6 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# github.com/BurntSushi/toml v0.4.1
## explicit
## explicit; go 1.16
github.com/BurntSushi/toml
github.com/BurntSushi/toml/internal
# github.com/mcoops/jargo v1.0.1
## explicit
## explicit; go 1.16
github.com/mcoops/jargo
# github.com/mcoops/packageurl-go v0.2.0
## explicit
## explicit; go 1.16
github.com/mcoops/packageurl-go
# github.com/sirupsen/logrus v1.8.1
## explicit
## explicit; go 1.13
github.com/sirupsen/logrus
# github.com/vifraa/gopom v0.1.0
## explicit; go 1.15
github.com/vifraa/gopom
# golang.org/x/mod v0.4.2
## explicit
## explicit; go 1.12
golang.org/x/mod/semver
# golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e
## explicit
## explicit; go 1.17
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
golang.org/x/sys/windows
Expand Down