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

Function BuildCacheWrite

cli/command/formatter/buildcache.go:73–85  ·  view source on GitHub ↗

BuildCacheWrite renders the context for a list of containers

(ctx Context, buildCaches []build.CacheRecord)

Source from the content-addressed store, hash-verified

71
72// BuildCacheWrite renders the context for a list of containers
73func BuildCacheWrite(ctx Context, buildCaches []build.CacheRecord) error {
74 render := func(format func(subContext SubContext) error) error {
75 buildCacheSort(buildCaches)
76 for _, bc := range buildCaches {
77 err := format(&buildCacheContext{trunc: ctx.Trunc, v: bc})
78 if err != nil {
79 return err
80 }
81 }
82 return nil
83 }
84 return ctx.Write(newBuildCacheContext(), render)
85}
86
87type buildCacheContext struct {
88 HeaderContext

Callers

nothing calls this directly

Calls 4

buildCacheSortFunction · 0.85
formatFunction · 0.85
newBuildCacheContextFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…