Lines Matching refs:Writer
5 // Package tabwriter implements a write filter (tabwriter.Writer) that
34 // A Writer is a filter that inserts padding around tab-delimited
37 // The Writer treats incoming bytes as UTF-8-encoded text consisting
43 // Writer inserts padding as needed to make all cells in a column have
60 // The Writer assumes that all Unicode code points have the same width;
69 // If a Writer is configured to filter HTML, HTML tags and entities
88 // The Writer must buffer input internally, because proper spacing
92 type Writer struct {
94 output io.Writer
110 func (b *Writer) addLine() { b.lines = append(b.lines, []cell{}) }
113 func (b *Writer) reset() {
135 // formatting; it is kept in Writer because it's re-used
173 // A Writer must be initialized with a call to Init. The first parameter (output)
180 // if padchar == '\t', the Writer will assume that the
187 func (b *Writer) Init(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer {
210 func (b *Writer) dump() {
229 func (b *Writer) write0(buf []byte) {
239 func (b *Writer) writeN(src []byte, n int) {
252 func (b *Writer) writePadding(textw, cellw int, useTabs bool) {
274 func (b *Writer) writeLines(pos0 int, line0, line1 int) (pos int) {
330 func (b *Writer) format(pos0 int, line0, line1 int) (pos int) {
389 func (b *Writer) append(text []byte) {
395 func (b *Writer) updateWidth() {
410 func (b *Writer) startEscape(ch byte) {
426 func (b *Writer) endEscape() {
444 func (b *Writer) terminateCell(htab bool) int {
463 // that any data buffered in the Writer is written to output. Any
466 func (b *Writer) Flush() error {
470 func (b *Writer) flush() (err error) {
490 // Write writes buf to the writer b.
494 func (b *Writer) Write(buf []byte) (n int, err error) {
517 // Writer contents.
570 // NewWriter allocates and initializes a new tabwriter.Writer.
573 func NewWriter(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer {
574 return new(Writer).Init(output, minwidth, tabwidth, padding, padchar, flags)