2 ms·
It's not super elegant, but if you need to satisfy the same interface in two different ways, you can do it with a helper that gives a particular view into your
by dilap 12y ago
It's not super elegant, but if you need to satisfy the same interface in two different ways, you can do it with a helper that gives a particular view into your class.
https://play.golang.org/p/t0gjJHjU7y https://play.golang.org/p/t0gjJHjU7y
Edit: another variation on the same idea: https://play.golang.org/p/FqSFpMKQuv https://play.golang.org/p/FqSFpMKQuv