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

Expose funcs to allow for subcommand decomposition #964

Closed
wants to merge 2 commits into from

Conversation

dfreilich
Copy link
Member

Signed-off-by: David Freilich dfreilich@vmware.com

Summary

A number of the funcs in the commands package are private, which creates issues when trying to decompose the package into subcommands, as part of #597. This exposes a number of funcs, to ensure that further PRs (such as #959 and #962) will be easier to merge in.

Documentation

  • Should this change be documented?
    • No

Related

…ng to subcommands

Signed-off-by: David Freilich <dfreilich@vmware.com>
@dfreilich dfreilich added the type/chore Issue that requests non-user facing changes. label Nov 25, 2020
@dfreilich dfreilich added this to the 0.16.0 milestone Nov 25, 2020
@dfreilich dfreilich requested a review from a team as a code owner November 25, 2020 09:37
This was referenced Nov 25, 2020
Signed-off-by: David Freilich <dfreilich@vmware.com>
@codecov
Copy link

codecov bot commented Nov 25, 2020

Codecov Report

Merging #964 (fb2e983) into main (f85ce47) will decrease coverage by 0.01%.
The diff coverage is 98.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #964      +/-   ##
==========================================
- Coverage   77.67%   77.67%   -0.00%     
==========================================
  Files         103      103              
  Lines        5006     5009       +3     
==========================================
+ Hits         3888     3890       +2     
- Misses        724      725       +1     
  Partials      394      394              
Flag Coverage Δ
os_linux 77.67% <98.08%> (-<0.01%) ⬇️
os_macos 74.65% <98.08%> (-<0.01%) ⬇️
os_windows 100.00% <ø> (?)
unit 77.67% <98.08%> (-<0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@dfreilich
Copy link
Member Author

dfreilich commented Nov 30, 2020

@jromero This PR (and the connected ones) depend on the resolution of your comment here: #959 (comment)

What's the value or reasoning for stack to be its own package outside of commands? It smells like an anti-pattern but maybe I'm missing something.

Personally, I feel like it's useful for the related commands to be in their own directory. It makes the command structure a bit cleaner, in my eyes, though I do recognize that in general, go practices are ok with large flat structures.

@dfreilich dfreilich closed this Dec 1, 2020
@dfreilich dfreilich deleted the general-subcommand-fixes branch December 1, 2020 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore Issue that requests non-user facing changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant