Run go mod vendor to copy all dependencies from go.mod into a local vendor directory for offline builds.
Vendor dependencies are managed by adding a vendor directory to your project root containing copies of required external packages. To populate this directory, run the following command in your project root:
go mod vendor
This command copies all dependencies listed in your go.mod file into the vendor directory, allowing your project to build without network access.
Vendor dependencies means keeping a local copy of every external library your project needs inside your own code folder. This ensures your project builds exactly the same way on every computer, even if the original library changes or the internet is down. Think of it like packing all your ingredients in a box before leaving the kitchen, so you don't need to go back to the store.