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

Function VolumeWrite

cli/command/formatter/volume.go:47–57  ·  view source on GitHub ↗

VolumeWrite writes formatted volumes using the Context

(ctx Context, volumes []volume.Volume)

Source from the content-addressed store, hash-verified

45
46// VolumeWrite writes formatted volumes using the Context
47func VolumeWrite(ctx Context, volumes []volume.Volume) error {
48 render := func(format func(subContext SubContext) error) error {
49 for _, vol := range volumes {
50 if err := format(&volumeContext{v: vol}); err != nil {
51 return err
52 }
53 }
54 return nil
55 }
56 return ctx.Write(newVolumeContext(), render)
57}
58
59type volumeContext struct {
60 HeaderContext

Callers 3

TestVolumeContextWriteFunction · 0.85

Calls 3

formatFunction · 0.85
newVolumeContextFunction · 0.85
WriteMethod · 0.45

Tested by 3

TestVolumeContextWriteFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…