util

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package util provides utility tools for CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTabWriter

func NewTabWriter() *tabwriter.Writer

NewTabWriter creates a new Writer with a given tab writer properties.

Types

type WriteCounter

type WriteCounter struct {
	Total uint64
	Bar   *pb.ProgressBar
}

WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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