-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
base: master
Are you sure you want to change the base?
Conversation
command.go
Outdated
keys := []string{} | ||
|
||
switch cmd.Name() { | ||
case "mget": |
There was a problem hiding this comment.
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.
No description provided.