Archived
1
0

Configuration loading and NATS messaging tests.

This commit is contained in:
2019-05-19 14:41:03 +05:00
parent 1839a73717
commit 2e747d51ef
35 changed files with 8575 additions and 18 deletions

View File

@@ -23,8 +23,14 @@ func main() {
flag.Parse()
config.Load()
nats.StartListening()
err := config.Load()
if err != nil {
log.Fatalln("Failed to load configuration file:", err.Error())
}
err1 := nats.StartListening()
if err1 != nil {
log.Fatalln("Failed to establish connection to NATS:", err1.Error())
}
converter.Start()
// CTRL+C handler.

View File

@@ -45,7 +45,10 @@ func main() {
log.Fatalln("Failed to get absolute path for output filename:", err.Error())
}
config.Load()
err = config.Load()
if err != nil {
log.Fatalln("Failed to load configuration file:", err.Error())
}
nc, err := nats.Connect(config.Cfg.NATS.ConnectionString)
if err != nil {