Versions in this module Expand all Collapse all v0 v0.6.1 Oct 25, 2020 Changes in this version + var ChunkPool = &sync.Pool + var DefaultClient = &http.Client + var DefaultFileName = "got.output" + var ErrDownloadAborted = errors.New("Operation aborted") + var HeaderSlice []GotHeader + var UserAgent = "Got/1.0" + func CliDownload(args []string) + func GetFilename(URL string) string + func NewRequest(ctx context.Context, method, URL string, header []GotHeader) (req *http.Request, err error) + type Chunk struct + Done chan struct{} + End uint64 + Path string + Start uint64 + type Download struct + ChunkSize uint64 + Client *http.Client + Concurrency uint + Dest string + Dir string + Header []GotHeader + Interval uint64 + MaxChunkSize uint64 + MinChunkSize uint64 + StopProgress bool + URL string + func NewDownload(ctx context.Context, URL, dest string) *Download + func (d *Download) DownloadChunk(c Chunk, dest *os.File) error + func (d *Download) Init() (err error) + func (d *Download) Name() string + func (d *Download) RunProgress(fn ProgressFunc) + func (d *Download) Start() (err error) + func (d *Download) Write(b []byte) (int, error) + func (d Download) AvgSpeed() uint64 + func (d Download) Context() context.Context + func (d Download) GetInfo() (*Info, error) + func (d Download) IsRangeable() bool + func (d Download) Size() uint64 + func (d Download) Speed() uint64 + func (d Download) TotalCost() time.Duration + func (d Download) TotalSize() uint64 + type Got struct + Client *http.Client + func New() *Got + func NewWithContext(ctx context.Context) *Got + func (g Got) Do(dl *Download) error + func (g Got) Download(URL, dest string) error + type GotHeader struct + Key string + Value string + type Info struct + Name string + Rangeable bool + Size uint64 + type ProgressFunc func(d *Download)