Commit 0d656934 authored by diplozoon's avatar diplozoon Committed by Ian Lance Taylor

cmd/go: remove unnecessary else conditions

Fixes golint warning about "if block ends with a return statement, so drop this else and outdent its block".

Change-Id: I6fc8724f586efcb6e2ed92ee36be421d3e9a8c80
Reviewed-on: https://go-review.googlesource.com/c/144137Reviewed-by: 's avatarRalph Corderoy <ralph@inputplus.co.uk>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent c9bc1340
......@@ -312,9 +312,8 @@ func compareInt(x, y string) int {
}
if x < y {
return -1
} else {
return +1
}
return +1
}
func comparePrerelease(x, y string) int {
......@@ -353,9 +352,8 @@ 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) {
......@@ -367,16 +365,14 @@ func comparePrerelease(x, y string) int {
}
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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment