arnaucube
arnaucube/mirror-to-giteaPublic Self-hosted repository
mirror-to-gitea/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go
vendor/github.com/onsi/gomega/matchers/be_nil_matcher.goRaw
 1// untested sections: 2
 2
 3package matchers
 4
 5import "github.com/onsi/gomega/format"
 6
 7type BeNilMatcher struct {
 8}
 9
10func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) {
11	return isNil(actual), nil
12}
13
14func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) {
15	return format.Message(actual, "to be nil")
16}
17
18func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) {
19	return format.Message(actual, "not to be nil")
20}