namegen

package
v5.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package namegen implements random name generation.

It builds names according to letter and phrase patterns representative of naming conventions used by various Golarion cultures.

This code is a port of John Mechalas's JavaScript name generator from https://dungeonetics.com/pfnames/ and includes a starter set of his Golarion cultural name data.

To quote John's own documentation: "The name generators presented here are based on Markov chains, and construct names that tend to follow the same letter/syllable combinations and distributions as the source names from which they were seeded. Note that these algorithms are not perfect, and you might need to generate several names before settling on one that you like: it is the nature of the Markov chain to occasionally produce silly gibberish, names that do not 'fit', or even 'real' names. These accidents are part of the fun."

Note that the names are "gender"-based. This term is used simply to differentiate cultural naming patterns, which often follow the gender expression of the individual, but many cultures have other naming variations based on social constructs such as family/clan traditions, region, economic and political status, religion, etc. All of these are "genders" as far as this module is concerned, and an arbitrary number of them may be defined for any given culture.

The default "genders" included for the supplied set of cultures includes 'F' for female names, 'M' for male names, and 'S' for surnames. Not all cultures implement all of these.

The limits on name length are not hard rules but are rather goals for the generator to try for. Also note that there are times when the generator may give up before generating the quantity of names requested in order to avoid getting into a loop that takes too much time to complete.

This code, and specifically the individual Culture definition source files, uses trademarks and/or copyrights owned by Paizo Inc., used under Paizo's Community Use Policy (paizo.com/communityuse). We are expressly prohibited from charging you to use or access this content. GMA is not published, endorsed, or specifically approved by Paizo. For more information about Paizo Inc. and Paizo products, visit paizo.com.

Index

Examples

Constants

This section is empty.

Variables

View Source
var Cultures = map[string]Culture{
	"Azlanti":    Azlanti{},
	"Bekyar":     Bekyar{},
	"Bonuwat":    Bonuwat{},
	"Chelaxian":  Chelaxian{},
	"Dwarf":      Dwarf{},
	"Elf":        Elf{},
	"Erutaki":    Erutaki{},
	"Garundi":    Garundi{},
	"Gnome":      Gnome{},
	"Half-orc":   HalfOrc{},
	"Halfling":   Halfling{},
	"Keleshite":  Keleshite{},
	"Kellid":     Kellid{},
	"Kitsune":    Kitsune{},
	"Shoanti":    Shoanti{},
	"Taldan":     Taldan{},
	"Tian-dan":   TianDan{},
	"Tian-dtang": TianDtang{},
	"Tian-hwan":  TianHwan{},
	"Tian-la":    TianLa{},
	"Tian-min":   TianMin{},
	"Tian-shu":   TianShu{},
	"Tian-sing":  TianSing{},
	"Ulfen":      Ulfen{},
	"Varisian":   Varisian{},
	"Vudrani":    Vudrani{},
	"Zenj":       Zenj{},
}

Cultures lists the cultures that are defined in this package as distributed. Programs may use this to offer a choice of cultures to the user or to get a value which can be passed to Generate or GenerateWithSurnames.

The keys of this map are culture names. Their associated values are values of the corresponding Culture type.

Functions

func Generate

func Generate(c Culture, gender rune, qty int, options ...func(*generateOptions)) ([]string, error)

Generate creates the requested quantity of random names for the given culture and gender code. These are returned as a slice of name strings.

Example
names, err := Generate(Kellid{}, 'F', 5, WithStartingLetter('K'))
if err != nil {
	fmt.Printf("Error generating names: %v\n", err)
} else {
	fmt.Println("Five example Kellid names starting with 'K':")
	for i, name := range names {
		fmt.Printf("#%d: %s\n", i+1, name)
	}
}
Output:

func GenerateWithSurnames

func GenerateWithSurnames(c Culture, gender rune, qty int, options ...func(*generateOptions)) ([][]string, error)

GenerateWithSurnames is just like Generate, but for every given name generated it also creates a surname. Names are returned as a slice of names, where each name is a slice of two strings (given name and surname).

Example
names, err := GenerateWithSurnames(Taldan{}, 'M', 5)
if err != nil {
	fmt.Printf("Error generating names: %v\n", err)
} else {
	fmt.Println("Five example Taldan names:")
	for i, name := range names {
		fmt.Printf("#%d: %s %s\n", i+1, name[0], name[1])
	}
}
Output:

func WithDieRoller

func WithDieRoller(dr *dice.DieRoller) func(*generateOptions)

WithDieRoller modifies a Generate or GenerateWithSurnames function call by specifying the DieRoller to use for random number generation. If this is not specified, or if a nil value is passed, a standard pseudorandom number generator will be employed. However, this option is provided in case you are generating names along with other character data that must remain consistent from one run of the program to the next, and as such you already have a seeded DieRoller in use, that you wish to use for the names as well.

func WithMaxLength

func WithMaxLength(maxlen int) func(*generateOptions)

WithMaxLength modifies a Generate or GenerateWithSurnames function call by specifying the maximum length for the names to be generated. If the value given is 0 or this option is not present, the maximum length defined by the culture will be used.

func WithMinLength

func WithMinLength(minlen int) func(*generateOptions)

WithMinLength modifies a Generate or GenerateWithSurnames function call by specifying the minimum length for the names to be generated. If the value given is 0 or this option is not present, the minimum length defined by the culture will be used.

func WithStartingLetter

func WithStartingLetter(start rune) func(*generateOptions)

WithStartingLetter modifies a Generate or GenerateWithSurnames function call by specifying the initial letter for the names to be generated. If this is 0 or this option is not present, names starting with any letter may be created.

Types

type Azlanti

type Azlanti struct {
	BaseCulture
}

Azlanti describes the naming conventions for the Azlanti culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Azlanti) Genders

func (c Azlanti) Genders() []rune

Genders returns the set of genders defined for the Azlanti culture.

func (Azlanti) HasGender

func (c Azlanti) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Azlanti culture.

func (Azlanti) Name

func (c Azlanti) Name() string

Name returns the name of the culture, i.e., "Azlanti".

type BaseCulture

type BaseCulture struct {
}

BaseCulture provides a baseline common to all cultures. Each individual culture should include BaseCulture.

func (BaseCulture) Genders

func (c BaseCulture) Genders() []rune

Genders returns a list of gender codes supported by this Culture.

func (BaseCulture) HasGender

func (c BaseCulture) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined for this culture.

func (BaseCulture) HasSurnames

func (c BaseCulture) HasSurnames() bool

HasSurnames returns true if this Culture implements surnames.

func (BaseCulture) Name

func (c BaseCulture) Name() string

Name returns a human-readable name of the Culture.

type Bekyar

type Bekyar struct {
	BaseCulture
}

Bekyar describes the naming conventions for the Bekyar culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Bekyar) Genders

func (c Bekyar) Genders() []rune

Genders returns the set of genders defined for the Bekyar culture.

func (Bekyar) HasGender

func (c Bekyar) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Bekyar culture.

func (Bekyar) Name

func (c Bekyar) Name() string

Name returns the name of the culture, i.e., "Bekyar".

type Bonuwat

type Bonuwat struct {
	BaseCulture
}

Bonuwat describes the naming conventions for the Bonuwat culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Bonuwat) Genders

func (c Bonuwat) Genders() []rune

Genders returns the set of genders defined for the Bonuwat culture.

func (Bonuwat) HasGender

func (c Bonuwat) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Bonuwat culture.

func (Bonuwat) Name

func (c Bonuwat) Name() string

Name returns the name of the culture, i.e., "Bonuwat".

type Chelaxian

type Chelaxian struct {
	BaseCulture
}

Chelaxian describes the naming conventions for the Chelaxian culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Chelaxian) Genders

func (c Chelaxian) Genders() []rune

Genders returns the set of genders defined for the Chelaxian culture.

func (Chelaxian) HasGender

func (c Chelaxian) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Chelaxian culture.

func (Chelaxian) HasSurnames

func (c Chelaxian) HasSurnames() bool

HasSurnames returns true if the Chelaxian culture defines surnames.

func (Chelaxian) Name

func (c Chelaxian) Name() string

Name returns the name of the culture, i.e., "Chelaxian".

type Culture

type Culture interface {
	Name() string
	Genders() []rune
	HasSurnames() bool
	HasGender(rune) bool
	// contains filtered or unexported methods
}

Culture is any specific cultural group with a distinctive naming convention.

Example
names, err := Generate(Azlanti{}, 'M', 10)
if err != nil {
	panic(fmt.Sprintf("oh, no, I can't generate names: %v", err))
}
fmt.Printf("Azlanti names: %v\n", names)
Output:

type Dwarf

type Dwarf struct {
	BaseCulture
}

Dwarf describes the naming conventions for the Dwarf culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Dwarf) Genders

func (c Dwarf) Genders() []rune

Genders returns the set of genders defined for the Dwarf culture.

func (Dwarf) HasGender

func (c Dwarf) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Dwarf culture.

func (Dwarf) Name

func (c Dwarf) Name() string

Name returns the name of the culture, i.e., "Dwarf".

type Elf

type Elf struct {
	BaseCulture
}

Elf describes the naming conventions for the Elf culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Elf) Genders

func (c Elf) Genders() []rune

Genders returns the set of genders defined for the Elf culture.

func (Elf) HasGender

func (c Elf) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Elf culture.

func (Elf) Name

func (c Elf) Name() string

Name returns the name of the culture, i.e., "Elf".

type Erutaki

type Erutaki struct {
	BaseCulture
}

Erutaki describes the naming conventions for the Erutaki culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Erutaki) Genders

func (c Erutaki) Genders() []rune

Genders returns the set of genders defined for the Erutaki culture.

func (Erutaki) HasGender

func (c Erutaki) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Erutaki culture.

func (Erutaki) Name

func (c Erutaki) Name() string

Name returns the name of the culture, i.e., "Erutaki".

type Garundi

type Garundi struct {
	BaseCulture
}

Garundi describes the naming conventions for the Garundi culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Garundi) Genders

func (c Garundi) Genders() []rune

Genders returns the set of genders defined for the Garundi culture.

func (Garundi) HasGender

func (c Garundi) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Garundi culture.

func (Garundi) Name

func (c Garundi) Name() string

Name returns the name of the culture, i.e., "Garundi".

type Gnome

type Gnome struct {
	BaseCulture
}

Gnome describes the naming conventions for the Gnome culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Gnome) Genders

func (c Gnome) Genders() []rune

Genders returns the set of genders defined for the Gnome culture.

func (Gnome) HasGender

func (c Gnome) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Gnome culture.

func (Gnome) Name

func (c Gnome) Name() string

Name returns the name of the culture, i.e., "Gnome".

type HalfOrc

type HalfOrc struct {
	BaseCulture
}

HalfOrc describes the naming conventions for the Half-orc culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (HalfOrc) Genders

func (c HalfOrc) Genders() []rune

Genders returns the set of genders defined for the Half-orc culture.

func (HalfOrc) HasGender

func (c HalfOrc) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Half-orc culture.

func (HalfOrc) Name

func (c HalfOrc) Name() string

Name returns the name of the culture, i.e., "Half-orc".

type Halfling

type Halfling struct {
	BaseCulture
}

Halfling describes the naming conventions for the Halfling culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Halfling) Genders

func (c Halfling) Genders() []rune

Genders returns the set of genders defined for the Halfling culture.

func (Halfling) HasGender

func (c Halfling) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Halfling culture.

func (Halfling) Name

func (c Halfling) Name() string

Name returns the name of the culture, i.e., "Halfling".

type Keleshite

type Keleshite struct {
	BaseCulture
}

Keleshite describes the naming conventions for the Keleshite culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Keleshite) Genders

func (c Keleshite) Genders() []rune

Genders returns the set of genders defined for the Keleshite culture.

func (Keleshite) HasGender

func (c Keleshite) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Keleshite culture.

func (Keleshite) HasSurnames

func (c Keleshite) HasSurnames() bool

HasSurnames returns true if the Keleshite culture defines surnames.

func (Keleshite) Name

func (c Keleshite) Name() string

Name returns the name of the culture, i.e., "Keleshite".

type Kellid

type Kellid struct {
	BaseCulture
}

Kellid describes the naming conventions for the Kellid culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Kellid) Genders

func (c Kellid) Genders() []rune

Genders returns the set of genders defined for the Kellid culture.

func (Kellid) HasGender

func (c Kellid) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Kellid culture.

func (Kellid) Name

func (c Kellid) Name() string

Name returns the name of the culture, i.e., "Kellid".

type Kitsune

type Kitsune struct {
	BaseCulture
}

Kitsune describes the naming conventions for the Kitsune culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Kitsune) Genders

func (c Kitsune) Genders() []rune

Genders returns the set of genders defined for the Kitsune culture.

func (Kitsune) HasGender

func (c Kitsune) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Kitsune culture.

func (Kitsune) Name

func (c Kitsune) Name() string

Name returns the name of the culture, i.e., "Kitsune".

type Shoanti

type Shoanti struct {
	BaseCulture
}

Shoanti describes the naming conventions for the Shoanti culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Shoanti) Genders

func (c Shoanti) Genders() []rune

Genders returns the set of genders defined for the Shoanti culture.

func (Shoanti) HasGender

func (c Shoanti) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Shoanti culture.

func (Shoanti) Name

func (c Shoanti) Name() string

Name returns the name of the culture, i.e., "Shoanti".

type Taldan

type Taldan struct {
	BaseCulture
}

Taldan describes the naming conventions for the Taldan culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Taldan) Genders

func (c Taldan) Genders() []rune

Genders returns the set of genders defined for the Taldan culture.

func (Taldan) HasGender

func (c Taldan) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Taldan culture.

func (Taldan) HasSurnames

func (c Taldan) HasSurnames() bool

HasSurnames returns true if the Taldan culture defines surnames.

func (Taldan) Name

func (c Taldan) Name() string

Name returns the name of the culture, i.e., "Taldan".

type TianDan

type TianDan struct {
	BaseCulture
}

TianDan describes the naming conventions for the Tian-dan culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (TianDan) Genders

func (c TianDan) Genders() []rune

Genders returns the set of genders defined for the Tian-dan culture.

func (TianDan) HasGender

func (c TianDan) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Tian-dan culture.

func (TianDan) HasSurnames

func (c TianDan) HasSurnames() bool

HasSurnames returns true if the Tian-dan culture defines surnames.

func (TianDan) Name

func (c TianDan) Name() string

Name returns the name of the culture, i.e., "Tian-dan".

type TianDtang

type TianDtang struct {
	BaseCulture
}

TianDtang describes the naming conventions for the Tian-dtang culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (TianDtang) Genders

func (c TianDtang) Genders() []rune

Genders returns the set of genders defined for the Tian-dtang culture.

func (TianDtang) HasGender

func (c TianDtang) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Tian-dtang culture.

func (TianDtang) HasSurnames

func (c TianDtang) HasSurnames() bool

HasSurnames returns true if the Tian-dtang culture defines surnames.

func (TianDtang) Name

func (c TianDtang) Name() string

Name returns the name of the culture, i.e., "Tian-dtang".

type TianHwan

type TianHwan struct {
	BaseCulture
}

TianHwan describes the naming conventions for the Tian-hwan culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (TianHwan) Genders

func (c TianHwan) Genders() []rune

Genders returns the set of genders defined for the Tian-hwan culture.

func (TianHwan) HasGender

func (c TianHwan) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Tian-hwan culture.

func (TianHwan) HasSurnames

func (c TianHwan) HasSurnames() bool

HasSurnames returns true if the Tian-hwan culture defines surnames.

func (TianHwan) Name

func (c TianHwan) Name() string

Name returns the name of the culture, i.e., "Tian-hwan".

type TianLa

type TianLa struct {
	BaseCulture
}

TianLa describes the naming conventions for the Tian-la culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (TianLa) Genders

func (c TianLa) Genders() []rune

Genders returns the set of genders defined for the Tian-la culture.

func (TianLa) HasGender

func (c TianLa) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Tian-la culture.

func (TianLa) Name

func (c TianLa) Name() string

Name returns the name of the culture, i.e., "Tian-la".

type TianMin

type TianMin struct {
	BaseCulture
}

TianMin describes the naming conventions for the Tian-min culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (TianMin) Genders

func (c TianMin) Genders() []rune

Genders returns the set of genders defined for the Tian-min culture.

func (TianMin) HasGender

func (c TianMin) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Tian-min culture.

func (TianMin) HasSurnames

func (c TianMin) HasSurnames() bool

HasSurnames returns true if the Tian-min culture defines surnames.

func (TianMin) Name

func (c TianMin) Name() string

Name returns the name of the culture, i.e., "Tian-min".

type TianShu

type TianShu struct {
	BaseCulture
}

TianShu describes the naming conventions for the Tian-shu culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (TianShu) Genders

func (c TianShu) Genders() []rune

Genders returns the set of genders defined for the Tian-shu culture.

func (TianShu) HasGender

func (c TianShu) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Tian-shu culture.

func (TianShu) HasSurnames

func (c TianShu) HasSurnames() bool

HasSurnames returns true if the Tian-shu culture defines surnames.

func (TianShu) Name

func (c TianShu) Name() string

Name returns the name of the culture, i.e., "Tian-shu".

type TianSing

type TianSing struct {
	BaseCulture
}

TianSing describes the naming conventions for the Tian-sing culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (TianSing) Genders

func (c TianSing) Genders() []rune

Genders returns the set of genders defined for the Tian-sing culture.

func (TianSing) HasGender

func (c TianSing) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Tian-sing culture.

func (TianSing) Name

func (c TianSing) Name() string

Name returns the name of the culture, i.e., "Tian-sing".

type Ulfen

type Ulfen struct {
	BaseCulture
}

Ulfen describes the naming conventions for the Ulfen culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Ulfen) Genders

func (c Ulfen) Genders() []rune

Genders returns the set of genders defined for the Ulfen culture.

func (Ulfen) HasGender

func (c Ulfen) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Ulfen culture.

func (Ulfen) HasSurnames

func (c Ulfen) HasSurnames() bool

HasSurnames returns true if the Ulfen culture defines surnames.

func (Ulfen) Name

func (c Ulfen) Name() string

Name returns the name of the culture, i.e., "Ulfen".

type Varisian

type Varisian struct {
	BaseCulture
}

Varisian describes the naming conventions for the Varisian culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Varisian) Genders

func (c Varisian) Genders() []rune

Genders returns the set of genders defined for the Varisian culture.

func (Varisian) HasGender

func (c Varisian) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Varisian culture.

func (Varisian) HasSurnames

func (c Varisian) HasSurnames() bool

HasSurnames returns true if the Varisian culture defines surnames.

func (Varisian) Name

func (c Varisian) Name() string

Name returns the name of the culture, i.e., "Varisian".

type Vudrani

type Vudrani struct {
	BaseCulture
}

Vudrani describes the naming conventions for the Vudrani culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Vudrani) Genders

func (c Vudrani) Genders() []rune

Genders returns the set of genders defined for the Vudrani culture.

func (Vudrani) HasGender

func (c Vudrani) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Vudrani culture.

func (Vudrani) HasSurnames

func (c Vudrani) HasSurnames() bool

HasSurnames returns true if the Vudrani culture defines surnames.

func (Vudrani) Name

func (c Vudrani) Name() string

Name returns the name of the culture, i.e., "Vudrani".

type Zenj

type Zenj struct {
	BaseCulture
}

Zenj describes the naming conventions for the Zenj culture. Its methods give further details, but generally speaking the main operation to perform on these types is to just call the Generate and GenerateWithSurnames methods to create new names which conform to their cultural patterns.

func (Zenj) Genders

func (c Zenj) Genders() []rune

Genders returns the set of genders defined for the Zenj culture.

func (Zenj) HasGender

func (c Zenj) HasGender(gender rune) bool

HasGender returns true if the specified gender code is defined in the Zenj culture.

func (Zenj) Name

func (c Zenj) Name() string

Name returns the name of the culture, i.e., "Zenj".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL