cnter

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Percent

func Percent(count, total uint64) uint64

Percent of count in total.

Types

type Writer

type Writer struct {
	Name    string // Filename.
	Total   uint64 // Expected filesize.
	Written uint64 // Bytes written.
}

Writer totals the number of bytes written.

func (Writer) Percent

func (wc Writer) Percent()

Percent prints the current download progress.

func (*Writer) Write

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

Write to stdout and also return the current write progress.

Jump to

Keyboard shortcuts

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