Skip to content

Commit 6aa120b

Browse files
authored
chore: switch YAML library (#3507)
* chore(deps): switch from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 The former is unmaintained. * chore: consistently use 0 as Go patch version * chore: bump github.com/spf13/cobra This is to pick up spf13/cobra#2336 to have one less dependency on spf13/cobra#2336.
1 parent 21b368b commit 6aa120b

File tree

13 files changed

+26
-20
lines changed

13 files changed

+26
-20
lines changed

modulegen/go.mod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
module github.com/testcontainers/testcontainers-go/modulegen
22

3-
go 1.24
3+
go 1.24.0
44

55
toolchain go1.24.7
66

77
require (
8-
github.com/spf13/cobra v1.8.0
8+
github.com/spf13/cobra v1.10.2
99
github.com/stretchr/testify v1.11.1
10+
go.yaml.in/yaml/v3 v3.0.4
1011
golang.org/x/mod v0.16.0
1112
golang.org/x/text v0.14.0
12-
gopkg.in/yaml.v3 v3.0.1
1313
)
1414

1515
require (
1616
github.com/davecgh/go-spew v1.1.1 // indirect
1717
github.com/inconshreveable/mousetrap v1.1.0 // indirect
1818
github.com/pmezard/go-difflib v1.0.0 // indirect
19-
github.com/spf13/pflag v1.0.5 // indirect
19+
github.com/spf13/pflag v1.0.9 // indirect
20+
gopkg.in/yaml.v3 v3.0.1 // indirect
2021
)

modulegen/go.sum

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
1+
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
22
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
55
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
66
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
77
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
88
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
9-
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
10-
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
11-
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
12-
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
9+
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
10+
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
11+
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
12+
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1313
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
1414
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
15+
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
16+
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
1517
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
1618
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
1719
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=

modulegen/internal/dependabot/reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"os"
66

7-
"gopkg.in/yaml.v3"
7+
"go.yaml.in/yaml/v3"
88
)
99

1010
func readConfig(configFile string) (*Config, error) {

modulegen/internal/dependabot/writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66
"path/filepath"
77

8-
"gopkg.in/yaml.v3"
8+
"go.yaml.in/yaml/v3"
99
)
1010

1111
func writeConfig(configFile string, config *Config) error {

modulegen/internal/mkdocs/reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"os"
66

7-
"gopkg.in/yaml.v3"
7+
"go.yaml.in/yaml/v3"
88
)
99

1010
// ReadConfig reads the mkdocs config file, returning a Config struct and an error if it fails.

modulegen/internal/mkdocs/writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"path/filepath"
77
"strings"
88

9-
"gopkg.in/yaml.v3"
9+
"go.yaml.in/yaml/v3"
1010
)
1111

1212
func writeConfig(configFile string, config *Config) error {

modules/compose/compose_local.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
"github.com/docker/docker/api/types/container"
1616
"github.com/docker/docker/api/types/filters"
17-
"gopkg.in/yaml.v3"
17+
"go.yaml.in/yaml/v3"
1818

1919
"github.com/testcontainers/testcontainers-go"
2020
"github.com/testcontainers/testcontainers-go/log"

modules/compose/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ require (
1212
github.com/google/uuid v1.6.0
1313
github.com/stretchr/testify v1.11.1
1414
github.com/testcontainers/testcontainers-go v0.40.0
15+
go.yaml.in/yaml/v3 v3.0.4
1516
golang.org/x/sync v0.18.0
16-
gopkg.in/yaml.v3 v3.0.1
1717
)
1818

1919
require (
@@ -174,7 +174,6 @@ require (
174174
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
175175
go.opentelemetry.io/otel/trace v1.36.0 // indirect
176176
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
177-
go.yaml.in/yaml/v3 v3.0.4 // indirect
178177
golang.org/x/crypto v0.45.0 // indirect
179178
golang.org/x/net v0.47.0 // indirect
180179
golang.org/x/oauth2 v0.30.0 // indirect
@@ -189,6 +188,7 @@ require (
189188
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
190189
gopkg.in/inf.v0 v0.9.1 // indirect
191190
gopkg.in/ini.v1 v1.67.0 // indirect
191+
gopkg.in/yaml.v3 v3.0.1 // indirect
192192
k8s.io/api v0.32.3 // indirect
193193
k8s.io/apimachinery v0.32.3 // indirect
194194
k8s.io/client-go v0.32.3 // indirect

modules/k3s/go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/docker/go-connections v0.6.0
1010
github.com/stretchr/testify v1.11.1
1111
github.com/testcontainers/testcontainers-go v0.40.0
12-
gopkg.in/yaml.v3 v3.0.1
12+
go.yaml.in/yaml/v3 v3.0.4
1313
k8s.io/api v0.29.2
1414
k8s.io/apimachinery v0.29.2
1515
k8s.io/client-go v0.29.2
@@ -88,6 +88,7 @@ require (
8888
google.golang.org/protobuf v1.34.2 // indirect
8989
gopkg.in/inf.v0 v0.9.1 // indirect
9090
gopkg.in/yaml.v2 v2.4.0 // indirect
91+
gopkg.in/yaml.v3 v3.0.1 // indirect
9192
k8s.io/klog/v2 v2.110.1 // indirect
9293
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
9394
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect

modules/k3s/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt
181181
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
182182
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
183183
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
184+
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
185+
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
184186
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
185187
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
186188
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=

0 commit comments

Comments
 (0)