type notADirectoryError … func (t notADirectoryError) Error() string { … } type BeADirectoryMatcher … func (matcher *BeADirectoryMatcher) Match(actual interface{ … } func (matcher *BeADirectoryMatcher) FailureMessage(actual interface{ … } func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual interface{ … }