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 {