项目作者: ipfans

项目描述 :
stdlib context.Context extensions
高级语言: Go
项目地址: git://github.com/ipfans/ctxext.git
创建时间: 2020-03-16T14:35:31Z
项目社区:https://github.com/ipfans/ctxext

开源协议:MIT License

下载


ctxext

ctxext is extensions of stdlib context.Context with compatibility.

Status

Pre-Alpha stage.

API may changes in the future version.

HOWTO

ctxext.Context is compatibility with context.Context interface.
You can use this struct as context.Context. But It supplies more
powerful storage for contextual data.

  1. ctx := ctxext.New(nil)
  2. ctx.Set("data", data)
  3. val := ctx.Value("data")

Install

  1. go get -u -v github.com/ipfans/ctxext