...
1
2
3 package matchers
4
5 import "github.com/onsi/gomega/format"
6
7 type BeNilMatcher struct {
8 }
9
10 func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) {
11 return isNil(actual), nil
12 }
13
14 func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) {
15 return format.Message(actual, "to be nil")
16 }
17
18 func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) {
19 return format.Message(actual, "not to be nil")
20 }
21
View as plain text