wolfeidau / lifx

Minimal lifx api for go
https://github.com/wolfeidau/lifx
MIT License
20 stars 4 forks source link

add String() method for *Bulb type #8

Closed theckman closed 9 years ago

theckman commented 9 years ago

Consider the following code:

for _, bulb := range c.GetBulbs() {
    fmt.Printf("bulb: %v\n", bulb)
}

Previously, you'd see memory addresses which were less than helpful. With this patch, you see the name of the bulb as provided by the GetLabel() method.

wolfeidau commented 9 years ago

Looks like a good addition, really need to remember to do that more.

Thanks!