49 lines
1.5 KiB
JSON
49 lines
1.5 KiB
JSON
{
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
// ── Run: equivalent to `make run` ──────────────────────────────────────
|
|
"name": "Run: app",
|
|
"type": "go",
|
|
"request": "launch",
|
|
"mode": "auto",
|
|
"program": "${workspaceFolder}/cmd/app",
|
|
"env": {
|
|
"CONFIG_PATH": "${workspaceFolder}/config/dev.yaml"
|
|
},
|
|
"args": []
|
|
},
|
|
{
|
|
// ── Debug: same as above but with delve attached ───────────────────────
|
|
"name": "Debug: app",
|
|
"type": "go",
|
|
"request": "launch",
|
|
"mode": "debug",
|
|
"program": "${workspaceFolder}/cmd/app",
|
|
"env": {
|
|
"CONFIG_PATH": "${workspaceFolder}/config/dev.yaml"
|
|
},
|
|
"showLog": true,
|
|
"trace": "verbose"
|
|
},
|
|
{
|
|
// ── Test: run tests for the currently open file ────────────────────────
|
|
"name": "Test: current file",
|
|
"type": "go",
|
|
"request": "launch",
|
|
"mode": "test",
|
|
"program": "${fileDirname}",
|
|
"args": ["-v", "-run", "Test"]
|
|
},
|
|
{
|
|
// ── Test: run a single named test (edit the -run value) ────────────────
|
|
"name": "Test: single (edit -run arg)",
|
|
"type": "go",
|
|
"request": "launch",
|
|
"mode": "test",
|
|
"program": "${fileDirname}",
|
|
"args": ["-v", "-run", "TestGreet"]
|
|
}
|
|
]
|
|
}
|