This reverts CL 144137.
Reason for revert: The justification for the original commit
was that golint said so, but golint is wrong. The code reads
more clearly the original way.
Change-Id: I960f286ed66fec67aabd953e7b69993f60b00bca
Reviewed-on: https://go-review.googlesource.com/c/149339
Reviewed-by: Russ Cox <rsc@golang.org>
}
if x < y {
return -1
+ } else {
+ return +1
}
- return +1
}
func comparePrerelease(x, y string) int {
if ix != iy {
if ix {
return -1
+ } else {
+ return +1
}
- return +1
}
if ix {
if len(dx) < len(dy) {
}
if dx < dy {
return -1
+ } else {
+ return +1
}
- return +1
}
}
if x == "" {
return -1
+ } else {
+ return +1
}
- return +1
}
func nextIdent(x string) (dx, rest string) {