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.
go get github.com/tiennm99dev/fakerRequires Go 1.26 or later.
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.
- Providers: every method, by group
- Locales: choosing a locale, name order, the Vietnamese data decisions, adding a locale
- Data sources: where each data group comes from, with licences
- Known issues
Apache License 2.0, see LICENSE. Bundled data is adapted from datafaker, fake-rs and the faker gem; see NOTICE.