engname

package module
v0.0.0-...-d6af025 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2014 License: MIT Imports: 2 Imported by: 1

README

eng-name Build Status

Ramdom Men/Women name generator. Golang port of this lib.


Man name : Hughe Craster
Woman name : Mary Lighten

View the docs.

Example

package main

import (
	"fmt"
	"github.com/yelinaung/eng-name"
	"time"
)

func main() {
	fmt.Println()
	// You have to seed yourself
	RandName := engname.New(time.Now().UTC().UnixNano())
	// Generating random men names
	fmt.Printf("Man name : %v \n", RandName.GetMenName())
	// Generating random women names
	fmt.Printf("Woman name : %v \n", RandName.GetWomenName())
	fmt.Println()
}

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GN_MEN   = []string{} /* 147 elements not displayed */
	GN_WOMEN = []string{} /* 137 elements not displayed */
	SNAMES   = []string{} /* 572 elements not displayed */
)

Functions

This section is empty.

Types

type Name

type Name interface {
	GetMenName() string
	GetWomenName() string
}

func New

func New(seed int64) Name

Entry point to seed a new random

type RandomName

type RandomName struct {
	// contains filtered or unexported fields
}

func (RandomName) GetMenName

func (r RandomName) GetMenName() string

Return ramdom men name

func (RandomName) GetWomenName

func (r RandomName) GetWomenName() string

Return ramdom women name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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