mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-08 09:57:29 +00:00
Update cheatsheets
This commit is contained in:
29
go-mod
Normal file
29
go-mod
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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`
|
||||
Reference in New Issue
Block a user