GithubHelp home page GithubHelp logo

bgadrian / fastfaker Goto Github PK

View Code? Open in Web Editor NEW
23.0 3.0 0.0 478 KB

Fast, concurrent fake data generator for any structure or type.

Home Page: https://godoc.org/github.com/bgadrian/fastfaker

License: GNU General Public License v3.0

Go 99.68% Makefile 0.24% Shell 0.08%
golang go faker faker-library faker-generator random randomizer

fastfaker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fastfaker's Issues

Add Unicode support

Currently the data has only ASCII (1byte character) data.

Most likely the real projects will have Unicode strings, with multi-language support, and by mocking the data with only a subset of the Unicode may lead to future problems.

Todo:

  • check all the current functionalities that presumes 1 character = 1 byte (example Password.go)
  • insert non-ASCII texts inside all /data files
  • create new /data files with only non-ASCII runes
  • create a Emoji() functionality

Multi-language support

Currently the /data files only contains English words.

To decide:

  • add specific functions and data sets: NameFrench, NameRussian ... to keep the backward compatibility
  • or add the new data inside the current data sets (deterministic results will brake, like Examples, because of the % of the length).

Add template functionality

The main idea is to send to fastfaker a template and it will replace its content with random data.

Example:
fastFaker.Global().Template("My name is ~name~", "~") will return a string that replaces the variable name with the result of the function Name(). The string can be anything from a HTML template to a marshalled JSON/YML.

The functionality is similar ith the Generate() current function, but I wrote a more general and optimal version in other repo Pseudoservice as a wrapper, but I think it belongs here https://github.com/bgadrian/pseudoservice/blob/master/CUSTOM.md

Why ?

The current template system {person.name} is limited to the lists from /data, while the new Template system will take advantage of all faker public functions (over 130).

The first step was to make more functions available as a simple func() string ones 24c236b

Split the large functionality in more packages (too many .go files in the root)

Find a way to keep the package import path and functionality the same, while moving most of the files in one or more sub packages.

If we split it in more packages, the problem is a hard nut because all the submodules (person, vehicle, number ...) must share a common state, and that is the rand.Rand generator and also be a composite in the Faker structure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.