go mod
Module maintenance. More information: https://golang.org/cmd/go/#hdr-Module_maintenance.
-
Initialize new module in current directory:
go mod init {{moduleName}} -
Download modules to local cache:
go mod download -
Add missing and remove unused modules:
go mod tidy -
Verify dependencies have expected content:
go mod verify -
Copy sources of all dependencies into the vendor directory:
go mod vendor
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.