helper

package
v1.0.1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyMap

func CopyMap(m map[string]string) (map[string]string, error)

复制 map

func DownloadTo

func DownloadTo(url, output string) error

下载

func FormatViews added in v1.0.1003

func FormatViews(views int64) string

美化阅读量

func GetHostByAddr

func GetHostByAddr(ipAddress string) (string, error)

func GetHostByName

func GetHostByName(hostname string) (string, error)

func GetHostName

func GetHostName() (string, error)

func GetHostsByName

func GetHostsByName(hostname string) ([]string, error)

func IP2long

func IP2long(ipAddress string) uint32

func LogN

func LogN(n, b float64) float64

func Long2ip

func Long2ip(properAddress uint32) string

func MemoryPeakUsage

func MemoryPeakUsage() uint64

func MemoryUsage

func MemoryUsage() uint64

func StructToMap

func StructToMap(obj any) map[string]any

结构体转map

func UnzipDir

func UnzipDir(src, dest string) error

解压

Types

This section is empty.

Jump to

Keyboard shortcuts

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