kolpa

A fake data generator written in and for Go

Github星跟蹤圖

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
  • Phone Number
  • Email Address
  • Gender
  • Payment Card
  • Lorem Ipsum Text
  • 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
	fmt.Println(k.Email()) // Prints Jay.Hayden@fakemail.com
	fmt.Println(k.Phone()) // Prints +55-44-63311072
	fmt.Println(k.Gender()) // Prints male
	fmt.Println(k.PaymentCard()) // Prints 4083453410931987
	fmt.Println(k.LoremSentence()) // Prints "Provident nobis nostrum blanditiis voluptatem animi rerum harum."

}

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")

主要指標

概覽
名稱與所有者malisit/kolpa
主編程語言Go
編程語言Go (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2017-05-25 04:45:38
推送於2020-10-24 19:35:27
最后一次提交2020-10-24 14:35:26
發布數0
用户参与
星數649
關注者數10
派生數27
提交數83
已啟用問題?
問題數3
打開的問題數0
拉請求數15
打開的拉請求數0
關閉的拉請求數3
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?