project structure started

This commit is contained in:
2019-12-18 16:57:54 +00:00
parent 6a30c11edf
commit 433590ef29
5 changed files with 201 additions and 29 deletions
+8 -28
View File
@@ -1,37 +1,17 @@
package main
import (
"time"
"fyne.io/fyne/app"
"fyne.io/fyne/widget"
"fmt"
"github.com/starkers/safer-eve/pkg/eve"
)
func showTime(clock *widget.Label) {
formattedTime := time.Now().Format("03:04:05")
clock.SetText(formattedTime)
}
func main() {
app := app.New()
fmt.Println("searching")
fileList := eve.FileSearchUnix()
w := app.NewWindow("Clock")
// w.SetContent(widget.NewVBox(
// widget.NewLabel("Hello Fyne!"),
// widget.NewButton("Quit", func() {
// app.Quit()
// }),
// ))
List := eve.GetActiveChannels(fileList)
for _, name := range List{
fmt.Println(name)
}
clock := widget.NewLabel("")
showTime(clock)
go func() {
t := time.NewTicker(time.Second)
for range t.C {
showTime(clock)
}
}()
w.SetContent(clock)
w.ShowAndRun()
}