Skip to content

Library for interruptable, resumable download acceleration with automatic Accept-Ranges support

License

Notifications You must be signed in to change notification settings

deankarn/go-download

Repository files navigation

Package go-download

Project status Build Status Coverage Status Go Report Card GoDoc License

Package go-download provides a library for interruptable, resumable download acceleration with automatic Accept-Ranges support

It Features:

  • Customizable concurrency and/or chunk size. default is 10 goroutines
  • Proxy of download eg. to display a progress bar

Installation

go get -u github.com/joeybloggs/go-download

or if your looking for the standalone client

go get -u github.com/joeybloggs/go-download/cmd/goget

Examples

More examples here

package main

import (
	"log"

	download "github.com/joeybloggs/go-download"
)

func main() {

	// no options specified so will default to 10 concurrent download by default

	f, err := download.Open("https://storage.googleapis.com/golang/go1.8.1.src.tar.gz", nil)
	if err != nil {
		log.Fatal(err)
	}
	defer f.Close()

	// f implements io.Reader, write file somewhere or do some other sort of work with it
}

Contributing

Pull requests, bug fixes and issue reports are welcome.

Before proposing a change, please discuss your change by raising an issue.

License

Distributed under BSD 2-clause license, please see license file in code for more details.

About

Library for interruptable, resumable download acceleration with automatic Accept-Ranges support

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages