snippetbashTip
go mod — Module maintenance. More information: <https://pkg.go.dev/cmd/go#hdr-Module_maintenance>.
Viewed 0 times
httpsmodulemaintenancecommandgo modcliinformationmore
Problem
How to use the
go mod command: Module maintenance. More information: <https://pkg.go.dev/cmd/go#hdr-Module_maintenance>.Solution
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 downloadAdd missing and remove unused modules:
go mod tidyVerify dependencies have expected content:
go mod verifyCopy sources of all dependencies into the vendor directory:
go mod vendorCode Snippets
Initialize new module in current directory
go mod init {{moduleName}}Download modules to local cache
go mod downloadAdd missing and remove unused modules
go mod tidyVerify dependencies have expected content
go mod verifyCopy sources of all dependencies into the vendor directory
go mod vendorContext
tldr-pages: common/go mod
Revisions (0)
No revisions yet.