Re: [go-nuts] How can I compare the interface in a generic function

2017-01-05 Thread Ian Lance Taylor
On Thu, Jan 5, 2017 at 5:29 PM, hui zhang wrote: > > How can I compare the interface ? > I want to implement a generic function. > the <=>= report error in this code > > func InRange(a, b, c interface{}) bool { >if c >= a && c <= b { > return true >} else { > return false

[go-nuts] How can I compare the interface in a generic function

2017-01-05 Thread hui zhang
How can I compare the interface ? I want to implement a generic function. the <=>= report error in this code func InRange(a, b, c interface{}) bool { if c >= a && c <= b { return true } else { return false } } -- You received this message because you are subscribed to t