rewriter

package
v0.0.0-...-0d65225 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package rewriter original code was copied from https://github.com/vbauerster/mpb

Index

Constants

View Source
const ESC = 27

ESC is the ASCII code for escape character

Variables

This section is empty.

Functions

This section is empty.

Types

type Rewriter

type Rewriter struct {
	// contains filtered or unexported fields
}

Rewriter is a buffered writer that updates the terminal. The contents of writer will be flushed when Flush is called.

func New

func New(w io.Writer) *Rewriter

New returns a new Rewriter with defaults

func (*Rewriter) Flush

func (w *Rewriter) Flush() error

Flush flushes the underlying buffer

func (*Rewriter) Write

func (w *Rewriter) Write(b []byte) (n int, err error)

Write save the contents of b to its buffers. The only errors returned are ones encountered while writing to the underlying buffer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL