MCPcopy Create free account
hub / github.com/docker/cli / newHistoryFormat

Function newHistoryFormat

cli/command/image/formatter_history.go:24–37  ·  view source on GitHub ↗

newHistoryFormat returns a format for rendering a historyContext.

(source string, quiet bool, human bool)

Source from the content-addressed store, hash-verified

22
23// newHistoryFormat returns a format for rendering a historyContext.
24func 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
40func historyWrite(fmtCtx formatter.Context, human bool, history client.ImageHistoryResult) error {

Callers 2

runHistoryFunction · 0.85
TestHistoryContext_TableFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestHistoryContext_TableFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…