ctr-remote: add wildcard support for prefetch-list option by wswsmao · Pull Request #2148 · containerd/stargz-snapshotter (original) (raw)
Conversation
#2113 introduced prefetch-list, but it only supports specific filenames. This commit adds wildcard support for the prefetch-list option, allowing users to flexibly select files to prefetch using wildcards.
Comment on lines +190 to +202
| for name := range r.allPaths { |
|---|
| matched, err := doublestar.Match(pattern, name) |
| if err != nil { |
| return matchedCount, err |
| } |
| if !matched { |
| continue |
| } |
| if err := r.Record(name); err != nil { |
| continue |
| } |
| matchedCount++ |
| } |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this to the optimize.go so that the new dependency isn't added to the root gomod?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: abushwang abushwang@tencent.com
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})