util

package
v0.0.0-...-25f1dd0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HEADER_AMR  = []byte("#!AMR")
	HEADER_SILK = []byte("\x02#!SILK_V3")
)
View Source
var (
	Proxy string

	ErrOverSize = errors.New("oversize")

	UserAgent = "" /* 130-byte string literal not displayed */
)

Functions

func ByteSliceToString

func ByteSliceToString(bs []byte) string

func Convert

func Convert(s string) string

func DelFile

func DelFile(path string) bool

func DownloadFile

func DownloadFile(url, path string, limit int64, headers map[string]string) error

func DownloadFileMultiThreading

func DownloadFileMultiThreading(url, path string, limit int64, threadCount int, headers map[string]string) error

func FatalError

func FatalError(err error)

func GetBytes

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

func IsAMRorSILK

func IsAMRorSILK(b []byte) bool

func MustMarshal

func MustMarshal(t interface{}) string

func MustMd5

func MustMd5(text string) string

func NeteaseMusicSongInfo

func NeteaseMusicSongInfo(id string) (gjson.Result, error)

NeteaseMusicSongInfo 通过给定id在wdd音乐上查找曲目信息

func PathExists

func PathExists(path string) bool

func QQMusicSongInfo

func QQMusicSongInfo(id string) (gjson.Result, error)

QQMusicSongInfo 通过给定id在QQ音乐上查找曲目信息

func RandomString

func RandomString(randGen *rand.Rand, len int) string

func RandomStringRange

func RandomStringRange(randGen *rand.Rand, length int, str string) string

func ReadAllText

func ReadAllText(path string) string

func SafeGo

func SafeGo(fn func())

func ToGlobalId

func ToGlobalId(code int64, msgId int32) int32

Types

This section is empty.

Jump to

Keyboard shortcuts

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