1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-28 20:44:54 +02:00
tldr/pages/common/go-mod.md
gonejack 21a74424c7
go-mod: apply suggestions
Signed-off-by: gonejack <igonejack@gmail.com>
2020-05-21 12:30:24 +01:00

430 B

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 all dependencies sources into vendor directory:

go mod vendor