summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-04-28 12:04:35 -0500
committerSean E. Russell <ser@ser1.net>2020-04-28 12:04:35 -0500
commitc2cb7a4304e2e1bfc3dcd819346fb4cb611fe08f (patch)
tree57151e03cd953cce23bbb658bb1df5cd93507f3b /cmd
parent285d4d02972e5d3e52efa6554fcbb08b42577f7c (diff)
Fine tuning for extensions
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotop/main.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/cmd/gotop/main.go b/cmd/gotop/main.go
index 291179f..40b304c 100644
--- a/cmd/gotop/main.go
+++ b/cmd/gotop/main.go
@@ -335,6 +335,7 @@ func eventLoop(c gotop.Config, grid *layout.MyGrid) {
// TODO: Abstract out the UI toolkit. mum4k/termdash, VladimirMarkelov/clui, gcla/gowid, rivo/tview, marcusolsson/tui-go might work better for some OS/Archs. Performance/memory use comparison would be interesting.
// TODO: all of the go vet stuff, more unit tests, benchmarks, finish remote.
// TODO: color bars for memory, a-la bashtop
+// TODO: add verbose debugging option
func main() {
// For performance testing
//go func() {
@@ -376,6 +377,14 @@ func run() int {
}
defer logfile.Close()
+ errs := devices.Startup(conf.ExtensionVars)
+ if len(errs) > 0 {
+ for _, err := range errs {
+ stderrLogger.Print(err)
+ }
+ return 1
+ }
+
lstream, err := getLayout(conf)
if err != nil {
stderrLogger.Print(err)
@@ -387,13 +396,6 @@ func run() int {
return runTests(conf)
}
- errs := devices.Startup(conf.ExtensionVars)
- if len(errs) > 0 {
- for _, err := range errs {
- stderrLogger.Print(err)
- }
- return 1
- }
if err = ui.Init(); err != nil {
stderrLogger.Print(err)
return 1