Skip to content

Commit 6ff91e8

Browse files
committed
Migrate yaml library
Migrate from the archived `gopkg.in/yaml` library to the supported fork `go.yaml.in/yaml`. Signed-off-by: SuperQ <superq@gmail.com>
1 parent 65697ce commit 6ff91e8

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

assert/assertions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"unicode"
1818
"unicode/utf8"
1919

20-
// Wrapper around gopkg.in/yaml.v3
20+
// Wrapper around go.yaml.in/yaml/v3
2121
"github.com/stretchr/testify/assert/yaml"
2222
"github.com/stretchr/testify/internal/difflib"
2323
"github.com/stretchr/testify/internal/spew"

assert/yaml/yaml_custom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// go test -tags testify_yaml_custom
88
//
99
// This implementation can be used at build time to replace the default implementation
10-
// to avoid linking with [gopkg.in/yaml.v3].
10+
// to avoid linking with [go.yaml.in/yaml/v3].
1111
//
1212
// In your test package:
1313
//

assert/yaml/yaml_default.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// indirection with an alternative implementation of this package that uses
77
// another implementation of YAML deserialization. This allows to not either not
88
// use YAML deserialization at all, or to use another implementation than
9-
// [gopkg.in/yaml.v3] (for example for license compatibility reasons, see [PR #1120]).
9+
// [go.yaml.in/yaml/v3] (for example for license compatibility reasons, see [PR #1120]).
1010
//
1111
// Alternative implementations are selected using build tags:
1212
//
@@ -28,9 +28,9 @@
2828
// [PR #1120]: https://github.com/stretchr/testify/pull/1120
2929
package yaml
3030

31-
import goyaml "gopkg.in/yaml.v3"
31+
import "go.yaml.in/yaml/v3"
3232

33-
// Unmarshal is just a wrapper of [gopkg.in/yaml.v3.Unmarshal].
33+
// Unmarshal is just a wrapper of [go.yaml.in/yaml/v3.Unmarshal].
3434
func Unmarshal(in []byte, out interface{}) error {
35-
return goyaml.Unmarshal(in, out)
35+
return yaml.Unmarshal(in, out)
3636
}

assert/yaml/yaml_fail.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Package yaml is an implementation of YAML functions that always fail.
44
//
55
// This implementation can be used at build time to replace the default implementation
6-
// to avoid linking with [gopkg.in/yaml.v3]:
6+
// to avoid linking with [go.yaml.in/yaml/v3]:
77
//
88
// go test -tags testify_yaml_fail
99
package yaml

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ go 1.17
66

77
require (
88
github.com/stretchr/objx v0.5.2 // To avoid a cycle the version of testify used by objx should be excluded below
9-
gopkg.in/yaml.v3 v3.0.1
9+
go.yaml.in/yaml/v3 v3.0.4
1010
)
1111

1212
// Break dependency cycle with objx.

go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
22
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
33
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
44
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
5+
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
6+
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
57
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
68
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
7-
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
89
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 commit comments

Comments
 (0)