Skip to content

Commit c4f1b47

Browse files
committed
fix variable masking in error-case printf
1 parent bc73c68 commit c4f1b47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmd/bench/bench.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ package main
66
import (
77
"flag"
88
"fmt"
9-
"github.com/irifrance/gini/bench"
109
"log"
1110
"os"
1211
"path/filepath"
1312
"strings"
1413
"time"
14+
15+
"github.com/irifrance/gini/bench"
1516
)
1617

1718
var selFlags = flag.NewFlagSet("sel", flag.ExitOnError)
@@ -146,12 +147,12 @@ func (co *cmpOptsT) runFilt() func(*bench.Run) bool {
146147
parts := strings.Split(*co.Runs, ",")
147148
return func(r *bench.Run) bool {
148149
for _, m := range parts {
149-
m, b := filepath.Match(m, r.Name)
150+
matched, b := filepath.Match(m, r.Name)
150151
if b != nil {
151152
log.Printf("warning: match '%s' gave an error on '%s'", m, r.Name)
152153
continue
153154
}
154-
if !m {
155+
if !matched {
155156
continue
156157
}
157158
return true

0 commit comments

Comments
 (0)