Why not write an interface for getting the radius and a radius sorter for sorting on that interface? I made a modified version of your code to illustrate. https://play.golang.org/p/Ya7tUhDnO2 *edited a typo
Why not write an interface for getting the radius and a radius sorter for sorting on that interface? I made a modified version of your code to illustrate. https://play.golang.org/p/Ya7tUhDnO2 *edited a typo