forked from TrueCloudLab/frostfs-s3-gw
[#691] Update Go and linters
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
This commit is contained in:
parent
526ddc1243
commit
e373f7c601
8 changed files with 14 additions and 16 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue