Bump buildkit to master and fix versions incompatible with go mod 1.13

Bump github.com/gogo/googleapis to v1.3.2
Bump github.com/docker/cli to master

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
This commit is contained in:
Silvin Lubecki
2020-03-03 16:46:38 +01:00
parent 54549235da
commit bbc902b4d6
1384 changed files with 186012 additions and 165455 deletions

View File

@@ -19,6 +19,8 @@ package errors
import (
"errors"
"fmt"
"k8s.io/apimachinery/pkg/util/sets"
)
// MessageCountMap contains occurrence for each error message.
@@ -67,12 +69,38 @@ func (agg aggregate) Error() string {
if len(agg) == 1 {
return agg[0].Error()
}
result := fmt.Sprintf("[%s", agg[0].Error())
for i := 1; i < len(agg); i++ {
result += fmt.Sprintf(", %s", agg[i].Error())
seenerrs := sets.NewString()
result := ""
agg.visit(func(err error) {
msg := err.Error()
if seenerrs.Has(msg) {
return
}
seenerrs.Insert(msg)
if len(seenerrs) > 1 {
result += ", "
}
result += msg
})
if len(seenerrs) == 1 {
return result
}
return "[" + result + "]"
}
func (agg aggregate) visit(f func(err error)) {
for _, err := range agg {
switch err := err.(type) {
case aggregate:
err.visit(f)
case Aggregate:
for _, nestedErr := range err.Errors() {
f(nestedErr)
}
default:
f(err)
}
}
result += "]"
return result
}
// Errors is part of the Aggregate interface.