faker
faker copied to clipboard
Cached cctype results in non-random data
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.
also this will result in data race issue if multiple faker.CCType() being called for the first time in parallel