mirror of
https://github.com/mikefarah/yq.git
synced 2026-08-31 04:54:44 +08:00
writeString converted every string to []byte before calling io.Writer.Write, which Go escape analysis reports as escaping to the heap. io.WriteString uses the io.StringWriter fast path when available (the standard printer writer is a *bufio.Writer) and falls back to Write([]byte(txt)) otherwise. Fixes #2807 Co-authored-by: Pablo Garcia <pablito@MacBook-Neo-de-Pablo.local>