Esempio n. 1
0
func Male() *Golfer {
	name := namegen.Male()
	return &Golfer{
		Name:       name,
		Confidence: rand.Float64(),
		Power:      rand.Float64(),
		Finesse:    rand.Float64(),
	}
}
Esempio n. 2
0
File: main.go Progetto: pshrmn/names
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())
}