refactor: split commands.go into per-command files#40
Conversation
Split the 2354-line monolithic commands.go into 11 focused files: - version.go: Version vars, RunVersion, RunClaudeUpdate, RunSelfUpdate, checkForUpdates - select.go: RunSelect, RunClaudeWithConfig, runClaudeInDirectory - install.go: InstallClaude, installBinary, installShellCompletion, appendCompletionLine - add.go: RunAdd - init_cmd.go: RunInit - start.go: RunStart - project_cmd.go: RunProject* functions - profile.go: RunTest, testSingleConfiguration, testAllConfigurations, RunProfileList/Remove - config_cmd.go: RunConfig*, RunDefaultBehavior*, RunSkipPermissions*, RunTerminal* - remote_cmd.go: parseSSHAddress, RunRemote* functions - serve.go: RunServe, RunHTTPServer No behavior changes. Build and all tests pass.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
internal/commands/commands.go(2354 lines) into 11 focused per-command filesFiles
version.goVersionvars,RunVersion,RunClaudeUpdate,RunSelfUpdate,checkForUpdatesselect.goRunSelect,RunClaudeWithConfig,runClaudeInDirectoryinstall.goInstallClaude,installBinary,installShellCompletion,appendCompletionLineadd.goRunAddinit_cmd.goRunInitstart.goRunStartproject_cmd.goRunProject*functionsprofile.goRunTest,testSingleConfiguration,RunProfileList,RunProfileRemoveconfig_cmd.goRunConfig*,RunDefaultBehavior*,RunSkipPermissions*,RunTerminal*remote_cmd.goparseSSHAddress,RunRemote*functionsserve.goRunServe,RunHTTPServerTest plan
go vet ./internal/commands/...— cleango build -o /dev/null ./cmd/codes— successgo test ./internal/commands/... -v -count=1— all tests pass