Skip to content

feat: Move common selectors to cmd/root.go - #53

Merged
sestrella merged 4 commits into
mainfrom
refactor_root_cmd
Feb 13, 2026
Merged

feat: Move common selectors to cmd/root.go#53
sestrella merged 4 commits into
mainfrom
refactor_root_cmd

Conversation

@sestrella

Copy link
Copy Markdown
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.
@sestrella
sestrella marked this pull request as ready for review February 13, 2026 03:22
@sestrella
sestrella merged commit c116900 into main Feb 13, 2026
2 checks passed
@sestrella
sestrella deleted the refactor_root_cmd branch February 13, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant