From f8d14bd4c6a0e3c58130be159b05b8aa63374f6e Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 4 Mar 2016 23:15:44 +0800 Subject: [PATCH] Fix typo for download and upload retry messages Signed-off-by: Jay --- distribution/xfer/download.go | 2 +- distribution/xfer/upload.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/xfer/download.go b/distribution/xfer/download.go index 2536f1dd23..f8898a07cb 100644 --- a/distribution/xfer/download.go +++ b/distribution/xfer/download.go @@ -263,7 +263,7 @@ func (ldm *LayerDownloadManager) makeDownloadFunc(descriptor DownloadDescriptor, selectLoop: for { - progress.Updatef(progressOutput, descriptor.ID(), "Retrying in %d seconds", delay) + progress.Updatef(progressOutput, descriptor.ID(), "Retrying in %d second%s", delay, (map[bool]string{true: "s"})[delay != 1]) select { case <-ticker.C: delay-- diff --git a/distribution/xfer/upload.go b/distribution/xfer/upload.go index 20fe045ac6..563824c11d 100644 --- a/distribution/xfer/upload.go +++ b/distribution/xfer/upload.go @@ -141,7 +141,7 @@ func (lum *LayerUploadManager) makeUploadFunc(descriptor UploadDescriptor) DoFun selectLoop: for { - progress.Updatef(progressOutput, descriptor.ID(), "Retrying in %d seconds", delay) + progress.Updatef(progressOutput, descriptor.ID(), "Retrying in %d second%s", delay, (map[bool]string{true: "s"})[delay != 1]) select { case <-ticker.C: delay--