Add alternative to add replace directive to go.mod

This commit is contained in:
Akbar Rahman 2021-08-04 14:41:59 +01:00
parent 6c3f86dd56
commit 6df5338c35

6
go.md
View File

@ -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