mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-06-13 15:47:38 +08:00
Compare commits
No commits in common. "ef965f4a6ac49116d5016ac2355574e71727d10b" and "8dc7d8c136f2a2dcfc483323eb23d24d587763c9" have entirely different histories.
ef965f4a6a
...
8dc7d8c136
1 changed files with 1 additions and 6 deletions
|
|
@ -75,12 +75,7 @@ func MergeCtx(parents ...context.Context) (ctx context.Context, cancel context.C
|
|||
|
||||
// Value 返回当前Ctx Value
|
||||
func (mc *mergedContext) Value(key any) any {
|
||||
for _, p := range mc.parents {
|
||||
if val := p.Value(key); val != nil {
|
||||
return val
|
||||
}
|
||||
}
|
||||
return nil
|
||||
return mc.Context.Value(key)
|
||||
}
|
||||
|
||||
// Deadline 实现了 context.Context 的 Deadline 方法.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue