go笔记–几个例子理解context的作用
文章目录go笔记–几个例子理解context的作用context interface先看一个简单的例程context的作用contxt相关函数
经常在http框架里面看到一个context参数,它是做什么的呢,先简单看看它的定义。
context interface
type Context interface {
// Deadline returns the time when work done on behalf of this context
// should be canceled. Deadline returns