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

Function newFormat

cli/command/service/formatter.go:200–207  ·  view source on GitHub ↗

newFormat returns a Format for rendering using a Context.

(source string)

Source from the content-addressed store, hash-verified

198
199// newFormat returns a Format for rendering using a Context.
200func newFormat(source string) formatter.Format {
201 switch source {
202 case formatter.PrettyFormatKey:
203 return serviceInspectPrettyTemplate
204 default:
205 return formatter.Format(strings.TrimPrefix(source, formatter.RawFormatKey))
206 }
207}
208
209func resolveNetworks(service swarm.Service, getNetwork inspect.GetRefFunc) map[string]string {
210 networkNames := make(map[string]string)

Callers 5

TestPrettyPrintFunction · 0.70
runInspectFunction · 0.70

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…