Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
kardolus
GitHub Repository: kardolus/chatgpt-cli
Path: blob/main/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go
2880 views
1
// untested sections: 2
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 any) (success bool, err error) {
11
return isNil(actual), nil
12
}
13
14
func (matcher *BeNilMatcher) FailureMessage(actual any) (message string) {
15
return format.Message(actual, "to be nil")
16
}
17
18
func (matcher *BeNilMatcher) NegatedFailureMessage(actual any) (message string) {
19
return format.Message(actual, "not to be nil")
20
}
21
22