refactor: Add FlightSchedule.Index field and update parsers

The code changes introduce a new `Index` field in the `FlightSchedule` struct and update the parsers in `aviation_parser.go` and `schedule_parser.go` to handle this field. This addition allows for the extraction and parsing of the `Index` value from flight schedule messages. The changes improve the functionality and accuracy of the code when working with flight schedules.
This commit is contained in:
windyboy
2024-07-29 17:54:52 +08:00
parent bb4faf4d13
commit 8593f6ce9d
4 changed files with 116 additions and 7 deletions
+3 -1
View File
@@ -3,13 +3,15 @@ package domain
import "fmt"
type FlightSchedule struct {
Index string `json:"index,omitempty"`
// Date of the flight schedule.
// Example: "30OCT"
Date string `json:"date"`
// Category of the flight schedule. It could represent different categories based on the airline or flight type.
// Example: "H/G"
Category string `json:"category,omitempty"`
Task string `json:"task,omitempty"`
// Flight number of the flight schedule. This is a unique identifier for the flight.
// Example: "CA1014"