Skip to content

Commit

Permalink
fix: use int if the size allows it
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Huck committed May 18, 2024
1 parent 4d3f775 commit 29b18db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/sync/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ func autoConfigure(object any, config config.CustomMap) {
reflect.Int16,
reflect.Int32,
reflect.Int64:
field.SetInt(int64(value.(int)))
if v, ok := value.(int); ok {
field.SetInt(int64(v))
} else {
field.SetInt(value.(int64))
}
case reflect.Bool:
field.SetBool(value.(bool))
case reflect.String:
Expand Down

0 comments on commit 29b18db

Please sign in to comment.