feat: Move common selectors to cmd/root.go - #53
Merged
Conversation
sestrella
commented
Feb 13, 2026
Owner
- refactor: Initialize AWS client and selectors in root command
- refactor: remove unused cluster and service selectors
- refactor: Rename root command flags and variables
- fix: Use global variables for client and selectors
This commit renames several variables and flags related to the root command to be more descriptive. The changes include: - Renaming `awsClient` to `rootClient` - Renaming `selectors` to `rootSelectors` - Renaming `clusterStr` to `rootClusterStr` - Renaming `cluster` to `rootCluster` - Renaming `serviceStr` to `rootServiceStr` - Renaming `service` to `rootService` These changes improve the clarity and maintainability of the codebase by making the purpose of these variables and flags more explicit.
This commit introduces global variables `rootClient` and `rootSelectors` to store the AWS client and selectors respectively. This allows these variables to be accessed and used across different commands within the application. Additionally, the commit refactors the cluster and service selection logic to use these global variables, ensuring consistency and simplifying the code. The regular expression compilation for cluster and service strings is also improved to prevent potential errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.