alecthomas / alecthomas/kong

add native context support to Run methods

未关闭
#144 8 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
3.2k
派生
188
平均合并
1 天 1 小时
30 天内合并 PR
2

描述

Currently you can manually bind a `context.Context` to a `kong.Context`, see #48, but this is not as turnkey as I would have hoped. Would it be possible to add an automatic bind, assuming one is not passed to override, for `context.Context` that is cancelled when `kong.Context.Run` returns?

> In the override case, I can see arguments for and against, but it may be useful to subcontext via `context.WithCancel` and explicitly cancel. Need to think through the implications on this one more.

Happy to contribute such a fix, but I thought I would ask if this was wanted first.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。