Versions in this module Expand all Collapse all v0 v0.0.0 Oct 3, 2026 Changes in this version + var DefaultFileName = "got.output" + var ErrDownloadAborted = errors.New("download aborted") + var UserAgent = "Got/2.0" + func DefaultClient() *http.Client + func GetFilename(URL string) string + func NewRequest(ctx context.Context, method, URL string, headers []Header, body io.Reader) (*http.Request, error) + func NormalizeURL(rawURL string) (string, error) + type Chunk struct + Done bool + End uint64 + Start uint64 + type Download struct + ChunkSize uint64 + Client *http.Client + Concurrency uint + Dest string + Dir string + Header []Header + Interval uint64 + MaxChunkSize uint64 + MaxRetries int + MinChunkSize uint64 + Resume bool + StopProgress atomic.Bool + URL string + func NewDownload(ctx context.Context, URL, dest string) *Download + func (d *Download) AvgSpeed() uint64 + func (d *Download) Context() context.Context + func (d *Download) DownloadChunk(c *Chunk, dest io.Writer) error + func (d *Download) GetInfoOrDownload() (*Info, error) + func (d *Download) Init() error + func (d *Download) IsRangeable() bool + func (d *Download) Path() string + func (d *Download) RunProgress(fn ProgressFunc) + func (d *Download) Size() uint64 + func (d *Download) Speed() uint64 + func (d *Download) Start() error + func (d *Download) TotalCost() time.Duration + func (d *Download) TotalSize() uint64 + func (d *Download) Write(b []byte) (int, error) + type Got struct + Client *http.Client + func New() *Got + func NewWithContext(ctx context.Context) *Got + func NewWithProxy(ctx context.Context, proxyAddr string) (*Got, error) + func (g *Got) Do(dl *Download) error + func (g *Got) Download(URL, dest string) error + func (g *Got) Request(method, URL string, headers []Header, body io.Reader, output io.Writer) (*http.Response, error) + type Header struct + Key string + Value string + func ParseHeaders(raw []string) ([]Header, error) + type Info struct + Rangeable bool + Size uint64 + type OffsetWriter struct + Offset int64 + func (dst *OffsetWriter) Write(b []byte) (n int, err error) + type ProgressFunc func(d *Download)