ing
This commit is contained in:
parent
596477790f
commit
e115c8a9b6
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user