how to safely rename an unreleased golang libray repo #144330
-
Select Topic AreaQuestion BodyI know the basic operation of renaming a repo on Github by going to the project settings. My query is specifically about golang library modules. I am asking this to try and avoid any unforseen catastrophes I might not be aware of. The reason for my concern is the 'unique' way that Go lang modules uses a url as part of the identity of a repo that is not present in other eco systems; ie the mod file. Since my library is not released yet, I do not have to worry about affecting downstream users (otherwise I would not even consider doing a rename) and because of this I do actually think there will be no problem, but I would prefer to be safe than sorry. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
@manqur where has your comment gone? I am in the process of doing the rename and I wanted to refer to your checklist which has now disappeared. Why? |
Beta Was this translation helpful? Give feedback.
-
Ok, once again @manqur your comments have disappeared mysteriously after being being restored for a short while. My workflow for this scenario was sligtly complicated by the fact that I also wanted to make sure that my coverage setup on coveralls was maiintained after the rename. Just to re-iterate, I was able to rename in this fashion because my package was unreleased and therefore did not have to worry about the potential for breaking downstream clients; do not do this if this is not the case for you. Also, try this out on a test repo first so you have gained some experience. Also, this assume the pull request model for accepting changes to the repo. These are the steps a ended up following (rename ✨ on a new branch:
NB: in this sceanrio, it's not neccesary to perform a clean of of the local go package cache ( So in summary, the risk factors of renaming a golang library package turned out not to be significant. In fact the biggest risk item in acheiving this was making sure that coveralls coverage history is maintained and this is not specific to golang, no special action is required on coveralls, other than to perform a refresh. As long a you dont have downstream clients, renaming a Go module should be a fairly trivial task. |
Beta Was this translation helpful? Give feedback.
Ok, once again @manqur your comments have disappeared mysteriously after being being restored for a short while. My workflow for this scenario was sligtly complicated by the fact that I also wanted to make sure that my coverage setup on coveralls was maiintained after the rename. Just to re-iterate, I was able to rename in this fashion because my package was unreleased and therefore did not have to worry about the potential for breaking downstream clients; do not do this if this is not the case for you. Also, try this out on a test repo first so you have gained some experience. Also, this assume the pull request model for accepting changes to the repo.
These are the steps a ended up follo…