From d967b29820dc0597cb0f46f4e87cf389ea2db6db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Mar 2021 07:32:47 +0000 Subject: [PATCH] Bump github.com/hashicorp/go-multierror from 1.1.0 to 1.1.1 Bumps [github.com/hashicorp/go-multierror](https://github.com/hashicorp/go-multierror) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/hashicorp/go-multierror/releases) - [Commits](https://github.com/hashicorp/go-multierror/compare/v1.1.0...v1.1.1) Signed-off-by: dependabot[bot] --- common/go.mod | 2 +- common/go.sum | 2 ++ .../hashicorp/go-multierror/.travis.yml | 12 -------- .../hashicorp/go-multierror/README.md | 29 +++++++++++++++---- .../hashicorp/go-multierror/append.go | 2 ++ .../github.com/hashicorp/go-multierror/go.mod | 2 +- .../hashicorp/go-multierror/multierror.go | 15 ++++++---- common/vendor/modules.txt | 2 +- 8 files changed, 40 insertions(+), 26 deletions(-) delete mode 100644 common/vendor/github.com/hashicorp/go-multierror/.travis.yml diff --git a/common/go.mod b/common/go.mod index a5a4bccac2..bf9cb7179f 100644 --- a/common/go.mod +++ b/common/go.mod @@ -12,7 +12,7 @@ require ( github.com/docker/go-units v0.4.0 github.com/ghodss/yaml v1.0.0 github.com/gorilla/mux v1.8.0 // indirect - github.com/hashicorp/go-multierror v1.1.0 + github.com/hashicorp/go-multierror v1.1.1 github.com/onsi/ginkgo v1.15.1 github.com/onsi/gomega v1.11.0 github.com/opencontainers/runc v1.0.0-rc93 diff --git a/common/go.sum b/common/go.sum index 81649d8b94..d5944188b1 100644 --- a/common/go.sum +++ b/common/go.sum @@ -163,6 +163,8 @@ github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iP github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= diff --git a/common/vendor/github.com/hashicorp/go-multierror/.travis.yml b/common/vendor/github.com/hashicorp/go-multierror/.travis.yml deleted file mode 100644 index 24b80388f7..0000000000 --- a/common/vendor/github.com/hashicorp/go-multierror/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: false - -language: go - -go: - - 1.x - -branches: - only: - - master - -script: env GO111MODULE=on make test testrace diff --git a/common/vendor/github.com/hashicorp/go-multierror/README.md b/common/vendor/github.com/hashicorp/go-multierror/README.md index e92fa614cd..71dd308ed8 100644 --- a/common/vendor/github.com/hashicorp/go-multierror/README.md +++ b/common/vendor/github.com/hashicorp/go-multierror/README.md @@ -1,10 +1,11 @@ # go-multierror -[![Build Status](http://img.shields.io/travis/hashicorp/go-multierror.svg?style=flat-square)][travis] -[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] +[![CircleCI](https://img.shields.io/circleci/build/github/hashicorp/go-multierror/master)](https://circleci.com/gh/hashicorp/go-multierror) +[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-multierror.svg)](https://pkg.go.dev/github.com/hashicorp/go-multierror) +![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/hashicorp/go-multierror) -[travis]: https://travis-ci.org/hashicorp/go-multierror -[godocs]: https://godoc.org/github.com/hashicorp/go-multierror +[circleci]: https://app.circleci.com/pipelines/github/hashicorp/go-multierror +[godocs]: https://pkg.go.dev/github.com/hashicorp/go-multierror `go-multierror` is a package for Go that provides a mechanism for representing a list of `error` values as a single `error`. @@ -24,7 +25,25 @@ for introspecting on error values. Install using `go get github.com/hashicorp/go-multierror`. Full documentation is available at -http://godoc.org/github.com/hashicorp/go-multierror +https://pkg.go.dev/github.com/hashicorp/go-multierror + +### Requires go version 1.13 or newer + +`go-multierror` requires go version 1.13 or newer. Go 1.13 introduced +[error wrapping](https://golang.org/doc/go1.13#error_wrapping), which +this library takes advantage of. + +If you need to use an earlier version of go, you can use the +[v1.0.0](https://github.com/hashicorp/go-multierror/tree/v1.0.0) +tag, which doesn't rely on features in go 1.13. + +If you see compile errors that look like the below, it's likely that +you're on an older version of go: + +``` +/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As +/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is +``` ## Usage diff --git a/common/vendor/github.com/hashicorp/go-multierror/append.go b/common/vendor/github.com/hashicorp/go-multierror/append.go index 775b6e753e..3e2589bfde 100644 --- a/common/vendor/github.com/hashicorp/go-multierror/append.go +++ b/common/vendor/github.com/hashicorp/go-multierror/append.go @@ -6,6 +6,8 @@ package multierror // If err is not a multierror.Error, then it will be turned into // one. If any of the errs are multierr.Error, they will be flattened // one level into err. +// Any nil errors within errs will be ignored. If err is nil, a new +// *Error will be returned. func Append(err error, errs ...error) *Error { switch err := err.(type) { case *Error: diff --git a/common/vendor/github.com/hashicorp/go-multierror/go.mod b/common/vendor/github.com/hashicorp/go-multierror/go.mod index 0afe8e6f9d..141cc4ccb2 100644 --- a/common/vendor/github.com/hashicorp/go-multierror/go.mod +++ b/common/vendor/github.com/hashicorp/go-multierror/go.mod @@ -1,5 +1,5 @@ module github.com/hashicorp/go-multierror -go 1.14 +go 1.13 require github.com/hashicorp/errwrap v1.0.0 diff --git a/common/vendor/github.com/hashicorp/go-multierror/multierror.go b/common/vendor/github.com/hashicorp/go-multierror/multierror.go index d05dd92698..f545743264 100644 --- a/common/vendor/github.com/hashicorp/go-multierror/multierror.go +++ b/common/vendor/github.com/hashicorp/go-multierror/multierror.go @@ -40,14 +40,17 @@ func (e *Error) GoString() string { return fmt.Sprintf("*%#v", *e) } -// WrappedErrors returns the list of errors that this Error is wrapping. -// It is an implementation of the errwrap.Wrapper interface so that -// multierror.Error can be used with that library. +// WrappedErrors returns the list of errors that this Error is wrapping. It is +// an implementation of the errwrap.Wrapper interface so that multierror.Error +// can be used with that library. // -// This method is not safe to be called concurrently and is no different -// than accessing the Errors field directly. It is implemented only to -// satisfy the errwrap.Wrapper interface. +// This method is not safe to be called concurrently. Unlike accessing the +// Errors field directly, this function also checks if the multierror is nil to +// prevent a null-pointer panic. It satisfies the errwrap.Wrapper interface. func (e *Error) WrappedErrors() []error { + if e == nil { + return nil + } return e.Errors } diff --git a/common/vendor/modules.txt b/common/vendor/modules.txt index e08343a713..a5e977e6f3 100644 --- a/common/vendor/modules.txt +++ b/common/vendor/modules.txt @@ -97,7 +97,7 @@ github.com/golang/protobuf/proto github.com/gorilla/mux # github.com/hashicorp/errwrap v1.0.0 github.com/hashicorp/errwrap -# github.com/hashicorp/go-multierror v1.1.0 +# github.com/hashicorp/go-multierror v1.1.1 ## explicit github.com/hashicorp/go-multierror # github.com/inconshreveable/mousetrap v1.0.0