ctop/main.go
2017-02-07 03:33:09 +00:00

27 lines
383 B
Go

package main
import (
"github.com/bcicen/ctop/config"
"github.com/bcicen/ctop/logging"
ui "github.com/gizak/termui"
)
var log = logging.New(config.Global["loggingEnabled"])
func main() {
if err := ui.Init(); err != nil {
panic(err)
}
defer ui.Close()
g := NewGrid()
for {
exit := Display(g)
if exit {
log.Notice("shutting down")
log.Exit()
return
}
}
}