Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienaury authored Mar 21, 2024
0 parents commit 5860353
Show file tree
Hide file tree
Showing 29 changed files with 2,247 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM adrienaury/go-devcontainer:v4.0

USER root

RUN apk add --update --progress --no-cache make gomplate

ARG VERSION_GOLICENSE=0.2.0
ARG VERSION_MILLER=6.11.0
RUN wget -nv -O- https://github.com/mitchellh/golicense/releases/download/v${VERSION_GOLICENSE}/golicense_${VERSION_GOLICENSE}_linux_x86_64.tar.gz | tar xz -C /usr/bin golicense \
&& wget -nv -O- https://github.com/johnkerl/miller/releases/download/v${VERSION_MILLER}/miller-${VERSION_MILLER}-linux-amd64.tar.gz | tar xz --strip-components 1 -C /usr/bin miller-${VERSION_MILLER}-linux-amd64/mlr \
&& chmod +x /usr/bin/golicense /usr/bin/mlr

USER vscode
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM adrienaury/go-devcontainer-ci:v4.0

USER root

RUN apk add --update --progress --no-cache make gomplate

ARG VERSION_GOLICENSE=0.2.0
ARG VERSION_MILLER=6.11.0
RUN wget -nv -O- https://github.com/mitchellh/golicense/releases/download/v${VERSION_GOLICENSE}/golicense_${VERSION_GOLICENSE}_linux_x86_64.tar.gz | tar xz -C /usr/bin golicense \
&& wget -nv -O- https://github.com/johnkerl/miller/releases/download/v${VERSION_MILLER}/miller-${VERSION_MILLER}-linux-amd64.tar.gz | tar xz --strip-components 1 -C /usr/bin miller-${VERSION_MILLER}-linux-amd64/mlr \
&& chmod +x /usr/bin/golicense /usr/bin/mlr
85 changes: 85 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"name": "CHANGE IT",
"dockerComposeFile": [
"../docker-compose.yml"
],
"service": "vscode",
"runServices": [
"vscode"
],
"shutdownAction": "stopCompose",
"postCreateCommand": "sudo chown -R vscode:vscode /workspace/. && make init",
"workspaceFolder": "/workspace",
"remoteEnv": {
"PATH": "${containerEnv:PATH}:/workspace/bin/"
},
"customizations": {
"vscode": {
"extensions": [
"golang.Go",
"eamodio.gitlens",
"donjayamanne.githistory",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"yzhang.markdown-all-in-one",
"ms-azuretools.vscode-docker",
"shardulm94.trailing-spaces",
"vscode-icons-team.vscode-icons",
"johnpapa.vscode-peacock",
"aaron-bond.better-comments",
"quicktype.quicktype",
"spikespaz.vscode-smoothtype",
"EditorConfig.EditorConfig"
],
"settings": {
// General settings
"files.eol": "\n",
// Docker
"remote.extensionKind": {
"ms-azuretools.vscode-docker": "workspace"
},
// Golang general settings
"go.useLanguageServer": true,
"gopls": {
"usePlaceholders": false,
"gofumpt": true
},
"go.lintTool": "golangci-lint",
"go.lintFlags": [
//"--fast",
"--enable-all",
"--disable", "gci",
"--disable", "forbidigo",
"--disable", "scopelint",
"--disable", "interfacer",
"--disable", "maligned",
"--disable", "varcheck",
"--disable", "ifshort",
"--disable", "exhaustivestruct",
"--disable", "nosnakecase",
"--disable", "structcheck",
"--disable", "deadcode",
"--disable", "depguard"
],
// Golang on save
"go.buildOnSave": "workspace",
"go.lintOnSave": "workspace",
"go.vetOnSave": "workspace",
"editor.formatOnSave": true,
"[go]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
// Golang testing
"go.testFlags": [
"-v"
],
"go.testTimeout": "600s",
"go.coverOnSingleTest": true,
"go.coverOnSingleTestFile": true,
"go.coverShowCounts": true
}
}
}
}
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.go]
indent_style = tab

[{Makefile, *.mk}]
indent_style = tab

[*.{yaml,yml}]
indent_size = 2

[*.{md,txt}]
indent_style = space
indent_size = 4
Loading

0 comments on commit 5860353

Please sign in to comment.