Use regexp.MatchString rather regexp.FindString() != "". Change-Id: I12f4f7a6e4ac96be33a00bcb8fd0154735b3225b
diff --git a/fs/gitilesfs.go b/fs/gitilesfs.go index 1c0ee46..8f4287d 100644 --- a/fs/gitilesfs.go +++ b/fs/gitilesfs.go
@@ -396,7 +396,7 @@ clone := r.opts.CloneURL != "" if clone { for _, e := range r.opts.CloneOption { - if e.RE.FindString(p) != "" { + if e.RE.MatchString(p) { clone = e.Clone break }