From a6afe62ff2b276b355bbf44ab8e9a25c5807a97d Mon Sep 17 00:00:00 2001 From: David Newhall II Date: Sat, 26 Jan 2019 04:29:16 -0800 Subject: [PATCH] type strings and fix readme. --- core/unifi/README.md | 2 +- core/unifi/unidev.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/unifi/README.md b/core/unifi/README.md index 8b8c4a30..f4dd4fab 100644 --- a/core/unifi/README.md +++ b/core/unifi/README.md @@ -21,7 +21,7 @@ func main() { username := "admin" password := "superSecret1234" URL := "https://127.0.0.1:8443/" - uni, err := unifi.AuthController(username, password, URL, false) + uni, err := unifi.GetController(username, password, URL, false) if err != nil { log.Fatalln("Error:", err) } diff --git a/core/unifi/unidev.go b/core/unifi/unidev.go index ba28b895..7f2d7f54 100644 --- a/core/unifi/unidev.go +++ b/core/unifi/unidev.go @@ -13,15 +13,15 @@ import ( const ( // ClientPath is Unifi Clients API Path - ClientPath = "/api/s/default/stat/sta" + ClientPath string = "/api/s/default/stat/sta" // DevicePath is where we get data about Unifi devices. - DevicePath = "/api/s/default/stat/device" + DevicePath string = "/api/s/default/stat/device" // NetworkPath contains network-configuration data. Not really graphable. - NetworkPath = "/api/s/default/rest/networkconf" + NetworkPath string = "/api/s/default/rest/networkconf" // UserGroupPath contains usergroup configurations. - UserGroupPath = "/api/s/default/rest/usergroup" + UserGroupPath string = "/api/s/default/rest/usergroup" // LoginPath is Unifi Controller Login API Path - LoginPath = "/api/login" + LoginPath string = "/api/login" ) // Logger is a base type to deal with changing log outputs.