fix: Normalize last empty line of the generated output (#336)

Generated output will not have any empty line or
carriage return at the end of the last line and
one carriage return (\n) will be added when we
print that to stdout.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
This commit is contained in:
Khosrow Moossavi
2020-10-15 18:51:30 -04:00
committed by GitHub
parent 4cd6f59f19
commit 63750c1784
133 changed files with 134 additions and 149 deletions

View File

@@ -179,7 +179,7 @@ func printExample(buf *bytes.Buffer, name string) error {
buf.WriteString(fmt.Sprintf(" %s\n", s))
}
}
buf.WriteString("\n\n")
buf.WriteString("\n")
return nil
}