copySummary formats the "Successfully copied ..." message. When contentSize differs from transferredSize, both values are shown.
(contentSize, transferredSize int64, dest string)
| 202 | // copySummary formats the "Successfully copied ..." message. |
| 203 | // When contentSize differs from transferredSize, both values are shown. |
| 204 | func copySummary(contentSize, transferredSize int64, dest string) string { |
| 205 | if contentSize != transferredSize { |
| 206 | return fmt.Sprintf("Successfully copied %s (transferred %s) to %s\n", |
| 207 | progressHumanSize(contentSize), progressHumanSize(transferredSize), dest, |
| 208 | ) |
| 209 | } |
| 210 | return fmt.Sprintf("Successfully copied %s to %s\n", |
| 211 | progressHumanSize(contentSize), dest, |
| 212 | ) |
| 213 | } |
| 214 | |
| 215 | func runCopy(ctx context.Context, dockerCli command.Cli, opts copyOptions) error { |
| 216 | srcContainer, srcPath := splitCpArg(opts.source) |
searching dependent graphs…