Skip to content

Commit a0e90bb

Browse files
committed
chore: use only one version of gopkg.in/yaml
1 parent 99893f2 commit a0e90bb

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ require (
8383
github.com/valyala/quicktemplate v1.6.3
8484
github.com/yeya24/promlinter v0.1.0
8585
golang.org/x/tools v0.1.2-0.20210512205948-8287d5da45e4
86-
gopkg.in/yaml.v2 v2.4.0
8786
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
8887
honnef.co/go/tools v0.1.4
8988
mvdan.cc/gofumpt v0.1.1

test/fix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99

1010
"github.com/stretchr/testify/require"
11-
yaml "gopkg.in/yaml.v2"
11+
"gopkg.in/yaml.v3"
1212

1313
"github.com/golangci/golangci-lint/test/testshared"
1414
)

test/linters_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111

1212
"github.com/stretchr/testify/require"
13-
"gopkg.in/yaml.v2"
13+
"gopkg.in/yaml.v3"
1414

1515
"github.com/golangci/golangci-lint/pkg/exitcodes"
1616
"github.com/golangci/golangci-lint/test/testshared"

test/testdata/configs/gomodguard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ linters-settings:
55
- golang.org/x/mod/modfile
66
blocked:
77
modules: # List of blocked modules
8-
- gopkg.in/yaml.v2: # Blocked module
8+
- gopkg.in/yaml.v3: # Blocked module
99
recommendations: # Recommended modules that should be used instead (Optional)
1010
- github.com/kylelemons/go-gypsy
1111
reason: "This is an example of recommendations." # Reason why the recommended module should be used (Optional)

test/testdata/gomodguard.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"log"
77

88
"golang.org/x/mod/modfile"
9-
"gopkg.in/yaml.v2" // ERROR "import of package `gopkg.in/yaml.v2` is blocked because the module is in the blocked modules list. `github.com/kylelemons/go-gypsy` is a recommended module. This is an example of recommendations."
9+
"gopkg.in/yaml.v3" // ERROR "import of package `gopkg.in/yaml.v3` is blocked because the module is in the blocked modules list. `github.com/kylelemons/go-gypsy` is a recommended module. This is an example of recommendations."
1010
)
1111

1212
// Something just some struct

0 commit comments

Comments
 (0)