Categorygithub.com/go-zoox/download
modulepackage
1.0.5
Repository: https://github.com/go-zoox/download.git
Documentation: pkg.go.dev

# README

Download - File Download, support parallel

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get github.com/go-zoox/download

Getting Started

func TestDownload(t *testing.T) {
	url := "YOUR_FILE_URL"
	fileName := "test.mp4"
	err := Download(url, &Config{
		FilePath: fileName,
	})
	if err != nil {
		t.Error(err)
	}
}

Functions

  • Parallel
  • Progress

License

GoZoox is released under the MIT License.

# Functions

Download downloads the file by url and config.
New returns a new downloader.

# Variables

DefaultSegmentSize stands for the default segment size (10 Mb) if the segment size is not set, the default segment size is used.

# Structs

Config represents the download config.
Downloader is the downloader.
FilePart represents a part of a file.
Range represents the range of the file.