summaryrefslogtreecommitdiffstats
path: root/vendor/github.com
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-12-12 00:16:53 +0000
committerGitHub <noreply@github.com>2020-12-12 01:16:53 +0100
commit3285babcae57b410815d4415db9c9ea6c6f9a84e (patch)
tree48c7036489e74749014d387e7b9b49bc4748e839 /vendor/github.com
parente46a638e8f49b007e8fa84d7970a70da935edf3b (diff)
downloadgitea-3285babcae57b410815d4415db9c9ea6c6f9a84e.tar.gz
gitea-3285babcae57b410815d4415db9c9ea6c6f9a84e.zip
Update github.com/blevesearch/bleve v1.0.13 -> v1.0.14 (#13947)
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/blevesearch/bleve/go.mod12
-rw-r--r--vendor/github.com/blevesearch/zap/v11/go.mod2
-rw-r--r--vendor/github.com/blevesearch/zap/v12/go.mod2
-rw-r--r--vendor/github.com/blevesearch/zap/v13/go.mod2
-rw-r--r--vendor/github.com/blevesearch/zap/v14/go.mod2
-rw-r--r--vendor/github.com/blevesearch/zap/v15/go.mod2
-rw-r--r--vendor/github.com/philhofer/fwd/reader.go75
-rw-r--r--vendor/github.com/tinylib/msgp/msgp/errors.go3
-rw-r--r--vendor/github.com/tinylib/msgp/msgp/json.go4
-rw-r--r--vendor/github.com/tinylib/msgp/msgp/read.go5
-rw-r--r--vendor/github.com/tinylib/msgp/msgp/unsafe.go17
-rw-r--r--vendor/github.com/tinylib/msgp/msgp/write.go24
12 files changed, 78 insertions, 72 deletions
diff --git a/vendor/github.com/blevesearch/bleve/go.mod b/vendor/github.com/blevesearch/bleve/go.mod
index 10f4c57113..6300aea17f 100644
--- a/vendor/github.com/blevesearch/bleve/go.mod
+++ b/vendor/github.com/blevesearch/bleve/go.mod
@@ -4,15 +4,15 @@ go 1.13
require (
github.com/RoaringBitmap/roaring v0.4.23
- github.com/blevesearch/blevex v0.0.0-20190916190636-152f0fe5c040
+ github.com/blevesearch/blevex v1.0.0
github.com/blevesearch/go-porterstemmer v1.0.3
github.com/blevesearch/segment v0.9.0
github.com/blevesearch/snowballstem v0.9.0
- github.com/blevesearch/zap/v11 v11.0.13
- github.com/blevesearch/zap/v12 v12.0.13
- github.com/blevesearch/zap/v13 v13.0.5
- github.com/blevesearch/zap/v14 v14.0.4
- github.com/blevesearch/zap/v15 v15.0.2
+ github.com/blevesearch/zap/v11 v11.0.14
+ github.com/blevesearch/zap/v12 v12.0.14
+ github.com/blevesearch/zap/v13 v13.0.6
+ github.com/blevesearch/zap/v14 v14.0.5
+ github.com/blevesearch/zap/v15 v15.0.3
github.com/couchbase/moss v0.1.0
github.com/couchbase/vellum v1.0.2
github.com/golang/protobuf v1.3.2
diff --git a/vendor/github.com/blevesearch/zap/v11/go.mod b/vendor/github.com/blevesearch/zap/v11/go.mod
index 0dc5dc4ee6..653859c3bb 100644
--- a/vendor/github.com/blevesearch/zap/v11/go.mod
+++ b/vendor/github.com/blevesearch/zap/v11/go.mod
@@ -4,7 +4,7 @@ go 1.12
require (
github.com/RoaringBitmap/roaring v0.4.23
- github.com/blevesearch/bleve v1.0.13
+ github.com/blevesearch/bleve v1.0.14
github.com/blevesearch/mmap-go v1.0.2
github.com/couchbase/vellum v1.0.2
github.com/golang/snappy v0.0.1
diff --git a/vendor/github.com/blevesearch/zap/v12/go.mod b/vendor/github.com/blevesearch/zap/v12/go.mod
index edbc839487..5ff4d9b1be 100644
--- a/vendor/github.com/blevesearch/zap/v12/go.mod
+++ b/vendor/github.com/blevesearch/zap/v12/go.mod
@@ -4,7 +4,7 @@ go 1.12
require (
github.com/RoaringBitmap/roaring v0.4.23
- github.com/blevesearch/bleve v1.0.13
+ github.com/blevesearch/bleve v1.0.14
github.com/blevesearch/mmap-go v1.0.2
github.com/couchbase/vellum v1.0.2
github.com/golang/snappy v0.0.1
diff --git a/vendor/github.com/blevesearch/zap/v13/go.mod b/vendor/github.com/blevesearch/zap/v13/go.mod
index 364c44e524..91f819195f 100644
--- a/vendor/github.com/blevesearch/zap/v13/go.mod
+++ b/vendor/github.com/blevesearch/zap/v13/go.mod
@@ -4,7 +4,7 @@ go 1.12
require (
github.com/RoaringBitmap/roaring v0.4.23
- github.com/blevesearch/bleve v1.0.13
+ github.com/blevesearch/bleve v1.0.14
github.com/blevesearch/mmap-go v1.0.2
github.com/couchbase/vellum v1.0.2
github.com/golang/snappy v0.0.1
diff --git a/vendor/github.com/blevesearch/zap/v14/go.mod b/vendor/github.com/blevesearch/zap/v14/go.mod
index 42446b9767..2f4882a0c9 100644
--- a/vendor/github.com/blevesearch/zap/v14/go.mod
+++ b/vendor/github.com/blevesearch/zap/v14/go.mod
@@ -4,7 +4,7 @@ go 1.12
require (
github.com/RoaringBitmap/roaring v0.4.23
- github.com/blevesearch/bleve v1.0.13
+ github.com/blevesearch/bleve v1.0.14
github.com/blevesearch/mmap-go v1.0.2
github.com/couchbase/vellum v1.0.2
github.com/golang/snappy v0.0.1
diff --git a/vendor/github.com/blevesearch/zap/v15/go.mod b/vendor/github.com/blevesearch/zap/v15/go.mod
index c4e5a1995d..fcd7d38260 100644
--- a/vendor/github.com/blevesearch/zap/v15/go.mod
+++ b/vendor/github.com/blevesearch/zap/v15/go.mod
@@ -4,7 +4,7 @@ go 1.12
require (
github.com/RoaringBitmap/roaring v0.4.23
- github.com/blevesearch/bleve v1.0.13
+ github.com/blevesearch/bleve v1.0.14
github.com/blevesearch/mmap-go v1.0.2
github.com/couchbase/vellum v1.0.2
github.com/golang/snappy v0.0.1
diff --git a/vendor/github.com/philhofer/fwd/reader.go b/vendor/github.com/philhofer/fwd/reader.go
index 6918d3e211..72cc112bad 100644
--- a/vendor/github.com/philhofer/fwd/reader.go
+++ b/vendor/github.com/philhofer/fwd/reader.go
@@ -34,7 +34,10 @@
//
package fwd
-import "io"
+import (
+ "io"
+ "os"
+)
const (
// DefaultReaderSize is the default size of the read buffer
@@ -187,6 +190,19 @@ func (r *Reader) Peek(n int) ([]byte, error) {
return r.data[r.n : r.n+n], nil
}
+// discard(n) discards up to 'n' buffered bytes, and
+// and returns the number of bytes discarded
+func (r *Reader) discard(n int) int {
+ inbuf := r.buffered()
+ if inbuf <= n {
+ r.n = 0
+ r.data = r.data[:0]
+ return inbuf
+ }
+ r.n += n
+ return n
+}
+
// Skip moves the reader forward 'n' bytes.
// Returns the number of bytes skipped and any
// errors encountered. It is analogous to Seek(n, 1).
@@ -201,33 +217,25 @@ func (r *Reader) Peek(n int) ([]byte, error) {
// will not return `io.EOF` until the next call
// to Read.)
func (r *Reader) Skip(n int) (int, error) {
-
- // fast path
- if r.buffered() >= n {
- r.n += n
- return n, nil
+ if n < 0 {
+ return 0, os.ErrInvalid
}
- // use seeker implementation
- // if we can
- if r.rs != nil {
- return r.skipSeek(n)
- }
+ // discard some or all of the current buffer
+ skipped := r.discard(n)
- // loop on filling
- // and then erasing
- o := n
- for r.buffered() < n && r.state == nil {
+ // if we can Seek() through the remaining bytes, do that
+ if n > skipped && r.rs != nil {
+ nn, err := r.rs.Seek(int64(n-skipped), 1)
+ return int(nn) + skipped, err
+ }
+ // otherwise, keep filling the buffer
+ // and discarding it up to 'n'
+ for skipped < n && r.state == nil {
r.more()
- // we can skip forward
- // up to r.buffered() bytes
- step := min(r.buffered(), n)
- r.n += step
- n -= step
+ skipped += r.discard(n - skipped)
}
- // at this point, n should be
- // 0 if everything went smoothly
- return o - n, r.noEOF()
+ return skipped, r.noEOF()
}
// Next returns the next 'n' bytes in the stream.
@@ -262,20 +270,6 @@ func (r *Reader) Next(n int) ([]byte, error) {
return out, nil
}
-// skipSeek uses the io.Seeker to seek forward.
-// only call this function when n > r.buffered()
-func (r *Reader) skipSeek(n int) (int, error) {
- o := r.buffered()
- // first, clear buffer
- n -= o
- r.n = 0
- r.data = r.data[:0]
-
- // then seek forward remaning bytes
- i, err := r.rs.Seek(int64(n), 1)
- return int(i) + o, err
-}
-
// Read implements `io.Reader`
func (r *Reader) Read(b []byte) (int, error) {
// if we have data in the buffer, just
@@ -381,13 +375,6 @@ func (r *Reader) WriteTo(w io.Writer) (int64, error) {
return i, nil
}
-func min(a int, b int) int {
- if a < b {
- return a
- }
- return b
-}
-
func max(a int, b int) int {
if a < b {
return b
diff --git a/vendor/github.com/tinylib/msgp/msgp/errors.go b/vendor/github.com/tinylib/msgp/msgp/errors.go
index cc78a980c6..921e8553af 100644
--- a/vendor/github.com/tinylib/msgp/msgp/errors.go
+++ b/vendor/github.com/tinylib/msgp/msgp/errors.go
@@ -123,6 +123,9 @@ func (e errWrapped) Resumable() bool {
return resumableDefault
}
+// Unwrap returns the cause.
+func (e errWrapped) Unwrap() error { return e.cause }
+
type errShort struct{}
func (e errShort) Error() string { return "msgp: too few bytes left to read object" }
diff --git a/vendor/github.com/tinylib/msgp/msgp/json.go b/vendor/github.com/tinylib/msgp/msgp/json.go
index 77601e52c3..0e11e603c0 100644
--- a/vendor/github.com/tinylib/msgp/msgp/json.go
+++ b/vendor/github.com/tinylib/msgp/msgp/json.go
@@ -206,7 +206,7 @@ func rwFloat32(dst jsWriter, src *Reader) (int, error) {
if err != nil {
return 0, err
}
- src.scratch = strconv.AppendFloat(src.scratch[:0], float64(f), 'f', -1, 64)
+ src.scratch = strconv.AppendFloat(src.scratch[:0], float64(f), 'f', -1, 32)
return dst.Write(src.scratch)
}
@@ -215,7 +215,7 @@ func rwFloat64(dst jsWriter, src *Reader) (int, error) {
if err != nil {
return 0, err
}
- src.scratch = strconv.AppendFloat(src.scratch[:0], f, 'f', -1, 32)
+ src.scratch = strconv.AppendFloat(src.scratch[:0], f, 'f', -1, 64)
return dst.Write(src.scratch)
}
diff --git a/vendor/github.com/tinylib/msgp/msgp/read.go b/vendor/github.com/tinylib/msgp/msgp/read.go
index aa668c5731..fe2de9e057 100644
--- a/vendor/github.com/tinylib/msgp/msgp/read.go
+++ b/vendor/github.com/tinylib/msgp/msgp/read.go
@@ -126,6 +126,11 @@ func NewReaderSize(r io.Reader, sz int) *Reader {
return &Reader{R: fwd.NewReaderSize(r, sz)}
}
+// NewReaderBuf returns a *Reader with a provided buffer.
+func NewReaderBuf(r io.Reader, buf []byte) *Reader {
+ return &Reader{R: fwd.NewReaderBuf(r, buf)}
+}
+
// Reader wraps an io.Reader and provides
// methods to read MessagePack-encoded values
// from it. Readers are buffered.
diff --git a/vendor/github.com/tinylib/msgp/msgp/unsafe.go b/vendor/github.com/tinylib/msgp/msgp/unsafe.go
index 3978b6ff6f..d9fb353524 100644
--- a/vendor/github.com/tinylib/msgp/msgp/unsafe.go
+++ b/vendor/github.com/tinylib/msgp/msgp/unsafe.go
@@ -3,7 +3,6 @@
package msgp
import (
- "reflect"
"unsafe"
)
@@ -24,18 +23,14 @@ const (
// THIS IS EVIL CODE.
// YOU HAVE BEEN WARNED.
func UnsafeString(b []byte) string {
- sh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
- return *(*string)(unsafe.Pointer(&reflect.StringHeader{Data: sh.Data, Len: sh.Len}))
+ return *(*string)(unsafe.Pointer(&b))
}
// UnsafeBytes returns the string as a byte slice
-// THIS SHOULD ONLY BE USED BY THE CODE GENERATOR.
-// THIS IS EVIL CODE.
-// YOU HAVE BEEN WARNED.
+//
+// Deprecated:
+// Since this code is no longer used by the code generator,
+// UnsafeBytes(s) is precisely equivalent to []byte(s)
func UnsafeBytes(s string) []byte {
- return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
- Len: len(s),
- Cap: len(s),
- Data: (*(*reflect.StringHeader)(unsafe.Pointer(&s))).Data,
- }))
+ return []byte(s)
}
diff --git a/vendor/github.com/tinylib/msgp/msgp/write.go b/vendor/github.com/tinylib/msgp/msgp/write.go
index fb1947c574..407ec1f893 100644
--- a/vendor/github.com/tinylib/msgp/msgp/write.go
+++ b/vendor/github.com/tinylib/msgp/msgp/write.go
@@ -10,6 +10,11 @@ import (
"time"
)
+const (
+ // min buffer size for the writer
+ minWriterSize = 18
+)
+
// Sizer is an interface implemented
// by types that can estimate their
// size when MessagePack encoded.
@@ -120,16 +125,27 @@ func NewWriter(w io.Writer) *Writer {
// NewWriterSize returns a writer with a custom buffer size.
func NewWriterSize(w io.Writer, sz int) *Writer {
- // we must be able to require() 18
+ // we must be able to require() 'minWriterSize'
// contiguous bytes, so that is the
// practical minimum buffer size
- if sz < 18 {
- sz = 18
+ if sz < minWriterSize {
+ sz = minWriterSize
}
+ buf := make([]byte, sz)
+ return NewWriterBuf(w, buf)
+}
+// NewWriterBuf returns a writer with a provided buffer.
+// 'buf' is not used when the capacity is smaller than 18,
+// custom buffer is allocated instead.
+func NewWriterBuf(w io.Writer, buf []byte) *Writer {
+ if cap(buf) < minWriterSize {
+ buf = make([]byte, minWriterSize)
+ }
+ buf = buf[:cap(buf)]
return &Writer{
w: w,
- buf: make([]byte, sz),
+ buf: buf,
}
}