Go VSCode配置编译task

菜单栏Tasks->Configure Tasks

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build logic",
            "type": "shell",
            "command": "go build src/service/main.go",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher":{
                "owner": "go",
                "fileLocation": [
                    "relative",
                    "${fileDirname}"
                ],
                "pattern": {
                    "regexp": "^(.*):(\\d+):\\s+(.*)$",
                    "file":1,
                    "line": 2,
                    "message": 3
                }
            }
        }
    ]
}

 

vscode编译快捷键 ctrl+shitf+b

posted @ 2018-05-15 16:47  MrBlue  阅读(564)  评论(0编辑  收藏  举报