refactor: Update ARR body parsing logic

The code changes in `pattern_test.go` update the ARR body parsing logic. The message body parsing now correctly handles ARR bodies with a different pattern format. This ensures accurate extraction of data based on patterns and improves the overall functionality of the code.
This commit is contained in:
windyboy
2024-07-24 11:07:04 +08:00
parent 496dc2b9d0
commit 738ce16f34
8 changed files with 196 additions and 149 deletions
+2 -1
View File
@@ -95,11 +95,12 @@ type TimeReceiver struct {
}
func (h *SITAHeader) Validate() error {
log := utils.GetLogger()
// Validate SendTime format (e.g., DDHHMM)
if len(h.SendTime) != 6 {
err := "invalid send_time format"
utils.Logger.Error(err)
log.Errorf("error validating send_time: %v", err)
return fmt.Errorf(err)
}
return nil