(w io.Writer, status string, roots []*progressNode, start time.Time)
| 282 | } |
| 283 | |
| 284 | func displayHierarchy(w io.Writer, status string, roots []*progressNode, start time.Time) { |
| 285 | total := displayNode(w, "", roots) |
| 286 | for _, r := range roots { |
| 287 | if desc := r.mainDesc(); desc != nil { |
| 288 | fmt.Fprintf(w, "%s %s\n", desc.MediaType, desc.Digest) |
| 289 | } |
| 290 | } |
| 291 | // Print the Status line |
| 292 | fmt.Fprintf(w, "%s\telapsed: %-4.1fs\ttotal: %7.6v\t(%v)\t\n", |
| 293 | status, |
| 294 | time.Since(start).Seconds(), |
| 295 | progress.Bytes(total), |
| 296 | progress.NewBytesPerSecond(total, time.Since(start))) |
| 297 | } |
| 298 | |
| 299 | func displayNode(w io.Writer, prefix string, nodes []*progressNode) int64 { |
| 300 | var total int64 |
no test coverage detected
searching dependent graphs…