Skip to content

Commit 959dbda

Browse files
Merge pull request #1935 from harryzcy/yaml-update
Change yaml library to `go.yaml.in/yaml/v3`
2 parents 001eb79 + 9bb7176 commit 959dbda

6 files changed

Lines changed: 9 additions & 11 deletions

File tree

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: 3 additions & 3 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 goyaml "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 {
3535
return goyaml.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,5 +6,5 @@ go 1.17
66

77
require (
88
github.com/stretchr/objx v0.5.3
9-
gopkg.in/yaml.v3 v3.0.1
9+
go.yaml.in/yaml/v3 v3.0.5
1010
)

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
22
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
3-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
4-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5-
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
6-
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3+
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
4+
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=

0 commit comments

Comments
 (0)