diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-18 17:57:07 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-18 17:57:07 -0800 |
commit | e45ac283ee4c6fceca0724dc0a8c118621643279 (patch) | |
tree | d53642fe3b3d1910ab5388e5cfdc1d22169b8248 /system/addon/api.go | |
parent | 5495e347ba5563397734168fffc04791a20064d2 (diff) |
debugging host port issue in config
Diffstat (limited to 'system/addon/api.go')
-rw-r--r-- | system/addon/api.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/system/addon/api.go b/system/addon/api.go index 1ca260b..7df31ef 100644 --- a/system/addon/api.go +++ b/system/addon/api.go @@ -20,6 +20,7 @@ func ContentAll(namespace string) []byte { buf := []byte{} r := bytes.NewReader(buf) url := fmt.Sprintf(endpoint, host, port, namespace) + fmt.Println(url) req, err := http.NewRequest(http.MethodGet, url, r) if err != nil { @@ -31,6 +32,10 @@ func ContentAll(namespace string) []byte { Timeout: time.Duration(time.Second * 5), } res, err := c.Do(req) + if err != nil { + log.Println("Error making HTTP request for reference of:", namespace) + return nil + } defer res.Body.Close() j, err := ioutil.ReadAll(res.Body) |