download

package
v0.211.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProgressReader

func NewProgressReader(src io.Reader, report func(string), label string, total int64) io.Reader

NewProgressReader wraps src only when report is set, so the no-listener case (headless, tests) stays a plain read with no bookkeeping.

func ToFile

func ToFile(ctx context.Context, client *http.Client, url, dstPath, label string, report func(string)) error

ToFile atomically fetches url into dstPath, reporting progress through report (nil for none), and rejects transfers shorter than their declared Content-Length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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