3 ms·
Unfortunately "comparable" is not an interface, and the default implementation (which you can't opt out of) sometimes panics.
by erik_seaberg 6y ago
Unfortunately "comparable" is not an interface, and the default implementation (which you can't opt out of) sometimes panics.
- pjmlp 6y agoLike in everything Go, you opt out by using a clever hack like having a nameless non comparable field in the struct. Oh yeah.