ImageWithOnlyPaths returns a copy of the Image that only includes the files with the given root relative file paths or directories. 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 do
( image Image, paths []string, excludePaths []string, )
| 491 | // |
| 492 | // If a root relative file path does not exist, this errors. |
| 493 | func ImageWithOnlyPaths( |
| 494 | image Image, |
| 495 | paths []string, |
| 496 | excludePaths []string, |
| 497 | ) (Image, error) { |
| 498 | return imageWithOnlyPaths(image, paths, excludePaths, false) |
| 499 | } |
| 500 | |
| 501 | // ImageWithOnlyPathsAllowNotExist returns a copy of the Image that only includes the files |
| 502 | // with the given root relative file paths. |
searching dependent graphs…