diff options
-rw-r--r-- | system/addon/api.go | 5 | ||||
-rw-r--r-- | system/db/config.go | 2 |
2 files changed, 7 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) diff --git a/system/db/config.go b/system/db/config.go index ef3c382..17da078 100644 --- a/system/db/config.go +++ b/system/db/config.go @@ -3,6 +3,7 @@ package db import ( "bytes" "encoding/json" + "fmt" "net/url" "strings" @@ -119,6 +120,7 @@ func ConfigAll() ([]byte, error) { // PutConfig updates a single k/v in the config func PutConfig(key string, value interface{}) error { + fmt.Println(key, value) kv := make(map[string]interface{}) c, err := ConfigAll() |