From c82c01fb3659403edf7820b90ad589254ef0e76b Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Thu, 18 Jun 2026 19:38:58 +0700 Subject: [PATCH] add launch and tasks --- .gitea/template | 2 ++ .vscode/launch.json | 36 ++++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.gitea/template b/.gitea/template index 4659d4d..2a13be4 100644 --- a/.gitea/template +++ b/.gitea/template @@ -13,3 +13,5 @@ docker-compose-db.yml Dockerfile .env.example README.md + +.vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..008287e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,36 @@ +{ + // 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": "Launch", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/cmd/${REPO_NAME_SNAKE}", + "args": [ + "--local" + ], + "cwd": "${workspaceFolder}", + "buildFlags": "-tags local" + }, + { + "name": "Launch for tests", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/cmd/${REPO_NAME_SNAKE}", + "args": [ + "--local" + ], + "cwd": "${workspaceFolder}", + "buildFlags": "-tags local", + "env": { + "STORY_FILENAME": "./internal/tests/story.json", + "DB_FILENAME": "./internal/tests/store.db" + } + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..0b6ca63 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,33 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Gen Config", + "type": "shell", + "isBackground": true, + "command": "make generate", + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": [ + "$go" + ] + }, + { + "label": "Tests", + "type": "shell", + "isBackground": true, + "command": "make test", + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": [ + "$go" + ] + } + ] +}