func (l *TCPListener) read(tailer *Tailer) ([]byte, error) {
	tailer.conn.SetReadDeadline(time.Now().Add(defaultTimeout)) //nolint:errcheck
	frame := make([]byte, l.frameSize)
	n, err := tailer.conn.Read(frame)
	if err != nil {
		l.source.Status.Error(err)
		go l.stopTailer(tailer)
		return nil, err
	}
	return frame[:n], nil
}
// read reads data from connection, returns an error if it failed and stop the tailer.
read reads data from connection, returns an error if it failed and stop the tailer.
// read reads data from connection returns an error if it failed and stop the tailer .
func (l *TCPListener) read(tailer *Tailer) ([]byte, error) {
	tailer.conn.SetReadDeadline(time.Now().Add(defaultTimeout)) 
	frame := make([]byte, l.frameSize)
	n, err := tailer.conn.Read(frame)
	if err != nil {
		l.source.Status.Error(err)
		go l.stopTailer(tailer)
		return nil, err
	}
	return frame[:n], nil
}
func ( l * TCPListener ) read ( tailer * Tailer ) ( [ ] byte , error ) { tailer . conn . SetReadDeadline ( time . Now ( ) . Add ( defaultTimeout ) ) frame := make ( [ ] byte , l . frameSize ) n , err := tailer . conn . Read ( frame ) if err != nil { l . source . Status . Error ( err ) go l . stopTailer ( tailer ) return nil , err } return frame [ : n ] , nil }
read reads data from connection, returns an error if it failed and stop the tailer.
read reads data from connection returns an error if it failed and stop the tailer .
//nolint:errcheck