From 3d0ad2f5e81c734bc0ca6364d2ea7c966ef5dbb9 Mon Sep 17 00:00:00 2001 From: Collin Guarino Date: Sun, 24 Jan 2016 23:36:07 -0500 Subject: Improved function header documentation format. --- bridge.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bridge.go') diff --git a/bridge.go b/bridge.go index 2b3caa4..ea6d2ce 100644 --- a/bridge.go +++ b/bridge.go @@ -1,7 +1,6 @@ package main // username: 319b36233bd2328f3e40731b23479207 - import ( "log" "os" @@ -15,6 +14,8 @@ import ( func main() { bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207") log.Println(bridge.IPAddress) + + GetAllLights(bridge) } type Bridge struct { @@ -42,6 +43,7 @@ type Device struct { UDN string `xml:"UDN"` } +// NewBridge defines hardware that is compatible with Hue. func NewBridge(ip string, username string) *Bridge { bridge := Bridge { IPAddress: ip, @@ -52,7 +54,8 @@ func NewBridge(ip string, username string) *Bridge { return &bridge } -// Go to http:///description.xml set the bridge.Info +// GetBridgeInfo retreives the description.xml file from the bridge. +// Go to http:///description.xml func GetBridgeInfo(self *Bridge) { response, error := http.Get("http://" + self.IPAddress + "/description.xml") if error != nil { -- cgit v1.2.3