download

package
v0.205.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProgressReader

func NewProgressReader(ctx context.Context, src io.Reader, label string, total int64) io.Reader

NewProgressReader wraps src only when the context carries a callback, 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) error

ToFile atomically fetches url into dstPath 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