Skip to content

Conversation

zubron
Copy link
Contributor

@zubron zubron commented Feb 10, 2020

This introduces a number of changes to enable the WhoCan type to be
used in external projects. The WhoCan type is exported, and functions
are introduced to allow instances of WhoCan and Action to be
created. It also modifies the Check function to no longer call
output to display the results. Instead, Check returns the role
bindings that enable an action to be performed. The call to output now
takes place in the run function for the command.

Overall, this results in no functional changes to the kubectl-who-can
program, but allows it to be imported and used from other projects.

Signed-off-by: Bridget McErlean bmcerlean@vmware.com

This introduces a number of changes to enable the `WhoCan` type to be
used in external projects. The `WhoCan` type is exported, and functions
are introduced to allow instances of `WhoCan` and `Action` to be
created. It also modifies the `Check` function to no longer call
`output` to display the results. Instead, `Check` returns the role
bindings that enable an action to be performed. The call to `output` now
takes place in the run function for the command.

Overall, this results in no functional changes to the `kubectl-who-can`
program, but allows it to be imported and used from other projects.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
@codecov-io
Copy link

codecov-io commented Feb 10, 2020

Codecov Report

Merging #58 into master will decrease coverage by 2.51%.
The diff coverage is 26.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
- Coverage    74.8%   72.29%   -2.52%     
==========================================
  Files           5        5              
  Lines         381      397      +16     
==========================================
+ Hits          285      287       +2     
- Misses         84       95      +11     
- Partials       12       15       +3
Impacted Files Coverage Δ
pkg/cmd/list.go 59.91% <26.47%> (-3.44%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d9748c...909dc3b. Read the comment docs.

@danielpacak danielpacak self-requested a review February 16, 2020 08:35
Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
@danielpacak danielpacak merged commit 6ed7204 into aquasecurity:master Feb 16, 2020
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.

3 participants