Пример #1
0
func Female() *Golfer {
	name := namegen.Female()
	return &Golfer{
		Name:       name,
		Confidence: rand.Float64(),
		Power:      rand.Float64(),
		Finesse:    rand.Float64(),
	}
}
Пример #2
0
func main() {
	rand.Seed(int64(time.Now().Nanosecond()))
	fmt.Printf("Random Names\n-------------------\n")
	fmt.Printf("Male:\t%s\n", namegen.Male())
	fmt.Printf("Female:\t%s\n", namegen.Female())
	fmt.Printf("Random:\t%s\n", namegen.Random())

	fmt.Printf("\nWeighted Names\n-------------------\n")
	fmt.Printf("Male:\t%s\n", namegen.MaleWeighted())
	fmt.Printf("Female:\t%s\n", namegen.FemaleWeighted())
	fmt.Printf("Random:\t%s\n", namegen.RandomWeighted())
}