From 242e48d1b7675cb9a5de5907d9716f2f22cd17bd Mon Sep 17 00:00:00 2001 From: windyboy Date: Sat, 20 Jul 2024 10:40:28 +0800 Subject: [PATCH] chore: Remove unused fields in FPL and DEP structs The code changes remove the unused `SurveillanceEquipment` field in the `FPL` struct and the `TelegramCategory` field in the `DEP` struct. These fields are no longer needed and can be safely removed. This commit improves code cleanliness and reduces unnecessary complexity. --- internal/config/config.go | 2 +- internal/domain/dep.go | 4 +- internal/domain/dep_test.go | 4 +- internal/domain/fpl.go | 4 - internal/domain/fpl_test.go | 1 - internal/parsers/aftn_parser.go | 186 ++++++++++++++++++--------- internal/parsers/aftn_parser_test.go | 47 ++++--- 7 files changed, 158 insertions(+), 90 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index fcd4f18..1d8d6df 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -94,7 +94,7 @@ const ( // - remark: Matches remarks, capturing any characters in this segment. // // The regular expression uses named capture groups for each segment, allowing for easy extraction of specific information from a matched flight plan string. - fplPatternString = `^\((?P[A-Z]{3})\-(?P[A-Z]+\d+)\-(?P[A-Z]{2})(?:.*\s*)?\-(?P[A-Z]+\d+\/?[A-Z]?)\s*\-(?P.*)\s*\-(?P[A-Z]{4})(?P\d{4})\s*\-(?P[A-Z]+\d+)(?P[A-Z0-9]+)\s(?P.*)\s*\-(?P[A-Z]{4})(?P\d{4})\s(?P[A-Z]{4})\s*\-(?PPBN\/[A-Z0-9]+)\s(?P