counter

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: 0BSD Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteCounter

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

ByteCounter counts and displays the number of bytes downloaded.

func New

func New(displayProgress bool) *ByteCounter

New returns a new ByteCounter instance.

func (*ByteCounter) TotalBytes

func (bc *ByteCounter) TotalBytes() uint64

TotalBytes returns the number of bytes downloaded.

func (*ByteCounter) Write

func (bc *ByteCounter) Write(buf []byte) (int, error)

Write implements the io.Writer interface for ByteCounter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳