From 547c1bb8d9240ff5a531890bda193ce0a17edff1 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Sat, 17 Dec 2016 06:39:43 -0800 Subject: editing server and reference --- system/api/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system') diff --git a/system/api/server.go b/system/api/server.go index c6d29bf..d663fe4 100644 --- a/system/api/server.go +++ b/system/api/server.go @@ -19,7 +19,7 @@ func Run() { } // ContentAll retrives all items from the HTTP API within the provided namespace -func ContentAll(namespace string) [][]byte { +func ContentAll(namespace string) []byte { endpoint := "http://0.0.0.0:8080/api/contents?type=" buf := []byte{} r := bytes.NewReader(buf) @@ -31,9 +31,9 @@ func ContentAll(namespace string) [][]byte { c := http.Client{} res, err := c.Do(req) + defer res.Body.Close() fmt.Println(res, string(buf)) - ret := [][]byte{} - return append(ret, buf) + return buf } -- cgit v1.2.3