
## 插件

1. vscode-go
2. Go Group Imports
3. Go Struct Tag Autocomplete & Generator
4. SemanticDiff
5. Tooltitude for Go (GoLang)
6. Go Mod Explorer
7. Koverage

## 设置 debug

```json5
{
    // 欲了解更多信息，请访问：https://go.microsoft.com/fwlink/?linkid=830387
    // .vscode/launch.json
    "version": "0.2.0",
    "configurations": [
        {
            "name": "test-debug",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "showLog": true,
            "cwd": "${workspaceFolder}",
            "program": "${workspaceFolder}/app/test/main.go",
            "args": [
                "${workspaceFolder}/app/test/test.conf"
            ]
        },
        {
            "name": "test2-debug",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "cwd": "${workspaceFolder}/bin",
            "program": "${workspaceFolder}/app/test2/main.go",
            "args": [
                "${workspaceFolder}/app/test2/test2.conf"
            ]
        },
        {
            "name": "Launch Package",
            "type": "go",
            "request": "launch",
            // "mode": "auto",
            "mode": "debug",
            "program": "${workspaceFolder}",
            "showGlobalVariables": false
        }
    ]
}
```

## 在 vscode 中运行

```json5
// .vscode/tasks.json

{
    "tasks": [
        {
            "label": "test-tasks",
            "type": "shell",
            "command": "go",
            "args": [
                "build",
                "-gcflags=all=-N -l",
                "-o",
                "${workspaceFolder}/bin/test",
                "${workspaceFolder}/app/test/main.go"
            ]
        }
    ]
}

```

```json5
// .vscode/launch.json
{
"configurations": [
        {
            "name": "mds-debug",
            "type": "go",
            "request": "launch",
            "mode": "exec",
            "showLog": true,
            "cwd": "${workspaceFolder}",
            "program": "${workspaceFolder}/bin/test",
            "args": [
                "${workspaceFolder}/app/test/test.conf"
            ],
            "preLaunchTask": "test-tasks",
        },
}
```

