diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-01-23 23:12:08 -0500 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-01-23 23:12:08 -0500 |
commit | 00769d511a80342abb0a7aa72627da69a708a6a1 (patch) | |
tree | 4b521a097966a008700e2ddd1687eb9bc41d7a01 | |
parent | 9ae1ee53a4bb503b068b1fcdadd5c18bebb2d19e (diff) |
Added username to default NewBridge definition.
-rw-r--r-- | bridge.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) |