mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Add a note about referencing branches
parent
26a3fe0808
commit
d6ab341360
@ -746,6 +746,9 @@ The `replace` directive allows you to supply another import path that might be a
|
||||
`replace` also allows the use of a forked dependency, such as:
|
||||
* `replace example.com/some/dependency => example.com/some/dependency-fork v1.2.3`
|
||||
|
||||
You can also reference branches, for example:
|
||||
* `replace example.com/some/dependency => example.com/some/dependency-fork master`
|
||||
|
||||
One sample use case is if you need to fix or investigate something in a dependency, you can have a local fork and add the something like the following in your top-level `go.mod`:
|
||||
* `replace example.com/original/import/path => /your/forked/import/path`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user