mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
s/will/can lead to/
parent
12b2d165b1
commit
2b0e320f25
@ -385,7 +385,7 @@ There are two alternative mechanisms to release a v2 or higher module. Note that
|
||||
* Go versions 1.9.7+, 1.10.3+, and 1.11 are able to properly consume and build a v2+ module created using this approach without requiring updates to consumer code that has not yet opted in to modules (as described in the the ["Semantic Import Versioning"](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) section above).
|
||||
* A community tool [github.com/marwan-at-work/mod](https://github.com/marwan-at-work/mod) helps automate this procedure. See the [repository](https://github.com/marwan-at-work/mod) or the [community tooling FAQ](https://github.com/golang/go/wiki/Modules#what-community-tooling-exists-for-working-with-modules) below for an overview.
|
||||
* To avoid confusion with this approach, consider putting the `v3.*.*` commits for the module on a separate v3 branch.
|
||||
* **Note:** creating a new branch is _not_ required. If instead you have been previously releasing on master and would prefer to tag `v3.0.0` on master, that is a viable option. _However_, be warned that this will break pre-1.11 users who still use `go get`, since any `go get -u` will bring in the latest change irrespective of major bumps.
|
||||
* **Note:** creating a new branch is _not_ required. If instead you have been previously releasing on master and would prefer to tag `v3.0.0` on master, that is a viable option. _However_, be warned that this can lead to breaking pre-1.11 users who still use `go get`, since any `go get -u` will bring in the latest change irrespective of major bumps.
|
||||
|
||||
2. **Major subdirectory**: Create a new `v3` subdirectory (e.g., `my/module/v3`) and place a new `go.mod` file in that subdirectory. The module path must end with `/v3`. Copy or move the code into the `v3` subdirectory. Update import statements within the module to also use `/v3` (e.g., `import "github.com/my/module/v3/mypkg"`). Tag the release with `v3.0.0`.
|
||||
* This provides greater backwards compatibility. In particular, Go versions older than 1.9.7 and 1.10.3 are also able to properly consume and build a v2+ module created using this approach.
|
||||
|
Loading…
x
Reference in New Issue
Block a user