Skip to content

Route command output through return values instead of printing directly #296

@digitalghost-dev

Description

@digitalghost-dev

Some commands print straight to stdout/stderr instead of returning their output, which splits the (string, error) contract and makes the output untestable.

Areas to update:

  • types/DamageTable: return (string, error), threaded through TypesCommand
  • search: surface fetch errors via WarningMessage instead of fmt.Printf() in Update
  • pokemon: return wrapped image-download errors instead of printing them
  • cli: currentVersion() returns a string

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorRefactoring existing code.

    Projects

    Status
    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions