Commit d691a31e authored by Jeff Dupont's avatar Jeff Dupont Committed by Brad Fitzpatrick

path: add example for Match

Change-Id: I5ab475011e9200c5055809e658d14c04c0a07a8a
Reviewed-on: https://go-review.googlesource.com/51413Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent ebd04885
......@@ -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 <nil>
// true <nil>
// false <nil>
}
func ExampleSplit() {
fmt.Println(path.Split("static/myfile.css"))
fmt.Println(path.Split("myfile.css"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment