mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-25 15:09:27 -06:00
fix staticcheck
This commit is contained in:
@@ -2,12 +2,9 @@ package controller
|
||||
|
||||
// detach will try to restart processes on failures.
|
||||
func detach(c *Controller) {
|
||||
for {
|
||||
select {
|
||||
case proc := <-c.Terminated:
|
||||
if err := c.Start(proc); err != nil {
|
||||
c.log.Err(err)
|
||||
}
|
||||
for proc := range c.Terminated {
|
||||
if err := c.Start(proc); err != nil {
|
||||
c.log.Err(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ func (m *Map) Load(name string) int {
|
||||
|
||||
// LoadAll values from the underlying data structure.
|
||||
func (m *Map) LoadAll() Entries {
|
||||
e := make(map[string]int, 0)
|
||||
e := make(map[string]int)
|
||||
m.c.Range(func(k, v interface{}) bool {
|
||||
ks, ok := k.(string)
|
||||
if !ok {
|
||||
|
||||
@@ -36,12 +36,10 @@ func (w *Watcher) Follow(pe process.ProcEntry, followerChan chan process.ProcEnt
|
||||
}()
|
||||
|
||||
go func() {
|
||||
select {
|
||||
case status := <-state:
|
||||
w.log.Info().Str("package", "watcher").Msgf("%v exited with: %v", pe.Extension, status)
|
||||
if restart {
|
||||
followerChan <- pe
|
||||
}
|
||||
status := <-state
|
||||
w.log.Info().Str("package", "watcher").Msgf("%v exited with: %v", pe.Extension, status)
|
||||
if restart {
|
||||
followerChan <- pe
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user