util

package
v0.0.0-...-ed1ccab Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteCountIEC

func ByteCountIEC(b int64) string

ByteCountIEC bytes 大小可读性转换

Types

type Request

type Request struct {
	Headers map[string]string
	Cookies map[string]string
}

Request HTTP request 请求

func (*Request) Get

func (r *Request) Get(url string) (*http.Response, error)

Get http GET 请求

func (*Request) GetToDocument

func (r *Request) GetToDocument(url string) (*goquery.Document, error)

GetToDocument HTTP GET 请求并加载到 HTML DOM

func (*Request) GetToFile

func (r *Request) GetToFile(url, filename string) error

GetToFile HTTP GET 请求并下载文件

Jump to

Keyboard shortcuts

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