From 6f612c117d33c383d2ac37d258c3d90f10717998 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Mon, 16 Feb 2026 06:10:47 +0100 Subject: Update Reset method to clear error state in writer --- writer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/writer.go b/writer.go index e4dd8cb..2e431ee 100644 --- a/writer.go +++ b/writer.go @@ -81,10 +81,11 @@ func (w *Writer) putFixedString(s string, length int) { w.pos += length } -// Reset resets the writer position to 0. +// Reset resets the writer position to 0 and clears any error state. func (w *Writer) Reset() { w.pos = 0 w.depth = 0 + w.err = nil } // StartBox begins a new box. Write content, then call EndBox. -- cgit v1.3.1