[Vendor] update mvdan.cc/xurls v2.1.0 -> v2.2.0 (#13407) (#13408)

* Vendor: mvdan.cc/xurls v2.1.0 -> v2.2.0

* CI.restart()
This commit is contained in:
6543 2020-11-03 02:57:20 +01:00 committed by GitHub
parent 2123195b3a
commit 4e10f33349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 41 additions and 27 deletions

2
go.mod
View File

@ -117,7 +117,7 @@ require (
gopkg.in/ldap.v3 v3.0.2 gopkg.in/ldap.v3 v3.0.2
gopkg.in/testfixtures.v2 v2.5.0 gopkg.in/testfixtures.v2 v2.5.0
gopkg.in/yaml.v2 v2.2.8 gopkg.in/yaml.v2 v2.2.8
mvdan.cc/xurls/v2 v2.1.0 mvdan.cc/xurls/v2 v2.2.0
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
xorm.io/builder v0.3.7 xorm.io/builder v0.3.7
xorm.io/xorm v1.0.1 xorm.io/xorm v1.0.1

5
go.sum
View File

@ -554,6 +554,7 @@ github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqn
github.com/remyoudompheng/bigfft v0.0.0-20190321074620-2f0d2b0e0001 h1:YDeskXpkNDhPdWN3REluVa46HQOVuVkjkd2sWnrABNQ= github.com/remyoudompheng/bigfft v0.0.0-20190321074620-2f0d2b0e0001 h1:YDeskXpkNDhPdWN3REluVa46HQOVuVkjkd2sWnrABNQ=
github.com/remyoudompheng/bigfft v0.0.0-20190321074620-2f0d2b0e0001/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20190321074620-2f0d2b0e0001/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
@ -852,6 +853,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogR
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE= gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
@ -885,8 +887,7 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
mvdan.cc/xurls/v2 v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA= mvdan.cc/xurls/v2 v2.2.0/go.mod h1:EV1RMtya9D6G5DMYPGD8zTQzaHet6Jh8gFlRgGRJeO8=
mvdan.cc/xurls/v2 v2.1.0/go.mod h1:5GrSd9rOnKOpZaji1OZLYL/yeAAtGDlo/cFe+8K5n8E=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 h1:mUcz5b3FJbP5Cvdq7Khzn6J9OCUQJaBwgBkCR+MOwSs= strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 h1:mUcz5b3FJbP5Cvdq7Khzn6J9OCUQJaBwgBkCR+MOwSs=
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251/go.mod h1:FJGmPh3vz9jSos1L/F91iAgnC/aejc0wIIrF2ZwJxdY= strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251/go.mod h1:FJGmPh3vz9jSos1L/F91iAgnC/aejc0wIIrF2ZwJxdY=

2
vendor/modules.txt vendored
View File

@ -842,7 +842,7 @@ gopkg.in/warnings.v0
# gopkg.in/yaml.v2 v2.2.8 # gopkg.in/yaml.v2 v2.2.8
## explicit ## explicit
gopkg.in/yaml.v2 gopkg.in/yaml.v2
# mvdan.cc/xurls/v2 v2.1.0 # mvdan.cc/xurls/v2 v2.2.0
## explicit ## explicit
mvdan.cc/xurls/v2 mvdan.cc/xurls/v2
# strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 # strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251

View File

@ -2,7 +2,7 @@
[![GoDoc](https://godoc.org/mvdan.cc/xurls?status.svg)](https://godoc.org/mvdan.cc/xurls) [![GoDoc](https://godoc.org/mvdan.cc/xurls?status.svg)](https://godoc.org/mvdan.cc/xurls)
Extract urls from text using regular expressions. Requires Go 1.12 or later. Extract urls from text using regular expressions. Requires Go 1.13 or later.
```go ```go
import "mvdan.cc/xurls/v2" import "mvdan.cc/xurls/v2"
@ -18,13 +18,18 @@ func main() {
} }
``` ```
Note that the funcs compile regexes, so avoid calling them repeatedly. Since API is centered around [regexp.Regexp](https://golang.org/pkg/regexp/#Regexp),
many other methods are available, such as finding the [byte indexes](https://golang.org/pkg/regexp/#Regexp.FindAllIndex)
for all matches.
Note that calling the exposed functions means compiling a regular expression, so
repeated calls should be avoided.
#### cmd/xurls #### cmd/xurls
To install the tool globally: To install the tool globally:
go get mvdan.cc/xurls/cmd/xurls cd $(mktemp -d); go mod init tmp; GO111MODULE=on go get mvdan.cc/xurls/v2/cmd/xurls
```shell ```shell
$ echo "Do gophers live in http://golang.org?" | xurls $ echo "Do gophers live in http://golang.org?" | xurls

View File

@ -1,3 +1,8 @@
module mvdan.cc/xurls/v2 module mvdan.cc/xurls/v2
go 1.13 go 1.14
require (
github.com/rogpeppe/go-internal v1.5.2
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)

View File

@ -0,0 +1,12 @@
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/rogpeppe/go-internal v1.5.2 h1:qLvObTrvO/XRCqmkKxUlOBc48bI3efyDuAZe25QiF0w=
github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=

View File

@ -66,6 +66,7 @@ var Schemes = []string{
`dpp`, `dpp`,
`drm`, `drm`,
`drop`, `drop`,
`dtmi`,
`dtn`, `dtn`,
`dvb`, `dvb`,
`ed2k`, `ed2k`,
@ -226,6 +227,7 @@ var Schemes = []string{
`pack`, `pack`,
`palm`, `palm`,
`paparazzi`, `paparazzi`,
`payment`,
`payto`, `payto`,
`pkcs11`, `pkcs11`,
`platform`, `platform`,
@ -238,6 +240,7 @@ var Schemes = []string{
`pttp`, `pttp`,
`qb`, `qb`,
`query`, `query`,
`quic-transport`,
`redis`, `redis`,
`rediss`, `rediss`,
`reload`, `reload`,

View File

@ -57,6 +57,7 @@ var TLDs = []string{
`alsace`, `alsace`,
`alstom`, `alstom`,
`am`, `am`,
`amazon`,
`americanexpress`, `americanexpress`,
`americanfamily`, `americanfamily`,
`amex`, `amex`,
@ -219,7 +220,6 @@ var TLDs = []string{
`career`, `career`,
`careers`, `careers`,
`cars`, `cars`,
`cartier`,
`casa`, `casa`,
`case`, `case`,
`caseih`, `caseih`,
@ -252,7 +252,6 @@ var TLDs = []string{
`chintai`, `chintai`,
`christmas`, `christmas`,
`chrome`, `chrome`,
`chrysler`,
`church`, `church`,
`ci`, `ci`,
`cipriani`, `cipriani`,
@ -366,7 +365,6 @@ var TLDs = []string{
`do`, `do`,
`docs`, `docs`,
`doctor`, `doctor`,
`dodge`,
`dog`, `dog`,
`domains`, `domains`,
`dot`, `dot`,
@ -411,7 +409,6 @@ var TLDs = []string{
`eurovision`, `eurovision`,
`eus`, `eus`,
`events`, `events`,
`everbank`,
`exchange`, `exchange`,
`expert`, `expert`,
`exposed`, `exposed`,
@ -701,12 +698,10 @@ var TLDs = []string{
`kz`, `kz`,
`la`, `la`,
`lacaixa`, `lacaixa`,
`ladbrokes`,
`lamborghini`, `lamborghini`,
`lamer`, `lamer`,
`lancaster`, `lancaster`,
`lancia`, `lancia`,
`lancome`,
`land`, `land`,
`landrover`, `landrover`,
`lanxess`, `lanxess`,
@ -727,7 +722,6 @@ var TLDs = []string{
`lexus`, `lexus`,
`lgbt`, `lgbt`,
`li`, `li`,
`liaison`,
`lidl`, `lidl`,
`life`, `life`,
`lifeinsurance`, `lifeinsurance`,
@ -829,7 +823,6 @@ var TLDs = []string{
`monash`, `monash`,
`money`, `money`,
`monster`, `monster`,
`mopar`,
`mormon`, `mormon`,
`mortgage`, `mortgage`,
`moscow`, `moscow`,
@ -837,7 +830,6 @@ var TLDs = []string{
`motorcycles`, `motorcycles`,
`mov`, `mov`,
`movie`, `movie`,
`movistar`,
`mp`, `mp`,
`mq`, `mq`,
`mr`, `mr`,
@ -856,7 +848,6 @@ var TLDs = []string{
`mz`, `mz`,
`na`, `na`,
`nab`, `nab`,
`nadex`,
`nagoya`, `nagoya`,
`name`, `name`,
`nationwide`, `nationwide`,
@ -958,7 +949,6 @@ var TLDs = []string{
`photography`, `photography`,
`photos`, `photos`,
`physio`, `physio`,
`piaget`,
`pics`, `pics`,
`pictet`, `pictet`,
`pictures`, `pictures`,
@ -1154,13 +1144,13 @@ var TLDs = []string{
`song`, `song`,
`sony`, `sony`,
`soy`, `soy`,
`spa`,
`space`, `space`,
`sport`, `sport`,
`spot`, `spot`,
`spreadbetting`, `spreadbetting`,
`sr`, `sr`,
`srl`, `srl`,
`srt`,
`ss`, `ss`,
`st`, `st`,
`stada`, `stada`,
@ -1213,7 +1203,6 @@ var TLDs = []string{
`tech`, `tech`,
`technology`, `technology`,
`tel`, `tel`,
`telefonica`,
`temasek`, `temasek`,
`tennis`, `tennis`,
`teva`, `teva`,
@ -1273,7 +1262,6 @@ var TLDs = []string{
`ua`, `ua`,
`ubank`, `ubank`,
`ubs`, `ubs`,
`uconnect`,
`ug`, `ug`,
`uk`, `uk`,
`unicom`, `unicom`,
@ -1309,7 +1297,6 @@ var TLDs = []string{
`virgin`, `virgin`,
`visa`, `visa`,
`vision`, `vision`,
`vistaprint`,
`viva`, `viva`,
`vivo`, `vivo`,
`vlaanderen`, `vlaanderen`,
@ -1328,7 +1315,6 @@ var TLDs = []string{
`walter`, `walter`,
`wang`, `wang`,
`wanggou`, `wanggou`,
`warman`,
`watch`, `watch`,
`watches`, `watches`,
`weather`, `weather`,
@ -1388,6 +1374,7 @@ var TLDs = []string{
`zuerich`, `zuerich`,
`zw`, `zw`,
`ελ`, `ελ`,
`ευ`,
`бг`, `бг`,
`бел`, `бел`,
`дети`, `дети`,
@ -1469,6 +1456,7 @@ var TLDs = []string{
`ไทย`, `ไทย`,
`გე`, `გე`,
`みんな`, `みんな`,
`アマゾン`,
`クラウド`, `クラウド`,
`グーグル`, `グーグル`,
`コム`, `コム`,
@ -1481,6 +1469,7 @@ var TLDs = []string{
`中国`, `中国`,
`中國`, `中國`,
`中文网`, `中文网`,
`亚马逊`,
`企业`, `企业`,
`佛山`, `佛山`,
`信息`, `信息`,
@ -1501,7 +1490,6 @@ var TLDs = []string{
`天主教`, `天主教`,
`娱乐`, `娱乐`,
`家電`, `家電`,
`工行`,
`广东`, `广东`,
`微博`, `微博`,
`慈善`, `慈善`,

View File

@ -19,7 +19,7 @@ const (
iriChar = letter + mark + number iriChar = letter + mark + number
currency = `\p{Sc}` currency = `\p{Sc}`
otherSymb = `\p{So}` otherSymb = `\p{So}`
endChar = iriChar + `/\-+&~%=#` + currency + otherSymb endChar = iriChar + `/\-_+&~%=#` + currency + otherSymb
otherPunc = `\p{Po}` otherPunc = `\p{Po}`
midChar = endChar + "_*" + otherPunc midChar = endChar + "_*" + otherPunc
wellParen = `\([` + midChar + `]*(\([` + midChar + `]*\)[` + midChar + `]*)*\)` wellParen = `\([` + midChar + `]*(\([` + midChar + `]*\)[` + midChar + `]*)*\)`
@ -76,7 +76,7 @@ func relaxedExp() string {
knownTLDs := anyOf(append(TLDs, PseudoTLDs...)...) knownTLDs := anyOf(append(TLDs, PseudoTLDs...)...)
site := domain + `(?i)(` + punycode + `|` + knownTLDs + `)(?-i)` site := domain + `(?i)(` + punycode + `|` + knownTLDs + `)(?-i)`
hostName := `(` + site + `|` + ipAddr + `)` hostName := `(` + site + `|` + ipAddr + `)`
webURL := hostName + port + `(/|/` + pathCont + `?|\b|(?m)$)` webURL := hostName + port + `(/|/` + pathCont + `)?`
return strictExp() + `|` + webURL return strictExp() + `|` + webURL
} }