TencentAd / marketing-api-go-sdk

腾讯广告API Go SDK
Apache License 2.0
61 stars 32 forks source link

pkg/ads/middleware_auth.go #15

Closed xiongxch closed 3 years ago

xiongxch commented 3 years ago

middleware_auth 这里为什么不用req.Context(),新添加的context失效了

dingdaofeng commented 3 years ago

middleware_auth 这里为什么不用req.Context(),新添加的context失效了

具体怎么使用的可以发下代码看看么?

xiongxch commented 3 years ago

image 例如这样,我context里的链路调用 在使用中间件时context值就会被ctx := context.WithValue(*a.tads.Ctx, config.ContextAPIKey, apiKey)这段代码重置

dingdaofeng commented 3 years ago

image 例如这样,我context里的链路调用 在使用中间件时context值就会被ctx := context.WithValue(*a.tads.Ctx, config.ContextAPIKey, apiKey)这段代码重置

谢谢反馈,下个版本会修复这个问题

dingdaofeng commented 3 years ago

已修复