Skip to content

Commit d3304c2

Browse files
modify if to switch statement
1 parent 6a56c11 commit d3304c2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tools/load-generator/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ func (q *Querier) run(wg *sync.WaitGroup, timeBound *bucketState) {
178178
// need to be processed consecutively.
179179
runBlockMode := "current"
180180
for _, query := range q.queries {
181-
if runBlockMode == "current" {
181+
switch runBlockMode {
182+
case "current":
182183
q.query(query.Expr, "current", nil)
183-
} else if runBlockMode == "absolute" {
184+
case "absolute":
184185
q.query(query.Expr, "absolute", timeBound)
185186
}
186187
if runBlockMode == "current" && timeBound != nil {

0 commit comments

Comments
 (0)