Update go dependencies
This commit is contained in:
parent
55ccaf4be3
commit
2882fb5ebe
457 changed files with 54614 additions and 19833 deletions
12
vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go
generated
vendored
12
vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go
generated
vendored
|
|
@ -2,7 +2,6 @@ package matchers
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/onsi/gomega/format"
|
||||
|
|
@ -10,7 +9,8 @@ import (
|
|||
)
|
||||
|
||||
type MatchYAMLMatcher struct {
|
||||
YAMLToMatch interface{}
|
||||
YAMLToMatch interface{}
|
||||
firstFailurePath []interface{}
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
|
|
@ -29,17 +29,19 @@ func (matcher *MatchYAMLMatcher) Match(actual interface{}) (success bool, err er
|
|||
return false, fmt.Errorf("Expected '%s' should be valid YAML, but it is not.\nUnderlying error:%s", expectedString, err)
|
||||
}
|
||||
|
||||
return reflect.DeepEqual(aval, eval), nil
|
||||
var equal bool
|
||||
equal, matcher.firstFailurePath = deepEqual(aval, eval)
|
||||
return equal, nil
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
actualString, expectedString, _ := matcher.toNormalisedStrings(actual)
|
||||
return format.Message(actualString, "to match YAML of", expectedString)
|
||||
return formattedMessage(format.Message(actualString, "to match YAML of", expectedString), matcher.firstFailurePath)
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
actualString, expectedString, _ := matcher.toNormalisedStrings(actual)
|
||||
return format.Message(actualString, "not to match YAML of", expectedString)
|
||||
return formattedMessage(format.Message(actualString, "not to match YAML of", expectedString), matcher.firstFailurePath)
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) toNormalisedStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue