aptly: github.com/mbenkmann/aptly/console Index | Files

package console

import "github.com/mbenkmann/aptly/console"

Index

Package Files

progress.go terminal.go

func RunningOnTerminal Uses

func RunningOnTerminal() bool

RunningOnTerminal checks whether stdout is terminal

type Progress Uses

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

Progress is a progress displaying subroutine, it allows to show download and other operations progress mixed with progress bar

func NewProgress Uses

func NewProgress() *Progress

NewProgress creates new progress instance

func (*Progress) AddBar Uses

func (p *Progress) AddBar(count int)

AddBar increments progress for progress bar

func (*Progress) ColoredPrintf Uses

func (p *Progress) ColoredPrintf(msg string, a ...interface{})

ColoredPrintf does printf in colored way + newline

func (*Progress) Flush Uses

func (p *Progress) Flush()

Flush waits for all queued messages to be displayed

func (*Progress) InitBar Uses

func (p *Progress) InitBar(count int64, isBytes bool)

InitBar starts progressbar for count bytes or count items

func (*Progress) Printf Uses

func (p *Progress) Printf(msg string, a ...interface{})

Printf does printf but in safe manner: not overwriting progress bar

func (*Progress) SetBar Uses

func (p *Progress) SetBar(count int)

SetBar sets current position for progress bar

func (*Progress) Shutdown Uses

func (p *Progress) Shutdown()

Shutdown shuts down progress display

func (*Progress) ShutdownBar Uses

func (p *Progress) ShutdownBar()

ShutdownBar stops progress bar and hides it

func (*Progress) Start Uses

func (p *Progress) Start()

Start makes progress start its work

func (*Progress) Write Uses

func (p *Progress) Write(s []byte) (int, error)

Write is implementation of io.Writer to support updating of progress bar

Package console imports 7 packages (graph). Updated 2017-06-15. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).