1
0
mirror of https://github.com/golang/go synced 2024-09-30 04:24:29 -06:00

blog: use serial comma in long author lists

This is the Go blog house style for the rest of the text.
We just missed the author list, presumably because it
was less code (only two entries still has no comma).

Change-Id: I8bb1ab582d6e300d521ac471736ee8ab6e0f61ec
Reviewed-on: https://go-review.googlesource.com/c/tools/+/225517
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Russ Cox 2020-03-25 15:25:32 -04:00
parent a49f79bcc2
commit 644a21fb14

View File

@ -159,6 +159,9 @@ func authors(authors []present.Author) string {
for i, a := range authors {
if i > 0 {
if i == last {
if len(authors) > 2 {
b.WriteString(",")
}
b.WriteString(" and ")
} else {
b.WriteString(", ")