refactor widgets, add wrapper structs

This commit is contained in:
Bradley Cicenas
2017-03-03 18:57:26 +11:00
parent 9f5cd42b73
commit 56be64367b
12 changed files with 249 additions and 195 deletions
+10
View File
@@ -1,6 +1,9 @@
package main
import (
"fmt"
"os"
"github.com/bcicen/ctop/config"
"github.com/bcicen/ctop/logging"
ui "github.com/gizak/termui"
@@ -9,6 +12,13 @@ import (
var log *logging.CTopLogger
func main() {
defer func() {
if r := recover(); r != nil {
ui.Clear()
fmt.Printf("panic: %s", r)
os.Exit(1)
}
}()
config.Init()
log = logging.Init()
if config.GetSwitchVal("loggingEnabled") {