Implement panic recovery :??
This commit is contained in:
6
main.go
6
main.go
@@ -93,7 +93,7 @@ func main() {
|
|||||||
for file, commands := range associations {
|
for file, commands := range associations {
|
||||||
workers <- struct{}{}
|
workers <- struct{}{}
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(file string, commands []utils.ModifyCommand) {
|
logger.SafeGoWithArgs(func(args ...interface{}) {
|
||||||
defer func() { <-workers }()
|
defer func() { <-workers }()
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
@@ -131,9 +131,9 @@ func main() {
|
|||||||
logger.Error("Failed to write file %q: %v", file, err)
|
logger.Error("Failed to write file %q: %v", file, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}(file, commands)
|
}, file, commands)
|
||||||
wg.Wait()
|
|
||||||
}
|
}
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
// This will also relieve processor of some of the file loading
|
// This will also relieve processor of some of the file loading
|
||||||
// But we will also have to rework the tests.......
|
// But we will also have to rework the tests.......
|
||||||
|
Reference in New Issue
Block a user