Update go dependencies

This commit is contained in:
Manuel de Brito Fontes 2017-07-16 15:30:35 -04:00 committed by Minhan Xia
parent 060e449056
commit 4fb61c73d1
1192 changed files with 185874 additions and 302749 deletions

View file

@ -1,7 +1,9 @@
package mapstructure
import (
"errors"
"fmt"
"sort"
"strings"
)
@ -17,11 +19,27 @@ func (e *Error) Error() string {
points[i] = fmt.Sprintf("* %s", err)
}
sort.Strings(points)
return fmt.Sprintf(
"%d error(s) decoding:\n\n%s",
len(e.Errors), strings.Join(points, "\n"))
}
// WrappedErrors implements the errwrap.Wrapper interface to make this
// return value more useful with the errwrap and go-multierror libraries.
func (e *Error) WrappedErrors() []error {
if e == nil {
return nil
}
result := make([]error, len(e.Errors))
for i, e := range e.Errors {
result[i] = errors.New(e)
}
return result
}
func appendErrors(errors []string, err error) []string {
switch e := err.(type) {
case *Error: