Skip to content

Commit 2bd9b36

Browse files
alirezaarzehgargopherbot
authored andcommitted
x/benchmarks: fix go vet warnings
Here are go vet warnings for this repository: lang.org/x/benchmarks/driver driver/driver.go:375:2: unreachable code driver/driver.go:376:2: unreachable code third_party/biogo-examples/igor/igor/cluster.go:51:9: github.com/biogo/store/interval.IntRange struct literal uses unkeyed fields sweet/benchmarks/biogo-igor/igor.go:68:30: golang.org/x/benchmarks/third_party/biogo-examples/igor/igor.GroupConfig struct literal uses unkeyed fields This patch will fix the above warnings. Change-Id: Id36cc3fa951072d374b843eff9abd769874d3835 Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/642895 Reviewed-by: Michael Knyszek <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 0c9187f commit 2bd9b36

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

driver/driver.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,6 @@ func roundUp(n uint64) uint64 {
372372
default:
373373
return 10 * base
374374
}
375-
panic("unreachable")
376-
return 0
377375
}
378376

379377
func min(a, b uint64) uint64 {

sweet/benchmarks/biogo-igor/igor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ func main() {
6666
Procs: runtime.GOMAXPROCS(0),
6767
})
6868
cc := igor.Group(clusters, igor.GroupConfig{
69-
pileDiff,
70-
imageDiff,
71-
false,
69+
PileDiff: pileDiff,
70+
ImageDiff: imageDiff,
71+
Classic: false,
7272
})
7373
err = igor.WriteJSON(cc, &out)
7474
if err != nil {

third_party/biogo-examples/igor/igor/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (pi pileInterval) Overlap(b interval.IntRange) bool {
4848
return pi.p.Start() < b.End && pi.p.End() > b.Start
4949
}
5050
func (pi pileInterval) Range() interval.IntRange {
51-
return interval.IntRange{pi.p.Start(), pi.p.End()}
51+
return interval.IntRange{Start: pi.p.Start(), End: pi.p.End()}
5252
}
5353

5454
// ClusterConfig specifies Cluster behaviour.

0 commit comments

Comments
 (0)