// NewVariableDetector Create a new log processor that detects variables declared in lines
NewVariableDetector Create a new log processor that detects variables declared in lines
// NewVariableDetector Create a new log processor that detects variables declared in lines
func NewVariableDetector(reader io.ReadCloser, receiver func(string, string)) io.ReadCloser {
	lineReceiver := func([]byte) {}
	if receiver != nil {
		lineReceiver = func(line []byte) {
			name, value := extractVariable(line)
			if len(name) > 0 {
				receiver(name, value)
			}
		}
	}
	lineBuffer := buffer.NewLineBuffer(lineReceiver, variableDeclarationLineLimitProducer)
	return coreio.TeeReadCloser(reader, lineBuffer)
}
func NewVariableDetector ( reader io . ReadCloser , receiver func ( string , string ) ) io . ReadCloser { lineReceiver := func ( [ ] byte ) { } if receiver != nil { lineReceiver = func ( line [ ] byte ) { name , value := extractVariable ( line ) if len ( name ) > 0 { receiver ( name , value ) } } } lineBuffer := buffer . NewLineBuffer ( lineReceiver , variableDeclarationLineLimitProducer ) return coreio . TeeReadCloser ( reader , lineBuffer ) }
NewVariableDetector Create a new log processor that detects variables declared in lines
NewVariableDetector Create a new log processor that detects variables declared in lines