Comments (7)
It really should just have the error in there.
from gofakeit.
I 100% agree with you. The concern right now is if i added it, it would be a breaking change. I will think about this and see how "harmful" adding it might be.
from gofakeit.
I don't think introducing an additional interface would be a breaking change?
from gofakeit.
If you go from
Fake(faker *Faker) interface{}
to
Fake(faker *Faker) (interface{}, error)
Then yes it would technically be a breaking change.
from gofakeit.
Does implementing it like this not make it backwards compatible? https://go.dev/play/p/GxOzKQxjO7D
from gofakeit.
I dont really want to implement and maintain both. I might just pull the trigger and change it.
from gofakeit.
I'm happy to open a PR for this if you're happy with the linked implemention (i.e. introducing a new interface). It should only be a couple of lines of code in isFakeable
and callFake
and have a low maintenance burden. It'd be nice to keep backwards compatibility if possible.
from gofakeit.
Related Issues (20)
- Struct tags only working on part of the struct? HOT 1
- Is there a way to generate school or university name? HOT 1
- nil values HOT 8
- Adding other delimiters for the CSVOptions HOT 2
- randomint is missing in function lookup HOT 3
- How to Sample strings based on file HOT 1
- time.Time pointers in structs yield zero values or nil
- Test Issue
- package github.com/brianvoe/gofakeit/v6: cannot find package "github.com/brianvoe/gofakeit/v6" in any of: HOT 1
- Improve data HOT 1
- Better Descriptions HOT 6
- gofakeit.date() generate different date when using same seed. HOT 4
- Generate some data with custom template function HOT 3
- Avoid circular dependencies without changing struct definition (for generated proto types)? HOT 1
- wrong game dice example
- Date Parsing Error with Single-Digit Months in CreatedFormat Field HOT 1
- Inconsistency in fake data generation while changing the order of Struct's properties. HOT 6
- Invalid tag causes infinte loop HOT 2
- UUID generates the same values over and over again. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gofakeit.