gorequest icon indicating copy to clipboard operation
gorequest copied to clipboard

query with int64 will lose accuracy

Open Grayon opened this issue 4 years ago • 1 comments

func TestInt64(t *testing.T) {
	s := gorequest.New().Query(map[string]int64{"a":6673221165400540161})
	t.Log(s.QueryData)
}

output

a_test.go:14: map[a:[6673221165400540000]]

json.Unmarshal an int64 to interface{}, it will be converted to a float64.

Grayon avatar Jun 23 '20 04:06 Grayon

https://github.com/wklken/gorequest/pull/8

wklken avatar Jan 07 '22 17:01 wklken