Closed nkev closed 4 years ago
Ah, I think I worked it out. It's because all the operations need to implement the same interface, so they can be chained:
// QueryFunc describes a conditional function which perform comparison
type QueryFunc func(x, y interface{}) (bool, error)
I hope you get the answer yourself.
Thanks for sharing this project. One question. Why do you do this:
...and not this:
...or in this case, simply
strings.Contains(xv, yv)
without a wrapper.In this example, you are only allowing string inputs anyway, so why not use strongly typed strings as input params instead of
interface{}
?