Initial Commit

This commit is contained in:
2017-01-11 17:45:04 -06:00
parent 7b35d0e081
commit 7fbf90a111
5 changed files with 419 additions and 0 deletions

BIN
cmd/gotime-cui/gotime-cui Executable file

Binary file not shown.

38
cmd/gotime-cui/main.go Normal file
View File

@@ -0,0 +1,38 @@
package main
import (
"fmt"
"os"
"gogs.bullercodeworks.com/brian/gotime"
)
func main() {
var dir string
/*
err := termbox.Init()
if err != nil {
panic(err)
}
defer termbox.Close()
*/
if len(os.Args) > 1 {
dir = os.Args[1]
}
got := gotime.Create(dir)
t := got.GetAllTimers()
for i := range t {
fmt.Println(t[i].ToJsonString())
}
fmt.Println("=== Start Timer ===")
ts := gotime.CreateStartTimerTxns(&t[len(t)-1])
for i := range ts {
fmt.Println(ts[i].ToString())
}
fmt.Println("=== Stop Timer ===")
ts = gotime.CreateStopTimerTxns(&t[len(t)-1])
for i := range ts {
fmt.Println(ts[i].ToString())
}
}