Update go dependencies
This commit is contained in:
parent
15ffb51394
commit
bb4d483837
1621 changed files with 86368 additions and 284392 deletions
7
vendor/github.com/onsi/gomega/format/format.go
generated
vendored
7
vendor/github.com/onsi/gomega/format/format.go
generated
vendored
|
|
@ -30,6 +30,9 @@ Set PrintContextObjects = true to enable printing of the context internals.
|
|||
*/
|
||||
var PrintContextObjects = false
|
||||
|
||||
// TruncatedDiff choose if we should display a truncated pretty diff or not
|
||||
var TruncatedDiff = true
|
||||
|
||||
// Ctx interface defined here to keep backwards compatability with go < 1.7
|
||||
// It matches the context.Context interface
|
||||
type Ctx interface {
|
||||
|
|
@ -82,7 +85,7 @@ to equal |
|
|||
*/
|
||||
|
||||
func MessageWithDiff(actual, message, expected string) string {
|
||||
if len(actual) >= truncateThreshold && len(expected) >= truncateThreshold {
|
||||
if TruncatedDiff && len(actual) >= truncateThreshold && len(expected) >= truncateThreshold {
|
||||
diffPoint := findFirstMismatch(actual, expected)
|
||||
formattedActual := truncateAndFormat(actual, diffPoint)
|
||||
formattedExpected := truncateAndFormat(expected, diffPoint)
|
||||
|
|
@ -123,7 +126,7 @@ func findFirstMismatch(a, b string) int {
|
|||
bSlice := strings.Split(b, "")
|
||||
|
||||
for index, str := range aSlice {
|
||||
if index > len(b) - 1 {
|
||||
if index > len(bSlice)-1 {
|
||||
return index
|
||||
}
|
||||
if str != bSlice[index] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue