I have a package which has a function `Do[T comparable](a, b []T) Result`.
I have a struct:
```go
type N struct {
  x int
  y int
  t string
}
```
Is it possible to make `N` comparable; in particular by a field of my 
choice, e.g., `t`?

Or will I have to make, say, `DoFunc(a, b []N, eq func(i, j N) bool) 
Result` with, say,
`func eq(i, j N) { return i.t == j.t }`?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/139b01ed-14e7-451b-9b0e-c7d223c678aan%40googlegroups.com.

Reply via email to