utils

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UUID = uuid.NewString()
View Source
var (

	// UserAgent HTTP请求时使用的UA
	UserAgent = "" /* 130-byte string literal not displayed */
)

Functions

func DS

func DS(saltType int) string

func DS2 added in v0.1.5

func DS2(q string, b string) string

func GetBytes

func GetBytes(url string, headers map[string]string) ([]byte, error)

func GetJson

func GetJson(url string, headers map[string]string) (gjson.Result, error)

func GetMD5Hash

func GetMD5Hash(text string) string

func HTTPGetReadCloser

func HTTPGetReadCloser(url string, headers map[string]string) (io.ReadCloser, error)

HTTPGetReadCloser 从 Http url 获取 io.ReadCloser

func HTTPPostReadCloser

func HTTPPostReadCloser(url string, data []byte, headers map[string]string) (io.ReadCloser, error)

HTTPPostReadCloser 从 Http url 获取 io.ReadCloser

func HttpGet added in v0.1.6

func HttpGet(url string, headers map[string]string, t any) error

func ParseCookie

func ParseCookie(s string) map[string]string

func PostBytes

func PostBytes(url string, data []byte, headers map[string]string) ([]byte, error)

func RandStringBytes

func RandStringBytes(n int) string

func ReadLine added in v0.1.3

func ReadLine() (str string)

func ReadNumber added in v0.1.3

func ReadNumber() (int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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