NewStats returns a new Stats entity using the given ID, ID-prefix, or name to resolve the container.
(idOrName string)
| 115 | // NewStats returns a new Stats entity using the given ID, ID-prefix, or |
| 116 | // name to resolve the container. |
| 117 | func NewStats(idOrName string) *Stats { |
| 118 | // FIXME(thaJeztah): "idOrName" is used for fuzzy-matching the container, which can result in multiple stats for the same container. |
| 119 | // We should resolve the canonical ID once, then use that as reference |
| 120 | // to prevent duplicates. Various parts in the code compare Container |
| 121 | // against "ID" only (not considering "name" or "ID-prefix"). |
| 122 | return &Stats{StatsEntry: StatsEntry{Container: idOrName}} |
| 123 | } |
| 124 | |
| 125 | // statsFormatWrite renders the context for a list of containers statistics |
| 126 | func statsFormatWrite(ctx formatter.Context, stats []StatsEntry, osType string, trunc bool) error { |
no outgoing calls
no test coverage detected
searching dependent graphs…