Fix false positive security scan issues.
This commit is contained in:
parent
6ed68f910e
commit
27c67aee3d
3 changed files with 9 additions and 6 deletions
|
|
@ -42,6 +42,7 @@ func INTERVAL(quantityAndUnit ...quantityAndUnit) IntervalExpression {
|
|||
|
||||
for i := 0; i < len(quantityAndUnit); i += 2 {
|
||||
quantity := strconv.FormatFloat(quantityAndUnit[i], 'f', -1, 64)
|
||||
// #nosec G602 -- false positive guarded by even-length check above and i+1 < n in loop
|
||||
unitString := unitToString(quantityAndUnit[i+1])
|
||||
fields = append(fields, quantity+" "+unitString)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue