The `vendor` directory that go mod targets for caching third party code, is unfortunately not programming language agnostic.
When Go and Rust are used in tandem, then go mod becomes confused. In situations where only Rust vendoring is applied, then go mod sees a vendor directory, assumes it is Go code, then aborts.
Please migrate to a language specific directory name, such as vendor-go.
As a workaround, use cargo primitives to customize the Rust vendor directory name.
Note that go mod currently lacks the ability to customize this name.
Cross post to Rust forum topic: Request: better namespacing for vendor/ directory - The Rust Programming Language Forum