From 5baab4af77d2fb482de26f76820595cad334ef5b Mon Sep 17 00:00:00 2001 From: Reilly MacKenzie-Cree <41772129+reillymc@users.noreply.github.com> Date: Mon, 2 Sep 2024 12:22:32 +1000 Subject: [PATCH] Update dev container to use Go 1.23 and customizations object (#3228) Signed-off-by: reillymc <reilly@mackenzie-cree.net> --- .devcontainer/devcontainer.json | 56 ++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 573661cee..d27ff208c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "dockerfile": "Dockerfile", "args": { // Update the VARIANT arg to pick a version of Go: 1, 1.15, 1.14 - "VARIANT": "1.22", + "VARIANT": "1.23", // Options "INSTALL_NODE": "true", "NODE_VERSION": "v20" @@ -18,33 +18,37 @@ "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z" ], // Set *default* container specific settings.json values on container create. - "settings": { - "terminal.integrated.shell.linux": "/bin/bash", - "go.useGoProxyToCheckForToolUpdates": false, - "go.useLanguageServer": true, - "go.gopath": "/go", - "go.goroot": "/usr/local/go", - "go.toolsGopath": "/go/bin", - "go.formatTool": "goimports", - "go.lintOnSave": "package", - "go.lintTool": "golangci-lint", - "editor.formatOnSave": true, - "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[jsonc]": { - "editor.defaultFormatter": "vscode.json-language-features" + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "go.useGoProxyToCheckForToolUpdates": false, + "go.useLanguageServer": true, + "go.gopath": "/go", + "go.goroot": "/usr/local/go", + "go.toolsGopath": "/go/bin", + "go.formatTool": "goimports", + "go.lintOnSave": "package", + "go.lintTool": "golangci-lint", + "editor.formatOnSave": true, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + } + }, + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "golang.Go", + "esbenp.prettier-vscode", + "tamasfe.even-better-toml" + ] } }, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "golang.Go", - "esbenp.prettier-vscode", - "tamasfe.even-better-toml" - ], // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [ 4533,