newHistoryFormat returns a format for rendering a historyContext.
(source string, quiet bool, human bool)
| 22 | |
| 23 | // newHistoryFormat returns a format for rendering a historyContext. |
| 24 | func newHistoryFormat(source string, quiet bool, human bool) formatter.Format { |
| 25 | if source == formatter.TableFormatKey { |
| 26 | switch { |
| 27 | case quiet: |
| 28 | return formatter.DefaultQuietFormat |
| 29 | case !human: |
| 30 | return nonHumanHistoryTableFormat |
| 31 | default: |
| 32 | return defaultHistoryTableFormat |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | return formatter.Format(source) |
| 37 | } |
| 38 | |
| 39 | // historyWrite writes the context |
| 40 | func historyWrite(fmtCtx formatter.Context, human bool, history client.ImageHistoryResult) error { |
no outgoing calls
searching dependent graphs…