Skip to content

Add helper functions for pokemon command #272

@digitalghost-dev

Description

@digitalghost-dev

The PokemonCommand() function has several inline anonymous functions that aren't easily testable or readable.

The functions will move to standalone package-level functions in a new cmd/pokemon/render.go file.

Each function now accepts the relevant struct as a parameter instead of closing over variables in the outer scope, making them independently testable without going through the full command.

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