/
devcontainer.json
89 lines (89 loc) · 2.3 KB
/
devcontainer.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"name": "Golang devcontainer",
"build": {
"dockerfile": "Dockerfile",
"args": {
"GO_VERSION": "1-bullseye"
}
},
"mounts": [
"source=${localEnv:HOME}/.zshrc,target=/root/.zshrc,type=bind,consistency=cached"
],
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
"customizations": {
"vscode": {
"extensions": [
"golang.Go",
"GitHub.vscode-pull-request-github",
"aaron-bond.better-comments",
"pnp.polacode",
"eamodio.gitlens",
"jasonlhy.hungry-delete",
"formulahendry.auto-rename-tag",
"DavidAnson.vscode-markdownlint",
"streetsidesoftware.code-spell-checker",
"PKief.material-icon-theme"
],
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.toolsManagement.autoUpdate": true,
"go.gopath": "/go",
"go.goroot": "/usr/local/go",
"go.useLanguageServer": true,
"[go]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"[go.mod]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"gopls": {
"build.buildFlags": [
"-tags",
""
],
"formatting.gofumpt": true,
"ui.completion.usePlaceholders": false,
"ui.diagnostic.staticcheck": true,
"ui.semanticTokens": true
},
"go.lintTool": "golangci-lint",
"go.lintOnSave": "package",
"go.toolsEnvVars": {
"CGO_ENABLED": 1
},
"go.testFlags": [
"-v",
"-race"
],
"go.testTimeout": "30s",
"go.coverOnSingleTest": true,
"go.coverOnSingleTestFile": true,
"go.coverOnTestPackage": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"files.insertFinalNewline": true
}
}
},
"portsAttributes": {
"9000": {
"label": "Hello Remote World",
"onAutoForward": "notify"
}
},
"postCreateCommand": {
"modules": "go mod download"
},
"remoteUser": "root",
"containerUser": "root"
}