Skip to content

Commit

Permalink
fix: Value.Assign should work with int32 and int64.
Browse files Browse the repository at this point in the history
This applies to:

* `Value.Assign(int32)`
* `Value.Assign(uint32)`

* `Value.Assign(int64)`
* `Value.Assign(uint32)`

* `Value.Assign(int)`
* `Value.Assign(uint)`

refs #286
  • Loading branch information
pravic committed Feb 7, 2021
1 parent 77e1596 commit 35090dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion value.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (v *Value) Assign(val interface{}) {
if val.(bool) {
i = 1
}
v.SetInt(i)
v.SetInt(int32(i))
case float32:
v.Assign(float64(val.(float32)))
case int:
Expand Down

0 comments on commit 35090dc

Please sign in to comment.