Skip to content

Commit 8c559f9

Browse files
authored
⬆️ Updated Go Version 1.15 => 1.18 (#234)
* ⬆️ Updated Go Version 1.15 => 1.18 * ⬆️ Updating golangci golangci/golangci-lint-action#434 * 🔧 Updated Devcontainer for 1.18
1 parent 68fce29 commit 8c559f9

File tree

5 files changed

+117
-86
lines changed

5 files changed

+117
-86
lines changed

.devcontainer/Dockerfile

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/go/.devcontainer/base.Dockerfile
2-
3-
# [Choice] Go version: 1, 1.15, 1.14
4-
ARG VARIANT="1"
5-
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
6-
7-
# [Option] Install Node.js
8-
ARG INSTALL_NODE="true"
9-
ARG NODE_VERSION="lts/*"
10-
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
11-
12-
# [Optional] Uncomment this section to install additional OS packages.
13-
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
14-
# && apt-get -y install --no-install-recommends <your-package-list-here>
15-
16-
# [Optional] Uncomment the next line to use go get to install anything else you need
17-
# RUN go get -x <your-dependency-or-tool>
18-
19-
# [Optional] Uncomment this line to install global node packages.
20-
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/go/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster
4+
ARG VARIANT="1.18-bullseye"
5+
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
6+
7+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8+
ARG NODE_VERSION="none"
9+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10+
11+
# [Optional] Uncomment this section to install additional OS packages.
12+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13+
# && apt-get -y install --no-install-recommends <your-package-list-here>
14+
15+
# [Optional] Uncomment the next lines to use go get to install anything else you need
16+
USER vscode
17+
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.35.2
18+
19+
# [Optional] Uncomment this line to install global node packages.
20+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

Lines changed: 54 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,55 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/go
3-
{
4-
"name": "Go",
5-
"build": {
6-
"dockerfile": "Dockerfile",
7-
"args": {
8-
// Update the VARIANT arg to pick a version of Go: 1, 1.15, 1.14
9-
"VARIANT": "1.15",
10-
// Options
11-
"INSTALL_NODE": "false",
12-
"NODE_VERSION": "lts/*"
13-
}
14-
},
15-
"runArgs": [
16-
"--cap-add=SYS_PTRACE",
17-
"--security-opt",
18-
"seccomp=unconfined"
19-
],
20-
// Set *default* container specific settings.json values on container create.
21-
"settings": {
22-
"terminal.integrated.shell.linux": "/bin/bash",
23-
"go.toolsManagement.checkForUpdates": "off",
24-
"go.useLanguageServer": true,
25-
"go.gocodeAutoBuild": false,
26-
"files.autoSave": "afterDelay",
27-
"editor.formatOnPaste": true,
28-
"editor.formatOnSave": true,
29-
"go.gopath": "/go",
30-
"go.goroot": "/usr/local/go",
31-
"go.toolsGopath": "/go/bin",
32-
"go.buildOnSave": "workspace",
33-
"go.lintOnSave": "package",
34-
"go.vetOnSave": "package",
35-
"go.coverOnSave": false,
36-
"go.useCodeSnippetsOnFunctionSuggest": false,
37-
"go.lintTool": "golangci-lint",
38-
"go.formatTool": "goimports",
39-
"[go]": {
40-
"editor.codeActionsOnSave": {
41-
"source.organizeImports": true
42-
},
43-
},
44-
},
45-
// Add the IDs of extensions you want installed when the container is created.
46-
"extensions": [
47-
"golang.Go",
48-
"streetsidesoftware.code-spell-checker",
49-
"premparihar.gotestexplorer"
50-
],
51-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
52-
// "forwardPorts": [],
53-
// Use 'postCreateCommand' to run commands after the container is created.
54-
// "postCreateCommand": "go version",
55-
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
56-
"remoteUser": "vscode"
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/go
3+
{
4+
"name": "Go",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Update the VARIANT arg to pick a version of Go: 1, 1.18, 1.17
9+
// Append -bullseye or -buster to pin to an OS version.
10+
// Use -bullseye variants on local arm64/Apple Silicon.
11+
"VARIANT": "1.18-bullseye",
12+
// Options
13+
"NODE_VERSION": "none"
14+
}
15+
},
16+
"runArgs": [
17+
"--cap-add=SYS_PTRACE",
18+
"--security-opt",
19+
"seccomp=unconfined"
20+
],
21+
// Set *default* container specific settings.json values on container create.
22+
"settings": {
23+
"go.gocodeAutoBuild": false,
24+
"files.autoSave": "afterDelay",
25+
"editor.formatOnPaste": true,
26+
"editor.formatOnSave": true,
27+
"go.gopath": "/go",
28+
"go.goroot": "/usr/local/go",
29+
"go.toolsGopath": "/go/bin",
30+
"go.buildOnSave": "workspace",
31+
"go.lintOnSave": "package",
32+
"go.vetOnSave": "package",
33+
"go.coverOnSave": false,
34+
"go.useCodeSnippetsOnFunctionSuggest": false,
35+
"go.lintTool": "golangci-lint",
36+
"go.formatTool": "goimports",
37+
"[go]": {
38+
"editor.codeActionsOnSave": {
39+
"source.organizeImports": true
40+
},
41+
},
42+
},
43+
// Add the IDs of extensions you want installed when the container is created.
44+
"extensions": [
45+
"golang.Go",
46+
"streetsidesoftware.code-spell-checker",
47+
"premparihar.gotestexplorer"
48+
],
49+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
50+
// "forwardPorts": [],
51+
// Use 'postCreateCommand' to run commands after the container is created.
52+
// "postCreateCommand": "go version",
53+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
54+
"remoteUser": "vscode"
5755
}

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Set up Go
5050
uses: actions/setup-go@v3
5151
with:
52-
go-version: 1.15
52+
go-version: 1.18
5353

5454
- name: Build
5555
run: go build -v ./...
@@ -74,7 +74,7 @@ jobs:
7474
uses: golangci/golangci-lint-action@v3
7575
with:
7676
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
77-
version: v1.29
77+
version: v1.45.2
7878
# Optional: show only new issues if it's a pull request. The default value is `false`.
7979
only-new-issues: true
8080
integration:
@@ -102,7 +102,7 @@ jobs:
102102
- name: Set up Go
103103
uses: actions/setup-go@v3
104104
with:
105-
go-version: 1.15
105+
go-version: 1.18
106106

107107
- name: K8S Cluster Setup
108108
uses: helm/[email protected]

go.mod

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,43 @@ require (
1414
gopkg.in/yaml.v2 v2.4.0
1515
)
1616

17-
go 1.15
17+
require (
18+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
19+
github.com/Microsoft/go-winio v0.4.17 // indirect
20+
github.com/Microsoft/hcsshim v0.8.23 // indirect
21+
github.com/andybalholm/brotli v1.0.4 // indirect
22+
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
23+
github.com/containerd/cgroups v1.0.1 // indirect
24+
github.com/containerd/containerd v1.5.9 // indirect
25+
github.com/davecgh/go-spew v1.1.1 // indirect
26+
github.com/docker/distribution v2.7.1+incompatible // indirect
27+
github.com/docker/docker v20.10.11+incompatible // indirect
28+
github.com/docker/go-units v0.4.0 // indirect
29+
github.com/gogo/protobuf v1.3.2 // indirect
30+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
31+
github.com/golang/protobuf v1.5.2 // indirect
32+
github.com/google/uuid v1.3.0 // indirect
33+
github.com/klauspost/compress v1.15.0 // indirect
34+
github.com/magiconair/properties v1.8.5 // indirect
35+
github.com/moby/sys/mount v0.2.0 // indirect
36+
github.com/moby/sys/mountinfo v0.5.0 // indirect
37+
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
38+
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect
39+
github.com/opencontainers/go-digest v1.0.0 // indirect
40+
github.com/opencontainers/image-spec v1.0.2 // indirect
41+
github.com/opencontainers/runc v1.0.2 // indirect
42+
github.com/pmezard/go-difflib v1.0.0 // indirect
43+
github.com/sirupsen/logrus v1.8.1 // indirect
44+
github.com/stretchr/objx v0.2.0 // indirect
45+
github.com/valyala/bytebufferpool v1.0.0 // indirect
46+
go.opencensus.io v0.22.5 // indirect
47+
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
48+
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
49+
golang.org/x/text v0.3.7 // indirect
50+
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705 // indirect
51+
google.golang.org/grpc v1.35.0 // indirect
52+
google.golang.org/protobuf v1.27.1 // indirect
53+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
54+
)
55+
56+
go 1.18

go.sum

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGE
278278
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
279279
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
280280
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
281-
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
282281
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
283282
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
284283
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
@@ -497,7 +496,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m
497496
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
498497
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
499498
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
500-
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
501499
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
502500
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
503501
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
@@ -507,13 +505,11 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
507505
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
508506
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
509507
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
510-
github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ=
511508
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
512509
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
513510
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
514511
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
515512
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
516-
github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA=
517513
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
518514
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
519515
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
@@ -560,7 +556,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
560556
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
561557
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
562558
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
563-
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
564559
github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
565560
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
566561
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
@@ -1091,7 +1086,6 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
10911086
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
10921087
gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
10931088
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
1094-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
10951089
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
10961090
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
10971091
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 commit comments

Comments
 (0)