Initial Commit
This commit is contained in:
BIN
cmd/gotime-cui/gotime-cui
Executable file
BIN
cmd/gotime-cui/gotime-cui
Executable file
Binary file not shown.
38
cmd/gotime-cui/main.go
Normal file
38
cmd/gotime-cui/main.go
Normal 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())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user