在 .vscode 目录下创建如下两个文件
launch.json
{
"configurations": [
{
"name": "Connect to server",
"type": "go",
"request": "launch",
"mode": "exec",
"program": "${workspaceFolder}/bin/linux_amd64/e2e.test",
"args": [
"--kubeconfig", "/home/liufarong.666/.kube/config",
"-ginkgo.focus", "validates basic preemption works",
],
}
]
}
settings.json
{
"go.testFlags": [
"--kubeconfig=/home/liufarong.666/.kube/config",
]
}