Skip to content
tiennm99devPublic

About

Fake data generator for Go with English and Vietnamese locales

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

faker

Fake data for Go: names, addresses, phone numbers, emails, companies, jobs, products, currencies, food, books, lorem text and more, in English and Vietnamese. Both locales cover exactly the same providers. Pure Go, no dependencies outside the standard library.

Why: as far as we know, no other Go faker ships Vietnamese data. This one does, with current data: the 34 provincial-level units in force since 2025-07-01, family-name-first names with gendered middle and given names, and user names and emails that turn Đặng Đức into dang and duc.

Install

go get github.com/tiennm99dev/faker

Requires Go 1.26 or later.

Quick start

package main

import (
	"fmt"

	"github.com/tiennm99dev/faker"
	"github.com/tiennm99dev/faker/locale/vi"
)

func main() {
	en := faker.New(faker.WithSeed(42)) // English is the default
	fmt.Println(en.Name())              // Carmelo Bogisich
	fmt.Println(en.SafeEmail())         // weldon_ward@example.net
	fmt.Println(en.City())              // New Donniefurt

	vn := faker.New(faker.WithLocale(vi.Locale), faker.WithSeed(42))
	fmt.Println(vn.Name())      // Huỳnh Đức Đông
	fmt.Println(vn.SafeEmail()) // duong_viet@example.org
	fmt.Println(vn.City())      // Điện Biên
}

Leave out WithSeed for a random seed. With a seed, output repeats for the same seed, locale and library version. A *Faker is not safe for concurrent use: create one per goroutine.

Docs

License

Apache License 2.0, see LICENSE. Bundled data is adapted from datafaker, fake-rs and the faker gem; see NOTICE.

About

Fake data generator for Go with English and Vietnamese locales

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages