func main() { if config_filename != "" { k := key.New(config_filename) portal := portal.GetPortal() ll := lights.NewLights(portal[0].InternalIpAddress, k.Username) lights := ll.GetAllLights() fmt.Println("All Lights: ") for _, l := range lights { light := ll.GetLight(l.Id) print_light(light) } } else { usage() } }
func init() { k := key.New(username_api_key_filename) username_api_key = k.Username }