tool

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SaveFolder string = ".fdlr/"
)

Functions

func DisappearProgressBar

func DisappearProgressBar() bool

Check if the current environment is terminal

func GetFilenameFrom

func GetFilenameFrom(url string) string

func GetFolderFrom

func GetFolderFrom(url string) (string, error)

func GetIPv4

func GetIPv4(ips []net.IP) []string

func IsFolderExisted

func IsFolderExisted(folder string) bool

func IsVaildURL

func IsVaildURL(s string) bool

func Mkdir

func Mkdir(folder string) error

Types

type DownloadRange

type DownloadRange struct {
	URL       string
	Path      string
	RangeFrom int64
	RangeTo   int64
}

type State

type State struct {
	URL            string
	DownloadRanges []DownloadRange
}

func Read

func Read(task string) (*State, error)

func (*State) Save

func (state *State) Save() error

Jump to

Keyboard shortcuts

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