mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 06:38:37 -04:00 
			
		
		
		
	Vendor Update (#14496)
* update code.gitea.io/sdk/gitea v0.13.1 -> v0.13.2 * update github.com/go-swagger/go-swagger v0.25.0 -> v0.26.0 * update github.com/google/uuid v1.1.2 -> v1.2.0 * update github.com/klauspost/compress v1.11.3 -> v1.11.7 * update github.com/lib/pq 083382b7e6fc -> v1.9.0 * update github.com/markbates/goth v1.65.0 -> v1.66.1 * update github.com/mattn/go-sqlite3 v1.14.4 -> v1.14.6 * update github.com/mgechev/revive 246eac737dc7 -> v1.0.3 * update github.com/minio/minio-go/v7 v7.0.6 -> v7.0.7 * update github.com/niklasfasching/go-org v1.3.2 -> v1.4.0 * update github.com/olivere/elastic/v7 v7.0.21 -> v7.0.22 * update github.com/pquerna/otp v1.2.0 -> v1.3.0 * update github.com/xanzy/go-gitlab v0.39.0 -> v0.42.0 * update github.com/yuin/goldmark v1.2.1 -> v1.3.1
This commit is contained in:
		
							
								
								
									
										27
									
								
								vendor/github.com/klauspost/compress/zstd/decoder.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								vendor/github.com/klauspost/compress/zstd/decoder.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -5,7 +5,6 @@ | ||||
| package zstd | ||||
|  | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"errors" | ||||
| 	"io" | ||||
| 	"sync" | ||||
| @@ -85,6 +84,10 @@ func NewReader(r io.Reader, opts ...DOption) (*Decoder, error) { | ||||
| 	d.current.output = make(chan decodeOutput, d.o.concurrent) | ||||
| 	d.current.flushed = true | ||||
|  | ||||
| 	if r == nil { | ||||
| 		d.current.err = ErrDecoderNilInput | ||||
| 	} | ||||
|  | ||||
| 	// Transfer option dicts. | ||||
| 	d.dicts = make(map[uint32]dict, len(d.o.dicts)) | ||||
| 	for _, dc := range d.o.dicts { | ||||
| @@ -111,7 +114,7 @@ func NewReader(r io.Reader, opts ...DOption) (*Decoder, error) { | ||||
| // When the stream is done, io.EOF will be returned. | ||||
| func (d *Decoder) Read(p []byte) (int, error) { | ||||
| 	if d.stream == nil { | ||||
| 		return 0, errors.New("no input has been initialized") | ||||
| 		return 0, ErrDecoderNilInput | ||||
| 	} | ||||
| 	var n int | ||||
| 	for { | ||||
| @@ -152,12 +155,20 @@ func (d *Decoder) Read(p []byte) (int, error) { | ||||
|  | ||||
| // Reset will reset the decoder the supplied stream after the current has finished processing. | ||||
| // Note that this functionality cannot be used after Close has been called. | ||||
| // Reset can be called with a nil reader to release references to the previous reader. | ||||
| // After being called with a nil reader, no other operations than Reset or DecodeAll or Close | ||||
| // should be used. | ||||
| func (d *Decoder) Reset(r io.Reader) error { | ||||
| 	if d.current.err == ErrDecoderClosed { | ||||
| 		return d.current.err | ||||
| 	} | ||||
|  | ||||
| 	d.drainOutput() | ||||
|  | ||||
| 	if r == nil { | ||||
| 		return errors.New("nil Reader sent as input") | ||||
| 		d.current.err = ErrDecoderNilInput | ||||
| 		d.current.flushed = true | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	if d.stream == nil { | ||||
| @@ -166,14 +177,14 @@ func (d *Decoder) Reset(r io.Reader) error { | ||||
| 		go d.startStreamDecoder(d.stream) | ||||
| 	} | ||||
|  | ||||
| 	d.drainOutput() | ||||
|  | ||||
| 	// If bytes buffer and < 1MB, do sync decoding anyway. | ||||
| 	if bb, ok := r.(*bytes.Buffer); ok && bb.Len() < 1<<20 { | ||||
| 	if bb, ok := r.(byter); ok && bb.Len() < 1<<20 { | ||||
| 		var bb2 byter | ||||
| 		bb2 = bb | ||||
| 		if debug { | ||||
| 			println("*bytes.Buffer detected, doing sync decode, len:", bb.Len()) | ||||
| 		} | ||||
| 		b := bb.Bytes() | ||||
| 		b := bb2.Bytes() | ||||
| 		var dst []byte | ||||
| 		if cap(d.current.b) > 0 { | ||||
| 			dst = d.current.b | ||||
| @@ -249,7 +260,7 @@ func (d *Decoder) drainOutput() { | ||||
| // Any error encountered during the write is also returned. | ||||
| func (d *Decoder) WriteTo(w io.Writer) (int64, error) { | ||||
| 	if d.stream == nil { | ||||
| 		return 0, errors.New("no input has been initialized") | ||||
| 		return 0, ErrDecoderNilInput | ||||
| 	} | ||||
| 	var n int64 | ||||
| 	for { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user