3 ms·
It's horrible method with a horrible signature, that I didn't test :-) But the short variable declaration in the type switch does indeed save the casts the OP
by Donch 12y ago
It's horrible method with a horrible signature, that I didn't test :-)
But the short variable declaration in the type switch does indeed save the casts the OP was complaining about.
Even more correct and horrible:
http://play.golang.org/p/ZMQKQhuUQT http://play.golang.org/p/ZMQKQhuUQT