You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: