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

Switch to dependency injection for the main CLI #6331

Merged
merged 2 commits into from
Oct 7, 2024

Commits on Oct 7, 2024

  1. Switch to dependency injection for the main CLI

    Sets up some foundations for the coming coverage sprint:
    - a standard way to inject dependencies into this CLI app (via app.Metadata)
    - a standard way to read and write CLI text (not yet used, but hopefully the intent is clear enough)
    - many more error returns to cover the new branches
    
    Next steps are roughly:
    - write tests!
    - remove all `fmt.*Print*` calls and use the appropriate output writer instead.
      - this will expose more error branches: we should be using them, as output can fail if a pipe fails.
    - remove all stdin-reading calls, and use the input reader instead
      - this will allow us to answer prompts / continue paging in tests
    Groxx committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    f6fd597 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f326478 View commit details
    Browse the repository at this point in the history