Skip to content

Commit 026b1cd

Browse files
kylecarbscoadler
andauthored
chore: update to go 1.20 (#5968)
Co-authored-by: Colin Adler <colin1adler@gmail.com>
1 parent 4df1031 commit 026b1cd

File tree

24 files changed

+91
-93
lines changed

24 files changed

+91
-93
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ RUN mkdir -p /etc/apt/keyrings \
5757
&& echo '{"cgroup-parent":"/actions_job","storage-driver":"vfs"}' >> /etc/docker/daemon.json
5858

5959
# install golang and language tooling
60-
ENV GO_VERSION=1.19
60+
ENV GO_VERSION=1.20
6161
ENV GOPATH=$HOME/go-packages
6262
ENV GOROOT=$HOME/go
6363
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH

.github/workflows/ci.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
# Install Go!
3838
- uses: actions/setup-go@v3
3939
with:
40-
go-version: "~1.19"
40+
go-version: "~1.20"
4141

4242
# Check for any typos!
4343
- name: Check for typos
@@ -55,7 +55,7 @@ jobs:
5555
- name: Lint Go
5656
uses: golangci/golangci-lint-action@v3.3.1
5757
with:
58-
version: v1.48.0
58+
version: v1.51.0
5959

6060
- name: Lint shell scripts
6161
uses: ludeeus/action-shellcheck@2.0.0
@@ -151,7 +151,7 @@ jobs:
151151

152152
- uses: actions/setup-go@v3
153153
with:
154-
go-version: "~1.19"
154+
go-version: "~1.20"
155155

156156
- name: Echo Go Cache Paths
157157
id: go-cache-paths
@@ -250,7 +250,7 @@ jobs:
250250

251251
- uses: actions/setup-go@v3
252252
with:
253-
go-version: "~1.19"
253+
go-version: "~1.20"
254254

255255
# Sadly the new "set output" syntax (of writing env vars to
256256
# $GITHUB_OUTPUT) does not work on both powershell and bash so we use the
@@ -333,7 +333,7 @@ jobs:
333333

334334
- uses: actions/setup-go@v3
335335
with:
336-
go-version: "~1.19"
336+
go-version: "~1.20"
337337

338338
- name: Echo Go Cache Paths
339339
id: go-cache-paths
@@ -416,7 +416,7 @@ jobs:
416416

417417
- uses: actions/setup-go@v3
418418
with:
419-
go-version: "~1.19"
419+
go-version: "~1.20"
420420

421421
- name: Echo Go Cache Paths
422422
id: go-cache-paths
@@ -545,7 +545,7 @@ jobs:
545545

546546
- uses: actions/setup-go@v3
547547
with:
548-
go-version: "~1.19"
548+
go-version: "~1.20"
549549

550550
- uses: hashicorp/setup-terraform@v2
551551
with:

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191

9292
- uses: actions/setup-go@v3
9393
with:
94-
go-version: "~1.19"
94+
go-version: "~1.20"
9595

9696
- name: Cache Node
9797
id: cache-node

.github/workflows/security.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Setup Go
3939
uses: actions/setup-go@v3
4040
with:
41-
go-version: "~1.19"
41+
go-version: "~1.20"
4242

4343
- name: Go Cache Paths
4444
id: go-cache-paths
@@ -68,7 +68,7 @@ jobs:
6868

6969
- uses: actions/setup-go@v3
7070
with:
71-
go-version: "~1.19"
71+
go-version: "~1.20"
7272

7373
- name: Go Cache Paths
7474
id: go-cache-paths

cli/gitaskpass.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ func gitAskpass() *cobra.Command {
6969

7070
if token.Password != "" {
7171
if user == "" {
72-
fmt.Fprintln(cmd.OutOrStdout(), token.Username)
72+
_, _ = fmt.Fprintln(cmd.OutOrStdout(), token.Username)
7373
} else {
74-
fmt.Fprintln(cmd.OutOrStdout(), token.Password)
74+
_, _ = fmt.Fprintln(cmd.OutOrStdout(), token.Password)
7575
}
7676
} else {
77-
fmt.Fprintln(cmd.OutOrStdout(), token.Username)
77+
_, _ = fmt.Fprintln(cmd.OutOrStdout(), token.Username)
7878
}
7979

8080
return nil

cli/root_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ var updateGoldenFiles = flag.Bool("update", false, "update .golden files")
3030

3131
//nolint:tparallel,paralleltest // These test sets env vars.
3232
func TestCommandHelp(t *testing.T) {
33-
t.Parallel()
34-
3533
commonEnv := map[string]string{
3634
"CODER_CONFIG_DIR": "/tmp/coder-cli-test-config",
3735
}

coderd/httpmw/ratelimit_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
func randRemoteAddr() string {
2525
var b [4]byte
2626
// nolint:gosec
27-
rand.Read(b[:])
27+
_, _ = rand.Read(b[:])
2828
// nolint:gosec
2929
return fmt.Sprintf("%s:%v", net.IP(b[:]).String(), rand.Int31()%(1<<16))
3030
}

coderd/rbac/builtin_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ func TestIsOrgRole(t *testing.T) {
360360

361361
// nolint:paralleltest
362362
for _, c := range testCases {
363+
c := c
363364
t.Run(c.RoleName, func(t *testing.T) {
364365
t.Parallel()
365366
orgID, ok := rbac.IsOrgRole(c.RoleName)

coderd/rbac/regosql/compile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ func ConvertRegoAst(cfg ConvertConfig, partial *rego.PartialQueries) (sqltypes.B
4646
}
4747

4848
if i != 0 {
49-
builder.WriteString("\n")
49+
_, _ = builder.WriteString("\n")
5050
}
51-
builder.WriteString(q.String())
51+
_, _ = builder.WriteString(q.String())
5252
queries = append(queries, converted)
5353
}
5454

coderd/updatecheck/updatecheck_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func TestChecker_Notify(t *testing.T) {
4444

4545
w.Header().Set("Content-Type", "application/json")
4646
w.WriteHeader(http.StatusOK)
47-
w.Write(b)
47+
_, _ = w.Write(b)
4848
}
4949
}))
5050
defer srv.Close()

0 commit comments

Comments
 (0)