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

Return keys from commands #3130

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

ofekshenawa
Copy link
Collaborator

No description provided.

command.go Outdated
keys := []string{}

switch cmd.Name() {
case "mget":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach isn't scalable, each time we need a new type of extracting we have to add a command here. Cmder is an interface that should be abstract as possible and should not contain any implementation specific (mget is an implementation specific in this case).

Cmder should return a keys, but shouldn't be aware about the keys position of specific command (this is implementation details), instead the specific command that implements this interface should define keys position for itself.

command.go Show resolved Hide resolved
string_commands.go Show resolved Hide resolved
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.

2 participants