[#691] Update Go and linters

Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
This commit is contained in:
Nikita Zinkevich 2025-04-16 15:01:14 +03:00
parent 526ddc1243
commit e373f7c601
8 changed files with 14 additions and 16 deletions

View file

@ -153,13 +153,13 @@ func (p *policyCondition) UnmarshalJSON(data []byte) error {
}
if p.Matching == "content-length-range" {
min, ok := v[1].(float64)
max, ok2 := v[2].(float64)
minR, ok := v[1].(float64)
maxR, ok2 := v[2].(float64)
if !ok || !ok2 {
return errInvalidCondition
}
p.Key = strconv.FormatFloat(min, 'f', 0, 32)
p.Value = strconv.FormatFloat(max, 'f', 0, 32)
p.Key = strconv.FormatFloat(minR, 'f', 0, 32)
p.Value = strconv.FormatFloat(maxR, 'f', 0, 32)
} else {
key, ok2 := v[1].(string)
p.Value, ok = v[2].(string)