1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 10:33:34 +00:00

filter: export GlobToRegexp #5164

This commit is contained in:
Ivan Andreev
2021-04-25 14:55:51 +03:00
parent 5c646dff9a
commit c142e3edcc
3 changed files with 6 additions and 6 deletions

View File

@@ -10,10 +10,10 @@ import (
"github.com/pkg/errors"
)
// globToRegexp converts an rsync style glob to a regexp
// GlobToRegexp converts an rsync style glob to a regexp
//
// documented in filtering.md
func globToRegexp(glob string, ignoreCase bool) (*regexp.Regexp, error) {
func GlobToRegexp(glob string, ignoreCase bool) (*regexp.Regexp, error) {
var re bytes.Buffer
if ignoreCase {
_, _ = re.WriteString("(?i)")