Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Randomizer ¶
type Randomizer struct {
// contains filtered or unexported fields
}
func (*Randomizer) Append ¶
func (r *Randomizer) Append(appendableItems ...string)
Appends a string to the randomizer slice
func (*Randomizer) Combine ¶
func (destRand *Randomizer) Combine(srcRand ...*Randomizer)
func (*Randomizer) Fill ¶
func (r *Randomizer) Fill(filepath string, clear bool)
This function fills the randomizer's items slice with the contents of filepath. filepath points to a file with 1 item per line. The clear parameter lets you decide whether to clear the slice before filling it (rather than append to it)
func (Randomizer) Random ¶
func (r Randomizer) Random() string
Produces a random item from the Randomizer slice. Examples show the use of rand.Seed but as of Go 1.20 the runtime seeds the generator automatically.
type SingleTranslation ¶
type Translator ¶
type Translator struct { Translate func(fromLang string, toLang string, translatable string) (SingleTranslation, error) FillLanguagesFromCodes func(SingleTranslation) SingleTranslation }
Click to show internal directories.
Click to hide internal directories.