Skip to content

Persian-faker is an easy-to-use Go library designed to help developers generate realistic Persian-language data for testing and simulation purposes. This package is ideal for populating databases, creating rich demos, and validating application behaviors under more realistic conditions.

License

Notifications You must be signed in to change notification settings

sepisoltani/persian-faker

Repository files navigation

persian-faker

Persian Faker

codecov

The persian-faker is a specialized Go package designed to generate realistic Persian fake data, ideal for populating test data or simulating user data in applications that require Persian locale-specific data.

Installation

To install this package, run the following command in your terminal:

go get github.com/sepisoltani/persian-faker

Quick Start

Here's how you can start using the persian-faker to generate various types of fake data:

Importing the Package

import persianfaker "github.com/sepisoltani/persian-faker"

Creating a Data Generator

var faker = persianfaker.New()

Name Provider

  • Generate a random Persian first name:
var firstName = faker.Name.FirstName()
  • Generate a random Persian last name:
var lastName = faker.Name.LastName()
  • Generate a random Persian full name:
var fullName = faker.Name.FullName()

Text Provider

  • Generate a random Persian sentence:
var sentence = faker.Text.Sentence()

Phone Number Provider

  • Generate a random Persian mobile number:
var phoneNumber = faker.PhoneNumber.PhoneNumber()

Location Provider

  • Generate a random province:
var province = faker.Location.Province()
  • Generate a random city:
var city = faker.Location.City()
  • Generate a random country:
var country = faker.Location.Country()
  • Generate a random address:
var address = faker.Location.Address()

Bank Provider

  • Generate a random Persian bank name:
var bankName = faker.Bank.BankName()
  • Generate a random Persian bank IBAN:
var iban = faker.Bank.IBAN()
  • Generate a random bank card number:
var cardNumber = faker.Bank.CardNumber()

Digit Provider

  • Generate a Persian digit:
var digit = faker.Digit.Digit()

Bill Provider

  • Generate a random bill type:
var billType = faker.Bill.BillType()

Vehicle Provider

  • Generate a random car plate number:
var carPlateNumber = faker.Vehicle.CarPlateNumber()

Contributing

We welcome contributions to improve the package. If you have suggestions or improvements, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

Persian-faker is an easy-to-use Go library designed to help developers generate realistic Persian-language data for testing and simulation purposes. This package is ideal for populating databases, creating rich demos, and validating application behaviors under more realistic conditions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages