With the vendoring mode enabled, you build your application only with dependency packages that are stored inside your project under the vendor directory. In this mode, Go commands ignore dependency descriptions in go.mod and assume that the vendor directory holds the correct copies of dependencies. By default, when you use Go modules, the vendor directory is ignored during the build.

In settings of the Go modules project, navigate to Go | Go modules. Select the Vendoring mode checkbox and click OK.

Vendoring mode