CtxKey added

This commit is contained in:
crusader 2018-08-22 17:00:12 +09:00
parent 178411f148
commit c6e5aef1a0

View File

@ -5,6 +5,12 @@ import (
"sync" "sync"
) )
type CtxKey string
func (k CtxKey) String() string {
return string(k)
}
func NewCtx(parent Ctx) Ctx { func NewCtx(parent Ctx) Ctx {
c := &defaultCtx{ c := &defaultCtx{
parent: parent, parent: parent,