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

Function ClientContextWrite

cli/command/formatter/context.go:34–44  ·  view source on GitHub ↗

ClientContextWrite writes formatted contexts using the Context

(ctx Context, contexts []*ClientContext)

Source from the content-addressed store, hash-verified

32
33// ClientContextWrite writes formatted contexts using the Context
34func ClientContextWrite(ctx Context, contexts []*ClientContext) error {
35 render := func(format func(subContext SubContext) error) error {
36 for _, context := range contexts {
37 if err := format(&clientContextContext{c: context}); err != nil {
38 return err
39 }
40 }
41 return nil
42 }
43 return ctx.Write(newClientContextContext(), render)
44}
45
46type clientContextContext struct {
47 HeaderContext

Callers

nothing calls this directly

Calls 3

formatFunction · 0.85
newClientContextContextFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…