From 21a74424c7cfaa82fdc9f55a1d00f979ee5cf454 Mon Sep 17 00:00:00 2001 From: gonejack Date: Mon, 11 May 2020 12:08:42 +0800 Subject: [PATCH] go-mod: apply suggestions Signed-off-by: gonejack --- pages/common/go-mod.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pages/common/go-mod.md b/pages/common/go-mod.md index bf0a99ca3d..c02d2925c7 100644 --- a/pages/common/go-mod.md +++ b/pages/common/go-mod.md @@ -1,7 +1,11 @@ # go mod -> Tool for module maintenance. -> More information: . +> Module maintenance. +> More information: . + +- Initialize new module in current directory: + +`go mod init {{moduleName}}` - Download modules to local cache: @@ -11,6 +15,10 @@ `go mod tidy` -- Copy all dependencies into vendor directory: +- Verify dependencies have expected content: + +`go mod verify` + +- Copy all dependencies sources into vendor directory: `go mod vendor`