Repository's go vanity url #23
Unanswered
asimpleidea
asked this question in
Ideas
Replies: 1 comment
-
We already have the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone,
I was thinking about something that I have been seeing commonly for other go projects around.
Every (modern) go project has a
mod
file that defines the dependencies that project needs. On top of this file you can see the name of the project as a repository, i.e.github.com/CloudNativeSDWAN/cnwan-operator
.You use this to pull the repository from other go file as a dependency, example:
or from bash when downloading for local use, example:
Go supports what are called vanity urls, which are a way to call your repository as you want, even if the page does not really exist, just as long as it can point to an existing git repository, i.e. with a redirect.
For example, Kubernetes has
k8s.io
, so when you load packages from go code you would do something likeor when you download it through shell:
even if the code is on github, or with etcd
I didn't dig too much on the ways to do this exactly because it's not really the point of this topic.
The reason why I start this discussion is because I think it would be nice and better looking (and a bit more serious/professional?) if in future CN-WAN repositories were using vanity urls as well, like
go.cnwan.io/operator/service-registry
orcnwan.cisco.com/reader
. One advantage about this, but it doesn't matter to us, is that if we decide to move the repositories somewhere else from github, then it would be just a matter of changing the redirection to point to the new website and whole thing would be totally transparent.So yeah the whole thing is just a matter of vanity 😝
Beta Was this translation helpful? Give feedback.
All reactions