utils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(url string) ([]byte, error)

func DownloadFile

func DownloadFile(url string, path string) (err error)

func DownloadFileWithProgress added in v0.1.0

func DownloadFileWithProgress(filepath string, url string) error

func GetFiles added in v0.1.1

func GetFiles(folder string) []string

func IsDir added in v0.1.1

func IsDir(fileAddr string) bool

判断目录是否存在

func IsExist

func IsExist(fileAddr string) bool

Types

type WriteCounter added in v0.1.0

type WriteCounter struct {
	Total uint64
}

func (WriteCounter) PrintProgress added in v0.1.0

func (wc WriteCounter) PrintProgress()

func (*WriteCounter) Write added in v0.1.0

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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