Skip to content

Change if-else to switch statement #142

@digitalghost-dev

Description

@digitalghost-dev

For cleaner syntax, change the large if-else block in cli.go to a switch statement.

Switching to a switch statement would improve:
• Readability — Cleaner and easier to scan than deeply nested if-else blocks
• Maintainability — Simpler to add new cases or rearrange existing ones
• Go idiomatic style — switch is the preferred control structure for branching in Go when dealing with multiple conditions based on a single value

This change is purely structural and shouldn’t affect functionality.

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