File: personal.go

package info (click to toggle)
golang-github-jackc-fake 0.0~git20150926.812a484-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 536 kB
  • sloc: makefile: 2
file content (24 lines) | stat: -rw-r--r-- 428 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package fake

import (
	"strings"
)

// Gender generates random gender
func Gender() string {
	return lookup(lang, "genders", true)
}

// GenderAbbrev returns first downcased letter of the random gender
func GenderAbbrev() string {
	g := Gender()
	if g != "" {
		return strings.ToLower(string(g[0]))
	}
	return ""
}

// Language generates random human language
func Language() string {
	return lookup(lang, "languages", true)
}