-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
47 lines (37 loc) · 871 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Package main provides various examples of Fyne API capabilities
package main
import (
"bufio"
"fmt"
"os"
"time"
"github.com/dhinojosac/gowazapp/wzpback"
"github.com/dhinojosac/gowazapp/wzpui"
"github.com/dhinojosac/gowazapp/wzputils"
)
func main() {
//read number from file
number := wzputils.GetNumberFromFile()
wzpback.SetNumberWZP(number)
fmt.Printf("[!]%v\n", wzpback.GetNumberWZP())
time.Sleep(100 * time.Millisecond)
wzputils.SoundStartTone()
w := wzpui.CreateWindowApp()
chatchan := make(chan string)
wzpui.SetChatChan(chatchan)
//Listen command line
go func() {
fmt.Printf("Listening...\n")
reader := bufio.NewReader(os.Stdin)
for {
text, _ := reader.ReadString('\n')
time.Sleep(1 * time.Second)
fmt.Printf(text)
if text == "show\n" {
wzpui.ShowWindowApp(w)
}
}
}()
wzpback.StartWZP()
w.ShowAndRun()
}