convert

package
v0.0.0-...-08c5772 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToBytes

func AnyToBytes(data any) []byte

AnyToBytes 转换任意类型为字节切片

func AnyToJson

func AnyToJson(data any) string

AnyToJson 转换任意类型为 json 字符串

func BytesToAny

func BytesToAny(bytes []byte, data any) error

BytesToAny 将字节切片转换成任意类型, data 为指针类型

func JsonFormat

func JsonFormat(jsonStr string) string

JsonFormat 格式化 json 字符串

func JsonToAny

func JsonToAny(jsonStr string, data any) error

JsonToAny 将 json 字符串转换成任意类型, data 为指针类型

Types

This section is empty.

Jump to

Keyboard shortcuts

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