Skip to content

Commit

Permalink
also support float64 for fuzzyint
Browse files Browse the repository at this point in the history
  • Loading branch information
DnlLrssn committed Mar 19, 2024
1 parent 6481928 commit 2a3bf7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helpers/fuzzyvalues.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ func (fi *FuzzyInt) UnmarshalJSON(arg []byte) error {
}
*fi = FuzzyInt(ival)
}
case float64:
*fi = FuzzyInt(val)
default:
return errors.Errorf("Failed to unmarshal value<%v> with type<%T> as integer", arg, val)
return errors.Errorf("Failed to unmarshal value<%v> with type<%T> as integer", val, val)
}
return nil
}

0 comments on commit 2a3bf7f

Please sign in to comment.