Hacker News new | ask | show | jobs
by khyryk 1351 days ago
If I'm, again, understanding what's happening, as the example above doesn't compile in its current state, then you'll probably run into this limitation:

https://go.googlesource.com/proposal/+/refs/heads/master/des...

I believe the most simple fix would be to have a separate function which is generic that takes in the struct along with the slice of T with the constraints that apply to it.