aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/mvdan.cc
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-10-16 07:06:27 +0200
committerGitHub <noreply@github.com>2020-10-16 01:06:27 -0400
commit12a1f914f443cc31af4bc54ab43802a75742cd57 (patch)
tree998e159281cf41de8b6d7bb1ab5075b3286ce5a9 /vendor/mvdan.cc
parent91f2afdb546364195ff909186983b94a61ab3181 (diff)
downloadgitea-12a1f914f443cc31af4bc54ab43802a75742cd57.tar.gz
gitea-12a1f914f443cc31af4bc54ab43802a75742cd57.zip
Vendor Update Go Libs (#13166)
* update github.com/alecthomas/chroma v0.8.0 -> v0.8.1 * github.com/blevesearch/bleve v1.0.10 -> v1.0.12 * editorconfig-core-go v2.1.1 -> v2.3.7 * github.com/gliderlabs/ssh v0.2.2 -> v0.3.1 * migrate editorconfig.ParseBytes to Parse * github.com/shurcooL/vfsgen to 0d455de96546 * github.com/go-git/go-git/v5 v5.1.0 -> v5.2.0 * github.com/google/uuid v1.1.1 -> v1.1.2 * github.com/huandu/xstrings v1.3.0 -> v1.3.2 * github.com/klauspost/compress v1.10.11 -> v1.11.1 * github.com/markbates/goth v1.61.2 -> v1.65.0 * github.com/mattn/go-sqlite3 v1.14.0 -> v1.14.4 * github.com/mholt/archiver v3.3.0 -> v3.3.2 * github.com/microcosm-cc/bluemonday 4f7140c49acb -> v1.0.4 * github.com/minio/minio-go v7.0.4 -> v7.0.5 * github.com/olivere/elastic v7.0.9 -> v7.0.20 * github.com/urfave/cli v1.20.0 -> v1.22.4 * github.com/prometheus/client_golang v1.1.0 -> v1.8.0 * github.com/xanzy/go-gitlab v0.37.0 -> v0.38.1 * mvdan.cc/xurls v2.1.0 -> v2.2.0 Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'vendor/mvdan.cc')
-rw-r--r--vendor/mvdan.cc/xurls/v2/README.md11
-rw-r--r--vendor/mvdan.cc/xurls/v2/go.mod7
-rw-r--r--vendor/mvdan.cc/xurls/v2/go.sum12
-rw-r--r--vendor/mvdan.cc/xurls/v2/schemes.go3
-rw-r--r--vendor/mvdan.cc/xurls/v2/tlds.go22
-rw-r--r--vendor/mvdan.cc/xurls/v2/xurls.go4
6 files changed, 36 insertions, 23 deletions
diff --git a/vendor/mvdan.cc/xurls/v2/README.md b/vendor/mvdan.cc/xurls/v2/README.md
index 07fbdb3b25..5035ced138 100644
--- a/vendor/mvdan.cc/xurls/v2/README.md
+++ b/vendor/mvdan.cc/xurls/v2/README.md
@@ -2,7 +2,7 @@
[![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
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
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
$ echo "Do gophers live in http://golang.org?" | xurls
diff --git a/vendor/mvdan.cc/xurls/v2/go.mod b/vendor/mvdan.cc/xurls/v2/go.mod
index d9d334543c..593ffd508b 100644
--- a/vendor/mvdan.cc/xurls/v2/go.mod
+++ b/vendor/mvdan.cc/xurls/v2/go.mod
@@ -1,3 +1,8 @@
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
+)
diff --git a/vendor/mvdan.cc/xurls/v2/go.sum b/vendor/mvdan.cc/xurls/v2/go.sum
index e69de29bb2..f1ca78e8c3 100644
--- a/vendor/mvdan.cc/xurls/v2/go.sum
+++ b/vendor/mvdan.cc/xurls/v2/go.sum
@@ -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=
diff --git a/vendor/mvdan.cc/xurls/v2/schemes.go b/vendor/mvdan.cc/xurls/v2/schemes.go
index e8e6585f47..8fae334175 100644
--- a/vendor/mvdan.cc/xurls/v2/schemes.go
+++ b/vendor/mvdan.cc/xurls/v2/schemes.go
@@ -66,6 +66,7 @@ var Schemes = []string{
`dpp`,
`drm`,
`drop`,
+ `dtmi`,
`dtn`,
`dvb`,
`ed2k`,
@@ -226,6 +227,7 @@ var Schemes = []string{
`pack`,
`palm`,
`paparazzi`,
+ `payment`,
`payto`,
`pkcs11`,
`platform`,
@@ -238,6 +240,7 @@ var Schemes = []string{
`pttp`,
`qb`,
`query`,
+ `quic-transport`,
`redis`,
`rediss`,
`reload`,
diff --git a/vendor/mvdan.cc/xurls/v2/tlds.go b/vendor/mvdan.cc/xurls/v2/tlds.go
index c98ce508d6..2daa29e896 100644
--- a/vendor/mvdan.cc/xurls/v2/tlds.go
+++ b/vendor/mvdan.cc/xurls/v2/tlds.go
@@ -57,6 +57,7 @@ var TLDs = []string{
`alsace`,
`alstom`,
`am`,
+ `amazon`,
`americanexpress`,
`americanfamily`,
`amex`,
@@ -219,7 +220,6 @@ var TLDs = []string{
`career`,
`careers`,
`cars`,
- `cartier`,
`casa`,
`case`,
`caseih`,
@@ -252,7 +252,6 @@ var TLDs = []string{
`chintai`,
`christmas`,
`chrome`,
- `chrysler`,
`church`,
`ci`,
`cipriani`,
@@ -366,7 +365,6 @@ var TLDs = []string{
`do`,
`docs`,
`doctor`,
- `dodge`,
`dog`,
`domains`,
`dot`,
@@ -411,7 +409,6 @@ var TLDs = []string{
`eurovision`,
`eus`,
`events`,
- `everbank`,
`exchange`,
`expert`,
`exposed`,
@@ -701,12 +698,10 @@ var TLDs = []string{
`kz`,
`la`,
`lacaixa`,
- `ladbrokes`,
`lamborghini`,
`lamer`,
`lancaster`,
`lancia`,
- `lancome`,
`land`,
`landrover`,
`lanxess`,
@@ -727,7 +722,6 @@ var TLDs = []string{
`lexus`,
`lgbt`,
`li`,
- `liaison`,
`lidl`,
`life`,
`lifeinsurance`,
@@ -829,7 +823,6 @@ var TLDs = []string{
`monash`,
`money`,
`monster`,
- `mopar`,
`mormon`,
`mortgage`,
`moscow`,
@@ -837,7 +830,6 @@ var TLDs = []string{
`motorcycles`,
`mov`,
`movie`,
- `movistar`,
`mp`,
`mq`,
`mr`,
@@ -856,7 +848,6 @@ var TLDs = []string{
`mz`,
`na`,
`nab`,
- `nadex`,
`nagoya`,
`name`,
`nationwide`,
@@ -958,7 +949,6 @@ var TLDs = []string{
`photography`,
`photos`,
`physio`,
- `piaget`,
`pics`,
`pictet`,
`pictures`,
@@ -1154,13 +1144,13 @@ var TLDs = []string{
`song`,
`sony`,
`soy`,
+ `spa`,
`space`,
`sport`,
`spot`,
`spreadbetting`,
`sr`,
`srl`,
- `srt`,
`ss`,
`st`,
`stada`,
@@ -1213,7 +1203,6 @@ var TLDs = []string{
`tech`,
`technology`,
`tel`,
- `telefonica`,
`temasek`,
`tennis`,
`teva`,
@@ -1273,7 +1262,6 @@ var TLDs = []string{
`ua`,
`ubank`,
`ubs`,
- `uconnect`,
`ug`,
`uk`,
`unicom`,
@@ -1309,7 +1297,6 @@ var TLDs = []string{
`virgin`,
`visa`,
`vision`,
- `vistaprint`,
`viva`,
`vivo`,
`vlaanderen`,
@@ -1328,7 +1315,6 @@ var TLDs = []string{
`walter`,
`wang`,
`wanggou`,
- `warman`,
`watch`,
`watches`,
`weather`,
@@ -1388,6 +1374,7 @@ var TLDs = []string{
`zuerich`,
`zw`,
`ελ`,
+ `ευ`,
`бг`,
`бел`,
`дети`,
@@ -1469,6 +1456,7 @@ var TLDs = []string{
`ไทย`,
`გე`,
`みんな`,
+ `アマゾン`,
`クラウド`,
`グーグル`,
`コム`,
@@ -1481,6 +1469,7 @@ var TLDs = []string{
`中国`,
`中國`,
`中文网`,
+ `亚马逊`,
`企业`,
`佛山`,
`信息`,
@@ -1501,7 +1490,6 @@ var TLDs = []string{
`天主教`,
`娱乐`,
`家電`,
- `工行`,
`广东`,
`微博`,
`慈善`,
diff --git a/vendor/mvdan.cc/xurls/v2/xurls.go b/vendor/mvdan.cc/xurls/v2/xurls.go
index 7244c709a0..d4462535da 100644
--- a/vendor/mvdan.cc/xurls/v2/xurls.go
+++ b/vendor/mvdan.cc/xurls/v2/xurls.go
@@ -19,7 +19,7 @@ const (
iriChar = letter + mark + number
currency = `\p{Sc}`
otherSymb = `\p{So}`
- endChar = iriChar + `/\-+&~%=#` + currency + otherSymb
+ endChar = iriChar + `/\-_+&~%=#` + currency + otherSymb
otherPunc = `\p{Po}`
midChar = endChar + "_*" + otherPunc
wellParen = `\([` + midChar + `]*(\([` + midChar + `]*\)[` + midChar + `]*)*\)`
@@ -76,7 +76,7 @@ func relaxedExp() string {
knownTLDs := anyOf(append(TLDs, PseudoTLDs...)...)
site := domain + `(?i)(` + punycode + `|` + knownTLDs + `)(?-i)`
hostName := `(` + site + `|` + ipAddr + `)`
- webURL := hostName + port + `(/|/` + pathCont + `?|\b|(?m)$)`
+ webURL := hostName + port + `(/|/` + pathCont + `)?`
return strictExp() + `|` + webURL
}