mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-14 04:54:58 +08:00
moved mutex
This commit is contained in:
@@ -50,6 +50,8 @@ func Dump() string {
|
|||||||
if program != "netmaker" {
|
if program != "netmaker" {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
mu.Lock()
|
||||||
|
defer mu.Unlock()
|
||||||
var dumpString = ""
|
var dumpString = ""
|
||||||
type keyVal struct {
|
type keyVal struct {
|
||||||
Key string
|
Key string
|
||||||
@@ -118,7 +120,5 @@ func FatalLog(message ...string) {
|
|||||||
|
|
||||||
// resetLogs - reallocates logs map
|
// resetLogs - reallocates logs map
|
||||||
func resetLogs() {
|
func resetLogs() {
|
||||||
mu.Lock()
|
|
||||||
defer mu.Unlock()
|
|
||||||
currentLogs = make(map[string]entry)
|
currentLogs = make(map[string]entry)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user