mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Fix CI comments.
This commit is contained in:
+1
-1
@@ -109,7 +109,7 @@ func CopyMulty(src io.Reader, writers ...io.Writer) error {
|
||||
var nr int
|
||||
nr, err := src.Read(buf)
|
||||
|
||||
if err == io.EOF || err == StoppedError {
|
||||
if err == io.EOF || err == ErrorStopped {
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@ func (i *FileInput) Read(data []byte) (int, error) {
|
||||
var buf []byte
|
||||
select {
|
||||
case <-i.exit:
|
||||
return 0, StoppedError
|
||||
return 0, ErrorStopped
|
||||
case buf = <-i.data:
|
||||
}
|
||||
copy(data, buf)
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ func (i *HTTPInput) Read(data []byte) (int, error) {
|
||||
var buf []byte
|
||||
select {
|
||||
case <-i.stop:
|
||||
return 0, StoppedError
|
||||
return 0, ErrorStopped
|
||||
case buf = <-i.data:
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ func (i *RAWInput) Read(data []byte) (int, error) {
|
||||
var msg *raw.TCPMessage
|
||||
select {
|
||||
case <-i.quit:
|
||||
return 0, StoppedError
|
||||
return 0, ErrorStopped
|
||||
case msg = <-i.data:
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ func (i *TCPInput) Read(data []byte) (int, error) {
|
||||
var buf []byte
|
||||
select {
|
||||
case <-i.stop:
|
||||
return 0, StoppedError
|
||||
return 0, ErrorStopped
|
||||
case buf = <-i.data:
|
||||
}
|
||||
copy(data, buf)
|
||||
|
||||
+3
-2
@@ -7,7 +7,8 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var StoppedError = errors.New("reading stopped")
|
||||
// ErrorStopped is the error returned when the go routines reading the input is stopped.
|
||||
var ErrorStopped = errors.New("reading stopped")
|
||||
|
||||
// TestInput used for testing purpose, it allows emitting requests on demand
|
||||
type TestInput struct {
|
||||
@@ -28,7 +29,7 @@ func (i *TestInput) Read(data []byte) (int, error) {
|
||||
var buf []byte
|
||||
select {
|
||||
case <-i.stop:
|
||||
return 0, StoppedError
|
||||
return 0, ErrorStopped
|
||||
case buf = <-i.data:
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user