Fix error message

pull/290/head
jackgr 9 years ago
parent 69f3b1d9b2
commit 6e1821c4bb

@ -272,10 +272,10 @@ func callService(path, method, action string, reader io.ReadCloser) {
var URL *url.URL var URL *url.URL
URL, err := url.Parse(*service) URL, err := url.Parse(*service)
if err != nil { if err != nil {
panic(fmt.Errorf("cannot parse url (%s): %s\n", path, err)) panic(fmt.Errorf("cannot parse url (%s): %s\n", *service, err))
} }
URL.Path = strings.TrimRight(URL.Path, "/") + "/" + strings.TrimLeft(path, "/") URL.Path = strings.TrimRight(URL.Path, "/") + "/" + strings.TrimLeft(path, "/")
resp := callHTTP(URL.String(), method, action, reader) resp := callHTTP(URL.String(), method, action, reader)
var j interface{} var j interface{}
if err := json.Unmarshal([]byte(resp), &j); err != nil { if err := json.Unmarshal([]byte(resp), &j); err != nil {

Loading…
Cancel
Save