What happened?
When running go mod vendor and then adding //go:generate go run -mod=vendor github.com/99designs/gqlgen to the top of my resolver.go file when I try and run go generate -mod=vendor ./... I get the following error
package github.com/99designs/gqlgen: no Go files in /Users/shi03/code/projects/gs/common-api/vendor/github.com/99designs/gqlgen
What did you expect?
I expected the go generate -mod=vendor ./... to re-generate the gql generated files.
Minimal graphql.schema and models to reproduce
versions
gqlgen version? v0.9.1
go version? go version go1.12.6 darwin/amd64
- dep or go modules? go modules
Unsure if this is an error on my end. But because I vendor all my dependancies when running any Go commands I add the -mod=vendor flag[1] to every command so that Go using the dependancies inside the vendor folder rather than the cache/downloading them.
[1] - https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away
What happened?
When running
go mod vendorand then adding//go:generate go run -mod=vendor github.com/99designs/gqlgento the top of myresolver.gofile when I try and rungo generate -mod=vendor ./...I get the following errorWhat did you expect?
I expected the
go generate -mod=vendor ./...to re-generate the gql generated files.Minimal graphql.schema and models to reproduce
versions
gqlgen version? v0.9.1go version? go version go1.12.6 darwin/amd64Unsure if this is an error on my end. But because I vendor all my dependancies when running any Go commands I add the
-mod=vendorflag[1] to every command so that Go using the dependancies inside the vendor folder rather than the cache/downloading them.[1] - https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away