.devcontainer/devcontainer.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": "Webhooked",
"dockerComposeFile": "docker-compose.yaml",
"service": "workspace",
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"upgradePackages": true,
"username": "devcontainer",
"userUid": "1001",
"userGid": "1001"
}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.coverMode": "atomic",
"go.coverOnSave": true,
"go.disableConcurrentTests": true,
"editor.formatOnSave": true,
"go.lintTool": "golangci-lint",
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"gopls": {
"ui.completion.usePlaceholders": true,
// Experimental settings
"completeUnimported": true, // autocomplete unimported packages
"deepCompletion": true, // enable deep completion
"staticcheck": true
},
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll": true
},
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.suggestSelection": "first",
"git.autofetch": true,
"files.autoGuessEncoding": true,
"files.encoding": "utf8",
"workbench.editor.decorations.badges": true,
"workbench.editor.decorations.colors": true,
"go.delveConfig": {
"apiVersion": 2,
"showGlobalVariables": false
},
"editor.inlineSuggest.enabled": true,
"editor.rulers": [80],
"search.useGlobalIgnoreFiles": true,
"search.useParentIgnoreFiles": true,
"workbench.productIconTheme": "fluent-icons",
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go",
"aaron-bond.better-comments",
"IBM.output-colorizer",
"miguelsolorio.fluent-icons",
"jasonnutter.vscode-codeowners",
"cschleiden.vscode-github-actions",
"eamodio.gitlens",
"jinliming2.vscode-go-template",
"quicktype.quicktype"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8080 // webhooked port
],
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode",
"portsAttributes": {
"8080": {
"label": "Webhooked entrypoint"
}
}
}