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
refactor utils #373
Comments
I propose struct like here: https://github.com/krhubert/gox We have already xpflag in our repo. Maybe add
|
i like the name x instead using util but is there any meaning of x anyway? |
yep x stands for eXtension and it's there to not get the same name for 2 pkgs (also importing git pkg into git pkg - or any other pkg name - can lead to ugly/error-prone code). I preffer |
i like the x name but i also like to stay package agnostic while naming x packages. in this context xgit should be getting its name because it's related with Git, not for extending a feature of github.com/src-d/go-git. this way we can also put generic utils under x package without worrying about if its name fits with a existing package. |
i see that we have quite a lot utils.go, utils package inside the project. i think we should reduce them and serve under a root level utils package as possible but use different package names for each different util under utils/ e.g.:
lets also give a second check to this article about package namings: https://blog.golang.org/package-names
related with this comment.
The text was updated successfully, but these errors were encountered: