code: func (w *Writer) Write(p []byte) (n int, err error) {
  	var linelen int
  	var lastWasColon bool
  	for i, c := range p {
  		w.buf = append(w.buf, c)
  		linelen++
  		if c == '\t' {
  			w.buf[len(w.buf)-1] = ' '
  			for linelen%tab != 0 {
  				w.buf = append(w.buf, ' ')
  				linelen++
  			}
  		}
  		if w.flag&BreakOnColon != 0 && c == ':' {
  			lastWasColon = true
  		} else if lastWasColon {
  			if c == '\n' {
  				pos := bytes.LastIndex(w.buf[:len(w.buf)-1], []byte{'\n'})
  				if pos < 0 {
  					pos = 0
  				}
  				line := w.buf[pos:]
  				w.buf = w.buf[:pos]
  				if err = w.columnate(); err != nil {
  					if len(line) < i {
  						return i - len(line), err
  					}
  					return 0, err
  				}
  				if n, err := w.w.Write(line); err != nil {
  					if r := len(line) - n; r < i {
  						return i - r, err
  					}
  					return 0, err
  				}
  			}
  			lastWasColon = false
  		}
  		if c == '\n' {
  			linelen = 0
  		}
  	}
  	return len(p), nil
  }
docs: // Write writes p to the writer w. The only errors returned are ones
  // encountered while writing to the underlying output stream.