refactor: Update ARR body parsing logic

The code changes in `aviation_parser_test.go` update the ARR body parsing logic. The `ParseHeader` function now correctly handles ARR bodies with optional time components. This ensures accurate parsing of ARR bodies and improves the overall functionality of the aviation parser.
This commit is contained in:
windyboy
2024-07-22 12:42:30 +08:00
parent c72b6e2163
commit 0391f9f481
11 changed files with 306 additions and 74 deletions
+7 -4
View File
@@ -3,20 +3,23 @@ package main
import (
"caatsm/internal/config"
"caatsm/internal/nats"
"caatsm/pkg/utils"
"fmt"
)
func main() {
cfg, err := config.LoadConfig()
if err != nil {
utils.Logger.WithError(err).Fatal("Error loading config")
fmt.Printf("Error loading configuration: %v\n", err)
return
}
if err := config.ValidateConfig(cfg); err != nil {
utils.Logger.WithError(err).Fatal("Config validation error")
fmt.Printf("Invalid configuration: %v\n", err)
return
}
utils.Logger.Info("Loaded configuration successfully")
fmt.Println("Loaded configuration successfully")
subscribe := nats.NewNatsHandler(cfg)
subscribe.Subscribe()