mirror of https://github.com/cjbassi/gotop.git
Remove defers in widget loading
This commit is contained in:
parent
92374f240f
commit
21747ecd06
12
main.go
12
main.go
|
@ -194,29 +194,29 @@ func initWidgets() {
|
||||||
wg.Add(widgetCount)
|
wg.Add(widgetCount)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
|
||||||
cpu = w.NewCPU(interval, zoom)
|
cpu = w.NewCPU(interval, zoom)
|
||||||
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
|
||||||
mem = w.NewMem(interval, zoom)
|
mem = w.NewMem(interval, zoom)
|
||||||
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
|
||||||
proc = w.NewProc(keyPressed)
|
proc = w.NewProc(keyPressed)
|
||||||
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
if !minimal {
|
if !minimal {
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
|
||||||
net = w.NewNet()
|
net = w.NewNet()
|
||||||
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
|
||||||
disk = w.NewDisk()
|
disk = w.NewDisk()
|
||||||
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
|
||||||
temp = w.NewTemp()
|
temp = w.NewTemp()
|
||||||
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue