|
|
@ -19,7 +19,6 @@ limitations under the License.
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"regexp"
|
|
|
|
"regexp"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: validate a record for minimal values
|
|
|
|
//TODO: validate a record for minimal values
|
|
|
@ -75,6 +74,9 @@ func ParseLine(inputStr string, previousLine LogLine) (logLine LogLine, errorMsg
|
|
|
|
previousLine.RSTrcvd = ""
|
|
|
|
previousLine.RSTrcvd = ""
|
|
|
|
previousLine.SOTA = ""
|
|
|
|
previousLine.SOTA = ""
|
|
|
|
previousLine.WWFF = ""
|
|
|
|
previousLine.WWFF = ""
|
|
|
|
|
|
|
|
previousLine.OMname = ""
|
|
|
|
|
|
|
|
previousLine.GridLoc = ""
|
|
|
|
|
|
|
|
previousLine.Comment = ""
|
|
|
|
logLine = previousLine
|
|
|
|
logLine = previousLine
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: what happens when we have <> or when there are multiple comments
|
|
|
|
//TODO: what happens when we have <> or when there are multiple comments
|
|
|
@ -82,13 +84,11 @@ func ParseLine(inputStr string, previousLine LogLine) (logLine LogLine, errorMsg
|
|
|
|
comment,inputStr := getBraketedData(inputStr, COMMENT)
|
|
|
|
comment,inputStr := getBraketedData(inputStr, COMMENT)
|
|
|
|
if comment != "" {
|
|
|
|
if comment != "" {
|
|
|
|
logLine.Comment = comment
|
|
|
|
logLine.Comment = comment
|
|
|
|
fmt.Println("Cleaned input string: ", inputStr)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QSLmsg,inputStr := getBraketedData(inputStr, QSL)
|
|
|
|
QSLmsg,inputStr := getBraketedData(inputStr, QSL)
|
|
|
|
if QSLmsg != "" {
|
|
|
|
if QSLmsg != "" {
|
|
|
|
logLine.QSLmsg = QSLmsg
|
|
|
|
logLine.QSLmsg = QSLmsg
|
|
|
|
fmt.Println("Cleaned input string: ", inputStr)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -231,10 +231,6 @@ func ParseLine(inputStr string, previousLine LogLine) (logLine LogLine, errorMsg
|
|
|
|
_, logLine.RSTrcvd = getDefaultReport(logLine.Mode)
|
|
|
|
_, logLine.RSTrcvd = getDefaultReport(logLine.Mode)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//Debug
|
|
|
|
|
|
|
|
fmt.Println(elements, len(elements))
|
|
|
|
|
|
|
|
fmt.Println("\n", SprintLogRecord(logLine))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return logLine, errorMsg
|
|
|
|
return logLine, errorMsg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|