utils

package
v0.2.32 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64EncodeHTTPImage

func Base64EncodeHTTPImage(data []byte) string

func ConvertGB2312ToUTF8

func ConvertGB2312ToUTF8(input []byte) (string, error)

func GetChineseCharacter

func GetChineseCharacter(s string) string

GetChineseCharacter returns the Chinese characters and number in the string

func InnerTextWithBr

func InnerTextWithBr(n *html.Node) string

func JSONUnmarshalFromFile

func JSONUnmarshalFromFile(filePath string, v any) error

func Md5Hash

func Md5Hash(text string, bit int) string

Md5Hash generates MD5 hash and returns either 16 or 32 bit based on the bit parameter.

func PrintStruct

func PrintStruct(s interface{}) string

Output struct as json format

func RemoveDuplicate

func RemoveDuplicate(data interface{}) interface{}

func SafeAtoi

func SafeAtoi(s string) int

func SaveData

func SaveData(filePath string, data []byte) error

func StructJSONEncodeBase64

func StructJSONEncodeBase64(data interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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