Open codingconcepts opened 1 year ago
Issue: The first time faker.CCType() is called, the value is internally cached, meaning subsequent calls will always return the same data:
faker.CCType()
https://github.com/go-faker/faker/blob/5effebba7fe9e25350305432ffdca5e19151edad/payment.go#L31
Fix: Remove the caching to ensure subsequent calls are sufficiently random.
also this will result in data race issue if multiple faker.CCType() being called for the first time in parallel
Issue: The first time
faker.CCType()
is called, the value is internally cached, meaning subsequent calls will always return the same data:https://github.com/go-faker/faker/blob/5effebba7fe9e25350305432ffdca5e19151edad/payment.go#L31
Fix: Remove the caching to ensure subsequent calls are sufficiently random.