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
rungo get github.com/malisit/kolpa
on your command line.
package mainimport ("fmt""github.com/malisit/kolpa""time")funcmain() {k:=kolpa.C()// Initiate kolpafmt.Println(k.FirstName())// Prints Johnfmt.Println(k.Address())// Prints 729 Richmond Springs Suite 949, Luisborough, VT 85700-5554fmt.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 #00FF00fmt.Println(k.DateTimeAfter(time.Date(2015,1,0,0,0,0,0,time.UTC)))// Prints 2015-09-08 15:34:29 +0300 EESTfmt.Println(k.Email())// Prints Jay.Hayden@fakemail.comfmt.Println(k.Phone())// Prints +55-44-63311072fmt.Println(k.Gender())// Prints malefmt.Println(k.PaymentCard())// Prints 4083453410931987fmt.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 initiatingkolpa.
Language can be setted afterwards as well.