Skip to content

Commit

Permalink
fix: skip first line if not starting with Core
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDark committed Oct 29, 2024
1 parent db8155b commit 2a57062
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ func executeProgram(collectTimeSeconds int) bytes.Reader {
log.Println("No data to parse")
}

reader := bytes.NewReader(out.Bytes())
if !strings.HasPrefix(string(lines[0]), "Core") {
lines = lines[1:]
}

reader := bytes.NewReader(bytes.Join(lines, []byte("\n")))

return *reader
}
Expand Down

0 comments on commit 2a57062

Please sign in to comment.