mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/go: use tagged switch
Minor modernization to use a tagged switch statement in lieu of if-else chain. Change-Id: I132d279d421b4a609403f85f9f1ddfc2605a5399 Reviewed-on: https://go-review.googlesource.com/c/go/+/715341 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
d741483a1f
commit
8239156571
1 changed files with 4 additions and 3 deletions
|
|
@ -138,11 +138,12 @@ func TestStmtLines(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var m float64
|
var m float64
|
||||||
if runtime.GOARCH == "amd64" {
|
switch runtime.GOARCH {
|
||||||
|
case "amd64":
|
||||||
m = 0.0111 // > 98.89% obtained on amd64, no backsliding
|
m = 0.0111 // > 98.89% obtained on amd64, no backsliding
|
||||||
} else if runtime.GOARCH == "riscv64" {
|
case "riscv64":
|
||||||
m = 0.03 // XXX temporary update threshold to 97% for regabi
|
m = 0.03 // XXX temporary update threshold to 97% for regabi
|
||||||
} else {
|
default:
|
||||||
m = 0.02 // expect 98% elsewhere.
|
m = 0.02 // expect 98% elsewhere.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue