1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-04 12:15:23 +02:00
tldr/pages/common/go-mod.md
2025-06-28 15:06:36 -07:00

24 lines
436 B
Markdown

# go mod
> Module maintenance.
> More information: <https://pkg.go.dev/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`