摘要:
package response import ( "fmt" "time" ) type JsonTime time.Time func (j JsonTime) MarshalJSON() ([]byte, error) { // 重写time转换成json之后的格式 var stmp = fm 阅读全文
posted @ 2022-02-20 15:00
专职
阅读(454)
评论(0)
推荐(0)
摘要:
func HandleGrpcErrorToHttp(err error, c *gin.Context) { // 将grpc的code转换成http的状态码 if err != nil { if e, ok := status.FromError(err); ok { switch e.Code 阅读全文
posted @ 2022-02-20 14:16
专职
阅读(489)
评论(0)
推荐(0)

浙公网安备 33010602011771号