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

Function newFormat

cli/command/secret/formatter.go:37–48  ·  view source on GitHub ↗

newFormat returns a Format for rendering using a secretContext.

(source string, quiet bool)

Source from the content-addressed store, hash-verified

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

Callers 3

runSecretInspectFunction · 0.70
runSecretListFunction · 0.70

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…