Browse Source

remove redundant continue clause

pull/7421/head
chrislu 1 month ago
parent
commit
2d4fa6ab5f
  1. 5
      weed/s3api/chunked_reader_v4.go

5
weed/s3api/chunked_reader_v4.go

@ -256,7 +256,6 @@ func (cr *s3ChunkedReader) Read(buf []byte) (n int, err error) {
return 0, cr.err return 0, cr.err
} }
cr.state = readChunk cr.state = readChunk
continue
case readChunkTrailer: case readChunkTrailer:
err = peekCRLF(cr.reader) err = peekCRLF(cr.reader)
isTrailingChunk := cr.n == 0 && cr.lastChunk isTrailingChunk := cr.n == 0 && cr.lastChunk
@ -289,7 +288,6 @@ func (cr *s3ChunkedReader) Read(buf []byte) (n int, err error) {
} else { } else {
cr.state = readChunkHeader cr.state = readChunkHeader
} }
continue
case readTrailerChunk: case readTrailerChunk:
// When using unsigned upload, this would be the raw contents of the trailer chunk: // When using unsigned upload, this would be the raw contents of the trailer chunk:
@ -332,7 +330,6 @@ func (cr *s3ChunkedReader) Read(buf []byte) (n int, err error) {
} }
cr.state = eofChunk cr.state = eofChunk
continue
case readChunk: case readChunk:
// There is no more space left in the request buffer. // There is no more space left in the request buffer.
@ -372,7 +369,6 @@ func (cr *s3ChunkedReader) Read(buf []byte) (n int, err error) {
// If we're at the end of a chunk. // If we're at the end of a chunk.
if cr.n == 0 { if cr.n == 0 {
cr.state = readChunkTrailer cr.state = readChunkTrailer
continue
} }
case verifyChunk: case verifyChunk:
// Check if we have credentials for signature verification // Check if we have credentials for signature verification
@ -410,7 +406,6 @@ func (cr *s3ChunkedReader) Read(buf []byte) (n int, err error) {
} else { } else {
cr.state = readChunkHeader cr.state = readChunkHeader
} }
continue
case eofChunk: case eofChunk:
return n, io.EOF return n, io.EOF
} }

Loading…
Cancel
Save