From 205312ef3c3de00ee8a3fb8955e3007fdbe18f5b Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Wed, 4 Aug 2021 14:41:59 +0100 Subject: [PATCH] Add alternative to add replace directive to go.mod --- go.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/go.md b/go.md index d3f6269..a57dbaf 100755 --- a/go.md +++ b/go.md @@ -40,6 +40,12 @@ go get golang.org/x/tools/cmd/godoc go mod edit -replace old.repo/location=../new/location ``` +or + +``` +echo "old.repo/location => ../new/location" >> go.mod +``` + > The `-replace=old[@v]=new[@v]` flag adds a replacement of the given > module path and version pair. If the @v in old@v is omitted, a > replacement without a version on the left side is added, which applies