When the main module contains a top-level vendor directory and
its go.mod file specifies go 1.14 or
higher, the go command now defaults to -mod=vendor
for operations that accept that flag. A new value for that flag,
-mod=mod, causes the go command to instead load
modules from the module cache (as when no vendor directory is
present).
When -mod=vendor is set (explicitly or by default), the
go command now verifies that the main module's
vendor/modules.txt file is consistent with its
go.mod file.
I checked it with Go SDK 1.14 beta 1, and it seems the go command doesn't behave as the above described.
After I run "go mod vendor", all the dependencies are placed under the vendor folder with a modules.txt file.
Then I remove all cached modules from GOPATH and disconnect the network, and run "go build" again,
the command still tries to connect network to download the dependency modules and it fails for sure.
But "go build -mod=vendor" runs okay. Isn't "go build" equivalent to "go build -mod=vendor" since Go SDK 1.14?
Beside this, would this break the semantic of the vendor folder?
Now, for many of my projects, I use the vendor folder as a package-search-priority folder.
I have modified some packages in the vendor, and many of the packages have disappeared from the internet.
Is there a way to let these projects continue compiling okay with Go SDK 1.14+?