Fix linter

This commit is contained in:
M. Mert Yildiran 2022-06-02 09:21:34 +03:00
parent 2433d867af
commit 5061e97018
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A

View File

@ -8,7 +8,6 @@ import (
)
type golangReader struct {
key string
msgQueue chan []byte
data []byte
progress *api.ReadProgress
@ -55,15 +54,13 @@ func (r *golangReader) Read(p []byte) (int, error) {
for len(r.data) == 0 {
var ok bool
select {
case b, ok = <-r.msgQueue:
if !ok {
return 0, io.EOF
}
r.data = b
b, ok = <-r.msgQueue
if !ok {
return 0, io.EOF
}
r.data = b
if len(r.data) > 0 {
break
}