jaswdr / faker

:rocket: Ultimate fake data generator for Go with zero dependencies
https://pkg.go.dev/github.com/jaswdr/faker
MIT License
549 stars 59 forks source link

feat: added ethereum address #91

Closed xlanor closed 2 years ago

xlanor commented 2 years ago

Description

Added Eth address as well as a random bitcoin (picks randomly between the 3 types avaliable). Also renamed a getBitcoinAscii to better reflect generic purpose as the same function can be used for ethereum

Are you trying to fix an existing issue?

78

Go Version

abc@c63bccef3747:~/workspace/oss/faker$ go test ./...
ok      github.com/jaswdr/faker 5.457s

Go Tests

abc@c63bccef3747:~/workspace/oss/faker$ go version
go version go1.17.3 linux/amd64
codecov[bot] commented 2 years ago

Codecov Report

Merging #91 (cdc3253) into master (251583f) will decrease coverage by 0.23%. The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
- Coverage   91.18%   90.95%   -0.24%     
==========================================
  Files          36       36              
  Lines        1101     1117      +16     
==========================================
+ Hits         1004     1016      +12     
  Misses         74       74              
- Partials       23       27       +4     
Impacted Files Coverage Δ
crypto.go 92.30% <77.77%> (-7.70%) :arrow_down:
payment.go 80.00% <0.00%> (-20.00%) :arrow_down:
company.go 91.66% <0.00%> (-8.34%) :arrow_down:
internet.go 90.83% <0.00%> (-2.50%) :arrow_down:
address.go 94.52% <0.00%> (ø)
person.go 80.00% <0.00%> (+1.66%) :arrow_up:
faker.go 90.11% <0.00%> (+2.37%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 251583f...cdc3253. Read the comment docs.

xlanor commented 2 years ago

I am currently unable to get to 100% coverage due to the fact that some of my logic flows here are randomized (for more generic mocks like bitcoin). Would like you to take a look at my other PR after this where I addressed the underlying problem more specifically @jaswdr

jaswdr commented 2 years ago

LGTM, I'll merge now and fix the underlying problems in another PR