utils

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB = 1 << 10
	MB = 1 << 20
	GB = 1 << 30
)

Variables

This section is empty.

Functions

func DumpCookies added in v0.2.1

func DumpCookies(cookies []*http.Cookie) (string, error)

func FileExists

func FileExists(filename string) bool

func GetCorrespondPath added in v0.3.5

func GetCorrespondPath(ts int64) (string, error)

func LoadCookies added in v0.2.1

func LoadCookies(cookieDump string) ([]*http.Cookie, error)

func RandomChoice added in v0.2.5

func RandomChoice[T any](list []T) T

RandomChoice 随机返回

func SplitBytes

func SplitBytes(total []byte, chunk int) [][]byte

SplitBytes 将 total 按 chunk 分区

Types

This section is empty.

Jump to

Keyboard shortcuts

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