Skip to content

Commit a3ff7d6

Browse files
committed
chore: update Go, golangci-lint and deps
1 parent 2a45ae3 commit a3ff7d6

File tree

20 files changed

+141
-65
lines changed

20 files changed

+141
-65
lines changed

engine/.gitlab-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
default:
2-
image: golang:1.20
2+
image: golang:1.23
33

44
stages:
55
- test
@@ -56,7 +56,7 @@ lint:
5656
### Build binary.
5757
build-binary-alpine:
5858
<<: *only_engine
59-
image: golang:1.20-alpine
59+
image: golang:1.23-alpine
6060
stage: build-binary
6161
artifacts:
6262
paths:

engine/.golangci.yml

+17-16
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ run:
22
timeout: 2m
33
issues-exit-code: 1
44
tests: true
5-
skip-dirs:
6-
- vendor
75
output:
8-
format: colored-line-number
6+
formats:
7+
- format: colored-line-number
98
print-issued-lines: true
109
print-linter-name: true
1110

@@ -22,10 +21,8 @@ linters-settings:
2221
gofmt:
2322
simplify: true
2423
gofumpt:
25-
lang-version: "1.17"
2624
extra-rules: false
2725
gosimple:
28-
go: "1.18"
2926
checks: [ "all" ]
3027
goimports:
3128
local-prefixes: gitlab.com/postgres-ai/database-lab
@@ -37,14 +34,17 @@ linters-settings:
3734
lll:
3835
line-length: 140
3936
tab-width: 1
40-
gomnd:
41-
settings:
42-
mnd:
43-
ignored-functions: strconv.Format*,os.*,strconv.Parse*,strings.SplitN,bytes.SplitN
37+
mnd:
38+
ignored-functions:
39+
- strconv.Format*
40+
- os.*
41+
- strconv.Parse*
42+
- strings.SplitN
43+
- bytes.SplitN
4444
revive:
45-
min-confidence: 0.8
45+
confidence: 0.8
4646
unused:
47-
check-exported: false
47+
exported-fields-are-used: false
4848
unparam:
4949
check-exported: false
5050
nakedret:
@@ -72,15 +72,15 @@ linters:
7272
- goconst
7373
- gocritic
7474
- goimports
75-
- gomnd
7675
- gosimple
7776
- govet
7877
- ineffassign
7978
- lll
80-
- megacheck
8179
- misspell
80+
- mnd
8281
- prealloc
8382
- revive
83+
- staticcheck
8484
- stylecheck
8585
- unconvert
8686
- unused
@@ -90,9 +90,8 @@ linters:
9090
disable:
9191
- depguard
9292
- gosec
93-
- interfacer
9493
- gocyclo # currently unmaintained
95-
presets:
94+
#presets:
9695
fast: false
9796

9897
issues:
@@ -104,7 +103,9 @@ issues:
104103
- lll
105104
- errcheck
106105
- wsl
107-
- gomnd
106+
- mnd
107+
exclude-dirs:
108+
- vendor
108109

109110
exclude-use-default: false
110111
max-issues-per-linter: 0

engine/Dockerfile.dblab-server-debug

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# How to start a container: https://postgres.ai/docs/how-to-guides/administration/engine-manage
22

33
# Compile stage
4-
FROM golang:1.18 AS build-env
4+
FROM golang:1.23 AS build-env
55

66
# Build Delve
77
RUN go install github.com/go-delve/delve/cmd/dlv@latest

engine/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ help: ## Display the help message
3434
all: clean build ## Build all binary components of the project
3535

3636
install-lint: ## Install the linter to $GOPATH/bin which is expected to be in $PATH
37-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3
37+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
3838

3939
run-lint: ## Run linters
4040
golangci-lint run

engine/cmd/cli/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func main() {
2424
app := &cli.App{
2525
Version: version.GetVersion(),
2626
CommandNotFound: func(c *cli.Context, command string) {
27-
fmt.Fprintf(c.App.Writer, "[ERROR] Command %q not found.\n", command)
27+
_, _ = fmt.Fprintf(c.App.Writer, "[ERROR] Command %q not found.\n", command)
2828
},
2929
Before: loadEnvironmentParams,
3030
Commands: joinCommands(

engine/go.mod

+23-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module gitlab.com/postgres-ai/database-lab/v3
22

3-
go 1.20
3+
go 1.23
44

55
require (
66
github.com/AlekSi/pointer v1.2.0
77
github.com/ahmetalpbalkan/dlog v0.0.0-20170105205344-4fb5f8204f26
88
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de
99
github.com/aws/aws-sdk-go v1.44.309
10-
github.com/docker/cli v24.0.9+incompatible
11-
github.com/docker/docker v24.0.9+incompatible
10+
github.com/docker/cli v25.0.6+incompatible
11+
github.com/docker/docker v25.0.6+incompatible
1212
github.com/docker/go-connections v0.4.0
1313
github.com/docker/go-units v0.5.0
1414
github.com/dustin/go-humanize v1.0.1
@@ -27,7 +27,7 @@ require (
2727
github.com/sergi/go-diff v1.3.1
2828
github.com/sethvargo/go-password v0.2.0
2929
github.com/shirou/gopsutil v3.21.11+incompatible
30-
github.com/stretchr/testify v1.8.2
30+
github.com/stretchr/testify v1.9.0
3131
github.com/testcontainers/testcontainers-go v0.12.0
3232
github.com/urfave/cli/v2 v2.25.7
3333
github.com/wagslane/go-password-validator v0.3.0
@@ -43,9 +43,14 @@ require (
4343
github.com/Microsoft/go-winio v0.6.1 // indirect
4444
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
4545
github.com/containerd/containerd v1.7.2 // indirect
46+
github.com/containerd/log v0.1.0 // indirect
4647
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
48+
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
4749
github.com/davecgh/go-spew v1.1.1 // indirect
48-
github.com/docker/distribution v2.8.2+incompatible // indirect
50+
github.com/distribution/reference v0.6.0 // indirect
51+
github.com/felixge/httpsnoop v1.0.4 // indirect
52+
github.com/go-logr/logr v1.4.2 // indirect
53+
github.com/go-logr/stdr v1.2.2 // indirect
4954
github.com/go-ole/go-ole v1.2.6 // indirect
5055
github.com/gogo/protobuf v1.3.2 // indirect
5156
github.com/golang/protobuf v1.5.3 // indirect
@@ -58,26 +63,37 @@ require (
5863
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
5964
github.com/jmespath/go-jmespath v0.4.0 // indirect
6065
github.com/klauspost/compress v1.16.7 // indirect
66+
github.com/kr/pretty v0.3.1 // indirect
6167
github.com/magiconair/properties v1.8.5 // indirect
6268
github.com/moby/patternmatcher v0.5.0 // indirect
6369
github.com/moby/sys/sequential v0.5.0 // indirect
70+
github.com/moby/sys/user v0.3.0 // indirect
6471
github.com/moby/term v0.5.0 // indirect
6572
github.com/morikuni/aec v1.0.0 // indirect
6673
github.com/opencontainers/go-digest v1.0.0 // indirect
6774
github.com/opencontainers/image-spec v1.1.0-rc4 // indirect
68-
github.com/opencontainers/runc v1.1.12 // indirect
6975
github.com/pmezard/go-difflib v1.0.0 // indirect
76+
github.com/rogpeppe/go-internal v1.10.0 // indirect
7077
github.com/russross/blackfriday/v2 v2.1.0 // indirect
7178
github.com/sirupsen/logrus v1.9.3 // indirect
72-
github.com/stretchr/objx v0.5.0 // indirect
79+
github.com/stretchr/objx v0.5.2 // indirect
7380
github.com/tklauser/go-sysconf v0.3.11 // indirect
7481
github.com/tklauser/numcpus v0.6.1 // indirect
7582
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
7683
github.com/yusufpapurcu/wmi v1.2.3 // indirect
84+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect
85+
go.opentelemetry.io/otel v1.30.0 // indirect
86+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0 // indirect
87+
go.opentelemetry.io/otel/metric v1.30.0 // indirect
88+
go.opentelemetry.io/otel/sdk v1.18.0 // indirect
89+
go.opentelemetry.io/otel/trace v1.30.0 // indirect
7790
golang.org/x/net v0.17.0 // indirect
7891
golang.org/x/sys v0.13.0 // indirect
7992
golang.org/x/text v0.13.0 // indirect
8093
golang.org/x/tools v0.11.0 // indirect
8194
google.golang.org/appengine v1.6.7 // indirect
95+
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
96+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
8297
google.golang.org/protobuf v1.31.0 // indirect
98+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
8399
)

0 commit comments

Comments
 (0)