MCPcopy Create free account
hub / github.com/containers/common / isIntermediate

Method isIntermediate

libimage/image.go:176–185  ·  view source on GitHub ↗

isIntermediate returns true if the image is an intermediate image, that is an untagged image with children. If tree is nil, it will created for this invocation only.

(ctx context.Context, tree *layerTree)

Source from the content-addressed store, hash-verified

174// an untagged image with children. If tree is nil, it will created for this
175// invocation only.
176func (i *Image) isIntermediate(ctx context.Context, tree *layerTree) (bool, error) {
177 if len(i.Names()) > 0 {
178 return false, nil
179 }
180 children, err := i.getChildren(ctx, false, tree)
181 if err != nil {
182 return false, err
183 }
184 return len(children) != 0, nil
185}
186
187// Created returns the time the image was created.
188func (i *Image) Created() time.Time {

Callers 2

IsIntermediateMethod · 0.95
filterIntermediateFunction · 0.80

Calls 2

NamesMethod · 0.95
getChildrenMethod · 0.95

Tested by

no test coverage detected