[Refactor][kubectl-plugin] Rename filenames and variables based on kubectl repo #2295
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.
Why are these changes needed?
This PR renames filenames and variables using the top command in the kubectl repo as a reference.
I find some variable naming will cause problem when implementing sub-commands of the
kubectl ray cluster
command. For example, because herekuberay/kubectl-plugin/pkg/cmd/cluster/get.go
Lines 19 to 24 in 6c1c16e
the options struct is named
ClusterOptions
, if a new commandkubectl ray cluster session
needs to be implemented, it cannot use the nameClusterOptions
because they both belong to the same packagecluster
. By renaming this toClusterGetOptions
, thesession
command can name its options asClusterSessionOptions
, which prevents the naming conflict and ensures consistent variable naming style.Related issue number
N/A
Checks