module

package
v0.0.0-...-1d4aca3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36"
	ConnNum   = 10
)
View Source
const (
	GoroutineNum  = ConnNum
	PartSizeLimit = 200 * 1024 // 200KB
)

Variables

This section is empty.

Functions

func FileSize

func FileSize(url string) (int, error)

func NewHTTPClient

func NewHTTPClient(connNum int) *http.Client

func NewHTTPReqGet

func NewHTTPReqGet(url string) (*http.Request, error)

func NewHTTPReqHead

func NewHTTPReqHead(url string) (*http.Request, error)

func SetHTTPReqHeaderRange

func SetHTTPReqHeaderRange(url string, start, end int64) (*http.Request, error)

Types

type Task

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

func (*Task) DownloadFile

func (task *Task) DownloadFile()

Jump to

Keyboard shortcuts

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