getChildren returns a list of imageIDs that depend on the image. If all is false, only the first child image is returned. If tree is nil, it will be created for this invocation only.
(ctx context.Context, all bool, tree *layerTree)
| 242 | // false, only the first child image is returned. If tree is nil, it will be |
| 243 | // created for this invocation only. |
| 244 | func (i *Image) getChildren(ctx context.Context, all bool, tree *layerTree) ([]*Image, error) { |
| 245 | if tree == nil { |
| 246 | t, err := i.runtime.layerTree() |
| 247 | if err != nil { |
| 248 | return nil, err |
| 249 | } |
| 250 | tree = t |
| 251 | } |
| 252 | return tree.children(ctx, i, all) |
| 253 | } |
| 254 | |
| 255 | // Containers returns a list of containers using the image. |
| 256 | func (i *Image) Containers() ([]string, error) { |
no test coverage detected