go-faker / faker

Go (Golang) Fake Data Generator for Struct, previously https://github.com/bxcodec/faker
https://pkg.go.dev/github.com/go-faker/faker/v4
MIT License
614 stars 30 forks source link

Add an accuracy option to the latitude and longitude of an address #38

Closed tomtwinkle closed 2 weeks ago

tomtwinkle commented 8 months ago

The current latitude and longitude generation logic generates values with a maximum precision of 15 float places

Example:

This is larger than the actual latitude and longitude accuracy returned by GoogleMaps GeocodeAPI, etc., and the generated values cannot be stored with accurate accuracy when mapped to json or stored in a database such as MySQL.

Example:

Therefore, we propose to change it so that the accuracy can be specified as an optional argument.

tomtwinkle commented 7 months ago

@bxcodec May I ask you to check?

rubemlrm commented 3 months ago

@tomtwinkle Hi,

Do you still have interest in adding this feature to faker? Since we have had this PR on hold for some time, we may have to close or have someone do the missing tests.

bxcodec commented 2 weeks ago

I'll close this, and please re-pen if anyone still have interest to work on this