-
Notifications
You must be signed in to change notification settings - Fork 23
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
Improve how --output
works
#54
Comments
Is it up for grabs? May I take it? |
go for it @SuddenGunter 👍🏽 |
ok |
@britneywright @mdb I'm stuck, need your opinion how it would be better to approach this.
2 Use dependency injection. From my POV it would be the best approach here.
For 2nd approach we could use some DI package like Wire with it's codegen or dig, or do it manually - we need simple type->func mapping and one 'if' statement |
@SuddenGunter It's a bit difficult to comment in too much depth without seeing your Alternatively, I defer to you to assess what you think is the best candidate and we can vet it together in code review. Taking a step back, I do think my ideal solution balances simplicity, elegance, and future scenarios where it may be desirable to add additional output formats, such as CSV, XML, etc. |
@mdb pls unassign this from me, would be able to fix it in close time |
Currently, many of the command functions have logic like this to determine the correct output. It might be good to re-imagine how this could work in a more elegant way that wouldn't require repetitive
if
checks in each function.The text was updated successfully, but these errors were encountered: