Hi!

On Wed, Mar 28, 2018 at 02:13:55PM -0400, Shawn Milochik wrote:
> Thanks for the challenge! I found some unused code in the getItem function,
> and a way to make it a bit shorter by removing the lookup map. However,
> depending on the number of struct types the map may be cleaner for OP.
> 
> https://play.golang.org/p/ZH09nHsrRoR

This wasn't supposed to be a challenge - I tried to be as less invasive
as possible, just cleanup things a bit. If you wanna challenge - it's here:
https://play.golang.org/p/N8YLUGdP4Kb
I don't bother is it shorter, but (at least to me) it's more clear.

-- 
                        WBR, Alex.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to