Remove trailing whitespace in proto generator

This commit is contained in:
Nikhita Raghunath 2018-10-25 16:08:11 +05:30
parent ed39bd45f5
commit 4911ad8ff1

View File

@ -724,6 +724,10 @@ func genComment(out io.Writer, lines []string, indent string) {
lines = lines[:l-1]
}
for _, c := range lines {
if len(c) == 0 {
fmt.Fprintf(out, "%s//\n", indent) // avoid trailing whitespace
continue
}
fmt.Fprintf(out, "%s// %s\n", indent, c)
}
}