mirror of
https://github.com/on4kjm/FLEcli.git
synced 2025-01-18 21:01:10 +01:00
First implementation (SOTA)
This commit is contained in:
parent
a8f90031a2
commit
5cb43666c5
1 changed files with 7 additions and 8 deletions
|
@ -209,11 +209,6 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|||
//My Sota
|
||||
if regexpHeaderMySota.MatchString(eachline) {
|
||||
oldHeaderMySOTA := headerMySOTA
|
||||
// //FIXME: enhancement for issue #101
|
||||
// if headerMySOTA != "" {
|
||||
// errorLog = append(errorLog, fmt.Sprintf("Warning: redefining MySOTA at line %d", lineCount))
|
||||
// continue
|
||||
// }
|
||||
errorMsg := ""
|
||||
mySotaList := regexpHeaderMySota.Split(eachline, -1)
|
||||
if len(strings.TrimSpace(mySotaList[1])) > 0 {
|
||||
|
@ -226,6 +221,7 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|||
if oldHeaderMySOTA != headerMySOTA {
|
||||
// New SOTA reference defined
|
||||
headerIsFirstLine = true
|
||||
|
||||
}
|
||||
//If there is no data after the marker, we just skip the data.
|
||||
continue
|
||||
|
@ -342,8 +338,9 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|||
}
|
||||
|
||||
//store the current logline so that it can be used as a model when parsing the next line
|
||||
// and reset the firstline flag
|
||||
previousLogLine = logline
|
||||
//FIXME: we need to reset the first line
|
||||
headerIsFirstLine = false
|
||||
|
||||
//We go back to the top to process the next loaded log line (Continue not necessary here)
|
||||
}
|
||||
|
@ -396,12 +393,14 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|||
|
||||
// displayLogSimple will print to stdout a simplified dump of a full log
|
||||
func displayLogSimple(fullLog []LogLine) {
|
||||
isFirstLogLine := true
|
||||
for _, filledLogLine := range fullLog {
|
||||
if filledLogLine.isFirstLine {
|
||||
if (filledLogLine.isFirstLine || isFirstLogLine) {
|
||||
fmt.Print("\n\n")
|
||||
fmt.Println(SprintHeaderValues(filledLogLine))
|
||||
fmt.Print(SprintColumnTitles())
|
||||
isFirstLogLine = false
|
||||
}
|
||||
fmt.Print(SprintLogInColumn(filledLogLine))
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue