From 524d9d4a6ed2bdad496239e0c36a68125ba3e9b6 Mon Sep 17 00:00:00 2001 From: AoiKamishiro Date: Wed, 4 Sep 2024 21:23:37 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B7=E3=82=A7=E3=83=AB=E3=82=B9=E3=82=AF?= =?UTF-8?q?=E3=83=AA=E3=83=97=E3=83=88=E3=81=8B=E3=82=89Go=E3=81=B8?= =?UTF-8?q?=E3=81=AE=E5=A4=89=E6=9B=B4=E3=81=AB=E4=BC=B4=E3=81=84=E3=80=81?= =?UTF-8?q?=E9=96=8B=E7=99=BA=E3=82=B3=E3=83=B3=E3=83=86=E3=83=8A=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 18 ++++++++++++++---- .devcontainer/initialize.sh | 9 +++++++++ go.mod | 8 ++++++++ go.sum | 4 ++++ 4 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/initialize.sh create mode 100644 go.mod create mode 100644 go.sum diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 84d3a14..ae6da65 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,9 +1,9 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/alpine { - "name": "Alpine", + "name": "KamishiroUPM", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:alpine-3.20", + "image": "mcr.microsoft.com/devcontainers/base:alpine", // Features to add to the dev container. More info: https://containers.dev/features. //"features": { } @@ -12,10 +12,20 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "uname -a", + "onCreateCommand": "sudo /bin/sh .devcontainer/initialize.sh", // Configure tool-specific properties. - // "customizations": {}, + "customizations": { + "vscode": { + "extensions": [ + "foxundermoon.shell-format", + "GitLab.gitlab-workflow", + "golang.go", + "redhat.vscode-yaml", + "streetsidesoftware.code-spell-checker" + ] + } + }, // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" diff --git a/.devcontainer/initialize.sh b/.devcontainer/initialize.sh new file mode 100644 index 0000000..1eba0d1 --- /dev/null +++ b/.devcontainer/initialize.sh @@ -0,0 +1,9 @@ +apk add git git-lfs npm go + +git config --global http.sslVerify false +git config --global advice.detachedHead false + +go mod init KamishiroUPM +go get github.com/joho/godotenv +go get github.com/google/uuid +go mod tidy diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5b95d3b --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module KamishiroUPM + +go 1.22.6 + +require ( + github.com/google/uuid v1.6.0 + github.com/joho/godotenv v1.5.1 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..b36acff --- /dev/null +++ b/go.sum @@ -0,0 +1,4 @@ +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=