mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix typos in Locker example
Signed-off-by: Marcel Edmund Franke <marcel.edmund.franke@gmail.com>
This commit is contained in:
parent
13fec06073
commit
6d3bc28289
1 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ type important struct {
|
||||||
func (i *important) Get(name string) interface{} {
|
func (i *important) Get(name string) interface{} {
|
||||||
i.locks.Lock(name)
|
i.locks.Lock(name)
|
||||||
defer i.locks.Unlock(name)
|
defer i.locks.Unlock(name)
|
||||||
return data[name]
|
return i.data[name]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *important) Create(name string, data interface{}) {
|
func (i *important) Create(name string, data interface{}) {
|
||||||
|
@ -44,9 +44,9 @@ func (i *important) Create(name string, data interface{}) {
|
||||||
|
|
||||||
i.createImportant(data)
|
i.createImportant(data)
|
||||||
|
|
||||||
s.mu.Lock()
|
i.mu.Lock()
|
||||||
i.data[name] = data
|
i.data[name] = data
|
||||||
s.mu.Unlock()
|
i.mu.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *important) createImportant(data interface{}) {
|
func (i *important) createImportant(data interface{}) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue