欢迎光临散文网 会员登陆 & 注册

知了go微服务实战

2023-02-22 17:39 作者:rei源义经  | 我要投稿

处理header函数

//处理header,防止修改头变量出现其他影响func CopyHeader(header *Header) *Header {    copyhead := *header    if len(copyhead.Extradata) > 0 {        copyhead.Extradata = make([]byte, len(header.Extradata))        copy(copyhead.Extradata, header.Extradata)    }    return &copyhead}


 

知了go微服务实战的评论 (共 条)

分享到微博请遵守国家法律