types/logger: release ArgWriter destination after use

Spotted after Brad showed me this utility in #15806.

Updates #cleanup

Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
James Tucker 2025-04-28 11:36:37 -07:00 committed by James Tucker
parent b95e8bf4a1
commit 51b17483ff

View File

@ -323,6 +323,7 @@ func (fn ArgWriter) Format(f fmt.State, _ rune) {
bw.Reset(f) bw.Reset(f)
fn(bw) fn(bw)
bw.Flush() bw.Flush()
bw.Reset(io.Discard)
argBufioPool.Put(bw) argBufioPool.Put(bw)
} }