Bump all vendoring (#1612)

Update all vendoring to current releases.

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2020-02-18 13:27:11 +01:00 committed by GitHub
commit 1567cefdae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
511 changed files with 98653 additions and 38115 deletions

View file

@ -32,6 +32,8 @@ func notSupported(op string) error {
// Errors types created by this package, such as OpError, can be used with
// IsNotExist, but this function also defers to the behavior of os.IsNotExist
// for unrecognized error types.
//
// Deprecated: make use of errors.Unwrap and errors.Is in Go 1.13+.
func IsNotExist(err error) bool {
switch err := err.(type) {
case *OpError:
@ -44,8 +46,12 @@ func IsNotExist(err error) bool {
}
}
var _ error = &OpError{}
var _ net.Error = &OpError{}
var (
_ error = &OpError{}
_ net.Error = &OpError{}
// Ensure compatibility with Go 1.13+ errors package.
_ interface{ Unwrap() error } = &OpError{}
)
// An OpError is an error produced as the result of a failed netlink operation.
type OpError struct {
@ -84,6 +90,9 @@ func (e *OpError) Error() string {
return fmt.Sprintf("netlink %s: %v", e.Op, e.Err)
}
// Unwrap unwraps the internal Err field for use with errors.Unwrap.
func (e *OpError) Unwrap() error { return e.Err }
// Portions of this code taken from the Go standard library:
//
// Copyright 2009 The Go Authors. All rights reserved.