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

Golang util, helper, ambiguous package naming #409

Open
pwdel opened this issue Nov 21, 2024 · 0 comments
Open

Golang util, helper, ambiguous package naming #409

pwdel opened this issue Nov 21, 2024 · 0 comments

Comments

@pwdel
Copy link
Member

pwdel commented Nov 21, 2024

From style decisions document:

https://google.github.io/styleguide/go/decisions

Go packages have a name specified on the package declaration, separate from the import path. The package name matters more for readability than the path.
Go package names should be related to what the package provides. Naming a package just util , helper , common or similar is usually a poor choice (it can be used as part of the name though). Uninformative names make the code harder to read, and if used too broadly they are liable to cause needless import conflicts.
Instead, consider what the callsite will look like.

@pwdel pwdel converted this from a draft issue Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant