A lot of the time in Go you do have to copy-paste-tweak - sorting lists for example requires quite a bit of boiler plate.
That doesn't mean the code above is good, just that the lack of generics sometimes makes copy-pasting in Go inevitable.
That doesn't mean the code above is good, just that the lack of generics sometimes makes copy-pasting in Go inevitable.