Skip to content

Commit

Permalink
improved test stability
Browse files Browse the repository at this point in the history
  • Loading branch information
sha1n committed May 22, 2021
1 parent ed745e3 commit 8951376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/report/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ func NewMarkdownTableWriter(writer *bufio.Writer) *MarkdownTableWriter {
}

func (tw *MarkdownTableWriter) WriteHeaders(headers []string) (err error) {
defer tw.writer.Flush()
if err = tw.WriteRow(headers); err == nil {
_, err = tw.writer.WriteString(fmt.Sprintf("%s|\r\n", strings.Repeat("|----", len(headers))))
}
tw.writer.Flush()
return err
}

func (tw *MarkdownTableWriter) WriteRow(row []string) (err error) {
defer tw.writer.Flush()
// TODO theoretically we need to escape '|' chars
_, err = tw.writer.WriteString(fmt.Sprintf("|%s|\r\n", strings.Join(row, "|")))
tw.writer.Flush()
return err
}

Expand Down

0 comments on commit 8951376

Please sign in to comment.