mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
59 lines
2.2 KiB
JSON
59 lines
2.2 KiB
JSON
// 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",
|
|
"image": "mcr.microsoft.com/devcontainers/go:1-1.20-bullseye",
|
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
|
// "features": {},
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
// "forwardPorts": [],
|
|
// Use 'postCreateCommand' to run commands after the container is created.
|
|
"postCreateCommand": "sudo chmod +x ./.devcontainer/setup.sh && ./.devcontainer/setup.sh",
|
|
"customizations": {
|
|
"vscode": {
|
|
"extensions": [
|
|
"golang.go",
|
|
"github.vscode-pull-request-github" // Github interaction
|
|
],
|
|
"settings": {
|
|
"files.eol": "\n",
|
|
"editor.formatOnSave": true,
|
|
"go.buildTags": "",
|
|
"go.toolsEnvVars": {
|
|
"CGO_ENABLED": "0"
|
|
},
|
|
"go.useLanguageServer": true,
|
|
"go.testEnvVars": {
|
|
"CGO_ENABLED": "1"
|
|
},
|
|
"go.testFlags": [
|
|
"-v",
|
|
"-race"
|
|
],
|
|
"go.testTimeout": "60s",
|
|
"go.coverOnSingleTest": true,
|
|
"go.coverOnSingleTestFile": true,
|
|
"go.coverOnTestPackage": true,
|
|
"go.lintTool": "golangci-lint",
|
|
"go.lintOnSave": "package",
|
|
"[go]": {
|
|
"editor.codeActionsOnSave": {
|
|
"source.organizeImports": true
|
|
}
|
|
},
|
|
"gopls": {
|
|
"usePlaceholders": false,
|
|
"staticcheck": true,
|
|
"vulncheck": "Imports"
|
|
}
|
|
}
|
|
},
|
|
"codespaces": {
|
|
"openFiles": [
|
|
".devcontainer/README.md"
|
|
]
|
|
}
|
|
}
|
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
|
// "remoteUser": "root"
|
|
} |