Giter Site home page Giter Site logo

kolpa's Introduction

kolpa Build Status Godoc license

kolpa is a fake data generator written in and for Go.
It's capable of generating fake data for following instances for now,

  • Name
  • Address
  • Color
  • Datetime
  • User Agent

Installation

run go get github.com/malisit/kolpa on your command line.

Usage

package main

import (
	"fmt"
	"github.com/malisit/kolpa"
	"time"
)

func main() {
	k := kolpa.C() // Initiate kolpa
	
	fmt.Println(k.FirstName()) // Prints John
	fmt.Println(k.Address()) // Prints 729 Richmond Springs Suite 949, Luisborough, VT 85700-5554
	fmt.Println(k.UserAgent()) // Prints Mozilla/5.0 (compatible; MSIE 5.0; Windows 98; Win 9x 4.90; Trident/4.0)
	fmt.Println(k.Color()) // Prints Lime #00FF00
	fmt.Println(k.DateTimeAfter(time.Date(2015, 1, 0, 0, 0, 0, 0, time.UTC))) // Prints 2015-09-08 15:34:29 +0300 EEST

}

List of all possible functions can be seen on godoc.

You can set language when initiating kolpa.

k := kolpa.C("tr_TR")

Language can be setted afterwards as well.

k.SetLanguage("tr_TR")

kolpa's People

Contributors

malisit avatar

Watchers

James Cloos avatar Avldya avatar  avatar

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.