diff options
Diffstat (limited to 'vendor/github.com/shurcooL/httpfs/filter/filters.go')
-rw-r--r-- | vendor/github.com/shurcooL/httpfs/filter/filters.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/vendor/github.com/shurcooL/httpfs/filter/filters.go b/vendor/github.com/shurcooL/httpfs/filter/filters.go deleted file mode 100644 index a20edaf4..00000000 --- a/vendor/github.com/shurcooL/httpfs/filter/filters.go +++ /dev/null @@ -1,26 +0,0 @@ -package filter - -import ( - "os" - pathpkg "path" -) - -// FilesWithExtensions returns a filter func that selects files (but not directories) -// that have any of the given extensions. For example: -// -// filter.FilesWithExtensions(".go", ".html") -// -// Would select both .go and .html files. It would not select any directories. -func FilesWithExtensions(exts ...string) Func { - return func(path string, fi os.FileInfo) bool { - if fi.IsDir() { - return false - } - for _, ext := range exts { - if pathpkg.Ext(path) == ext { - return true - } - } - return false - } -} |