Open AkihiroSuda opened 4 years ago
~Looks like the package for parsing gomod is "internal" 😞 https://golang.org/pkg/cmd/go/internal/modfile/~
~Looking at other projects, there are valid use-cases to use that package though, for example; I found this project to run a go proxy, which looks to copy those files in order to use them; https://github.com/sirkon/goproxy/blob/bac7c5e34d4e2ec415275c4f2ddc5c1c86e74fd6/internal/modfile/read.go. Haven't looked yet, but perhaps we should propose that package to not be marked "internal"~
nevermind: looks like it moved to golang.org/x/mod
: https://github.com/golang/mod/blob/c90efee705eefc6efa975842f5e85f455b0b4639/modfile/read.go
@AkihiroSuda that's a bummer. I wonder if it's easy to detect and produce warnings. Thanks for taking a look.
Result:
Expected result:
Note:
github.com/containerd/cgroups
invendor.conf
MUST NOT contain/v2
suffix becausev2
is a git subdirectory, not a version string ingo.mod
github.com/coreos/go-systemd/v22
MUST contain/v22
suffix becausev22
is a version string ingo.mod
, not a git subdirectoryI'm not sure how we can support this without parsing
go.mod
.vndr version 0.1.0