dependencies: ginkgo v2.9.1, gomega v1.27.4
They contain some nice-to-have improvements (for example, better printing of errors with gomega/format.Object) but nothing that is critical right now. "go mod tidy" was run manually in staging/src/k8s.io/kms/internal/plugins/mock (https://github.com/kubernetes/kubernetes/pull/116613 not merged yet).
This commit is contained in:
8
vendor/github.com/onsi/gomega/format/format.go
generated
vendored
8
vendor/github.com/onsi/gomega/format/format.go
generated
vendored
@@ -52,7 +52,7 @@ var CharactersAroundMismatchToInclude uint = 5
|
||||
var contextType = reflect.TypeOf((*context.Context)(nil)).Elem()
|
||||
var timeType = reflect.TypeOf(time.Time{})
|
||||
|
||||
//The default indentation string emitted by the format package
|
||||
// The default indentation string emitted by the format package
|
||||
var Indent = " "
|
||||
|
||||
var longFormThreshold = 20
|
||||
@@ -258,7 +258,11 @@ Set PrintContextObjects to true to print the content of objects implementing con
|
||||
func Object(object interface{}, indentation uint) string {
|
||||
indent := strings.Repeat(Indent, int(indentation))
|
||||
value := reflect.ValueOf(object)
|
||||
return fmt.Sprintf("%s<%s>: %s", indent, formatType(value), formatValue(value, indentation))
|
||||
commonRepresentation := ""
|
||||
if err, ok := object.(error); ok {
|
||||
commonRepresentation += "\n" + IndentString(err.Error(), indentation) + "\n" + indent
|
||||
}
|
||||
return fmt.Sprintf("%s<%s>: %s%s", indent, formatType(value), commonRepresentation, formatValue(value, indentation))
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user