-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
44 lines (37 loc) · 714 Bytes
/
main.go
File metadata and controls
44 lines (37 loc) · 714 Bytes
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
package main
import (
"fmt"
term "github.com/nsf/termbox-go"
"os"
"trcman/parser"
services "trcman/services"
tg "trcman/telegram"
)
func main() {
if parser.Test {
parser.Maino()
}
OBDconnections := make(chan *services.OBDConnection, 10)
println("A")
server := services.StartTrcManServer(OBDconnections)
println("B")
services.StartTCPServer(OBDconnections)
println("C")
services.StartGRPCService(&server)
//---------------------------------
println("D")
tg.StartTelegramService()
for {
switch ev := term.PollEvent(); ev.Type {
case term.EventKey:
switch ev.Key {
case term.KeyCtrlC:
fmt.Println("stopping")
os.Exit(0)
return
}
default:
term.Sync()
}
}
}