mirror of https://github.com/golang/go.git
Refactor out single common line
This commit is contained in:
parent
97fe38d54b
commit
06f14762f3
|
|
@ -151,15 +151,14 @@ func (g *CommentGroup) Text() string {
|
|||
n++
|
||||
}
|
||||
}
|
||||
lines = lines[0:n]
|
||||
} else {
|
||||
// Remove trailing blank lines
|
||||
n = len(lines)
|
||||
for n > 0 && lines[n-1] == "" {
|
||||
n--
|
||||
}
|
||||
lines = lines[0:n]
|
||||
}
|
||||
lines = lines[0:n]
|
||||
|
||||
// Add final "" entry to get trailing newline from Join.
|
||||
if n > 0 && lines[n-1] != "" {
|
||||
|
|
|
|||
Loading…
Reference in New Issue