You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently go mod vendor copies all files in a package except:
files whose name ends with _test.go
files named go.mod and go.sum
files whose names ends with .go and contain a go:build ignore constraint
This means that other random files are copied into the vendored directory. For example, the vendored golang.org/x/sys/unix in the main repo includes mkall.sh, mkerrors.sh, and README.md. There is no reason to vendor those files.
I propose that we change go mod vendor to only copy files that go build recognizes. This is files that end with .go, .c, .cxx, .swig, and so forth. Making this change would also require go mod vendor to look for go:embed directives and copy over all files that they mention (for example, the vendored files in GOROOT/src/cmd/vendor/github.com/google/pprof/internal/driver/html).