From d691a31ec1f8cd7a38a781714a82d55dcaf8eb6c Mon Sep 17 00:00:00 2001 From: Jeff Dupont Date: Wed, 26 Jul 2017 20:27:53 -0700 Subject: [PATCH] path: add example for Match Change-Id: I5ab475011e9200c5055809e658d14c04c0a07a8a Reviewed-on: https://go-review.googlesource.com/51413 Reviewed-by: Brad Fitzpatrick --- src/path/example_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/path/example_test.go b/src/path/example_test.go index d962e3d331..315401957a 100644 --- a/src/path/example_test.go +++ b/src/path/example_test.go @@ -91,6 +91,16 @@ func ExampleJoin() { // a } +func ExampleMatch() { + fmt.Println(path.Match("abc", "abc")) + fmt.Println(path.Match("a*", "abc")) + fmt.Println(path.Match("a*/b", "a/c/b")) + // Output: + // true + // true + // false +} + func ExampleSplit() { fmt.Println(path.Split("static/myfile.css")) fmt.Println(path.Split("myfile.css"))