mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
test(trace): document ViolationsAreGreppable grep contract and lock-free WriteScreenshot
This commit is contained in:
1 parent
e3e810d8db
commit
925b0617ef
2 files changed
+9
No files matched your search
@@ -158,6 +158,9 @@ func (w *Writer) WriteStep(step Step) error {
|
||||
return w.encoder.Encode(step)
|
||||
}
|
||||
|
||||
// WriteScreenshot is lock-free: each call writes a distinct, uniquely-named
|
||||
// file via os.WriteFile and touches no field of Writer, so concurrent calls
|
||||
// never contend.
|
||||
func (w *Writer) WriteScreenshot(stepIndex int, png []byte) error {
|
||||
return w.writePNG(fmt.Sprintf("step-%05d.png", stepIndex), png)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user