Skip to content

Commit ce6e359

Browse files
authored
feat: Bump go to 1.23 (#321)
* feat: Bump go to 1.23 * fix: golangci config * fix: linter warning
1 parent ffc575f commit ce6e359

File tree

11 files changed

+24
-27
lines changed

11 files changed

+24
-27
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3636
language: [ 'go' ]
3737
os: [ 'ubuntu-22.04' ]
38-
go-version: [1.21]
38+
go-version: [1.23]
3939
steps:
4040
- name: Checkout
4141
uses: actions/checkout@v4

.github/workflows/go.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
max-parallel: 3
4242
matrix:
4343
os: [ 'ubuntu-22.04' ]
44-
go-version: [1.21]
44+
go-version: [1.23]
4545
runs-on: ${{ matrix.os }}
4646
name: Build
4747
steps:
@@ -98,7 +98,7 @@ jobs:
9898
max-parallel: 2
9999
matrix:
100100
os: [ 'ubuntu-22.04' ]
101-
go-version: [1.21]
101+
go-version: [1.23]
102102
runs-on: ${{ matrix.os }}
103103
name: Run Tests
104104
steps:
@@ -145,7 +145,7 @@ jobs:
145145
max-parallel: 2
146146
matrix:
147147
os: [ 'ubuntu-22.04' ]
148-
go-version: [1.21]
148+
go-version: [1.23]
149149
runs-on: ${{ matrix.os }}
150150
name: Run linters
151151
steps:
@@ -202,7 +202,7 @@ jobs:
202202
max-parallel: 1
203203
matrix:
204204
os: [ 'ubuntu-22.04' ]
205-
go-version: [1.21]
205+
go-version: [1.23]
206206
runs-on: ${{ matrix.os }}
207207
name: Quality reports
208208
steps:

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
max-parallel: 2
1515
matrix:
1616
os: [ 'ubuntu-22.04' ]
17-
go-version: [1.21]
17+
go-version: [1.23]
1818
runs-on: ${{ matrix.os }}
1919
name: Build
2020
steps:
@@ -60,7 +60,7 @@ jobs:
6060
max-parallel: 2
6161
matrix:
6262
os: [ 'ubuntu-22.04' ]
63-
go-version: [1.21]
63+
go-version: [1.23]
6464
runs-on: ${{ matrix.os }}
6565
name: Regression tests
6666
steps:
@@ -109,7 +109,7 @@ jobs:
109109
max-parallel: 1
110110
matrix:
111111
os: [ 'ubuntu-22.04' ]
112-
go-version: [1.21]
112+
go-version: [1.23]
113113
runs-on: ${{ matrix.os }}
114114
name: Lint
115115
steps:
@@ -162,7 +162,7 @@ jobs:
162162
max-parallel: 1
163163
matrix:
164164
os: [ 'ubuntu-22.04' ]
165-
go-version: [1.21]
165+
go-version: [1.23]
166166
runs-on: ${{ matrix.os }}
167167
name: Release
168168
steps:

.golangci.pipe.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ linters-settings:
2828
arguments: [ [ "call-chain", "loop", "method-call", "recover", "return" ] ]
2929

3030
issues:
31+
exclude-files:
32+
- \.pb\.go$
33+
exclude-dirs:
34+
- vendor
3135
exclude-use-default: false
3236
exclude:
3337
# for "public interface + private struct implementation" cases only!
@@ -97,16 +101,12 @@ issues:
97101
run:
98102
issues-exit-code: 1
99103
tests: true
100-
skip-dirs:
101-
- vendor/
102-
skip-files:
103-
- \.pb\.go$
104104

105105
# output configuration options
106106
output:
107107
# colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
108108
# default is "colored-line-number"
109-
format: github-actions
109+
formats: colored-line-number
110110

111111
# print lines of code with issue, default is true
112112
print-issued-lines: true

.goreleaser.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: 2
2+
13
release:
24
github:
35
owner: obalunenko
@@ -79,7 +81,7 @@ checksum:
7981
name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.txt"
8082

8183
snapshot:
82-
name_template: SNAPSHOT-{{ .Commit }}
84+
version_template: SNAPSHOT-{{ .Commit }}
8385

8486
changelog:
8587
sort: asc

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
SHELL := env VERSION=$(VERSION) $(SHELL)
22
VERSION ?= $(shell git describe --tags $(git rev-list --tags --max-count=1))
33

4-
GOVERSION:=1.21
4+
GOVERSION:=1.23
55

66
APP_NAME?=aoc-cli
77
SHELL := env APP_NAME=$(APP_NAME) $(SHELL)
88

9-
GOTOOLS_IMAGE_TAG?=v0.12.1
109
SHELL := env GOTOOLS_IMAGE_TAG=$(GOTOOLS_IMAGE_TAG) $(SHELL)
1110

1211
COMPOSE_TOOLS_FILE=deployments/docker-compose/go-tools-docker-compose.yml

build/docker/go-tools/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM ghcr.io/obalunenko/go-tools:v1.4.4 AS builder
1+
FROM ghcr.io/obalunenko/go-tools:v1.5.1 AS builder
22

33
CMD ["/bin/sh", "-c", ""]

deployments/docker-compose/go-tools-docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
tools:
53
build:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/obalunenko/advent-of-code
22

3-
go 1.21
3+
go 1.23
44
toolchain go1.22.5
55

66
require (

internal/puzzles/result.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,13 @@ func printTable(w io.Writer, table [][]string) error {
9696
case 0:
9797
_, err = fmt.Fprintf(w, "\n")
9898
case 1:
99-
_, err = fmt.Fprintf(writer, "\t"+strings.Join(line, "\t")+"\t\n")
99+
_, err = fmt.Fprintf(writer, "\t%s", strings.Join(line, "\t")+"\t\n")
100100
default:
101-
_, err = fmt.Fprintf(writer, "\t "+strings.Join(line, "\t")+"\t\n")
101+
_, err = fmt.Fprintf(writer, "\t %s", strings.Join(line, "\t")+"\t\n")
102102
}
103103

104104
if err != nil {
105-
if err != nil {
106-
return fmt.Errorf("fprintln: %w", err)
107-
}
105+
return fmt.Errorf("fprintln: %w", err)
108106
}
109107
}
110108

0 commit comments

Comments
 (0)