mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +08:00
pkg,service/dap: use switch instead of ifs (#3576)
This commit is contained in:
@ -5210,11 +5210,12 @@ func runDebugSessionWithBPs(t *testing.T, client *daptest.Client, cmd string, cm
|
||||
|
||||
cmdRequest()
|
||||
client.ExpectInitializedEvent(t)
|
||||
if cmd == "launch" {
|
||||
switch cmd {
|
||||
case "launch":
|
||||
client.ExpectLaunchResponse(t)
|
||||
} else if cmd == "attach" {
|
||||
case "attach":
|
||||
client.ExpectAttachResponse(t)
|
||||
} else {
|
||||
default:
|
||||
panic("expected launch or attach command")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user