Merge pull request #70237 from nikhita/proto-remove-trailing-whitespace

Remove trailing whitespace in the protobuf generator
pull/58/head
k8s-ci-robot 2018-10-25 08:25:06 -07:00 committed by GitHub
commit f4bf0e8d33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 111 additions and 107 deletions

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)
}
}