I would like Alan to take a look before merge, so I put his CL on hold.
I read rsc@'s [proposal](https://github.com/golang/go/issues/61716) and [blog post](https://go.dev/blog/randv2) especially the [principles](https://go.dev/blog/randv2#principles) section. I think the practice of `path/to/package/v2` should be extensible outside of Go Standard Library.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
// TrimVersionSuffix removes a trailing "/v2" (etc) suffix from a package or module path.nit: "any" or "a possible"
func TrimVersionSuffix(path string) string {Kinda feels like this should be apart of the go repo since it actually represents the import variable used for a package path. But that can be moved later if desired.
func TestTrimVersionSuffix(t *testing.T) {In https://go.dev/ref/mod#major-version-suffixes, it mentions the special case for modules in "gopkg.in/".
Would the import of `gopkg.in/yaml.v2` allow users to call it with the ident "yaml" by default? If so, we might want to cover that too.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Hold | +1 |
// TrimVersionSuffix removes a trailing "/v2" (etc) suffix from a package or module path.nit: "any" or "a possible"
Done
Kinda feels like this should be apart of the go repo since it actually represents the import variable used for a package path. But that can be moved later if desired.
When you say "go" repo, you mean golang/go? I think right now, at least for packages, it is not written as a rule yet, if such rule is written, it may be better to move it to go repo.
Until such is written, keeping it here can keep it "private".
In https://go.dev/ref/mod#major-version-suffixes, it mentions the special case for modules in "gopkg.in/".
Would the import of `gopkg.in/yaml.v2` allow users to call it with the ident "yaml" by default? If so, we might want to cover that too.
Thank you. I learned something today. Looks like this is old history of go when go support go path mode. I added a TODO here for myself.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |