summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2016-04-20 07:05:08 +0000
committerJakob Borg <jakob@nym.se>2016-04-20 07:05:08 +0000
commit842b6111dbacf82b9fe75aa0e5b270b85cc4b6aa (patch)
tree0976692c9954500cd1e0609b645e601669dbbfbb
parentea54525a33e4d59be1025d740da6c23c069913ea (diff)
vendor: Update github.com/gobwas/glob to solve 1.3 build issue
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/2996
-rw-r--r--vendor/github.com/gobwas/glob/bench.sh26
-rw-r--r--vendor/github.com/gobwas/glob/match/max.go2
-rw-r--r--vendor/github.com/gobwas/glob/match/min.go2
-rw-r--r--vendor/github.com/gobwas/glob/match/row.go2
-rw-r--r--vendor/github.com/gobwas/glob/readme.md148
-rw-r--r--vendor/manifest2
6 files changed, 4 insertions, 178 deletions
diff --git a/vendor/github.com/gobwas/glob/bench.sh b/vendor/github.com/gobwas/glob/bench.sh
deleted file mode 100644
index 804cf22e64..0000000000
--- a/vendor/github.com/gobwas/glob/bench.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/bash
-
-bench() {
- filename="/tmp/$1-$2.bench"
- if test -e "${filename}";
- then
- echo "Already exists ${filename}"
- else
- backup=`git rev-parse --abbrev-ref HEAD`
- git checkout $1
- echo -n "Creating ${filename}... "
- go test ./... -run=NONE -bench=$2 > "${filename}" -benchmem
- echo "OK"
- git checkout ${backup}
- sleep 5
- fi
-}
-
-
-to=$1
-current=`git rev-parse --abbrev-ref HEAD`
-
-bench ${to} $2
-bench ${current} $2
-
-benchcmp $3 "/tmp/${to}-$2.bench" "/tmp/${current}-$2.bench"
diff --git a/vendor/github.com/gobwas/glob/match/max.go b/vendor/github.com/gobwas/glob/match/max.go
index d72f69efff..032ffbf015 100644
--- a/vendor/github.com/gobwas/glob/match/max.go
+++ b/vendor/github.com/gobwas/glob/match/max.go
@@ -15,7 +15,7 @@ func NewMax(l int) Max {
func (self Max) Match(s string) bool {
var l int
- for range s {
+ for _ = range s {
l += 1
if l > self.Limit {
return false
diff --git a/vendor/github.com/gobwas/glob/match/min.go b/vendor/github.com/gobwas/glob/match/min.go
index db57ac8eb4..96b34cb209 100644
--- a/vendor/github.com/gobwas/glob/match/min.go
+++ b/vendor/github.com/gobwas/glob/match/min.go
@@ -15,7 +15,7 @@ func NewMin(l int) Min {
func (self Min) Match(s string) bool {
var l int
- for range s {
+ for _ = range s {
l += 1
if l >= self.Limit {
return true
diff --git a/vendor/github.com/gobwas/glob/match/row.go b/vendor/github.com/gobwas/glob/match/row.go
index d0dcb35e28..820a60dc59 100644
--- a/vendor/github.com/gobwas/glob/match/row.go
+++ b/vendor/github.com/gobwas/glob/match/row.go
@@ -43,7 +43,7 @@ func (self Row) matchAll(s string) bool {
func (self Row) lenOk(s string) bool {
var i int
- for range s {
+ for _ = range s {
i++
if i >= self.RunesLength {
return true
diff --git a/vendor/github.com/gobwas/glob/readme.md b/vendor/github.com/gobwas/glob/readme.md
deleted file mode 100644
index f58144e733..0000000000
--- a/vendor/github.com/gobwas/glob/readme.md
+++ /dev/null
@@ -1,148 +0,0 @@
-# glob.[go](https://golang.org)
-
-[![GoDoc][godoc-image]][godoc-url] [![Build Status][travis-image]][travis-url]
-
-> Go Globbing Library.
-
-## Install
-
-```shell
- go get github.com/gobwas/glob
-```
-
-## Example
-
-```go
-
-package main
-
-import "github.com/gobwas/glob"
-
-func main() {
- var g glob.Glob
-
- // create simple glob
- g = glob.MustCompile("*.github.com")
- g.Match("api.github.com") // true
-
- // quote meta characters and then create simple glob
- g = glob.MustCompile(glob.QuoteMeta("*.github.com"))
- g.Match("*.github.com") // true
-
- // create new glob with set of delimiters as ["."]
- g = glob.MustCompile("api.*.com", '.')
- g.Match("api.github.com") // true
- g.Match("api.gi.hub.com") // false
-
- // create new glob with set of delimiters as ["."]
- // but now with super wildcard
- g = glob.MustCompile("api.**.com", '.')
- g.Match("api.github.com") // true
- g.Match("api.gi.hub.com") // true
-
- // create glob with single symbol wildcard
- g = glob.MustCompile("?at")
- g.Match("cat") // true
- g.Match("fat") // true
- g.Match("at") // false
-
- // create glob with single symbol wildcard and delimiters ['f']
- g = glob.MustCompile("?at", 'f')
- g.Match("cat") // true
- g.Match("fat") // false
- g.Match("at") // false
-
- // create glob with character-list matchers
- g = glob.MustCompile("[abc]at")
- g.Match("cat") // true
- g.Match("bat") // true
- g.Match("fat") // false
- g.Match("at") // false
-
- // create glob with character-list matchers
- g = glob.MustCompile("[!abc]at")
- g.Match("cat") // false
- g.Match("bat") // false
- g.Match("fat") // true
- g.Match("at") // false
-
- // create glob with character-range matchers
- g = glob.MustCompile("[a-c]at")
- g.Match("cat") // true
- g.Match("bat") // true
- g.Match("fat") // false
- g.Match("at") // false
-
- // create glob with character-range matchers
- g = glob.MustCompile("[!a-c]at")
- g.Match("cat") // false
- g.Match("bat") // false
- g.Match("fat") // true
- g.Match("at") // false
-
- // create glob with pattern-alternatives list
- g = glob.MustCompile("{cat,bat,[fr]at}")
- g.Match("cat") // true
- g.Match("bat") // true
- g.Match("fat") // true
- g.Match("rat") // true
- g.Match("at") // false
- g.Match("zat") // false
-}
-
-```
-
-## Performance
-
-This library is created for compile-once patterns. This means, that compilation could take time, but
-strings matching is done faster, than in case when always parsing template.
-
-If you will not use compiled `glob.Glob` object, and do `g := glob.MustCompile(pattern); g.Match(...)` every time, then your code will be much more slower.
-
-Run `go test -bench=.` from source root to see the benchmarks:
-
-Pattern | Fixture | Match | Speed (ns/op)
---------|---------|-------|--------------
-`[a-z][!a-x]*cat*[h][!b]*eyes*` | `my cat has very bright eyes` | `true` | 432
-`[a-z][!a-x]*cat*[h][!b]*eyes*` | `my dog has very bright eyes` | `false` | 199
-`https://*.google.*` | `https://account.google.com` | `true` | 96
-`https://*.google.*` | `https://google.com` | `false` | 66
-`{https://*.google.*,*yandex.*,*yahoo.*,*mail.ru}` | `http://yahoo.com` | `true` | 163
-`{https://*.google.*,*yandex.*,*yahoo.*,*mail.ru}` | `http://google.com` | `false` | 197
-`{https://*gobwas.com,http://exclude.gobwas.com}` | `https://safe.gobwas.com` | `true` | 22
-`{https://*gobwas.com,http://exclude.gobwas.com}` | `http://safe.gobwas.com` | `false` | 24
-`abc*` | `abcdef` | `true` | 8.15
-`abc*` | `af` | `false` | 5.68
-`*def` | `abcdef` | `true` | 8.84
-`*def` | `af` | `false` | 5.74
-`ab*ef` | `abcdef` | `true` | 15.2
-`ab*ef` | `af` | `false` | 10.4
-
-The same things with `regexp` package:
-
-Pattern | Fixture | Match | Speed (ns/op)
---------|---------|-------|--------------
-`^[a-z][^a-x].*cat.*[h][^b].*eyes.*$` | `my cat has very bright eyes` | `true` | 2553
-`^[a-z][^a-x].*cat.*[h][^b].*eyes.*$` | `my dog has very bright eyes` | `false` | 1383
-`^https:\/\/.*\.google\..*$` | `https://account.google.com` | `true` | 1205
-`^https:\/\/.*\.google\..*$` | `https://google.com` | `false` | 767
-`^(https:\/\/.*\.google\..*|.*yandex\..*|.*yahoo\..*|.*mail\.ru)$` | `http://yahoo.com` | `true` | 1435
-`^(https:\/\/.*\.google\..*|.*yandex\..*|.*yahoo\..*|.*mail\.ru)$` | `http://google.com` | `false` | 1674
-`^(https:\/\/.*gobwas\.com|http://exclude.gobwas.com)$` | `https://safe.gobwas.com` | `true` | 1039
-`^(https:\/\/.*gobwas\.com|http://exclude.gobwas.com)$` | `http://safe.gobwas.com` | `false` | 272
-`^abc.*$` | `abcdef` | `true` | 237
-`^abc.*$` | `af` | `false` | 100
-`^.*def$` | `abcdef` | `true` | 464
-`^.*def$` | `af` | `false` | 265
-`^ab.*ef$` | `abcdef` | `true` | 375
-`^ab.*ef$` | `af` | `false` | 145
-
-[godoc-image]: https://godoc.org/github.com/gobwas/glob?status.svg
-[godoc-url]: https://godoc.org/github.com/gobwas/glob
-[travis-image]: https://travis-ci.org/gobwas/glob.svg?branch=master
-[travis-url]: https://travis-ci.org/gobwas/glob
-
-## Syntax
-
-Syntax is inspired by [standard wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm),
-except that `**` is aka super-asterisk, that do not sensitive for separators. \ No newline at end of file
diff --git a/vendor/manifest b/vendor/manifest
index 449040c618..aa85bedfb3 100644
--- a/vendor/manifest
+++ b/vendor/manifest
@@ -40,7 +40,7 @@
{
"importpath": "github.com/gobwas/glob",
"repository": "https://github.com/gobwas/glob",
- "revision": "a3f5513f64fe4307f2c71ea06b25f6154eb9dc5f",
+ "revision": "d877f6352135181470c40c73ebb81aefa22115fa",
"branch": "master"
},
{