From 6e1821c4bb1c0b927fb99fa5ac1325bf41267db7 Mon Sep 17 00:00:00 2001 From: jackgr Date: Mon, 29 Feb 2016 11:40:34 -0800 Subject: [PATCH] Fix error message --- dm/dm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dm/dm.go b/dm/dm.go index 03ee06dbb..b348605fd 100644 --- a/dm/dm.go +++ b/dm/dm.go @@ -272,10 +272,10 @@ func callService(path, method, action string, reader io.ReadCloser) { var URL *url.URL URL, err := url.Parse(*service) 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) var j interface{} if err := json.Unmarshal([]byte(resp), &j); err != nil {