Fix CI comments.

This commit is contained in:
Arijit Das
2020-06-11 19:24:38 +05:30
parent 1c87a339a5
commit 73e26d48d9
6 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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:
}