MCPcopy Index your code
hub / github.com/docker/cli / newFormat

Function newFormat

cli/command/config/formatter.go:38–49  ·  view source on GitHub ↗

newFormat returns a Format for rendering using a configContext.

(source string, quiet bool)

Source from the content-addressed store, hash-verified

36
37// newFormat returns a Format for rendering using a configContext.
38func newFormat(source string, quiet bool) formatter.Format {
39 switch source {
40 case formatter.PrettyFormatKey:
41 return configInspectPrettyTemplate
42 case formatter.TableFormatKey:
43 if quiet {
44 return formatter.DefaultQuietFormat
45 }
46 return defaultConfigTableFormat
47 }
48 return formatter.Format(source)
49}
50
51// formatWrite writes the context
52func formatWrite(fmtCtx formatter.Context, configs client.ConfigListResult) error {

Callers 3

runInspectFunction · 0.70
runListFunction · 0.70

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…