Skip to content

Commit

Permalink
Merge pull request #167 from jedevc/fsutil-fs-in-opt
Browse files Browse the repository at this point in the history
fs: split out include/exclude into new FilterFS
  • Loading branch information
tonistiigi authored Aug 25, 2023
2 parents 36ef4d8 + da27602 commit eec1962
Show file tree
Hide file tree
Showing 11 changed files with 907 additions and 219 deletions.
6 changes: 5 additions & 1 deletion cmd/send/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ func main() {
ctx := context.Background()
s := util.NewProtoStream(ctx, os.Stdin, os.Stdout)

if err := fsutil.Send(ctx, s, fsutil.NewFS(flag.Args()[0], nil), nil); err != nil {
fs, err := fsutil.NewFS(flag.Args()[0])
if err != nil {
panic(err)
}
if err := fsutil.Send(ctx, s, fs, nil); err != nil {
panic(err)
}
}
2 changes: 1 addition & 1 deletion cmd/walk/walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func main() {
excludes = strings.Split(string(dt), "\n")
}

if err := fsutil.Walk(context.Background(), flag.Args()[0], &fsutil.WalkOpt{
if err := fsutil.Walk(context.Background(), flag.Args()[0], &fsutil.FilterOpt{
ExcludePatterns: excludes,
}, func(path string, fi os.FileInfo, err error) error {
if err != nil {
Expand Down
Loading

0 comments on commit eec1962

Please sign in to comment.