Example #1
0
func Random() *Golfer {
	name := namegen.Random()
	return &Golfer{
		Name:       name,
		Confidence: rand.Float64(),
		Power:      rand.Float64(),
		Finesse:    rand.Float64(),
	}
}
Example #2
0
File: main.go Project: 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())
}