iutil

package
v0.0.0-...-239a4ac Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTarball

func CreateTarball(tarballFilePath string, topDir string, filePaths []string) error

func DownloadTo

func DownloadTo(urlS string, dir string, bar *mbpp.BarProxy)

func DownloadToPrefix

func DownloadToPrefix(urlS string, dir string, prefix string, bar *mbpp.BarProxy)

func Fetch

func Fetch(urlS string, headers map[string]string) (*http.Response, error)

func FetchBin

func FetchBin(urlS string, headers map[string]string) ([]byte, error)

func FetchDoc

func FetchDoc(urlS string, headers map[string]string) (*goquery.Document, error)

func FetchDocAs

func FetchDocAs(urlS string, headers map[string]string, sel string, f func(int, int, string, *goquery.Selection)) int

FetchDocAs means Fetch Doc A's params are total, index, href, el returns if total > 0

func FetchJson

func FetchJson(urlS string, headers map[string]string) (*fastjson.Value, error)

func GetPathFile

func GetPathFile(p string) string

func GetUrlPathFile

func GetUrlPathFile(urlS string) string

func MarshalJSON

func MarshalJSON(v interface{}) []byte

func PackCbzArchive

func PackCbzArchive(dirIn string)

func PadLeft

func PadLeft(s string, leng int, pre string) string

func RemoveAll

func RemoveAll(s string, subs ...string) string

func SplitLen

func SplitLen(str string, size int) []string

from SO

func UrlExt

func UrlExt(urlS string) string

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

func MakeCounter

func MakeCounter(dirIn string, after int) *Counter

func NewCounter

func NewCounter(a int, f func()) *Counter

func (*Counter) Add

func (c *Counter) Add(delta int)

func (*Counter) Increment

func (c *Counter) Increment()

func (*Counter) Wait

func (c *Counter) Wait()

Jump to

Keyboard shortcuts

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