project structure started
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user