From badf6dcf57991b0b7fc9ac9bbcb0295bc2d30116 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 8 Jul 2018 10:14:07 +0200 Subject: [PATCH] remove response mutex --- implement/response.go | 8 -------- implement/types.go | 2 -- 2 files changed, 10 deletions(-) diff --git a/implement/response.go b/implement/response.go index 4f25296..53b6341 100644 --- a/implement/response.go +++ b/implement/response.go @@ -12,23 +12,15 @@ func NewResponse() *Response { } func (i *Response) Set(name string, value interface{}) { - i.m.Lock() - defer i.m.Unlock() - i.data[name] = value } func (i *Response) Get(name string) interface{} { - i.m.Lock() value, _ := i.data[name] - i.m.Unlock() return value } func (i *Response) Dump() map[string]interface{} { - i.m.Lock() - defer i.m.Unlock() - return i.data } diff --git a/implement/types.go b/implement/types.go index 84f01a3..b69a33b 100644 --- a/implement/types.go +++ b/implement/types.go @@ -2,7 +2,6 @@ package implement import ( "git.xdrm.io/go/aicra/err" - "sync" ) type Arguments map[string]interface{} @@ -10,6 +9,5 @@ type Controller func(Arguments, *Response) Response type Response struct { data map[string]interface{} - m sync.Mutex Err err.Error }