unnecessary assignment to the blank identifier
264 interval := int64(bucketSizeInt32)
265 // This is done in order to replicate the behavior in Graphite web when alignToInterval is set,
266 // in which new data is fetched with the adjusted start time.
267 for i, _ := range r {268 start := r[i].From
269 for _, v := range []int64{86400, 3600, 60} {
270 if interval >= v {
unnecessary assignment to the blank identifier
287 }
288
289 if alignToInterval != "" {
290 for i, _ := range r {291 newStart, err := StartAlignTo(r[i].From, alignToInterval)
292 if err != nil {
293 return nil
Description
Assigning to the blank identifier is unnecessary.
From the Go spec:
If the last iteration variable is the blank identifier, the range clause is equivalent to the same clause without that identifier.
Bad practice
for _ = range slc {}
x, _ = someMap[key]
_ = <-ch
Recommended
for range slc {}
x = someMap[key]
<-ch