|
|
@ -56,10 +56,9 @@ func ParseLine(inputStr string, previousLine LogLine) (logLine LogLine, errorMsg
|
|
|
|
fmt.Println("Cleaned input string: ", inputStr)
|
|
|
|
fmt.Println("Cleaned input string: ", inputStr)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
comment,inputStr = getBraketedData(inputStr, QSL)
|
|
|
|
QSLmsg,inputStr := getBraketedData(inputStr, QSL)
|
|
|
|
if comment != "" {
|
|
|
|
if QSLmsg != "" {
|
|
|
|
logLine.QSLmsg = comment
|
|
|
|
logLine.QSLmsg = QSLmsg
|
|
|
|
inputStr = strings.Replace(inputStr, "[" + comment + "]", "",1)
|
|
|
|
|
|
|
|
fmt.Println("Cleaned input string: ", inputStr)
|
|
|
|
fmt.Println("Cleaned input string: ", inputStr)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -80,6 +79,14 @@ func ParseLine(inputStr string, previousLine LogLine) (logLine LogLine, errorMsg
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Is it a call sign ?
|
|
|
|
|
|
|
|
if validCallRegexp.MatchString(strings.ToUpper(element)) {
|
|
|
|
|
|
|
|
callErrorMsg := ""
|
|
|
|
|
|
|
|
logLine.Call, callErrorMsg = ValidateCall(element)
|
|
|
|
|
|
|
|
errorMsg = errorMsg + callErrorMsg
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//If we come here, we could not make sense of what we found
|
|
|
|
//If we come here, we could not make sense of what we found
|
|
|
|
errorMsg = errorMsg + "Unable to parse " + element + " "
|
|
|
|
errorMsg = errorMsg + "Unable to parse " + element + " "
|
|
|
|
|
|
|
|
|
|
|
|