MCPcopy Create free account
hub / github.com/buildpacks/pack / Clear

Method Clear

pkg/cache/image_cache.go:32–40  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

30}
31
32func (c *ImageCache) Clear(ctx context.Context) error {
33 _, err := c.docker.ImageRemove(ctx, c.Name(), dockerClient.ImageRemoveOptions{
34 Force: true,
35 })
36 if err != nil && !cerrdefs.IsNotFound(err) {
37 return err
38 }
39 return nil
40}
41
42func (c *ImageCache) Type() Type {
43 return Image

Callers 2

testImageCacheFunction · 0.95
testAcceptanceFunction · 0.95

Calls 2

NameMethod · 0.95
ImageRemoveMethod · 0.65

Tested by 2

testImageCacheFunction · 0.76
testAcceptanceFunction · 0.76