diff --git a/cmd/skopeo/sync.go b/cmd/skopeo/sync.go index 120d50c965..810edc9c99 100644 --- a/cmd/skopeo/sync.go +++ b/cmd/skopeo/sync.go @@ -26,7 +26,7 @@ import ( "github.com/opencontainers/go-digest" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) // syncOptions contains information retrieved from the skopeo sync command line. @@ -134,9 +134,9 @@ See skopeo-sync(1) for details. // method for the tlsVerifyConfig type. // It unmarshals the 'tls-verify' YAML key so that, when they key is not // specified, tls verification is enforced. -func (tls *tlsVerifyConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { +func (tls *tlsVerifyConfig) UnmarshalYAML(value *yaml.Node) error { var verify bool - if err := unmarshal(&verify); err != nil { + if err := value.Decode(&verify); err != nil { return err } diff --git a/go.mod b/go.mod index 751d9136f9..71222dbe65 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 golang.org/x/term v0.4.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c - gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -132,5 +132,5 @@ require ( google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect )