diff options
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/report/report.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/report/report.go b/pkg/report/report.go index e6d13b930..ac464a177 100644 --- a/pkg/report/report.go +++ b/pkg/report/report.go @@ -224,6 +224,18 @@ func IsSuppressed(reporter Reporter, output []byte) bool { bytes.Contains(output, gceConsoleHangup) } +// ParseAll returns all successive reports in output. +func ParseAll(reporter Reporter, output []byte) (reports []*Report) { + for { + rep := reporter.Parse(output) + if rep == nil { + return + } + reports = append(reports, rep) + output = output[rep.SkipPos:] + } +} + // GCE console connection sometimes fails with this message. // The message frequently happens right after a kernel panic. // So if we see it in output where we recognized a crash, we mark the report as corrupted |
