diff --git a/commands_test.go b/commands_test.go index 8a71489a2d..67eae04b19 100644 --- a/commands_test.go +++ b/commands_test.go @@ -304,7 +304,7 @@ func TestRunDisconnectTty(t *testing.T) { // We're simulating a disconnect so the return value doesn't matter. What matters is the // fact that CmdRun returns. if err := cli.CmdRun("-i", "-t", unitTestImageID, "/bin/cat"); err != nil { - utils.Debugf("Error CmdRun: %s\n", err) + utils.Debugf("Error CmdRun: %s", err) } close(c1) @@ -549,7 +549,7 @@ func TestAttachDisconnect(t *testing.T) { go func() { // Start a process in daemon mode if err := cli.CmdRun("-d", "-i", unitTestImageID, "/bin/cat"); err != nil { - utils.Debugf("Error CmdRun: %s\n", err) + utils.Debugf("Error CmdRun: %s", err) } }() diff --git a/image.go b/image.go index 9f34160b80..a62724803f 100644 --- a/image.go +++ b/image.go @@ -92,7 +92,7 @@ func StoreImage(img *Image, jsonData []byte, layerData Archive, root string) err if err := Untar(layerData, layer); err != nil { return err } - utils.Debugf("Untar time: %vs\n", time.Now().Sub(start).Seconds()) + utils.Debugf("Untar time: %vs", time.Now().Sub(start).Seconds()) } // If raw json is provided, then use it @@ -335,7 +335,7 @@ func (img *Image) getParentsSize(size int64) int64 { func NewImgJSON(src []byte) (*Image, error) { ret := &Image{} - utils.Debugf("Json string: {%s}\n", src) + utils.Debugf("Json string: {%s}", src) // FIXME: Is there a cleaner way to "purify" the input json? if err := json.Unmarshal(src, ret); err != nil { return nil, err diff --git a/registry/registry.go b/registry/registry.go index 74e3173928..9e49f35660 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -499,7 +499,7 @@ func (r *Registry) PushImageJSONIndex(indexEp, remote string, imgList []*ImgData } u := fmt.Sprintf("%srepositories/%s/%s", indexEp, remote, suffix) utils.Debugf("[registry] PUT %s", u) - utils.Debugf("Image list pushed to index:\n%s\n", imgListJSON) + utils.Debugf("Image list pushed to index:\n%s", imgListJSON) req, err := r.reqFactory.NewRequest("PUT", u, bytes.NewReader(imgListJSON)) if err != nil { return nil, err @@ -520,7 +520,7 @@ func (r *Registry) PushImageJSONIndex(indexEp, remote string, imgList []*ImgData // Redirect if necessary for res.StatusCode >= 300 && res.StatusCode < 400 { - utils.Debugf("Redirected to %s\n", res.Header.Get("Location")) + utils.Debugf("Redirected to %s", res.Header.Get("Location")) req, err = r.reqFactory.NewRequest("PUT", res.Header.Get("Location"), bytes.NewReader(imgListJSON)) if err != nil { return nil, err