Signed-off-by: Marcel Edmund Franke <marcel.edmund.franke@gmail.com>
| ... | ... |
@@ -35,7 +35,7 @@ type important struct {
|
| 35 | 35 |
func (i *important) Get(name string) interface{} {
|
| 36 | 36 |
i.locks.Lock(name) |
| 37 | 37 |
defer i.locks.Unlock(name) |
| 38 |
- return data[name] |
|
| 38 |
+ return i.data[name] |
|
| 39 | 39 |
} |
| 40 | 40 |
|
| 41 | 41 |
func (i *important) Create(name string, data interface{}) {
|
| ... | ... |
@@ -44,9 +44,9 @@ func (i *important) Create(name string, data interface{}) {
|
| 44 | 44 |
|
| 45 | 45 |
i.createImportant(data) |
| 46 | 46 |
|
| 47 |
- s.mu.Lock() |
|
| 47 |
+ i.mu.Lock() |
|
| 48 | 48 |
i.data[name] = data |
| 49 |
- s.mu.Unlock() |
|
| 49 |
+ i.mu.Unlock() |
|
| 50 | 50 |
} |
| 51 | 51 |
|
| 52 | 52 |
func (i *important) createImportant(data interface{}) {
|