-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
34 lines (29 loc) · 885 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
package main
import (
"flag"
"twfinder/config"
"twfinder/gui/frontend"
"twfinder/gui/server"
"twfinder/logger"
)
func main() {
// read Command-Line Flags
configPath := flag.String("c", "config.json", "configuration file path")
flag.Parse()
/* configuration initialize start */
config.BuildConfiguration(*configPath)
/* configuration initialize end */
/* logger initialize start */
mylogger := logger.NewZapLogger()
logger.InitializeLogger(&mylogger)
defer logger.Close()
/* logger initialize end */
// Create and start a GUI server (omitting error check)
server := server.NewServer("", "localhost:8081")
server.SetText("Twitter Finder App")
server.AddWin(frontend.HomeWin())
server.AddWin(frontend.ConfigWin())
server.AddWin(frontend.FinderWin())
server.SetDefaultRootWindow(frontend.HomeWin())
server.Start("home") // Also opens windows list in browser
}