Closed TristanSpeakEasy closed 1 year ago
I'll try to look into this in more detail.
cc @wolf-joe
I'll try to look into this in more detail.
cc @wolf-joe
I found some projects like neosergio/random-address / EthanRBrown/rrad can generate US addresses, and some projects like openaddresses/openaddresses provide a global collection of addresses. I think reusing them is a good idea
Sadly they're not in the Golang package. Not sure how we can import them into this library Random idea, should we make another package just for addresses that will base on the open address?
Golang support embedding file into binaries after Go 1.16[^1],so we can copy the data file into this project.
I don't think that's good practice. It will make the user must have the file ready.
I don't think that's good practice. It will make the user must have the file ready.
Not really. Golang's embed feature allows binaries contains text file. So we can copy those address files into this project, and users who want random addresses just need to go get
this project.
I will try this recently.
I added a new function named GetRealAddress
, using data from EthanRBrown/rrad, simple but works.
This is a great addition, but I keep being informed Tag unsupported: real_address
- do we need to add RealAddressTag
to initDefaultTag
and/or initMappertTagDefault
?
I made sure I'm using v4.0.0
This is a great addition, but I keep being informed
Tag unsupported: real_address
- do we need to addRealAddressTag
toinitDefaultTag
and/orinitMappertTagDefault
?I made sure I'm using v4.0.0
Yeah, I made a new MR (#18) to fix this.
would be great to generate street addresses something like:
could just be US addresses for now, but would be great to also specify regions and get random addresses based on different regions like the UK/Europe/China etc