diff --git a/.gitignore b/.gitignore index 6cef1340..96f9f38d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .DS_Store .idea -.vscode +__debug_bin !*.example /config.yaml *.log diff --git a/.vscode/.gitignore b/.vscode/.gitignore new file mode 100644 index 00000000..945fe607 --- /dev/null +++ b/.vscode/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +*.log +__debug_bin diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..8919009c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "paopao-ce [debug]", + "type": "go", + "request": "launch", + "mode": "exec", + "program": "${fileDirname}/__debug_bin", + "preLaunchTask": "go: build (debug)", + "cwd": "${workspaceFolder}" + } + ] +} diff --git a/.vscode/sort_launch.js b/.vscode/sort_launch.js new file mode 100644 index 00000000..58d379e3 --- /dev/null +++ b/.vscode/sort_launch.js @@ -0,0 +1,4 @@ +let launch = require('./launch.json'); +launch.configurations.sort((a, b) => a.name.localeCompare(b.name)); +let fs = require('fs'); +fs.writeFileSync('launch.json', JSON.stringify(launch, null, 4)); diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..b716d1a8 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,21 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "go: build (debug)", + "type": "shell", + "command": "go", + "args": [ + "build", + "-gcflags=all=-N -l", + "-tags", + "'embed go_json'", + "-o", + "${workspaceFolder}/.vscode/__debug_bin" + ], + "options": { + "cwd": "${workspaceFolder}" + } + } + ] +}