convert

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonToProto

func JsonToProto(d string, m proto.Message)

JsonToProto 转换json string为proto

func JsonToStruct

func JsonToStruct(data string, v interface{})

JsonToStruct 转换json string为struct,忽略转换错误

func ProtoToJson

func ProtoToJson(m proto.Message) string

ProtoToJson 转换proto为json string

func StrTime

func StrTime(timestamp int64, timeLayout string) string

StrTime 将时间戳转成字符串

func StructToJson

func StructToJson(data interface{}) string

StructToJson 转换struct为json string

func UnixTime

func UnixTime(timeStr, layout string) int64

UnixTime 将字符串转成时间戳

Types

This section is empty.

Jump to

Keyboard shortcuts

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