Skip to content

Commit e7696a9

Browse files
authored
chore: update dependencies
1 parent b6c89c5 commit e7696a9

File tree

8 files changed

+36
-29
lines changed

8 files changed

+36
-29
lines changed

.golangci.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,13 @@ linters-settings:
7070
linters:
7171
enable-all: true
7272
disable:
73+
- tenv # deprecated
7374
- sqlclosecheck # not relevant (SQL)
7475
- rowserrcheck # not relevant (SQL)
75-
- execinquery # not relevant (SQL)
7676
- cyclop # duplicate of gocyclo
7777
- ireturn
7878
- lll
7979
- dupl
80-
- gomnd
8180
- tparallel
8281
- paralleltest
8382
- testpackage
@@ -98,7 +97,7 @@ linters:
9897

9998
issues:
10099
exclude-use-default: false
101-
max-per-linter: 0
100+
max-issues-per-linter: 0
102101
max-same-issues: 0
103102
exclude:
104103
- 'ST1000: at least one file in a package should have a package comment'

.semaphore/semaphore.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ global_job_config:
2727
# so it's not possible to use sem-version.
2828
# - sem-version go 1.14
2929
- curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin"
30-
- sudo semgo go1.22
30+
- sudo semgo go1.24
3131
- export "GOPATH=$(go env GOPATH)"
3232
- export "SEMAPHORE_GIT_DIR=${GOPATH}/src/github.com/traefik/${SEMAPHORE_PROJECT_NAME}"
3333
- export "PATH=${GOPATH}/bin:${PATH}"
3434
- mkdir -vp "${SEMAPHORE_GIT_DIR}" "${GOPATH}/bin"
3535
- export GOPROXY=https://proxy.golang.org,https://athens.traefiklabs.tech,direct
3636
- cat /home/semaphore/datas/traefiker-keyfile.json | docker login -u _json_key --password-stdin https://gcr.io
37-
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.59.1
37+
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.64.6
3838
- curl -sfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | bash -s -- -b "${GOPATH}/bin"
3939
- checkout
4040
- cache restore "mod-${SEMAPHORE_PROJECT_NAME}-${SEMAPHORE_GIT_BRANCH}-$(checksum go.mod),mod-${SEMAPHORE_PROJECT_NAME}-$(checksum go.mod),mod-${SEMAPHORE_PROJECT_NAME}"

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test: clean
2020

2121
build: clean
2222
@echo Version: $(VERSION) $(BUILD_DATE)
23-
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -v -ldflags '-X "main.version=${VERSION}" -X "main.commit=${SHA}" -X "main.date=${BUILD_DATE}"' -o "./dist/${GOOS}/${GOARCH}/${BIN_NAME}"
23+
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -ldflags '-X "main.version=${VERSION}" -X "main.commit=${SHA}" -X "main.date=${BUILD_DATE}"' -o "./dist/${GOOS}/${GOARCH}/${BIN_NAME}"
2424

2525
build-linux-arm64: export GOOS := linux
2626
build-linux-arm64: export GOARCH := arm64

go.mod

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
module github.com/traefik/piceus
22

3-
go 1.22.4
3+
go 1.23.0
44

55
require (
66
github.com/ettle/strcase v0.2.0
7-
github.com/google/go-cmp v0.6.0
7+
github.com/google/go-cmp v0.7.0
88
github.com/google/go-github/v57 v57.0.0
99
github.com/http-wasm/http-wasm-host-go v0.6.0
1010
github.com/juliens/wasm-goexport v0.0.6
11-
github.com/ldez/grignotin v0.5.1
11+
github.com/ldez/grignotin v0.9.0
1212
github.com/mitchellh/mapstructure v1.5.0
1313
github.com/pelletier/go-toml v1.9.5
1414
github.com/rs/zerolog v1.31.0
1515
github.com/stealthrocket/wasi-go v0.8.0
1616
github.com/stealthrocket/wazergo v0.19.1
17-
github.com/stretchr/testify v1.9.0
17+
github.com/stretchr/testify v1.10.0
1818
github.com/tetratelabs/wazero v1.7.2
1919
github.com/traefik/paerser v0.2.0
2020
github.com/traefik/yaegi v0.16.1
@@ -25,8 +25,8 @@ require (
2525
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0
2626
go.opentelemetry.io/otel/sdk v1.27.0
2727
go.opentelemetry.io/otel/trace v1.27.0
28-
golang.org/x/mod v0.18.0
29-
golang.org/x/oauth2 v0.21.0
28+
golang.org/x/mod v0.23.0
29+
golang.org/x/oauth2 v0.27.0
3030
gopkg.in/yaml.v3 v3.0.1
3131
)
3232

go.sum

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
1818
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
1919
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
2020
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
21-
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
22-
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
21+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
22+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
2323
github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs=
2424
github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw=
2525
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
@@ -32,8 +32,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
3232
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
3333
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
3434
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
35-
github.com/ldez/grignotin v0.5.1 h1:unvSgVPNca+tzzj/ZZdHgIKKIuIxAef825ku3Ca85hk=
36-
github.com/ldez/grignotin v0.5.1/go.mod h1:jDziYTW9TJv+K/SHaCYJaKqBaX1x+RWa3hDgTSylOTc=
35+
github.com/ldez/grignotin v0.9.0 h1:MgOEmjZIVNn6p5wPaGp/0OKWyvq42KnzAt/DAb8O4Ow=
36+
github.com/ldez/grignotin v0.9.0/go.mod h1:uaVTr0SoZ1KBii33c47O1M8Jp3OP3YDwhZCmzT9GHEk=
3737
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
3838
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
3939
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
@@ -58,8 +58,8 @@ github.com/stealthrocket/wasi-go v0.8.0 h1:Hwnv3CUoMhhRyero9vt1vfwaYa9tu/Z5kmCW4
5858
github.com/stealthrocket/wasi-go v0.8.0/go.mod h1:PJ5oVs2E1ciOJnsTnav4nvTtEcJ4D1jUZAewS9pzuZg=
5959
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
6060
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
61-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
62-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
61+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
62+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
6363
github.com/tetratelabs/wazero v1.7.2 h1:1+z5nXJNwMLPAWaTePFi49SSTL0IMx/i3Fg8Yc25GDc=
6464
github.com/tetratelabs/wazero v1.7.2/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
6565
github.com/traefik/http-wasm-host-go v0.0.0-20240618100324-3c53dcaa1a70 h1:I+oBnV0orhmasb87yaX54tOAfqrV9+yKoQ1Cum5mq8w=
@@ -90,12 +90,12 @@ go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IO
9090
go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A=
9191
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8=
9292
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
93-
golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
94-
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
93+
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
94+
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
9595
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
9696
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
97-
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
98-
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
97+
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
98+
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
9999
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
100100
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
101101
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

internal/plugin/client.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (c *Client) Create(ctx context.Context, p Plugin) error {
6363

6464
defer func() { _ = resp.Body.Close() }()
6565

66-
if resp.StatusCode/100 != 2 { //nolint:usestdlibvars
66+
if resp.StatusCode/100 != 2 {
6767
body, _ := io.ReadAll(resp.Body)
6868

6969
return &APIError{
@@ -108,7 +108,7 @@ func (c *Client) Update(ctx context.Context, p Plugin) error {
108108

109109
defer func() { _ = resp.Body.Close() }()
110110

111-
if resp.StatusCode/100 != 2 { //nolint:usestdlibvars
111+
if resp.StatusCode/100 != 2 {
112112
body, _ := io.ReadAll(resp.Body)
113113
return &APIError{
114114
Message: string(body),
@@ -148,7 +148,7 @@ func (c *Client) GetByName(ctx context.Context, name string) (*Plugin, error) {
148148
return nil, fmt.Errorf("failed to read response body: %w", err)
149149
}
150150

151-
if resp.StatusCode/100 != 2 { //nolint:usestdlibvars
151+
if resp.StatusCode/100 != 2 {
152152
return nil, &APIError{
153153
Message: string(body),
154154
StatusCode: resp.StatusCode,

pkg/sources/github_test.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ func TestGHSources_Get(t *testing.T) {
1717
client := newGitHubClient(ctx, "")
1818
sources := GitHub{Client: client}
1919

20+
// Require because the tested function modifies the working directory with Chdir.
21+
wd, err := os.Getwd()
22+
require.NoError(t, err)
23+
2024
t.Cleanup(func() {
21-
_ = os.RemoveAll("./test")
25+
_ = os.Chdir(wd)
2226
})
2327

2428
repo := &github.Repository{
@@ -28,7 +32,7 @@ func TestGHSources_Get(t *testing.T) {
2832
},
2933
}
3034

31-
err := sources.Get(ctx, repo, "./test", module.Version{Path: "github.com/ldez/grignotin", Version: "v0.1.0"})
35+
err = sources.Get(ctx, repo, t.TempDir(), module.Version{Path: "github.com/ldez/grignotin", Version: "v0.1.0"})
3236
require.NoError(t, err)
3337
}
3438

pkg/sources/goproxy_test.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ func TestGPSources_Get(t *testing.T) {
1414
gpClient := goproxy.NewClient("")
1515
sources := GoProxy{Client: gpClient}
1616

17+
// Require because the tested function modifies the working directory with Chdir.
18+
wd, err := os.Getwd()
19+
require.NoError(t, err)
20+
1721
t.Cleanup(func() {
18-
_ = os.RemoveAll("./test")
22+
_ = os.Chdir(wd)
1923
})
2024

21-
err := sources.Get(context.Background(), nil, "./test", module.Version{Path: "github.com/ldez/grignotin", Version: "v0.1.0"})
25+
err = sources.Get(context.Background(), nil, t.TempDir(), module.Version{Path: "github.com/ldez/grignotin", Version: "v0.1.0"})
2226
require.NoError(t, err)
2327
}

0 commit comments

Comments
 (0)