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 cb82c51f8c
commit 205312ef3c
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

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