This commit is contained in:
crusader 2017-11-27 20:01:36 +09:00
parent 596477790f
commit e115c8a9b6

View File

@ -18,6 +18,7 @@ func NewContext(parent Context) Context {
}
type Context interface {
Parent() Context
SetAttribute(key string, value interface{})
GetAttribute(key string) (value interface{})
RemoveAttribute(key string)
@ -31,6 +32,10 @@ type defaultContext struct {
mtx sync.RWMutex
}
func (dc *defaultContext) Parent() Context {
return dc.Context
}
func (dc *defaultContext) SetAttribute(key string, value interface{}) {
dc.checkInitialized()