From 7f439a9c346fe175db1b02aeef2b19c5c63d73a4 Mon Sep 17 00:00:00 2001 From: greatroar <61184462+greatroar@users.noreply.github.com> Date: Tue, 21 May 2024 09:54:42 +0200 Subject: [PATCH] ui: Inline lineWriter into StdioWrapper --- internal/ui/stdio_wrapper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ui/stdio_wrapper.go b/internal/ui/stdio_wrapper.go index 42f4cc545..6566ab67c 100644 --- a/internal/ui/stdio_wrapper.go +++ b/internal/ui/stdio_wrapper.go @@ -37,14 +37,14 @@ func (w *StdioWrapper) Stderr() io.WriteCloser { } type lineWriter struct { - buf *bytes.Buffer + buf bytes.Buffer print func(string) } var _ io.WriteCloser = &lineWriter{} func newLineWriter(print func(string)) *lineWriter { - return &lineWriter{buf: bytes.NewBuffer(nil), print: print} + return &lineWriter{print: print} } func (w *lineWriter) Write(data []byte) (n int, err error) {