ui: Inline lineWriter into StdioWrapper

This commit is contained in:
greatroar 2024-05-21 09:54:42 +02:00
parent 8898f61717
commit 7f439a9c34

View file

@ -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) {