Add alternative to add replace directive to go.mod
This commit is contained in:
parent
cb82c51f8c
commit
205312ef3c
6
go.md
6
go.md
@ -40,6 +40,12 @@ go get golang.org/x/tools/cmd/godoc
|
|||||||
go mod edit -replace old.repo/location=../new/location
|
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
|
> 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
|
> 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
|
> replacement without a version on the left side is added, which applies
|
||||||
|
Loading…
Reference in New Issue
Block a user