util

package
v0.0.0-...-1671bd1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float642String

func Float642String(f64 float64) string

float64 转字符串

func GenerateId

func GenerateId() int64

雪花算法生成新 ID

func GetByHttp

func GetByHttp(url string) (string, error)

GetByHttp 基础GET请求

func GetByHttpWithParams

func GetByHttpWithParams(apiUrl string, headers map[string]string, params map[string]string, timeout time.Duration, proxy *string) (string, error)

GetByHttpWithParams 带请求头、参数和超时的GET请求

func GetByHttpWithParamsBackDoc

func GetByHttpWithParamsBackDoc(apiUrl string, headers map[string]string, params map[string]string, timeout time.Duration, proxy *string) (*goquery.Document, error)

GetByHttpWithParamsBackDoc 带参数的GET请求,返回goquery.Document

func Int642String

func Int642String(i64 int64) string

int64 转字符串

func PostByHttp

func PostByHttp(url, contentType string, params map[string]any) (string, error)

PostByHttp 基础POST请求

func PostByHttpWithParams

func PostByHttpWithParams(apiUrl string, headers map[string]string, params map[string]string, timeout time.Duration, proxy *string) (string, error)

PostByHttpWithParams 带参数的POST请求

Types

This section is empty.

Jump to

Keyboard shortcuts

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