bjeanes/go-lifx — pull request #17 by radar (2014-08-03 03:27:02+00:00)
Title: Track unique lights in a map

Instead of lights being a "blind" collection of lights, it's now a map. The key in the map is the DeviceID and therefore if we want to find/target a single light that becomes much easier now.

This PR also changes client to send not *one but two* `LightGet` messages out. I had some instances on my own network where sending only one message would mean *sometimes* only one light would respond. I have not seen so far an event where sending these two messages means that one light does not respond. I do not know how this works, but it does so I've left it.

This also separates the light+light collection stuff into two separate files because files are cheap.