nuclei/pkg/utils/capture_writer.go
HD Moore 3feb011459 Support concurrent Nuclei engines in the same process (#6322)
* support for concurrent nuclei engines

* clarify LfaAllowed race

* remove unused mutex

* update LfaAllowed logic to prevent races until it can be reworked for per-execution ID

* Update pkg/templates/parser.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* debug tests

* debug gh action

* fixig gh template test

* using atomic

* using synclockmap

* restore tests concurrency

* lint

* wiring executionId in js fs

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
2025-08-02 15:56:04 +05:30

17 lines
275 B
Go

package utils
import (
"bytes"
"github.com/projectdiscovery/gologger/levels"
)
// CaptureWriter captures log output for testing
type CaptureWriter struct {
Buffer *bytes.Buffer
}
func (w *CaptureWriter) Write(data []byte, level levels.Level) {
w.Buffer.Write(data)
}