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)
| 174 | // an untagged image with children. If tree is nil, it will created for this |
| 175 | // invocation only. |
| 176 | func (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. |
| 188 | func (i *Image) Created() time.Time { |
no test coverage detected