Skip to content

Commit 7e60915

Browse files
committed
fix: use switch statement for routing mode in doctor command
Resolves staticcheck QF1003 lint error by converting if/else chain to a tagged switch on routingMode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 08198db commit 7e60915

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cmd/mcpproxy/doctor_cmd.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,12 @@ func displaySecurityFeaturesStatus() {
427427
routingMode = config.RoutingModeRetrieveTools
428428
}
429429
fmt.Printf(" Routing Mode: %s\n", routingMode)
430-
if routingMode == config.RoutingModeDirect {
430+
switch routingMode {
431+
case config.RoutingModeDirect:
431432
fmt.Println(" All upstream tools exposed directly via /mcp endpoint")
432-
} else if routingMode == config.RoutingModeCodeExecution {
433+
case config.RoutingModeCodeExecution:
433434
fmt.Println(" JS orchestration via code_execution tool")
434-
} else {
435+
default:
435436
fmt.Println(" BM25 search via retrieve_tools + call_tool variants")
436437
}
437438
fmt.Printf(" Endpoints: /mcp/all (direct), /mcp/code (code_execution), /mcp/call (retrieve_tools)\n")

0 commit comments

Comments
 (0)