From 13605ec9528aa9791cc2b260b398c431cb8fe140 Mon Sep 17 00:00:00 2001 From: Sudhanshu Pandey Date: Sat, 1 Feb 2025 14:37:59 +0000 Subject: [PATCH 1/2] chore: v0 add supoort for go dev container --- .devcontainer/devcontainer.json | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..5ce95349 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,28 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/go +{ + "name": "Go", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm", + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + "settings": {}, + "extensions": [ + "streetsidesoftware.code-spell-checker", // Spell checker support + "golang.go" // Golang support + ] + } + }, + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "go version" + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} \ No newline at end of file From f1b265d32342ee2963ec8cc4cc278205f7200c78 Mon Sep 17 00:00:00 2001 From: Sudhanshu Pandey Date: Sat, 1 Feb 2025 14:48:58 +0000 Subject: [PATCH 2/2] chore: add support for golangci-lint with devcontainer --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5ce95349..b5ce8383 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,7 +21,7 @@ }, // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "go version" + "postCreateCommand": "go version && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.63.4 && golangci-lint --version" // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root"