From ba9f4816700af0483930ca6eb73246851af524b8 Mon Sep 17 00:00:00 2001 From: Sam Mortenson Date: Sat, 29 Jun 2024 16:13:04 -0400 Subject: [PATCH] Selfishly hack in some lorem methods --- gofakeit.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gofakeit.go b/gofakeit.go index 4d70030..61f2813 100644 --- a/gofakeit.go +++ b/gofakeit.go @@ -9,6 +9,11 @@ import ( // Calls a `func() string` shaped method in a given faker instance. func callFakerMethod(method string, faker *gofakeit.Faker) (string, error) { switch method { + // Note: added these in for my own use, probably should let valueFuncs take multiple params + case "loremIpsumSentence": + return faker.LoremIpsumSentence(20), nil + case "loremIpsumParagraph": + return faker.LoremIpsumParagraph(1, 4, 20, ""), nil case "achAccount": return faker.AchAccount(), nil case "achRouting": @@ -55,7 +60,7 @@ func callFakerMethod(method string, faker *gofakeit.Faker) (string, error) { return faker.AppName(), nil case "appVersion": return faker.AppVersion(), nil - case "bS": + case "bs": return faker.BS(), nil case "beerAlcohol": return faker.BeerAlcohol(), nil @@ -383,7 +388,7 @@ func callFakerMethod(method string, faker *gofakeit.Faker) (string, error) { return faker.Question(), nil case "quote": return faker.Quote(), nil - case "sSN": + case "ssn": return faker.SSN(), nil case "safariUserAgent": return faker.SafariUserAgent(), nil @@ -419,10 +424,8 @@ func callFakerMethod(method string, faker *gofakeit.Faker) (string, error) { return faker.TimeZoneFull(), nil case "timeZoneRegion": return faker.TimeZoneRegion(), nil - case "uRL": + case "url": return faker.URL(), nil - case "uUID": - return faker.UUID(), nil case "userAgent": return faker.UserAgent(), nil case "username":