ImageWithOnlyPathsAllowNotExist returns a copy of the Image that only includes the files with the given root relative file paths. Note that paths can be either files or directories - whether or not a path is included is a result of normalpath.EqualsOrContainsPath. If a root relative file path does
( image Image, paths []string, excludePaths []string, )
| 506 | // |
| 507 | // If a root relative file path does not exist, this skips this path. |
| 508 | func ImageWithOnlyPathsAllowNotExist( |
| 509 | image Image, |
| 510 | paths []string, |
| 511 | excludePaths []string, |
| 512 | ) (Image, error) { |
| 513 | return imageWithOnlyPaths(image, paths, excludePaths, true) |
| 514 | } |
| 515 | |
| 516 | // ImageByDir returns multiple images that have non-imports split |
| 517 | // by directory. |
searching dependent graphs…