The Great Rewrite

This commit is contained in:
Caleb Bassi
2019-01-23 20:12:10 -08:00
parent b3075f7313
commit 958a28575d
95 changed files with 2626 additions and 4974 deletions

31
_test/log_events.go Normal file
View File

@@ -0,0 +1,31 @@
// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.
// +build ignore
package main
import (
"fmt"
ui "github.com/gizak/termui"
)
// logs all events to the termui window
// stdout can also be redirected to a file and read with `tail -f`
func main() {
if err := ui.Init(); err != nil {
panic(err)
}
defer ui.Close()
for {
e := <-ui.PollEvents()
fmt.Printf("%v", e)
switch e.ID {
case "q", "<C-c>":
return
}
}
}