dotwriter

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0, MIT Imports: 3 Imported by: 0

README

This package contains a striped down and modified version of
https://github.com/gosuri/uilive. The original package did not work with
terminal colors, and had some bits that were unnecessary for gotestsum.

Documentation

Overview

Package dotwriter implements a buffered Writer for updating progress on the terminal.

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 Writer

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

Writer buffers writes until Flush is called. Flush clears previously written lines before writing new lines from the buffer. The main logic is platform specific, see the related files.

func New

func New(out io.Writer) *Writer

New returns a new Writer

func (*Writer) Flush

func (w *Writer) Flush() error

Flush the buffer, writing all buffered lines to out

func (*Writer) Write

func (w *Writer) Write(buf []byte) (int, error)

Write saves buf to a buffer

Jump to

Keyboard shortcuts

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