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

Rename lib/cloud/aws/config to lib/cloud/awsconfig #50254

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

GavinFrazar
Copy link
Contributor

This is a package we recently added as part of an AWS SDK v1->v2 migration effort, but I think the package name "config" is just too generic.
There are already several "config" package in our repo and in our dependencies.

The reason I singled out this package for renaming is because I want to use it in more and more packages as I migrate them to AWS SDK v2, and I kept having to rename the import.
I'd like to just rename it now while there's a tiny number of packages that depend on this package.

https://go.dev/blog/package-names#package-names

The name of the package is a critical piece of its design. Work to eliminate meaningless package names from your projects.

Don’t use a single package for all your APIs. Many well-intentioned programmers put all the interfaces exposed by their program into a single package named api, types, or interfaces, thinking it makes it easier to find the entry points to their code base. This is a mistake. Such packages suffer from the same problems as those named util or common, growing without bound, providing no guidance to users, accumulating dependencies, and colliding with other imports. Break them up, perhaps using directories to separate public packages from implementation.

Avoid unnecessary package name collisions. While packages in different directories may have the same name, packages that are frequently used together should have distinct names. This reduces confusion and the need for local renaming in client code. For the same reason, avoid using the same name as popular standard packages like io or http.

@GavinFrazar GavinFrazar added the no-changelog Indicates that a PR does not require a changelog entry label Dec 14, 2024
@GavinFrazar GavinFrazar requested review from zmb3 and greedy52 December 14, 2024 01:01
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/rename-aws-config-package branch from f44e0fa to f4b3f6b Compare December 14, 2024 01:03
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/rename-aws-config-package branch from f4b3f6b to 0fad742 Compare December 16, 2024 17:37
@GavinFrazar GavinFrazar added this pull request to the merge queue Dec 16, 2024
Merged via the queue into master with commit 228c1c9 Dec 16, 2024
41 checks passed
@GavinFrazar GavinFrazar deleted the gavinfrazar/rename-aws-config-package branch December 16, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discovery no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants