From e115c8a9b6ddf52a3eba8c7180a0f4286e3c4bc2 Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 27 Nov 2017 20:01:36 +0900 Subject: [PATCH] ing --- context/context.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/context/context.go b/context/context.go index d804168..465a763 100644 --- a/context/context.go +++ b/context/context.go @@ -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()