-
Notifications
You must be signed in to change notification settings - Fork 81
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
refactor: Resolve action from cmd flags and args #62
refactor: Resolve action from cmd flags and args #62
Conversation
Codecov Report
@@ Coverage Diff @@
## master #62 +/- ##
==========================================
- Coverage 73.02% 70.36% -2.67%
==========================================
Files 5 5
Lines 393 388 -5
==========================================
- Hits 287 273 -14
- Misses 91 99 +8
- Partials 15 16 +1 Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #62 +/- ##
==========================================
- Coverage 73.02% 70.54% -2.49%
==========================================
Files 5 5
Lines 393 387 -6
==========================================
- Hits 287 273 -14
- Misses 91 99 +8
Partials 15 15
Continue to review full report at Codecov.
|
pkg/cmd/list.go
Outdated
err = fmt.Errorf("resolving resource: %v", err) | ||
return | ||
} | ||
glog.V(3).Infof("Resolved resource `%s`", w.resource) |
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.
Even if w.resource
is empty, this message will be shown, right? The current implementation doesn't display it.
https://github.com/aquasecurity/kubectl-who-can/pull/62/files#diff-7f1690f58d7299440bd878e1c25d001bL188
Is it OK?
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.
Even if
w.resource
is empty, this message will be shown, right? The current implementation doesn't display it.
https://github.com/aquasecurity/kubectl-who-can/pull/62/files#diff-7f1690f58d7299440bd878e1c25d001bL188Is it OK?
Good catch. Thank you. It doesn't harm, but I reverted it anyway to only invoke ResourceResolver for Kubernetes resources. It doesn't make sense to call resolver for NonResourceURL args.
Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
This is an intermediate step to finally have the API as follows: