Skip to content

Commit a5e6a89

Browse files
committed
Merge branch 'develop'
2 parents bb325f6 + 2ca416e commit a5e6a89

38 files changed

+447
-237
lines changed

app.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func addAppLookup() {
6565
AddFuncLookup("appname", Info{
6666
Display: "App Name",
6767
Category: "app",
68-
Description: "Name for an application",
68+
Description: "Software program designed for a specific purpose or task on a computer or mobile device",
6969
Example: "Parkrespond",
7070
Output: "string",
7171
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -76,7 +76,7 @@ func addAppLookup() {
7676
AddFuncLookup("appversion", Info{
7777
Display: "App Version",
7878
Category: "app",
79-
Description: "Version number for an app, following Semantic versioning format",
79+
Description: "Particular release of an application in Semantic Versioning format",
8080
Example: "1.12.14",
8181
Output: "string",
8282
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -87,7 +87,7 @@ func addAppLookup() {
8787
AddFuncLookup("appauthor", Info{
8888
Display: "App Author",
8989
Category: "app",
90-
Description: "Name for an app developer or authoring entity",
90+
Description: "Person or group creating and developing an application",
9191
Example: "Qado Energy, Inc.",
9292
Output: "string",
9393
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {

auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func addAuthLookup() {
106106
AddFuncLookup("username", Info{
107107
Display: "Username",
108108
Category: "auth",
109-
Description: "Generates a random username",
109+
Description: "Unique identifier assigned to a user for accessing an account or system",
110110
Example: "Daniel1364",
111111
Output: "string",
112112
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -117,7 +117,7 @@ func addAuthLookup() {
117117
AddFuncLookup("password", Info{
118118
Display: "Password",
119119
Category: "auth",
120-
Description: "Generates a random password",
120+
Description: "Secret word or phrase used to authenticate access to a system or account",
121121
Example: "EEP+wwpk 4lU-eHNXlJZ4n K9%v&TZ9e",
122122
Output: "string",
123123
Params: []Param{

beer.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func addBeerLookup() {
121121
AddFuncLookup("beername", Info{
122122
Display: "Beer Name",
123123
Category: "beer",
124-
Description: "Name for a beer, inspired by real beer names",
124+
Description: "Specific brand or variety of beer",
125125
Example: "Duvel",
126126
Output: "string",
127127
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -132,7 +132,7 @@ func addBeerLookup() {
132132
AddFuncLookup("beerstyle", Info{
133133
Display: "Beer Style",
134134
Category: "beer",
135-
Description: "Style of beer, covering beer types from around the world",
135+
Description: "Distinct characteristics and flavors of beer",
136136
Example: "European Amber Lager",
137137
Output: "string",
138138
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -143,7 +143,7 @@ func addBeerLookup() {
143143
AddFuncLookup("beerhop", Info{
144144
Display: "Beer Hop",
145145
Category: "beer",
146-
Description: "Beer hop variety, covering different hop types used in brewing",
146+
Description: "The flower used in brewing to add flavor, aroma, and bitterness to beer",
147147
Example: "Glacier",
148148
Output: "string",
149149
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -154,7 +154,7 @@ func addBeerLookup() {
154154
AddFuncLookup("beeryeast", Info{
155155
Display: "Beer Yeast",
156156
Category: "beer",
157-
Description: "Beer yeast, covering various yeast strains used in beer fermentation",
157+
Description: "Microorganism used in brewing to ferment sugars, producing alcohol and carbonation in beer",
158158
Example: "1388 - Belgian Strong Ale",
159159
Output: "string",
160160
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -165,7 +165,7 @@ func addBeerLookup() {
165165
AddFuncLookup("beermalt", Info{
166166
Display: "Beer Malt",
167167
Category: "beer",
168-
Description: "Beer malt, covering various malt types used in the brewing process",
168+
Description: "Processed barley or other grains, provides sugars for fermentation and flavor to beer",
169169
Example: "Munich",
170170
Output: "string",
171171
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -176,7 +176,7 @@ func addBeerLookup() {
176176
AddFuncLookup("beeralcohol", Info{
177177
Display: "Beer Alcohol",
178178
Category: "beer",
179-
Description: "Alcohol percentage",
179+
Description: "Measures the alcohol content in beer",
180180
Example: "2.7%",
181181
Output: "string",
182182
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -187,7 +187,7 @@ func addBeerLookup() {
187187
AddFuncLookup("beeribu", Info{
188188
Display: "Beer IBU",
189189
Category: "beer",
190-
Description: "International Bitterness Unit (IBU) value, indicating the bitterness level in beer",
190+
Description: "Scale measuring bitterness of beer from hops",
191191
Example: "29 IBU",
192192
Output: "string",
193193
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -198,7 +198,7 @@ func addBeerLookup() {
198198
AddFuncLookup("beerblg", Info{
199199
Display: "Beer BLG",
200200
Category: "beer",
201-
Description: "Generates a random beer Balling (°Blg) value, representing the beer's original gravity or sugar content",
201+
Description: "Scale indicating the concentration of extract in worts",
202202
Example: "6.4°Blg",
203203
Output: "string",
204204
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {

book.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func addBookLookup() {
4242
AddFuncLookup("book", Info{
4343
Display: "Book",
4444
Category: "book",
45-
Description: "Generates a comprehensive book dataset, including title, author, and genre",
45+
Description: "Written or printed work consisting of pages bound together, covering various subjects or stories",
4646
Example: `{
4747
"title": "Anna Karenina",
4848
"author": "Toni Morrison",
@@ -58,7 +58,7 @@ func addBookLookup() {
5858
AddFuncLookup("booktitle", Info{
5959
Display: "Title",
6060
Category: "book",
61-
Description: "Generates a book title from a diverse range of genres and periods",
61+
Description: "The specific name given to a book",
6262
Example: "Hamlet",
6363
Output: "string",
6464
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -69,7 +69,7 @@ func addBookLookup() {
6969
AddFuncLookup("bookauthor", Info{
7070
Display: "Author",
7171
Category: "book",
72-
Description: "Generates the name of a book author from various times and places",
72+
Description: "The individual who wrote or created the content of a book",
7373
Example: "Mark Twain",
7474
Output: "string",
7575
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -80,7 +80,7 @@ func addBookLookup() {
8080
AddFuncLookup("bookgenre", Info{
8181
Display: "Genre",
8282
Category: "book",
83-
Description: "Generates a genre from a wide range of book categories",
83+
Description: "Category or type of book defined by its content, style, or form",
8484
Example: "Adventure",
8585
Output: "string",
8686
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {

car.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func addCarLookup() {
7575
AddFuncLookup("car", Info{
7676
Display: "Car",
7777
Category: "car",
78-
Description: "Complete set of car data including essential information like type, fuel type, transmission, brand, model, and production year of a vehicle",
78+
Description: "Wheeled motor vehicle used for transportation",
7979
Example: `{
8080
"type": "Passenger car mini",
8181
"fuel": "Gasoline",
@@ -94,7 +94,7 @@ func addCarLookup() {
9494
AddFuncLookup("cartype", Info{
9595
Display: "Car Type",
9696
Category: "car",
97-
Description: "Category of vehicle, like sedan, SUV, truck, or sports car, based on design",
97+
Description: "Classification of cars based on size, use, or body style",
9898
Example: "Passenger car mini",
9999
Output: "string",
100100
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -105,7 +105,7 @@ func addCarLookup() {
105105
AddFuncLookup("carfueltype", Info{
106106
Display: "Car Fuel Type",
107107
Category: "car",
108-
Description: "Type of energy source for vehicles, such as gasoline, diesel, electric, or hybrid",
108+
Description: "Type of energy source a car uses",
109109
Example: "CNG",
110110
Output: "string",
111111
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -116,7 +116,7 @@ func addCarLookup() {
116116
AddFuncLookup("cartransmissiontype", Info{
117117
Display: "Car Transmission Type",
118118
Category: "car",
119-
Description: "Mechanism controlling vehicle's power, like manual, automatic, etc.",
119+
Description: "Mechanism a car uses to transmit power from the engine to the wheels",
120120
Example: "Manual",
121121
Output: "string",
122122
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -127,7 +127,7 @@ func addCarLookup() {
127127
AddFuncLookup("carmaker", Info{
128128
Display: "Car Maker",
129129
Category: "car",
130-
Description: "Company name specializing in designing, manufacturing, and selling cars",
130+
Description: "Company or brand that manufactures and designs cars",
131131
Example: "Nissan",
132132
Output: "string",
133133
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {
@@ -138,7 +138,7 @@ func addCarLookup() {
138138
AddFuncLookup("carmodel", Info{
139139
Display: "Car Model",
140140
Category: "car",
141-
Description: "Specific design or version of a vehicle produced by a car manufacturer",
141+
Description: "Specific design or version of a car produced by a manufacturer",
142142
Example: "Aveo",
143143
Output: "string",
144144
Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {

cmd/gofakeit/gofakeit_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
"errors"
5-
"io/ioutil"
5+
"io"
66
"os"
77
"strings"
88
"testing"
@@ -22,7 +22,7 @@ func TestMain(t *testing.T) {
2222
main()
2323

2424
w.Close()
25-
out, _ := ioutil.ReadAll(r)
25+
out, _ := io.ReadAll(r)
2626
os.Stdout = rescueStdout
2727

2828
// Get output string
@@ -56,7 +56,7 @@ func TestFunctionLoop(t *testing.T) {
5656
main()
5757

5858
w.Close()
59-
out, _ := ioutil.ReadAll(r)
59+
out, _ := io.ReadAll(r)
6060
os.Stdout = rescueStdout
6161

6262
// Get output string
@@ -211,7 +211,7 @@ func TestListCategoryFunction(t *testing.T) {
211211
outStr = strings.ToLower(outStr)
212212

213213
// Make sure outStr contains random noun
214-
if !strings.Contains(outStr, "random noun") {
214+
if !strings.Contains(outStr, "noun") {
215215
t.Errorf("list category function output does not contain random noun")
216216
}
217217
}

data/word.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var Word = map[string][]string{
2727
"noun_collective_thing": {"wad", "pair", "album", "string", "anthology", "reel", "outfit", "fleet", "comb", "archipelago", "quiver", "bale", "packet", "hedge", "basket", "orchard", "batch", "library", "battery", "set", "harvest", "block", "forest", "book", "group", "bouquet", "collection", "bowl", "stack", "bunch", "hand", "bundle", "catalog", "shower", "ream", "chest", "heap", "range", "cluster", "pack", "hail", "cloud", "galaxy", "sheaf", "clump"},
2828
"noun_countable": {"camp", "hospital", "shirt", "sock", "plant", "cup", "fork", "spoon", "plate", "straw", "town", "box", "bird", "father", "answer", "egg", "purse", "mirror", "mistake", "toilet", "toothbrush", "shower", "towel", "pool", "corner", "card", "lawn", "city", "egg", "yard", "burger", "kilometer", "mile", "father", "film", "actor", "issue", "machine", "liter", "room", "station", "journey", "castle", "hour", "finger", "boy", "book", "year", "second", "son", "month", "group", "hall", "cat", "week", "picture", "day", "village", "effect", "baby", "weekend", "class", "meal", "river", "grade", "bush", "desk", "stream", "method", "brother", "sister", "factory", "aunt", "bush", "program", "uncle", "ball", "cousin", "wall", "grandmother", "cup", "grandfather", "week", "school", "shirt", "child", "king", "road", "judge", "bridge", "car", "line", "book", "eye", "teacher", "foot", "party", "face", "day", "chest", "handle", "week", "hotel", "eye", "animal", "doctor", "adult", "village", "key", "bird", "bank", "program", "idea", "gun", "card", "brother", "dress", "room", "door", "mouth", "club", "game", "ring", "project", "sister", "road", "coat", "account", "group", "cigarette", "farm", "river", "college", "computer", "walk", "corner", "cat", "head", "street", "election", "country", "chair", "crowd", "cup", "plant", "farm", "handle", "model", "book", "message", "battle", "pen", "pencil", "elephant", "carrot", "onion", "garden", "country", "engine", "bill", "apple", "noun", "club", "crowd", "window", "field", "friend", "verb", "class", "flower", "seed", "lake", "plant", "animal", "ocean", "whale", "fish", "stream", "cloud", "couch", "steak", "problem", "light", "door", "room", "painting", "shop", "apartment", "candle", "adult", "building", "plan", "page", "ball", "game", "animal", "apartment", "box", "thought", "walk", "lady", "bottle", "article", "game", "kettle", "car", "house", "hoses", "orange", "phone", "app", "window", "door", "dollar", "foot", "cent", "library", "cat", "bed", "pound", "gate", "tomatoes", "gun", "holiday", "woman", "job", "shock", "salary", "tax", "coat", "scooter", "dog", "problem", "field", "answer", "ear", "camp", "case", "road", "woman", "product", "bridge", "man", "dream", "idea", "scheme", "invention", "cigarette", "mother", "friend", "chapter", "computer", "dream", "father", "child", "motor", "deskpath", "factory", "park", "newspaper", "hat", "dream", "table", "kitchen", "student", "captain", "doctor", "bus", "neck", "class", "list", "member", "chest", "valley", "product", "horse", "captain", "star", "hour", "page", "bus", "girl", "month", "child", "house", "boy", "bill", "kitchen", "chapter", "boat", "hand", "dress", "table", "wall", "chair", "train", "minute", "magazine", "bus", "party", "bird", "lake", "job", "nation", "bike", "election", "hand", "box", "beach", "address", "project", "task", "park", "face", "college", "bell", "plane", "store", "hall", "accident", "daughter", "ship", "candy", "smile", "city", "island", "case", "spot", "film", "husband", "artist", "tour", "bag", "boat", "driver", "office", "chair", "path", "dog", "bag", "finger", "apartment", "garden", "heart", "year", "engine", "girl", "day", "castle", "plane", "ring", "brother", "edge", "picture", "meeting", "tent", "dog", "hat", "head", "bottle", "hill"},
2929
"noun_uncountable": {"accommodation", "advertising", "air", "aid", "advice", "anger", "art", "assistance", "bread", "business", "butter", "calm", "cash", "chaos", "cheese", "childhood", "clothing", "coffee", "content", "corruption", "courage", "currency", "damage", "danger", "darkness", "data", "determination", "economics", "education", "electricity", "employment", "energy", "entertainment", "enthusiasm", "equipment", "evidence", "failure", "fame", "fire", "flour", "food", "freedom", "friendship", "fuel", "furniture", "fun", "genetics", "gold", "grammar", "guilt", "hair", "happiness", "harm", "health", "heat", "help", "homework", "honesty", "hospitality", "housework", "humour", "imagination", "importance", "information", "innocence", "intelligence", "jealousy", "juice", "justice", "kindness", "knowledge", "labour", "lack", "laughter", "leisure", "literature", "litter", "logic", "love", "luck", "magic", "management", "metal", "milk", "money", "motherhood", "motivation", "music", "nature", "news", "nutrition", "obesity", "oil", "old age", "oxygen", "paper", "patience", "permission", "pollution", "poverty", "power", "pride", "production", "progress", "pronunciation", "publicity", "punctuation", "quality", "quantity", "racism", "rain", "relaxation", "research", "respect", "rice", "room (space)", "rubbish", "safety", "salt", "sand", "seafood", "shopping", "silence", "smoke", "snow", "software", "soup", "speed", "spelling", "stress", "sugar", "sunshine", "tea", "tennis", "time", "tolerance", "trade", "traffic", "transportation", "travel", "trust", "understanding", "unemployment", "usage", "violence", "vision", "warmth", "water", "wealth", "weather", "weight", "welfare", "wheat", "width", "wildlife", "wisdom", "wood", "work", "yoga", "youth"},
30+
"noun_determiner": {"the", "a", "an", "this", "that", "these", "those", "my", "your", "his", "her", "its", "our", "their", "some", "any", "each", "every", "certain"},
3031
//"noun_proper": {}, // This refers to an actual person(John Doe), place(Chipotle, Tennessee)
3132

3233
// Verbs
@@ -76,4 +77,7 @@ var Word = map[string][]string{
7677
"connective_listing": {"firstly", "secondly", "first of all", "finally", "lastly", "for one thing", "for another", "in the first place", "to begin with", "next", "in summation", "to conclude"},
7778
"connective_casual": {"accordingly", "all the same", "an effect of", "an outcome of", "an upshot of", "as a consequence of", "as a result of", "because", "caused by", "consequently", "despite this", "even though", "hence", "however", "in that case", "moreover", "nevertheless", "otherwise", "so", "so as", "stemmed from", "still", "then", "therefore", "though", "under the circumstances", "yet"},
7879
"connective_examplify": {"accordingly", "as a result", "as exemplified by", "consequently", "for example", "for instance", "for one thing", "including", "provided that", "since", "so", "such as", "then", "therefore", "these include", "through", "unless", "without"},
80+
81+
// Misc
82+
"interjection": {"wow", "hey", "oops", "ouch", "yay", "aha", "eek", "huh", "hmm", "whoa", "yikes", "phew", "gee", "alas", "bravo"},
7983
}

generate_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ func ExampleGenerate() {
5151
fmt.Println(Generate("{shufflestrings:[key:value,int:string,1:2,a:b]}"))
5252

5353
// Output: Markus Moen ssn is 526643139 and lives at 599 Daleton
54-
// Niche backwards caused.
55-
// [1 3 2]
56-
// -4
57-
// 3
58-
// 46
59-
// [a:b int:string key:value 1:2]
54+
// Congolese choir computer.
55+
// [3 1 2]
56+
// 2
57+
// 4
58+
// 17
59+
// [int:string 1:2 a:b key:value]
6060
}
6161

6262
func ExampleFaker_Generate() {
@@ -71,12 +71,12 @@ func ExampleFaker_Generate() {
7171
fmt.Println(f.Generate("{shufflestrings:[key:value,int:string,1:2,a:b]}"))
7272

7373
// Output: Markus Moen ssn is 526643139 and lives at 599 Daleton
74-
// Niche backwards caused.
75-
// [1 3 2]
76-
// -4
77-
// 3
78-
// 46
79-
// [a:b int:string key:value 1:2]
74+
// Congolese choir computer.
75+
// [3 1 2]
76+
// 2
77+
// 4
78+
// 17
79+
// [int:string 1:2 a:b key:value]
8080
}
8181

8282
func BenchmarkGenerate(b *testing.B) {
@@ -480,14 +480,14 @@ func ExampleMap() {
480480
Seed(11)
481481
fmt.Println(Map())
482482

483-
// Output: map[contrast:Associate gauva:map[jump:scale] generally:8504801 him:[them whomever ours hence here his] its:8335564 table:map[did:[these delay these]] therefore:map[nearly:784141.8] thing:map[everything:[where caused why week hourly]]]
483+
// Output: map[here:Manager herself:map[trip:[far computer was unless whom riches]] how:8504801 ouch:Keith Ullrich outstanding:1860846 that:web services]
484484
}
485485

486486
func ExampleFaker_Map() {
487487
f := New(11)
488488
fmt.Println(f.Map())
489489

490-
// Output: map[contrast:Associate gauva:map[jump:scale] generally:8504801 him:[them whomever ours hence here his] its:8335564 table:map[did:[these delay these]] therefore:map[nearly:784141.8] thing:map[everything:[where caused why week hourly]]]
490+
// Output: map[here:Manager herself:map[trip:[far computer was unless whom riches]] how:8504801 ouch:Keith Ullrich outstanding:1860846 that:web services]
491491
}
492492

493493
func TestMap(t *testing.T) {

lookup.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ func initLookup() {
105105
addWordPronounLookup()
106106
addWordSentenceLookup()
107107
addWordVerbLookup()
108+
addWordCommentLookup()
109+
addWordMiscLookup()
108110
}
109111

110112
// internalFuncLookups is the internal map array with mapping to all available data

0 commit comments

Comments
 (0)