Change-Id: Id2df4895a95904a607e54dd9810bfe97f5e12a73
Reviewed-on: https://go-review.googlesource.com/c/144105
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
// a/b/c
// a/b/c
}
+
+func ExampleMatch() {
+ fmt.Println("On Unix:")
+ fmt.Println(filepath.Match("/home/catch/*", "/home/catch/foo"))
+ fmt.Println(filepath.Match("/home/catch/*", "/home/catch/foo/bar"))
+ fmt.Println(filepath.Match("/home/?opher", "/home/gopher"))
+ fmt.Println(filepath.Match("/home/\\*", "/home/*"))
+
+ // Output:
+ // On Unix:
+ // true <nil>
+ // false <nil>
+ // true <nil>
+ // true <nil>
+}