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

cmd/unused: refactor UI.Display to accept UI options #14

Closed
inkel opened this issue May 5, 2022 · 1 comment
Closed

cmd/unused: refactor UI.Display to accept UI options #14

inkel opened this issue May 5, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@inkel
Copy link
Collaborator

inkel commented May 5, 2022

Currently we have two UI options:

  1. verbose mode enabled
  2. additional columns to show

But the ui.UI defines only one method: Display(ctx context.Context, disks unused.Disks, extraColumns []string) error. Here clearly the verbose mode option is missing, and we're relying on passing that to the different ui.UI implementation constructors.

In the future we also might introduce more UI options, so let's do the following changes:

  • add a ui.Options or similar struct to hold these configurations
  • change UI.Display signature to something like Display(context.Context, ui.Options, unused.Disks) error
@inkel inkel added enhancement New feature or request good first issue Good for newcomers labels May 5, 2022
@inkel
Copy link
Collaborator Author

inkel commented Jun 1, 2022

This was addressed in #19.

@inkel inkel closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant