remove response mutex

This commit is contained in:
Adrien Marquès 2018-07-08 10:14:07 +02:00
parent 4e51d59f2f
commit badf6dcf57
2 changed files with 0 additions and 10 deletions

View File

@ -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
}

View File

@ -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
}