http-downloader

command module
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 3 Imported by: 0

README

Gitpod ready-to-code Codacy Badge Codacy Badge Contributors GitHub release GitHub All Releases

Get started

hd is a HTTP download tool.

Install it via: brew install linuxsuren/linuxsuren/hd

Or download it directly (for Linux):

curl -L https://github.com/linuxsuren/http-downloader/releases/latest/download/hd-linux-amd64.tar.gz | tar xzv
mv hd /usr/local/bin

Want to go through the code? GitPod definitely can help you.

Usage

Download

hd get https://github.com/jenkins-zh/jenkins-cli/releases/latest/download/jcli-linux-amd64.tar.gz --thread 6

Or use a simple way instead of typing the whole URL:

hd get jenkins-zh/jenkins-cli/jcli -t 6

Or you might want to download a pre-released binary package from GitHub:

hd get --pre ks

Install

You can also install a package from GitHub:

hd install jenkins-zh/jenkins-cli/jcli -t 6

hd can download or install via the format of $org/$repo. If you find that it's not working. It might because of there's no record in hd-home. You're welcome to help us to maintain it.

When you first run it, please init via: hd fetch

then you can search it by a keyword: hd search jenkins

As a library

You can import it from github.com/linuxsuren/http-downloader/pkg/installer, then put the following code to your CLI. It can help you to download desired tools:

is := installer.Installer{
    Provider: "github",
}
if err = is.CheckDepAndInstall(map[string]string{
    "ks": "linuxsuren/ks",
    "kk": "kubekey",
}); err != nil {
    return
}

Features

  • go library for HTTP
  • multi-thread
  • continuously (TODO)
  • GitHub release asset friendly

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
mock
mhttp
Package mhttp is a generated GoMock package.
Package mhttp is a generated GoMock package.
pkg
cmd
net
os

Jump to

Keyboard shortcuts

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