This commit is contained in:
hdt3213
2021-05-12 00:27:29 +08:00
parent 55ada39252
commit 97d7b84276
58 changed files with 490 additions and 343 deletions

View File

@@ -13,6 +13,7 @@ import (
"strings"
)
// Payload stores redis.Reply or error
type Payload struct {
Data redis.Reply
Err error
@@ -71,13 +72,13 @@ func parse0(reader io.Reader, ch chan<- *Payload) {
}
close(ch)
return
} else { // protocol err, reset read state
ch <- &Payload{
Err: err,
}
state = readState{}
continue
}
// protocol err, reset read state
ch <- &Payload{
Err: err,
}
state = readState{}
continue
}
// parse line