Fix typos in Locker example

Signed-off-by: Marcel Edmund Franke <marcel.edmund.franke@gmail.com>
Upstream-commit: 6d3bc28289c265a65879a7f28264e6bacb95fbe1
Component: engine
This commit is contained in:
Marcel Edmund Franke
2017-09-10 11:34:19 +02:00
parent af0adf66d4
commit e388be9473
+3 -3
View File
@@ -35,7 +35,7 @@ type important struct {
func (i *important) Get(name string) interface{} {
i.locks.Lock(name)
defer i.locks.Unlock(name)
return data[name]
return i.data[name]
}
func (i *important) Create(name string, data interface{}) {
@@ -44,9 +44,9 @@ func (i *important) Create(name string, data interface{}) {
i.createImportant(data)
s.mu.Lock()
i.mu.Lock()
i.data[name] = data
s.mu.Unlock()
i.mu.Unlock()
}
func (i *important) createImportant(data interface{}) {