This just bit me, because it isn't copying required cc source files from a parent directory of the package, leading to the cgo library not being able to build:
library
cpp/
source1.cpp
go/
lib.go
inc.cpp
For better or worse, inc.cpp has had '#include "../cpp/source1.cpp"' in it, and it has been working under glide as the whole project gets vendored. But now under "go mod vendor" it throws away the non-go files leading to missing cpp files. Is this intended behaviour, expecting that the Go source should have everything it needs as siblings or children in the directory structure?