src/server/pkg/tabwriter/tabwriter.go
func (w *Writer) Write(buf []byte) (int, error) {
	if w.lines >= termHeight {
		if err := w.Flush(); err != nil {
			return 0, err
		}
		if _, err := w.w.Write(w.header); err != nil {
			return 0, err
		}
		w.lines++
	}
	w.lines += bytes.Count(buf, []byte{'\n'})
	return w.w.Write(buf)
}
func (w *Writer) Write(buf []byte) (int, error) {
	if w.lines >= termHeight {
		if err := w.Flush(); err != nil {
			return 0, err
		}
		if _, err := w.w.Write(w.header); err != nil {
			return 0, err
		}
		w.lines++
	}
	w.lines += bytes.Count(buf, []byte{'\n'})
	return w.w.Write(buf)
}
func ( w * Writer ) Write ( buf [ ] byte ) ( int , error ) { if w . lines >= termHeight { if err := w . Flush ( ) ; err != nil { return 0 , err } if _ , err := w . w . Write ( w . header ) ; err != nil { return 0 , err } w . lines ++ } w . lines += bytes . Count ( buf , [ ] byte { '\n' } ) return w . w . Write ( buf ) }
// Write writes a line to the tabwriter.
Write writes a line to the tabwriter .