go.charczuk.com@v0.0.0-20240327042549-bc490516bd1a/experiments/huectl/pkg/hue/hue.go (about) 1 /* 2 3 Copyright (c) 2023 - Present. Will Charczuk. All rights reserved. 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file at the root of the repository. 5 6 */ 7 8 package hue 9 10 // New instantiates and returns a new Bridge. New accepts hostname/ip address to the bridge (h) as well as an username (u). 11 // h may or may not be prefixed with http(s)://. For example http://192.168.1.20/ or 192.168.1.20. 12 // u is a username known to the bridge. Use Discover() and CreateUser() to create a user. 13 func New(addr, username string) Bridge { 14 return Bridge{ 15 Addr: addr, 16 Username: username, 17 } 18 }