From 71905b94d25ecc97253c7f230b7cf6c56b894797 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 9 Feb 2019 18:05:54 +0100 Subject: [PATCH] small fix in user --- config.go | 3 --- user.go | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/config.go b/config.go index 51e4ac8..ae72ec7 100644 --- a/config.go +++ b/config.go @@ -1,11 +1,8 @@ package main import ( - "bytes" - "fmt" "gopkg.in/yaml.v2" "io/ioutil" - "net/http" ) // Config hue api config diff --git a/user.go b/user.go index 5351502..5b68999 100644 --- a/user.go +++ b/user.go @@ -14,13 +14,11 @@ type User struct { } // CreateNewUser will create a new user. This should be called only of there's none in the yaml config. -func CreateUser(addr string) (name, key string, succ bool) { - +func CreateUser(addr string) (u *User, err error) { + return CreateUserExtended(addr, "go-hue-interface", "Philips hue") } // TODO: remove these comments -// example application: "go.hue.interface" -// example deviceName: "Philips hue" func CreateUserExtended(addr, application, deviceName string) (u *User, err error) { uri := "http://" + addr + "/api"