mux to mtx
This commit is contained in:
parent
4079b22c1e
commit
d40b13a045
@ -28,13 +28,13 @@ type Logger interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
mux sync.Mutex
|
mtx sync.Mutex
|
||||||
loggerMap = map[string]Logger{}
|
loggerMap = map[string]Logger{}
|
||||||
)
|
)
|
||||||
|
|
||||||
func Register(logger Logger) {
|
func Register(logger Logger) {
|
||||||
mux.Lock()
|
mtx.Lock()
|
||||||
defer mux.Unlock()
|
defer mtx.Unlock()
|
||||||
|
|
||||||
loggerMap[logger.String()] = logger
|
loggerMap[logger.String()] = logger
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user