1 Star 0 Fork 0

h79/goim

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
context.go 293 Bytes
一键复制 编辑 原始数据 按行查看 历史
huqiuyun 提交于 2023-11-28 14:18 +08:00 . context
package im
import "context"
func NewWithTraceId(traceId string) context.Context {
return NewContext(nil, traceId)
}
func NewContext(ctx context.Context, traceId string) context.Context {
if ctx == nil {
ctx = context.Background()
}
return context.WithValue(ctx, "traceId", traceId)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/h79/goim.git
git@gitee.com:h79/goim.git
h79
goim
goim
v0.5.14

搜索帮助