Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor main.go to modular subcommands in commands/ directory #19

@ayakut16

Description

@ayakut16

The current main.go in cmd/mcptools is becoming large and harder to maintain, as it contains the logic for all MCP subcommands. To improve readability, maintainability, and testability, we should refactor the code into smaller chunks by moving each subcommand into its own file under a new commands/ directory.

Proposed structure:

cmd/mcptools/
    - main.go
    - main_test.go
    commands/
      - tools.go
      - prompts.go
      .
      .
      .

@f wdyt? Since it's a fairly big refactor, I wanted to open an issue before sending a PR — I also have a proof of concept commit (fully generated by Claude, though I haven’t reviewed it yet).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions