
Kolpa – A fake data generator for Go - masit
https://github.com/malisit/kolpa
======
alpb
There are libraries already out there that do 95% of what this library does.
Below you can find projects that existed for 5 and 3 years, respectively.

[https://godoc.org/github.com/icrowley/fake](https://godoc.org/github.com/icrowley/fake)

[https://godoc.org/github.com/manveru/faker](https://godoc.org/github.com/manveru/faker)

I am not sure what functionality this package provides differently, other than
the localization support, which could have been easily proposed to existing
libraries.

~~~
masit
Main goal is to have a library that provides more than these libraries you
mentioned provide. Datetime generation and User Agent generation are basic
samples of this aim at this time. It would not be looking good if it wasn't
providing most needed data types like Name and Address while providing other
specific data. Thanks for the comment!

------
grogenaut
Not to make light of your library, but what I'm really looking, and have found
most useful, is a go version of Xeger
([https://code.google.com/archive/p/xeger/)(regex](https://code.google.com/archive/p/xeger/\)\(regex)
backwards). Basically you define a regex and xeger generates random strings
that match that pattern. There's a newer lib in java as well called generex
([https://github.com/mifmif/Generex](https://github.com/mifmif/Generex)).

These plus some hand written factory girl like code work well for me in Java.
There are similar libs for C#. This lower level abstraction works for many
many business cases, not just, you know, business software.

~~~
sethammons
ha. I had a repo I started a while back that I also called xeger that did
exactly that: it reversed regex's. I thought the name was clever, but I guess
not clever enough. Kudos to them for making something that works. I think I
spent a few hours one night and did not get so far and have not revisited the
idea in 2 or so years. Maybe I should look back into that...

------
milansm
We've written something similar for Java (except it's more generic, it can
generate anything you want, and it can be made by certain rules, e.g. 100
users out of which 10 would be women born between 1970 and 1980):
[https://github.com/smartcat-labs/ranger](https://github.com/smartcat-
labs/ranger)

------
sAbakumoff
Interesting choice of supported data types! I mean how often are you
struggling with generating a mock value for..Color..

~~~
tobyjsullivan
This is just an uninformed hypothesis but I interpreted this as being an
arbitrary starting point - the idea being that it would eventually be extended
to virtually every/any class via PRs. The randomness of what's in there now
seems to communicate that idea well.

------
cagataygurturk
Great name :)

------
emre
love the name!

~~~
makmanalp
For those missing it - "kolpa" is slang in Turkish for a fake thing - widely
applicable. It could be a con, or a fake person (a bullshitter), or just
something that's a bad substitute for the original, like a "SQNY" brand
walkman knockoff. Allegedly from the Italian "Colpo".

~~~
folago
Also "colpa" in Italian means guilt.

~~~
thomasfoster96
...which is cognate to the English "culpable".

------
hossen
I used another one before but this one seems good too.

