Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates go architecture doc based on what was found in implementation #864

Closed
wants to merge 1 commit into from

Conversation

nellshamrell
Copy link
Contributor

I found that original proposed structure for coordinates wasn't going to work well with the vanity import paths/urls that Go allows for. This updates the architecture to better accommodate those paths.

Signed-off-by: Nell Shamrell [email protected]

* `code.cloudfoundry.org/clock v1.0.0` maps to `go/code.cloudfoundry.org/-/clock/v1.0.0`
* `go.uber.org/multierr v1.6.0` maps to `go/go.uber.org/-/multierr/v1.6.0`
* `github.com/project/package v1.2.3` maps to `go/github.com/project/package/v1.2.3`
* `golang.org/x/net v0.0.0-20210226172049-e18ecbb05110` maps to `go/golang.org.x/net/v0.0.0-20210226172049-e18ecbb05110`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be go/golang.org/x/net/v0.0.0-20210226172049-e18ecbb05110 i think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah- typo!

@jeffmendoza
Copy link
Member

Just a note: This isn't a result of vanity import paths. A Go module can live anywhere on the web, a module of mydomain.com/package could very well be the literal git repo url, and not a redirect.

Modules can still have multiple directories in the path between the host and final name of the package. ex: domain.com/long/path/go-package. The slash in "long/path" will need to be encoded to be a valid ClearlyDefined "namespace".

Also, periods are valid in url's as well domain.com/project.xyz/v2/package. "project.xyz/v2" will need to encoded in a way that can be deterministically un-encoded.

@nellshamrell
Copy link
Contributor Author

@jeffmendoza- ty so much for your input on this! I can definitely see your point, there - we may have no choice but to do some url encoding in the case of go components - I don't currently see any other way around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants