mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
11 lines
295 B
Go
11 lines
295 B
Go
|
package vals
|
||
|
|
||
|
import "src.elv.sh/pkg/tt"
|
||
|
|
||
|
// Returns a tt.Matcher that matches using the Equal function.
|
||
|
func eq(r interface{}) tt.Matcher { return equalMatcher{r} }
|
||
|
|
||
|
type equalMatcher struct{ want interface{} }
|
||
|
|
||
|
func (em equalMatcher) Match(got tt.RetValue) bool { return Equal(got, em.want) }
|