pg

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanReadableTime

func HumanReadableTime(second int64) string

func New

func New(maxValue int64, width int, title string, titlePos Pos) *progress

func NewWrappedReaderProgress

func NewWrappedReaderProgress(maxValue int64, width int, title string, titlePos Pos, reader *WrappedReader) *progress

func NewWrappedWriterProgress

func NewWrappedWriterProgress(maxValue int64, width int, title string, titlePos Pos, writer *WrappedWriter) *progress

Types

type Pos

type Pos byte
const (
	Top  Pos = 1
	Left Pos = 2
)

type WrappedReader

type WrappedReader struct {
	Reader io.Reader
	// contains filtered or unexported fields
}

func (*WrappedReader) Read

func (w *WrappedReader) Read(p []byte) (n int, err error)

type WrappedWriter

type WrappedWriter struct {
	Writer io.Writer
	// contains filtered or unexported fields
}

func (*WrappedWriter) Write

func (w *WrappedWriter) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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