aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-01-23 23:12:08 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-01-23 23:12:08 -0500
commit00769d511a80342abb0a7aa72627da69a708a6a1 (patch)
tree4b521a097966a008700e2ddd1687eb9bc41d7a01
parent9ae1ee53a4bb503b068b1fcdadd5c18bebb2d19e (diff)
Added username to default NewBridge definition.
-rw-r--r--bridge.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/bridge.go b/bridge.go
index e77667d..2b3caa4 100644
--- a/bridge.go
+++ b/bridge.go
@@ -1,5 +1,7 @@
package main
+// username: 319b36233bd2328f3e40731b23479207
+
import (
"log"
"os"
@@ -11,10 +13,8 @@ import (
)
func main() {
- bridge := NewBridge("192.168.1.128")
+ bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207")
log.Println(bridge.IPAddress)
-
- //trace("this is a trace")
}
type Bridge struct {
@@ -42,10 +42,10 @@ type Device struct {
UDN string `xml:"UDN"`
}
-func NewBridge(ip string) *Bridge {
+func NewBridge(ip string, username string) *Bridge {
bridge := Bridge {
IPAddress: ip,
- // TODO: other defaults here
+ Username: username,
}
GetBridgeInfo(&bridge)