Updating dependencies (#9139)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3539a9a60b
Коммит
bac3376278
2
vendor/github.com/hashicorp/errwrap/README.md
сгенерированный
поставляемый
2
vendor/github.com/hashicorp/errwrap/README.md
сгенерированный
поставляемый
@@ -48,7 +48,7 @@ func main() {
|
||||
// We can use the Contains helpers to check if an error contains
|
||||
// another error. It is safe to do this with a nil error, or with
|
||||
// an error that doesn't even use the errwrap package.
|
||||
if errwrap.Contains(err, ErrNotExist) {
|
||||
if errwrap.Contains(err, "does not exist") {
|
||||
// Do something
|
||||
}
|
||||
if errwrap.ContainsType(err, new(os.PathError)) {
|
||||
|
||||
6
vendor/github.com/hashicorp/go-multierror/format.go
сгенерированный
поставляемый
6
vendor/github.com/hashicorp/go-multierror/format.go
сгенерированный
поставляемый
@@ -13,7 +13,7 @@ type ErrorFormatFunc func([]error) string
|
||||
// that occurred along with a bullet point list of the errors.
|
||||
func ListFormatFunc(es []error) string {
|
||||
if len(es) == 1 {
|
||||
return fmt.Sprintf("1 error occurred:\n\n* %s", es[0])
|
||||
return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0])
|
||||
}
|
||||
|
||||
points := make([]string, len(es))
|
||||
@@ -22,6 +22,6 @@ func ListFormatFunc(es []error) string {
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"%d errors occurred:\n\n%s",
|
||||
len(es), strings.Join(points, "\n"))
|
||||
"%d errors occurred:\n\t%s\n\n",
|
||||
len(es), strings.Join(points, "\n\t"))
|
||||
}
|
||||
|
||||
16
vendor/github.com/hashicorp/go-multierror/sort.go
сгенерированный
поставляемый
Обычный файл
16
vendor/github.com/hashicorp/go-multierror/sort.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,16 @@
|
||||
package multierror
|
||||
|
||||
// Len implements sort.Interface function for length
|
||||
func (err Error) Len() int {
|
||||
return len(err.Errors)
|
||||
}
|
||||
|
||||
// Swap implements sort.Interface function for swapping elements
|
||||
func (err Error) Swap(i, j int) {
|
||||
err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i]
|
||||
}
|
||||
|
||||
// Less implements sort.Interface function for determining order
|
||||
func (err Error) Less(i, j int) bool {
|
||||
return err.Errors[i].Error() < err.Errors[j].Error()
|
||||
}
|
||||
Ссылка в новой задаче
Block a user