Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / mvdan.cc / xurls / v2@v2.2.0 / example_test.go
1 // Copyright (c) 2015, Daniel Martí <mvdan@mvdan.cc>
2 // See LICENSE for licensing information
3
4 package xurls_test
5
6 import (
7         "fmt"
8
9         "mvdan.cc/xurls/v2"
10 )
11
12 func Example() {
13         rx := xurls.Relaxed()
14         fmt.Println(rx.FindString("Do gophers live in http://golang.org?"))
15         fmt.Println(rx.FindAllString("foo.com is http://foo.com/.", -1))
16         // Output:
17         // http://golang.org
18         // [foo.com http://foo.com/]
19 }