update go version from 1.23 to 1.25.3

This commit is contained in:
mohammadreza javid 2026-03-20 13:38:26 +03:30
parent 0b1d2e5bd3
commit 38cd7d1c1c
779 changed files with 99374 additions and 23323 deletions

70
go.mod
View File

@ -1,24 +1,24 @@
module git.gocasts.ir/ebhomengo/niki module git.gocasts.ir/ebhomengo/niki
go 1.23 go 1.25.4
require ( require (
github.com/brianvoe/gofakeit/v7 v7.1.2 github.com/brianvoe/gofakeit/v7 v7.14.1
github.com/go-ozzo/ozzo-validation v3.6.0+incompatible github.com/go-ozzo/ozzo-validation v3.6.0+incompatible
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0
github.com/go-sql-driver/mysql v1.8.1 github.com/go-sql-driver/mysql v1.9.3
github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang-jwt/jwt/v4 v4.5.2
github.com/kavenegar/kavenegar-go v0.0.0-20221124112814-40341057b5ca github.com/kavenegar/kavenegar-go v0.0.0-20240205151018-77039f51467d
github.com/knadh/koanf v1.5.0 github.com/knadh/koanf v1.5.0
github.com/labstack/echo-jwt/v4 v4.2.0 github.com/labstack/echo-jwt/v4 v4.4.0
github.com/labstack/echo/v4 v4.12.0 github.com/labstack/echo/v4 v4.15.1
github.com/ory/dockertest/v3 v3.11.0 github.com/ory/dockertest/v3 v3.12.0
github.com/redis/go-redis/v9 v9.4.0 github.com/redis/go-redis/v9 v9.18.0
github.com/rubenv/sql-migrate v1.6.0 github.com/rubenv/sql-migrate v1.8.1
github.com/stretchr/testify v1.9.0 github.com/stretchr/testify v1.11.1
github.com/swaggo/echo-swagger v1.4.1 github.com/swaggo/echo-swagger v1.5.2
github.com/swaggo/swag v1.16.3 github.com/swaggo/swag v1.16.6
golang.org/x/crypto v0.23.0 golang.org/x/crypto v0.46.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/natefinch/lumberjack.v2 v2.2.1
) )
@ -31,54 +31,60 @@ require (
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/continuity v0.4.3 // indirect github.com/containerd/continuity v0.4.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/docker/cli v26.1.4+incompatible // indirect github.com/docker/cli v27.4.1+incompatible // indirect
github.com/docker/docker v27.1.1+incompatible // indirect github.com/docker/docker v27.1.1+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect
github.com/fatih/structs v1.1.0 // indirect github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/spec v0.21.0 // indirect github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/swag v0.23.0 // indirect github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/josharian/intern v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect
github.com/labstack/gommon v0.4.2 // indirect github.com/labstack/gommon v0.4.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/user v0.3.0 // indirect
github.com/moby/term v0.5.0 // indirect github.com/moby/term v0.5.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/opencontainers/runc v1.1.13 // indirect github.com/opencontainers/runc v1.2.3 // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect github.com/sirupsen/logrus v1.9.3 // indirect
github.com/stretchr/objx v0.5.2 // indirect github.com/stretchr/objx v0.5.2 // indirect
github.com/sv-tools/openapi v0.2.1 // indirect
github.com/swaggo/files/v2 v2.0.0 // indirect github.com/swaggo/files/v2 v2.0.0 // indirect
github.com/swaggo/swag/v2 v2.0.0-rc4 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/net v0.25.0 // indirect go.uber.org/atomic v1.11.0 // indirect
golang.org/x/sys v0.21.0 // indirect golang.org/x/mod v0.30.0 // indirect
golang.org/x/text v0.15.0 // indirect golang.org/x/net v0.48.0 // indirect
golang.org/x/time v0.5.0 // indirect golang.org/x/sync v0.19.0 // indirect
golang.org/x/tools v0.21.0 // indirect golang.org/x/sys v0.39.0 // indirect
golang.org/x/text v0.32.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.39.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
) )

172
go.sum
View File

@ -39,8 +39,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/brianvoe/gofakeit/v7 v7.1.2 h1:vSKaVScNhWVpf1rlyEKSvO8zKZfuDtGqoIHT//iNNb8= github.com/brianvoe/gofakeit/v7 v7.14.1 h1:a7fe3fonbj0cW3wgl5VwIKfZtiH9C3cLnwcIXWT7sow=
github.com/brianvoe/gofakeit/v7 v7.1.2/go.mod h1:QXuPeBw164PJCzCUZVmgpgHJ3Llj49jSLVkKPMtxtxA= github.com/brianvoe/gofakeit/v7 v7.14.1/go.mod h1:QXuPeBw164PJCzCUZVmgpgHJ3Llj49jSLVkKPMtxtxA=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
@ -49,15 +49,16 @@ github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK3
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4=
github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/continuity v0.4.5/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -65,8 +66,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= github.com/docker/cli v27.4.1+incompatible h1:VzPiUlRJ/xh+otB75gva3r05isHMo5wXDfPRi5/b4hI=
github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v27.4.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY=
github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
@ -83,10 +84,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs= github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs=
github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw= github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw=
@ -97,32 +96,37 @@ github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8=
github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-ozzo/ozzo-validation v3.6.0+incompatible h1:msy24VGS42fKO9K1vLz82/GeYW1cILu7Nuuj1N3BBkE= github.com/go-ozzo/ozzo-validation v3.6.0+incompatible h1:msy24VGS42fKO9K1vLz82/GeYW1cILu7Nuuj1N3BBkE=
github.com/go-ozzo/ozzo-validation v3.6.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/go-ozzo/ozzo-validation v3.6.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU=
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es=
github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew=
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w=
github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@ -206,10 +210,12 @@ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kavenegar/kavenegar-go v0.0.0-20221124112814-40341057b5ca h1:aEyiDaExheG7fNpEYcILCVGgM7jlLzTVgxEQAGaepeM= github.com/kavenegar/kavenegar-go v0.0.0-20240205151018-77039f51467d h1:5yPyBSS28Nojbr7pAkiXADGj6VpTXx73o6SsprKbSoo=
github.com/kavenegar/kavenegar-go v0.0.0-20221124112814-40341057b5ca/go.mod h1:CRhvvr4KNAyrg+ewrutOf+/QoHs7lztSoLjp+GqhYlA= github.com/kavenegar/kavenegar-go v0.0.0-20240205151018-77039f51467d/go.mod h1:CRhvvr4KNAyrg+ewrutOf+/QoHs7lztSoLjp+GqhYlA=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs=
github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@ -217,37 +223,40 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/labstack/echo-jwt/v4 v4.2.0 h1:odSISV9JgcSCuhgQSV/6Io3i7nUmfM/QkBeR5GVJj5c= github.com/labstack/echo-jwt/v4 v4.4.0 h1:nrXaEnJupfc2R4XChcLRDyghhMZup77F8nIzHnBK19U=
github.com/labstack/echo-jwt/v4 v4.2.0/go.mod h1:MA2RqdXdEn4/uEglx0HcUOgQSyBaTh5JcaHIan3biwU= github.com/labstack/echo-jwt/v4 v4.4.0/go.mod h1:kYXWgWms9iFqI3ldR+HAEj/Zfg5rZtR7ePOgktG4Hjg=
github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0= github.com/labstack/echo/v4 v4.15.1 h1:S9keusg26gZpjMmPqB5hOEvNKnmd1lNmcHrbbH2lnFs=
github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM= github.com/labstack/echo/v4 v4.15.1/go.mod h1:xmw1clThob0BSVRX1CRQkGQ/vjwcpOMjQZSZa9fKA/c=
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI=
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
@ -269,6 +278,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo=
github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@ -277,16 +288,17 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= github.com/opencontainers/runc v1.2.3 h1:fxE7amCzfZflJO2lHXf4y/y8M1BoAqp+FVmG19oYB80=
github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA= github.com/opencontainers/runc v1.2.3/go.mod h1:nSxcWUydXrsBZVYNSkTjoQ/N6rcyTtn+1SD5D4+kRIM=
github.com/ory/dockertest/v3 v3.11.0 h1:OiHcxKAvSDUwsEVh2BjxQQc/5EHz9n0va9awCtNGuyA= github.com/ory/dockertest/v3 v3.12.0 h1:3oV9d0sDzlSQfHtIaB5k6ghUCVMVLpAY8hwrqoCyRCw=
github.com/ory/dockertest/v3 v3.11.0/go.mod h1:VIPxS1gwT9NpPOrfD3rACs8Y9Z7yhzO4SB194iUDnUI= github.com/ory/dockertest/v3 v3.12.0/go.mod h1:aKNDTva3cp8dwOWwb9cWuX84aH5akkxXRvO7KCwWVjE=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI=
@ -317,14 +329,14 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/redis/go-redis/v9 v9.4.0 h1:Yzoz33UZw9I/mFhx4MNrB6Fk+XHO1VukNcCa1+lwyKk= github.com/redis/go-redis/v9 v9.18.0 h1:pMkxYPkEbMPwRdenAzUNyFNrDgHx9U+DrBabWNfSRQs=
github.com/redis/go-redis/v9 v9.4.0/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= github.com/redis/go-redis/v9 v9.18.0/go.mod h1:k3ufPphLU5YXwNTUcCRXGxUoF1fqxnhFQmscfkCoDA0=
github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rubenv/sql-migrate v1.6.0 h1:IZpcTlAx/VKXphWEpwWJ7BaMq05tYtE80zYz+8a5Il8= github.com/rubenv/sql-migrate v1.8.1 h1:EPNwCvjAowHI3TnZ+4fQu3a915OpnQoPAjTXCGOy2U0=
github.com/rubenv/sql-migrate v1.6.0/go.mod h1:m3ilnKP7sNb4eYkLsp6cGdPOl4OBcXM6rcbzU+Oqc5k= github.com/rubenv/sql-migrate v1.8.1/go.mod h1:BTIKBORjzyxZDS6dzoiw6eAFYJ1iNlGAtjn4LGeVjS8=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
@ -338,21 +350,31 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/swaggo/echo-swagger v1.4.1 h1:Yf0uPaJWp1uRtDloZALyLnvdBeoEL5Kc7DtnjzO/TUk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/swaggo/echo-swagger v1.4.1/go.mod h1:C8bSi+9yH2FLZsnhqMZLIZddpUxZdBYuNHbtaS1Hljc= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/sv-tools/openapi v0.2.1 h1:ES1tMQMJFGibWndMagvdoo34T1Vllxr1Nlm5wz6b1aA=
github.com/sv-tools/openapi v0.2.1/go.mod h1:k5VuZamTw1HuiS9p2Wl5YIDWzYnHG6/FgPOSFXLAhGg=
github.com/swaggo/echo-swagger v1.5.2 h1:KUM4QuEO1r/maky6Ybb9wS5MFEkJUpXwPbK4wwBe5Uk=
github.com/swaggo/echo-swagger v1.5.2/go.mod h1:nt3Z+SlyzXNIQ4odFNlPzRdcNOFvkPJHf+t4sMLhNu4=
github.com/swaggo/files/v2 v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw= github.com/swaggo/files/v2 v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw=
github.com/swaggo/files/v2 v2.0.0/go.mod h1:24kk2Y9NYEJ5lHuCra6iVwkMjIekMCaFq/0JQj66kyM= github.com/swaggo/files/v2 v2.0.0/go.mod h1:24kk2Y9NYEJ5lHuCra6iVwkMjIekMCaFq/0JQj66kyM=
github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= github.com/swaggo/swag v1.16.6 h1:qBNcx53ZaX+M5dxVyTrgQ0PJ/ACK+NzhwcbieTt+9yI=
github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= github.com/swaggo/swag v1.16.6/go.mod h1:ngP2etMK5a0P3QBizic5MEwpRmluJZPHjXcMoj4Xesg=
github.com/swaggo/swag/v2 v2.0.0-rc4 h1:SZ8cK68gcV6cslwrJMIOqPkJELRwq4gmjvk77MrvHvY=
github.com/swaggo/swag/v2 v2.0.0-rc4/go.mod h1:Ow7Y8gF16BTCDn8YxZbyKn8FkMLRUHekv1kROJZpbvE=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
@ -367,10 +389,14 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@ -378,8 +404,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
@ -389,8 +415,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -408,8 +434,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -422,8 +448,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -456,10 +482,9 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
@ -467,11 +492,11 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@ -483,8 +508,8 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ=
golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@ -519,7 +544,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
@ -535,6 +562,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@ -543,3 +571,5 @@ gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=

View File

@ -7,317 +7,356 @@ Table generated with tablesgenerator.com/markdown_tables File->Paste table data
| Benchmark | Ops | CPU | MEM | MEM alloc | | Benchmark | Ops | CPU | MEM | MEM alloc |
|---------------------------------------|----------|----------------|--------------|------------------| |---------------------------------------|----------|----------------|--------------|------------------|
| BenchmarkAddress-10 | 1369538 | 874.7 ns/op | 195 B/op | 5 allocs/op | | BenchmarkAddress-10 | 1103170 | 1084 ns/op | 223 B/op | 6 allocs/op |
| BenchmarkStreet-10 | 3438403 | 347.9 ns/op | 25 B/op | 2 allocs/op | | BenchmarkStreet-10 | 2678632 | 426.1 ns/op | 25 B/op | 2 allocs/op |
| BenchmarkStreetNumber-10 | 8601847 | 138.2 ns/op | 4 B/op | 1 allocs/op | | BenchmarkStreetNumber-10 | 7752144 | 154.4 ns/op | 4 B/op | 1 allocs/op |
| BenchmarkStreetPrefix-10 | 19814623 | 60.26 ns/op | 0 B/op | 0 allocs/op | | BenchmarkStreetPrefix-10 | 14321246 | 84.29 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkStreetName-10 | 19633909 | 60.78 ns/op | 0 B/op | 0 allocs/op | | BenchmarkStreetName-10 | 14315438 | 84.03 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkStreetSuffix-10 | 19717612 | 60.19 ns/op | 0 B/op | 0 allocs/op | | BenchmarkStreetSuffix-10 | 13827625 | 83.90 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCity-10 | 20219280 | 58.88 ns/op | 0 B/op | 0 allocs/op | | BenchmarkUnit-10 | 7394977 | 162.7 ns/op | 14 B/op | 2 allocs/op |
| BenchmarkState-10 | 19526760 | 60.85 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCity-10 | 14257396 | 84.31 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkStateAbr-10 | 19634631 | 60.79 ns/op | 0 B/op | 0 allocs/op | | BenchmarkState-10 | 14311333 | 83.57 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkZip-10 | 7521580 | 157.7 ns/op | 5 B/op | 1 allocs/op | | BenchmarkStateAbr-10 | 14235634 | 84.14 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCountry-10 | 19451166 | 61.29 ns/op | 0 B/op | 0 allocs/op | | BenchmarkZip-10 | 7180789 | 166.8 ns/op | 5 B/op | 1 allocs/op |
| BenchmarkCountryAbr-10 | 19585867 | 60.82 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCountry-10 | 14644250 | 82.44 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLatitude-10 | 72309668 | 16.22 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCountryAbr-10 | 14065713 | 83.73 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLongitude-10 | 72334910 | 16.23 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLatitude-10 | 74722898 | 16.06 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLatitudeInRange-10 | 65830375 | 17.77 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLongitude-10 | 74551914 | 16.04 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLongitudeInRange-10 | 66400602 | 17.77 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLatitudeInRange-10 | 68917987 | 17.34 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPetName-10 | 30391768 | 39.19 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLongitudeInRange-10 | 68985835 | 17.37 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAnimal-10 | 28761544 | 41.22 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAirlineAircraftType-10 | 13969006 | 85.89 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAnimalType-10 | 26955640 | 44.13 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAirlineAirplane-10 | 14245006 | 84.17 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkFarmAnimal-10 | 22307872 | 53.39 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAirlineAirport-10 | 14062609 | 84.47 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCat-10 | 24226416 | 49.13 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAirlineAirportIATA-10 | 14078275 | 85.46 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDog-10 | 19702195 | 60.53 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAirlineFlightNumber-10 | 8181994 | 147.6 ns/op | 45 B/op | 4 allocs/op |
| BenchmarkBird-10 | 17095884 | 70.22 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAirlineRecordLocator-10 | 8466958 | 142.1 ns/op | 23 B/op | 1 allocs/op |
| BenchmarkAppName-10 | 3805696 | 314.4 ns/op | 25 B/op | 1 allocs/op | | BenchmarkAirlineSeat-10 | 14182210 | 84.84 ns/op | 19 B/op | 2 allocs/op |
| BenchmarkAppVersion-10 | 10250247 | 116.4 ns/op | 7 B/op | 1 allocs/op | | BenchmarkPetName-10 | 14235944 | 82.89 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAppAuthor-10 | 11592895 | 101.2 ns/op | 8 B/op | 0 allocs/op | | BenchmarkAnimal-10 | 14401180 | 83.02 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkUsername-10 | 8975020 | 132.9 ns/op | 16 B/op | 2 allocs/op | | BenchmarkAnimalType-10 | 14429384 | 82.93 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPassword-10 | 322147 | 3647 ns/op | 1656 B/op | 60 allocs/op | | BenchmarkFarmAnimal-10 | 14249454 | 83.95 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBeerName-10 | 27986706 | 42.27 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCat-10 | 14469751 | 83.29 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBeerStyle-10 | 19460616 | 60.99 ns/op | 0 B/op | 0 allocs/op | | BenchmarkDog-10 | 14395026 | 82.36 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBeerHop-10 | 26915132 | 44.35 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBird-10 | 14887028 | 82.10 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBeerYeast-10 | 24840991 | 47.98 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAppName-10 | 3364251 | 351.7 ns/op | 25 B/op | 1 allocs/op |
| BenchmarkBeerMalt-10 | 20806075 | 57.18 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAppVersion-10 | 10653699 | 112.7 ns/op | 7 B/op | 1 allocs/op |
| BenchmarkBeerIbu-10 | 41349307 | 28.99 ns/op | 8 B/op | 1 allocs/op | | BenchmarkAppAuthor-10 | 7753665 | 155.4 ns/op | 8 B/op | 0 allocs/op |
| BenchmarkBeerAlcohol-10 | 6054163 | 197.8 ns/op | 28 B/op | 2 allocs/op | | BenchmarkUsername-10 | 1387273 | 910.2 ns/op | 822 B/op | 13 allocs/op |
| BenchmarkBeerBlg-10 | 5825622 | 205.6 ns/op | 37 B/op | 2 allocs/op | | BenchmarkPassword-10 | 452104 | 2519 ns/op | 128 B/op | 2 allocs/op |
| BenchmarkBook-10 | 6927696 | 171.9 ns/op | 48 B/op | 1 allocs/op | | BenchmarkBeerName-10 | 14425518 | 82.98 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBookTitle-10 | 31594431 | 37.36 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBeerStyle-10 | 14450242 | 83.06 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBookAuthor-10 | 29969000 | 39.91 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBeerHop-10 | 14424109 | 83.10 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBookGenre-10 | 24269676 | 48.77 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBeerYeast-10 | 14369450 | 84.90 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCar-10 | 3795943 | 316.3 ns/op | 96 B/op | 1 allocs/op | | BenchmarkBeerMalt-10 | 14445836 | 83.21 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCarType-10 | 26309082 | 43.81 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBeerIbu-10 | 43577666 | 27.39 ns/op | 8 B/op | 1 allocs/op |
| BenchmarkCarFuelType-10 | 26414821 | 45.18 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBeerAlcohol-10 | 6503149 | 184.8 ns/op | 4 B/op | 1 allocs/op |
| BenchmarkCarTransmissionType-10 | 24309171 | 48.83 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBeerBlg-10 | 6394459 | 187.2 ns/op | 13 B/op | 1 allocs/op |
| BenchmarkCarMaker-10 | 23505099 | 51.01 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBook-10 | 4396315 | 272.0 ns/op | 48 B/op | 1 allocs/op |
| BenchmarkCarModel-10 | 19055469 | 62.82 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBookTitle-10 | 14470020 | 84.03 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCelebrityActor-10 | 19915483 | 57.84 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBookAuthor-10 | 14473611 | 83.25 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCelebrityBusiness-10 | 20186090 | 67.55 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBookGenre-10 | 14471212 | 83.33 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCelebritySport-10 | 14223360 | 84.47 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCar-10 | 2628781 | 456.6 ns/op | 96 B/op | 1 allocs/op |
| BenchmarkColor-10 | 21535978 | 54.16 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCarType-10 | 14205280 | 84.16 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNiceColors-10 | 71414755 | 16.16 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCarFuelType-10 | 14108670 | 83.96 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkSafeColor-10 | 24683570 | 46.53 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCarTransmissionType-10 | 13697488 | 88.10 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkHexColor-10 | 4815675 | 250.3 ns/op | 24 B/op | 3 allocs/op | | BenchmarkCarMaker-10 | 14143714 | 84.80 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkRGBColor-10 | 19453399 | 61.67 ns/op | 24 B/op | 1 allocs/op | | BenchmarkCarModel-10 | 14127410 | 84.76 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCompany-10 | 25604892 | 46.66 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCelebrityActor-10 | 13975066 | 85.48 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCompanySuffix-10 | 24647574 | 48.83 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCelebrityBusiness-10 | 14261449 | 84.07 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBlurb-10 | 20634126 | 58.88 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCelebritySport-10 | 14069204 | 85.40 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBuzzWord-10 | 23034157 | 51.84 ns/op | 0 B/op | 0 allocs/op | | BenchmarkColor-10 | 14250574 | 84.13 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBS-10 | 21803314 | 55.08 ns/op | 0 B/op | 0 allocs/op | | BenchmarkNiceColors-10 | 100000000 | 11.42 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkJob-10 | 4121804 | 292.0 ns/op | 64 B/op | 1 allocs/op | | BenchmarkSafeColor-10 | 14290966 | 84.07 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkJobTitle-10 | 24344308 | 47.51 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHexColor-10 | 6276794 | 190.9 ns/op | 24 B/op | 3 allocs/op |
| BenchmarkJobDescriptor-10 | 24049240 | 50.12 ns/op | 0 B/op | 0 allocs/op | | BenchmarkRGBColor-10 | 28464741 | 42.39 ns/op | 24 B/op | 1 allocs/op |
| BenchmarkJobLevel-10 | 19349389 | 62.45 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCompany-10 | 13964258 | 86.33 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkSlogan-10 | 4499653 | 263.1 ns/op | 41 B/op | 1 allocs/op | | BenchmarkCompanySuffix-10 | 13848536 | 86.55 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCSVLookup100-10 | 1184 | 1014597 ns/op | 713620 B/op | 9923 allocs/op | | BenchmarkBlurb-10 | 13809465 | 88.33 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkEmoji-10 | 24200866 | 49.72 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBuzzWord-10 | 13909864 | 86.45 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkEmojiDescription-10 | 22978600 | 52.18 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBS-10 | 13955137 | 86.23 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkEmojiCategory-10 | 21228057 | 56.57 ns/op | 0 B/op | 0 allocs/op | | BenchmarkJob-10 | 3353815 | 357.2 ns/op | 64 B/op | 1 allocs/op |
| BenchmarkEmojiAlias-10 | 17616240 | 68.45 ns/op | 0 B/op | 0 allocs/op | | BenchmarkJobTitle-10 | 14383609 | 83.58 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkEmojiTag-10 | 19253190 | 62.21 ns/op | 0 B/op | 0 allocs/op | | BenchmarkJobDescriptor-10 | 14196513 | 84.28 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkError-10 | 1637725 | 736.5 ns/op | 288 B/op | 8 allocs/op | | BenchmarkJobLevel-10 | 14159757 | 84.76 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkErrorObject-10 | 6755540 | 177.7 ns/op | 32 B/op | 3 allocs/op | | BenchmarkSlogan-10 | 3303717 | 340.9 ns/op | 41 B/op | 1 allocs/op |
| BenchmarkErrorDatabase-10 | 5794706 | 200.2 ns/op | 63 B/op | 3 allocs/op | | BenchmarkCSVLookup100-10 | 1672 | 706289 ns/op | 831725 B/op | 10251 allocs/op |
| BenchmarkErrorGRPC-10 | 6063802 | 196.8 ns/op | 64 B/op | 3 allocs/op | | BenchmarkDate-10 | 14483701 | 83.01 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkErrorHTTP-10 | 3956130 | 302.2 ns/op | 158 B/op | 4 allocs/op | | BenchmarkPastDate-10 | 24398281 | 49.04 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkErrorHTTPClient-10 | 6025258 | 196.4 ns/op | 52 B/op | 3 allocs/op | | BenchmarkFutureDate-10 | 24536008 | 48.87 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkErrorHTTPServer-10 | 5969395 | 202.1 ns/op | 59 B/op | 3 allocs/op | | BenchmarkDateRange-10 | 9339344 | 128.1 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkErrorRuntime-10 | 4786108 | 248.3 ns/op | 150 B/op | 3 allocs/op | | BenchmarkMonth-10 | 100000000 | 11.42 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkErrorValidation-10 | 1811821 | 667.8 ns/op | 277 B/op | 7 allocs/op | | BenchmarkMonthString-10 | 98138764 | 12.11 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkFileMimeType-10 | 26273320 | 45.47 ns/op | 0 B/op | 0 allocs/op | | BenchmarkWeekDay-10 | 98253607 | 12.13 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkFileExtension-10 | 22216770 | 53.94 ns/op | 0 B/op | 0 allocs/op | | BenchmarkDay-10 | 100000000 | 11.43 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCusip-10 | 6778542 | 176.4 ns/op | 16 B/op | 1 allocs/op | | BenchmarkYear-10 | 100000000 | 11.44 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkIsin-10 | 1844566 | 652.1 ns/op | 525 B/op | 7 allocs/op | | BenchmarkHour-10 | 100000000 | 11.46 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkFruit-10 | 20381516 | 58.81 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMinute-10 | 100000000 | 11.48 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVegetable-10 | 19638996 | 61.11 ns/op | 0 B/op | 0 allocs/op | | BenchmarkSecond-10 | 100000000 | 11.43 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBreakfast-10 | 9425649 | 127.2 ns/op | 32 B/op | 1 allocs/op | | BenchmarkNanoSecond-10 | 100000000 | 11.55 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLunch-10 | 8996594 | 133.6 ns/op | 34 B/op | 1 allocs/op | | BenchmarkTimeZone-10 | 14662479 | 81.60 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDinner-10 | 9427389 | 126.6 ns/op | 36 B/op | 1 allocs/op | | BenchmarkTimeZoneFull-10 | 14709021 | 81.05 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDrink-10 | 8552294 | 140.4 ns/op | 7 B/op | 2 allocs/op | | BenchmarkTimeZoneAbv-10 | 14627991 | 81.31 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkSnack-10 | 7678719 | 156.7 ns/op | 32 B/op | 1 allocs/op | | BenchmarkTimeZoneOffset-10 | 12801638 | 93.70 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDessert-10 | 8907098 | 134.0 ns/op | 31 B/op | 2 allocs/op | | BenchmarkTimeZoneRegion-10 | 14714446 | 81.50 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkGamertag-10 | 2474312 | 483.9 ns/op | 83 B/op | 5 allocs/op | | BenchmarkEmoji-10 | 10143355 | 118.7 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDice-10 | 47727080 | 25.22 ns/op | 8 B/op | 1 allocs/op | | BenchmarkEmojiCategory-10 | 14940362 | 81.38 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkGenerate/package-10 | 423741 | 2822 ns/op | 1187 B/op | 29 allocs/op | | BenchmarkEmojiAlias-10 | 14637633 | 82.16 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkGenerate/Complex-10 | 138112 | 8653 ns/op | 4553 B/op | 80 allocs/op | | BenchmarkEmojiTag-10 | 14625763 | 82.15 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkFixedWidthLookup100-10 | 2072 | 583512 ns/op | 489975 B/op | 8701 allocs/op | | BenchmarkEmojiFlag-10 | 14470842 | 82.81 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkRegex-10 | 633699 | 1914 ns/op | 1632 B/op | 27 allocs/op | | BenchmarkEmojiAnimal-10 | 14617693 | 82.11 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkRegexEmail-10 | 205447 | 5893 ns/op | 4084 B/op | 90 allocs/op | | BenchmarkEmojiFood-10 | 14477235 | 82.84 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMap-10 | 337576 | 3596 ns/op | 1111 B/op | 16 allocs/op | | BenchmarkEmojiPlant-10 | 14502708 | 82.58 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkHackerPhrase-10 | 166683 | 7209 ns/op | 3107 B/op | 50 allocs/op | | BenchmarkEmojiMusic-10 | 14580860 | 82.40 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkHackerAbbreviation-10 | 25295019 | 47.33 ns/op | 0 B/op | 0 allocs/op | | BenchmarkEmojiSentence-10 | 2058350 | 583.2 ns/op | 450 B/op | 7 allocs/op |
| BenchmarkHackerAdjective-10 | 24022460 | 49.76 ns/op | 0 B/op | 0 allocs/op | | BenchmarkError-10 | 2990094 | 399.0 ns/op | 282 B/op | 6 allocs/op |
| BenchmarkHackerNoun-10 | 22496308 | 53.31 ns/op | 0 B/op | 0 allocs/op | | BenchmarkErrorObject-10 | 7202356 | 165.3 ns/op | 32 B/op | 3 allocs/op |
| BenchmarkHackerVerb-10 | 18546052 | 64.53 ns/op | 0 B/op | 0 allocs/op | | BenchmarkErrorDatabase-10 | 6873763 | 173.0 ns/op | 63 B/op | 3 allocs/op |
| BenchmarkHackeringVerb-10 | 20298242 | 59.05 ns/op | 0 B/op | 0 allocs/op | | BenchmarkErrorGRPC-10 | 6894307 | 171.9 ns/op | 64 B/op | 3 allocs/op |
| BenchmarkReplaceWithNumbers-10 | 1402717 | 852.8 ns/op | 296 B/op | 10 allocs/op | | BenchmarkErrorHTTP-10 | 5222224 | 229.4 ns/op | 158 B/op | 4 allocs/op |
| BenchmarkHipsterWord-10 | 25151432 | 47.83 ns/op | 0 B/op | 0 allocs/op | | BenchmarkErrorHTTPClient-10 | 6889472 | 175.2 ns/op | 52 B/op | 3 allocs/op |
| BenchmarkHipsterSentence-10 | 1314279 | 907.8 ns/op | 288 B/op | 3 allocs/op | | BenchmarkErrorHTTPServer-10 | 6682477 | 177.1 ns/op | 59 B/op | 3 allocs/op |
| BenchmarkHipsterParagraph-10 | 67437 | 17682 ns/op | 10521 B/op | 48 allocs/op | | BenchmarkErrorRuntime-10 | 5930980 | 206.6 ns/op | 150 B/op | 3 allocs/op |
| BenchmarkInputName-10 | 20759898 | 57.98 ns/op | 0 B/op | 0 allocs/op | | BenchmarkErrorValidation-10 | 3319014 | 358.1 ns/op | 274 B/op | 5 allocs/op |
| BenchmarkSvg-10 | 225738 | 5181 ns/op | 8876 B/op | 52 allocs/op | | BenchmarkFileMimeType-10 | 14300468 | 83.87 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkImageURL-10 | 15524359 | 77.15 ns/op | 38 B/op | 3 allocs/op | | BenchmarkFileExtension-10 | 14363823 | 83.48 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkImage-10 | 63 | 18773091 ns/op | 2457691 B/op | 307202 allocs/op | | BenchmarkCusip-10 | 9081240 | 131.9 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkImageJpeg-10 | 39 | 29498291 ns/op | 2982478 B/op | 307217 allocs/op | | BenchmarkIsin-10 | 2656158 | 451.8 ns/op | 469 B/op | 4 allocs/op |
| BenchmarkImagePng-10 | 16 | 68552771 ns/op | 5899010 B/op | 307270 allocs/op | | BenchmarkFruit-10 | 14394954 | 83.51 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDomainName-10 | 3001479 | 402.2 ns/op | 95 B/op | 5 allocs/op | | BenchmarkVegetable-10 | 14364404 | 83.47 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDomainSuffix-10 | 21476332 | 56.03 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBreakfast-10 | 10058257 | 117.5 ns/op | 39 B/op | 1 allocs/op |
| BenchmarkURL-10 | 1289262 | 934.6 ns/op | 277 B/op | 10 allocs/op | | BenchmarkLunch-10 | 10161496 | 118.3 ns/op | 41 B/op | 1 allocs/op |
| BenchmarkHTTPMethod-10 | 19895946 | 60.56 ns/op | 0 B/op | 0 allocs/op | | BenchmarkDinner-10 | 10117947 | 117.6 ns/op | 43 B/op | 1 allocs/op |
| BenchmarkIPv4Address-10 | 6088518 | 196.5 ns/op | 16 B/op | 1 allocs/op | | BenchmarkDrink-10 | 10450734 | 113.9 ns/op | 16 B/op | 2 allocs/op |
| BenchmarkIPv6Address-10 | 2580320 | 462.0 ns/op | 111 B/op | 8 allocs/op | | BenchmarkSnack-10 | 10065492 | 119.0 ns/op | 39 B/op | 1 allocs/op |
| BenchmarkMacAddress-10 | 3281300 | 364.7 ns/op | 24 B/op | 1 allocs/op | | BenchmarkDessert-10 | 10256098 | 118.2 ns/op | 38 B/op | 2 allocs/op |
| BenchmarkHTTPStatusCode-10 | 16597051 | 72.18 ns/op | 0 B/op | 0 allocs/op | | BenchmarkGamertag-10 | 2809584 | 429.9 ns/op | 81 B/op | 5 allocs/op |
| BenchmarkHTTPStatusCodeSimple-10 | 17250238 | 69.52 ns/op | 0 B/op | 0 allocs/op | | BenchmarkDice-10 | 69207811 | 17.31 ns/op | 8 B/op | 1 allocs/op |
| BenchmarkLogLevel-10 | 20608036 | 58.20 ns/op | 0 B/op | 0 allocs/op | | BenchmarkGenerate/simple_single_function-10 | 3665461 | 325.1 ns/op | 270 B/op | 6 allocs/op |
| BenchmarkUserAgent-10 | 1946059 | 615.5 ns/op | 298 B/op | 5 allocs/op | | BenchmarkGenerate/simple_multiple_functions-10 | 944131 | 1298 ns/op | 882 B/op | 16 allocs/op |
| BenchmarkChromeUserAgent-10 | 2619324 | 458.2 ns/op | 184 B/op | 5 allocs/op | | BenchmarkGenerate/function_with_params-10 | 1730911 | 691.4 ns/op | 1144 B/op | 16 allocs/op |
| BenchmarkFirefoxUserAgent-10 | 1601706 | 753.8 ns/op | 362 B/op | 6 allocs/op | | BenchmarkGenerate/multiple_functions_with_params-10 | 537613 | 2206 ns/op | 2721 B/op | 37 allocs/op |
| BenchmarkSafariUserAgent-10 | 1569805 | 764.4 ns/op | 551 B/op | 7 allocs/op | | BenchmarkGenerate/mixed_letters_numbers-10 | 9572214 | 125.2 ns/op | 32 B/op | 2 allocs/op |
| BenchmarkOperaUserAgent-10 | 2378972 | 504.7 ns/op | 212 B/op | 5 allocs/op | | BenchmarkGenerate/complex_mixed-10 | 543666 | 2158 ns/op | 2310 B/op | 32 allocs/op |
| BenchmarkJSONLookup100-10 | 928 | 1276230 ns/op | 813725 B/op | 12134 allocs/op | | BenchmarkGenerate/no_replacements-10 | 12480820 | 95.38 ns/op | 192 B/op | 4 allocs/op |
| BenchmarkLanguage-10 | 23873984 | 50.34 ns/op | 0 B/op | 0 allocs/op | | BenchmarkGenerate/many_functions-10 | 233031 | 5238 ns/op | 3486 B/op | 54 allocs/op |
| BenchmarkLanguageAbbreviation-10 | 25025524 | 47.93 ns/op | 0 B/op | 0 allocs/op | | BenchmarkGenerate/nested_params-10 | 1316234 | 906.3 ns/op | 1373 B/op | 23 allocs/op |
| BenchmarkLanguageBCP-10 | 21895112 | 54.74 ns/op | 0 B/op | 0 allocs/op | | BenchmarkGenerate/nested_complex-10 | 1000000 | 1068 ns/op | 1745 B/op | 25 allocs/op |
| BenchmarkProgrammingLanguage-10 | 21169636 | 56.70 ns/op | 0 B/op | 0 allocs/op | | BenchmarkGenerate/bio_template-10 | 733396 | 1648 ns/op | 1472 B/op | 20 allocs/op |
| BenchmarkLoremIpsumWord-10 | 23980356 | 49.92 ns/op | 0 B/op | 0 allocs/op | | BenchmarkGenerate/sentence_template-10 | 3021042 | 407.2 ns/op | 488 B/op | 8 allocs/op |
| BenchmarkLoremIpsumSentence-10 | 1344384 | 894.8 ns/op | 219 B/op | 2 allocs/op | | BenchmarkGenerate/long_string_many_replacements-10 | 306052 | 3878 ns/op | 3586 B/op | 44 allocs/op |
| BenchmarkLoremIpsumParagraph-10 | 66643 | 17916 ns/op | 8483 B/op | 40 allocs/op | | BenchmarkFixedWidthLookup100-10 | 3188 | 368023 ns/op | 453353 B/op | 6099 allocs/op |
| BenchmarkMinecraftOre-10 | 15077451 | 79.85 ns/op | 0 B/op | 0 allocs/op | | BenchmarkRegex-10 | 1000000 | 1179 ns/op | 1632 B/op | 27 allocs/op |
| BenchmarkMinecraftWood-10 | 14422303 | 83.44 ns/op | 0 B/op | 0 allocs/op | | BenchmarkRegexEmail-10 | 288193 | 4169 ns/op | 4084 B/op | 90 allocs/op |
| BenchmarkMinecraftArmorTier-10 | 15262417 | 78.70 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMap-10 | 411193 | 2769 ns/op | 1112 B/op | 16 allocs/op |
| BenchmarkMinecraftArmorPart-10 | 15340200 | 78.11 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHackerPhrase-10 | 492094 | 2459 ns/op | 2452 B/op | 26 allocs/op |
| BenchmarkMinecraftWeapon-10 | 15107792 | 79.78 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHackerAbbreviation-10 | 14372289 | 83.53 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMinecraftTool-10 | 14428170 | 83.15 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHackerAdjective-10 | 14220135 | 84.27 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMinecraftDye-10 | 14657188 | 81.95 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHackerNoun-10 | 14309001 | 83.26 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMinecraftFood-10 | 14860236 | 81.01 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHackerVerb-10 | 14295102 | 84.19 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMinecraftAnimal-10 | 15281302 | 78.35 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHackeringVerb-10 | 14516464 | 82.27 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMinecraftVillagerJob-10 | 14586627 | 82.14 ns/op | 0 B/op | 0 allocs/op | | BenchmarkReplaceWithNumbers-10 | 2076896 | 579.9 ns/op | 264 B/op | 9 allocs/op |
| BenchmarkMinecraftVillagerStation-10 | 14678592 | 81.82 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHipsterWord-10 | 14007025 | 85.50 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMinecraftVillagerLevel-10 | 14314164 | 83.76 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHipsterSentence-10 | 1501389 | 797.2 ns/op | 701 B/op | 11 allocs/op |
| BenchmarkMinecraftMobPassive-10 | 15132750 | 79.32 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHipsterParagraph-10 | 409591 | 2942 ns/op | 2625 B/op | 43 allocs/op |
| BenchmarkMinecraftMobNeutral-10 | 13802880 | 87.23 ns/op | 0 B/op | 0 allocs/op | | BenchmarkInputName-10 | 14354660 | 83.41 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMinecraftMobHostile-10 | 13141233 | 91.06 ns/op | 0 B/op | 0 allocs/op | | BenchmarkSvg-10 | 311258 | 3814 ns/op | 8868 B/op | 52 allocs/op |
| BenchmarkMinecraftMobBoss-10 | 15245322 | 78.79 ns/op | 0 B/op | 0 allocs/op | | BenchmarkID-10 | 32851885 | 36.10 ns/op | 24 B/op | 1 allocs/op |
| BenchmarkMinecraftBiome-10 | 14943789 | 79.86 ns/op | 0 B/op | 0 allocs/op | | BenchmarkUUID-10 | 26154878 | 45.74 ns/op | 48 B/op | 1 allocs/op |
| BenchmarkMinecraftWeather-10 | 12681386 | 94.55 ns/op | 0 B/op | 0 allocs/op | | BenchmarkImage-10 | 87 | 13643686 ns/op | 2457691 B/op | 307202 allocs/op |
| BenchmarkBool-10 | 73596490 | 16.18 ns/op | 0 B/op | 0 allocs/op | | BenchmarkImageJpeg-10 | 51 | 22983315 ns/op | 2982473 B/op | 307217 allocs/op |
| BenchmarkUUID-10 | 4128735 | 288.7 ns/op | 48 B/op | 1 allocs/op | | BenchmarkImagePng-10 | 20 | 55524785 ns/op | 5898540 B/op | 307239 allocs/op |
| BenchmarkShuffleAnySlice-10 | 3149857 | 380.0 ns/op | 24 B/op | 1 allocs/op | | BenchmarkDomainName-10 | 2861862 | 418.8 ns/op | 95 B/op | 5 allocs/op |
| BenchmarkFlipACoin-10 | 74457853 | 16.17 ns/op | 0 B/op | 0 allocs/op | | BenchmarkDomainSuffix-10 | 14735926 | 81.42 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMovie-10 | 9234234 | 129.3 ns/op | 32 B/op | 1 allocs/op | | BenchmarkUrlSlug-10 | 2498754 | 480.0 ns/op | 81 B/op | 2 allocs/op |
| BenchmarkMovieName-10 | 25314163 | 47.82 ns/op | 0 B/op | 0 allocs/op | | BenchmarkURL-10 | 1328094 | 904.6 ns/op | 265 B/op | 10 allocs/op |
| BenchmarkMovieGenre-10 | 24570799 | 48.81 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHTTPMethod-10 | 14741282 | 81.47 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNumber-10 | 74087221 | 16.21 ns/op | 0 B/op | 0 allocs/op | | BenchmarkIPv4Address-10 | 7809050 | 154.2 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkUint8-10 | 73790145 | 16.35 ns/op | 0 B/op | 0 allocs/op | | BenchmarkIPv6Address-10 | 3424746 | 351.1 ns/op | 111 B/op | 8 allocs/op |
| BenchmarkUint16-10 | 74334474 | 16.27 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMacAddress-10 | 4204674 | 283.4 ns/op | 24 B/op | 1 allocs/op |
| BenchmarkUint32-10 | 71804154 | 16.72 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHTTPStatusCode-10 | 15362457 | 78.36 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkUint64-10 | 71385904 | 16.64 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHTTPStatusCodeSimple-10 | 15321136 | 78.45 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkUintRange-10 | 73982353 | 16.13 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLogLevel-10 | 13574922 | 88.47 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkInt8-10 | 73927286 | 16.14 ns/op | 0 B/op | 0 allocs/op | | BenchmarkUserAgent-10 | 2095276 | 575.4 ns/op | 297 B/op | 5 allocs/op |
| BenchmarkInt16-10 | 74022668 | 16.19 ns/op | 0 B/op | 0 allocs/op | | BenchmarkChromeUserAgent-10 | 2614332 | 456.8 ns/op | 184 B/op | 5 allocs/op |
| BenchmarkInt32-10 | 72009002 | 16.64 ns/op | 0 B/op | 0 allocs/op | | BenchmarkFirefoxUserAgent-10 | 1735813 | 693.0 ns/op | 362 B/op | 6 allocs/op |
| BenchmarkInt64-10 | 72375081 | 16.59 ns/op | 0 B/op | 0 allocs/op | | BenchmarkSafariUserAgent-10 | 1836490 | 673.5 ns/op | 551 B/op | 7 allocs/op |
| BenchmarkIntRange-10 | 74396306 | 16.20 ns/op | 0 B/op | 0 allocs/op | | BenchmarkOperaUserAgent-10 | 2413814 | 526.1 ns/op | 212 B/op | 5 allocs/op |
| BenchmarkFloat32-10 | 73950822 | 16.20 ns/op | 0 B/op | 0 allocs/op | | BenchmarkJSONLookup100-10 | 1254 | 931207 ns/op | 918187 B/op | 12418 allocs/op |
| BenchmarkFloat32Range-10 | 73622833 | 16.18 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLanguage-10 | 14730628 | 81.42 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkFloat64-10 | 73076970 | 16.31 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLanguageAbbreviation-10 | 14698053 | 81.49 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkFloat64Range-10 | 73385329 | 16.33 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLanguageBCP-10 | 14691934 | 82.75 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkShuffleInts-10 | 9151563 | 131.8 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProgrammingLanguage-10 | 14665668 | 81.63 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkRandomInt-10 | 72188592 | 16.63 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMinecraftOre-10 | 14312521 | 83.79 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkRandomUint-10 | 72293332 | 16.64 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMinecraftWood-10 | 14329014 | 83.67 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkHexUint-10 | 14888452 | 80.93 ns/op | 16 B/op | 2 allocs/op | | BenchmarkMinecraftArmorTier-10 | 14261343 | 84.36 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCurrency-10 | 14366668 | 83.15 ns/op | 32 B/op | 1 allocs/op | | BenchmarkMinecraftArmorPart-10 | 14111434 | 84.73 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCurrencyShort-10 | 24445954 | 48.68 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMinecraftWeapon-10 | 14238732 | 83.65 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCurrencyLong-10 | 23560556 | 50.65 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMinecraftTool-10 | 14331830 | 83.64 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPrice-10 | 73693664 | 16.33 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMinecraftDye-10 | 14355182 | 84.94 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCreditCard-10 | 1000000 | 1153 ns/op | 264 B/op | 15 allocs/op | | BenchmarkMinecraftFood-10 | 14337074 | 83.67 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCreditCardType-10 | 32410167 | 36.93 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMinecraftAnimal-10 | 14324002 | 83.56 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCreditCardNumber-10 | 1511084 | 799.1 ns/op | 183 B/op | 10 allocs/op | | BenchmarkMinecraftVillagerJob-10 | 14366955 | 83.59 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCreditCardExp-10 | 11014600 | 108.5 ns/op | 5 B/op | 1 allocs/op | | BenchmarkMinecraftVillagerStation-10 | 14775799 | 81.52 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkCreditCardCvv-10 | 20325733 | 59.31 ns/op | 3 B/op | 1 allocs/op | | BenchmarkMinecraftVillagerLevel-10 | 14433811 | 83.97 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAchRouting-10 | 7338657 | 164.0 ns/op | 16 B/op | 1 allocs/op | | BenchmarkMinecraftMobPassive-10 | 14265412 | 83.62 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAchAccount-10 | 5646235 | 212.0 ns/op | 16 B/op | 1 allocs/op | | BenchmarkMinecraftMobNeutral-10 | 14339287 | 83.59 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBitcoinAddress-10 | 517399 | 2306 ns/op | 715 B/op | 37 allocs/op | | BenchmarkMinecraftMobHostile-10 | 14349654 | 83.63 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkBitcoinPrivateKey-10 | 1276884 | 943.2 ns/op | 184 B/op | 5 allocs/op | | BenchmarkMinecraftMobBoss-10 | 14802699 | 81.51 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkName-10 | 7771977 | 152.6 ns/op | 16 B/op | 1 allocs/op | | BenchmarkMinecraftBiome-10 | 14390689 | 84.08 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkFirstName-10 | 23523357 | 50.98 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMinecraftWeather-10 | 14607906 | 82.08 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkMiddleName-10 | 17589612 | 68.17 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBool-10 | 98531938 | 11.99 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLastName-10 | 20825980 | 57.63 ns/op | 0 B/op | 0 allocs/op | | BenchmarkShuffleAnySlice-10 | 3848493 | 313.9 ns/op | 24 B/op | 1 allocs/op |
| BenchmarkNamePrefix-10 | 25542308 | 46.65 ns/op | 0 B/op | 0 allocs/op | | BenchmarkFlipACoin-10 | 100000000 | 11.89 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNameSuffix-10 | 21972974 | 54.56 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMovie-10 | 5639511 | 190.9 ns/op | 32 B/op | 1 allocs/op |
| BenchmarkSSN-10 | 31829850 | 37.71 ns/op | 16 B/op | 1 allocs/op | | BenchmarkMovieName-10 | 14299531 | 84.06 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkGender-10 | 73621140 | 16.25 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMovieGenre-10 | 14346801 | 83.66 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkHobby-10 | 17347129 | 69.06 ns/op | 0 B/op | 0 allocs/op | | BenchmarkNumber-10 | 100000000 | 11.46 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPerson-10 | 317911 | 3693 ns/op | 837 B/op | 33 allocs/op | | BenchmarkUint8-10 | 99954187 | 11.95 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkContact-10 | 1843221 | 650.8 ns/op | 136 B/op | 6 allocs/op | | BenchmarkUint16-10 | 100000000 | 11.98 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPhone-10 | 6786794 | 176.2 ns/op | 16 B/op | 1 allocs/op | | BenchmarkUint32-10 | 100000000 | 11.51 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPhoneFormatted-10 | 4674930 | 256.2 ns/op | 16 B/op | 1 allocs/op | | BenchmarkUint64-10 | 100000000 | 11.52 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkEmail-10 | 2794358 | 431.1 ns/op | 88 B/op | 4 allocs/op | | BenchmarkUintRange-10 | 100000000 | 11.40 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkTeams-10 | 1576238 | 763.8 ns/op | 672 B/op | 10 allocs/op | | BenchmarkInt8-10 | 97158124 | 12.11 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkProduct-10 | 206918 | 5813 ns/op | 1069 B/op | 31 allocs/op | | BenchmarkInt16-10 | 98414097 | 12.44 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkProductName-10 | 2313364 | 517.4 ns/op | 103 B/op | 5 allocs/op | | BenchmarkInt32-10 | 100000000 | 11.53 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkProductDescription-10 | 348346 | 3434 ns/op | 549 B/op | 8 allocs/op | | BenchmarkInt64-10 | 100000000 | 11.53 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkProductCategory-10 | 25139860 | 47.73 ns/op | 0 B/op | 0 allocs/op | | BenchmarkIntRange-10 | 100000000 | 11.41 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkProductFeature-10 | 21264922 | 56.46 ns/op | 0 B/op | 0 allocs/op | | BenchmarkFloat32-10 | 100000000 | 11.43 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkProductMaterial-10 | 18142828 | 66.24 ns/op | 0 B/op | 0 allocs/op | | BenchmarkFloat32Range-10 | 100000000 | 11.56 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkProductUPC-10 | 1399148 | 859.1 ns/op | 96 B/op | 11 allocs/op | | BenchmarkFloat64-10 | 100000000 | 11.57 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkSchool-10 | 4161710 | 287.6 ns/op | 34 B/op | 1 allocs/op | | BenchmarkFloat64Range-10 | 100000000 | 11.65 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLetter-10 | 73457020 | 16.29 ns/op | 0 B/op | 0 allocs/op | | BenchmarkShuffleInts-10 | 12829964 | 93.72 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLetterN-10 | 5060271 | 238.8 ns/op | 64 B/op | 2 allocs/op | | BenchmarkRandomInt-10 | 100000000 | 11.42 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVowel-10 | 58685206 | 20.87 ns/op | 4 B/op | 1 allocs/op | | BenchmarkRandomUint-10 | 100000000 | 11.39 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDigit-10 | 73944177 | 16.20 ns/op | 0 B/op | 0 allocs/op | | BenchmarkHexUint-10 | 23160154 | 51.70 ns/op | 8 B/op | 1 allocs/op |
| BenchmarkDigitN-10 | 5051070 | 236.6 ns/op | 64 B/op | 2 allocs/op | | BenchmarkCurrency-10 | 13259960 | 87.44 ns/op | 32 B/op | 1 allocs/op |
| BenchmarkNumerify-10 | 6794545 | 176.4 ns/op | 16 B/op | 1 allocs/op | | BenchmarkCurrencyShort-10 | 14788378 | 81.25 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLexify-10 | 11113212 | 108.3 ns/op | 8 B/op | 1 allocs/op | | BenchmarkCurrencyLong-10 | 14777679 | 81.77 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkShuffleStrings-10 | 9924429 | 121.0 ns/op | 0 B/op | 0 allocs/op | | BenchmarkPrice-10 | 100000000 | 11.55 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkRandomString-10 | 73420688 | 16.34 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCreditCard-10 | 1269178 | 929.1 ns/op | 274 B/op | 15 allocs/op |
| BenchmarkTemplate-10 | 2488 | 477349 ns/op | 280877 B/op | 4611 allocs/op | | BenchmarkCreditCardType-10 | 43169155 | 27.39 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkDate-10 | 10292476 | 116.2 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCreditCardNumber-10 | 1920832 | 623.8 ns/op | 185 B/op | 10 allocs/op |
| BenchmarkPastDate-10 | 18285830 | 65.48 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCreditCardExp-10 | 11255587 | 106.8 ns/op | 5 B/op | 1 allocs/op |
| BenchmarkFutureDate-10 | 18399240 | 65.13 ns/op | 0 B/op | 0 allocs/op | | BenchmarkCreditCardCvv-10 | 28679431 | 41.74 ns/op | 3 B/op | 1 allocs/op |
| BenchmarkDateRange-10 | 8406979 | 142.7 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAchRouting-10 | 10390467 | 115.0 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkMonth-10 | 74105902 | 16.26 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAchAccount-10 | 8082610 | 148.6 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkMonthString-10 | 73647870 | 16.26 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBitcoinAddress-10 | 919413 | 1315 ns/op | 145 B/op | 3 allocs/op |
| BenchmarkWeekDay-10 | 73990911 | 16.24 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBitcoinPrivateKey-10 | 1843315 | 650.5 ns/op | 184 B/op | 5 allocs/op |
| BenchmarkDay-10 | 73435291 | 16.21 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBankName-10 | 14444061 | 83.06 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkYear-10 | 73950066 | 16.21 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBankType-10 | 14377713 | 83.89 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkHour-10 | 74219916 | 16.21 ns/op | 0 B/op | 0 allocs/op | | BenchmarkName-10 | 5686338 | 210.6 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkMinute-10 | 74349634 | 16.21 ns/op | 0 B/op | 0 allocs/op | | BenchmarkFirstName-10 | 14735256 | 81.63 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkSecond-10 | 73787313 | 16.29 ns/op | 0 B/op | 0 allocs/op | | BenchmarkMiddleName-10 | 14506162 | 82.00 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNanoSecond-10 | 74299380 | 16.15 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLastName-10 | 14682049 | 81.70 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkTimeZone-10 | 19105237 | 62.83 ns/op | 0 B/op | 0 allocs/op | | BenchmarkNamePrefix-10 | 14524393 | 82.38 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkTimeZoneFull-10 | 16170054 | 74.27 ns/op | 0 B/op | 0 allocs/op | | BenchmarkNameSuffix-10 | 14671279 | 81.88 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkTimeZoneAbv-10 | 20725029 | 58.23 ns/op | 0 B/op | 0 allocs/op | | BenchmarkSSN-10 | 42014109 | 28.54 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkTimeZoneOffset-10 | 14597666 | 81.13 ns/op | 0 B/op | 0 allocs/op | | BenchmarkEIN-10 | 3682759 | 294.6 ns/op | 80 B/op | 14 allocs/op |
| BenchmarkTimeZoneRegion-10 | 15733551 | 76.25 ns/op | 0 B/op | 0 allocs/op | | BenchmarkGender-10 | 100000000 | 11.99 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkWeighted-10 | 28507484 | 40.42 ns/op | 16 B/op | 1 allocs/op | | BenchmarkHobby-10 | 14439556 | 82.81 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAdjective-10 | 6726474 | 178.3 ns/op | 0 B/op | 0 allocs/op | | BenchmarkSocialMedia-10 | 1478293 | 815.7 ns/op | 430 B/op | 11 allocs/op |
| BenchmarkAdjectiveDescriptive-10 | 16486224 | 73.39 ns/op | 0 B/op | 0 allocs/op | | BenchmarkBio-10 | 938670 | 1282 ns/op | 1190 B/op | 15 allocs/op |
| BenchmarkAdjectiveQuantitative-10 | 15290762 | 78.51 ns/op | 0 B/op | 0 allocs/op | | BenchmarkPerson-10 | 349646 | 3466 ns/op | 818 B/op | 31 allocs/op |
| BenchmarkAdjectiveProper-10 | 16535046 | 72.42 ns/op | 0 B/op | 0 allocs/op | | BenchmarkContact-10 | 1817460 | 678.4 ns/op | 136 B/op | 6 allocs/op |
| BenchmarkAdjectiveDemonstrative-10 | 16448917 | 73.41 ns/op | 0 B/op | 0 allocs/op | | BenchmarkPhone-10 | 9426168 | 127.4 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkAdjectivePossessive-10 | 15715839 | 73.22 ns/op | 0 B/op | 0 allocs/op | | BenchmarkPhoneFormatted-10 | 5080152 | 236.4 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkAdjectiveInterrogative-10 | 15543478 | 77.43 ns/op | 0 B/op | 0 allocs/op | | BenchmarkEmail-10 | 2392788 | 500.2 ns/op | 88 B/op | 4 allocs/op |
| BenchmarkAdjectiveIndefinite-10 | 16306894 | 73.50 ns/op | 0 B/op | 0 allocs/op | | BenchmarkTeams-10 | 2302561 | 517.0 ns/op | 672 B/op | 10 allocs/op |
| BenchmarkAdverb-10 | 7139924 | 168.7 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProduct-10 | 218653 | 5445 ns/op | 3088 B/op | 46 allocs/op |
| BenchmarkAdverbManner-10 | 17139112 | 70.37 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductName-10 | 2300114 | 522.6 ns/op | 103 B/op | 5 allocs/op |
| BenchmarkAdverbDegree-10 | 16213138 | 73.70 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductDescription-10 | 461224 | 2594 ns/op | 2465 B/op | 23 allocs/op |
| BenchmarkAdverbPlace-10 | 17268267 | 69.67 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductCategory-10 | 14565750 | 82.60 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAdverbTimeDefinite-10 | 16273309 | 73.70 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductFeature-10 | 14421858 | 82.71 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAdverbTimeIndefinite-10 | 15822297 | 74.26 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductMaterial-10 | 14525638 | 82.69 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkAdverbFrequencyDefinite-10 | 16344181 | 73.30 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductUPC-10 | 1704061 | 721.7 ns/op | 96 B/op | 11 allocs/op |
| BenchmarkAdverbFrequencyIndefinite-10 | 16118569 | 74.27 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductAudience-10 | 6250908 | 190.6 ns/op | 32 B/op | 1 allocs/op |
| BenchmarkComment-10 | 1000000 | 1146 ns/op | 258 B/op | 6 allocs/op | | BenchmarkProductDimension-10 | 14143437 | 84.98 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnective-10 | 7132710 | 168.3 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductUseCase-10 | 14313904 | 82.51 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnectiveTime-10 | 15339457 | 78.08 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductBenefit-10 | 14576446 | 82.46 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnectiveComparative-10 | 16188842 | 74.04 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductSuffix-10 | 14219770 | 84.26 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnectiveComplaint-10 | 14127903 | 85.00 ns/op | 0 B/op | 0 allocs/op | | BenchmarkProductISBN-10 | 5517997 | 200.1 ns/op | 32 B/op | 3 allocs/op |
| BenchmarkConnectiveListing-10 | 16073437 | 74.65 ns/op | 0 B/op | 0 allocs/op | | BenchmarkSchool-10 | 4244638 | 283.1 ns/op | 34 B/op | 1 allocs/op |
| BenchmarkConnectiveCasual-10 | 13771904 | 87.06 ns/op | 0 B/op | 0 allocs/op | | BenchmarkSong-10 | 4338772 | 277.3 ns/op | 48 B/op | 1 allocs/op |
| BenchmarkConnectiveExamplify-10 | 15763296 | 76.03 ns/op | 0 B/op | 0 allocs/op | | BenchmarkSongName-10 | 14409870 | 83.61 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkWord-10 | 8047610 | 148.5 ns/op | 3 B/op | 0 allocs/op | | BenchmarkSongArtist-10 | 14364440 | 83.60 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkSentenceSimple-10 | 682924 | 1707 ns/op | 590 B/op | 11 allocs/op | | BenchmarkSongGenre-10 | 14394457 | 85.02 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkInterjection-10 | 16295702 | 73.50 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLetter-10 | 100000000 | 11.51 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNoun-10 | 6711976 | 179.3 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLetterN-10 | 7059724 | 168.8 ns/op | 64 B/op | 2 allocs/op |
| BenchmarkNounCommon-10 | 17117466 | 69.83 ns/op | 0 B/op | 0 allocs/op | | BenchmarkVowel-10 | 81354326 | 14.79 ns/op | 4 B/op | 1 allocs/op |
| BenchmarkNounConcrete-10 | 17144979 | 69.81 ns/op | 0 B/op | 0 allocs/op | | BenchmarkDigit-10 | 100000000 | 11.42 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounAbstract-10 | 16839790 | 71.16 ns/op | 0 B/op | 0 allocs/op | | BenchmarkDigitN-10 | 7008775 | 168.7 ns/op | 64 B/op | 2 allocs/op |
| BenchmarkNounCollectivePeople-10 | 16360652 | 73.24 ns/op | 0 B/op | 0 allocs/op | | BenchmarkNumerify-10 | 9234306 | 129.6 ns/op | 16 B/op | 1 allocs/op |
| BenchmarkNounCollectiveAnimal-10 | 16453287 | 72.79 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLexify-10 | 15390994 | 78.03 ns/op | 8 B/op | 1 allocs/op |
| BenchmarkNounCollectiveThing-10 | 16397232 | 72.97 ns/op | 0 B/op | 0 allocs/op | | BenchmarkShuffleStrings-10 | 14075007 | 85.33 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounCountable-10 | 17171895 | 69.78 ns/op | 0 B/op | 0 allocs/op | | BenchmarkRandomString-10 | 100000000 | 11.51 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounUncountable-10 | 17193412 | 69.75 ns/op | 0 B/op | 0 allocs/op | | BenchmarkTemplate-10 | 3873 | 311023 ns/op | 248973 B/op | 3083 allocs/op |
| BenchmarkNounProper-10 | 10644372 | 112.0 ns/op | 7 B/op | 0 allocs/op | | BenchmarkComment-10 | 1331073 | 903.1 ns/op | 583 B/op | 9 allocs/op |
| BenchmarkNounDeterminer-10 | 17003730 | 70.44 ns/op | 0 B/op | 0 allocs/op | | BenchmarkPhrase-10 | 14345750 | 84.65 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPhrase-10 | 23481584 | 51.12 ns/op | 0 B/op | 0 allocs/op | | BenchmarkPhraseNoun-10 | 3605448 | 333.1 ns/op | 88 B/op | 1 allocs/op |
| BenchmarkPhraseNoun-10 | 2961691 | 405.1 ns/op | 104 B/op | 2 allocs/op | | BenchmarkPhraseVerb-10 | 1643992 | 733.3 ns/op | 196 B/op | 4 allocs/op |
| BenchmarkPhraseVerb-10 | 1422132 | 845.1 ns/op | 232 B/op | 6 allocs/op | | BenchmarkPhraseAdverb-10 | 7439331 | 161.1 ns/op | 9 B/op | 0 allocs/op |
| BenchmarkPhraseAdverb-10 | 7617193 | 153.3 ns/op | 9 B/op | 0 allocs/op | | BenchmarkPhrasePreposition-10 | 2622950 | 455.8 ns/op | 107 B/op | 2 allocs/op |
| BenchmarkPhrasePreposition-10 | 2336155 | 513.3 ns/op | 123 B/op | 3 allocs/op | | BenchmarkSentence-10 | 1243213 | 969.4 ns/op | 895 B/op | 12 allocs/op |
| BenchmarkPreposition-10 | 9244665 | 129.9 ns/op | 0 B/op | 0 allocs/op | | BenchmarkParagraph-10 | 336364 | 3553 ns/op | 3322 B/op | 46 allocs/op |
| BenchmarkPrepositionSimple-10 | 16397623 | 73.11 ns/op | 0 B/op | 0 allocs/op | | BenchmarkQuestion-10 | 1708732 | 702.1 ns/op | 549 B/op | 10 allocs/op |
| BenchmarkPrepositionDouble-10 | 16107751 | 74.19 ns/op | 0 B/op | 0 allocs/op | | BenchmarkQuote-10 | 1638612 | 731.6 ns/op | 569 B/op | 10 allocs/op |
| BenchmarkPrepositionCompound-10 | 16364900 | 73.10 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLoremIpsumSentence-10 | 1000000 | 1064 ns/op | 219 B/op | 2 allocs/op |
| BenchmarkPronoun-10 | 6436707 | 186.4 ns/op | 0 B/op | 0 allocs/op | | BenchmarkLoremIpsumParagraph-10 | 59647 | 20014 ns/op | 8480 B/op | 40 allocs/op |
| BenchmarkPronounPersonal-10 | 16997427 | 70.53 ns/op | 0 B/op | 0 allocs/op | | BenchmarkWeighted-10 | 53570133 | 22.38 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounObject-10 | 15303380 | 78.27 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdjective-10 | 7898755 | 151.5 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounPossessive-10 | 15323908 | 78.10 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdjectiveDescriptive-10 | 14585032 | 82.31 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounReflective-10 | 15258552 | 78.45 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdjectiveQuantitative-10 | 14615534 | 82.15 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounIndefinite-10 | 16053780 | 74.69 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdjectiveProper-10 | 14826856 | 81.02 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounDemonstrative-10 | 16476726 | 72.73 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdjectiveDemonstrative-10 | 14628786 | 82.13 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounInterrogative-10 | 15526576 | 77.15 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdjectivePossessive-10 | 14488378 | 82.17 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounRelative-10 | 14159284 | 84.64 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdjectiveInterrogative-10 | 14578668 | 82.15 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkSentence-10 | 721934 | 1642 ns/op | 219 B/op | 3 allocs/op | | BenchmarkAdjectiveIndefinite-10 | 14588925 | 82.19 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkParagraph-10 | 39356 | 30481 ns/op | 6687 B/op | 53 allocs/op | | BenchmarkAdverb-10 | 7883319 | 152.4 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkQuestion-10 | 1757269 | 683.1 ns/op | 243 B/op | 3 allocs/op | | BenchmarkAdverbManner-10 | 14757386 | 83.12 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkQuote-10 | 1522988 | 787.2 ns/op | 261 B/op | 3 allocs/op | | BenchmarkAdverbDegree-10 | 12683223 | 81.75 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerb-10 | 8924802 | 127.6 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdverbPlace-10 | 14620564 | 81.22 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbAction-10 | 17150564 | 69.83 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdverbTimeDefinite-10 | 14570636 | 82.21 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbTransitive-10 | 17328488 | 69.21 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdverbTimeIndefinite-10 | 14585497 | 82.29 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbIntransitive-10 | 16427985 | 72.98 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdverbFrequencyDefinite-10 | 14568910 | 83.32 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbLinking-10 | 17754280 | 67.52 ns/op | 0 B/op | 0 allocs/op | | BenchmarkAdverbFrequencyIndefinite-10 | 14624752 | 82.14 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbHelping-10 | 17118238 | 70.31 ns/op | 0 B/op | 0 allocs/op | | BenchmarkConnective-10 | 8215815 | 146.0 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkXMLLookup100-10 | 937 | 1279022 ns/op | 862536 B/op | 11370 allocs/op | | BenchmarkConnectiveTime-10 | 14964218 | 80.41 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnectiveComparative-10 | 14394342 | 83.41 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnectiveComplaint-10 | 14189211 | 81.65 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnectiveListing-10 | 14673902 | 81.97 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnectiveCasual-10 | 14582056 | 82.15 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkConnectiveExamplify-10 | 14361904 | 83.44 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkWord-10 | 9736791 | 123.2 ns/op | 3 B/op | 0 allocs/op |
| BenchmarkInterjection-10 | 14839546 | 82.93 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkLoremIpsumWord-10 | 14265787 | 84.27 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNoun-10 | 7625799 | 157.4 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounCommon-10 | 14696373 | 81.43 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounConcrete-10 | 14775216 | 81.41 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounAbstract-10 | 14736424 | 81.55 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounCollectivePeople-10 | 14574639 | 82.05 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounCollectiveAnimal-10 | 14297954 | 82.31 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounCollectiveThing-10 | 14612716 | 82.48 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounCountable-10 | 14706775 | 81.53 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounUncountable-10 | 14912088 | 80.10 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkNounProper-10 | 10122214 | 118.6 ns/op | 7 B/op | 0 allocs/op |
| BenchmarkNounDeterminer-10 | 15038943 | 80.18 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPreposition-10 | 9446143 | 127.1 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPrepositionSimple-10 | 14623304 | 82.20 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPrepositionDouble-10 | 14616758 | 82.33 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPrepositionCompound-10 | 14646828 | 82.19 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronoun-10 | 7619226 | 157.1 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounPersonal-10 | 15007472 | 80.06 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounObject-10 | 14734660 | 81.50 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounPossessive-10 | 14589732 | 82.16 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounReflective-10 | 14572369 | 82.18 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounIndefinite-10 | 14549400 | 81.99 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounDemonstrative-10 | 14405077 | 83.21 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounInterrogative-10 | 14522790 | 82.20 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkPronounRelative-10 | 15074666 | 80.10 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerb-10 | 9462745 | 127.1 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbAction-10 | 14725183 | 81.37 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbTransitive-10 | 15013738 | 80.16 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbIntransitive-10 | 14609581 | 82.23 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbLinking-10 | 14814585 | 81.20 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkVerbHelping-10 | 14679265 | 81.18 ns/op | 0 B/op | 0 allocs/op |
| BenchmarkXMLLookup100-10 | 1240 | 992659 ns/op | 978256 B/op | 11687 allocs/op |

View File

@ -4,9 +4,13 @@
Random data generator written in go Random data generator written in go
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/G2G0R5EJT) ## Support
<a href="https://www.buymeacoffee.com/brianvoe" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a> [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/G2G0R5EJT) <a href="https://www.buymeacoffee.com/brianvoe" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
## Merch
[![Merch](https://raw.githubusercontent.com/brianvoe/gofakeit/master/merch.png)](https://gofakeit-buy-shop.fourthwall.com)
## Features ## Features
@ -41,17 +45,17 @@ go get github.com/brianvoe/gofakeit/v7
```go ```go
import "github.com/brianvoe/gofakeit/v7" import "github.com/brianvoe/gofakeit/v7"
gofakeit.Name() // Markus Moen gofakeit.Name() // Markus Moen
gofakeit.Email() // alaynawuckert@kozey.biz gofakeit.Email() // alaynawuckert@kozey.biz
gofakeit.Phone() // (570)245-7485 gofakeit.Phone() // (570)245-7485
gofakeit.BS() // front-end gofakeit.BS() // front-end
gofakeit.BeerName() // Duvel gofakeit.BeerName() // Duvel
gofakeit.Color() // MediumOrchid gofakeit.Color() // MediumOrchid
gofakeit.Company() // Moen, Pagac and Wuckert gofakeit.Company() // Moen, Pagac and Wuckert
gofakeit.CreditCardNumber() // 4287271570245748 gofakeit.CreditCardNumber(nil) // 4287271570245748
gofakeit.HackerPhrase() // Connecting the array won't do anything, we need to generate the haptic COM driver! gofakeit.HackerPhrase() // Connecting the array won't do anything, we need to generate the haptic COM driver!
gofakeit.JobTitle() // Director gofakeit.JobTitle() // Director
gofakeit.CurrencyShort() // USD gofakeit.CurrencyShort() // USD
``` ```
[See full list of functions](#functions) [See full list of functions](#functions)
@ -91,7 +95,7 @@ import (
faker := gofakeit.New(0) faker := gofakeit.New(0)
// NewFaker takes in a source and whether or not it should be thread safe // NewFaker takes in a source and whether or not it should be thread safe
faker := gofakeit.NewFaker(source rand.Source, threadSafe bool) faker := gofakeit.NewFaker(src rand.Source, lock bool)
// PCG Pseudo // PCG Pseudo
faker := gofakeit.NewFaker(rand.NewPCG(11, 11), true) faker := gofakeit.NewFaker(rand.NewPCG(11, 11), true)
@ -142,7 +146,7 @@ type Foo struct {
Int int Int int
Pointer *int Pointer *int
Name string `fake:"{firstname}"` // Any available function all lowercase Name string `fake:"{firstname}"` // Any available function all lowercase
Sentence string `fake:"{sentence:3}"` // Can call with parameters Sentence string `fake:"{sentence}"`
RandStr string `fake:"{randomstring:[hello,world]}"` RandStr string `fake:"{randomstring:[hello,world]}"`
Number string `fake:"{number:1,10}"` // Comma separated for multiple values Number string `fake:"{number:1,10}"` // Comma separated for multiple values
Regex string `fake:"{regex:[abcdef]{5}}"` // Generate string from regex Regex string `fake:"{regex:[abcdef]{5}}"` // Generate string from regex
@ -171,7 +175,7 @@ fmt.Println(f.Int) // -7825289004089916589
fmt.Println(*f.Pointer) // -343806609094473732 fmt.Println(*f.Pointer) // -343806609094473732
fmt.Println(f.Name) // fred fmt.Println(f.Name) // fred
fmt.Println(f.Sentence) // Record river mind. fmt.Println(f.Sentence) // Record river mind.
fmt.Println(fStr) // world fmt.Println(f.RandStr) // world
fmt.Println(f.Number) // 4 fmt.Println(f.Number) // 4
fmt.Println(f.Regex) // cbdfc fmt.Println(f.Regex) // cbdfc
fmt.Println(f.Map) // map[PxLIo:52 lxwnqhqc:846] fmt.Println(f.Map) // map[PxLIo:52 lxwnqhqc:846]
@ -210,7 +214,7 @@ func (c *Friend) Fake(f *gofakeit.Faker) (any, error) {
type Age time.Time type Age time.Time
func (c *Age) Fake(f *gofakeit.Faker) (any, error) { func (c *Age) Fake(f *gofakeit.Faker) (any, error) {
return f.DateRange(time.Now().AddDate(-100, 0, 0), time.Now().AddDate(-18, 0, 0)), nil return Age(f.DateRange(time.Now().AddDate(-100, 0, 0), time.Now().AddDate(-18, 0, 0))), nil
} }
// This is the struct that we cannot modify to add struct tags // This is the struct that we cannot modify to add struct tags
@ -221,8 +225,8 @@ type User struct {
var u User var u User
gofakeit.Struct(&u) gofakeit.Struct(&u)
fmt.Printf("%s", f.Name) // billy fmt.Println(u.Name) // billy
fmt.Printf("%s", f.Age) // 1990-12-07 04:14:25.685339029 +0000 UTC fmt.Println(time.Time(*u.Age)) // 1990-12-07 04:14:25.685339029 +0000 UTC
``` ```
## Custom Functions ## Custom Functions
@ -240,7 +244,7 @@ gofakeit.AddFuncLookup("friendname", gofakeit.Info{
Description: "Random friend name", Description: "Random friend name",
Example: "bill", Example: "bill",
Output: "string", Output: "string",
Generate: func(f *Faker, m *gofakeit.MapParams, info *gofakeit.Info) (any, error) { Generate: func(f *gofakeit.Faker, m *gofakeit.MapParams, info *gofakeit.Info) (any, error) {
return f.RandomString([]string{"bill", "bob", "sally"}), nil return f.RandomString([]string{"bill", "bob", "sally"}), nil
}, },
}) })
@ -254,7 +258,7 @@ gofakeit.AddFuncLookup("jumbleword", gofakeit.Info{
Params: []gofakeit.Param{ Params: []gofakeit.Param{
{Field: "word", Type: "string", Description: "Word you want to jumble"}, {Field: "word", Type: "string", Description: "Word you want to jumble"},
}, },
Generate: func(f *Faker, m *gofakeit.MapParams, info *gofakeit.Info) (any, error) { Generate: func(f *gofakeit.Faker, m *gofakeit.MapParams, info *gofakeit.Info) (any, error) {
word, err := info.GetString(m, "word") word, err := info.GetString(m, "word")
if err != nil { if err != nil {
return nil, err return nil, err
@ -273,8 +277,8 @@ type Foo struct {
var f Foo var f Foo
gofakeit.Struct(&f) gofakeit.Struct(&f)
fmt.Printf("%s", f.FriendName) // bill fmt.Println(f.FriendName) // bill
fmt.Printf("%s", f.JumbleWord) // loredlowlh fmt.Println(f.JumbleWord) // loredlowlh
``` ```
## Templates ## Templates
@ -328,17 +332,17 @@ func main() {
{{RandomString (SliceString "Warm regards" "Best wishes" "Sincerely")}} {{RandomString (SliceString "Warm regards" "Best wishes" "Sincerely")}}
{{$person:=Person}} {{$person:=Person}}
{{$person.FirstName}} {{$person.LastName}} {{$person.FirstName}} {{$person.LastName}}
{{$person.Email}} {{$person.Contact.Email}}
{{$person.Phone}} {{$person.Contact.Phone}}
` `
value, err := gofakeit.Template(template, &TemplateOptions{Data: 5}) value, err := gofakeit.Template(template, &gofakeit.TemplateOptions{Data: 5})
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
} }
fmt.Println(string(value)) fmt.Println(value)
} }
``` ```
@ -353,6 +357,7 @@ Greetings!
Quia voluptatem voluptatem voluptatem. Quia voluptatem voluptatem voluptatem. Quia voluptatem voluptatem voluptatem. Quia voluptatem voluptatem voluptatem. Quia voluptatem voluptatem voluptatem. Quia voluptatem voluptatem voluptatem.
Warm regards Warm regards
Kaitlyn Krajcik Kaitlyn Krajcik
kaitlynkrajcik@krajcik kaitlynkrajcik@krajcik
570-245-7485 570-245-7485
@ -385,8 +390,14 @@ EmailText(co *EmailOptions) (string, error)
FixedWidth(co *FixedWidthOptions) (string, error) FixedWidth(co *FixedWidthOptions) (string, error)
``` ```
### Product ### ID
```go
ID() string
UUID() string
```
### Product
```go ```go
Product() *ProductInfo Product() *ProductInfo
@ -401,6 +412,7 @@ ProductDimension() string
ProductUseCase() string ProductUseCase() string
ProductBenefit() string ProductBenefit() string
ProductSuffix() string ProductSuffix() string
ProductISBN(opts *ISBNOptions) string
``` ```
@ -415,7 +427,10 @@ FirstName() string
MiddleName() string MiddleName() string
LastName() string LastName() string
Gender() string Gender() string
Age() int
Ethnicity() string
SSN() string SSN() string
EIN() string
Hobby() string Hobby() string
Contact() *ContactInfo Contact() *ContactInfo
Email() string Email() string
@ -455,6 +470,7 @@ StreetName() string
StreetNumber() string StreetNumber() string
StreetPrefix() string StreetPrefix() string
StreetSuffix() string StreetSuffix() string
Unit() string
Zip() string Zip() string
Latitude() float64 Latitude() float64
LatitudeInRange(min, max float64) (float64, error) LatitudeInRange(min, max float64) (float64, error)
@ -561,9 +577,9 @@ ConnectiveExamplify() string
// Words // Words
Word() string Word() string
// Sentences // Text
Sentence(wordCount int) string Sentence() string
Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string Paragraph() string
LoremIpsumWord() string LoremIpsumWord() string
LoremIpsumSentence(wordCount int) string LoremIpsumSentence(wordCount int) string
LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string
@ -588,7 +604,6 @@ Dessert() string
```go ```go
Bool() bool Bool() bool
UUID() string
Weighted(options []any, weights []float32) (any, error) Weighted(options []any, weights []float32) (any, error)
FlipACoin() string FlipACoin() string
RandomMapKey(mapI any) any RandomMapKey(mapI any) any
@ -617,6 +632,7 @@ ImagePng(width int, height int) []byte
```go ```go
URL() string URL() string
UrlSlug(words int) string
DomainName() string DomainName() string
DomainSuffix() string DomainSuffix() string
IPv4Address() string IPv4Address() string
@ -632,6 +648,7 @@ ChromeUserAgent() string
FirefoxUserAgent() string FirefoxUserAgent() string
OperaUserAgent() string OperaUserAgent() string
SafariUserAgent() string SafariUserAgent() string
APIUserAgent() string
``` ```
### HTML ### HTML
@ -680,6 +697,8 @@ AchRouting() string
AchAccount() string AchAccount() string
BitcoinAddress() string BitcoinAddress() string
BitcoinPrivateKey() string BitcoinPrivateKey() string
BankName() string
BankType() string
``` ```
### Finance ### Finance
@ -719,8 +738,8 @@ HackerVerb() string
```go ```go
HipsterWord() string HipsterWord() string
HipsterSentence(wordCount int) string HipsterSentence() string
HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string HipsterParagraph() string
``` ```
### App ### App
@ -747,10 +766,29 @@ Bird() string
```go ```go
Emoji() string Emoji() string
EmojiDescription() string
EmojiCategory() string EmojiCategory() string
EmojiAlias() string EmojiAlias() string
EmojiTag() string EmojiTag() string
EmojiFlag() string
EmojiAnimal() string
EmojiFood() string
EmojiPlant() string
EmojiMusic() string
EmojiVehicle() string
EmojiSport() string
EmojiFace() string
EmojiHand() string
EmojiClothing() string
EmojiLandmark() string
EmojiElectronics() string
EmojiGame() string
EmojiTools() string
EmojiWeather() string
EmojiJob() string
EmojiPerson() string
EmojiGesture() string
EmojiCostume() string
EmojiSentence() string
``` ```
### Language ### Language
@ -759,7 +797,6 @@ EmojiTag() string
Language() string Language() string
LanguageAbbreviation() string LanguageAbbreviation() string
ProgrammingLanguage() string ProgrammingLanguage() string
ProgrammingLanguageBest() string
``` ```
### Number ### Number
@ -857,7 +894,6 @@ ErrorGRPC() error
ErrorHTTP() error ErrorHTTP() error
ErrorHTTPClient() error ErrorHTTPClient() error
ErrorHTTPServer() error ErrorHTTPServer() error
ErrorInput() error
ErrorRuntime() error ErrorRuntime() error
``` ```
@ -866,3 +902,12 @@ ErrorRuntime() error
```go ```go
School() string School() string
``` ```
### Song
```go
Song() *SongInfo
SongName() string
SongArtist() string
SongGenre() string
```

View File

@ -9,6 +9,7 @@ import (
type AddressInfo struct { type AddressInfo struct {
Address string `json:"address" xml:"address"` Address string `json:"address" xml:"address"`
Street string `json:"street" xml:"street"` Street string `json:"street" xml:"street"`
Unit string `json:"unit" xml:"unit"`
City string `json:"city" xml:"city"` City string `json:"city" xml:"city"`
State string `json:"state" xml:"state"` State string `json:"state" xml:"state"`
Zip string `json:"zip" xml:"zip"` Zip string `json:"zip" xml:"zip"`
@ -29,9 +30,20 @@ func address(f *Faker) *AddressInfo {
state := state(f) state := state(f)
zip := zip(f) zip := zip(f)
// 30% chance to include a unit in the address
var unitStr string
var unitField string
if randIntRange(f, 1, 10) <= 3 {
unitStr = ", " + unit(f)
unitField = unit(f)
}
addressStr := street + unitStr + ", " + city + ", " + state + " " + zip
return &AddressInfo{ return &AddressInfo{
Address: street + ", " + city + ", " + state + " " + zip, Address: addressStr,
Street: street, Street: street,
Unit: unitField,
City: city, City: city,
State: state, State: state,
Zip: zip, Zip: zip,
@ -93,6 +105,18 @@ func (f *Faker) StreetSuffix() string { return streetSuffix(f) }
func streetSuffix(f *Faker) string { return getRandValue(f, []string{"address", "street_suffix"}) } func streetSuffix(f *Faker) string { return getRandValue(f, []string{"address", "street_suffix"}) }
// Unit will generate a random unit string
func Unit() string { return unit(GlobalFaker) }
// Unit will generate a random unit string
func (f *Faker) Unit() string { return unit(f) }
func unit(f *Faker) string {
unitType := getRandValue(f, []string{"address", "unit"})
unitNumber := replaceWithNumbers(f, "###")
return unitType + " " + unitNumber
}
// City will generate a random city string // City will generate a random city string
func City() string { return city(GlobalFaker) } func City() string { return city(GlobalFaker) }
@ -199,8 +223,9 @@ func addAddressLookup() {
Category: "address", Category: "address",
Description: "Residential location including street, city, state, country and postal code", Description: "Residential location including street, city, state, country and postal code",
Example: `{ Example: `{
"address": "364 Unionsville, Norfolk, Ohio 99536", "address": "364 Unionsville, Apt 123, Norfolk, Ohio 99536",
"street": "364 Unionsville", "street": "364 Unionsville",
"apartment": "Apt 123",
"city": "Norfolk", "city": "Norfolk",
"state": "Ohio", "state": "Ohio",
"zip": "99536", "zip": "99536",
@ -210,6 +235,8 @@ func addAddressLookup() {
}`, }`,
Output: "map[string]any", Output: "map[string]any",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{"full address", "residential address", "mailing address", "street address", "home address"},
Keywords: []string{"residential", "location", "street", "city", "state", "country", "postal", "code", "mailing", "home", "house", "apartment", "zipcode", "coordinates"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return address(f), nil return address(f), nil
}, },
@ -221,6 +248,8 @@ func addAddressLookup() {
Description: "Part of a country with significant population, often a central hub for culture and commerce", Description: "Part of a country with significant population, often a central hub for culture and commerce",
Example: "Marcelside", Example: "Marcelside",
Output: "string", Output: "string",
Aliases: []string{"city name", "urban area", "municipality name", "town name", "metropolitan area"},
Keywords: []string{"town", "municipality", "urban", "area", "population", "hub", "culture", "commerce", "metropolitan", "settlement", "community", "district"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return city(f), nil return city(f), nil
}, },
@ -232,6 +261,8 @@ func addAddressLookup() {
Description: "Nation with its own government and defined territory", Description: "Nation with its own government and defined territory",
Example: "United States of America", Example: "United States of America",
Output: "string", Output: "string",
Aliases: []string{"country name", "nation name", "sovereign state", "national territory", "independent country"},
Keywords: []string{"nation", "government", "territory", "sovereign", "independent", "state", "republic", "kingdom", "empire", "federation", "commonwealth"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return country(f), nil return country(f), nil
}, },
@ -243,6 +274,8 @@ func addAddressLookup() {
Description: "Shortened 2-letter form of a country's name", Description: "Shortened 2-letter form of a country's name",
Example: "US", Example: "US",
Output: "string", Output: "string",
Aliases: []string{"country code", "iso alpha-2", "iso3166-1 alpha-2", "two-letter country", "country short code"},
Keywords: []string{"country", "abbreviation", "shortened", "2-letter", "nation", "iso", "code", "alpha-2", "iso3166-1", "standard", "international", "identifier"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return countryAbr(f), nil return countryAbr(f), nil
}, },
@ -254,6 +287,8 @@ func addAddressLookup() {
Description: "Governmental division within a country, often having its own laws and government", Description: "Governmental division within a country, often having its own laws and government",
Example: "Illinois", Example: "Illinois",
Output: "string", Output: "string",
Aliases: []string{"state name", "province name", "region name", "administrative division", "territory name"},
Keywords: []string{"province", "region", "division", "governmental", "territory", "area", "laws", "government", "administrative", "subdivision", "district", "county"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return state(f), nil return state(f), nil
}, },
@ -262,9 +297,11 @@ func addAddressLookup() {
AddFuncLookup("stateabr", Info{ AddFuncLookup("stateabr", Info{
Display: "State Abbreviation", Display: "State Abbreviation",
Category: "address", Category: "address",
Description: "Shortened 2-letter form of a country's state", Description: "Shortened 2-letter form of a state or province",
Example: "IL", Example: "IL",
Output: "string", Output: "string",
Aliases: []string{"state code", "province code", "region code", "usps code", "iso3166-2 code"},
Keywords: []string{"state", "abbreviation", "shortened", "2-letter", "region", "province", "country", "code", "usps", "iso3166-2", "identifier"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return stateAbr(f), nil return stateAbr(f), nil
}, },
@ -276,6 +313,8 @@ func addAddressLookup() {
Description: "Public road in a city or town, typically with houses and buildings on each side", Description: "Public road in a city or town, typically with houses and buildings on each side",
Example: "364 East Rapidsborough", Example: "364 East Rapidsborough",
Output: "string", Output: "string",
Aliases: []string{"street address", "shipping address", "billing address", "mailing address", "address line 1", "line 1", "road address", "avenue address", "drive address", "thoroughfare address"},
Keywords: []string{"address", "road", "avenue", "drive", "lane", "way", "public", "thoroughfare", "boulevard", "court", "place", "circle", "terrace", "highway"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return street(f), nil return street(f), nil
}, },
@ -287,6 +326,8 @@ func addAddressLookup() {
Description: "Name given to a specific road or street", Description: "Name given to a specific road or street",
Example: "View", Example: "View",
Output: "string", Output: "string",
Aliases: []string{"street title", "road name", "avenue name", "drive name", "thoroughfare name"},
Keywords: []string{"street", "name", "road", "avenue", "drive", "lane", "way", "thoroughfare", "specific", "title", "designation", "label", "identifier"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return streetName(f), nil return streetName(f), nil
}, },
@ -298,6 +339,8 @@ func addAddressLookup() {
Description: "Numerical identifier assigned to a street", Description: "Numerical identifier assigned to a street",
Example: "13645", Example: "13645",
Output: "string", Output: "string",
Aliases: []string{"house number", "building number", "address number", "street identifier", "numerical address"},
Keywords: []string{"street", "number", "identifier", "numerical", "address", "location", "building", "assigned", "house", "digit", "numeric", "sequence", "position"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return streetNumber(f), nil return streetNumber(f), nil
}, },
@ -306,9 +349,11 @@ func addAddressLookup() {
AddFuncLookup("streetprefix", Info{ AddFuncLookup("streetprefix", Info{
Display: "Street Prefix", Display: "Street Prefix",
Category: "address", Category: "address",
Description: "Directional or descriptive term preceding a street name, like 'East' or 'Main'", Description: "Directional or descriptive term preceding a street name (e.g., 'East', 'N')",
Example: "Lake", Example: "East",
Output: "string", Output: "string",
Aliases: []string{"directional prefix", "street prefix", "name prefix", "road prefix", "thoroughfare prefix"},
Keywords: []string{"street", "prefix", "directional", "north", "south", "east", "west", "n", "s", "e", "w"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return streetPrefix(f), nil return streetPrefix(f), nil
}, },
@ -317,20 +362,37 @@ func addAddressLookup() {
AddFuncLookup("streetsuffix", Info{ AddFuncLookup("streetsuffix", Info{
Display: "Street Suffix", Display: "Street Suffix",
Category: "address", Category: "address",
Description: "Designation at the end of a street name indicating type, like 'Avenue' or 'Street'", Description: "Designation at the end of a street name indicating type (e.g., 'Ave', 'St')",
Example: "land", Example: "Ave",
Output: "string", Output: "string",
Aliases: []string{"street type", "road type", "avenue suffix", "thoroughfare suffix", "street ending"},
Keywords: []string{"street", "suffix", "designation", "type", "ave", "st", "rd", "dr", "ln", "blvd", "ct", "pl", "cir", "ter", "hwy"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return streetSuffix(f), nil return streetSuffix(f), nil
}, },
}) })
AddFuncLookup("unit", Info{
Display: "Unit",
Category: "address",
Description: "Unit identifier within a building, such as apartment number, suite, or office",
Example: "Apt 123",
Output: "string",
Aliases: []string{"apartment unit", "suite number", "office number", "building unit", "room number", "address line 2", "line 2"},
Keywords: []string{"apartment", "suite", "office", "identifier", "building", "number", "within", "room", "floor", "level", "section", "compartment"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return unit(f), nil
},
})
AddFuncLookup("zip", Info{ AddFuncLookup("zip", Info{
Display: "Zip", Display: "Zip",
Category: "address", Category: "address",
Description: "Numerical code for postal address sorting, specific to a geographic area", Description: "Numerical code for postal address sorting, specific to a geographic area",
Example: "13645", Example: "13645",
Output: "string", Output: "string",
Aliases: []string{"zip code", "postal code", "mail code", "delivery code"},
Keywords: []string{"postal", "postcode", "code", "address", "sorting", "geographic", "area", "numerical", "mailing", "delivery", "zone", "district", "region", "identifier"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return zip(f), nil return zip(f), nil
}, },
@ -342,6 +404,8 @@ func addAddressLookup() {
Description: "Geographic coordinate specifying north-south position on Earth's surface", Description: "Geographic coordinate specifying north-south position on Earth's surface",
Example: "-73.534056", Example: "-73.534056",
Output: "float", Output: "float",
Aliases: []string{"lat coordinate", "north-south coordinate", "geographic latitude", "earth latitude", "position latitude"},
Keywords: []string{"lat", "coordinate", "north-south", "degrees", "gps", "wgs84", "geodesy", "parallel", "equator", "pole"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return latitude(f), nil return latitude(f), nil
}, },
@ -353,6 +417,8 @@ func addAddressLookup() {
Description: "Latitude number between the given range (default min=0, max=90)", Description: "Latitude number between the given range (default min=0, max=90)",
Example: "22.921026", Example: "22.921026",
Output: "float", Output: "float",
Aliases: []string{"latitude bounds", "lat range", "north-south range", "geographic bounds", "coordinate range"},
Keywords: []string{"lat", "range", "min", "max", "degrees", "gps", "wgs84", "bounds", "interval"},
Params: []Param{ Params: []Param{
{Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum range"}, {Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum range"},
{Field: "max", Display: "Max", Type: "float", Default: "90", Description: "Maximum range"}, {Field: "max", Display: "Max", Type: "float", Default: "90", Description: "Maximum range"},
@ -362,18 +428,11 @@ func addAddressLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
max, err := info.GetFloat64(m, "max") max, err := info.GetFloat64(m, "max")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return latitudeInRange(f, min, max)
rangeOut, err := latitudeInRange(f, min, max)
if err != nil {
return nil, err
}
return rangeOut, nil
}, },
}) })
@ -383,6 +442,8 @@ func addAddressLookup() {
Description: "Geographic coordinate indicating east-west position on Earth's surface", Description: "Geographic coordinate indicating east-west position on Earth's surface",
Example: "-147.068112", Example: "-147.068112",
Output: "float", Output: "float",
Aliases: []string{"long coordinate", "east-west coordinate", "geographic longitude", "earth longitude", "position longitude"},
Keywords: []string{"lon", "coordinate", "east-west", "degrees", "gps", "wgs84", "geodesy", "meridian", "idl"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return longitude(f), nil return longitude(f), nil
}, },
@ -394,6 +455,8 @@ func addAddressLookup() {
Description: "Longitude number between the given range (default min=0, max=180)", Description: "Longitude number between the given range (default min=0, max=180)",
Example: "-8.170450", Example: "-8.170450",
Output: "float", Output: "float",
Aliases: []string{"longitude bounds", "long range", "east-west range", "geographic bounds", "coordinate range"},
Keywords: []string{"longitude", "lon", "range", "min", "max", "degrees", "gps", "wgs84", "bounds", "interval"},
Params: []Param{ Params: []Param{
{Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum range"}, {Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum range"},
{Field: "max", Display: "Max", Type: "float", Default: "180", Description: "Maximum range"}, {Field: "max", Display: "Max", Type: "float", Default: "180", Description: "Maximum range"},
@ -403,18 +466,12 @@ func addAddressLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
max, err := info.GetFloat64(m, "max") max, err := info.GetFloat64(m, "max")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return longitudeInRange(f, min, max)
rangeOut, err := longitudeInRange(f, min, max)
if err != nil {
return nil, err
}
return rangeOut, nil
}, },
}) })
} }

176
vendor/github.com/brianvoe/gofakeit/v7/airline.go generated vendored Normal file
View File

@ -0,0 +1,176 @@
package gofakeit
import (
"fmt"
"strings"
)
// AirlineAircraftType will generate a random aircraft type
func AirlineAircraftType() string { return airlineAircraftType(GlobalFaker) }
// AirlineAircraftType will generate a random aircraft type
func (f *Faker) AirlineAircraftType() string { return airlineAircraftType(f) }
func airlineAircraftType(f *Faker) string {
return getRandValue(f, []string{"airline", "aircraft_type"})
}
// AirlineAirplane will generate a random airplane model
func AirlineAirplane() string { return airlineAirplane(GlobalFaker) }
// AirlineAirplane will generate a random airplane model
func (f *Faker) AirlineAirplane() string { return airlineAirplane(f) }
func airlineAirplane(f *Faker) string {
return getRandValue(f, []string{"airline", "airplane"})
}
// AirlineAirport will generate a random airport name
func AirlineAirport() string { return airlineAirport(GlobalFaker) }
// AirlineAirport will generate a random airport name
func (f *Faker) AirlineAirport() string { return airlineAirport(f) }
func airlineAirport(f *Faker) string {
return getRandValue(f, []string{"airline", "airport"})
}
// AirlineAirportIATA will generate a random airport IATA code
func AirlineAirportIATA() string { return airlineAirportIATA(GlobalFaker) }
// AirlineAirportIATA will generate a random airport IATA code
func (f *Faker) AirlineAirportIATA() string { return airlineAirportIATA(f) }
func airlineAirportIATA(f *Faker) string {
return getRandValue(f, []string{"airline", "iata"})
}
// AirlineFlightNumber will generate a random flight number
func AirlineFlightNumber() string { return airlineFlightNumber(GlobalFaker) }
// AirlineFlightNumber will generate a random flight number
func (f *Faker) AirlineFlightNumber() string { return airlineFlightNumber(f) }
func airlineFlightNumber(f *Faker) string {
// Generate a 2-letter airline code followed by 1-4 digit flight number
return fmt.Sprintf("%s%d", strings.ToUpper(letterN(f, 2)), f.Number(1, 9999))
}
// AirlineRecordLocator will generate a random record locator (booking reference)
func AirlineRecordLocator() string { return airlineRecordLocator(GlobalFaker) }
// AirlineRecordLocator will generate a random record locator (booking reference)
func (f *Faker) AirlineRecordLocator() string { return airlineRecordLocator(f) }
func airlineRecordLocator(f *Faker) string {
// Generate a 6-character uppercase alphanumeric record locator
return strings.ToUpper(letterN(f, 6))
}
// AirlineSeat will generate a random seat assignment
func AirlineSeat() string { return airlineSeat(GlobalFaker) }
// AirlineSeat will generate a random seat assignment
func (f *Faker) AirlineSeat() string { return airlineSeat(f) }
func airlineSeat(f *Faker) string {
// Generate seat like "12A", "23F", etc.
// Row: 1-60, Seat: A-K (excluding I)
row := f.Number(1, 60)
seats := []string{"A", "B", "C", "D", "E", "F", "G", "H", "J", "K"}
seat := seats[f.Number(0, len(seats)-1)]
return fmt.Sprintf("%d%s", row, seat)
}
func addAirlineLookup() {
AddFuncLookup("airlineaircrafttype", Info{
Display: "Airline Aircraft Type",
Category: "airline",
Description: "Distinct category that defines the particular model or series of an aircraft",
Example: "narrowbody",
Output: "string",
Aliases: []string{"aircraft category", "plane type", "airplane classification"},
Keywords: []string{"airline", "aircraft", "type", "category", "narrowbody", "widebody", "regional", "plane", "airplane"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return airlineAircraftType(f), nil
},
})
AddFuncLookup("airlineairplane", Info{
Display: "Airline Airplane",
Category: "airline",
Description: "Specific model and manufacturer of an aircraft used for air travel",
Example: "Airbus A320",
Output: "string",
Aliases: []string{"aircraft model", "plane model", "airplane name"},
Keywords: []string{"airline", "airplane", "aircraft", "model", "airbus", "boeing", "embraer", "bombardier", "manufacturer"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return airlineAirplane(f), nil
},
})
AddFuncLookup("airlineairport", Info{
Display: "Airline Airport",
Category: "airline",
Description: "Facility where aircraft take off and land, including terminals and runways",
Example: "Hartsfield-Jackson Atlanta International Airport",
Output: "string",
Aliases: []string{"airport name", "aerodrome", "airfield"},
Keywords: []string{"airline", "airport", "facility", "terminal", "runway", "international", "travel", "aviation"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return airlineAirport(f), nil
},
})
AddFuncLookup("airlineairportiata", Info{
Display: "Airline Airport IATA",
Category: "airline",
Description: "Three-letter code assigned to airports by the International Air Transport Association",
Example: "ATL",
Output: "string",
Aliases: []string{"airport code", "iata code", "airport abbreviation"},
Keywords: []string{"airline", "airport", "iata", "code", "three-letter", "abbreviation", "international", "aviation"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return airlineAirportIATA(f), nil
},
})
AddFuncLookup("airlineflightnumber", Info{
Display: "Airline Flight Number",
Category: "airline",
Description: "Unique identifier for a specific flight operated by an airline",
Example: "AA1234",
Output: "string",
Aliases: []string{"flight code", "flight identifier", "flight designation"},
Keywords: []string{"airline", "flight", "number", "identifier", "code", "designation", "aviation", "travel"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return airlineFlightNumber(f), nil
},
})
AddFuncLookup("airlinerecordlocator", Info{
Display: "Airline Record Locator",
Category: "airline",
Description: "Unique alphanumeric code used to identify and retrieve a flight booking",
Example: "ABCDEF",
Output: "string",
Aliases: []string{"booking reference", "confirmation code", "reservation code", "pnr"},
Keywords: []string{"airline", "record", "locator", "booking", "reference", "confirmation", "reservation", "code", "alphanumeric"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return airlineRecordLocator(f), nil
},
})
AddFuncLookup("airlineseat", Info{
Display: "Airline Seat",
Category: "airline",
Description: "Designated location within an aircraft assigned to a passenger",
Example: "12A",
Output: "string",
Aliases: []string{"seat assignment", "seat number", "seat location"},
Keywords: []string{"airline", "seat", "assignment", "location", "passenger", "aircraft", "row", "position"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return airlineSeat(f), nil
},
})
}

View File

@ -105,6 +105,8 @@ func addAnimalLookup() {
Description: "Affectionate nickname given to a pet", Description: "Affectionate nickname given to a pet",
Example: "Ozzy Pawsborne", Example: "Ozzy Pawsborne",
Output: "string", Output: "string",
Aliases: []string{"pet nickname", "animal name", "companion name", "friendly name", "affectionate name"},
Keywords: []string{"pet", "name", "nickname", "affectionate", "animal", "companion", "friendly", "cute", "funny", "playful", "loving", "adorable"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return petName(f), nil return petName(f), nil
}, },
@ -116,6 +118,8 @@ func addAnimalLookup() {
Description: "Living creature with the ability to move, eat, and interact with its environment", Description: "Living creature with the ability to move, eat, and interact with its environment",
Example: "elk", Example: "elk",
Output: "string", Output: "string",
Aliases: []string{"wild animal", "living creature", "wildlife species", "animal species", "creature name"},
Keywords: []string{"creature", "living", "move", "eat", "environment", "wildlife", "species", "fauna", "beast", "organism", "vertebrate", "invertebrate"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return animal(f), nil return animal(f), nil
}, },
@ -127,6 +131,8 @@ func addAnimalLookup() {
Description: "Type of animal, such as mammals, birds, reptiles, etc.", Description: "Type of animal, such as mammals, birds, reptiles, etc.",
Example: "amphibians", Example: "amphibians",
Output: "string", Output: "string",
Aliases: []string{"animal classification", "species type", "taxonomic group", "animal category", "biological class"},
Keywords: []string{"animal", "type", "mammals", "birds", "reptiles", "amphibians", "classification", "taxonomy", "phylum", "class", "order", "family", "genus", "species"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return animalType(f), nil return animalType(f), nil
}, },
@ -138,6 +144,8 @@ func addAnimalLookup() {
Description: "Animal name commonly found on a farm", Description: "Animal name commonly found on a farm",
Example: "Chicken", Example: "Chicken",
Output: "string", Output: "string",
Aliases: []string{"livestock animal", "barnyard animal", "agricultural animal", "domestic animal", "farm livestock"},
Keywords: []string{"farm", "animal", "livestock", "domestic", "agriculture", "commonly", "cattle", "barnyard", "herd", "poultry", "swine", "sheep", "goat", "horse", "pig"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return farmAnimal(f), nil return farmAnimal(f), nil
}, },
@ -149,6 +157,8 @@ func addAnimalLookup() {
Description: "Various breeds that define different cats", Description: "Various breeds that define different cats",
Example: "Chausie", Example: "Chausie",
Output: "string", Output: "string",
Aliases: []string{"cat breed", "feline breed", "domestic cat", "pet cat", "kitty breed"},
Keywords: []string{"breed", "feline", "pet", "domestic", "various", "persian", "siamese", "maine", "coon", "tabby", "calico", "tuxedo", "kitten"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return cat(f), nil return cat(f), nil
}, },
@ -160,6 +170,8 @@ func addAnimalLookup() {
Description: "Various breeds that define different dogs", Description: "Various breeds that define different dogs",
Example: "Norwich Terrier", Example: "Norwich Terrier",
Output: "string", Output: "string",
Aliases: []string{"dog breed", "canine breed", "domestic dog", "pet dog", "fido breed"},
Keywords: []string{"breed", "canine", "pet", "domestic", "various", "labrador", "retriever", "terrier", "shepherd", "bulldog", "poodle", "puppy", "hound"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return dog(f), nil return dog(f), nil
}, },
@ -171,6 +183,8 @@ func addAnimalLookup() {
Description: "Distinct species of birds", Description: "Distinct species of birds",
Example: "goose", Example: "goose",
Output: "string", Output: "string",
Aliases: []string{"bird species", "avian species", "feathered animal", "winged creature", "bird type"},
Keywords: []string{"species", "avian", "feather", "wing", "distinct", "sparrow", "eagle", "hawk", "owl", "duck", "goose", "parrot", "finch", "robin"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return bird(f), nil return bird(f), nil
}, },

View File

@ -67,6 +67,8 @@ func addAppLookup() {
Description: "Software program designed for a specific purpose or task on a computer or mobile device", Description: "Software program designed for a specific purpose or task on a computer or mobile device",
Example: "Parkrespond", Example: "Parkrespond",
Output: "string", Output: "string",
Aliases: []string{"software name", "application name", "mobile app name", "program title", "app title"},
Keywords: []string{"app", "name", "software", "program", "application", "mobile", "device", "computer", "ios", "android", "desktop", "web", "platform", "title"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return appName(f), nil return appName(f), nil
}, },
@ -78,6 +80,8 @@ func addAppLookup() {
Description: "Particular release of an application in Semantic Versioning format", Description: "Particular release of an application in Semantic Versioning format",
Example: "1.12.14", Example: "1.12.14",
Output: "string", Output: "string",
Aliases: []string{"semantic version", "app release", "software version", "version number", "release version"},
Keywords: []string{"app", "version", "release", "semantic", "versioning", "application", "major", "minor", "patch", "build", "number", "format", "tag"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return appVersion(f), nil return appVersion(f), nil
}, },
@ -89,6 +93,8 @@ func addAppLookup() {
Description: "Person or group creating and developing an application", Description: "Person or group creating and developing an application",
Example: "Qado Energy, Inc.", Example: "Qado Energy, Inc.",
Output: "string", Output: "string",
Aliases: []string{"app developer", "software author", "application creator", "program developer", "app creator"},
Keywords: []string{"app", "author", "developer", "creator", "person", "company", "group", "creating", "programmer", "coder", "engineer", "team", "organization", "studio", "publisher"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return appAuthor(f), nil return appAuthor(f), nil
}, },

View File

@ -11,7 +11,13 @@ func (f *Faker) Username() string {
} }
func username(f *Faker) string { func username(f *Faker) string {
return getRandValue(f, []string{"person", "last"}) + replaceWithNumbers(f, "####") username := getRandValue(f, []string{"auth", "username"})
username, err := generate(f, username)
if err != nil {
return username // fallback to raw template if generation fails
}
return username
} }
// Password will generate a random password. // Password will generate a random password.
@ -32,55 +38,91 @@ func password(f *Faker, lower bool, upper bool, numeric bool, special bool, spac
num = 5 num = 5
} }
// Setup weights type charGroup struct {
items := make([]any, 0) chars string
weights := make([]float32, 0) weight int
if lower { isSpace bool
items = append(items, "l")
weights = append(weights, 4)
}
if upper {
items = append(items, "u")
weights = append(weights, 4)
}
if numeric {
items = append(items, "n")
weights = append(weights, 3)
}
if special {
items = append(items, "e")
weights = append(weights, 2)
}
if space {
items = append(items, "a")
weights = append(weights, 1)
} }
defaultNonSpace := [...]charGroup{
{chars: lowerStr, weight: 4},
{chars: upperStr, weight: 4},
{chars: numericStr, weight: 3},
}
const defaultNonSpaceWeight = 4 + 4 + 3
var (
activeBuf [5]charGroup
nonSpaceBuf [5]charGroup
active []charGroup
totalWeight int
nonSpace []charGroup
nonSpaceWeight int
)
appendGroup := func(enabled bool, chars string, weight int, isSpace bool) {
if !enabled {
return
}
active = append(active, charGroup{chars: chars, weight: weight, isSpace: isSpace})
totalWeight += weight
if !isSpace {
nonSpace = append(nonSpace, charGroup{chars: chars, weight: weight})
nonSpaceWeight += weight
}
}
active = activeBuf[:0]
nonSpace = nonSpaceBuf[:0]
appendGroup(lower, lowerStr, 4, false)
appendGroup(upper, upperStr, 4, false)
appendGroup(numeric, numericStr, 3, false)
appendGroup(special, specialSafeStr, 2, false)
appendGroup(space, spaceStr, 1, true)
// If no items are selected then default to lower, upper, numeric // If no items are selected then default to lower, upper, numeric
if len(items) == 0 { if len(active) == 0 {
items = append(items, "l", "u", "n") active = defaultNonSpace[:]
weights = append(weights, 4, 4, 3) totalWeight = defaultNonSpaceWeight
nonSpace = active
nonSpaceWeight = totalWeight
} else if nonSpaceWeight == 0 {
// No non-space characters were added (only spaces); fall back to defaults.
nonSpace = defaultNonSpace[:]
nonSpaceWeight = defaultNonSpaceWeight
}
draw := func(groups []charGroup, total int) byte {
if total <= 0 {
groups = defaultNonSpace[:]
total = defaultNonSpaceWeight
}
r := f.IntN(total)
for _, g := range groups {
if r < g.weight {
return g.chars[f.IntN(len(g.chars))]
}
r -= g.weight
}
// Should never be reached, but fall back to the last group just in case.
g := groups[len(groups)-1]
return g.chars[f.IntN(len(g.chars))]
} }
// Create byte slice // Create byte slice
b := make([]byte, num) b := make([]byte, num)
for i := 0; i <= num-1; i++ { // Guarantee at least one character from each enabled non-space group so
// Run weighted // the password always satisfies the requested character-set criteria.
weight, _ := weighted(f, items, weights) for i, g := range nonSpace {
b[i] = g.chars[f.IntN(len(g.chars))]
}
switch weight.(string) { // Fill the remaining positions randomly from all active groups.
case "l": for i := len(nonSpace); i < num; i++ {
b[i] = lowerStr[f.Int64()%int64(len(lowerStr))] b[i] = draw(active, totalWeight)
case "u":
b[i] = upperStr[f.Int64()%int64(len(upperStr))]
case "n":
b[i] = numericStr[f.Int64()%int64(len(numericStr))]
case "e":
b[i] = specialSafeStr[f.Int64()%int64(len(specialSafeStr))]
case "a":
b[i] = spaceStr[f.Int64()%int64(len(spaceStr))]
}
} }
// Shuffle bytes // Shuffle bytes
@ -91,10 +133,10 @@ func password(f *Faker, lower bool, upper bool, numeric bool, special bool, spac
// Replace first or last character if it's a space, and other options are available // Replace first or last character if it's a space, and other options are available
if b[0] == ' ' { if b[0] == ' ' {
b[0] = password(f, lower, upper, numeric, special, false, 1)[0] b[0] = draw(nonSpace, nonSpaceWeight)
} }
if b[len(b)-1] == ' ' { if b[len(b)-1] == ' ' {
b[len(b)-1] = password(f, lower, upper, numeric, special, false, 1)[0] b[len(b)-1] = draw(nonSpace, nonSpaceWeight)
} }
return string(b) return string(b)
@ -107,6 +149,18 @@ func addAuthLookup() {
Description: "Unique identifier assigned to a user for accessing an account or system", Description: "Unique identifier assigned to a user for accessing an account or system",
Example: "Daniel1364", Example: "Daniel1364",
Output: "string", Output: "string",
Aliases: []string{
"user name",
"login name",
"account username",
"account login",
"screen name",
"user handle",
},
Keywords: []string{
"login", "handle", "userid", "screenname",
"user", "account", "credential", "signin", "alias", "profile", "uid",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return username(f), nil return username(f), nil
}, },
@ -118,6 +172,19 @@ func addAuthLookup() {
Description: "Secret word or phrase used to authenticate access to a system or account", Description: "Secret word or phrase used to authenticate access to a system or account",
Example: "EEP+wwpk 4lU-eHNXlJZ4n K9%v&TZ9e", Example: "EEP+wwpk 4lU-eHNXlJZ4n K9%v&TZ9e",
Output: "string", Output: "string",
Aliases: []string{
"user password",
"account password",
"login password",
"secret phrase",
"auth secret",
},
Keywords: []string{
"passphrase", "pwd", "secret",
"credential", "authentication", "auth",
"security", "signin", "login",
"access", "key", "token", "hash", "encryption",
},
Params: []Param{ Params: []Param{
{Field: "lower", Display: "Lower", Type: "bool", Default: "true", Description: "Whether or not to add lower case characters"}, {Field: "lower", Display: "Lower", Type: "bool", Default: "true", Description: "Whether or not to add lower case characters"},
{Field: "upper", Display: "Upper", Type: "bool", Default: "true", Description: "Whether or not to add upper case characters"}, {Field: "upper", Display: "Upper", Type: "bool", Default: "true", Description: "Whether or not to add upper case characters"},

View File

@ -123,6 +123,8 @@ func addBeerLookup() {
Description: "Specific brand or variety of beer", Description: "Specific brand or variety of beer",
Example: "Duvel", Example: "Duvel",
Output: "string", Output: "string",
Aliases: []string{"brand", "brewery", "label", "craft", "microbrew"},
Keywords: []string{"beer", "name", "variety", "specific", "alcoholic", "beverage", "lager", "ale", "stout", "pilsner", "ipa"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return beerName(f), nil return beerName(f), nil
}, },
@ -134,6 +136,8 @@ func addBeerLookup() {
Description: "Distinct characteristics and flavors of beer", Description: "Distinct characteristics and flavors of beer",
Example: "European Amber Lager", Example: "European Amber Lager",
Output: "string", Output: "string",
Aliases: []string{"style", "type", "category", "classification", "variety"},
Keywords: []string{"beer", "characteristics", "flavors", "distinct", "lager", "ale", "stout", "pilsner", "porter", "wheat", "amber"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return beerStyle(f), nil return beerStyle(f), nil
}, },
@ -145,6 +149,8 @@ func addBeerLookup() {
Description: "The flower used in brewing to add flavor, aroma, and bitterness to beer", Description: "The flower used in brewing to add flavor, aroma, and bitterness to beer",
Example: "Glacier", Example: "Glacier",
Output: "string", Output: "string",
Aliases: []string{"hop", "flower", "plant", "cone", "vine"},
Keywords: []string{"beer", "brewing", "flavor", "aroma", "bitterness", "ingredient", "humulus", "lupulus", "cascade", "citra", "mosaic"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return beerHop(f), nil return beerHop(f), nil
}, },
@ -156,6 +162,8 @@ func addBeerLookup() {
Description: "Microorganism used in brewing to ferment sugars, producing alcohol and carbonation in beer", Description: "Microorganism used in brewing to ferment sugars, producing alcohol and carbonation in beer",
Example: "1388 - Belgian Strong Ale", Example: "1388 - Belgian Strong Ale",
Output: "string", Output: "string",
Aliases: []string{"yeast", "fungus", "microorganism", "culture", "strain"},
Keywords: []string{"beer", "brewing", "ferment", "sugars", "alcohol", "carbonation", "ingredient", "saccharomyces", "cerevisiae", "belgian", "ale"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return beerYeast(f), nil return beerYeast(f), nil
}, },
@ -167,6 +175,8 @@ func addBeerLookup() {
Description: "Processed barley or other grains, provides sugars for fermentation and flavor to beer", Description: "Processed barley or other grains, provides sugars for fermentation and flavor to beer",
Example: "Munich", Example: "Munich",
Output: "string", Output: "string",
Aliases: []string{"malt", "barley", "grain", "cereal", "kernel"},
Keywords: []string{"beer", "sugars", "fermentation", "flavor", "processed", "ingredient", "munich", "pale", "crystal", "roasted", "wheat", "rye"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return beerMalt(f), nil return beerMalt(f), nil
}, },
@ -178,6 +188,8 @@ func addBeerLookup() {
Description: "Measures the alcohol content in beer", Description: "Measures the alcohol content in beer",
Example: "2.7%", Example: "2.7%",
Output: "string", Output: "string",
Aliases: []string{"alcohol", "abv", "strength", "proof", "percentage"},
Keywords: []string{"beer", "content", "measure", "volume", "concentration", "level", "degree", "potency"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return beerAlcohol(f), nil return beerAlcohol(f), nil
}, },
@ -189,6 +201,8 @@ func addBeerLookup() {
Description: "Scale measuring bitterness of beer from hops", Description: "Scale measuring bitterness of beer from hops",
Example: "29 IBU", Example: "29 IBU",
Output: "string", Output: "string",
Aliases: []string{"ibu", "bitterness", "scale", "units", "measurement"},
Keywords: []string{"beer", "hops", "measuring", "international", "bittering", "alpha", "acid", "level", "intensity"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return beerIbu(f), nil return beerIbu(f), nil
}, },
@ -200,6 +214,8 @@ func addBeerLookup() {
Description: "Scale indicating the concentration of extract in worts", Description: "Scale indicating the concentration of extract in worts",
Example: "6.4°Blg", Example: "6.4°Blg",
Output: "string", Output: "string",
Aliases: []string{"blg", "density", "gravity", "extract", "concentration"},
Keywords: []string{"beer", "worts", "scale", "indicating", "balling", "plato", "sugar", "soluble", "solids", "degree"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return beerBlg(f), nil return beerBlg(f), nil
}, },

View File

@ -48,6 +48,8 @@ func addBookLookup() {
}`, }`,
Output: "map[string]string", Output: "map[string]string",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{"printed", "pages", "bound", "subjects", "stories", "literature", "text"},
Keywords: []string{"written", "work", "consisting", "anna", "karenina", "toni", "morrison", "thriller"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return book(f), nil return book(f), nil
}, },
@ -59,6 +61,8 @@ func addBookLookup() {
Description: "The specific name given to a book", Description: "The specific name given to a book",
Example: "Hamlet", Example: "Hamlet",
Output: "string", Output: "string",
Aliases: []string{"title", "name", "specific", "given", "heading"},
Keywords: []string{"book", "identification", "hamlet", "naming", "designation", "label", "caption"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return bookTitle(f), nil return bookTitle(f), nil
}, },
@ -70,6 +74,8 @@ func addBookLookup() {
Description: "The individual who wrote or created the content of a book", Description: "The individual who wrote or created the content of a book",
Example: "Mark Twain", Example: "Mark Twain",
Output: "string", Output: "string",
Aliases: []string{"author", "writer", "creator", "individual", "content", "literary"},
Keywords: []string{"book", "wrote", "created", "mark", "twain", "composer", "originator", "penned"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return bookAuthor(f), nil return bookAuthor(f), nil
}, },
@ -81,6 +87,8 @@ func addBookLookup() {
Description: "Category or type of book defined by its content, style, or form", Description: "Category or type of book defined by its content, style, or form",
Example: "Adventure", Example: "Adventure",
Output: "string", Output: "string",
Aliases: []string{"type", "content", "style", "form", "literature", "classification"},
Keywords: []string{"book", "category", "defined", "adventure", "fiction", "non-fiction", "mystery", "romance", "sci-fi"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return bookGenre(f), nil return bookGenre(f), nil
}, },

View File

@ -84,6 +84,8 @@ func addCarLookup() {
}`, }`,
Output: "map[string]any", Output: "map[string]any",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{"vehicle", "automobile", "transportation", "motor", "wheeled"},
Keywords: []string{"used", "passenger", "mini", "gasoline", "automatic", "fiat", "freestyle", "fwd"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return car(f), nil return car(f), nil
}, },
@ -95,6 +97,8 @@ func addCarLookup() {
Description: "Classification of cars based on size, use, or body style", Description: "Classification of cars based on size, use, or body style",
Example: "Passenger car mini", Example: "Passenger car mini",
Output: "string", Output: "string",
Aliases: []string{"classification", "size", "body", "style", "vehicle", "category"},
Keywords: []string{"car", "based", "passenger", "mini", "suv", "sedan", "hatchback", "convertible", "coupe"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return carType(f), nil return carType(f), nil
}, },
@ -106,6 +110,8 @@ func addCarLookup() {
Description: "Type of energy source a car uses", Description: "Type of energy source a car uses",
Example: "CNG", Example: "CNG",
Output: "string", Output: "string",
Aliases: []string{"energy", "source", "power", "vehicle"},
Keywords: []string{"car", "fuel", "uses", "cng", "gasoline", "diesel", "electric", "hybrid", "hydrogen", "ethanol"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return carFuelType(f), nil return carFuelType(f), nil
}, },
@ -117,6 +123,8 @@ func addCarLookup() {
Description: "Mechanism a car uses to transmit power from the engine to the wheels", Description: "Mechanism a car uses to transmit power from the engine to the wheels",
Example: "Manual", Example: "Manual",
Output: "string", Output: "string",
Aliases: []string{"mechanism", "power", "engine", "wheels", "vehicle"},
Keywords: []string{"car", "transmission", "transmit", "manual", "automatic", "cvt", "semi-automatic", "gearbox", "clutch"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return carTransmissionType(f), nil return carTransmissionType(f), nil
}, },
@ -128,6 +136,8 @@ func addCarLookup() {
Description: "Company or brand that manufactures and designs cars", Description: "Company or brand that manufactures and designs cars",
Example: "Nissan", Example: "Nissan",
Output: "string", Output: "string",
Aliases: []string{"company", "brand", "manufacturer", "designer", "vehicle", "producer"},
Keywords: []string{"car", "maker", "manufactures", "nissan", "toyota", "honda", "ford", "bmw", "mercedes", "audi"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return carMaker(f), nil return carMaker(f), nil
}, },
@ -139,6 +149,19 @@ func addCarLookup() {
Description: "Specific design or version of a car produced by a manufacturer", Description: "Specific design or version of a car produced by a manufacturer",
Example: "Aveo", Example: "Aveo",
Output: "string", Output: "string",
Aliases: []string{
"vehicle model",
"auto model",
"car type",
"car version",
"automobile model",
},
Keywords: []string{
"car", "model", "vehicle", "auto", "automobile",
"type", "edition", "variant", "series",
"sedan", "suv", "hatchback", "coupe", "convertible",
"civic", "camry", "accord", "corolla", "mustang", "prius",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return carModel(f), nil return carModel(f), nil
}, },

View File

@ -33,6 +33,8 @@ func addCelebrityLookup() {
Description: "Famous person known for acting in films, television, or theater", Description: "Famous person known for acting in films, television, or theater",
Example: "Brad Pitt", Example: "Brad Pitt",
Output: "string", Output: "string",
Aliases: []string{"actor", "famous", "films", "television", "theater", "entertainment"},
Keywords: []string{"celebrity", "known", "brad", "pitt", "hollywood", "movie", "star", "performer", "artist"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return celebrityActor(f), nil return celebrityActor(f), nil
}, },
@ -44,6 +46,8 @@ func addCelebrityLookup() {
Description: "High-profile individual known for significant achievements in business or entrepreneurship", Description: "High-profile individual known for significant achievements in business or entrepreneurship",
Example: "Elon Musk", Example: "Elon Musk",
Output: "string", Output: "string",
Aliases: []string{"business", "entrepreneur", "high-profile", "achievements", "executive"},
Keywords: []string{"celebrity", "significant", "elon", "musk", "ceo", "founder", "investor", "tycoon", "magnate"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return celebrityBusiness(f), nil return celebrityBusiness(f), nil
}, },
@ -55,6 +59,8 @@ func addCelebrityLookup() {
Description: "Famous athlete known for achievements in a particular sport", Description: "Famous athlete known for achievements in a particular sport",
Example: "Michael Phelps", Example: "Michael Phelps",
Output: "string", Output: "string",
Aliases: []string{"athlete", "famous", "achievements", "competition", "athletic", "player"},
Keywords: []string{"celebrity", "particular", "michael", "phelps", "olympics", "champion", "medalist", "record", "holder"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return celebritySport(f), nil return celebritySport(f), nil
}, },

View File

@ -63,6 +63,8 @@ func addColorLookup() {
Description: "Hue seen by the eye, returns the name of the color like red or blue", Description: "Hue seen by the eye, returns the name of the color like red or blue",
Example: "MediumOrchid", Example: "MediumOrchid",
Output: "string", Output: "string",
Aliases: []string{"color name", "hue name", "visual color", "shade name", "color label"},
Keywords: []string{"hue", "chroma", "shade", "tone", "css", "name", "visual", "appearance", "pigment", "spectrum", "palette", "tint", "saturation", "brightness", "rgb", "hex"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return color(f), nil return color(f), nil
}, },
@ -71,10 +73,12 @@ func addColorLookup() {
AddFuncLookup("nicecolors", Info{ AddFuncLookup("nicecolors", Info{
Display: "Nice Colors", Display: "Nice Colors",
Category: "color", Category: "color",
Description: "Attractive and appealing combinations of colors, returns an list of color hex codes", Description: "Attractive and appealing combinations of colors, returns a list of color hex codes",
Example: `["#cfffdd","#b4dec1","#5c5863","#a85163","#ff1f4c"]`, Example: `["#cfffdd","#b4dec1","#5c5863","#a85163","#ff1f4c"]`,
Output: "[]string", Output: "[]string",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{"color palette", "nice palette", "harmonious colors", "aesthetic palette", "design colors"},
Keywords: []string{"nice", "colors", "palette", "array", "hex", "design", "aesthetic", "beautiful", "harmonious", "scheme", "ui", "ux"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return niceColors(f), nil return niceColors(f), nil
}, },
@ -86,6 +90,8 @@ func addColorLookup() {
Description: "Colors displayed consistently on different web browsers and devices", Description: "Colors displayed consistently on different web browsers and devices",
Example: "black", Example: "black",
Output: "string", Output: "string",
Aliases: []string{"web safe color", "browser safe", "cross platform color", "universal color", "standard color"},
Keywords: []string{"safe", "color", "cross-platform", "css", "html", "compatible", "browser", "device", "universal", "stable", "standard"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return safeColor(f), nil return safeColor(f), nil
}, },
@ -94,9 +100,11 @@ func addColorLookup() {
AddFuncLookup("hexcolor", Info{ AddFuncLookup("hexcolor", Info{
Display: "Hex Color", Display: "Hex Color",
Category: "color", Category: "color",
Description: "Six-digit code representing a color in the color model", Description: "Six-digit hexadecimal code representing a color in the RGB color model",
Example: "#a99fb4", Example: "#a99fb4",
Output: "string", Output: "string",
Aliases: []string{"hex color code", "css hex", "html hex", "web hex", "hexadecimal color"},
Keywords: []string{"hex", "hexcolor", "color", "rgb", "six-digit", "web", "css", "html", "design", "hexadecimal", "hash", "code"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return hexColor(f), nil return hexColor(f), nil
}, },
@ -109,8 +117,11 @@ func addColorLookup() {
Example: "[85, 224, 195]", Example: "[85, 224, 195]",
Output: "[]int", Output: "[]int",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{"rgb triplet", "rgb array", "rgb value", "red green blue", "rgb color code"},
Keywords: []string{"rgb", "color", "red", "green", "blue", "triplet", "digital", "screen", "display", "primary", "additive", "value", "css"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return rgbColor(f), nil return rgbColor(f), nil
}, },
}) })
} }

View File

@ -117,6 +117,18 @@ func addCompanyLookup() {
Description: "Designated official name of a business or organization", Description: "Designated official name of a business or organization",
Example: "Moen, Pagac and Wuckert", Example: "Moen, Pagac and Wuckert",
Output: "string", Output: "string",
Aliases: []string{
"business name",
"company name",
"organization name",
"corporate name",
"legal entity",
},
Keywords: []string{
"business", "organization", "corporation",
"enterprise", "firm", "entity", "brand",
"employer", "vendor", "partner",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return company(f), nil return company(f), nil
}, },
@ -128,6 +140,19 @@ func addCompanyLookup() {
Description: "Suffix at the end of a company name, indicating business structure, like 'Inc.' or 'LLC'", Description: "Suffix at the end of a company name, indicating business structure, like 'Inc.' or 'LLC'",
Example: "Inc", Example: "Inc",
Output: "string", Output: "string",
Aliases: []string{
"business suffix",
"legal suffix",
"company ending",
"corporate suffix",
"entity suffix",
},
Keywords: []string{
"suffix", "ending", "company", "business", "entity",
"inc", "incorporated", "llc", "ltd", "limited",
"corp", "corporation", "plc", "gmbh", "sarl",
"legal", "structure", "designation",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return companySuffix(f), nil return companySuffix(f), nil
}, },
@ -139,6 +164,18 @@ func addCompanyLookup() {
Description: "Random bs company word", Description: "Random bs company word",
Example: "front-end", Example: "front-end",
Output: "string", Output: "string",
Aliases: []string{
"business jargon",
"corporate jargon",
"marketing buzzword",
"tech buzzword",
"consulting speak",
},
Keywords: []string{
"jargon", "buzzwords", "synergy", "leverage",
"disrupt", "innovate", "scalable", "agile", "optimize",
"pipeline", "roadmap", "vision", "strategy", "corporate",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return bs(f), nil return bs(f), nil
}, },
@ -150,6 +187,19 @@ func addCompanyLookup() {
Description: "Brief description or summary of a company's purpose, products, or services", Description: "Brief description or summary of a company's purpose, products, or services",
Example: "word", Example: "word",
Output: "string", Output: "string",
Aliases: []string{
"company blurb",
"company summary",
"company description",
"short overview",
"about text",
},
Keywords: []string{
"summary", "overview", "description",
"company", "profile", "about", "intro",
"purpose", "mission", "vision", "statement",
"services", "products", "offerings",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return blurb(f), nil return blurb(f), nil
}, },
@ -161,6 +211,19 @@ func addCompanyLookup() {
Description: "Trendy or overused term often used in business to sound impressive", Description: "Trendy or overused term often used in business to sound impressive",
Example: "disintermediate", Example: "disintermediate",
Output: "string", Output: "string",
Aliases: []string{
"business buzzword",
"corporate buzzword",
"trendy term",
"catchphrase",
"marketing phrase",
},
Keywords: []string{
"jargon", "hype", "trend", "phrase",
"term", "corporate", "management", "marketing",
"innovation", "paradigm", "disruptive", "visionary",
"fashionable", "impressive",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return buzzWord(f), nil return buzzWord(f), nil
}, },
@ -169,7 +232,7 @@ func addCompanyLookup() {
AddFuncLookup("job", Info{ AddFuncLookup("job", Info{
Display: "Job", Display: "Job",
Category: "company", Category: "company",
Description: "Position or role in employment, involving specific tasks and responsibilities", Description: "Occupation or role in employment, involving specific tasks and responsibilities",
Example: `{ Example: `{
"company": "ClearHealthCosts", "company": "ClearHealthCosts",
"title": "Agent", "title": "Agent",
@ -178,6 +241,22 @@ func addCompanyLookup() {
}`, }`,
Output: "map[string]string", Output: "map[string]string",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{
"job role",
"job position",
"employment role",
"work role",
"career role",
"occupation",
"occupation role",
"occupation job",
},
Keywords: []string{
"role", "position", "employment", "work",
"career", "profession", "title",
"responsibilities", "tasks", "duties",
"staff", "employee", "hiring", "positioning",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return job(f), nil return job(f), nil
}, },
@ -189,6 +268,18 @@ func addCompanyLookup() {
Description: "Specific title for a position or role within a company or organization", Description: "Specific title for a position or role within a company or organization",
Example: "Director", Example: "Director",
Output: "string", Output: "string",
Aliases: []string{
"job designation",
"position title",
"role title",
"employment title",
"official title",
},
Keywords: []string{
"job", "title", "designation", "position", "role",
"occupation", "profession", "career",
"company", "organization", "staff", "employee",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return jobTitle(f), nil return jobTitle(f), nil
}, },
@ -200,6 +291,18 @@ func addCompanyLookup() {
Description: "Word used to describe the duties, requirements, and nature of a job", Description: "Word used to describe the duties, requirements, and nature of a job",
Example: "Central", Example: "Central",
Output: "string", Output: "string",
Aliases: []string{
"job modifier",
"job adjective",
"role descriptor",
"title descriptor",
"position descriptor",
},
Keywords: []string{
"descriptor", "modifier", "adjective", "qualifier",
"job", "role", "title", "position",
"label", "term", "descriptive", "characterization",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return jobDescriptor(f), nil return jobDescriptor(f), nil
}, },
@ -211,6 +314,20 @@ func addCompanyLookup() {
Description: "Random job level", Description: "Random job level",
Example: "Assurance", Example: "Assurance",
Output: "string", Output: "string",
Aliases: []string{
"seniority level",
"career level",
"position level",
"role level",
"job grade",
"job band",
},
Keywords: []string{
"level", "seniority", "rank", "tier", "grade", "band",
"entry", "junior", "associate", "mid", "senior",
"lead", "staff", "principal", "manager", "director",
"executive",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return jobLevel(f), nil return jobLevel(f), nil
}, },
@ -222,6 +339,19 @@ func addCompanyLookup() {
Description: "Catchphrase or motto used by a company to represent its brand or values", Description: "Catchphrase or motto used by a company to represent its brand or values",
Example: "Universal seamless Focus, interactive.", Example: "Universal seamless Focus, interactive.",
Output: "string", Output: "string",
Aliases: []string{
"company slogan",
"brand slogan",
"brand tagline",
"company motto",
"advertising slogan",
},
Keywords: []string{
"tagline", "motto", "catchphrase",
"brand", "company", "marketing", "advertising",
"identity", "values", "mission", "vision",
"strapline", "promo", "campaign",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return slogan(f), nil return slogan(f), nil
}, },

View File

@ -46,7 +46,7 @@ func csvFunc(f *Faker, co *CSVOptions) ([]byte, error) {
} }
// Check fields // Check fields
if co.Fields == nil || len(co.Fields) <= 0 { if len(co.Fields) <= 0 {
return nil, errors.New("must pass fields in order to build json object(s)") return nil, errors.New("must pass fields in order to build json object(s)")
} }
@ -134,6 +134,12 @@ func addFileCSVLookup() {
2,Osborne,Hilll,XPJ9OVNbs5lm`, 2,Osborne,Hilll,XPJ9OVNbs5lm`,
Output: "[]byte", Output: "[]byte",
ContentType: "text/csv", ContentType: "text/csv",
Aliases: []string{
"comma separated", "csv file", "data table", "flat file", "spreadsheet format", "tabular data",
},
Keywords: []string{
"comma", "separated", "values", "format", "data", "spreadsheet", "entries", "rows", "columns", "dataset", "records",
},
Params: []Param{ Params: []Param{
{Field: "delimiter", Display: "Delimiter", Type: "string", Default: ",", Description: "Separator in between row values"}, {Field: "delimiter", Display: "Delimiter", Type: "string", Default: ",", Description: "Separator in between row values"},
{Field: "rowcount", Display: "Row Count", Type: "int", Default: "100", Description: "Number of rows"}, {Field: "rowcount", Display: "Row Count", Type: "int", Default: "100", Description: "Number of rows"},

View File

@ -6,6 +6,7 @@ var Address = map[string][]string{
"street_prefix": {"North", "East", "West", "South", "New", "Lake", "Port"}, "street_prefix": {"North", "East", "West", "South", "New", "Lake", "Port"},
"street_name": {"Alley", "Avenue", "Branch", "Bridge", "Brook", "Brooks", "Burg", "Burgs", "Bypass", "Camp", "Canyon", "Cape", "Causeway", "Center", "Centers", "Circle", "Circles", "Cliff", "Cliffs", "Club", "Common", "Corner", "Corners", "Course", "Court", "Courts", "Cove", "Coves", "Creek", "Crescent", "Crest", "Crossing", "Crossroad", "Curve", "Dale", "Dam", "Divide", "Drive", "Drive", "Drives", "Estate", "Estates", "Expressway", "Extension", "Extensions", "Fall", "Falls", "Ferry", "Field", "Fields", "Flat", "Flats", "Ford", "Fords", "Forest", "Forge", "Forges", "Fork", "Forks", "Fort", "Freeway", "Garden", "Gardens", "Gateway", "Glen", "Glens", "Green", "Greens", "Grove", "Groves", "Harbor", "Harbors", "Haven", "Heights", "Highway", "Hill", "Hills", "Hollow", "Inlet", "Inlet", "Island", "Island", "Islands", "Islands", "Isle", "Isle", "Junction", "Junctions", "Key", "Keys", "Knoll", "Knolls", "Lake", "Lakes", "Land", "Landing", "Lane", "Light", "Lights", "Loaf", "Lock", "Locks", "Locks", "Lodge", "Lodge", "Loop", "Mall", "Manor", "Manors", "Meadow", "Meadows", "Mews", "Mill", "Mills", "Mission", "Mission", "Motorway", "Mount", "Mountain", "Mountain", "Mountains", "Mountains", "Neck", "Orchard", "Oval", "Overpass", "Park", "Parks", "Parkway", "Parkways", "Pass", "Passage", "Path", "Pike", "Pine", "Pines", "Place", "Plain", "Plains", "Plains", "Plaza", "Plaza", "Point", "Points", "Port", "Port", "Ports", "Ports", "Prairie", "Prairie", "Radial", "Ramp", "Ranch", "Rapid", "Rapids", "Rest", "Ridge", "Ridges", "River", "Road", "Road", "Roads", "Roads", "Route", "Row", "Rue", "Run", "Shoal", "Shoals", "Shore", "Shores", "Skyway", "Spring", "Springs", "Springs", "Spur", "Spurs", "Square", "Square", "Squares", "Squares", "Station", "Station", "Stravenue", "Stravenue", "Stream", "Stream", "Street", "Street", "Streets", "Summit", "Summit", "Terrace", "Throughway", "Trace", "Track", "Trafficway", "Trail", "Trail", "Tunnel", "Tunnel", "Turnpike", "Turnpike", "Underpass", "Union", "Unions", "Valley", "Valleys", "Via", "Viaduct", "View", "Views", "Village", "Village", "Villages", "Ville", "Vista", "Vista", "Walk", "Walks", "Wall", "Way", "Ways", "Well", "Wells"}, "street_name": {"Alley", "Avenue", "Branch", "Bridge", "Brook", "Brooks", "Burg", "Burgs", "Bypass", "Camp", "Canyon", "Cape", "Causeway", "Center", "Centers", "Circle", "Circles", "Cliff", "Cliffs", "Club", "Common", "Corner", "Corners", "Course", "Court", "Courts", "Cove", "Coves", "Creek", "Crescent", "Crest", "Crossing", "Crossroad", "Curve", "Dale", "Dam", "Divide", "Drive", "Drive", "Drives", "Estate", "Estates", "Expressway", "Extension", "Extensions", "Fall", "Falls", "Ferry", "Field", "Fields", "Flat", "Flats", "Ford", "Fords", "Forest", "Forge", "Forges", "Fork", "Forks", "Fort", "Freeway", "Garden", "Gardens", "Gateway", "Glen", "Glens", "Green", "Greens", "Grove", "Groves", "Harbor", "Harbors", "Haven", "Heights", "Highway", "Hill", "Hills", "Hollow", "Inlet", "Inlet", "Island", "Island", "Islands", "Islands", "Isle", "Isle", "Junction", "Junctions", "Key", "Keys", "Knoll", "Knolls", "Lake", "Lakes", "Land", "Landing", "Lane", "Light", "Lights", "Loaf", "Lock", "Locks", "Locks", "Lodge", "Lodge", "Loop", "Mall", "Manor", "Manors", "Meadow", "Meadows", "Mews", "Mill", "Mills", "Mission", "Mission", "Motorway", "Mount", "Mountain", "Mountain", "Mountains", "Mountains", "Neck", "Orchard", "Oval", "Overpass", "Park", "Parks", "Parkway", "Parkways", "Pass", "Passage", "Path", "Pike", "Pine", "Pines", "Place", "Plain", "Plains", "Plains", "Plaza", "Plaza", "Point", "Points", "Port", "Port", "Ports", "Ports", "Prairie", "Prairie", "Radial", "Ramp", "Ranch", "Rapid", "Rapids", "Rest", "Ridge", "Ridges", "River", "Road", "Road", "Roads", "Roads", "Route", "Row", "Rue", "Run", "Shoal", "Shoals", "Shore", "Shores", "Skyway", "Spring", "Springs", "Springs", "Spur", "Spurs", "Square", "Square", "Squares", "Squares", "Station", "Station", "Stravenue", "Stravenue", "Stream", "Stream", "Street", "Street", "Streets", "Summit", "Summit", "Terrace", "Throughway", "Trace", "Track", "Trafficway", "Trail", "Trail", "Tunnel", "Tunnel", "Turnpike", "Turnpike", "Underpass", "Union", "Unions", "Valley", "Valleys", "Via", "Viaduct", "View", "Views", "Village", "Village", "Villages", "Ville", "Vista", "Vista", "Walk", "Walks", "Wall", "Way", "Ways", "Well", "Wells"},
"street_suffix": {"town", "ton", "land", "ville", "berg", "burgh", "borough", "bury", "view", "port", "mouth", "stad", "furt", "chester", "mouth", "fort", "haven", "side", "shire"}, "street_suffix": {"town", "ton", "land", "ville", "berg", "burgh", "borough", "bury", "view", "port", "mouth", "stad", "furt", "chester", "mouth", "fort", "haven", "side", "shire"},
"unit": {"Apt", "Apartment", "Suite", "Ste", "Unit", "Floor", "Fl", "Room", "Rm", "Office", "Ofc", "Studio", "Loft", "Penthouse", "Ph"},
"city": {"New York City", "Los Angeles", "Chicago", "Houston", "Philadelphia", "Phoenix", "San Antonio", "San Diego", "Dallas", "San Jose", "Austin", "Jacksonville", "Indianapolis", "San Francisco", "Columbus", "Fort Worth", "Charlotte", "Detroit", "El Paso", "Memphis", "Boston", "Seattle", "Denver", "Washington", "Nashville-Davidson", "Baltimore", "Louisville/Jefferson", "Portland", "Oklahoma", "Milwaukee", "Las Vegas", "Albuquerque", "Tucson", "Fresno", "Sacramento", "Long Beach", "Kansas", "Mesa", "Virginia Beach", "Atlanta", "Colorado Springs", "Raleigh", "Omaha", "Miami", "Oakland", "Tulsa", "Minneapolis", "Cleveland", "Wichita", "Arlington", "New Orleans", "Bakersfield", "Tampa", "Honolulu", "Anaheim", "Aurora", "Santa Ana", "St. Louis", "Riverside", "Corpus Christi", "Pittsburgh", "Lexington-Fayette", "Stockton", "Cincinnati", "St. Paul", "Toledo", "Newark", "Greensboro", "Plano", "Henderson", "Lincoln", "Buffalo", "Fort Wayne", "Jersey", "Chula Vista", "Orlando", "St. Petersburg", "Norfolk", "Chandler", "Laredo", "Madison", "Durham", "Lubbock", "Winston-Salem", "Garland", "Glendale", "Hialeah", "Reno", "Baton Rouge", "Irvine", "Chesapeake", "Irving", "Scottsdale", "North Las Vegas", "Fremont", "San Bernardino", "Boise", "Birmingham"}, "city": {"New York City", "Los Angeles", "Chicago", "Houston", "Philadelphia", "Phoenix", "San Antonio", "San Diego", "Dallas", "San Jose", "Austin", "Jacksonville", "Indianapolis", "San Francisco", "Columbus", "Fort Worth", "Charlotte", "Detroit", "El Paso", "Memphis", "Boston", "Seattle", "Denver", "Washington", "Nashville-Davidson", "Baltimore", "Louisville/Jefferson", "Portland", "Oklahoma", "Milwaukee", "Las Vegas", "Albuquerque", "Tucson", "Fresno", "Sacramento", "Long Beach", "Kansas", "Mesa", "Virginia Beach", "Atlanta", "Colorado Springs", "Raleigh", "Omaha", "Miami", "Oakland", "Tulsa", "Minneapolis", "Cleveland", "Wichita", "Arlington", "New Orleans", "Bakersfield", "Tampa", "Honolulu", "Anaheim", "Aurora", "Santa Ana", "St. Louis", "Riverside", "Corpus Christi", "Pittsburgh", "Lexington-Fayette", "Stockton", "Cincinnati", "St. Paul", "Toledo", "Newark", "Greensboro", "Plano", "Henderson", "Lincoln", "Buffalo", "Fort Wayne", "Jersey", "Chula Vista", "Orlando", "St. Petersburg", "Norfolk", "Chandler", "Laredo", "Madison", "Durham", "Lubbock", "Winston-Salem", "Garland", "Glendale", "Hialeah", "Reno", "Baton Rouge", "Irvine", "Chesapeake", "Irving", "Scottsdale", "North Las Vegas", "Fremont", "San Bernardino", "Boise", "Birmingham"},
"state": {"Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"}, "state": {"Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"},
"state_abr": {"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "AE", "AA", "AP"}, "state_abr": {"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "AE", "AA", "AP"},

120
vendor/github.com/brianvoe/gofakeit/v7/data/airline.go generated vendored Normal file
View File

@ -0,0 +1,120 @@
package data
// Airline consists of various airline information
var Airline = map[string][]string{
"aircraft_type": {
"narrowbody",
"widebody",
"regional",
},
"airplane": {
"Airbus A220", "Airbus A319", "Airbus A320", "Airbus A321", "Airbus A330",
"Airbus A340", "Airbus A350", "Airbus A380",
"Boeing 717", "Boeing 737", "Boeing 747", "Boeing 757", "Boeing 767",
"Boeing 777", "Boeing 787",
"Embraer E170", "Embraer E175", "Embraer E190", "Embraer E195",
"Bombardier CRJ200", "Bombardier CRJ700", "Bombardier CRJ900", "Bombardier CRJ1000",
"ATR 42", "ATR 72",
"De Havilland Dash 8",
"McDonnell Douglas MD-80", "McDonnell Douglas MD-90",
},
"airport": {
"Hartsfield-Jackson Atlanta International Airport",
"Los Angeles International Airport",
"O'Hare International Airport",
"Dallas/Fort Worth International Airport",
"Denver International Airport",
"John F. Kennedy International Airport",
"San Francisco International Airport",
"Seattle-Tacoma International Airport",
"McCarran International Airport",
"Orlando International Airport",
"Miami International Airport",
"Charlotte Douglas International Airport",
"Newark Liberty International Airport",
"Phoenix Sky Harbor International Airport",
"George Bush Intercontinental Airport",
"Minneapolis-St Paul International Airport",
"Detroit Metropolitan Airport",
"Boston Logan International Airport",
"Fort Lauderdale-Hollywood International Airport",
"Philadelphia International Airport",
"LaGuardia Airport",
"Baltimore/Washington International Airport",
"Salt Lake City International Airport",
"Ronald Reagan Washington National Airport",
"Midway International Airport",
"San Diego International Airport",
"Tampa International Airport",
"Portland International Airport",
"Honolulu International Airport",
"Austin-Bergstrom International Airport",
"Nashville International Airport",
"Raleigh-Durham International Airport",
"Sacramento International Airport",
"Kansas City International Airport",
"Cleveland Hopkins International Airport",
"Indianapolis International Airport",
"San Jose International Airport",
"Cincinnati/Northern Kentucky International Airport",
"Pittsburgh International Airport",
"St. Louis Lambert International Airport",
"Heathrow Airport",
"Charles de Gaulle Airport",
"Dubai International Airport",
"Tokyo Haneda Airport",
"Los Angeles International Airport",
"Frankfurt Airport",
"Istanbul Airport",
"Guangzhou Baiyun International Airport",
"Amsterdam Airport Schiphol",
"Hong Kong International Airport",
"Singapore Changi Airport",
"Incheon International Airport",
"Shanghai Pudong International Airport",
"Munich Airport",
"Barcelona-El Prat Airport",
"Sydney Kingsford Smith Airport",
"Toronto Pearson International Airport",
"Vancouver International Airport",
"Zurich Airport",
"Vienna International Airport",
"Brussels Airport",
"Copenhagen Airport",
"Stockholm Arlanda Airport",
"Oslo Airport",
"Helsinki-Vantaa Airport",
"Athens International Airport",
"Rome Fiumicino Airport",
"Milan Malpensa Airport",
"Madrid-Barajas Airport",
"Lisbon Portela Airport",
"Dublin Airport",
"Manchester Airport",
"Edinburgh Airport",
"Melbourne Airport",
"Brisbane Airport",
"Auckland Airport",
"Johannesburg O.R. Tambo International Airport",
"Cairo International Airport",
"Nairobi Jomo Kenyatta International Airport",
"São Paulo-Guarulhos International Airport",
"Mexico City International Airport",
"Buenos Aires Ezeiza International Airport",
"Santiago International Airport",
"Lima Jorge Chávez International Airport",
"Bogotá El Dorado International Airport",
"Panama City Tocumen International Airport",
},
"iata": {
"ATL", "LAX", "ORD", "DFW", "DEN", "JFK", "SFO", "SEA", "LAS", "MCO",
"MIA", "CLT", "EWR", "PHX", "IAH", "MSP", "DTW", "BOS", "FLL", "PHL",
"LGA", "BWI", "SLC", "DCA", "MDW", "SAN", "TPA", "PDX", "HNL", "AUS",
"BNA", "RDU", "SMF", "MCI", "CLE", "IND", "SJC", "CVG", "PIT", "STL",
"LHR", "CDG", "DXB", "HND", "FRA", "IST", "CAN", "AMS", "HKG", "SIN",
"ICN", "PVG", "MUC", "BCN", "SYD", "YYZ", "YVR", "ZRH", "VIE", "BRU",
"CPH", "ARN", "OSL", "HEL", "ATH", "FCO", "MXP", "MAD", "LIS", "DUB",
"MAN", "EDI", "MEL", "BNE", "AKL", "JNB", "CAI", "NBO", "GRU", "MEX",
"EZE", "SCL", "LIM", "BOG", "PTY",
},
}

35
vendor/github.com/brianvoe/gofakeit/v7/data/auth.go generated vendored Normal file
View File

@ -0,0 +1,35 @@
package data
// Aut
var Auth = map[string][]string{
"username": {
"{firstname}{number:0,9999}",
"{lastname}{number:0,9999}",
"{firstname}.{lastname}",
"{firstname}_{lastname}",
"{adjective}{animal}",
"{color}{animal}",
"{firstname}{lastname}",
"the{lastname}",
"mr{lastname}",
"ms{lastname}",
"dr{lastname}",
"{petname}{number:0,999}",
"{noun}{number:0,999}",
"{adjective}_{noun}",
"{color}_{noun}",
"{animal}_{number:10,99}",
"{animal}.{number:10,99}",
"{gamertag}",
"{gamertag}{number:0,99}",
"{firstname}{adjective}",
"{adjective}{firstname}",
"{firstname}{color}",
"{city}{number:0,99}",
"{programminglanguage}{number:0,999}",
"{jobtitle}{number:0,999}",
"{firstname}###",
"{lastname}_???",
"{firstname}.{number:10,99}",
},
}

67
vendor/github.com/brianvoe/gofakeit/v7/data/bank.go generated vendored Normal file
View File

@ -0,0 +1,67 @@
package data
var Bank = map[string][]string{
"name": {
"Agricultural Bank of China",
"BNP Paribas",
"Banco Bilbao Vizcaya Argentaria",
"Banco Santander",
"Bank of America",
"Bank of China",
"Bank of Communications",
"Barclays",
"Capital One Financial Corporation",
"China Citic Bank",
"China Construction Bank Corporation",
"China Everbright Bank",
"China Merchants Bank",
"China Minsheng Bank",
"Citigroup",
"Commonwealth Bank Group",
"Credit Agricole Group",
"Credit Mutuel",
"Deutsche Bank",
"Goldman Sachs",
"Groupe BPCE",
"HDFC Bank",
"HSBC Holdings",
"Hua Xia Bank",
"ING Group",
"Industrial Bank",
"Industrial and Commercial Bank of China",
"Intesa Sanpaolo",
"JP Morgan Chase & Co",
"Lloyds Banking Group",
"Mitsubishi UFJ Financial Group",
"Mizuho Financial Group",
"Morgan Stanley",
"PNC Financial Services Group",
"Ping An Bank",
"Postal Savings Bank of China",
"Rabobank Group",
"Royal Bank of Canada",
"Sberbank",
"Scotiabank",
"Shanghai Pudong Development Bank",
"Societe Generale",
"State Bank of India",
"Sumitomo Mitsui Financial Group",
"Toronto Dominion Bank",
"Truist Bank",
"UBS",
"US Bancorp",
"UniCredit",
"Wells Fargo & Co",
},
"type": {
"Central Bank",
"Commercial Bank",
"Cooperative Bank",
"Investment Bank",
"Online Bank",
"Policy Bank",
"Private Bank",
"Retail Bank",
"Savings Bank",
},
}

View File

@ -2,6 +2,6 @@ package data
// Currency consists of currency information // Currency consists of currency information
var Currency = map[string][]string{ var Currency = map[string][]string{
"short": {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZWD"}, "short": {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZWL"},
"long": {"United Arab Emirates Dirham", "Afghanistan Afghani", "Albania Lek", "Armenia Dram", "Netherlands Antilles Guilder", "Angola Kwanza", "Argentina Peso", "Australia Dollar", "Aruba Guilder", "Azerbaijan New Manat", "Bosnia and Herzegovina Convertible Marka", "Barbados Dollar", "Bangladesh Taka", "Bulgaria Lev", "Bahrain Dinar", "Burundi Franc", "Bermuda Dollar", "Brunei Darussalam Dollar", "Bolivia Boliviano", "Brazil Real", "Bahamas Dollar", "Bhutan Ngultrum", "Botswana Pula", "Belarus Ruble", "Belize Dollar", "Canada Dollar", "Congo/Kinshasa Franc", "Switzerland Franc", "Chile Peso", "China Yuan Renminbi", "Colombia Peso", "Costa Rica Colon", "Cuba Convertible Peso", "Cuba Peso", "Cape Verde Escudo", "Czech Republic Koruna", "Djibouti Franc", "Denmark Krone", "Dominican Republic Peso", "Algeria Dinar", "Egypt Pound", "Eritrea Nakfa", "Ethiopia Birr", "Euro Member Countries", "Fiji Dollar", "Falkland Islands (Malvinas) Pound", "United Kingdom Pound", "Georgia Lari", "Guernsey Pound", "Ghana Cedi", "Gibraltar Pound", "Gambia Dalasi", "Guinea Franc", "Guatemala Quetzal", "Guyana Dollar", "Hong Kong Dollar", "Honduras Lempira", "Croatia Kuna", "Haiti Gourde", "Hungary Forint", "Indonesia Rupiah", "Israel Shekel", "Isle of Man Pound", "India Rupee", "Iraq Dinar", "Iran Rial", "Iceland Krona", "Jersey Pound", "Jamaica Dollar", "Jordan Dinar", "Japan Yen", "Kenya Shilling", "Kyrgyzstan Som", "Cambodia Riel", "Comoros Franc", "Korea (North) Won", "Korea (South) Won", "Kuwait Dinar", "Cayman Islands Dollar", "Kazakhstan Tenge", "Laos Kip", "Lebanon Pound", "Sri Lanka Rupee", "Liberia Dollar", "Lesotho Loti", "Lithuania Litas", "Libya Dinar", "Morocco Dirham", "Moldova Leu", "Madagascar Ariary", "Macedonia Denar", "Myanmar (Burma) Kyat", "Mongolia Tughrik", "Macau Pataca", "Mauritania Ouguiya", "Mauritius Rupee", "Maldives (Maldive Islands) Rufiyaa", "Malawi Kwacha", "Mexico Peso", "Malaysia Ringgit", "Mozambique Metical", "Namibia Dollar", "Nigeria Naira", "Nicaragua Cordoba", "Norway Krone", "Nepal Rupee", "New Zealand Dollar", "Oman Rial", "Panama Balboa", "Peru Nuevo Sol", "Papua New Guinea Kina", "Philippines Peso", "Pakistan Rupee", "Poland Zloty", "Paraguay Guarani", "Qatar Riyal", "Romania New Leu", "Serbia Dinar", "Russia Ruble", "Rwanda Franc", "Saudi Arabia Riyal", "Solomon Islands Dollar", "Seychelles Rupee", "Sudan Pound", "Sweden Krona", "Singapore Dollar", "Saint Helena Pound", "Sierra Leone Leone", "Somalia Shilling", "Seborga Luigino", "Suriname Dollar", "São Tomé and Príncipe Dobra", "El Salvador Colon", "Syria Pound", "Swaziland Lilangeni", "Thailand Baht", "Tajikistan Somoni", "Turkmenistan Manat", "Tunisia Dinar", "Tonga Pa'anga", "Turkey Lira", "Trinidad and Tobago Dollar", "Tuvalu Dollar", "Taiwan New Dollar", "Tanzania Shilling", "Ukraine Hryvnia", "Uganda Shilling", "United States Dollar", "Uruguay Peso", "Uzbekistan Som", "Venezuela Bolivar", "Viet Nam Dong", "Vanuatu Vatu", "Samoa Tala", "Communauté Financière Africaine (BEAC) CFA Franc BEAC", "East Caribbean Dollar", "International Monetary Fund (IMF) Special Drawing Rights", "Communauté Financière Africaine (BCEAO) Franc", "Comptoirs Français du Pacifique (CFP) Franc", "Yemen Rial", "South Africa Rand", "Zambia Kwacha", "Zimbabwe Dollar"}, "long": {"United Arab Emirates Dirham", "Afghanistan Afghani", "Albania Lek", "Armenia Dram", "Netherlands Antilles Guilder", "Angola Kwanza", "Argentina Peso", "Australia Dollar", "Aruba Guilder", "Azerbaijan New Manat", "Bosnia and Herzegovina Convertible Marka", "Barbados Dollar", "Bangladesh Taka", "Bulgaria Lev", "Bahrain Dinar", "Burundi Franc", "Bermuda Dollar", "Brunei Darussalam Dollar", "Bolivia Boliviano", "Brazil Real", "Bahamas Dollar", "Bhutan Ngultrum", "Botswana Pula", "Belarus Ruble", "Belize Dollar", "Canada Dollar", "Congo/Kinshasa Franc", "Switzerland Franc", "Chile Peso", "China Yuan Renminbi", "Colombia Peso", "Costa Rica Colon", "Cuba Convertible Peso", "Cuba Peso", "Cape Verde Escudo", "Czech Republic Koruna", "Djibouti Franc", "Denmark Krone", "Dominican Republic Peso", "Algeria Dinar", "Egypt Pound", "Eritrea Nakfa", "Ethiopia Birr", "Euro Member Countries", "Fiji Dollar", "Falkland Islands (Malvinas) Pound", "United Kingdom Pound", "Georgia Lari", "Ghana Cedi", "Gibraltar Pound", "Gambia Dalasi", "Guinea Franc", "Guatemala Quetzal", "Guyana Dollar", "Hong Kong Dollar", "Honduras Lempira", "Haiti Gourde", "Hungary Forint", "Indonesia Rupiah", "Israel Shekel", "India Rupee", "Iraq Dinar", "Iran Rial", "Iceland Krona", "Jamaica Dollar", "Jordan Dinar", "Japan Yen", "Kenya Shilling", "Kyrgyzstan Som", "Cambodia Riel", "Comoros Franc", "Korea (North) Won", "Korea (South) Won", "Kuwait Dinar", "Cayman Islands Dollar", "Kazakhstan Tenge", "Laos Kip", "Lebanon Pound", "Sri Lanka Rupee", "Liberia Dollar", "Lesotho Loti", "Libya Dinar", "Morocco Dirham", "Moldova Leu", "Madagascar Ariary", "Macedonia Denar", "Myanmar (Burma) Kyat", "Mongolia Tughrik", "Macau Pataca", "Mauritania Ouguiya", "Mauritius Rupee", "Maldives (Maldive Islands) Rufiyaa", "Malawi Kwacha", "Mexico Peso", "Malaysia Ringgit", "Mozambique Metical", "Namibia Dollar", "Nigeria Naira", "Nicaragua Cordoba", "Norway Krone", "Nepal Rupee", "New Zealand Dollar", "Oman Rial", "Panama Balboa", "Peru Nuevo Sol", "Papua New Guinea Kina", "Philippines Peso", "Pakistan Rupee", "Poland Zloty", "Paraguay Guarani", "Qatar Riyal", "Romania New Leu", "Serbia Dinar", "Russia Ruble", "Rwanda Franc", "Saudi Arabia Riyal", "Solomon Islands Dollar", "Seychelles Rupee", "Sudan Pound", "Sweden Krona", "Singapore Dollar", "Saint Helena Pound", "Sierra Leone Leone", "Somalia Shilling", "Suriname Dollar", "São Tomé and Príncipe Dobra", "El Salvador Colon", "Syria Pound", "Swaziland Lilangeni", "Thailand Baht", "Tajikistan Somoni", "Turkmenistan Manat", "Tunisia Dinar", "Tonga Pa'anga", "Turkey Lira", "Trinidad and Tobago Dollar", "Taiwan New Dollar", "Tanzania Shilling", "Ukraine Hryvnia", "Uganda Shilling", "United States Dollar", "Uruguay Peso", "Uzbekistan Som", "Venezuela Bolivar", "Viet Nam Dong", "Vanuatu Vatu", "Samoa Tala", "Communauté Financière Africaine (BEAC) CFA Franc BEAC", "East Caribbean Dollar", "International Monetary Fund (IMF) Special Drawing Rights", "Communauté Financière Africaine (BCEAO) Franc", "Comptoirs Français du Pacifique (CFP) Franc", "Yemen Rial", "South Africa Rand", "Zambia Kwacha", "Zimbabwe Dollar"},
} }

View File

@ -3,7 +3,9 @@ package data
// Data consists of the main set of fake information // Data consists of the main set of fake information
var Data = map[string]map[string][]string{ var Data = map[string]map[string][]string{
"person": Person, "person": Person,
"auth": Auth,
"address": Address, "address": Address,
"airline": Airline,
"company": Company, "company": Company,
"job": Job, "job": Job,
"lorem": Lorem, "lorem": Lorem,
@ -22,7 +24,7 @@ var Data = map[string]map[string][]string{
"car": Car, "car": Car,
"emoji": Emoji, "emoji": Emoji,
"word": Word, "word": Word,
"sentence": Sentence, "text": Text,
"food": Food, "food": Food,
"minecraft": Minecraft, "minecraft": Minecraft,
"celebrity": Celebrity, "celebrity": Celebrity,
@ -31,7 +33,9 @@ var Data = map[string]map[string][]string{
"book": Books, "book": Books,
"movie": Movies, "movie": Movies,
"school": School, "school": School,
"song": Songs,
"product": Product, "product": Product,
"bank": Bank,
} }
func List() map[string][]string { func List() map[string][]string {

File diff suppressed because it is too large Load Diff

View File

@ -3,4 +3,117 @@ package data
// Hipster consists of random hipster words // Hipster consists of random hipster words
var Hipster = map[string][]string{ var Hipster = map[string][]string{
"word": {"Wes Anderson", "chicharrones", "narwhal", "food truck", "marfa", "aesthetic", "keytar", "art party", "sustainable", "forage", "mlkshk", "gentrify", "locavore", "swag", "hoodie", "microdosing", "VHS", "before they sold out", "pabst", "plaid", "Thundercats", "freegan", "scenester", "hella", "occupy", "truffaut", "raw denim", "beard", "post-ironic", "photo booth", "twee", "90's", "pitchfork", "cray", "cornhole", "kale chips", "pour-over", "yr", "five dollar toast", "kombucha", "you probably haven't heard of them", "mustache", "fixie", "try-hard", "franzen", "kitsch", "austin", "stumptown", "keffiyeh", "whatever", "tumblr", "DIY", "shoreditch", "biodiesel", "vegan", "pop-up", "banjo", "kogi", "cold-pressed", "letterpress", "chambray", "butcher", "synth", "trust fund", "hammock", "farm-to-table", "intelligentsia", "loko", "ugh", "offal", "poutine", "gastropub", "Godard", "jean shorts", "sriracha", "dreamcatcher", "leggings", "fashion axe", "church-key", "meggings", "tote bag", "disrupt", "readymade", "helvetica", "flannel", "meh", "roof", "hashtag", "knausgaard", "cronut", "schlitz", "green juice", "waistcoat", "normcore", "viral", "ethical", "actually", "fingerstache", "humblebrag", "deep v", "wayfarers", "tacos", "taxidermy", "selvage", "put a bird on it", "ramps", "portland", "retro", "kickstarter", "bushwick", "brunch", "distillery", "migas", "flexitarian", "XOXO", "small batch", "messenger bag", "heirloom", "tofu", "bicycle rights", "bespoke", "salvia", "wolf", "selfies", "echo", "park", "listicle", "craft beer", "chartreuse", "sartorial", "pinterest", "mumblecore", "kinfolk", "vinyl", "etsy", "umami", "8-bit", "polaroid", "banh mi", "crucifix", "bitters", "brooklyn", "PBR&B", "drinking", "vinegar", "squid", "tattooed", "skateboard", "vice", "authentic", "literally", "lomo", "celiac", "health", "goth", "artisan", "chillwave", "blue bottle", "pickled", "next level", "neutra", "organic", "Yuccie", "paleo", "blog", "single-origin coffee", "seitan", "street", "gluten-free", "mixtape", "venmo", "irony", "everyday", "carry", "slow-carb", "3 wolf moon", "direct trade", "lo-fi", "tousled", "tilde", "semiotics", "cred", "chia", "master", "cleanse", "ennui", "quinoa", "pug", "iPhone", "fanny pack", "cliche", "cardigan", "asymmetrical", "meditation", "YOLO", "typewriter", "pork belly", "shabby chic", "+1", "lumbersexual", "williamsburg"}, "word": {"Wes Anderson", "chicharrones", "narwhal", "food truck", "marfa", "aesthetic", "keytar", "art party", "sustainable", "forage", "mlkshk", "gentrify", "locavore", "swag", "hoodie", "microdosing", "VHS", "before they sold out", "pabst", "plaid", "Thundercats", "freegan", "scenester", "hella", "occupy", "truffaut", "raw denim", "beard", "post-ironic", "photo booth", "twee", "90's", "pitchfork", "cray", "cornhole", "kale chips", "pour-over", "yr", "five dollar toast", "kombucha", "you probably haven't heard of them", "mustache", "fixie", "try-hard", "franzen", "kitsch", "austin", "stumptown", "keffiyeh", "whatever", "tumblr", "DIY", "shoreditch", "biodiesel", "vegan", "pop-up", "banjo", "kogi", "cold-pressed", "letterpress", "chambray", "butcher", "synth", "trust fund", "hammock", "farm-to-table", "intelligentsia", "loko", "ugh", "offal", "poutine", "gastropub", "Godard", "jean shorts", "sriracha", "dreamcatcher", "leggings", "fashion axe", "church-key", "meggings", "tote bag", "disrupt", "readymade", "helvetica", "flannel", "meh", "roof", "hashtag", "knausgaard", "cronut", "schlitz", "green juice", "waistcoat", "normcore", "viral", "ethical", "actually", "fingerstache", "humblebrag", "deep v", "wayfarers", "tacos", "taxidermy", "selvage", "put a bird on it", "ramps", "portland", "retro", "kickstarter", "bushwick", "brunch", "distillery", "migas", "flexitarian", "XOXO", "small batch", "messenger bag", "heirloom", "tofu", "bicycle rights", "bespoke", "salvia", "wolf", "selfies", "echo", "park", "listicle", "craft beer", "chartreuse", "sartorial", "pinterest", "mumblecore", "kinfolk", "vinyl", "etsy", "umami", "8-bit", "polaroid", "banh mi", "crucifix", "bitters", "brooklyn", "PBR&B", "drinking", "vinegar", "squid", "tattooed", "skateboard", "vice", "authentic", "literally", "lomo", "celiac", "health", "goth", "artisan", "chillwave", "blue bottle", "pickled", "next level", "neutra", "organic", "Yuccie", "paleo", "blog", "single-origin coffee", "seitan", "street", "gluten-free", "mixtape", "venmo", "irony", "everyday", "carry", "slow-carb", "3 wolf moon", "direct trade", "lo-fi", "tousled", "tilde", "semiotics", "cred", "chia", "master", "cleanse", "ennui", "quinoa", "pug", "iPhone", "fanny pack", "cliche", "cardigan", "asymmetrical", "meditation", "YOLO", "typewriter", "pork belly", "shabby chic", "+1", "lumbersexual", "williamsburg"},
"sentence": {
// ultra-short / taglines
"{hipsterword} vibes only.",
"deeply {hipsterword}.",
"casually {hipsterword}.",
"endlessly {hipsterword}.",
"pure {hipsterword} energy.",
"very {hipsterword}, very {hipsterword}.",
"{hipsterword} meets {hipsterword}.",
"low-fi {hipsterword}.",
"post-{hipsterword} mood.",
"tastefully {hipsterword}.",
// one-liners
"living that {hipsterword} life.",
"another day, another {hipsterword}.",
"strictly {hipsterword} palettes.",
"hand-picked {hipsterword}.",
"soft {hipsterword} glow in {city}.",
"from {city} with {hipsterword}.",
"born in {city}, raised on {hipsterword}.",
"powered by {hipsterword} and {hipsterword}.",
"mildly obsessed with {hipsterword}.",
"just add {hipsterword}.",
// comparisons / mashups
"{hipsterword} meets {hipsterword} in {city}.",
"{hipsterword}, but make it {hipsterword}.",
"{hipsterword} × {hipsterword}, minimal edition.",
"{hipsterword} on the outside, {hipsterword} at heart.",
"somewhere between {hipsterword} and {hipsterword}.",
"{hipsterword} layered over {hipsterword}.",
"{hipsterword} with a hint of {hipsterword}.",
"heavy on {hipsterword}, light on {hipsterword}.",
"{hipsterword} > {hipsterword}, discuss.",
// scene setters
"weekends are for {hipsterword} and {beerstyle}.",
"late nights, {hipsterword} playlists, {songgenre} loops.",
"mornings in {city}, afternoons in {hipsterword}.",
"slow afternoons, {hipsterword} everything.",
"back alley {hipsterword}, side-door {hipsterword}.",
"under neon {color}, pure {hipsterword}.",
"rooftop in {city}, whispering {hipsterword}.",
"{hipsterword} at golden hour in {city}.",
"between {hipsterword} stalls and {hipsterword} pop-ups.",
// lifestyle / verbs
"{verb} through {hipsterword} alleys.",
"{verb} {noun} with {hipsterword} flair.",
"{verb} the {noun}, keep it {hipsterword}.",
"{verb} slowly; trust the {hipsterword}.",
"{verb} toward {hipsterword} minimalism.",
"{verb} and {verb}, always {hipsterword}.",
"let it be {hipsterword}, let it be {adjective}.",
// craft / food / drink
"small-batch {hipsterword} in {city}.",
"single-origin {hipsterword}, double {adjective}.",
"farm-to-table {hipsterword} and {noun}.",
"house {hipsterword} with a {adjective} finish.",
"cold {hipsterword}, warm {hipsterword}.",
"locally sourced {hipsterword}, globally {adjective}.",
"{hipsterword} tasting notes: {adjective}, {adjective}, {adjective}.",
"pairing {hipsterword} with {beerstyle}.",
// fashion / objects
"{color} threads, {hipsterword} cuts.",
"{hipsterword} layers over {adjective} basics.",
"{hipsterword} silhouettes, {adjective} textures.",
"{hipsterword} frames and {color} accents.",
"{hipsterword} tote with {noun} inside.",
"imperfect by design, perfectly {hipsterword}.",
// travel / place
"lost in {city}, found in {hipsterword}.",
"passport full of {hipsterword}.",
"{hipsterword} maps and {language} menus.",
"backstreets of {city}, front row {hipsterword}.",
"from {country} to {city}, chasing {hipsterword}.",
"tiny studio in {city}, big {hipsterword} dreams.",
// meta / attitude
"ironically {hipsterword}, sincerely {adjective}.",
"intentionally {hipsterword}.",
"unapologetically {hipsterword}.",
"quietly {hipsterword} since {number:2001,2020}.",
"probably too {hipsterword} for this.",
"you probably havent tried this {hipsterword}.",
"subtly {hipsterword}, never loud.",
// maker / work
"built with {hipsterword} and {hobby}.",
"shipping {hipsterword} from {city}.",
"{programminglanguage} by day, {hipsterword} by night.",
"{company} meets {hipsterword} ethos.",
"{productcategory} with {hipsterword} edges.",
"designing around {hipsterword} constraints.",
// music / film / culture
"{songgenre} loops with {hipsterword} undertones.",
"cinema nights, strictly {hipsterword}.",
"{hipsterword} soundtrack on repeat.",
"scored in {hipsterword}, mixed {adverb}.",
"directors cut: more {hipsterword}.",
// social / shareable
"tag it {hipsterword}, keep it {adjective}.",
"overheard in {city}: very {hipsterword}.",
"sent from a {hipsterword} corner of {city}.",
"friends dont let friends skip {hipsterword}.",
"if you know, its {hipsterword}.",
},
} }

View File

@ -8,4 +8,5 @@ var Internet = map[string][]string{
"http_version": {"HTTP/1.0", "HTTP/1.1", "HTTP/2.0"}, "http_version": {"HTTP/1.0", "HTTP/1.1", "HTTP/2.0"},
"http_status_simple": {"200", "301", "302", "400", "404", "500"}, "http_status_simple": {"200", "301", "302", "400", "404", "500"},
"http_status_general": {"100", "200", "201", "203", "204", "205", "301", "302", "304", "400", "401", "403", "404", "405", "406", "416", "500", "501", "502", "503", "504"}, "http_status_general": {"100", "200", "201", "203", "204", "205", "301", "302", "304", "400", "401", "403", "404", "405", "406", "416", "500", "501", "502", "503", "504"},
"api": {"curl/#.#.#", "python-requests/#.#.#", "PostmanRuntime/#.#.#", "Go-http-client/#.#", "Java/#.#.#_###", "node-fetch/#.#.#", "okhttp/#.#.#", "axios/#.#.#", "rest-client/#.#.#", "httpie/#.#.#", "wget/#.#.#", "apache-httpclient/#.#.##", "ruby/#.#.#", "php/#.#.#", "swift/#.#.#", "dotnet/#.#.#", "insomnia/####.#.#", "httpie-go/#.#.#", "httpx/#.##.#", "urllib3/#.##.##"},
} }

58
vendor/github.com/brianvoe/gofakeit/v7/data/isbn.go generated vendored Normal file
View File

@ -0,0 +1,58 @@
package data
// Prefixes for ISBN standards
const (
ISBN13Prefix = "978"
ISBN10Prefix = "979"
)
// ISBNRule defines a registrant rule range and its length
type ISBNRule struct {
Min string
Max string
Length int
}
// ISBNRules maps prefix -> registration group -> registrant rules
var ISBNRules = map[string]map[string][]ISBNRule{
ISBN13Prefix: {
"0": {
{Min: "0000000", Max: "1999999", Length: 2},
{Min: "2000000", Max: "2279999", Length: 3},
{Min: "2280000", Max: "2289999", Length: 4},
{Min: "2290000", Max: "6479999", Length: 3},
{Min: "6480000", Max: "6489999", Length: 7},
{Min: "6490000", Max: "6999999", Length: 3},
{Min: "7000000", Max: "8499999", Length: 4},
{Min: "8500000", Max: "8999999", Length: 5},
{Min: "9000000", Max: "9499999", Length: 6},
{Min: "9500000", Max: "9999999", Length: 7},
},
"1": {
{Min: "0000000", Max: "0999999", Length: 2},
{Min: "1000000", Max: "3999999", Length: 3},
{Min: "4000000", Max: "5499999", Length: 4},
{Min: "5500000", Max: "7319999", Length: 5},
{Min: "7320000", Max: "7399999", Length: 7},
{Min: "7400000", Max: "8697999", Length: 5},
{Min: "8698000", Max: "9729999", Length: 6},
{Min: "9730000", Max: "9877999", Length: 4},
{Min: "9878000", Max: "9989999", Length: 6},
{Min: "9990000", Max: "9999999", Length: 7},
},
},
ISBN10Prefix: {
"8": {
{Min: "0000000", Max: "1999999", Length: 2},
{Min: "2000000", Max: "2279999", Length: 3},
{Min: "2280000", Max: "2289999", Length: 4},
{Min: "2290000", Max: "6479999", Length: 3},
{Min: "6480000", Max: "6489999", Length: 7},
{Min: "6490000", Max: "6999999", Length: 3},
{Min: "7000000", Max: "8499999", Length: 4},
{Min: "8500000", Max: "8999999", Length: 5},
{Min: "9000000", Max: "9499999", Length: 6},
{Min: "9500000", Max: "9999999", Length: 7},
},
},
}

View File

@ -2,7 +2,66 @@ package data
// Job consists of job data // Job consists of job data
var Job = map[string][]string{ var Job = map[string][]string{
"title": {"Administrator", "Agent", "Analyst", "Architect", "Assistant", "Associate", "Consultant", "Coordinator", "Designer", "Developer", "Director", "Engineer", "Executive", "Facilitator", "Liaison", "Manager", "Officer", "Orchestrator", "Planner", "Producer", "Representative", "Specialist", "Strategist", "Supervisor", "Technician"}, "title": {
"descriptor": {"Central", "Chief", "Corporate", "Customer", "Direct", "District", "Dynamic", "Dynamic", "Forward", "Future", "Global", "Human", "Internal", "International", "Investor", "Lead", "Legacy", "National", "Principal", "Product", "Regional", "Senior"}, "Accountant", "Actor", "Acrobat", "Administrative Assistant", "Administrator",
"level": {"Accountability", "Accounts", "Applications", "Assurance", "Brand", "Branding", "Communications", "Configuration", "Creative", "Data", "Directives", "Division", "Factors", "Functionality", "Group", "Identity", "Implementation", "Infrastructure", "Integration", "Interactions", "Intranet", "Marketing", "Markets", "Metrics", "Mobility", "Operations", "Optimization", "Paradigm", "Program", "Quality", "Research", "Response", "Security", "Solutions", "Tactics", "Usability", "Web"}, "Animator", "Analyst", "Anesthesiologist", "Archaeologist", "Architect",
"Artist", "Astronomer", "Athletic Trainer", "Attorney", "Auditor",
"Baker", "Banker", "Barber", "Bartender", "Barista",
"Bellhop", "Biologist", "Blacksmith", "Bookkeeper", "Bouncer",
"Broker", "Bus Driver", "Butcher", "Camera Operator", "Carpenter",
"Cashier", "Chef", "Chemist", "Cleaner", "Coach",
"Comedian", "Computer Programmer", "Concierge", "Construction Worker", "Consultant",
"Contractor", "Cook", "Counselor", "Court Reporter", "Curator",
"Custodian", "Dancer", "Data Scientist", "Delivery Driver", "Dentist",
"Designer", "Detective", "Developer", "Dietitian", "Director",
"DJ", "Doctor", "Dog Walker", "Driver", "Electrician",
"Engineer", "Esthetician", "Executive", "Farmer", "Financial Advisor",
"Financial Planner", "Firefighter", "Fisher", "Flight Attendant", "Florist",
"Garbage Collector", "Gardener", "Geologist", "Graphic Designer", "Groundskeeper",
"Hairdresser", "Handyman", "Hostess", "Hotel Manager", "HVAC Technician",
"Illustrator", "Insurance Agent", "Interpreter", "Janitor", "Journalist",
"Judge", "Landscaper", "Lawyer", "Legal Assistant", "Librarian",
"Lifeguard", "Line Cook", "Loan Officer", "Mail Carrier", "Manager",
"Mason", "Massage Therapist", "Mechanic", "Musician", "Nail Technician",
"Network Administrator", "Nurse", "Nutritionist", "Occupational Therapist", "Optometrist",
"Painter", "Paralegal", "Paramedic", "Pharmacist", "Photographer",
"Physical Therapist", "Physician", "Pilot", "Plumber", "Police Officer",
"Principal", "Professor", "Programmer", "Psychologist", "Radiologist",
"Real Estate Agent", "Receptionist", "Referee", "Reporter", "Researcher",
"Retail Associate", "Roofer", "Sailor", "Sales Representative", "Scientist",
"Scrum Master", "Sculptor", "Secretary", "Security Guard", "Server",
"Singer", "Social Media Influencer", "Social Worker", "Software Engineer", "Sommelier",
"Sound Engineer", "Speech Therapist", "Stage Manager", "Statistician", "Steamer",
"Stock Clerk", "Store Manager", "Storyteller", "Stunt Performer", "Stylist",
"Substitute Teacher", "Surgeon", "Surveyor", "System Administrator", "Systems Analyst",
"Tailor", "Tattoo Artist", "Tax Preparer", "Taxi Driver", "Teacher",
"Technician", "Telemarketer", "Therapist", "Tiler", "Tour Guide",
"Toy Maker", "Traffic Controller", "Train Conductor", "Translator", "Travel Agent",
"Tutor", "Umpire", "Upholsterer", "Usher", "Valet",
"Vendor", "Veterinarian", "Video Editor", "Voice Actor", "Waiter",
"Watchmaker", "Web Developer", "Welder", "Window Washer", "Writer",
"Zookeeper",
},
"descriptor": {
"Assistant", "Associate", "Brand", "Business", "Central",
"Chief", "Client", "Corporate", "Customer", "Deputy",
"Direct", "District", "Division", "Dynamic", "Executive",
"Finance", "Financial", "Forward", "Future", "Global",
"Group", "Head", "Human", "Internal", "International",
"Investor", "Junior", "Lead", "Legacy", "Main",
"Marketing", "National", "Operations", "Primary", "Principal",
"Product", "Public", "Regional", "Sales", "Senior",
"Staff", "Strategic", "Systems", "Technical", "Technology",
"Vice",
},
"level": {
"Accountability", "Accounts", "Applications", "Assurance", "Brand",
"Branding", "Communications", "Configuration", "Creative", "Data",
"Directives", "Division", "Factors", "Functionality", "Group",
"Identity", "Implementation", "Infrastructure", "Integration", "Interactions",
"Intranet", "Marketing", "Markets", "Metrics", "Mobility",
"Operations", "Optimization", "Paradigm", "Program", "Quality",
"Research", "Response", "Security", "Solutions", "Tactics",
"Usability", "Web",
},
} }

File diff suppressed because one or more lines are too long

View File

@ -2,98 +2,380 @@ package data
var Product = map[string][]string{ var Product = map[string][]string{
"category": { "category": {
"electronics", "clothing", "home appliances", "furniture", "accessories", "air quality products", "appliances", "art supplies", "audio equipment",
"automotive parts", "beauty and personal care", "books", "sports equipment", "automotive accessories", "automotive parts", "baby products", "bath and shower products",
"toys and games", "outdoor gear", "pet supplies", "kitchenware", "bathroom accessories", "bathroom fixtures", "bedding and linens", "beverage accessories",
"health and wellness", "tools and hardware", "office supplies", "bicycles and accessories", "board games", "books", "cables and connectors",
"baby products", "jewelry", "home decor", "musical instruments", "cameras and photography", "camping gear", "car accessories", "care products",
"fitness equipment", "mobile phones", "computer accessories", "cameras and photography", "charging accessories", "cleaning supplies", "clothing", "clothing accessories",
"gardening supplies", "bedding and linens", "food and groceries", "party supplies", "coffee and tea products", "computer accessories", "cookware", "cosmetics",
"craft and diy supplies", "camping gear", "watches", "luggage and travel accessories", "craft and diy supplies", "decorative accessories", "dining furniture", "educational toys",
"board games", "art supplies", "stationery", "bath and shower products", "electronics", "entertainment systems", "exercise equipment", "fashion accessories",
"sunglasses", "educational toys", "headphones and earbuds", "sneakers and athletic shoes", "fitness equipment", "food preparation", "furniture", "gaming accessories",
"coffee and tea products", "bicycles and accessories", "cookware", "cosmetics", "gaming equipment", "gardening supplies", "gift items", "hair care products",
"home improvement", "pet food", "laptop bags and cases", "home security systems", "health and wellness", "heating and cooling", "home accessories", "home automation",
"musical accessories", "skincare products", "smart home devices", "home decor", "home improvement", "home organization", "home security systems",
"household essentials", "jewelry", "kitchen accessories", "kitchen appliances",
"kitchen tools", "kitchenware", "laptop bags and cases", "lighting",
"luggage and travel accessories", "makeup and cosmetics", "massage and relaxation",
"mobile phones", "musical accessories", "musical instruments", "office accessories",
"office furniture", "office supplies", "outdoor furniture", "outdoor gear",
"party supplies", "personal care", "pet accessories", "pet food",
"pet supplies", "power accessories", "safety and security", "seasonal decorations",
"skincare products", "smart home devices", "sneakers and athletic shoes",
"sports equipment", "storage and organization", "tableware", "tools and hardware",
"toys and games", "travel accessories", "utensils", "video equipment",
"watches", "water accessories", "window treatments", "wireless accessories",
}, },
"adjective": { "adjective": {
"bold", "swift", "pure", "smart", "fresh", "advanced", "aesthetic", "agile", "all-in-one", "alluring",
"cool", "sharp", "zen", "bright", "quick", "amazing", "ambitious", "ancient", "artistic", "athletic",
"robust", "sleek", "versatile", "innovative", "compact", "attractive", "authentic", "automatic", "awesome", "balanced",
"luxe", "modular", "precision", "stream", "beautiful", "best-selling", "bold", "brilliant", "bright",
"brisk", "budget-friendly", "calm", "capable", "champion",
"charming", "classic", "clean", "clever", "colorful",
"comfortable", "compact", "complete", "cool", "creative",
"crisp", "custom", "cutting-edge", "dazzling", "delicate",
"dependable", "designed", "digital", "durable", "dynamic",
"efficient", "elegant", "elite", "enduring", "energetic",
"enhanced", "essential", "exceptional", "exclusive", "expert",
"extraordinary", "fabulous", "fast", "fashionable", "favorite",
"feature-rich", "fine", "first-class", "flexible", "fresh",
"friendly", "genuine", "gifted", "glamorous", "glossy",
"graceful", "great", "handcrafted", "handy", "harmonious",
"high-end", "high-performance", "high-quality", "high-tech", "highly-rated",
"honest", "ideal", "impressive", "improved", "incredible",
"indispensable", "innovative", "inspiring", "integrated", "intelligent",
"intense", "intuitive", "invaluable", "invincible", "irresistible",
"lasting", "leading", "legendary", "lightweight", "luxe",
"luxurious", "magical", "magnificent", "majestic", "masterful",
"mighty", "minimalist", "modern", "modular", "multi-functional",
"natural", "neat", "new", "next-generation", "noble",
"optimized", "outstanding", "perfect", "performance", "polished",
"portable", "powerful", "practical", "precise", "precision",
"premium", "professional", "pure", "quality", "quick",
"quiet", "radiant", "rapid", "reliable", "remarkable",
"resilient", "responsive", "revolutionary", "robust", "rugged",
"seamless", "secure", "sensitive", "sharp", "sleek",
"smart", "smooth", "sophisticated", "special", "spectacular",
"speed", "splendid", "stainless", "stunning", "stream",
"streamlined", "strong", "sturdy", "stylish", "super",
"superior", "supreme", "swift", "tactical", "tasteful",
"technological", "terrific", "thrilling", "timeless", "top-rated",
"tough", "traditional", "transparent", "trendy", "trusted",
"ultimate", "ultra", "unbeatable", "unique", "universal",
"unmatched", "upgraded", "valuable", "versatile", "vibrant",
"victorious", "vigorous", "virtual", "vital", "zen",
}, },
"name": { "name": {
"phone", "laptop", "tablet", "watch", "camera", "adapter", "air conditioner", "air fryer", "air purifier", "alarm",
"headphones", "speaker", "drone", "car", "bike", "alarm clock", "alarm system", "amplifier", "antenna", "apron",
"appliance", "gadget", "tool", "toy", "game", "appliance", "armchair", "artificial intelligence device", "ashtray", "audio system",
"computer", "console", "smartwatch", "fitness tracker", "smart home device", "backpack", "bag", "baggage", "balcony", "ball",
"robot", "router", "television", "smart speaker", "vr headset", "band", "barbecue", "barometer", "barstool", "basket",
"earbuds", "printer", "mouse", "keyboard", "monitor", "bath mat", "bathroom scale", "bathroom vanity", "bathtub", "battery",
"microwave", "blender", "vacuum", "fan", "toaster", "beach chair", "beach towel", "bed", "bed frame", "bedding",
"clock", "lamp", "shaver", "scale", "thermometer", "bedside table", "bench", "bicycle", "bidet", "bike",
"fridge", "oven", "mixer", "iron", "hair dryer", "bin", "binoculars", "blanket", "blender", "blinds",
"fan", "scale", "thermostat", "router", "lightbulb", "bluetooth device", "board", "body scale", "book", "bookcase",
"bookend", "bookmark", "boot", "bottle", "bottle opener",
"bowl", "box", "bracelet", "bread maker", "briefcase",
"broom", "brush", "bucket", "bug zapper", "bulb",
"bumper", "bundle", "bunk bed", "burner", "cable",
"cabinet", "caddy", "calculator", "calendar", "camera",
"camping chair", "camping gear", "can opener", "candle", "candle holder",
"canister", "canopy", "car", "card", "card reader",
"carpet", "carrier", "cart", "case", "cash register",
"cassette player", "cast iron pan", "cat bed", "cat tree", "cd player",
"ceiling fan", "chair", "chandelier", "charger", "charging dock",
"charging pad", "charging station", "chest", "chest of drawers", "china cabinet",
"chip", "chopsticks", "christmas lights", "cigar cutter", "cigarette lighter",
"circuit breaker", "clamp", "clapper", "cleaning brush", "cleaning kit",
"clock", "closet", "clothes hanger", "clothesline", "clothing rack",
"coaster", "coat rack", "coffee grinder", "coffee maker", "coffee table",
"coffee warmer", "coin sorter", "colander", "comb", "comforter",
"compact disc", "compass", "computer", "console", "container",
"controller", "cookie jar", "cooker", "cooking pot", "cooking timer",
"cooler", "cork", "corkboard", "corkscrew", "corner shelf",
"cosmetic bag", "couch", "counter", "cover", "cradle",
"craft kit", "crayon", "credit card reader", "crock pot", "crystal",
"cup", "cupboard", "curtain", "curtain rod", "cushion",
"cutting board", "dartboard", "decorative pillow", "dehumidifier", "desk",
"desk lamp", "desk organizer", "detector", "dice", "dimmer",
"dining chair", "dining table", "dish", "dish rack", "dishwasher",
"display", "divider", "docking station", "dog bed", "dog bowl",
"door", "doorbell", "doorknob", "doormat", "doorstop",
"drawer", "dresser", "drill", "drink coaster", "drink dispenser",
"drone", "dry erase board", "dryer", "dumbbell", "duster",
"dv player", "dvd player", "earbuds", "earphones", "earplugs",
"egg timer", "electric blanket", "electric can opener", "electric kettle", "electric shaver",
"electric toothbrush", "emergency light", "envelope", "eraser", "espresso machine",
"ethernet cable", "exercise ball", "exercise bike", "exercise mat", "extension cord",
"eyeglasses", "eyeglasses case", "face mask", "fan", "faucet",
"fence", "file", "file cabinet", "filter", "fire alarm",
"fire extinguisher", "fireplace", "fireplace screen", "first aid kit", "fitness tracker",
"flash drive", "flashlight", "flat screen tv", "flip phone", "floor lamp",
"floor mat", "flooring", "flower pot", "fluorescent light", "fly swatter",
"food processor", "foot massager", "footrest", "frame", "freezer",
"fridge", "fruit bowl", "frying pan", "furnace", "game",
"game console", "gaming chair", "gaming desk", "gaming headset", "gaming keyboard",
"gaming mouse", "gaming monitor", "garage door opener", "garbage can", "garbage disposal",
"garden hose", "garden tool", "gate", "gauge", "generator",
"gift box", "gift card", "gift wrap", "glass", "glasses",
"glove", "glue", "goggles", "golf bag", "gps device",
"grater", "grill", "grill pan", "guitar", "guitar pick",
"hair brush", "hair clip", "hair dryer", "hair straightener", "hammer",
"handbag", "handheld vacuum", "hanger", "hard drive", "hat",
"headband", "headphones", "headrest", "heater", "heating pad",
"helmet", "herb garden", "high chair", "hinge", "hockey stick",
"hood", "hook", "hose", "humidifier", "ice bucket",
"ice cream maker", "ice maker", "ice pack", "ice tray", "id card",
"ink", "ink cartridge", "insect repellent", "iron", "ironing board",
"jack", "jacket", "jar", "jewelry box", "jewelry organizer",
"juicer", "jump rope", "kayak", "kettle", "key",
"key holder", "keyboard", "keychain", "keypad", "kitchen scale",
"kitchen timer", "kitchen towel", "knife", "knife block", "knife set",
"ladder", "lamp", "lamp shade", "laptop", "laptop bag",
"laptop case", "laptop stand", "laundry basket", "laundry detergent", "laundry hamper",
"lawn mower", "led light", "led strip", "letter opener", "level",
"license plate", "life jacket", "light", "light bulb", "light fixture",
"light switch", "lightbulb", "lighter", "lighthouse", "linen",
"lint roller", "lock", "locker", "loft bed", "luggage",
"luggage tag", "lunch box", "machine", "magazine rack", "magnet",
"magnifying glass", "mailbox", "makeup bag", "makeup brush", "makeup mirror",
"mannequin", "map", "marble", "marker", "mascara",
"mask", "mat", "match", "matchbox", "mattress",
"mattress pad", "mattress topper", "measuring cup", "measuring spoon", "meat thermometer",
"memory card", "memory foam pillow", "mesh", "microwave", "microwave cover",
"milk frother", "mirror", "mixer", "mobile phone", "monitor",
"monitor stand", "mop", "mop bucket", "mouse", "mouse pad",
"mousetrap", "mug", "multimeter", "music player", "nail",
"nail clipper", "nail file", "napkin", "napkin holder", "necklace",
"needle", "nesting table", "net", "network switch", "newspaper",
"night light", "nightstand", "notebook", "notepad", "nutcracker",
"office chair", "oil", "oil diffuser", "organizer", "ornament",
"outlet", "outlet cover", "oven", "oven mitt", "oven timer",
"overhead light", "pad", "paint", "paint brush", "paint roller",
"painting", "pan", "panel", "paper", "paper clip",
"paper shredder", "paper towel", "paper towel holder", "parking meter", "party favor",
"passport holder", "patio furniture", "pattern", "pc", "pedestal",
"pedestal fan", "pegboard", "pen", "pencil", "pencil case",
"pencil holder", "pencil sharpener", "pendant", "pendant light", "perfume",
"phone", "phone case", "phone charger", "phone holder", "phone stand",
"photo album", "photo frame", "picture", "picture frame", "pillow",
"pillow case", "pillow sham", "pin", "pipe", "pizza cutter",
"pizza pan", "pizza stone", "place mat", "planter", "plate",
"plate holder", "player", "pliers", "plug", "pocket knife",
"pod", "polish", "pool", "pool table", "popcorn maker",
"portable charger", "portable fan", "portable speaker", "poster", "pot",
"pot holder", "potato masher", "power bank", "power cord", "power strip",
"power supply", "printer", "projector", "projector screen", "purse",
"push pin", "puzzle", "quilt", "rack", "radio",
"rain gauge", "rake", "range hood", "razor", "reading light",
"recliner", "record player", "refrigerator", "remote", "remote control",
"resistance band", "rice cooker", "ring", "ring holder", "rivet",
"robot", "robot vacuum", "rocking chair", "roller", "rolling pin",
"room divider", "rope", "router", "rug", "ruler",
"safety pin", "salt shaker", "sander", "sandwich maker", "saucepan",
"scale", "scanner", "scarf", "scissors", "scoop",
"screw", "screwdriver", "scrub brush", "seal", "seating",
"security camera", "security system", "sensor", "serving tray", "sewing machine",
"shaver", "sheet", "shelf", "shelving unit", "shirt",
"shoe", "shoe organizer", "shoe rack", "shoelace", "shopping bag",
"shopping cart", "shower", "shower cap", "shower curtain", "shower head",
"shower rod", "shower stool", "shredder", "side table", "sieve",
"sink", "skateboard", "skewer", "ski", "skillet",
"sleep mask", "slipper", "slow cooker", "smart home device", "smart speaker",
"smart thermostat", "smartwatch", "smoke alarm", "smoke detector", "snap",
"snow shovel", "soap", "soap dispenser", "soap dish", "sofa",
"sofa bed", "sofa table", "solar panel", "solar power bank", "solar light",
"sound bar", "sound system", "spatula", "speaker", "spice rack",
"spoon", "spray bottle", "squeegee", "stain remover", "stand",
"stapler", "staples", "steamer", "step ladder", "step stool",
"stereo", "stethoscope", "stirrer", "stool", "storage",
"storage bin", "storage box", "storage container", "storage unit", "stove",
"strainer", "strap", "straw", "string", "string lights",
"stud finder", "suitcase", "sunglasses", "surge protector", "switch",
"table", "table cloth", "table lamp", "table runner", "tablet",
"tablet case", "tablet stand", "tack", "tag", "tape",
"tape measure", "tap", "target", "tarp", "task light",
"tea kettle", "tea set", "teapot", "teddy bear", "telephone",
"television", "television stand", "tennis racket", "tent", "thermometer",
"thermos", "thermostat", "thread", "throw", "throw pillow",
"tie", "tie rack", "timer", "tin", "tissue box",
"tissue holder", "toaster", "toaster oven", "toilet", "toilet brush",
"toilet paper", "toilet paper holder", "toilet seat", "tongs", "tool",
"tool box", "tool kit", "toothbrush", "toothbrush holder", "toothpaste",
"toothpick", "towel", "towel bar", "towel rack", "toy",
"toy box", "tracker", "tray", "treasure chest", "tree",
"trivet", "trophy", "trowel", "trunk", "tv",
"tv antenna", "tv mount", "tv remote", "tv stand", "umbrella",
"umbrella stand", "under bed storage", "usb cable", "usb drive", "usb hub",
"utensil", "utensil holder", "vacuum", "vacuum bag", "vacuum cleaner",
"vase", "vent", "video camera", "video game", "video player",
"vinyl player", "vr headset", "waffle maker", "wagon", "wall art",
"wall clock", "wall hook", "wall light", "wall mirror", "wall mount",
"wall outlet", "wall sconce", "wallet", "wardrobe", "washboard",
"washing machine", "waste basket", "watch", "watch band", "water bottle",
"water cooler", "water dispenser", "water filter", "water heater", "water pitcher",
"waterproof case", "webcam", "weighing scale", "wheel", "wheelbarrow",
"whisk", "whiteboard", "wick", "wifi extender", "wifi router",
"window", "window blind", "window curtain", "window screen", "window shade",
"wine bottle", "wine glass", "wine rack", "wire", "wireless charger",
"wireless earbuds", "wireless headphone", "wireless mouse", "wireless router", "wood",
"workbench", "wrench", "writing desk", "yoga block", "yoga mat",
"yoga strap", "zipper", "zone",
}, },
"feature": { "feature": {
"wireless", "smart", "eco-friendly", "advanced", "compact", "3d capable", "4k ready", "5g compatible", "adjustable", "advanced",
"high-performance", "energy-efficient", "portable", "durable", "stylish", "ai-powered", "anti-bacterial", "anti-fog", "anti-glare", "anti-slip",
"touchscreen", "water-resistant", "noise-canceling", "voice-controlled", "ultra-lightweight", "anti-static", "auto-adjusting", "auto-cleaning", "auto-focus", "auto-shutoff",
"multi-functional", "user-friendly", "fast-charging", "biometric", "gps-enabled", "automatic", "backlit", "battery-powered", "biometric", "bluetooth enabled",
"bluetooth ready", "built-in", "cable-free", "calibrated", "camera-enabled",
"certified", "child-safe", "cloud-connected", "color-changing", "compatible",
"compact", "connectable", "cordless", "customizable", "deep-cleaning",
"detachable", "digital", "dimming", "directional", "dishwasher-safe",
"dual-mode", "dual-purpose", "dust-proof", "easy-clean", "eco-friendly",
"edge-to-edge", "energy-efficient", "energy-saving", "enhanced", "ergonomic",
"expandable", "fast-charging", "fingerprint-resistant", "fire-resistant", "foldable",
"fragrance-free", "free-standing", "full-spectrum", "gps-enabled", "hands-free",
"hd ready", "heat-resistant", "high-capacity", "high-definition", "high-efficiency",
"high-performance", "high-speed", "high-tech", "holographic", "hybrid",
"impact-resistant", "indoor-outdoor", "infrared", "integrated", "interactive",
"ip-rated", "keyless", "led-backlit", "leak-proof", "long-lasting",
"low-energy", "low-maintenance", "magnetic", "maintenance-free", "memory-enabled",
"mesh-enabled", "microfiber", "microwave-safe", "motion-activated", "motion-sensing",
"multi-angle", "multi-color", "multi-functional", "multi-purpose", "multi-zone",
"network-ready", "noise-canceling", "noise-reducing", "non-stick", "odor-resistant",
"oil-resistant", "one-touch", "outdoor-rated", "overheat protection", "padded",
"palm-sized", "password-protected", "pet-friendly", "plug-and-play", "portable",
"precision", "premium", "pressure-sensitive", "programmable", "quick-release",
"quick-start", "radar-enabled", "rapid", "rechargeable", "remote-controlled",
"removable", "resistant", "retractable", "reusable", "rugged",
"rust-proof", "scratch-resistant", "self-adjusting", "self-cleaning", "self-contained",
"self-leveling", "sensor-enabled", "shock-absorbing", "shock-resistant", "smart",
"smartphone-compatible", "solar-powered", "sound-activated", "spill-proof", "splash-proof",
"stain-resistant", "steam-powered", "streaming-ready", "stylish", "submersible",
"tactile", "temperature-controlled", "tether-free", "time-delayed", "touch-activated",
"touchscreen", "ultra-compact", "ultra-fast", "ultra-lightweight", "ultra-quiet",
"ultra-slim", "ultrasonic", "underwater-capable", "upgradeable", "usb-powered",
"user-friendly", "ventilated", "vibration-resistant", "voice-activated", "voice-controlled",
"waterproof", "water-resistant", "weather-resistant", "weatherproof", "wi-fi enabled",
"wi-fi ready", "wireless", "wireless charging", "wrinkle-free", "zero-emission",
}, },
"material": { "material": {
"titanium", "carbon", "alloy", "bamboo", "leather", "abs plastic", "acrylic", "aluminum", "aluminum alloy", "aluminum oxide",
"glass", "ceramic", "aluminum", "stainless", "wood", "ash wood", "bamboo", "bauxite", "beech wood", "birch wood",
"plastic", "rubber", "silicon", "fabric", "paper", "brass", "bronze", "burlap", "canvas", "carbon",
"gold", "silver", "brass", "copper", "bronze", "carbon fiber", "carbon steel", "cardboard", "cashmere", "cast iron",
"chrome", "marble", "granite", "porcelain", "plexiglass", "cedar wood", "ceramic", "cherry wood", "chrome", "chromium",
"quartz", "felt", "suede", "clay", "cobalt", "composite", "concrete", "copper",
"cork", "cotton", "denim", "diamond", "ebony wood",
"enamel", "epoxy", "fabric", "faux leather", "faux suede",
"felt", "fiberglass", "foam", "galvanized steel", "gel",
"glass", "gold", "granite", "graphite", "hardwood",
"hemp", "iron", "jade", "jute", "kapok",
"lacquer", "laminate", "latex", "lead", "leather",
"limestone", "linen", "magnesium", "mahogany wood", "marble",
"mdf", "mesh", "metal", "microfiber", "mica",
"mineral", "molybdenum", "neoprene", "nickel", "nylon",
"oak wood", "obsidian", "onyx", "paper", "pearl",
"pewter", "pine wood", "plastic", "plexiglass", "plywood",
"polycarbonate", "polyester", "polyethylene", "polypropylene", "polystyrene",
"polyurethane", "porcelain", "pottery", "quartz", "rattan",
"rawhide", "resin", "rosewood", "rubber", "sapphire",
"satin", "silicone", "silk", "silver", "slate",
"softwood", "spandex", "stainless steel", "steel", "stone",
"styrofoam", "suede", "synthetic", "teak wood", "terracotta",
"textile", "tin", "titanium", "titanium alloy", "tungsten",
"twill", "velvet", "vinyl", "walnut wood", "wicker",
"wood", "wool", "zinc", "zirconium",
}, },
"suffix": { "suffix": {
"tech", "pro", "x", "plus", "elite", "ace", "active", "advanced", "air", "alpha",
"spark", "nexus", "nova", "fusion", "sync", "apex", "arc", "art", "aura", "axis",
"edge", "boost", "max", "link", "prime", "beast", "beta", "blaze", "boost", "brave",
"zoom", "pulse", "dash", "connect", "blaze", "bright", "burst", "catalyst", "charge", "classic",
"quantum", "spark", "vertex", "core", "flux", "connect", "core", "cosmic", "craft", "dash",
"turbo", "shift", "wave", "matrix", "delta", "design", "diamond", "digital", "drive",
"dynamic", "edge", "elite", "energy", "essence",
"evo", "ex", "excel", "express", "extreme",
"fire", "flex", "flow", "flux", "force",
"form", "forte", "fusion", "gen", "genesis",
"glide", "glow", "gold", "grand", "graph",
"gravity", "grid", "guard", "guide", "harmony",
"hero", "hub", "icon", "impact", "infinity",
"ion", "jet", "key", "kinetic", "lab",
"laser", "legend", "level", "light", "link",
"lite", "live", "logic", "loop", "lux",
"max", "matrix", "mega", "micro", "mind",
"mini", "mode", "motion", "move", "nexus",
"nova", "one", "optima", "orbit", "pace",
"peak", "phase", "pilot", "pixel", "plus",
"power", "premium", "prime", "pro", "pulse",
"quantum", "quest", "quick", "radiant", "rapid",
"ray", "rebel", "reign", "rise", "rush",
"scale", "scope", "sense", "shift", "signature",
"silver", "smart", "snap", "solo", "sonic",
"spark", "speed", "sphere", "spirit", "sport",
"star", "stream", "strike", "studio", "style",
"summit", "super", "surge", "sync", "tactical",
"tech", "terra", "thunder", "titan", "touch",
"tour", "trail", "trio", "trooper", "tropic",
"turbo", "ultra", "union", "unity", "vault",
"vector", "velocity", "vertex", "vibe", "vital",
"vortex", "wave", "x", "xenon", "zen",
"zero", "zone", "zoom",
}, },
"benefit": { "benefit": {
"comfort", "efficiency", "safety", "reliability", "advanced technology", "aesthetic appeal", "better organization", "cost-effectiveness",
"versatility", "ease of use", "long battery life", "comfort", "convenience", "customizability", "durability", "ease of use",
"precision", "enhanced connectivity", "portability", "efficiency", "energy savings", "enhanced connectivity", "enhanced experience",
"durability", "energy savings", "aesthetic appeal", "enhanced performance", "ergonomic design", "excellent value", "fast response time",
"health benefits", "convenience", "time-saving", "flexibility", "health benefits", "high performance", "improved accuracy",
"high performance", "noise reduction", "user satisfaction", "improved comfort", "improved productivity", "improved quality", "increased functionality",
"customizability", "sustainability", "cost-effectiveness", "increased lifespan", "innovative features", "long battery life", "minimal maintenance",
"innovative features", "improved productivity", "enhanced experience", "noise reduction", "peace of mind", "portability", "precision", "reliability",
"robust construction", "weather resistance", "minimal maintenance", "robust construction", "safety", "seamless integration", "space efficiency",
"increased functionality", "advanced technology", "ergonomic design", "sustainability", "time-saving", "user satisfaction", "versatility",
"weather resistance", "wireless freedom",
}, },
"use_case": { "use_case": {
"home", "office", "outdoors", "fitness", "travel", "gaming", "art and craft", "baking", "barbecuing", "bathroom", "bedroom",
"cooking", "music", "learning", "entertainment", "professional work", "camping", "childcare", "cleaning", "collaboration", "commuting",
"healthcare", "educational purposes", "commuting", "camping", "hiking", "cooking", "creative projects", "dining", "DIY projects", "educational purposes",
"sports", "art and craft", "gardening", "cleaning", "personal grooming", "entertainment", "exercise", "fitness", "food preparation", "gardening",
"relaxation", "home security", "pet care", "smart automation", "food preparation", "gaming", "garage", "healthcare", "hiking", "home",
"baking", "social gatherings", "productivity", "collaboration", "DIY projects", "home automation", "home security", "indoor activities", "kitchen", "laundry",
"childcare", "remote work", "photography", "videography", "wellness routines", "learning", "living room", "music", "office", "outdoor activities",
"outdoors", "personal grooming", "pet care", "photography", "productivity",
"professional work", "remote work", "relaxation", "smart automation", "social gatherings",
"spaces", "sports", "storage", "travel", "videography",
"wellness routines", "workshop",
}, },
"target_audience": { "target_audience": {
"children", "adults", "seniors", "students", "professionals", "athletes", "adults", "artists", "athletes", "beginners", "children",
"travelers", "families", "pet owners", "homeowners", "gamers", "cooks", "DIY enthusiasts", "collectors", "cooks", "creative professionals", "DIY enthusiasts", "educators",
"musicians", "artists", "families", "fitness enthusiasts", "gamers", "health-conscious individuals", "homeowners",
"hobbyists", "musicians", "outdoor enthusiasts", "parents", "pet owners",
"photographers", "professionals", "seniors", "small businesses", "students",
"tech enthusiasts", "travelers", "wellness seekers", "working professionals",
}, },
"dimension": { "dimension": {
"small", "medium", "large", "extra-large", "compact", "lightweight", "compact", "extra-large", "extra-small", "full-size", "heavy",
"heavy", "mini", "standard", "oversized", "jumbo", "large", "lightweight", "medium", "mini",
"oversized", "petite", "portable", "regular", "small",
"standard", "travel-size", "x-large", "x-small", "xx-large",
"xx-small",
}, },
"description": { "description": {

File diff suppressed because one or more lines are too long

246
vendor/github.com/brianvoe/gofakeit/v7/data/song.go generated vendored Normal file
View File

@ -0,0 +1,246 @@
package data
// Songs: Year-end Charts Hot 100 Songs from Billboard
// Source: https://www.billboard.com/charts/year-end/hot-100-songs/
// Artists: Greatest of All Time Artists based on Billboard rate
// Source: https://www.billboard.com/charts/greatest-of-all-time-artists/
var Songs = map[string][]string{
"name": {
"A Bar Song (Tipsy)",
"A Holly Jolly Christmas",
"Act II: Date @ 8",
"Agora Hills",
"Ain't No Love In Oklahoma",
"All I Want For Christmas Is You",
"Austin",
"Beautiful Things",
"Birds Of A Feather",
"Bulletproof",
"Burn It Down",
"Carnival",
"Cowgirls",
"Cruel Summer",
"Dance The Night",
"Die With A Smile",
"Down Bad",
"End Of Beginning",
"Espresso",
"Euphoria",
"Everybody",
"Exes",
"FE!N",
"FTCU",
"Fast Car",
"Feather",
"First Person Shooter",
"Flowers",
"Fortnight",
"Fukumean",
"Gata Only",
"Get It Sexyy",
"Good Good",
"Good Luck, Babe!",
"Greedy",
"High Road",
"Hot To Go!",
"Houdini",
"Houdini",
"I Am Not Okay",
"I Can Do It With A Broken Heart",
"I Had Some Help",
"I Like The Way You Kiss Me",
"I Remember Everything",
"IDGAF",
"Is It Over Now?",
"Jingle Bell Rock",
"La Diabla",
"Last Christmas",
"Last Night",
"Lies Lies Lies",
"Like That",
"Lil Boo Thang",
"Lose Control",
"Lovin On Me",
"Lunch",
"Made For Me",
"Miles On It",
"Million Dollar Baby",
"Monaco",
"Need A Favor",
"Never Lose Me",
"Not Like Us",
"On My Mama",
"Paint The Town Red",
"Pink Skies",
"Please Please Please",
"Pour Me A Drink",
"Pretty Little Poison",
"Redrum",
"Rich Baby Daddy",
"Rockin' Around The Christmas Tree",
"Saturn",
"Save Me",
"Slow It Down",
"Snooze",
"Stargazing",
"Stick Season",
"Taste",
"Texas Hold 'Em",
"The Painter",
"Thinkin' Bout Me",
"Too Sweet",
"Truck Bed",
"Type Shit",
"Vampire",
"Wanna Be",
"Water",
"We Can't Be Friends (Wait For Your Love)",
"What Was I Made For?",
"Whatever She Wants",
"Where It Ends",
"Where The Wild Things Are",
"White Horse",
"Wild Ones",
"Wildflower",
"Wind Up Missin' You",
"World On Fire",
"Yeah Glo!",
"Yes, And?",
},
"artist": {
"Adele",
"Aerosmith",
"Alicia Keys",
"Aretha Franklin",
"Barbra Streisand",
"Barry Manilow",
"Bee Gees",
"Beyonce",
"Billy Joel",
"Bob Dylan",
"Bob Seger",
"Bon Jovi",
"Boyz II Men",
"Britney Spears",
"Bruce Springsteen & The E Street Band",
"Bruno Mars",
"Bryan Adams",
"Carole King",
"Carpenters",
"Celine Dion",
"Chicago",
"Chris Brown",
"Commodores",
"Creedence Clearwater Revival",
"Daryl Hall John Oates",
"Def Leppard",
"Diana Ross",
"Donna Summer",
"Drake",
"Eagles",
"Earth, Wind & Fire",
"Ed Sheeran",
"Elton John",
"Elvis Presley",
"Eminem",
"Eric Clapton",
"Fleetwood Mac",
"Foreigner",
"Garth Brooks",
"Guns N' Roses",
"Heart",
"Herb Alpert",
"Huey Lewis & The News",
"JAY-Z",
"James Taylor",
"Janet Jackson",
"John Denver",
"John Mellencamp",
"Journey",
"Justin Bieber",
"Justin Timberlake",
"Kanye West",
"Katy Perry",
"Kelly Clarkson",
"Kenny Rogers",
"Lady Gaga",
"Led Zeppelin",
"Linda Ronstadt",
"Linkin Park",
"Lionel Richie",
"Madonna",
"Mariah Carey",
"Maroon 5",
"Marvin Gaye",
"Mary J. Blige",
"Michael Bolton",
"Michael Jackson",
"Miley Cyrus",
"Neil Diamond",
"Nelly",
"Nickelback",
"Olivia Newton-John",
"P!nk",
"Paul McCartney",
"Paula Abdul",
"Phil Collins",
"Pink Floyd",
"Prince",
"Queen",
"R. Kelly",
"Rihanna",
"Rod Stewart",
"Santana",
"Simon & Garfunkel",
"Stevie Wonder",
"Taylor Swift",
"The Beach Boys",
"The Beatles",
"The Black Eyed Peas",
"The Jacksons",
"The Monkees",
"The Rolling Stones",
"The Supremes",
"The Temptations",
"Three Dog Night",
"Tim McGraw",
"U2",
"Usher",
"Van Halen",
"Whitney Houston",
},
"genre": {
"Acoustic Pop",
"Alternative Hip-Hop",
"Alternative Pop",
"Chillwave",
"Contemporary R&B",
"Country",
"Dancehall",
"Electro-pop",
"Electronic Dance Music (EDM)",
"Emo Rap",
"Funk",
"Gospel-inspired Pop",
"Hip-Hop",
"Indie Pop",
"Latin Pop",
"Lo-fi Hip-Hop",
"Melodic Rap",
"Pop",
"Pop Punk",
"Pop Rock",
"R&B",
"Rap",
"Reggaeton",
"Rock",
"Singer-Songwriter",
"Soul",
"Synthwave",
"Trap",
"Trap Soul",
"Urban Contemporary",
},
}

523
vendor/github.com/brianvoe/gofakeit/v7/data/text.go generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -163,13 +163,14 @@ func timeZoneOffset(f *Faker) float32 {
return float32(value) return float32(value)
} }
// javaDateFormatToGolangDateFormat converts java date format into go date format // javaDateTimeFormatToGolangFormat converts java date/time format into go date/time format
func javaDateFormatToGolangDateFormat(format string) string { func javaDateTimeFormatToGolangFormat(format string) string {
format = strings.Replace(format, "ddd", "_2", -1) format = strings.Replace(format, "ddd", "_2", -1)
format = strings.Replace(format, "dd", "02", -1) format = strings.Replace(format, "dd", "02", -1)
format = strings.Replace(format, "d", "2", -1) format = strings.Replace(format, "d", "2", -1)
format = strings.Replace(format, "HH", "15", -1) format = strings.Replace(format, "HH", "15", -1)
format = strings.Replace(format, "H", "15", -1)
format = strings.Replace(format, "hh", "03", -1) format = strings.Replace(format, "hh", "03", -1)
format = strings.Replace(format, "h", "3", -1) format = strings.Replace(format, "h", "3", -1)
@ -213,10 +214,16 @@ func javaDateFormatToGolangDateFormat(format string) string {
func addDateTimeLookup() { func addDateTimeLookup() {
AddFuncLookup("date", Info{ AddFuncLookup("date", Info{
Display: "Date", Display: "Date",
Category: "time", Category: "datetime",
Description: "Representation of a specific day, month, and year, often used for chronological reference", Description: "Representation of a specific day, month, and year, often used for chronological reference",
Example: "2006-01-02T15:04:05Z07:00", Example: "2006-01-02T15:04:05Z07:00",
Output: "string", Output: "string",
Aliases: []string{
"date string", "calendar date", "datetime", "timestamp", "chronological reference",
},
Keywords: []string{
"time", "day", "month", "year", "format", "rfc3339", "iso8601", "utc",
},
Params: []Param{ Params: []Param{
{ {
Field: "format", Field: "format",
@ -259,17 +266,23 @@ func addDateTimeLookup() {
return f.Date().Format(time.RFC3339), nil return f.Date().Format(time.RFC3339), nil
} }
return f.Date().Format(javaDateFormatToGolangDateFormat(format)), nil return f.Date().Format(javaDateTimeFormatToGolangFormat(format)), nil
} }
}, },
}) })
AddFuncLookup("daterange", Info{ AddFuncLookup("daterange", Info{
Display: "DateRange", Display: "Date Range",
Category: "time", Category: "datetime",
Description: "Random date between two ranges", Description: "Random date between two ranges",
Example: "2006-01-02T15:04:05Z07:00", Example: "1995-06-15T14:30:00Z",
Output: "string", Output: "string",
Aliases: []string{
"date interval", "date span", "date window", "between dates", "bounded period",
},
Keywords: []string{
"daterange", "range", "between", "date", "time", "random", "bounds", "limits", "window",
},
Params: []Param{ Params: []Param{
{ {
Field: "startdate", Field: "startdate",
@ -298,7 +311,7 @@ func addDateTimeLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
format = javaDateFormatToGolangDateFormat(format) format = javaDateTimeFormatToGolangFormat(format)
startdate, err := info.GetString(m, "startdate") startdate, err := info.GetString(m, "startdate")
if err != nil { if err != nil {
@ -324,177 +337,362 @@ func addDateTimeLookup() {
AddFuncLookup("pastdate", Info{ AddFuncLookup("pastdate", Info{
Display: "PastDate", Display: "PastDate",
Category: "time", Category: "datetime",
Description: "Date that has occurred before the current moment in time", Description: "Date that has occurred before the current moment in time",
Example: "2007-01-24 13:00:35.820738079 +0000 UTC", Example: "2007-01-24 13:00:35.820738079 +0000 UTC",
Output: "time", Output: "time",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return pastDate(f), nil "past date", "historical date", "previous date", "earlier date", "prior time",
}, },
Keywords: []string{
"date", "time", "occurred", "elapsed", "gone", "expired", "finished", "completed",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return pastDate(f), nil },
}) })
AddFuncLookup("futuredate", Info{ AddFuncLookup("futuredate", Info{
Display: "FutureDate", Display: "FutureDate",
Category: "time", Category: "datetime",
Description: "Date that has occurred after the current moment in time", Description: "Date that has occurred after the current moment in time",
Example: "2107-01-24 13:00:35.820738079 +0000 UTC", Example: "2107-01-24 13:00:35.820738079 +0000 UTC",
Output: "time", Output: "time",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return futureDate(f), nil "future date", "upcoming date", "next date", "scheduled date", "later time",
}, },
Keywords: []string{
"future", "date", "time", "forthcoming", "prospective", "anticipated", "scheduled",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return futureDate(f), nil },
}) })
AddFuncLookup("nanosecond", Info{ AddFuncLookup("nanosecond", Info{
Display: "Nanosecond", Display: "Nanosecond",
Category: "time", Category: "datetime",
Description: "Unit of time equal to One billionth (10^-9) of a second", Description: "Unit of time equal to one billionth (10^-9) of a second",
Example: "196446360", Example: "196446360",
Output: "int", Output: "int",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return nanoSecond(f), nil "nano", "ns value", "tiny time", "ultra precision", "fractional second",
}, },
Keywords: []string{
"time", "unit", "second", "billionth", "ultra", "high", "resolution",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return nanoSecond(f), nil },
}) })
AddFuncLookup("second", Info{ AddFuncLookup("second", Info{
Display: "Second", Display: "Second",
Category: "time", Category: "datetime",
Description: "Unit of time equal to 1/60th of a minute", Description: "Unit of time equal to 1/60th of a minute",
Example: "43", Example: "43",
Output: "int", Output: "int",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return second(f), nil "second value", "sec unit", "time second", "sixtieth minute", "time slice",
}, },
Keywords: []string{
"time", "unit", "minute", "sixtieth", "duration", "interval", "sixty",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return second(f), nil },
}) })
AddFuncLookup("minute", Info{ AddFuncLookup("minute", Info{
Display: "Minute", Display: "Minute",
Category: "time", Category: "datetime",
Description: "Unit of time equal to 60 seconds", Description: "Unit of time equal to 60 seconds",
Example: "34", Example: "34",
Output: "int", Output: "int",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return minute(f), nil "minute value", "time minute", "sixty seconds", "short period", "clock minute",
}, },
Keywords: []string{
"time", "unit", "60", "seconds", "duration", "interval", "sixtieth", "hour",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return minute(f), nil },
}) })
AddFuncLookup("hour", Info{ AddFuncLookup("hour", Info{
Display: "Hour", Display: "Hour",
Category: "time", Category: "datetime",
Description: "Unit of time equal to 60 minutes", Description: "Unit of time equal to 60 minutes",
Example: "8", Example: "8",
Output: "int", Output: "int",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return hour(f), nil "hour value", "time hour", "sixty minutes", "clock hour", "time period",
}, },
Keywords: []string{
"time", "unit", "60", "minutes", "duration", "interval", "day",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return hour(f), nil },
}) })
AddFuncLookup("day", Info{ AddFuncLookup("day", Info{
Display: "Day", Display: "Day",
Category: "time", Category: "datetime",
Description: "24-hour period equivalent to one rotation of Earth on its axis", Description: "24-hour period equivalent to one rotation of Earth on its axis",
Example: "12", Example: "12",
Output: "int", Output: "int",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return day(f), nil "calendar day", "day value", "earth rotation", "daily unit", "full day",
}, },
Keywords: []string{
"time", "unit", "axis", "24-hour", "calendar", "sunrise", "sunset",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return day(f), nil },
}) })
AddFuncLookup("weekday", Info{ AddFuncLookup("weekday", Info{
Display: "Weekday", Display: "Weekday",
Category: "time", Category: "datetime",
Description: "Day of the week excluding the weekend", Description: "Day of the week excluding the weekend",
Example: "Friday", Example: "Friday",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return weekDay(f), nil "weekday name", "business day", "work day", "monday to friday", "weekday label",
}, },
Keywords: []string{
"day", "week", "workday", "business", "calendar", "monday", "tuesday", "wednesday", "thursday", "friday",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return weekDay(f), nil },
}) })
AddFuncLookup("month", Info{ AddFuncLookup("month", Info{
Display: "Month", Display: "Month",
Category: "time", Category: "datetime",
Description: "Division of the year, typically 30 or 31 days long", Description: "Division of the year, typically 30 or 31 days long",
Example: "1", Example: "1",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return month(f), nil "calendar month", "month value", "monthly unit", "date month", "time month",
}, },
Keywords: []string{
"year", "time", "30", "31", "days", "calendar", "period",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return month(f), nil },
}) })
AddFuncLookup("monthstring", Info{ AddFuncLookup("monthstring", Info{
Display: "Month String", Display: "Month String",
Category: "time", Category: "datetime",
Description: "String Representation of a month name", Description: "String representation of a month name",
Example: "September", Example: "September",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return monthString(f), nil "month name", "calendar month name", "full month", "month label", "month string",
}, },
Keywords: []string{
"month", "string", "time", "representation", "january", "september", "december",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return monthString(f), nil },
}) })
AddFuncLookup("year", Info{ AddFuncLookup("year", Info{
Display: "Year", Display: "Year",
Category: "time", Category: "datetime",
Description: "Period of 365 days, the time Earth takes to orbit the Sun", Description: "Period of 365 days, the time Earth takes to orbit the Sun",
Example: "1900", Example: "1900",
Output: "int", Output: "int",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return year(f), nil "calendar year", "annual period", "orbit year", "year value", "fiscal year",
}, },
Keywords: []string{
"time", "365", "days", "leap", "calendar", "decade", "century",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return year(f), nil },
}) })
AddFuncLookup("timezone", Info{ AddFuncLookup("timezone", Info{
Display: "Timezone", Display: "Timezone",
Category: "time", Category: "datetime",
Description: "Region where the same standard time is used, based on longitudinal divisions of the Earth", Description: "Region where the same standard time is used, based on longitudinal divisions of the Earth",
Example: "Kaliningrad Standard Time", Example: "Kaliningrad Standard Time",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return timeZone(f), nil "time zone", "tz name", "standard time zone", "geographic zone", "regional time",
}, },
Keywords: []string{
"time", "earth", "utc", "gmt", "pst", "est", "cst", "mst", "dst",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return timeZone(f), nil },
}) })
AddFuncLookup("timezoneabv", Info{ AddFuncLookup("timezoneabv", Info{
Display: "Timezone Abbreviation", Display: "Timezone Abbreviation",
Category: "time", Category: "datetime",
Description: "Abbreviated 3-letter word of a timezone", Description: "Abbreviated 3-letter word of a timezone",
Example: "KST", Example: "KST",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return timeZoneAbv(f), nil "timezone abbr", "tz short code", "abbreviated zone", "short tz name", "zone abbreviation",
}, },
Keywords: []string{
"time", "3-letter", "kst", "pst", "est", "gmt", "utc",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return timeZoneAbv(f), nil },
}) })
AddFuncLookup("timezonefull", Info{ AddFuncLookup("timezonefull", Info{
Display: "Timezone Full", Display: "Timezone Full",
Category: "time", Category: "datetime",
Description: "Full name of a timezone", Description: "Full name of a timezone",
Example: "(UTC+03:00) Kaliningrad, Minsk", Example: "(UTC+03:00) Kaliningrad, Minsk",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return timeZoneFull(f), nil "timezone full", "full tz name", "complete zone name", "long tz name", "detailed zone",
}, },
Keywords: []string{
"timezone", "full", "time", "standard", "format", "display", "utc", "gmt",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return timeZoneFull(f), nil },
}) })
AddFuncLookup("timezoneoffset", Info{ AddFuncLookup("timezoneoffset", Info{
Display: "Timezone Offset", Display: "Timezone Offset",
Category: "time", Category: "datetime",
Description: "The difference in hours from Coordinated Universal Time (UTC) for a specific region", Description: "The difference in hours from Coordinated Universal Time (UTC) for a specific region",
Example: "3", Example: "-5",
Output: "float32", Output: "float32",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return timeZoneOffset(f), nil "utc offset", "gmt offset", "tz shift", "time difference", "offset value",
}, },
Keywords: []string{
"timezone", "offset", "utc", "gmt", "plus", "minus", "east", "west",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return timeZoneOffset(f), nil },
}) })
AddFuncLookup("timezoneregion", Info{ AddFuncLookup("timezoneregion", Info{
Display: "Timezone Region", Display: "Timezone Region",
Category: "time", Category: "datetime",
Description: "Geographic area sharing the same standard time", Description: "Geographic area sharing the same standard time",
Example: "America/Alaska", Example: "America/Alaska",
Output: "string", Output: "string",
Aliases: []string{
"region zone", "geo time region", "tz area", "regional timezone", "country zone",
},
Keywords: []string{
"timezone", "time", "america", "europe", "asia", "africa", "australia", "continent", "city",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return timeZoneRegion(f), nil },
})
AddFuncLookup("time", Info{
Display: "Time",
Category: "datetime",
Description: "Random time string in the specified format",
Example: "14:30:25",
Output: "string",
Aliases: []string{
"time string", "clock time", "time format", "time value", "hour minute second",
},
Keywords: []string{
"clock", "hour", "minute", "second", "format", "24-hour", "12-hour", "am", "pm",
},
Params: []Param{
{
Field: "format",
Display: "Format",
Type: "string",
Default: "HH:mm:ss",
Options: []string{"HH:mm:ss", "HH:mm", "hh:mm:ss a", "hh:mm a", "H:mm", "h:mm a"},
Description: "Time format string. Supports Java time format patterns or Go time format patterns",
},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return timeZoneRegion(f), nil format, err := info.GetString(m, "format")
if err != nil {
return nil, err
}
// Convert java format to golang format
golangFormat := javaDateTimeFormatToGolangFormat(format)
// Create a time with today's date but random time
t := time.Date(2000, 1, 1, hour(f), minute(f), second(f), nanoSecond(f), time.UTC)
return t.Format(golangFormat), nil
},
})
AddFuncLookup("timerange", Info{
Display: "Time Range",
Category: "datetime",
Description: "Random time string between start and end times",
Example: "10:15:30",
Output: "string",
Aliases: []string{
"time interval", "time span", "time window", "between times", "bounded time",
},
Keywords: []string{
"timerange", "range", "between", "time", "start", "end", "bounds", "limits", "window",
},
Params: []Param{
{
Field: "starttime",
Display: "Start Time",
Type: "string",
Default: "00:00:00",
Description: "Start time string in the specified format",
},
{
Field: "endtime",
Display: "End Time",
Type: "string",
Default: "23:59:59",
Description: "End time string in the specified format",
},
{
Field: "format",
Display: "Format",
Type: "string",
Default: "HH:mm:ss",
Options: []string{"HH:mm:ss", "HH:mm", "hh:mm:ss a", "hh:mm a", "H:mm", "h:mm a"},
Description: "Time format string. Supports Java time format patterns or Go time format patterns",
},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
format, err := info.GetString(m, "format")
if err != nil {
return nil, err
}
startTime, err := info.GetString(m, "starttime")
if err != nil {
return nil, err
}
endTime, err := info.GetString(m, "endtime")
if err != nil {
return nil, err
}
// Convert java format to golang format
golangFormat := javaDateTimeFormatToGolangFormat(format)
// Parse start and end times
start, err := time.Parse(golangFormat, startTime)
if err != nil {
// If parsing fails, use a default start time
start = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)
}
end, err := time.Parse(golangFormat, endTime)
if err != nil {
// If parsing fails, use a default end time
end = time.Date(2000, 1, 1, 23, 59, 59, 999999999, time.UTC)
}
// Generate random time between start and end
startNano := start.UnixNano()
endNano := end.UnixNano()
if startNano > endNano {
startNano, endNano = endNano, startNano
}
randomNano := int64(number(f, int(startNano), int(endNano)))
randomTime := time.Unix(0, randomNano).UTC()
return randomTime.Format(golangFormat), nil
}, },
}) })

View File

@ -6,15 +6,32 @@ func Emoji() string { return emoji(GlobalFaker) }
// Emoji will return a random fun emoji // Emoji will return a random fun emoji
func (f *Faker) Emoji() string { return emoji(f) } func (f *Faker) Emoji() string { return emoji(f) }
func emoji(f *Faker) string { return getRandValue(f, []string{"emoji", "emoji"}) } func emoji(f *Faker) string {
// Explicit allow-list of emoji subgroups (sorted for deterministic behavior)
allowed := []string{
"animal",
"clothing",
"costume",
"electronics",
"face",
"flag",
"food",
"game",
"gesture",
"hand",
"job",
"landmark",
"music",
"person",
"plant",
"sport",
"tools",
"vehicle",
"weather",
}
// EmojiDescription will return a random fun emoji description return getRandValue(f, []string{"emoji", randomString(f, allowed)})
func EmojiDescription() string { return emojiDescription(GlobalFaker) } }
// EmojiDescription will return a random fun emoji description
func (f *Faker) EmojiDescription() string { return emojiDescription(f) }
func emojiDescription(f *Faker) string { return getRandValue(f, []string{"emoji", "description"}) }
// EmojiCategory will return a random fun emoji category // EmojiCategory will return a random fun emoji category
func EmojiCategory() string { return emojiCategory(GlobalFaker) } func EmojiCategory() string { return emojiCategory(GlobalFaker) }
@ -40,6 +57,173 @@ func (f *Faker) EmojiTag() string { return emojiTag(f) }
func emojiTag(f *Faker) string { return getRandValue(f, []string{"emoji", "tag"}) } func emojiTag(f *Faker) string { return getRandValue(f, []string{"emoji", "tag"}) }
// EmojiFlag will return a random country flag emoji
func EmojiFlag() string { return emojiFlag(GlobalFaker) }
// EmojiFlag will return a random country flag emoji
func (f *Faker) EmojiFlag() string { return emojiFlag(f) }
func emojiFlag(f *Faker) string { return getRandValue(f, []string{"emoji", "flag"}) }
// EmojiAnimal will return a random animal emoji
func EmojiAnimal() string { return emojiAnimal(GlobalFaker) }
// EmojiAnimal will return a random animal emoji
func (f *Faker) EmojiAnimal() string { return emojiAnimal(f) }
func emojiAnimal(f *Faker) string { return getRandValue(f, []string{"emoji", "animal"}) }
// EmojiFood will return a random food emoji
func EmojiFood() string { return emojiFood(GlobalFaker) }
// EmojiFood will return a random food emoji
func (f *Faker) EmojiFood() string { return emojiFood(f) }
func emojiFood(f *Faker) string { return getRandValue(f, []string{"emoji", "food"}) }
// EmojiPlant will return a random plant emoji
func EmojiPlant() string { return emojiPlant(GlobalFaker) }
// EmojiPlant will return a random plant emoji
func (f *Faker) EmojiPlant() string { return emojiPlant(f) }
func emojiPlant(f *Faker) string { return getRandValue(f, []string{"emoji", "plant"}) }
// EmojiMusic will return a random music-related emoji
func EmojiMusic() string { return emojiMusic(GlobalFaker) }
// EmojiMusic will return a random music-related emoji
func (f *Faker) EmojiMusic() string { return emojiMusic(f) }
func emojiMusic(f *Faker) string { return getRandValue(f, []string{"emoji", "music"}) }
// EmojiVehicle will return a random vehicle/transport emoji
func EmojiVehicle() string { return emojiVehicle(GlobalFaker) }
// EmojiVehicle will return a random vehicle/transport emoji
func (f *Faker) EmojiVehicle() string { return emojiVehicle(f) }
func emojiVehicle(f *Faker) string { return getRandValue(f, []string{"emoji", "vehicle"}) }
// EmojiSport will return a random sports emoji
func EmojiSport() string { return emojiSport(GlobalFaker) }
// EmojiSport will return a random sports emoji
func (f *Faker) EmojiSport() string { return emojiSport(f) }
func emojiSport(f *Faker) string { return getRandValue(f, []string{"emoji", "sport"}) }
// EmojiFace will return a random face emoji
func EmojiFace() string { return emojiFace(GlobalFaker) }
// EmojiFace will return a random face emoji
func (f *Faker) EmojiFace() string { return emojiFace(f) }
func emojiFace(f *Faker) string { return getRandValue(f, []string{"emoji", "face"}) }
// EmojiHand will return a random hand emoji
func EmojiHand() string { return emojiHand(GlobalFaker) }
// EmojiHand will return a random hand emoji
func (f *Faker) EmojiHand() string { return emojiHand(f) }
func emojiHand(f *Faker) string { return getRandValue(f, []string{"emoji", "hand"}) }
// EmojiClothing will return a random clothing or accessory emoji
func EmojiClothing() string { return emojiClothing(GlobalFaker) }
// EmojiClothing will return a random clothing or accessory emoji
func (f *Faker) EmojiClothing() string { return emojiClothing(f) }
func emojiClothing(f *Faker) string { return getRandValue(f, []string{"emoji", "clothing"}) }
// EmojiLandmark will return a random landmark or place emoji
func EmojiLandmark() string { return emojiLandmark(GlobalFaker) }
// EmojiLandmark will return a random landmark or place emoji
func (f *Faker) EmojiLandmark() string { return emojiLandmark(f) }
func emojiLandmark(f *Faker) string { return getRandValue(f, []string{"emoji", "landmark"}) }
// EmojiElectronics will return a random electronics/media device emoji
func EmojiElectronics() string { return emojiElectronics(GlobalFaker) }
// EmojiElectronics will return a random electronics/media device emoji
func (f *Faker) EmojiElectronics() string { return emojiElectronics(f) }
func emojiElectronics(f *Faker) string { return getRandValue(f, []string{"emoji", "electronics"}) }
// EmojiGame will return a random game/leisure emoji
func EmojiGame() string { return emojiGame(GlobalFaker) }
// EmojiGame will return a random game/leisure emoji
func (f *Faker) EmojiGame() string { return emojiGame(f) }
func emojiGame(f *Faker) string { return getRandValue(f, []string{"emoji", "game"}) }
// EmojiTools will return a random tools/weapons emoji
func EmojiTools() string { return emojiTools(GlobalFaker) }
// EmojiTools will return a random tools/weapons emoji
func (f *Faker) EmojiTools() string { return emojiTools(f) }
func emojiTools(f *Faker) string { return getRandValue(f, []string{"emoji", "tools"}) }
// EmojiWeather will return a random weather/celestial emoji
func EmojiWeather() string { return emojiWeather(GlobalFaker) }
// EmojiWeather will return a random weather/celestial emoji
func (f *Faker) EmojiWeather() string { return emojiWeather(f) }
func emojiWeather(f *Faker) string { return getRandValue(f, []string{"emoji", "weather"}) }
// EmojiJob will return a random job/occupation emoji
func EmojiJob() string { return emojiJob(GlobalFaker) }
// EmojiJob will return a random job/occupation emoji
func (f *Faker) EmojiJob() string { return emojiJob(f) }
func emojiJob(f *Faker) string { return getRandValue(f, []string{"emoji", "job"}) }
// EmojiPerson will return a random person variant emoji
func EmojiPerson() string { return emojiPerson(GlobalFaker) }
// EmojiPerson will return a random person variant emoji
func (f *Faker) EmojiPerson() string { return emojiPerson(f) }
func emojiPerson(f *Faker) string { return getRandValue(f, []string{"emoji", "person"}) }
// EmojiGesture will return a random gesture emoji
func EmojiGesture() string { return emojiGesture(GlobalFaker) }
// EmojiGesture will return a random gesture emoji
func (f *Faker) EmojiGesture() string { return emojiGesture(f) }
func emojiGesture(f *Faker) string { return getRandValue(f, []string{"emoji", "gesture"}) }
// EmojiCostume will return a random costume/fantasy emoji
func EmojiCostume() string { return emojiCostume(GlobalFaker) }
// EmojiCostume will return a random costume/fantasy emoji
func (f *Faker) EmojiCostume() string { return emojiCostume(f) }
func emojiCostume(f *Faker) string { return getRandValue(f, []string{"emoji", "costume"}) }
// EmojiSentence will return a random sentence with emojis interspersed
func EmojiSentence() string { return emojiSentence(GlobalFaker) }
// EmojiSentence will return a random sentence with emojis interspersed
func (f *Faker) EmojiSentence() string { return emojiSentence(f) }
func emojiSentence(f *Faker) string {
sentence, err := generate(f, getRandValue(f, []string{"emoji", "sentence"}))
if err != nil {
return ""
}
return sentence
}
func addEmojiLookup() { func addEmojiLookup() {
AddFuncLookup("emoji", Info{ AddFuncLookup("emoji", Info{
Display: "Emoji", Display: "Emoji",
@ -47,28 +231,37 @@ func addEmojiLookup() {
Description: "Digital symbol expressing feelings or ideas in text messages and online chats", Description: "Digital symbol expressing feelings or ideas in text messages and online chats",
Example: "🤣", Example: "🤣",
Output: "string", Output: "string",
Aliases: []string{
"emoticon symbol",
"chat icon",
"unicode pictograph",
"emotional glyph",
"digital expression",
},
Keywords: []string{
"symbol", "text", "message", "online", "chats", "ideas", "feelings", "digital", "reaction",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emoji(f), nil return emoji(f), nil
}, },
}) })
AddFuncLookup("emojidescription", Info{
Display: "Emoji Description",
Category: "emoji",
Description: "Brief explanation of the meaning or emotion conveyed by an emoji",
Example: "face vomiting",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiDescription(f), nil
},
})
AddFuncLookup("emojicategory", Info{ AddFuncLookup("emojicategory", Info{
Display: "Emoji Category", Display: "Emoji Category",
Category: "emoji", Category: "emoji",
Description: "Group or classification of emojis based on their common theme or use, like 'smileys' or 'animals'", Description: "Group or classification of emojis based on their common theme or use, like 'smileys' or 'animals'",
Example: "Smileys & Emotion", Example: "Smileys & Emotion",
Output: "string", Output: "string",
Aliases: []string{
"emoji group",
"emoji theme",
"emoji section",
"emoji classification",
"emoji grouping",
},
Keywords: []string{
"emoji", "smileys", "emotion", "animals", "theme", "classification", "set", "category", "collection",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiCategory(f), nil return emojiCategory(f), nil
}, },
@ -80,6 +273,16 @@ func addEmojiLookup() {
Description: "Alternative name or keyword used to represent a specific emoji in text or code", Description: "Alternative name or keyword used to represent a specific emoji in text or code",
Example: "smile", Example: "smile",
Output: "string", Output: "string",
Aliases: []string{
"emoji nickname",
"emoji shorthand",
"emoji label",
"emoji alt text",
"emoji identifier",
},
Keywords: []string{
"emoji", "alias", "smile", "code", "specific", "represent", "alternative", "keyword", "mapping",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiAlias(f), nil return emojiAlias(f), nil
}, },
@ -91,8 +294,279 @@ func addEmojiLookup() {
Description: "Label or keyword associated with an emoji to categorize or search for it easily", Description: "Label or keyword associated with an emoji to categorize or search for it easily",
Example: "happy", Example: "happy",
Output: "string", Output: "string",
Aliases: []string{
"emoji keyword",
"emoji marker",
"emoji label",
"emoji hashtag",
"emoji reference",
},
Keywords: []string{
"emoji", "tag", "happy", "associated", "categorize", "search", "label", "index", "metadata",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiTag(f), nil return emojiTag(f), nil
}, },
}) })
AddFuncLookup("emojiflag", Info{
Display: "Emoji Flag",
Category: "emoji",
Description: "Unicode symbol representing a specific country's flag",
Example: "🇺🇸",
Output: "string",
Aliases: []string{"country flag", "flag emoji", "national flag"},
Keywords: []string{"emoji", "flag", "country", "national", "unicode", "symbol", "banner"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiFlag(f), nil
},
})
AddFuncLookup("emojianimal", Info{
Display: "Emoji Animal",
Category: "emoji",
Description: "Unicode symbol representing an animal",
Example: "🐌",
Output: "string",
Aliases: []string{"animal emoji", "creature emoji", "wildlife emoji"},
Keywords: []string{"emoji", "animal", "creature", "wildlife", "pet", "nature", "zoo", "mammal"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiAnimal(f), nil
},
})
AddFuncLookup("emojifood", Info{
Display: "Emoji Food",
Category: "emoji",
Description: "Unicode symbol representing food or drink",
Example: "🍾",
Output: "string",
Aliases: []string{"food emoji", "drink emoji", "meal emoji"},
Keywords: []string{"emoji", "food", "drink", "meal", "snack", "beverage", "cuisine", "restaurant"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiFood(f), nil
},
})
AddFuncLookup("emojiplant", Info{
Display: "Emoji Plant",
Category: "emoji",
Description: "Unicode symbol representing a plant, flower, or tree",
Example: "🌻",
Output: "string",
Aliases: []string{"plant emoji", "flower emoji", "tree emoji"},
Keywords: []string{"emoji", "plant", "flower", "tree", "nature", "botanical", "leaf", "garden"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiPlant(f), nil
},
})
AddFuncLookup("emojimusic", Info{
Display: "Emoji Music",
Category: "emoji",
Description: "Unicode symbol representing music or musical instruments",
Example: "🎵",
Output: "string",
Aliases: []string{"music emoji", "instrument emoji", "audio emoji"},
Keywords: []string{"emoji", "music", "instrument", "audio", "song", "sound", "melody"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiMusic(f), nil
},
})
AddFuncLookup("emojivehicle", Info{
Display: "Emoji Vehicle",
Category: "emoji",
Description: "Unicode symbol representing vehicles or transportation",
Example: "🚗",
Output: "string",
Aliases: []string{"vehicle emoji", "transport emoji", "transportation emoji"},
Keywords: []string{"emoji", "vehicle", "transport", "transportation", "car", "train", "plane", "boat"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiVehicle(f), nil
},
})
AddFuncLookup("emojisport", Info{
Display: "Emoji Sport",
Category: "emoji",
Description: "Unicode symbol representing sports, activities, or awards",
Example: "⚽",
Output: "string",
Aliases: []string{"sport emoji", "sports emoji", "activity emoji"},
Keywords: []string{"emoji", "sport", "activity", "game", "award", "team", "fitness", "exercise"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiSport(f), nil
},
})
AddFuncLookup("emojiface", Info{
Display: "Emoji Face",
Category: "emoji",
Description: "Unicode symbol representing faces/smileys (including cat/creature faces)",
Example: "😀",
Output: "string",
Aliases: []string{"face emoji", "smiley emoji", "cat face emoji"},
Keywords: []string{"emoji", "face", "smiley", "emotion", "expression", "cat", "creature"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiFace(f), nil
},
})
AddFuncLookup("emojihand", Info{
Display: "Emoji Hand",
Category: "emoji",
Description: "Unicode symbol representing hand gestures and hand-related symbols",
Example: "👍",
Output: "string",
Aliases: []string{"hand emoji", "gesture emoji", "hand symbol"},
Keywords: []string{"emoji", "hand", "gesture", "thumbs", "fingers", "clap", "pray"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiHand(f), nil
},
})
AddFuncLookup("emojiclothing", Info{
Display: "Emoji Clothing",
Category: "emoji",
Description: "Unicode symbol representing clothing and accessories",
Example: "👗",
Output: "string",
Aliases: []string{"clothing emoji", "accessory emoji", "garment emoji", "wardrobe emoji"},
Keywords: []string{"emoji", "clothing", "apparel", "accessory", "shoes", "hat", "jewelry"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiClothing(f), nil
},
})
AddFuncLookup("emojilandmark", Info{
Display: "Emoji Landmark",
Category: "emoji",
Description: "Unicode symbol representing landmarks and notable places/buildings",
Example: "🗽",
Output: "string",
Aliases: []string{"landmark emoji", "place emoji", "building emoji"},
Keywords: []string{"emoji", "landmark", "place", "building", "monument", "site"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiLandmark(f), nil
},
})
AddFuncLookup("emojielectronics", Info{
Display: "Emoji Electronics",
Category: "emoji",
Description: "Unicode symbol representing electronic and media devices",
Example: "💻",
Output: "string",
Aliases: []string{"electronics emoji", "device emoji", "media emoji"},
Keywords: []string{"emoji", "electronics", "device", "media", "computer", "phone", "camera"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiElectronics(f), nil
},
})
AddFuncLookup("emojigame", Info{
Display: "Emoji Game",
Category: "emoji",
Description: "Unicode symbol representing games and leisure",
Example: "🎮",
Output: "string",
Aliases: []string{"game emoji", "leisure emoji", "gaming emoji", "play emoji"},
Keywords: []string{"emoji", "game", "leisure", "cards", "dice", "puzzle", "toy"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiGame(f), nil
},
})
AddFuncLookup("emojitools", Info{
Display: "Emoji Tools",
Category: "emoji",
Description: "Unicode symbol representing tools or similar equipment",
Example: "🔨",
Output: "string",
Aliases: []string{"tool emoji", "equipment emoji", "hardware emoji", "repair emoji"},
Keywords: []string{"emoji", "tools", "equipment", "hardware", "fix", "build"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiTools(f), nil
},
})
AddFuncLookup("emojiweather", Info{
Display: "Emoji Weather",
Category: "emoji",
Description: "Unicode symbol representing weather and celestial bodies",
Example: "☀️",
Output: "string",
Aliases: []string{"weather emoji", "sky emoji", "forecast emoji", "climate emoji"},
Keywords: []string{"emoji", "weather", "sky", "celestial", "cloud", "rain", "sun"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiWeather(f), nil
},
})
AddFuncLookup("emojijob", Info{
Display: "Emoji Job",
Category: "emoji",
Description: "Unicode symbol representing people in a role of employment",
Example: "🧑‍💻",
Output: "string",
Aliases: []string{"job emoji", "occupation emoji", "career emoji", "profession emoji"},
Keywords: []string{"emoji", "job", "role", "profession", "worker", "person"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiJob(f), nil
},
})
AddFuncLookup("emojiperson", Info{
Display: "Emoji Person",
Category: "emoji",
Description: "Unicode symbol representing human person variants",
Example: "👩",
Output: "string",
Aliases: []string{"person emoji", "human emoji", "adult emoji", "child emoji"},
Keywords: []string{"emoji", "person", "human", "man", "woman", "adult", "child"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiPerson(f), nil
},
})
AddFuncLookup("emojigesture", Info{
Display: "Emoji Gesture",
Category: "emoji",
Description: "Unicode symbol representing person gestures/poses",
Example: "🙋",
Output: "string",
Aliases: []string{"gesture emoji", "pose emoji", "action emoji"},
Keywords: []string{"emoji", "gesture", "pose", "action", "person", "hand", "sign"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiGesture(f), nil
},
})
AddFuncLookup("emojicostume", Info{
Display: "Emoji Costume",
Category: "emoji",
Description: "Unicode symbol representing costume/fantasy people and roles",
Example: "🦸",
Output: "string",
Aliases: []string{"costume emoji", "fantasy emoji", "role emoji"},
Keywords: []string{"emoji", "costume", "fantasy", "superhero", "prince", "princess"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiCostume(f), nil
},
})
AddFuncLookup("emojisentence", Info{
Display: "Emoji Sentence",
Category: "emoji",
Description: "Sentence with random emojis interspersed throughout",
Example: "Weekends reserve time for 🖼️ Disc 🏨 golf and day.",
Output: "string",
Aliases: []string{"sentence with emojis", "emoji text", "emoji message"},
Keywords: []string{"emoji", "sentence", "text", "message", "interspersed", "random", "words", "expression"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return emojiSentence(f), nil
},
})
} }

View File

@ -146,96 +146,152 @@ func addErrorLookup() {
Description: "Message displayed by a computer or software when a problem or mistake is encountered", Description: "Message displayed by a computer or software when a problem or mistake is encountered",
Example: "syntax error", Example: "syntax error",
Output: "string", Output: "string",
Aliases: []string{
"fault", "problem", "issue", "bug", "failure",
},
Keywords: []string{
"software", "computer", "crash", "exception", "warning", "alert", "diagnostic", "system", "message", "malfunction",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return err(f), nil return err(f), nil
}, },
}) })
AddFuncLookup("errorobject", Info{ AddFuncLookup("errorobject", Info{
Display: "Error object word", Display: "Error Object",
Category: "error", Category: "error",
Description: "Various categories conveying details about encountered errors", Description: "Various categories conveying details about encountered errors",
Example: "protocol", Example: "protocol",
Output: "string", Output: "string",
Aliases: []string{
"category", "classification", "entity", "type", "object detail",
},
Keywords: []string{
"protocol", "context", "identifier", "descriptor", "domain", "nature", "tag", "origin",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return errorObject(f), nil return errorObject(f), nil
}, },
}) })
AddFuncLookup("errordatabase", Info{ AddFuncLookup("errordatabase", Info{
Display: "Database error", Display: "Database Error",
Category: "error", Category: "error",
Description: "A problem or issue encountered while accessing or managing a database", Description: "A problem or issue encountered while accessing or managing a database",
Example: "sql error", Example: "sql error",
Output: "string", Output: "string",
Aliases: []string{
"db error", "query issue", "storage failure", "sql fault", "data access problem",
},
Keywords: []string{
"connection", "query", "timeout", "transaction", "integrity", "constraint", "lock", "schema", "management", "corruption",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return errorDatabase(f), nil return errorDatabase(f), nil
}, },
}) })
AddFuncLookup("errorgrpc", Info{ AddFuncLookup("errorgrpc", Info{
Display: "gRPC error", Display: "gRPC Error",
Category: "error", Category: "error",
Description: "Communication failure in the high-performance, open-source universal RPC framework", Description: "Communication failure in the high-performance, open-source universal RPC framework",
Example: "client protocol error", Example: "client protocol error",
Output: "string", Output: "string",
Aliases: []string{
"grpc failure", "rpc error", "rpc failure", "communication fault", "transport issue",
},
Keywords: []string{
"protocol", "transport", "client", "server", "connection", "status", "unavailable", "timeout", "stream", "call",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return errorGRPC(f), nil return errorGRPC(f), nil
}, },
}) })
AddFuncLookup("errorhttp", Info{ AddFuncLookup("errorhttp", Info{
Display: "HTTP error", Display: "HTTP Error",
Category: "error", Category: "error",
Description: "A problem with a web http request", Description: "A problem with a web HTTP request",
Example: "invalid method", Example: "invalid method",
Output: "string", Output: "string",
Aliases: []string{
"http failure", "network error", "web problem", "request fault", "protocol issue",
},
Keywords: []string{
"invalid", "method", "status", "response", "request", "header", "url", "timeout", "redirect", "forbidden",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return errorHTTP(f), nil return errorHTTP(f), nil
}, },
}) })
AddFuncLookup("errorhttpclient", Info{ AddFuncLookup("errorhttpclient", Info{
Display: "HTTP client error", Display: "HTTP Client Error",
Category: "error", Category: "error",
Description: "Failure or issue occurring within a client software that sends requests to web servers", Description: "Failure or issue occurring within a client software that sends requests to web servers",
Example: "request timeout", Example: "request timeout",
Output: "string", Output: "string",
Aliases: []string{
"client failure", "browser error", "request timeout", "frontend fault", "http client issue",
},
Keywords: []string{
"timeout", "request", "forbidden", "unauthorized",
"network", "connectivity", "invalid", "failure", "rejected",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return errorHTTPClient(f), nil return errorHTTPClient(f), nil
}, },
}) })
AddFuncLookup("errorhttpserver", Info{ AddFuncLookup("errorhttpserver", Info{
Display: "HTTP server error", Display: "HTTP Server Error",
Category: "error", Category: "error",
Description: "Failure or issue occurring within a server software that recieves requests from clients", Description: "Failure or issue occurring within a server software that receives requests from clients",
Example: "internal server error", Example: "internal server error",
Output: "string", Output: "string",
Aliases: []string{
"server fault", "backend error", "host issue", "service failure", "internal error",
},
Keywords: []string{
"unavailable", "overload", "gateway", "crash", "timeout", "backend", "processing", "failure", "503", "unexpected",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return errorHTTPServer(f), nil return errorHTTPServer(f), nil
}, },
}) })
AddFuncLookup("errorruntime", Info{ AddFuncLookup("errorruntime", Info{
Display: "Runtime error", Display: "Runtime Error",
Category: "error", Category: "error",
Description: "Malfunction occuring during program execution, often causing abrupt termination or unexpected behavior", Description: "Malfunction occurring during program execution, often causing abrupt termination or unexpected behavior",
Example: "address out of bounds", Example: "address out of bounds",
Output: "string", Output: "string",
Aliases: []string{
"execution error", "program crash", "runtime failure", "unexpected fault", "software halt",
},
Keywords: []string{
"execution", "segmentation", "overflow", "invalid", "null", "panic", "crash", "termination", "exception", "bug",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return errorRuntime(f), nil return errorRuntime(f), nil
}, },
}) })
AddFuncLookup("errorvalidation", Info{ AddFuncLookup("errorvalidation", Info{
Display: "Validation error", Display: "Validation Error",
Category: "error", Category: "error",
Description: "Occurs when input data fails to meet required criteria or format specifications", Description: "Occurs when input data fails to meet required criteria or format specifications",
Example: "missing required field", Example: "missing required field",
Output: "string", Output: "string",
Aliases: []string{
"invalid input", "format error", "data check failure", "input rejection", "criteria mismatch",
},
Keywords: []string{
"missing", "required", "field", "constraint", "format", "rule", "criteria", "restriction", "validation", "check",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return errorValidation(f), nil return errorValidation(f), nil
}, },
}) })
} }

View File

@ -27,13 +27,11 @@ func New(seed uint64) *Faker {
// If seed is 0, use a random crypto seed // If seed is 0, use a random crypto seed
if seed == 0 { if seed == 0 {
faker := NewFaker(source.NewCrypto(), false) faker := NewFaker(source.NewCrypto(), false)
seed = faker.Uint64()
return NewFaker(rand.NewPCG(faker.Uint64(), faker.Uint64()), true)
} }
return &Faker{ return NewFaker(rand.NewPCG(seed, seed), true)
Rand: rand.NewPCG(seed, seed),
Locked: true,
}
} }
// NewFaker takes in a rand.Source and thread lock state and returns a new Faker struct // NewFaker takes in a rand.Source and thread lock state and returns a new Faker struct

View File

@ -23,6 +23,12 @@ func addFileLookup() {
Description: "Suffix appended to a filename indicating its format or type", Description: "Suffix appended to a filename indicating its format or type",
Example: "nes", Example: "nes",
Output: "string", Output: "string",
Aliases: []string{
"extension", "file suffix", "filename ending", "type indicator", "file ending", "format suffix",
},
Keywords: []string{
"file", "appended", "indicating", "format", "type", "filename", "suffix", "descriptor", "notation", "identifier",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return fileExtension(f), nil return fileExtension(f), nil
}, },
@ -34,6 +40,12 @@ func addFileLookup() {
Description: "Defines file format and nature for browsers and email clients using standardized identifiers", Description: "Defines file format and nature for browsers and email clients using standardized identifiers",
Example: "application/json", Example: "application/json",
Output: "string", Output: "string",
Aliases: []string{
"mime type", "content type", "internet media type", "media format", "standard identifier", "file format",
},
Keywords: []string{
"file", "defines", "nature", "clients", "identifiers", "application", "json", "browser", "email", "protocol",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return fileMimeType(f), nil return fileMimeType(f), nil
}, },

View File

@ -110,6 +110,8 @@ func addFinanceLookup() {
Description: "Unique identifier for securities, especially bonds, in the United States and Canada", Description: "Unique identifier for securities, especially bonds, in the United States and Canada",
Example: "38259P508", Example: "38259P508",
Output: "string", Output: "string",
Aliases: []string{"identifier", "bond", "security", "us", "canada", "unique"},
Keywords: []string{"finance", "investment", "trading", "securities", "38259p508", "checksum", "validation", "market"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return cusip(f), nil return cusip(f), nil
}, },
@ -120,6 +122,8 @@ func addFinanceLookup() {
Description: "International standard code for uniquely identifying securities worldwide", Description: "International standard code for uniquely identifying securities worldwide",
Example: "CVLRQCZBXQ97", Example: "CVLRQCZBXQ97",
Output: "string", Output: "string",
Aliases: []string{"international", "securities", "identifier", "stock", "bond", "security"},
Keywords: []string{"finance", "investment", "trading", "cvlrqczbxq97", "worldwide", "standard", "code", "global"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return isin(f), nil return isin(f), nil
}, },

View File

@ -93,6 +93,18 @@ func addFoodLookup() {
Description: "Edible plant part, typically sweet, enjoyed as a natural snack or dessert", Description: "Edible plant part, typically sweet, enjoyed as a natural snack or dessert",
Example: "Peach", Example: "Peach",
Output: "string", Output: "string",
Aliases: []string{
"fruit item",
"natural snack",
"sweet produce",
"edible plant food",
"dessert fruit",
},
Keywords: []string{
"edible", "plant", "peach",
"snack", "dessert", "sweet", "natural",
"produce", "fresh",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return fruit(f), nil return fruit(f), nil
}, },
@ -104,6 +116,18 @@ func addFoodLookup() {
Description: "Edible plant or part of a plant, often used in savory cooking or salads", Description: "Edible plant or part of a plant, often used in savory cooking or salads",
Example: "Amaranth Leaves", Example: "Amaranth Leaves",
Output: "string", Output: "string",
Aliases: []string{
"veggie",
"plant food",
"green produce",
"savory food",
"leafy edible",
},
Keywords: []string{
"greens", "produce", "amaranth",
"leaves", "cooking", "salads", "plant",
"edible", "savory",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return vegetable(f), nil return vegetable(f), nil
}, },
@ -115,6 +139,18 @@ func addFoodLookup() {
Description: "First meal of the day, typically eaten in the morning", Description: "First meal of the day, typically eaten in the morning",
Example: "Blueberry banana happy face pancakes", Example: "Blueberry banana happy face pancakes",
Output: "string", Output: "string",
Aliases: []string{
"morning meal",
"first meal",
"day starter",
"early food",
"sunrise meal",
},
Keywords: []string{
"morning", "meal", "start",
"pancakes", "blueberry", "banana", "food",
"first", "early",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return breakfast(f), nil return breakfast(f), nil
}, },
@ -126,6 +162,18 @@ func addFoodLookup() {
Description: "Midday meal, often lighter than dinner, eaten around noon", Description: "Midday meal, often lighter than dinner, eaten around noon",
Example: "No bake hersheys bar pie", Example: "No bake hersheys bar pie",
Output: "string", Output: "string",
Aliases: []string{
"midday meal",
"noon food",
"afternoon meal",
"light meal",
"daytime meal",
},
Keywords: []string{
"meal", "midday", "noon",
"lighter", "food", "pie", "bar",
"afternoon",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return lunch(f), nil return lunch(f), nil
}, },
@ -137,6 +185,18 @@ func addFoodLookup() {
Description: "Evening meal, typically the day's main and most substantial meal", Description: "Evening meal, typically the day's main and most substantial meal",
Example: "Wild addicting dip", Example: "Wild addicting dip",
Output: "string", Output: "string",
Aliases: []string{
"evening meal",
"main meal",
"days supper",
"night food",
"hearty meal",
},
Keywords: []string{
"supper", "evening", "meal",
"main", "substantial", "night", "food",
"heavy", "course",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return dinner(f), nil return dinner(f), nil
}, },
@ -148,6 +208,18 @@ func addFoodLookup() {
Description: "Liquid consumed for hydration, pleasure, or nutritional benefits", Description: "Liquid consumed for hydration, pleasure, or nutritional benefits",
Example: "Soda", Example: "Soda",
Output: "string", Output: "string",
Aliases: []string{
"beverage",
"refreshment",
"hydration",
"liquid food",
"consumable fluid",
},
Keywords: []string{
"soda", "liquid",
"pleasure", "nutrition", "fluid", "quencher",
"consumed",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return drink(f), nil return drink(f), nil
}, },
@ -156,9 +228,21 @@ func addFoodLookup() {
AddFuncLookup("snack", Info{ AddFuncLookup("snack", Info{
Display: "Snack", Display: "Snack",
Category: "food", Category: "food",
Description: "Random snack", Description: "Small, quick food item eaten between meals",
Example: "Small, quick food item eaten between meals", Example: "Trail mix",
Output: "string", Output: "string",
Aliases: []string{
"light bite",
"quick food",
"mini meal",
"finger food",
"nibble",
},
Keywords: []string{
"between", "meals", "quick",
"small", "food", "item", "random",
"bite", "treat",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return snack(f), nil return snack(f), nil
}, },
@ -170,8 +254,21 @@ func addFoodLookup() {
Description: "Sweet treat often enjoyed after a meal", Description: "Sweet treat often enjoyed after a meal",
Example: "French napoleons", Example: "French napoleons",
Output: "string", Output: "string",
Aliases: []string{
"after meal sweet",
"pastry treat",
"confection",
"final course",
"delicacy",
},
Keywords: []string{
"sweet", "treat", "meal",
"after", "pastry", "cake", "enjoyed",
"final", "sugar",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return dessert(f), nil return dessert(f), nil
}, },
}) })
} }

View File

@ -69,6 +69,18 @@ func addGameLookup() {
Description: "User-selected online username or alias used for identification in games", Description: "User-selected online username or alias used for identification in games",
Example: "footinterpret63", Example: "footinterpret63",
Output: "string", Output: "string",
Aliases: []string{
"player handle",
"gaming nickname",
"online tag",
"user alias",
"profile name",
},
Keywords: []string{
"user-selected", "username",
"alias", "identification", "online", "gaming",
"video", "games", "player",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return gamertag(f), nil return gamertag(f), nil
}, },
@ -80,6 +92,18 @@ func addGameLookup() {
Description: "Small, cube-shaped objects used in games of chance for random outcomes", Description: "Small, cube-shaped objects used in games of chance for random outcomes",
Example: "[5, 2, 3]", Example: "[5, 2, 3]",
Output: "[]uint", Output: "[]uint",
Aliases: []string{
"rolling cubes",
"chance cubes",
"game dice",
"random rollers",
"luck blocks",
},
Keywords: []string{
"games", "cube-shaped", "chance",
"random", "outcomes", "roll", "sides",
"objects", "probability",
},
Params: []Param{ Params: []Param{
{Field: "numdice", Display: "Number of Dice", Type: "uint", Default: "1", Description: "Number of dice to roll"}, {Field: "numdice", Display: "Number of Dice", Type: "uint", Default: "1", Description: "Number of dice to roll"},
{Field: "sides", Display: "Number of Sides", Type: "[]uint", Default: "[6]", Description: "Number of sides on each dice"}, {Field: "sides", Display: "Number of Sides", Type: "[]uint", Default: "[6]", Description: "Number of sides on each dice"},
@ -98,4 +122,5 @@ func addGameLookup() {
return dice(f, numDice, sides), nil return dice(f, numDice, sides), nil
}, },
}) })
} }

View File

@ -47,84 +47,77 @@ func generate(f *Faker, dataVal string) (string, error) {
dataVal = replaceWithLetters(f, dataVal) dataVal = replaceWithLetters(f, dataVal)
// Check if string has any replaceable values // Check if string has any replaceable values
// Even if it doesnt its ok we will just return the string if !strings.Contains(dataVal, "{") {
if !strings.Contains(dataVal, "{") && !strings.Contains(dataVal, "}") {
return dataVal, nil return dataVal, nil
} }
// Variables to identify the index in which it exists var result strings.Builder
startCurly := -1 result.Grow(len(dataVal) * 2) // Pre-allocate with estimate
startCurlyIgnore := []int{}
endCurly := -1
endCurlyIgnore := []int{}
// Loop through string characters i := 0
for i := 0; i < len(dataVal); i++ { for i < len(dataVal) {
// Check for ignores if equal skip // Find next opening brace
shouldSkip := false start := strings.IndexByte(dataVal[i:], '{')
for _, igs := range startCurlyIgnore { if start == -1 {
if i == igs { // No more replacements, append rest and break
shouldSkip = true result.WriteString(dataVal[i:])
break
}
start += i
// Append everything before the brace
result.WriteString(dataVal[i:start])
// Find matching closing brace (handle nested brackets)
end := -1
depth := 0
for j := start; j < len(dataVal); j++ {
if dataVal[j] == '{' {
depth++
} else if dataVal[j] == '}' {
depth--
if depth == 0 {
end = j
break
}
} }
} }
for _, ige := range endCurlyIgnore {
if i == ige { if end == -1 {
shouldSkip = true // No closing brace, append rest and break
} result.WriteString(dataVal[start:])
} break
if shouldSkip {
continue
} }
// Identify items between brackets. Ex: {firstname} // Extract function name and params
if string(dataVal[i]) == "{" { fParts := dataVal[start+1 : end]
startCurly = i fName, fParams, _ := strings.Cut(fParts, ":")
continue
}
if startCurly != -1 && string(dataVal[i]) == "}" {
endCurly = i
}
if startCurly == -1 || endCurly == -1 {
continue
}
// Get the value between brackets // Check if it's a replaceable lookup function
fParts := dataVal[startCurly+1 : endCurly]
// Check if has params separated by :
fNameSplit := strings.SplitN(fParts, ":", 2)
fName := ""
fParams := ""
if len(fNameSplit) >= 1 {
fName = fNameSplit[0]
}
if len(fNameSplit) >= 2 {
fParams = fNameSplit[1]
}
// Check to see if its a replaceable lookup function
if info := GetFuncLookup(fName); info != nil { if info := GetFuncLookup(fName); info != nil {
// Get parameters, make sure params and the split both have values // Get parameters
mapParams := NewMapParams() var mapParams *MapParams
paramsLen := len(info.Params) paramsLen := len(info.Params)
// If just one param and its a string simply just pass it if paramsLen > 0 && fParams != "" {
if paramsLen == 1 && info.Params[0].Type == "string" { mapParams = NewMapParams()
mapParams.Add(info.Params[0].Field, fParams) // If just one param and its a string simply just pass it
} else if paramsLen > 0 && fParams != "" { if paramsLen == 1 && info.Params[0].Type == "string" {
var err error mapParams.Add(info.Params[0].Field, fParams)
splitVals, err := funcLookupSplit(fParams) } else {
if err != nil { splitVals, err := funcLookupSplit(fParams)
return "", err if err != nil {
return "", err
}
mapParams, err = addSplitValsToMapParams(splitVals, info, mapParams)
if err != nil {
return "", err
}
} }
mapParams, err = addSplitValsToMapParams(splitVals, info, mapParams) if mapParams.Size() == 0 {
if err != nil { mapParams = nil
return "", err
} }
} }
if mapParams.Size() == 0 {
mapParams = nil
}
// Call function // Call function
fValue, err := info.Generate(f, mapParams, info) fValue, err := info.Generate(f, mapParams, info)
@ -132,30 +125,17 @@ func generate(f *Faker, dataVal string) (string, error) {
return "", err return "", err
} }
// Successfully found, run replace with new value // Write the generated value
dataVal = strings.Replace(dataVal, "{"+fParts+"}", fmt.Sprintf("%v", fValue), 1) result.WriteString(fmt.Sprintf("%v", fValue))
i = end + 1
// Reset the curly index back to -1 and reset ignores } else {
startCurly = -1 // Not a valid function, keep the braces
startCurlyIgnore = []int{} result.WriteString(dataVal[start : end+1])
endCurly = -1 i = end + 1
endCurlyIgnore = []int{}
i = -1 // Reset back to the start of the string
continue
} }
// Couldnt find anything - mark curly brackets to skip and rerun
startCurlyIgnore = append(startCurlyIgnore, startCurly)
endCurlyIgnore = append(endCurlyIgnore, endCurly)
// Reset the curly index back to -1
startCurly = -1
endCurly = -1
i = -1 // Reset back to the start of the string
continue
} }
return dataVal, nil return result.String(), nil
} }
// FixedWidthOptions defines values needed for csv generation // FixedWidthOptions defines values needed for csv generation
@ -489,6 +469,19 @@ func addGenerateLookup() {
Description: "Random string generated from string value based upon available data sets", Description: "Random string generated from string value based upon available data sets",
Example: "{firstname} {lastname} {email} - Markus Moen markusmoen@pagac.net", Example: "{firstname} {lastname} {email} - Markus Moen markusmoen@pagac.net",
Output: "string", Output: "string",
Aliases: []string{
"template expander",
"placeholder interpolator",
"variable substitution",
"token formatter",
"pattern builder",
"macro resolver",
},
Keywords: []string{
"upon", "datasets", "random",
"string", "value", "available", "data",
"sets", "based",
},
Params: []Param{ Params: []Param{
{Field: "str", Display: "String", Type: "string", Description: "String value to generate from"}, {Field: "str", Display: "String", Type: "string", Description: "String value to generate from"},
}, },
@ -517,6 +510,12 @@ Alayna Wuckert santinostanton@carroll.biz g7sLrS0gEwLO 46
Lura Lockman zacherykuhic@feil.name S8gV7Z64KlHG 12`, Lura Lockman zacherykuhic@feil.name S8gV7Z64KlHG 12`,
Output: "[]byte", Output: "[]byte",
ContentType: "text/plain", ContentType: "text/plain",
Aliases: []string{
"fixed rows", "columnar data", "padded text", "aligned output", "structured fields",
},
Keywords: []string{
"tabular", "data", "format", "alignment", "columns", "rows", "layout", "monospace", "table", "presentation",
},
Params: []Param{ Params: []Param{
{Field: "rowcount", Display: "Row Count", Type: "int", Default: "10", Description: "Number of rows"}, {Field: "rowcount", Display: "Row Count", Type: "int", Default: "10", Description: "Number of rows"},
{Field: "fields", Display: "Fields", Type: "[]Field", Description: "Fields name, function and params"}, {Field: "fields", Display: "Fields", Type: "[]Field", Description: "Fields name, function and params"},
@ -562,6 +561,19 @@ Lura Lockman zacherykuhic@feil.name S8gV7Z64KlHG 12`,
Description: "Pattern-matching tool used in text processing to search and manipulate strings", Description: "Pattern-matching tool used in text processing to search and manipulate strings",
Example: "[abcdef]{5} - affec", Example: "[abcdef]{5} - affec",
Output: "string", Output: "string",
Aliases: []string{
"regular expression",
"string matcher",
"text parser",
"pattern engine",
"token analyzer",
"rule evaluator",
},
Keywords: []string{
"strings", "re2", "syntax",
"pattern-matching", "tool", "search",
"validation", "compile", "replace",
},
Params: []Param{ Params: []Param{
{Field: "str", Display: "String", Type: "string", Description: "Regex RE2 syntax string"}, {Field: "str", Display: "String", Type: "string", Description: "Regex RE2 syntax string"},
}, },
@ -593,6 +605,19 @@ Lura Lockman zacherykuhic@feil.name S8gV7Z64KlHG 12`,
}`, }`,
Output: "map[string]any", Output: "map[string]any",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{
"associative array",
"lookup table",
"symbol table",
"keyed collection",
"map structure",
"object store",
},
Keywords: []string{
"stores", "key", "value",
"dictionary", "hash", "collection",
"pairs", "keys", "values", "structure",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return mapFunc(f), nil return mapFunc(f), nil
}, },

View File

@ -75,6 +75,13 @@ func addHackerLookup() {
Description: "Informal jargon and slang used in the hacking and cybersecurity community", Description: "Informal jargon and slang used in the hacking and cybersecurity community",
Example: "If we calculate the program, we can get to the AI pixel through the redundant XSS matrix!", Example: "If we calculate the program, we can get to the AI pixel through the redundant XSS matrix!",
Output: "string", Output: "string",
Aliases: []string{
"hacker jargon", "cyber phrase", "security slang", "tech quip", "infosec phrase",
},
Keywords: []string{
"phrase", "jargon", "slang", "informal", "community",
"calculate", "program", "ai", "pixel", "redundant", "xss", "matrix",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return hackerPhrase(f), nil return hackerPhrase(f), nil
}, },
@ -86,6 +93,13 @@ func addHackerLookup() {
Description: "Abbreviations and acronyms commonly used in the hacking and cybersecurity community", Description: "Abbreviations and acronyms commonly used in the hacking and cybersecurity community",
Example: "ADP", Example: "ADP",
Output: "string", Output: "string",
Aliases: []string{
"infosec acronym", "tech abbreviation", "security acronym", "cyber acronym", "hacker shorthand",
},
Keywords: []string{
"abbreviation", "acronym", "short", "code", "initialism",
"common", "used", "security", "community", "terminology",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return hackerAbbreviation(f), nil return hackerAbbreviation(f), nil
}, },
@ -97,6 +111,13 @@ func addHackerLookup() {
Description: "Adjectives describing terms often associated with hackers and cybersecurity experts", Description: "Adjectives describing terms often associated with hackers and cybersecurity experts",
Example: "wireless", Example: "wireless",
Output: "string", Output: "string",
Aliases: []string{
"hacker descriptor", "cyber adjective", "infosec modifier", "security adjective", "tech describing word",
},
Keywords: []string{
"adjective", "descriptive", "term", "modifier", "attribute",
"wireless", "connected", "digital", "virtual", "networked",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return hackerAdjective(f), nil return hackerAdjective(f), nil
}, },
@ -108,6 +129,13 @@ func addHackerLookup() {
Description: "Noun representing an element, tool, or concept within the realm of hacking and cybersecurity", Description: "Noun representing an element, tool, or concept within the realm of hacking and cybersecurity",
Example: "driver", Example: "driver",
Output: "string", Output: "string",
Aliases: []string{
"hacking tool", "cyber noun", "security concept", "tech object", "infosec element",
},
Keywords: []string{
"noun", "element", "tool", "concept", "object",
"driver", "exploit", "payload", "virus", "device",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return hackerNoun(f), nil return hackerNoun(f), nil
}, },
@ -119,6 +147,13 @@ func addHackerLookup() {
Description: "Verbs associated with actions and activities in the field of hacking and cybersecurity", Description: "Verbs associated with actions and activities in the field of hacking and cybersecurity",
Example: "synthesize", Example: "synthesize",
Output: "string", Output: "string",
Aliases: []string{
"hacking verb", "cyber action", "infosec verb", "tech activity", "security verb",
},
Keywords: []string{
"verb", "action", "activity", "task", "operation",
"synthesize", "exploit", "inject", "bypass", "scan",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return hackerVerb(f), nil return hackerVerb(f), nil
}, },
@ -130,6 +165,13 @@ func addHackerLookup() {
Description: "Verb describing actions and activities related to hacking, often involving computer systems and security", Description: "Verb describing actions and activities related to hacking, often involving computer systems and security",
Example: "connecting", Example: "connecting",
Output: "string", Output: "string",
Aliases: []string{
"hacking action", "present participle", "cyber verb", "infosec activity", "progressive verb",
},
Keywords: []string{
"verb", "ing", "connecting", "probing", "listening",
"systems", "process", "computer", "security", "operation",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return hackeringVerb(f), nil return hackeringVerb(f), nil
}, },

View File

@ -1,8 +1,6 @@
package gofakeit package gofakeit
import ( import "strings"
"errors"
)
// HipsterWord will return a single hipster word // HipsterWord will return a single hipster word
func HipsterWord() string { return hipsterWord(GlobalFaker) } func HipsterWord() string { return hipsterWord(GlobalFaker) }
@ -12,36 +10,43 @@ func (f *Faker) HipsterWord() string { return hipsterWord(f) }
func hipsterWord(f *Faker) string { return getRandValue(f, []string{"hipster", "word"}) } func hipsterWord(f *Faker) string { return getRandValue(f, []string{"hipster", "word"}) }
// HipsterSentence will generate a random sentence // HipsterSentence will generate a random hipster sentence
func HipsterSentence(wordCount int) string { return hipsterSentence(GlobalFaker, wordCount) } func HipsterSentence() string { return hipsterSentence(GlobalFaker) }
// HipsterSentence will generate a random sentence // HipsterSentence will generate a random hipster sentence
func (f *Faker) HipsterSentence(wordCount int) string { return hipsterSentence(f, wordCount) } func (f *Faker) HipsterSentence() string { return hipsterSentence(f) }
func hipsterSentence(f *Faker, wordCount int) string { func hipsterSentence(f *Faker) string {
return sentenceGen(f, wordCount, hipsterWord) sentence, err := generate(f, getRandValue(f, []string{"hipster", "sentence"}))
if err != nil {
return ""
}
// Capitalize the first letter
sentence = strings.ToUpper(sentence[:1]) + sentence[1:]
return sentence
} }
// HipsterParagraph will generate a random paragraphGenerator // HipsterParagraph will generate a random hipster paragraph
// Set Paragraph Count func HipsterParagraph() string {
// Set Sentence Count return hipsterParagraph(GlobalFaker)
// Set Word Count
// Set Paragraph Separator
func HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return hipsterParagraph(GlobalFaker, paragraphCount, sentenceCount, wordCount, separator)
} }
// HipsterParagraph will generate a random paragraphGenerator // HipsterParagraph will generate a random hipster paragraph
// Set Paragraph Count func (f *Faker) HipsterParagraph() string {
// Set Sentence Count return hipsterParagraph(f)
// Set Word Count
// Set Paragraph Separator
func (f *Faker) HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return hipsterParagraph(f, paragraphCount, sentenceCount, wordCount, separator)
} }
func hipsterParagraph(f *Faker, paragraphCount int, sentenceCount int, wordCount int, separator string) string { func hipsterParagraph(f *Faker) string {
return paragraphGen(f, paragrapOptions{paragraphCount, sentenceCount, wordCount, separator}, hipsterSentence) // generate 2-5 sentences
sentenceCount := f.Number(2, 5)
sentences := make([]string, sentenceCount)
for i := 0; i < sentenceCount; i++ {
sentences[i] = hipsterSentence(f)
}
return strings.Join(sentences, " ")
} }
func addHipsterLookup() { func addHipsterLookup() {
@ -51,6 +56,8 @@ func addHipsterLookup() {
Description: "Trendy and unconventional vocabulary used by hipsters to express unique cultural preferences", Description: "Trendy and unconventional vocabulary used by hipsters to express unique cultural preferences",
Example: "microdosing", Example: "microdosing",
Output: "string", Output: "string",
Aliases: []string{"word", "trendy", "unconventional", "vocabulary", "culture", "modern"},
Keywords: []string{"hipster", "preferences", "microdosing", "artisanal", "craft", "organic", "sustainable", "authentic"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return hipsterWord(f), nil return hipsterWord(f), nil
}, },
@ -60,21 +67,12 @@ func addHipsterLookup() {
Display: "Hipster Sentence", Display: "Hipster Sentence",
Category: "hipster", Category: "hipster",
Description: "Sentence showcasing the use of trendy and unconventional vocabulary associated with hipster culture", Description: "Sentence showcasing the use of trendy and unconventional vocabulary associated with hipster culture",
Example: "Microdosing roof chia echo pickled.", Example: "Soul loops with you probably haven't heard of them undertones.",
Output: "string", Output: "string",
Params: []Param{ Aliases: []string{"sentence", "trendy", "unconventional", "vocabulary", "culture", "modern"},
{Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"}, Keywords: []string{"hipster", "showcasing", "microdosing", "roof", "chia", "echo", "pickled", "artisanal"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
wordCount, err := info.GetInt(m, "wordcount") return hipsterSentence(f), nil
if err != nil {
return nil, err
}
if wordCount <= 0 || wordCount > 50 {
return nil, errors.New("invalid word count, must be greater than 0, less than 50")
}
return hipsterSentence(f, wordCount), nil
}, },
}) })
@ -82,49 +80,12 @@ func addHipsterLookup() {
Display: "Hipster Paragraph", Display: "Hipster Paragraph",
Category: "hipster", Category: "hipster",
Description: "Paragraph showcasing the use of trendy and unconventional vocabulary associated with hipster culture", Description: "Paragraph showcasing the use of trendy and unconventional vocabulary associated with hipster culture",
Example: `Microdosing roof chia echo pickled meditation cold-pressed raw denim fingerstache normcore sriracha pork belly. Wolf try-hard pop-up blog tilde hashtag health butcher waistcoat paleo portland vinegar. Microdosing sartorial blue bottle slow-carb freegan five dollar toast you probably haven't heard of them asymmetrical chia farm-to-table narwhal banjo. Gluten-free blog authentic literally synth vinyl meh ethical health fixie banh mi Yuccie. Try-hard drinking squid seitan cray VHS echo chillwave hammock kombucha food truck sustainable. Example: "Single-origin austin, double why. Tag it Yuccie, keep it any. Ironically pug, sincerely several. Roof > helvetica, discuss. From France to Jersey, chasing ennui.",
Output: "string",
Pug bushwick hella tote bag cliche direct trade waistcoat yr waistcoat knausgaard pour-over master. Pitchfork jean shorts franzen flexitarian distillery hella meggings austin knausgaard crucifix wolf heirloom. Crucifix food truck you probably haven't heard of them trust fund fixie gentrify pitchfork stumptown mlkshk umami chambray blue bottle. 3 wolf moon swag +1 biodiesel knausgaard semiotics taxidermy meh artisan hoodie +1 blue bottle. Fashion axe forage mixtape Thundercats pork belly whatever 90's beard selfies chambray cred mlkshk. Aliases: []string{"paragraph", "trendy", "unconventional", "vocabulary", "culture", "modern"},
Keywords: []string{"hipster", "showcasing", "meditation", "cold-pressed", "raw", "denim", "fingerstache", "normcore", "sriracha"},
Shabby chic typewriter VHS readymade lo-fi bitters PBR&B gentrify lomo raw denim freegan put a bird on it. Raw denim cliche dreamcatcher pug fixie park trust fund migas fingerstache sriracha +1 mustache. Tilde shoreditch kickstarter franzen dreamcatcher green juice mustache neutra polaroid stumptown organic schlitz. Flexitarian ramps chicharrones kogi lo-fi mustache tilde forage street church-key williamsburg taxidermy. Chia mustache plaid mumblecore squid slow-carb disrupt Thundercats goth shoreditch master direct trade.`,
Output: "string",
Params: []Param{
{Field: "paragraphcount", Display: "Paragraph Count", Type: "int", Default: "2", Description: "Number of paragraphs"},
{Field: "sentencecount", Display: "Sentence Count", Type: "int", Default: "2", Description: "Number of sentences in a paragraph"},
{Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"},
{Field: "paragraphseparator", Display: "Paragraph Separator", Type: "string", Default: "<br />", Description: "String value to add between paragraphs"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
paragraphCount, err := info.GetInt(m, "paragraphcount") return hipsterParagraph(f), nil
if err != nil {
return nil, err
}
if paragraphCount <= 0 || paragraphCount > 20 {
return nil, errors.New("invalid paragraph count, must be greater than 0, less than 20")
}
sentenceCount, err := info.GetInt(m, "sentencecount")
if err != nil {
return nil, err
}
if sentenceCount <= 0 || sentenceCount > 20 {
return nil, errors.New("invalid sentence count, must be greater than 0, less than 20")
}
wordCount, err := info.GetInt(m, "wordcount")
if err != nil {
return nil, err
}
if wordCount <= 0 || wordCount > 50 {
return nil, errors.New("invalid word count, must be greater than 0, less than 50")
}
paragraphSeparator, err := info.GetString(m, "paragraphseparator")
if err != nil {
return nil, err
}
return hipsterParagraph(f, paragraphCount, sentenceCount, wordCount, paragraphSeparator), nil
}, },
}) })
} }

View File

@ -99,6 +99,12 @@ func addHtmlLookup() {
Description: "Attribute used to define the name of an input element in web forms", Description: "Attribute used to define the name of an input element in web forms",
Example: "first_name", Example: "first_name",
Output: "string", Output: "string",
Aliases: []string{
"form field", "field name", "html input", "input identifier", "web attribute",
},
Keywords: []string{
"define", "attribute", "element", "parameter", "submission", "mapping", "key", "entry", "binding",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return inputName(f), nil return inputName(f), nil
}, },
@ -114,6 +120,13 @@ func addHtmlLookup() {
</svg>`, </svg>`,
Output: "string", Output: "string",
ContentType: "image/svg+xml", ContentType: "image/svg+xml",
Aliases: []string{
"vector graphic", "xml image", "scalable format", "web graphic", "svg file",
},
Keywords: []string{
"scalable", "vector", "graphics", "image", "drawing", "markup", "shape", "color", "path", "render",
},
Params: []Param{ Params: []Param{
{Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Width in px"}, {Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Width in px"},
{Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Height in px"}, {Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Height in px"},

127
vendor/github.com/brianvoe/gofakeit/v7/id.go generated vendored Normal file
View File

@ -0,0 +1,127 @@
package gofakeit
const (
idLength = 20
idBitsPerChar = 5
idAlphabetMask = (1 << idBitsPerChar) - 1
// readable 32 chars, (no 0, o, 1, i, l)
// 0 and o are removed to avoid confusion with each other
// 1, i, l are removed to avoid confusion with each other
// extra g was added to fit 32 chars
idAlphabetStr = "23456789abcdefgghjkmnpqrstuvwxyz"
hexDigits = "0123456789abcdef"
)
var (
idAlphabet = []byte(idAlphabetStr)
)
// ID will return a random unique identifier
func ID() string { return id(GlobalFaker) }
// ID will return a random unique identifier
func (f *Faker) ID() string { return id(f) }
func id(f *Faker) string {
out := make([]byte, idLength)
var cache uint64
var bits uint
for i := 0; i < idLength; {
if bits < idBitsPerChar {
cache = f.Uint64()
bits = 64
}
index := cache & idAlphabetMask
cache >>= idBitsPerChar
bits -= idBitsPerChar
// optimization: remove this check to avoid bounds check
// if index >= uint64(idAlphabetLen) {
// continue
// }
out[i] = idAlphabet[index]
i++
}
return string(out)
}
// UUID (version 4) will generate a random unique identifier based upon random numbers
func UUID() string { return uuid(GlobalFaker) }
// UUID (version 4) will generate a random unique identifier based upon random numbers
func (f *Faker) UUID() string { return uuid(f) }
func uuid(f *Faker) string {
const version = byte(4)
var uuid [16]byte
var r uint64
r = f.Uint64()
for i := 0; i < 8; i++ {
uuid[i] = byte(r)
r >>= 8
}
r = f.Uint64()
for i := 8; i < 16; i++ {
uuid[i] = byte(r)
r >>= 8
}
uuid[6] = (uuid[6] & 0x0f) | (version << 4)
uuid[8] = (uuid[8] & 0x3f) | 0x80
var buf [36]byte
encodeHexLower(buf[0:8], uuid[0:4])
buf[8] = dash
encodeHexLower(buf[9:13], uuid[4:6])
buf[13] = dash
encodeHexLower(buf[14:18], uuid[6:8])
buf[18] = dash
encodeHexLower(buf[19:23], uuid[8:10])
buf[23] = dash
encodeHexLower(buf[24:], uuid[10:])
return string(buf[:])
}
func encodeHexLower(dst, src []byte) {
for i, b := range src {
dst[i*2] = hexDigits[b>>4]
dst[i*2+1] = hexDigits[b&0x0f]
}
}
func addIDLookup() {
AddFuncLookup("id", Info{
Display: "ID",
Category: "id",
Description: "Generates a short, URL-safe base32 identifier using a custom alphabet that avoids lookalike characters",
Example: "pfsfktb87rcmj6bqha2fz9",
Output: "string",
Aliases: []string{"unique id", "random id", "base32 id", "url-safe id", "slug id", "short id"},
Keywords: []string{"random", "base32", "slug", "token", "url", "identifier", "nonsequential"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return id(f), nil
},
})
AddFuncLookup("uuid", Info{
Display: "UUID",
Category: "id",
Description: "Generates a RFC 4122 compliant version 4 UUID using the faker random source",
Example: "b4ddf623-4ea6-48e5-9292-541f028d1fdb",
Output: "string",
Aliases: []string{"identifier", "guid", "uuid v4", "128-bit", "uuid generator"},
Keywords: []string{"unique", "v4", "hex", "computer", "system", "random"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return uuid(f), nil
},
})
}

View File

@ -63,6 +63,8 @@ func addImageLookup() {
Example: "file.jpeg - bytes", Example: "file.jpeg - bytes",
Output: "[]byte", Output: "[]byte",
ContentType: "image/jpeg", ContentType: "image/jpeg",
Aliases: []string{"jpeg", "jpg", "format", "compression", "compatibility", "photo"},
Keywords: []string{"image", "efficient", "file", "bytes", "known", "rgba", "pixel", "width", "height"},
Params: []Param{ Params: []Param{
{Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Image width in px"}, {Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Image width in px"},
{Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Image height in px"}, {Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Image height in px"},
@ -95,6 +97,8 @@ func addImageLookup() {
Example: "file.png - bytes", Example: "file.png - bytes",
Output: "[]byte", Output: "[]byte",
ContentType: "image/png", ContentType: "image/png",
Aliases: []string{"png", "format", "lossless", "compression", "transparency", "graphic"},
Keywords: []string{"image", "support", "file", "bytes", "known", "rgba", "pixel", "width", "height"},
Params: []Param{ Params: []Param{
{Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Image width in px"}, {Field: "width", Display: "Width", Type: "int", Default: "500", Description: "Image width in px"},
{Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Image height in px"}, {Field: "height", Display: "Height", Type: "int", Default: "500", Description: "Image height in px"},

View File

@ -53,6 +53,25 @@ func url(f *Faker) string {
return url return url
} }
// UrlSlug will generate a random url slug with the specified number of words
func UrlSlug(words int) string { return urlSlug(GlobalFaker, words) }
// UrlSlug will generate a random url slug with the specified number of words
func (f *Faker) UrlSlug(words int) string { return urlSlug(f, words) }
func urlSlug(f *Faker, words int) string {
if words <= 0 {
words = 3
}
slug := make([]string, words)
for i := 0; i < words; i++ {
slug[i] = strings.ToLower(word(f))
}
return strings.Join(slug, "-")
}
// HTTPMethod will generate a random http method // HTTPMethod will generate a random http method
func HTTPMethod() string { return httpMethod(GlobalFaker) } func HTTPMethod() string { return httpMethod(GlobalFaker) }
@ -225,6 +244,18 @@ func operaUserAgent(f *Faker) string {
return "Opera/" + strconv.Itoa(randIntRange(f, 8, 10)) + "." + strconv.Itoa(randIntRange(f, 10, 99)) + " " + platform return "Opera/" + strconv.Itoa(randIntRange(f, 8, 10)) + "." + strconv.Itoa(randIntRange(f, 10, 99)) + " " + platform
} }
// APIUserAgent will generate a random API user agent string
func APIUserAgent() string { return apiUserAgent(GlobalFaker) }
// APIUserAgent will generate a random API user agent string
func (f *Faker) APIUserAgent() string { return apiUserAgent(f) }
func apiUserAgent(f *Faker) string {
ua := getRandValue(f, []string{"internet", "api"})
result, _ := generate(f, ua)
return result
}
// linuxPlatformToken will generate a random linux platform // linuxPlatformToken will generate a random linux platform
func linuxPlatformToken(f *Faker) string { func linuxPlatformToken(f *Faker) string {
return "X11; Linux " + getRandValue(f, []string{"computer", "linux_processor"}) return "X11; Linux " + getRandValue(f, []string{"computer", "linux_processor"})
@ -268,17 +299,45 @@ func addInternetLookup() {
Description: "Web address that specifies the location of a resource on the internet", Description: "Web address that specifies the location of a resource on the internet",
Example: "http://www.principalproductize.biz/target", Example: "http://www.principalproductize.biz/target",
Output: "string", Output: "string",
Aliases: []string{"url string", "web address", "internet link", "website url", "resource locator"},
Keywords: []string{"web", "address", "http", "https", "www", "protocol", "scheme", "path", "domain", "location", "resource"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return url(f), nil return url(f), nil
}, },
}) })
AddFuncLookup("urlslug", Info{
Display: "URL Slug",
Category: "internet",
Description: "Simplified and URL-friendly version of a string, typically used in web addresses",
Example: "bathe-regularly-quiver",
Output: "string",
Aliases: []string{"slug", "url path", "permalink", "friendly url"},
Keywords: []string{"url", "path", "hyphen", "dash", "seo", "friendly", "web", "address", "kebab", "separator"},
Params: []Param{
{Field: "words", Display: "Words", Type: "int", Default: "3", Description: "Number of words in the slug"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
words, err := info.GetInt(m, "words")
if err != nil {
return nil, err
}
if words <= 0 {
words = 3
}
return urlSlug(f, words), nil
},
})
AddFuncLookup("domainname", Info{ AddFuncLookup("domainname", Info{
Display: "Domain Name", Display: "Domain Name",
Category: "internet", Category: "internet",
Description: "Human-readable web address used to identify websites on the internet", Description: "Human-readable web address used to identify websites on the internet",
Example: "centraltarget.biz", Example: "centraltarget.biz",
Output: "string", Output: "string",
Aliases: []string{"domain name", "website name", "internet domain", "dns name", "site domain"},
Keywords: []string{"domain", "name", "web", "address", "dns", "hostname", "resolve", "centraltarget", "biz", "website"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return domainName(f), nil return domainName(f), nil
}, },
@ -290,6 +349,8 @@ func addInternetLookup() {
Description: "The part of a domain name that comes after the last dot, indicating its type or purpose", Description: "The part of a domain name that comes after the last dot, indicating its type or purpose",
Example: "org", Example: "org",
Output: "string", Output: "string",
Aliases: []string{"domain suffix", "domain extension", "top level domain", "domain ending"},
Keywords: []string{"domain", "suffix", "tld", "top-level", "extension", "org", "com", "net", "gov", "edu", "mil", "int"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return domainSuffix(f), nil return domainSuffix(f), nil
}, },
@ -301,6 +362,8 @@ func addInternetLookup() {
Description: "Numerical label assigned to devices on a network for identification and communication", Description: "Numerical label assigned to devices on a network for identification and communication",
Example: "222.83.191.222", Example: "222.83.191.222",
Output: "string", Output: "string",
Aliases: []string{"ip address", "network address", "internet address", "device ip", "ipv4 label"},
Keywords: []string{"ipv4", "ip", "network", "internet", "protocol", "communication", "dotted", "decimal"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return ipv4Address(f), nil return ipv4Address(f), nil
}, },
@ -312,6 +375,8 @@ func addInternetLookup() {
Description: "Numerical label assigned to devices on a network, providing a larger address space than IPv4 for internet communication", Description: "Numerical label assigned to devices on a network, providing a larger address space than IPv4 for internet communication",
Example: "2001:cafe:8898:ee17:bc35:9064:5866:d019", Example: "2001:cafe:8898:ee17:bc35:9064:5866:d019",
Output: "string", Output: "string",
Aliases: []string{"ip address", "network address", "internet address", "hex ip", "ipv6 label"},
Keywords: []string{"ipv6", "ip", "network", "protocol", "hexadecimal", "identification"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return ipv6Address(f), nil return ipv6Address(f), nil
}, },
@ -323,6 +388,8 @@ func addInternetLookup() {
Description: "Verb used in HTTP requests to specify the desired action to be performed on a resource", Description: "Verb used in HTTP requests to specify the desired action to be performed on a resource",
Example: "HEAD", Example: "HEAD",
Output: "string", Output: "string",
Aliases: []string{"http verb", "http action", "http request", "http command", "method name"},
Keywords: []string{"http", "method", "verb", "get", "post", "put", "delete", "patch", "options", "head", "request", "action"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return httpMethod(f), nil return httpMethod(f), nil
}, },
@ -334,6 +401,8 @@ func addInternetLookup() {
Description: "Classification used in logging to indicate the severity or priority of a log entry", Description: "Classification used in logging to indicate the severity or priority of a log entry",
Example: "error", Example: "error",
Output: "string", Output: "string",
Aliases: []string{"log severity", "logging level", "log classification", "priority level", "event level"},
Keywords: []string{"log", "level", "severity", "priority", "classification", "error", "warn", "info", "debug", "trace", "fatal", "critical"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return logLevel(f, ""), nil return logLevel(f, ""), nil
}, },
@ -345,6 +414,8 @@ func addInternetLookup() {
Description: "String sent by a web browser to identify itself when requesting web content", Description: "String sent by a web browser to identify itself when requesting web content",
Example: "Mozilla/5.0 (Windows NT 5.0) AppleWebKit/5362 (KHTML, like Gecko) Chrome/37.0.834.0 Mobile Safari/5362", Example: "Mozilla/5.0 (Windows NT 5.0) AppleWebKit/5362 (KHTML, like Gecko) Chrome/37.0.834.0 Mobile Safari/5362",
Output: "string", Output: "string",
Aliases: []string{"ua string", "browser ua", "http user agent", "client identifier", "browser identifier"},
Keywords: []string{"useragent", "browser", "http", "request", "mozilla", "applewebkit", "chrome", "firefox", "safari", "opera", "mobile"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return userAgent(f), nil return userAgent(f), nil
}, },
@ -356,6 +427,8 @@ func addInternetLookup() {
Description: "The specific identification string sent by the Google Chrome web browser when making requests on the internet", Description: "The specific identification string sent by the Google Chrome web browser when making requests on the internet",
Example: "Mozilla/5.0 (X11; Linux i686) AppleWebKit/5312 (KHTML, like Gecko) Chrome/39.0.836.0 Mobile Safari/5312", Example: "Mozilla/5.0 (X11; Linux i686) AppleWebKit/5312 (KHTML, like Gecko) Chrome/39.0.836.0 Mobile Safari/5312",
Output: "string", Output: "string",
Aliases: []string{"chrome ua", "chrome browser ua", "google chrome ua", "chrome identifier", "chrome user agent"},
Keywords: []string{"chrome", "google", "browser", "ua", "useragent", "applewebkit", "khtml", "gecko", "safari", "version"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return chromeUserAgent(f), nil return chromeUserAgent(f), nil
}, },
@ -367,6 +440,8 @@ func addInternetLookup() {
Description: "The specific identification string sent by the Firefox web browser when making requests on the internet", Description: "The specific identification string sent by the Firefox web browser when making requests on the internet",
Example: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_8_3 rv:7.0) Gecko/1900-07-01 Firefox/37.0", Example: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_8_3 rv:7.0) Gecko/1900-07-01 Firefox/37.0",
Output: "string", Output: "string",
Aliases: []string{"firefox ua", "firefox browser ua", "mozilla firefox ua", "gecko ua", "firefox identifier"},
Keywords: []string{"firefox", "mozilla", "browser", "ua", "useragent", "gecko", "macintosh", "ppc", "version"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return firefoxUserAgent(f), nil return firefoxUserAgent(f), nil
}, },
@ -378,6 +453,8 @@ func addInternetLookup() {
Description: "The specific identification string sent by the Opera web browser when making requests on the internet", Description: "The specific identification string sent by the Opera web browser when making requests on the internet",
Example: "Opera/8.39 (Macintosh; U; PPC Mac OS X 10_8_7; en-US) Presto/2.9.335 Version/10.00", Example: "Opera/8.39 (Macintosh; U; PPC Mac OS X 10_8_7; en-US) Presto/2.9.335 Version/10.00",
Output: "string", Output: "string",
Aliases: []string{"opera ua", "opera browser ua", "opera identifier", "opera client", "opera user agent"},
Keywords: []string{"opera", "presto", "ua", "browser", "useragent", "macintosh", "ppc", "os", "version"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return operaUserAgent(f), nil return operaUserAgent(f), nil
}, },
@ -389,17 +466,34 @@ func addInternetLookup() {
Description: "The specific identification string sent by the Safari web browser when making requests on the internet", Description: "The specific identification string sent by the Safari web browser when making requests on the internet",
Example: "Mozilla/5.0 (iPad; CPU OS 8_3_2 like Mac OS X; en-US) AppleWebKit/531.15.6 (KHTML, like Gecko) Version/4.0.5 Mobile/8B120 Safari/6531.15.6", Example: "Mozilla/5.0 (iPad; CPU OS 8_3_2 like Mac OS X; en-US) AppleWebKit/531.15.6 (KHTML, like Gecko) Version/4.0.5 Mobile/8B120 Safari/6531.15.6",
Output: "string", Output: "string",
Aliases: []string{"safari ua", "apple safari ua", "safari browser ua", "safari identifier", "safari user agent"},
Keywords: []string{"safari", "apple", "ipad", "os", "applewebkit", "khtml", "gecko", "browser", "ua", "mobile"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return safariUserAgent(f), nil return safariUserAgent(f), nil
}, },
}) })
AddFuncLookup("apiuseragent", Info{
Display: "API User Agent",
Category: "internet",
Description: "String sent by API clients, tools, or libraries to identify themselves when making HTTP requests",
Example: "curl/8.2.5",
Output: "string",
Aliases: []string{"api ua", "api client ua", "http client ua", "api identifier", "client user agent"},
Keywords: []string{"api", "useragent", "client", "http", "request", "curl", "python", "go", "java", "node", "postman", "tool", "library"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return apiUserAgent(f), nil
},
})
AddFuncLookup("httpstatuscode", Info{ AddFuncLookup("httpstatuscode", Info{
Display: "HTTP Status Code", Display: "HTTP Status Code",
Category: "internet", Category: "internet",
Description: "Random http status code", Description: "Random HTTP status code",
Example: "200", Example: "200",
Output: "int", Output: "int",
Aliases: []string{"http status", "response code", "http response", "server status", "status identifier"},
Keywords: []string{"http", "status", "code", "server", "response", "200", "404", "500", "301", "302", "401", "403"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return httpStatusCode(f), nil return httpStatusCode(f), nil
}, },
@ -411,6 +505,8 @@ func addInternetLookup() {
Description: "Three-digit number returned by a web server to indicate the outcome of an HTTP request", Description: "Three-digit number returned by a web server to indicate the outcome of an HTTP request",
Example: "404", Example: "404",
Output: "int", Output: "int",
Aliases: []string{"http status simple", "simple response code", "http response simple", "status code", "server code"},
Keywords: []string{"http", "status", "code", "server", "response", "200", "404", "500", "301", "302", "401", "403"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return httpStatusCodeSimple(f), nil return httpStatusCodeSimple(f), nil
}, },
@ -422,6 +518,8 @@ func addInternetLookup() {
Description: "Number indicating the version of the HTTP protocol used for communication between a client and a server", Description: "Number indicating the version of the HTTP protocol used for communication between a client and a server",
Example: "HTTP/1.1", Example: "HTTP/1.1",
Output: "string", Output: "string",
Aliases: []string{"http version", "protocol version", "http protocol", "http identifier", "http version string"},
Keywords: []string{"http", "version", "protocol", "communication", "client", "server"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return httpVersion(f), nil return httpVersion(f), nil
}, },
@ -433,8 +531,11 @@ func addInternetLookup() {
Description: "Unique identifier assigned to network interfaces, often used in Ethernet networks", Description: "Unique identifier assigned to network interfaces, often used in Ethernet networks",
Example: "cb:ce:06:94:22:e9", Example: "cb:ce:06:94:22:e9",
Output: "string", Output: "string",
Aliases: []string{"mac address", "hardware address", "ethernet address", "network identifier", "link-layer address"},
Keywords: []string{"mac", "address", "hardware", "ethernet", "network", "identifier", "oui", "vendor", "colon", "hexadecimal"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return macAddress(f), nil return macAddress(f), nil
}, },
}) })
} }

View File

@ -79,7 +79,7 @@ func jsonFunc(f *Faker, jo *JSONOptions) ([]byte, error) {
return nil, errors.New("invalid type, must be array or object") return nil, errors.New("invalid type, must be array or object")
} }
if jo.Fields == nil || len(jo.Fields) <= 0 { if len(jo.Fields) <= 0 {
return nil, errors.New("must pass fields in order to build json object(s)") return nil, errors.New("must pass fields in order to build json object(s)")
} }
@ -201,6 +201,8 @@ func addFileJSONLookup() {
]`, ]`,
Output: "[]byte", Output: "[]byte",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{"data", "interchange", "structured", "format", "serialization", "api"},
Keywords: []string{"object", "array", "fields", "indent", "rowcount", "type", "serialize", "deserialize", "marshal", "unmarshal"},
Params: []Param{ Params: []Param{
{Field: "type", Display: "Type", Type: "string", Default: "object", Options: []string{"object", "array"}, Description: "Type of JSON, object or array"}, {Field: "type", Display: "Type", Type: "string", Default: "object", Options: []string{"object", "array"}, Description: "Type of JSON, object or array"},
{Field: "rowcount", Display: "Row Count", Type: "int", Default: "100", Description: "Number of rows in JSON array"}, {Field: "rowcount", Display: "Row Count", Type: "int", Default: "100", Description: "Number of rows in JSON array"},

View File

@ -41,6 +41,8 @@ func addLanguagesLookup() {
Description: "System of communication using symbols, words, and grammar to convey meaning between individuals", Description: "System of communication using symbols, words, and grammar to convey meaning between individuals",
Example: "Kazakh", Example: "Kazakh",
Output: "string", Output: "string",
Aliases: []string{"spoken tongue", "dialect name", "native language", "speech form", "linguistic system"},
Keywords: []string{"communication", "symbols", "words", "grammar", "meaning", "system", "convey", "individuals"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return language(f), nil return language(f), nil
}, },
@ -52,6 +54,8 @@ func addLanguagesLookup() {
Description: "Shortened form of a language's name", Description: "Shortened form of a language's name",
Example: "kk", Example: "kk",
Output: "string", Output: "string",
Aliases: []string{"language code", "iso code", "locale code", "short form", "abbreviated tag"},
Keywords: []string{"abbreviation", "identifier", "shortened", "representation", "two-letter", "three-letter", "standard", "locale"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return languageAbbreviation(f), nil return languageAbbreviation(f), nil
}, },
@ -63,6 +67,8 @@ func addLanguagesLookup() {
Description: "Set of guidelines and standards for identifying and representing languages in computing and internet protocols", Description: "Set of guidelines and standards for identifying and representing languages in computing and internet protocols",
Example: "en-US", Example: "en-US",
Output: "string", Output: "string",
Aliases: []string{"bcp47 tag", "language tag", "locale identifier", "regional code", "protocol language code"},
Keywords: []string{"guidelines", "standards", "rfc", "internet", "protocols", "representation", "locale", "region", "country"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return languageBCP(f), nil return languageBCP(f), nil
}, },
@ -74,6 +80,8 @@ func addLanguagesLookup() {
Description: "Formal system of instructions used to create software and perform computational tasks", Description: "Formal system of instructions used to create software and perform computational tasks",
Example: "Go", Example: "Go",
Output: "string", Output: "string",
Aliases: []string{"coding language", "scripting language", "software language", "development language", "computer language"},
Keywords: []string{"programming", "instructions", "formal", "system", "tasks", "development", "compilation", "execution"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return programmingLanguage(f), nil return programmingLanguage(f), nil
}, },

View File

@ -11,7 +11,7 @@ import (
// FuncLookups is the primary map array with mapping to all available data // FuncLookups is the primary map array with mapping to all available data
var FuncLookups map[string]Info var FuncLookups map[string]Info
var lockFuncLookups sync.Mutex var lockFuncLookups sync.RWMutex
// MapParams is the values to pass into a lookup generate // MapParams is the values to pass into a lookup generate
type MapParams map[string]MapParamsValue type MapParams map[string]MapParamsValue
@ -20,15 +20,17 @@ type MapParamsValue []string
// Info structures fields to better break down what each one generates // Info structures fields to better break down what each one generates
type Info struct { type Info struct {
Display string `json:"display"` Display string `json:"display"` // display name
Category string `json:"category"` Category string `json:"category"` // category
Description string `json:"description"` Description string `json:"description"` // description
Example string `json:"example"` Example string `json:"example"` // example
Output string `json:"output"` Output string `json:"output"` // output type
ContentType string `json:"content_type"` Aliases []string `json:"aliases"` // alt names users might type
Params []Param `json:"params"` Keywords []string `json:"keywords"` // free words and domain terms
Any any `json:"any"` ContentType string `json:"content_type"` // content type
Generate func(f *Faker, m *MapParams, info *Info) (any, error) `json:"-"` Params []Param `json:"params"` // params
Any any `json:"any"` // any
Generate func(f *Faker, m *MapParams, info *Info) (any, error) `json:"-"` // generate function
} }
// Param is a breakdown of param requirements and type definition // Param is a breakdown of param requirements and type definition
@ -54,6 +56,7 @@ func init() { initLookup() }
// init will add all the functions to MapLookups // init will add all the functions to MapLookups
func initLookup() { func initLookup() {
addAddressLookup() addAddressLookup()
addAirlineLookup()
addAnimalLookup() addAnimalLookup()
addAppLookup() addAppLookup()
addAuthLookup() addAuthLookup()
@ -78,10 +81,10 @@ func initLookup() {
addHackerLookup() addHackerLookup()
addHipsterLookup() addHipsterLookup()
addHtmlLookup() addHtmlLookup()
addIDLookup()
addImageLookup() addImageLookup()
addInternetLookup() addInternetLookup()
addLanguagesLookup() addLanguagesLookup()
addLoremLookup()
addMinecraftLookup() addMinecraftLookup()
addMiscLookup() addMiscLookup()
addMovieLookup() addMovieLookup()
@ -90,6 +93,7 @@ func initLookup() {
addPersonLookup() addPersonLookup()
addProductLookup() addProductLookup()
addSchoolLookup() addSchoolLookup()
addSongLookup()
addStringLookup() addStringLookup()
addTemplateLookup() addTemplateLookup()
addWeightedLookup() addWeightedLookup()
@ -97,15 +101,12 @@ func initLookup() {
addWordAdverbLookup() addWordAdverbLookup()
addWordConnectiveLookup() addWordConnectiveLookup()
addWordGeneralLookup() addWordGeneralLookup()
addWordGrammerLookup()
addWordNounLookup() addWordNounLookup()
addWordPhraseLookup()
addWordPrepositionLookup() addWordPrepositionLookup()
addWordPronounLookup() addWordPronounLookup()
addWordSentenceLookup()
addWordVerbLookup() addWordVerbLookup()
addWordCommentLookup()
addWordMiscLookup() addWordMiscLookup()
addTextLookup()
} }
// internalFuncLookups is the internal map array with mapping to all available data // internalFuncLookups is the internal map array with mapping to all available data
@ -192,6 +193,9 @@ func (m *MapParamsValue) UnmarshalJSON(data []byte) error {
} }
func GetRandomSimpleFunc(f *Faker) (string, Info) { func GetRandomSimpleFunc(f *Faker) (string, Info) {
lockFuncLookups.RLock()
defer lockFuncLookups.RUnlock()
// Loop through all the functions and add them to a slice // Loop through all the functions and add them to a slice
var keys []string var keys []string
for k, info := range FuncLookups { for k, info := range FuncLookups {
@ -210,18 +214,19 @@ func GetRandomSimpleFunc(f *Faker) (string, Info) {
// AddFuncLookup takes a field and adds it to map // AddFuncLookup takes a field and adds it to map
func AddFuncLookup(functionName string, info Info) { func AddFuncLookup(functionName string, info Info) {
if FuncLookups == nil {
FuncLookups = make(map[string]Info)
}
// Check content type // Check content type
if info.ContentType == "" { if info.ContentType == "" {
info.ContentType = "text/plain" info.ContentType = "text/plain"
} }
lockFuncLookups.Lock() lockFuncLookups.Lock()
defer lockFuncLookups.Unlock()
if FuncLookups == nil {
FuncLookups = make(map[string]Info)
}
FuncLookups[functionName] = info FuncLookups[functionName] = info
lockFuncLookups.Unlock()
} }
// GetFuncLookup will lookup // GetFuncLookup will lookup
@ -235,7 +240,10 @@ func GetFuncLookup(functionName string) *Info {
return &info return &info
} }
lockFuncLookups.RLock()
info, ok = FuncLookups[functionName] info, ok = FuncLookups[functionName]
lockFuncLookups.RUnlock()
if ok { if ok {
return &info return &info
} }
@ -245,14 +253,15 @@ func GetFuncLookup(functionName string) *Info {
// RemoveFuncLookup will remove a function from lookup // RemoveFuncLookup will remove a function from lookup
func RemoveFuncLookup(functionName string) { func RemoveFuncLookup(functionName string) {
lockFuncLookups.Lock()
defer lockFuncLookups.Unlock()
_, ok := FuncLookups[functionName] _, ok := FuncLookups[functionName]
if !ok { if !ok {
return return
} }
lockFuncLookups.Lock()
delete(FuncLookups, functionName) delete(FuncLookups, functionName)
lockFuncLookups.Unlock()
} }
// GetAny will retrieve Any field from Info // GetAny will retrieve Any field from Info

View File

@ -1,126 +0,0 @@
package gofakeit
import (
"errors"
)
// LoremIpsumWord will generate a random word
func LoremIpsumWord() string { return loremIpsumWord(GlobalFaker) }
// LoremIpsumWord will generate a random word
func (f *Faker) LoremIpsumWord() string { return loremIpsumWord(f) }
func loremIpsumWord(f *Faker) string { return getRandValue(f, []string{"lorem", "word"}) }
// LoremIpsumSentence will generate a random sentence
func LoremIpsumSentence(wordCount int) string {
return loremIpsumSentence(GlobalFaker, wordCount)
}
// LoremIpsumSentence will generate a random sentence
func (f *Faker) LoremIpsumSentence(wordCount int) string {
return loremIpsumSentence(f, wordCount)
}
func loremIpsumSentence(f *Faker, wordCount int) string {
return sentenceGen(f, wordCount, loremIpsumWord)
}
// LoremIpsumParagraph will generate a random paragraphGenerator
func LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return loremIpsumParagraph(GlobalFaker, paragraphCount, sentenceCount, wordCount, separator)
}
// LoremIpsumParagraph will generate a random paragraphGenerator
func (f *Faker) LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return loremIpsumParagraph(f, paragraphCount, sentenceCount, wordCount, separator)
}
func loremIpsumParagraph(f *Faker, paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return paragraphGen(f, paragrapOptions{paragraphCount, sentenceCount, wordCount, separator}, loremIpsumSentence)
}
func addLoremLookup() {
AddFuncLookup("loremipsumword", Info{
Display: "Lorem Ipsum Word",
Category: "word",
Description: "Word of the Lorem Ipsum placeholder text used in design and publishing",
Example: "quia",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return loremIpsumWord(f), nil
},
})
AddFuncLookup("loremipsumsentence", Info{
Display: "Lorem Ipsum Sentence",
Category: "word",
Description: "Sentence of the Lorem Ipsum placeholder text used in design and publishing",
Example: "Quia quae repellat consequatur quidem.",
Output: "string",
Params: []Param{
{Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
wordCount, err := info.GetInt(m, "wordcount")
if err != nil {
return nil, err
}
if wordCount <= 0 || wordCount > 50 {
return nil, errors.New("invalid word count, must be greater than 0, less than 50")
}
return loremIpsumSentence(f, wordCount), nil
},
})
AddFuncLookup("loremipsumparagraph", Info{
Display: "Lorem Ipsum Paragraph",
Category: "word",
Description: "Paragraph of the Lorem Ipsum placeholder text used in design and publishing",
Example: `Quia quae repellat consequatur quidem nisi quo qui voluptatum accusantium quisquam amet. Quas et ut non dolorem ipsam aut enim assumenda mollitia harum ut. Dicta similique veniam nulla voluptas at excepturi non ad maxime at non. Eaque hic repellat praesentium voluptatem qui consequuntur dolor iusto autem velit aut. Fugit tempore exercitationem harum consequatur voluptatum modi minima aut eaque et et.
Aut ea voluptatem dignissimos expedita odit tempore quod aut beatae ipsam iste. Minus voluptatibus dolorem maiores eius sed nihil vel enim odio voluptatem accusamus. Natus quibusdam temporibus tenetur cumque sint necessitatibus dolorem ex ducimus iusto ex. Voluptatem neque dicta explicabo officiis et ducimus sit ut ut praesentium pariatur. Illum molestias nisi at dolore ut voluptatem accusantium et fugiat et ut.
Explicabo incidunt reprehenderit non quia dignissimos recusandae vitae soluta quia et quia. Aut veniam voluptas consequatur placeat sapiente non eveniet voluptatibus magni velit eum. Nobis vel repellendus sed est qui autem laudantium quidem quam ullam consequatur. Aut iusto ut commodi similique quae voluptatem atque qui fugiat eum aut. Quis distinctio consequatur voluptatem vel aliquid aut laborum facere officiis iure tempora.`,
Output: "string",
Params: []Param{
{Field: "paragraphcount", Display: "Paragraph Count", Type: "int", Default: "2", Description: "Number of paragraphs"},
{Field: "sentencecount", Display: "Sentence Count", Type: "int", Default: "2", Description: "Number of sentences in a paragraph"},
{Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"},
{Field: "paragraphseparator", Display: "Paragraph Separator", Type: "string", Default: "<br />", Description: "String value to add between paragraphs"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
paragraphCount, err := info.GetInt(m, "paragraphcount")
if err != nil {
return nil, err
}
if paragraphCount <= 0 || paragraphCount > 20 {
return nil, errors.New("invalid paragraph count, must be greater than 0, less than 20")
}
sentenceCount, err := info.GetInt(m, "sentencecount")
if err != nil {
return nil, err
}
if sentenceCount <= 0 || sentenceCount > 20 {
return nil, errors.New("invalid sentence count, must be greater than 0, less than 20")
}
wordCount, err := info.GetInt(m, "wordcount")
if err != nil {
return nil, err
}
if wordCount <= 0 || wordCount > 50 {
return nil, errors.New("invalid word count, must be greater than 0, less than 50")
}
paragraphSeparator, err := info.GetString(m, "paragraphseparator")
if err != nil {
return nil, err
}
return loremIpsumParagraph(f, paragraphCount, sentenceCount, wordCount, paragraphSeparator), nil
},
})
}

BIN
vendor/github.com/brianvoe/gofakeit/v7/merch.png generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -171,6 +171,8 @@ func addMinecraftLookup() {
Description: "Naturally occurring minerals found in the game Minecraft, used for crafting purposes", Description: "Naturally occurring minerals found in the game Minecraft, used for crafting purposes",
Example: "coal", Example: "coal",
Output: "string", Output: "string",
Aliases: []string{"resource block", "crafting ore", "mining material", "mineral node", "in-game ore"},
Keywords: []string{"naturally", "occurring", "coal", "iron", "gold", "diamond", "lapis", "emerald", "redstone"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftOre(f), nil return minecraftOre(f), nil
}, },
@ -182,6 +184,8 @@ func addMinecraftLookup() {
Description: "Natural resource in Minecraft, used for crafting various items and building structures", Description: "Natural resource in Minecraft, used for crafting various items and building structures",
Example: "oak", Example: "oak",
Output: "string", Output: "string",
Aliases: []string{"tree log", "wood block", "timber type", "crafting wood", "building wood"},
Keywords: []string{"natural", "resource", "oak", "birch", "jungle", "spruce", "mangrove", "planks"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftWood(f), nil return minecraftWood(f), nil
}, },
@ -193,6 +197,8 @@ func addMinecraftLookup() {
Description: "Classification system for armor sets in Minecraft, indicating their effectiveness and protection level", Description: "Classification system for armor sets in Minecraft, indicating their effectiveness and protection level",
Example: "iron", Example: "iron",
Output: "string", Output: "string",
Aliases: []string{"armor level", "armor rank", "armor category", "tier type", "defense tier"},
Keywords: []string{"classification", "iron", "diamond", "netherite", "leather", "chainmail", "gold", "effectiveness", "defense"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftArmorTier(f), nil return minecraftArmorTier(f), nil
}, },
@ -204,6 +210,8 @@ func addMinecraftLookup() {
Description: "Component of an armor set in Minecraft, such as a helmet, chestplate, leggings, or boots", Description: "Component of an armor set in Minecraft, such as a helmet, chestplate, leggings, or boots",
Example: "helmet", Example: "helmet",
Output: "string", Output: "string",
Aliases: []string{"armor piece", "armor gear", "armor equipment", "armor slot", "protective item"},
Keywords: []string{"helmet", "chestplate", "leggings", "boots", "component", "set", "gear"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftArmorPart(f), nil return minecraftArmorPart(f), nil
}, },
@ -215,6 +223,8 @@ func addMinecraftLookup() {
Description: "Tools and items used in Minecraft for combat and defeating hostile mobs", Description: "Tools and items used in Minecraft for combat and defeating hostile mobs",
Example: "bow", Example: "bow",
Output: "string", Output: "string",
Aliases: []string{"combat item", "fighting tool", "attack weapon", "battle gear", "mob killer"},
Keywords: []string{"bow", "sword", "axe", "trident", "crossbow", "used", "combat", "damage"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftWeapon(f), nil return minecraftWeapon(f), nil
}, },
@ -226,6 +236,8 @@ func addMinecraftLookup() {
Description: "Items in Minecraft designed for specific tasks, including mining, digging, and building", Description: "Items in Minecraft designed for specific tasks, including mining, digging, and building",
Example: "shovel", Example: "shovel",
Output: "string", Output: "string",
Aliases: []string{"utility tool", "crafting tool", "gathering tool", "work tool", "task tool"},
Keywords: []string{"pickaxe", "axe", "hoe", "shovel", "fishing-rod", "tasks", "mining", "digging"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftTool(f), nil return minecraftTool(f), nil
}, },
@ -237,6 +249,8 @@ func addMinecraftLookup() {
Description: "Items used to change the color of various in-game objects", Description: "Items used to change the color of various in-game objects",
Example: "white", Example: "white",
Output: "string", Output: "string",
Aliases: []string{"color dye", "pigment item", "colorant", "dye material", "color change"},
Keywords: []string{"red", "blue", "green", "yellow", "white", "wool", "coloring", "sheep"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftDye(f), nil return minecraftDye(f), nil
}, },
@ -248,6 +262,8 @@ func addMinecraftLookup() {
Description: "Consumable items in Minecraft that provide nourishment to the player character", Description: "Consumable items in Minecraft that provide nourishment to the player character",
Example: "apple", Example: "apple",
Output: "string", Output: "string",
Aliases: []string{"edible item", "consumable block", "nourishment item", "hunger food", "survival food"},
Keywords: []string{"apple", "bread", "meat", "carrot", "potato", "steak", "restore", "health", "hunger"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftFood(f), nil return minecraftFood(f), nil
}, },
@ -259,6 +275,8 @@ func addMinecraftLookup() {
Description: "Non-hostile creatures in Minecraft, often used for resources and farming", Description: "Non-hostile creatures in Minecraft, often used for resources and farming",
Example: "chicken", Example: "chicken",
Output: "string", Output: "string",
Aliases: []string{"farm animal", "passive mob", "resource creature", "livestock", "tameable mob"},
Keywords: []string{"cow", "pig", "sheep", "chicken", "horse", "llama", "resources", "farming"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftAnimal(f), nil return minecraftAnimal(f), nil
}, },
@ -270,6 +288,8 @@ func addMinecraftLookup() {
Description: "The profession or occupation assigned to a villager character in the game", Description: "The profession or occupation assigned to a villager character in the game",
Example: "farmer", Example: "farmer",
Output: "string", Output: "string",
Aliases: []string{"villager profession", "npc job", "trade role", "occupation type", "work class"},
Keywords: []string{"farmer", "librarian", "cleric", "armorer", "fletcher", "smith", "trading"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftVillagerJob(f), nil return minecraftVillagerJob(f), nil
}, },
@ -281,6 +301,8 @@ func addMinecraftLookup() {
Description: "Designated area or structure in Minecraft where villagers perform their job-related tasks and trading", Description: "Designated area or structure in Minecraft where villagers perform their job-related tasks and trading",
Example: "furnace", Example: "furnace",
Output: "string", Output: "string",
Aliases: []string{"workstation block", "villager station", "profession station", "trade station", "job block"},
Keywords: []string{"furnace", "grindstone", "lectern", "brewing", "stand", "smithing", "table", "trading", "block"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftVillagerStation(f), nil return minecraftVillagerStation(f), nil
}, },
@ -292,6 +314,8 @@ func addMinecraftLookup() {
Description: "Measure of a villager's experience and proficiency in their assigned job or profession", Description: "Measure of a villager's experience and proficiency in their assigned job or profession",
Example: "master", Example: "master",
Output: "string", Output: "string",
Aliases: []string{"villager rank", "experience tier", "profession level", "npc level", "skill grade"},
Keywords: []string{"novice", "apprentice", "journeyman", "expert", "master", "progression"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftVillagerLevel(f), nil return minecraftVillagerLevel(f), nil
}, },
@ -303,6 +327,8 @@ func addMinecraftLookup() {
Description: "Non-aggressive creatures in the game that do not attack players", Description: "Non-aggressive creatures in the game that do not attack players",
Example: "cow", Example: "cow",
Output: "string", Output: "string",
Aliases: []string{"peaceful mob", "friendly creature", "safe entity", "passive entity", "non-hostile mob"},
Keywords: []string{"cow", "sheep", "chicken", "villager", "bat", "neutral", "farm"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftMobPassive(f), nil return minecraftMobPassive(f), nil
}, },
@ -314,6 +340,8 @@ func addMinecraftLookup() {
Description: "Creature in the game that only becomes hostile if provoked, typically defending itself when attacked", Description: "Creature in the game that only becomes hostile if provoked, typically defending itself when attacked",
Example: "bee", Example: "bee",
Output: "string", Output: "string",
Aliases: []string{"conditional mob", "provokable creature", "neutral mob", "reactive entity", "self-defense mob"},
Keywords: []string{"bee", "wolf", "enderman", "goat", "attack", "provoked", "defending"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftMobNeutral(f), nil return minecraftMobNeutral(f), nil
}, },
@ -325,6 +353,8 @@ func addMinecraftLookup() {
Description: "Aggressive creatures in the game that actively attack players when encountered", Description: "Aggressive creatures in the game that actively attack players when encountered",
Example: "spider", Example: "spider",
Output: "string", Output: "string",
Aliases: []string{"enemy mob", "aggressive entity", "dangerous creature", "threat mob", "monster mob"},
Keywords: []string{"spider", "zombie", "skeleton", "creeper", "witch", "attack", "players"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftMobHostile(f), nil return minecraftMobHostile(f), nil
}, },
@ -336,6 +366,8 @@ func addMinecraftLookup() {
Description: "Powerful hostile creature in the game, often found in challenging dungeons or structures", Description: "Powerful hostile creature in the game, often found in challenging dungeons or structures",
Example: "ender dragon", Example: "ender dragon",
Output: "string", Output: "string",
Aliases: []string{"boss mob", "elite mob", "endgame creature", "raid boss", "legendary mob"},
Keywords: []string{"ender", "dragon", "wither", "warden", "powerful", "challenging", "structure", "hostile"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftMobBoss(f), nil return minecraftMobBoss(f), nil
}, },
@ -347,6 +379,8 @@ func addMinecraftLookup() {
Description: "Distinctive environmental regions in the game, characterized by unique terrain, vegetation, and weather", Description: "Distinctive environmental regions in the game, characterized by unique terrain, vegetation, and weather",
Example: "forest", Example: "forest",
Output: "string", Output: "string",
Aliases: []string{"environment zone", "terrain type", "climate region", "biome area", "ecological zone"},
Keywords: []string{"forest", "plains", "jungle", "desert", "swamp", "tundra", "savanna"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftBiome(f), nil return minecraftBiome(f), nil
}, },
@ -358,6 +392,8 @@ func addMinecraftLookup() {
Description: "Atmospheric conditions in the game that include rain, thunderstorms, and clear skies, affecting gameplay and ambiance", Description: "Atmospheric conditions in the game that include rain, thunderstorms, and clear skies, affecting gameplay and ambiance",
Example: "rain", Example: "rain",
Output: "string", Output: "string",
Aliases: []string{"climate condition", "weather effect", "game atmosphere", "sky state", "environmental condition"},
Keywords: []string{"rain", "clear", "thunderstorm", "snow", "atmospheric", "storm", "lightning"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return minecraftWeather(f), nil return minecraftWeather(f), nil
}, },

View File

@ -1,7 +1,6 @@
package gofakeit package gofakeit
import ( import (
"encoding/hex"
"reflect" "reflect"
"github.com/brianvoe/gofakeit/v7/data" "github.com/brianvoe/gofakeit/v7/data"
@ -15,43 +14,6 @@ func (f *Faker) Bool() bool { return boolFunc(f) }
func boolFunc(f *Faker) bool { return randIntRange(f, 0, 1) == 1 } func boolFunc(f *Faker) bool { return randIntRange(f, 0, 1) == 1 }
// UUID (version 4) will generate a random unique identifier based upon random numbers
// Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
func UUID() string { return uuid(GlobalFaker) }
// UUID (version 4) will generate a random unique identifier based upon random numbers
// Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 8-4-4-4-12
func (f *Faker) UUID() string { return uuid(f) }
func uuid(f *Faker) string {
version := byte(4)
uuid := make([]byte, 16)
// Read 16 random bytes
for i := 0; i < 16; i++ {
uuid[i] = byte(f.IntN(256))
}
// Set version
uuid[6] = (uuid[6] & 0x0f) | (version << 4)
// Set variant
uuid[8] = (uuid[8] & 0xbf) | 0x80
buf := make([]byte, 36)
hex.Encode(buf[0:8], uuid[0:4])
buf[8] = dash
hex.Encode(buf[9:13], uuid[4:6])
buf[13] = dash
hex.Encode(buf[14:18], uuid[6:8])
buf[18] = dash
hex.Encode(buf[19:23], uuid[8:10])
buf[23] = dash
hex.Encode(buf[24:], uuid[10:])
return string(buf)
}
// ShuffleAnySlice takes in a slice and outputs it in a random order // ShuffleAnySlice takes in a slice and outputs it in a random order
func ShuffleAnySlice(v any) { shuffleAnySlice(GlobalFaker, v) } func ShuffleAnySlice(v any) { shuffleAnySlice(GlobalFaker, v) }
@ -129,23 +91,14 @@ func Categories() map[string][]string {
} }
func addMiscLookup() { func addMiscLookup() {
AddFuncLookup("uuid", Info{
Display: "UUID",
Category: "misc",
Description: "128-bit identifier used to uniquely identify objects or entities in computer systems",
Example: "590c1440-9888-45b0-bd51-a817ee07c3f2",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return uuid(f), nil
},
})
AddFuncLookup("bool", Info{ AddFuncLookup("bool", Info{
Display: "Boolean", Display: "Boolean",
Category: "misc", Category: "misc",
Description: "Data type that represents one of two possible values, typically true or false", Description: "Data type that represents one of two possible values, typically true or false",
Example: "true", Example: "true",
Output: "bool", Output: "bool",
Aliases: []string{"boolean", "true", "false", "logic", "binary"},
Keywords: []string{"bool", "data", "type", "represents", "values", "typically", "two", "possible"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return boolFunc(f), nil return boolFunc(f), nil
}, },
@ -157,6 +110,8 @@ func addMiscLookup() {
Description: "Decision-making method involving the tossing of a coin to determine outcomes", Description: "Decision-making method involving the tossing of a coin to determine outcomes",
Example: "Tails", Example: "Tails",
Output: "string", Output: "string",
Aliases: []string{"coin", "flip", "heads", "tails", "decision", "random"},
Keywords: []string{"decision-making", "method", "tossing", "determine", "outcomes", "chance", "probability"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return flipACoin(f), nil return flipACoin(f), nil
}, },

View File

@ -39,6 +39,8 @@ func addMovieLookup() {
}`, }`,
Output: "map[string]string", Output: "map[string]string",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{"cinema", "picture", "story", "entertainment", "motion"},
Keywords: []string{"film", "moving", "sound", "pictures", "told", "through", "psycho", "mystery"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return movie(f), nil return movie(f), nil
}, },
@ -50,6 +52,18 @@ func addMovieLookup() {
Description: "Title or name of a specific film used for identification and reference", Description: "Title or name of a specific film used for identification and reference",
Example: "The Matrix", Example: "The Matrix",
Output: "string", Output: "string",
Aliases: []string{
"movie title",
"film title",
"film name",
"motion picture title",
"cinema title",
},
Keywords: []string{
"movie", "film", "title", "name", "cinema",
"motionpicture", "blockbuster", "feature", "picture",
"hollywood", "bollywood", "screenplay", "screen",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return movieName(f), nil return movieName(f), nil
}, },
@ -61,6 +75,19 @@ func addMovieLookup() {
Description: "Category that classifies movies based on common themes, styles, and storytelling approaches", Description: "Category that classifies movies based on common themes, styles, and storytelling approaches",
Example: "Action", Example: "Action",
Output: "string", Output: "string",
Aliases: []string{
"film genre",
"movie category",
"film type",
"cinema genre",
"movie classification",
},
Keywords: []string{
"category", "type", "classification",
"movie", "film", "cinema", "style", "theme",
"drama", "comedy", "horror", "thriller", "romance",
"documentary", "animation", "sci-fi", "fantasy", "action",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return movieGenre(f), nil return movieGenre(f), nil
}, },

View File

@ -331,9 +331,20 @@ func addNumberLookup() {
AddFuncLookup("number", Info{ AddFuncLookup("number", Info{
Display: "Number", Display: "Number",
Category: "number", Category: "number",
Description: "Mathematical concept used for counting, measuring, and expressing quantities or values", Description: "Integer used for counting or measuring, with optional bounds",
Example: "14866", Example: "14866",
Output: "int", Output: "int",
Aliases: []string{
"integer value",
"whole-number output",
"bounded result",
"range-limited value",
"discrete quantity",
},
Keywords: []string{
"integer", "int", "random",
"min", "max", "range", "bounded", "between", "inclusive",
},
Params: []Param{ Params: []Param{
{Field: "min", Display: "Min", Type: "int", Default: "-2147483648", Description: "Minimum integer value"}, {Field: "min", Display: "Min", Type: "int", Default: "-2147483648", Description: "Minimum integer value"},
{Field: "max", Display: "Max", Type: "int", Default: "2147483647", Description: "Maximum integer value"}, {Field: "max", Display: "Max", Type: "int", Default: "2147483647", Description: "Maximum integer value"},
@ -343,12 +354,10 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
max, err := info.GetInt(m, "max") max, err := info.GetInt(m, "max")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return number(f, min, max), nil return number(f, min, max), nil
}, },
}) })
@ -356,29 +365,48 @@ func addNumberLookup() {
AddFuncLookup("uint", Info{ AddFuncLookup("uint", Info{
Display: "Uint", Display: "Uint",
Category: "number", Category: "number",
Description: "Unsigned integer", Description: "Unsigned integer (nonnegative whole number)",
Example: "14866", Example: "14866",
Output: "uint", Output: "uint",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return uintFunc(f), nil "nonnegative value",
"natural-count type",
"unsigned whole",
"zero-or-greater",
"cardinal quantity",
}, },
Keywords: []string{
"unsigned", "integer", "nonnegative",
"natural", "zero", "positive", "whole",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return uintFunc(f), nil },
}) })
AddFuncLookup("uintn", Info{ AddFuncLookup("uintn", Info{
Display: "UintN", Display: "UintN",
Category: "number", Category: "number",
Description: "Unsigned integer between 0 and n", Description: "Unsigned integer between 0 (inclusive) and n (exclusive)",
Example: "32783", Example: "32783",
Output: "uint", Output: "uint",
Aliases: []string{
"upper-bounded uint",
"cap-limited unsigned",
"zero-to-n minus one",
"exclusive-maximum uint",
"limited-range unsigned",
},
Keywords: []string{
"unsigned", "range", "upper",
"limit", "bound", "cap", "max", "exclusive",
},
Params: []Param{ Params: []Param{
{Field: "n", Display: "N", Type: "uint", Default: "4294967295", Description: "Maximum uint value"}, {Field: "n", Display: "N", Type: "uint", Default: "4294967295", Description: "Maximum uint value (exclusive)"},
}, },
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
n, err := info.GetUint(m, "n") n, err := info.GetUint(m, "n")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return uintNFunc(f, n), nil return uintNFunc(f, n), nil
}, },
}) })
@ -386,53 +414,89 @@ func addNumberLookup() {
AddFuncLookup("uint8", Info{ AddFuncLookup("uint8", Info{
Display: "Uint8", Display: "Uint8",
Category: "number", Category: "number",
Description: "Unsigned 8-bit integer, capable of representing values from 0 to 255", Description: "Unsigned 8-bit integer, range 0255",
Example: "152", Example: "152",
Output: "uint8", Output: "uint8",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return uint8Func(f), nil "byte-sized unsigned",
"octet quantity",
"small-range unsigned",
"one-byte value",
"0-255 whole",
}, },
Keywords: []string{
"unsigned", "8bit", "byte", "octet", "range", "integer",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return uint8Func(f), nil },
}) })
AddFuncLookup("uint16", Info{ AddFuncLookup("uint16", Info{
Display: "Uint16", Display: "Uint16",
Category: "number", Category: "number",
Description: "Unsigned 16-bit integer, capable of representing values from 0 to 65,535", Description: "Unsigned 16-bit integer, range 065,535",
Example: "34968", Example: "34968",
Output: "uint16", Output: "uint16",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return uint16Func(f), nil "two-byte unsigned",
"ushort quantity",
"medium-range unsigned",
"port-sized value",
"0-65535 whole",
}, },
Keywords: []string{
"unsigned", "16bit", "word", "port", "range", "integer",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return uint16Func(f), nil },
}) })
AddFuncLookup("uint32", Info{ AddFuncLookup("uint32", Info{
Display: "Uint32", Display: "Uint32",
Category: "number", Category: "number",
Description: "Unsigned 32-bit integer, capable of representing values from 0 to 4,294,967,295", Description: "Unsigned 32-bit integer, range 04,294,967,295",
Example: "1075055705", Example: "1075055705",
Output: "uint32", Output: "uint32",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return uint32Func(f), nil "four-byte unsigned", "u32 numeric", "ipv4-scale value",
"wide-range unsigned", "32-bit whole", "medium unsigned int", "standard unsigned int",
}, },
Keywords: []string{
"unsigned", "32bit", "range", "ipv4", "integer", "binary", "numeric",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return uint32Func(f), nil },
}) })
AddFuncLookup("uint64", Info{ AddFuncLookup("uint64", Info{
Display: "Uint64", Display: "Uint64",
Category: "number", Category: "number",
Description: "Unsigned 64-bit integer, capable of representing values from 0 to 18,446,744,073,709,551,615", Description: "Unsigned 64-bit integer, range 018,446,744,073,709,551,615",
Example: "843730692693298265", Example: "843730692693298265",
Output: "uint64", Output: "uint64",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return f.Uint64(), nil "eight-byte unsigned", "u64 numeric", "very-large unsigned", "wide whole count", "extended-range value", "large uint", "unsigned bigint",
}, },
Keywords: []string{
"unsigned", "64bit", "range", "bigint", "integer", "numeric", "arithmetic",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return f.Uint64(), nil },
}) })
AddFuncLookup("uintrange", Info{ AddFuncLookup("uintrange", Info{
Display: "UintRange", Display: "Uint Range",
Category: "number", Category: "number",
Description: "Non-negative integer value between given range", Description: "Unsigned integer value within a given range",
Example: "1075055705", Example: "1075055705",
Output: "uint", Output: "uint",
Aliases: []string{
"unsigned span",
"nonnegative interval",
"ranged cardinal",
"bounded unsigned result",
"constrained uint output",
},
Keywords: []string{
"uintrange", "unsigned", "range", "min", "max",
"bounds", "limits", "interval", "span",
},
Params: []Param{ Params: []Param{
{Field: "min", Display: "Min", Type: "uint", Default: "0", Description: "Minimum uint value"}, {Field: "min", Display: "Min", Type: "uint", Default: "0", Description: "Minimum uint value"},
{Field: "max", Display: "Max", Type: "uint", Default: "4294967295", Description: "Maximum uint value"}, {Field: "max", Display: "Max", Type: "uint", Default: "4294967295", Description: "Maximum uint value"},
@ -442,12 +506,10 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
max, err := info.GetUint(m, "max") max, err := info.GetUint(m, "max")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return uintRangeFunc(f, min, max), nil return uintRangeFunc(f, min, max), nil
}, },
}) })
@ -458,26 +520,45 @@ func addNumberLookup() {
Description: "Signed integer", Description: "Signed integer",
Example: "14866", Example: "14866",
Output: "int", Output: "int",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return intFunc(f), nil "signed whole",
"two-sided count",
"negative-or-positive value",
"zero-inclusive whole",
"general int type",
}, },
Keywords: []string{
"signed", "integer",
"positive", "negative", "zero", "counting",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return intFunc(f), nil },
}) })
AddFuncLookup("intn", Info{ AddFuncLookup("intn", Info{
Display: "IntN", Display: "IntN",
Category: "number", Category: "number",
Description: "Integer value between 0 and n", Description: "Integer between 0 (inclusive) and n (exclusive)",
Example: "32783", Example: "32783",
Output: "int", Output: "int",
Aliases: []string{
"upper-bounded int",
"exclusive-maximum int",
"zero-through-n minus one",
"limited-range int",
"cap-limited integer",
},
Keywords: []string{
"range", "upper", "limit", "bound",
"cap", "max", "exclusive", "integer",
},
Params: []Param{ Params: []Param{
{Field: "n", Display: "N", Type: "int", Default: "2147483647", Description: "Maximum int value"}, {Field: "n", Display: "N", Type: "int", Default: "2147483647", Description: "Maximum int value (exclusive)"},
}, },
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
n, err := info.GetInt(m, "n") n, err := info.GetInt(m, "n")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return intNFunc(f, n), nil return intNFunc(f, n), nil
}, },
}) })
@ -485,53 +566,84 @@ func addNumberLookup() {
AddFuncLookup("int8", Info{ AddFuncLookup("int8", Info{
Display: "Int8", Display: "Int8",
Category: "number", Category: "number",
Description: "Signed 8-bit integer, capable of representing values from -128 to 127", Description: "Signed 8-bit integer, range 128127",
Example: "24", Example: "24",
Output: "int8", Output: "int8",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return int8Func(f), nil "byte-sized signed", "small signed range", "one-byte integer", "8-bit whole signed", "narrow signed value", "tiny int", "signed byte",
}, },
Keywords: []string{
"signed", "8bit", "range", "twoscomplement", "integer", "arithmetic", "numeric", "binary", "storage",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return int8Func(f), nil },
}) })
AddFuncLookup("int16", Info{ AddFuncLookup("int16", Info{
Display: "Int16", Display: "Int16",
Category: "number", Category: "number",
Description: "Signed 16-bit integer, capable of representing values from 32,768 to 32,767", Description: "Signed 16-bit integer, range 32,76832,767",
Example: "2200", Example: "2200",
Output: "int16", Output: "int16",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return int16Func(f), nil "two-byte signed", "short integer signed", "16-bit whole signed", "narrow-mid signed", "twobyte int", "short int", "halfword signed",
}, },
Keywords: []string{
"signed", "16bit", "range", "word", "numeric", "arithmetic", "binary", "integer",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return int16Func(f), nil },
}) })
AddFuncLookup("int32", Info{ AddFuncLookup("int32", Info{
Display: "Int32", Display: "Int32",
Category: "number", Category: "number",
Description: "Signed 32-bit integer, capable of representing values from -2,147,483,648 to 2,147,483,647", Description: "Signed 32-bit integer, range 2,147,483,6482,147,483,647",
Example: "-1072427943", Example: "-1072427943",
Output: "int32", Output: "int32",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return int32Func(f), nil "four-byte signed", "standard-width signed", "32-bit whole signed", "midrange integer", "int32 value", "long int", "standard signed int",
}, },
Keywords: []string{
"signed", "32bit", "range", "ipv4", "numeric", "arithmetic", "binary", "integer",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return int32Func(f), nil },
}) })
AddFuncLookup("int64", Info{ AddFuncLookup("int64", Info{
Display: "Int64", Display: "Int64",
Category: "number", Category: "number",
Description: "Signed 64-bit integer, capable of representing values from -9,223,372,036,854,775,808 to -9,223,372,036,854,775,807", Description: "Signed 64-bit integer, range 9,223,372,036,854,775,8089,223,372,036,854,775,807",
Example: "-8379641344161477543", Example: "-8379641344161477543",
Output: "int64", Output: "int64",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return int64Func(f), nil "eight-byte signed",
"long-width integer",
"64-bit whole signed",
"large signed value",
"extended signed range",
}, },
Keywords: []string{
"signed", "64bit", "bigint", "range", "timestamp", "nanosecond",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return int64Func(f), nil },
}) })
AddFuncLookup("intrange", Info{ AddFuncLookup("intrange", Info{
Display: "IntRange", Display: "Int Range",
Category: "number", Category: "number",
Description: "Integer value between given range", Description: "Signed integer value within a given range",
Example: "-8379477543", Example: "-8379477543",
Output: "int", Output: "int",
Aliases: []string{
"signed span",
"bounded integer result",
"constrained int output",
"limited signed interval",
"ranged whole value",
},
Keywords: []string{
"int", "range", "min", "max",
"bounds", "limits", "interval", "span",
},
Params: []Param{ Params: []Param{
{Field: "min", Display: "Min", Type: "int", Description: "Minimum int value"}, {Field: "min", Display: "Min", Type: "int", Description: "Minimum int value"},
{Field: "max", Display: "Max", Type: "int", Description: "Maximum int value"}, {Field: "max", Display: "Max", Type: "int", Description: "Maximum int value"},
@ -541,12 +653,10 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
max, err := info.GetInt(m, "max") max, err := info.GetInt(m, "max")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return intRangeFunc(f, min, max), nil return intRangeFunc(f, min, max), nil
}, },
}) })
@ -554,20 +664,40 @@ func addNumberLookup() {
AddFuncLookup("float32", Info{ AddFuncLookup("float32", Info{
Display: "Float32", Display: "Float32",
Category: "number", Category: "number",
Description: "Data type representing floating-point numbers with 32 bits of precision in computing", Description: "Floating-point number with 32-bit single precision (IEEE 754)",
Example: "3.1128167e+37", Example: "3.1128167e+37",
Output: "float32", Output: "float32",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return float32Func(f), nil "single-precision float",
"fp32 numeric",
"32-bit real",
"float single",
"reduced-precision real",
}, },
Keywords: []string{
"single-precision", "ieee754",
"fp32", "mantissa", "exponent", "decimal",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return float32Func(f), nil },
}) })
AddFuncLookup("float32range", Info{ AddFuncLookup("float32range", Info{
Display: "Float32 Range", Display: "Float32 Range",
Category: "number", Category: "number",
Description: "Float32 value between given range", Description: "Float32 value within a given range",
Example: "914774.6", Example: "914774.6",
Output: "float32", Output: "float32",
Aliases: []string{
"single-precision span",
"bounded fp32",
"limited float32 output",
"constrained 32-bit real",
"float single interval",
},
Keywords: []string{
"float32", "range",
"min", "max", "bounds", "limits", "interval",
},
Params: []Param{ Params: []Param{
{Field: "min", Display: "Min", Type: "float", Description: "Minimum float32 value"}, {Field: "min", Display: "Min", Type: "float", Description: "Minimum float32 value"},
{Field: "max", Display: "Max", Type: "float", Description: "Maximum float32 value"}, {Field: "max", Display: "Max", Type: "float", Description: "Maximum float32 value"},
@ -577,12 +707,10 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
max, err := info.GetFloat32(m, "max") max, err := info.GetFloat32(m, "max")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return float32Range(f, min, max), nil return float32Range(f, min, max), nil
}, },
}) })
@ -590,20 +718,41 @@ func addNumberLookup() {
AddFuncLookup("float64", Info{ AddFuncLookup("float64", Info{
Display: "Float64", Display: "Float64",
Category: "number", Category: "number",
Description: "Data type representing floating-point numbers with 64 bits of precision in computing", Description: "Floating-point number with 64-bit double precision (IEEE 754)",
Example: "1.644484108270445e+307", Example: "1.644484108270445e+307",
Output: "float64", Output: "float64",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return float64Func(f), nil "double-precision float",
"fp64 numeric",
"64-bit real",
"float double",
"high-precision real",
}, },
Keywords: []string{
"double-precision", "ieee754",
"fp64", "mantissa", "exponent", "decimal",
"precision", "scientific", "number",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return float64Func(f), nil },
}) })
AddFuncLookup("float64range", Info{ AddFuncLookup("float64range", Info{
Display: "Float64 Range", Display: "Float64 Range",
Category: "number", Category: "number",
Description: "Float64 value between given range", Description: "Float64 value within a given range",
Example: "914774.5585333086", Example: "914774.5585333086",
Output: "float64", Output: "float64",
Aliases: []string{
"double-precision span",
"bounded fp64",
"limited float64 output",
"constrained 64-bit real",
"float double interval",
},
Keywords: []string{
"float64", "range",
"min", "max", "bounds", "limits", "interval",
},
Params: []Param{ Params: []Param{
{Field: "min", Display: "Min", Type: "float", Description: "Minimum float64 value"}, {Field: "min", Display: "Min", Type: "float", Description: "Minimum float64 value"},
{Field: "max", Display: "Max", Type: "float", Description: "Maximum float64 value"}, {Field: "max", Display: "Max", Type: "float", Description: "Maximum float64 value"},
@ -613,12 +762,10 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
max, err := info.GetFloat64(m, "max") max, err := info.GetFloat64(m, "max")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return float64Range(f, min, max), nil return float64Range(f, min, max), nil
}, },
}) })
@ -629,6 +776,17 @@ func addNumberLookup() {
Description: "Shuffles an array of ints", Description: "Shuffles an array of ints",
Example: "1,2,3,4 => 3,1,4,2", Example: "1,2,3,4 => 3,1,4,2",
Output: "[]int", Output: "[]int",
Aliases: []string{
"reorder integers",
"scramble int slice",
"random permutation ints",
"reshuffle numbers",
"jumbled int output",
},
Keywords: []string{
"shuffle", "permute", "randomize",
"ints", "slice", "array", "permutation",
},
Params: []Param{ Params: []Param{
{Field: "ints", Display: "Integers", Type: "[]int", Description: "Delimited separated integers"}, {Field: "ints", Display: "Integers", Type: "[]int", Description: "Delimited separated integers"},
}, },
@ -637,9 +795,7 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
shuffleInts(f, ints) shuffleInts(f, ints)
return ints, nil return ints, nil
}, },
}) })
@ -650,6 +806,17 @@ func addNumberLookup() {
Description: "Randomly selected value from a slice of int", Description: "Randomly selected value from a slice of int",
Example: "-1,2,-3,4 => -3", Example: "-1,2,-3,4 => -3",
Output: "int", Output: "int",
Aliases: []string{
"draw one integer",
"sample an int",
"pick from ints",
"select a number",
"choose single int",
},
Keywords: []string{
"random", "pick", "choose",
"select", "ints", "slice", "list",
},
Params: []Param{ Params: []Param{
{Field: "ints", Display: "Integers", Type: "[]int", Description: "Delimited separated integers"}, {Field: "ints", Display: "Integers", Type: "[]int", Description: "Delimited separated integers"},
}, },
@ -658,7 +825,6 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return randomInt(f, ints), nil return randomInt(f, ints), nil
}, },
}) })
@ -669,6 +835,17 @@ func addNumberLookup() {
Description: "Randomly selected value from a slice of uint", Description: "Randomly selected value from a slice of uint",
Example: "1,2,3,4 => 4", Example: "1,2,3,4 => 4",
Output: "uint", Output: "uint",
Aliases: []string{
"draw one unsigned",
"sample a uint",
"pick from uints",
"select an unsigned",
"choose single uint",
},
Keywords: []string{
"random", "pick", "choose",
"select", "uints", "slice", "list", "nonnegative",
},
Params: []Param{ Params: []Param{
{Field: "uints", Display: "Unsigned Integers", Type: "[]uint", Description: "Delimited separated unsigned integers"}, {Field: "uints", Display: "Unsigned Integers", Type: "[]uint", Description: "Delimited separated unsigned integers"},
}, },
@ -677,7 +854,6 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return randomUint(f, uints), nil return randomUint(f, uints), nil
}, },
}) })
@ -688,6 +864,17 @@ func addNumberLookup() {
Description: "Hexadecimal representation of an unsigned integer", Description: "Hexadecimal representation of an unsigned integer",
Example: "0x87", Example: "0x87",
Output: "string", Output: "string",
Aliases: []string{
"hex-encoded unsigned",
"base-16 uint string",
"prefixed 0x value",
"hex view of uint",
"formatted unsigned hex",
},
Keywords: []string{
"hex", "base16", "uint", "0x",
"bits", "width", "format",
},
Params: []Param{ Params: []Param{
{Field: "bitSize", Display: "Bit Size", Type: "int", Default: "8", Description: "Bit size of the unsigned integer"}, {Field: "bitSize", Display: "Bit Size", Type: "int", Default: "8", Description: "Bit size of the unsigned integer"},
}, },
@ -696,8 +883,8 @@ func addNumberLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return hexUint(f, bitSize), nil return hexUint(f, bitSize), nil
}, },
}) })
} }

View File

@ -108,7 +108,7 @@ func creditCardNumber(f *Faker, cco *CreditCardOptions) string {
if cco == nil { if cco == nil {
cco = &CreditCardOptions{} cco = &CreditCardOptions{}
} }
if cco.Types == nil || len(cco.Types) == 0 { if len(cco.Types) == 0 {
cco.Types = data.CreditCardTypes cco.Types = data.CreditCardTypes
} }
ccType := randomString(f, cco.Types) ccType := randomString(f, cco.Types)
@ -240,50 +240,80 @@ func bitcoinPrivateKey(f *Faker) string {
return "5" + randomString(f, []string{"H", "J", "K"}) + b.String() return "5" + randomString(f, []string{"H", "J", "K"}) + b.String()
} }
func BankName() string { return bankName(GlobalFaker) }
func (f *Faker) BankName() string { return bankName(f) }
func bankName(f *Faker) string { return getRandValue(f, []string{"bank", "name"}) }
func BankType() string { return bankType(GlobalFaker) }
func (f *Faker) BankType() string { return bankType(f) }
func bankType(f *Faker) string { return getRandValue(f, []string{"bank", "type"}) }
func addPaymentLookup() { func addPaymentLookup() {
AddFuncLookup("currency", Info{ AddFuncLookup("currency", Info{
Display: "Currency", Display: "Currency",
Category: "payment", Category: "payment",
Description: "Medium of exchange, often in the form of paper money or coins, used for trade and transactions", Description: "Medium of exchange, often in the form of money, used for trade and transactions",
Example: `{ Example: `{
"short": "IQD", "short": "IQD",
"long": "Iraq Dinar" "long": "Iraq Dinar"
}`, }`,
Output: "map[string]string", Output: "map[string]string",
ContentType: "application/json", ContentType: "application/json",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return currency(f), nil "currency unit", "currency code", "money type", "exchange currency", "monetary unit", "legal tender", "fiat money",
}, },
Keywords: []string{
"money", "exchange", "fiat", "unit", "code", "iso", "usd", "eur", "gbp", "jpy", "cny", "trade", "transaction", "market",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return currency(f), nil },
}) })
AddFuncLookup("currencyshort", Info{ AddFuncLookup("currencyshort", Info{
Display: "Currency Short", Display: "Currency Short",
Category: "payment", Category: "payment",
Description: "Short 3-letter word used to represent a specific currency", Description: "Short 3-letter ISO code used to represent a specific currency",
Example: "USD", Example: "USD",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return currencyShort(f), nil "iso alpha-3", "currency ticker", "alpha-3 code", "currency shorthand", "iso-4217 code",
}, },
Keywords: []string{
"currency", "short", "iso", "code", "alpha3", "usd", "eur", "gbp", "jpy", "cad", "aud",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return currencyShort(f), nil },
}) })
AddFuncLookup("currencylong", Info{ AddFuncLookup("currencylong", Info{
Display: "Currency Long", Display: "Currency Long",
Category: "payment", Category: "payment",
Description: "Complete name of a specific currency used for official identification in financial transactions", Description: "Complete name of a specific currency used in financial transactions",
Example: "United States Dollar", Example: "United States Dollar",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return currencyLong(f), nil "currency name", "full currency", "long form name", "official currency", "monetary name",
}, },
Keywords: []string{
"currency", "name", "long", "full", "official", "dollar", "euro", "pound", "yen", "franc", "peso", "rupee",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return currencyLong(f), nil },
}) })
AddFuncLookup("price", Info{ AddFuncLookup("price", Info{
Display: "Price", Display: "Price",
Category: "payment", Category: "payment",
Description: "The amount of money or value assigned to a product, service, or asset in a transaction", Description: "The amount of money assigned to a product, service, or asset in a transaction",
Example: "92.26", Example: "92.26",
Output: "float64", Output: "float64",
Aliases: []string{
"amount", "cost", "value", "fee", "charge", "rate", "unit price",
},
Keywords: []string{
"payment", "transaction", "retail", "wholesale", "market", "asset", "listing", "quote", "valuation",
},
Params: []Param{ Params: []Param{
{Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum price value"}, {Field: "min", Display: "Min", Type: "float", Default: "0", Description: "Minimum price value"},
{Field: "max", Display: "Max", Type: "float", Default: "1000", Description: "Maximum price value"}, {Field: "max", Display: "Max", Type: "float", Default: "1000", Description: "Maximum price value"},
@ -293,12 +323,10 @@ func addPaymentLookup() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
max, err := info.GetFloat64(m, "max") max, err := info.GetFloat64(m, "max")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return price(f, min, max), nil return price(f, min, max), nil
}, },
}) })
@ -306,18 +334,22 @@ func addPaymentLookup() {
AddFuncLookup("creditcard", Info{ AddFuncLookup("creditcard", Info{
Display: "Credit Card", Display: "Credit Card",
Category: "payment", Category: "payment",
Description: "Plastic card allowing users to make purchases on credit, with payment due at a later date", Description: "Card allowing users to make purchases on credit, with payment due at a later date",
Example: `{ Example: `{
"type": "UnionPay", "type": "Visa",
"number": "4364599489953698", "number": "4111111111111111",
"exp": "02/24", "exp": "02/27",
"cvv": "300" "cvv": "123"
}`, }`,
Output: "map[string]any", Output: "map[string]any",
ContentType: "application/json", ContentType: "application/json",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return creditCard(f), nil "credit card", "payment card", "charge card", "credit instrument", "card account", "plastic card",
}, },
Keywords: []string{
"credit", "card", "payment", "debt", "visa", "mastercard", "amex", "discover", "unionpay", "maestro", "jcb",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return creditCard(f), nil },
}) })
AddFuncLookup("creditcardtype", Info{ AddFuncLookup("creditcardtype", Info{
@ -326,17 +358,27 @@ func addPaymentLookup() {
Description: "Classification of credit cards based on the issuing company", Description: "Classification of credit cards based on the issuing company",
Example: "Visa", Example: "Visa",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return creditCardType(f), nil "credit card type", "issuer brand", "card network", "scheme name", "card family", "issuer type",
}, },
Keywords: []string{
"credit", "card", "type", "issuer", "brand", "network", "visa", "mastercard", "amex", "discover", "unionpay", "maestro", "jcb",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return creditCardType(f), nil },
}) })
AddFuncLookup("creditcardnumber", Info{ AddFuncLookup("creditcardnumber", Info{
Display: "Credit Card Number", Display: "Credit Card Number",
Category: "payment", Category: "payment",
Description: "Unique numerical identifier on a credit card used for making electronic payments and transactions", Description: "Unique number on a credit card used for electronic payments",
Example: "4136459948995369", Example: "4111111111111111",
Output: "string", Output: "string",
Aliases: []string{
"credit card", "credit card number", "card number", "cc number", "primary account number", "pan value", "payment number",
},
Keywords: []string{
"credit", "card", "number", "identifier", "luhn", "validation", "checksum", "bin", "tokenize", "masking", "digits",
},
Params: []Param{ Params: []Param{
{ {
Field: "types", Display: "Types", Type: "[]string", Default: "all", Field: "types", Display: "Types", Type: "[]string", Default: "all",
@ -344,7 +386,7 @@ func addPaymentLookup() {
Description: "A select number of types you want to use when generating a credit card number", Description: "A select number of types you want to use when generating a credit card number",
}, },
{Field: "bins", Display: "Bins", Type: "[]string", Optional: true, Description: "Optional list of prepended bin numbers to pick from"}, {Field: "bins", Display: "Bins", Type: "[]string", Optional: true, Description: "Optional list of prepended bin numbers to pick from"},
{Field: "gaps", Display: "Gaps", Type: "bool", Default: "false", Description: "Whether or not to have gaps in number"}, {Field: "gaps", Display: "Gaps", Type: "bool", Default: "false", Optional: true, Description: "Whether or not to have gaps in number"},
}, },
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
types, err := info.GetStringArray(m, "types") types, err := info.GetStringArray(m, "types")
@ -354,23 +396,12 @@ func addPaymentLookup() {
if len(types) == 1 && types[0] == "all" { if len(types) == 1 && types[0] == "all" {
types = []string{} types = []string{}
} }
bins, _ := info.GetStringArray(m, "bins") bins, _ := info.GetStringArray(m, "bins")
gaps, _ := info.GetBool(m, "gaps")
gaps, err := info.GetBool(m, "gaps") options := CreditCardOptions{Types: types, Gaps: gaps}
if err != nil {
return nil, err
}
options := CreditCardOptions{
Types: types,
Gaps: gaps,
}
if len(bins) >= 1 { if len(bins) >= 1 {
options.Bins = bins options.Bins = bins
} }
return creditCardNumber(f, &options), nil return creditCardNumber(f, &options), nil
}, },
}) })
@ -378,66 +409,121 @@ func addPaymentLookup() {
AddFuncLookup("creditcardexp", Info{ AddFuncLookup("creditcardexp", Info{
Display: "Credit Card Exp", Display: "Credit Card Exp",
Category: "payment", Category: "payment",
Description: "Date when a credit card becomes invalid and cannot be used for transactions", Description: "Expiration date of a credit card",
Example: "01/21", Example: "01/27",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return creditCardExp(f), nil "credit card exp", "credit card expiration", "expiry date", "expiration date", "exp date", "valid thru", "card expiry",
}, },
Keywords: []string{
"credit", "card", "exp", "expiry", "expiration", "month", "year", "validity", "future", "expired",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return creditCardExp(f), nil },
}) })
AddFuncLookup("creditcardcvv", Info{ AddFuncLookup("creditcardcvv", Info{
Display: "Credit Card CVV", Display: "Credit Card CVV",
Category: "payment", Category: "payment",
Description: "Three or four-digit security code on a credit card used for online and remote transactions", Description: "Three or four-digit security code on a credit card",
Example: "513", Example: "513",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return creditCardCvv(f), nil "credit card cvv", "cvv", "cvc", "cid", "security number", "auth digits", "card check value", "security code",
}, },
Keywords: []string{
"security", "code", "verification", "authentication", "fraud", "protection", "online", "payment", "transaction",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return creditCardCvv(f), nil },
}) })
AddFuncLookup("achrouting", Info{ AddFuncLookup("achrouting", Info{
Display: "ACH Routing Number", Display: "ACH Routing Number",
Category: "payment", Category: "payment",
Description: "Unique nine-digit code used in the U.S. for identifying the bank and processing electronic transactions", Description: "Nine-digit code used in the U.S. for identifying a bank in ACH transactions",
Example: "513715684", Example: "513715684",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return achRouting(f), nil "routing number", "aba number", "routing transit number", "rtn code", "bank routing id",
}, },
Keywords: []string{
"ach", "routing", "aba", "us", "bank", "federal", "reserve", "clearinghouse",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return achRouting(f), nil },
}) })
AddFuncLookup("achaccount", Info{ AddFuncLookup("achaccount", Info{
Display: "ACH Account Number", Display: "ACH Account Number",
Category: "payment", Category: "payment",
Description: "A bank account number used for Automated Clearing House transactions and electronic transfers", Description: "Bank account number used for Automated Clearing House transactions",
Example: "491527954328", Example: "491527954328",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return achAccount(f), nil "account number", "ach account", "bank account", "checking account", "savings account", "account identifier",
}, },
Keywords: []string{
"ach", "account", "banking", "checking", "savings", "finance", "electronic", "transfer", "payment",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return achAccount(f), nil },
}) })
AddFuncLookup("bitcoinaddress", Info{ AddFuncLookup("bitcoinaddress", Info{
Display: "Bitcoin Address", Display: "Bitcoin Address",
Category: "payment", Category: "payment",
Description: "Cryptographic identifier used to receive, store, and send Bitcoin cryptocurrency in a peer-to-peer network", Description: "Cryptographic identifier used to send and receive Bitcoin",
Example: "1lWLbxojXq6BqWX7X60VkcDIvYA", Example: "1BoatSLRHtKNngkdXEeobR76b53LETtpyT",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return bitcoinAddress(f), nil "btc address", "bitcoin wallet", "crypto address", "public address", "payment address",
}, },
Keywords: []string{
"bitcoin", "btc", "wallet", "blockchain", "public", "key", "hash", "base58",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return bitcoinAddress(f), nil },
}) })
AddFuncLookup("bitcoinprivatekey", Info{ AddFuncLookup("bitcoinprivatekey", Info{
Display: "Bitcoin Private Key", Display: "Bitcoin Private Key",
Category: "payment", Category: "payment",
Description: "Secret, secure code that allows the owner to access and control their Bitcoin holdings", Description: "Secret key that allows access and control over Bitcoin holdings",
Example: "5vrbXTADWJ6sQBSYd6lLkG97jljNc0X9VPBvbVqsIH9lWOLcoqg", Example: "5HueCGU8rMjxEXxiPuD5BDuG6o5xjA7QkbPp",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return bitcoinPrivateKey(f), nil "btc private key", "wallet key", "secret key", "private wif", "signing key",
}, },
Keywords: []string{
"bitcoin", "btc", "private", "key", "blockchain", "wallet", "signature", "base58", "wif",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return bitcoinPrivateKey(f), nil },
}) })
AddFuncLookup("bankname", Info{
Display: "Bank Name",
Category: "payment",
Description: "Name of a financial institution that offers banking services",
Example: "Wells Fargo",
Output: "string",
Aliases: []string{
"financial institution", "banking entity", "lender name", "depository name", "institution title",
},
Keywords: []string{
"bank", "name", "institution", "financial", "wells", "fargo", "chase", "citibank", "pnc", "boa", "usbank",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return bankName(f), nil },
})
AddFuncLookup("banktype", Info{
Display: "Bank Type",
Category: "payment",
Description: "Classification of a bank based on its services and operations",
Example: "Investment Bank",
Output: "string",
Aliases: []string{
"bank classification", "bank category", "bank segment", "institution class", "service tier",
},
Keywords: []string{
"bank", "type", "classification", "category", "segment", "investment", "commercial", "retail", "savings", "credit", "union", "central", "federal",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return bankType(f), nil },
})
} }

View File

@ -11,6 +11,7 @@ type PersonInfo struct {
FirstName string `json:"first_name" xml:"first_name"` FirstName string `json:"first_name" xml:"first_name"`
LastName string `json:"last_name" xml:"last_name"` LastName string `json:"last_name" xml:"last_name"`
Gender string `json:"gender" xml:"gender"` Gender string `json:"gender" xml:"gender"`
Age int `json:"age" xml:"age"`
SSN string `json:"ssn" xml:"ssn"` SSN string `json:"ssn" xml:"ssn"`
Hobby string `json:"hobby" xml:"hobby"` Hobby string `json:"hobby" xml:"hobby"`
Job *JobInfo `json:"job" xml:"job"` Job *JobInfo `json:"job" xml:"job"`
@ -30,6 +31,7 @@ func person(f *Faker) *PersonInfo {
FirstName: firstName(f), FirstName: firstName(f),
LastName: lastName(f), LastName: lastName(f),
Gender: gender(f), Gender: gender(f),
Age: age(f),
SSN: ssn(f), SSN: ssn(f),
Hobby: hobby(f), Hobby: hobby(f),
Job: job(f), Job: job(f),
@ -89,6 +91,22 @@ func (f *Faker) NameSuffix() string { return nameSuffix(f) }
func nameSuffix(f *Faker) string { return getRandValue(f, []string{"person", "suffix"}) } func nameSuffix(f *Faker) string { return getRandValue(f, []string{"person", "suffix"}) }
// Age will generate a random age between 0 and 100
func Age() int { return age(GlobalFaker) }
// Age will generate a random age between 0 and 100
func (f *Faker) Age() int { return age(f) }
func age(f *Faker) int { return randIntRange(f, 0, 100) }
// Ethnicity will generate a random ethnicity string
func Ethnicity() string { return ethnicity(GlobalFaker) }
// Ethnicity will generate a random ethnicity string
func (f *Faker) Ethnicity() string { return ethnicity(f) }
func ethnicity(f *Faker) string { return getRandValue(f, []string{"person", "ethnicity"}) }
// SSN will generate a random Social Security Number // SSN will generate a random Social Security Number
func SSN() string { return ssn(GlobalFaker) } func SSN() string { return ssn(GlobalFaker) }
@ -97,6 +115,27 @@ func (f *Faker) SSN() string { return ssn(f) }
func ssn(f *Faker) string { return strconv.Itoa(randIntRange(f, 100000000, 999999999)) } func ssn(f *Faker) string { return strconv.Itoa(randIntRange(f, 100000000, 999999999)) }
// EIN will generate a random Employer Identification Number
func EIN() string { return ein(GlobalFaker) }
// EIN will generate a random Employer Identification Number
func (f *Faker) EIN() string { return ein(f) }
func ein(f *Faker) string {
// EIN format: XX-XXXXXXX (2 digits, dash, 7 digits)
// First two digits have specific valid prefixes
prefixes := []string{"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99"}
prefix := prefixes[f.IntN(len(prefixes))]
// Generate 7 random digits
sevenDigits := ""
for i := 0; i < 7; i++ {
sevenDigits += string(rune('0' + f.IntN(10)))
}
return prefix + "-" + sevenDigits
}
// Gender will generate a random gender string // Gender will generate a random gender string
func Gender() string { return gender(GlobalFaker) } func Gender() string { return gender(GlobalFaker) }
@ -119,6 +158,44 @@ func (f *Faker) Hobby() string { return hobby(f) }
func hobby(f *Faker) string { return getRandValue(f, []string{"person", "hobby"}) } func hobby(f *Faker) string { return getRandValue(f, []string{"person", "hobby"}) }
// SocialMedia will generate a random social media string
func SocialMedia() string { return socialMedia(GlobalFaker) }
// SocialMedia will generate a random social media string
func (f *Faker) SocialMedia() string { return socialMedia(f) }
func socialMedia(f *Faker) string {
template := getRandValue(f, []string{"person", "social_media"})
social, err := generate(f, template)
if err != nil {
return template // fallback to raw template if generation fails
}
return social
}
// Bio will generate a random biography using mad libs style templates
func Bio() string {
return bio(GlobalFaker)
}
// Bio will generate a random biography using mad libs style templates
func (f *Faker) Bio() string {
return bio(f)
}
func bio(f *Faker) string {
template := getRandValue(f, []string{"person", "bio"})
// Use generate function to process the template with all available lookups
bio, err := generate(f, template)
if err != nil {
return template // fallback to raw template if generation fails
}
return bio
}
// ContactInfo struct full of contact info // ContactInfo struct full of contact info
type ContactInfo struct { type ContactInfo struct {
Phone string `json:"phone" xml:"phone"` Phone string `json:"phone" xml:"phone"`
@ -211,6 +288,7 @@ func addPersonLookup() {
"first_name": "Markus", "first_name": "Markus",
"last_name": "Moen", "last_name": "Moen",
"gender": "male", "gender": "male",
"age": 30,
"ssn": "275413589", "ssn": "275413589",
"image": "https://picsum.photos/208/500", "image": "https://picsum.photos/208/500",
"hobby": "Lacrosse", "hobby": "Lacrosse",
@ -243,141 +321,411 @@ func addPersonLookup() {
}`, }`,
Output: "map[string]any", Output: "map[string]any",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{
"person record",
"identity profile",
"user profile",
"personal info",
"individual data",
},
Keywords: []string{
"profile", "identity", "individual",
"user", "account", "record", "contact",
"name", "details", "attributes", "information",
"bio", "demographics", "personal", "data",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return person(f), nil return person(f), nil
}, },
}) })
// full name
AddFuncLookup("name", Info{ AddFuncLookup("name", Info{
Display: "Name", Display: "Name",
Category: "person", Category: "person",
Description: "The given and family name of an individual", Description: "The given and family name of an individual",
Example: "Markus Moen", Example: "Markus Moen",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return name(f), nil "full name",
"person name",
"complete name",
"name string",
"display name",
}, },
Keywords: []string{
"fullname", "given", "family",
"first", "last", "forename", "surname",
"display", "legal",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return name(f), nil },
}) })
// name prefix (honorific)
AddFuncLookup("nameprefix", Info{ AddFuncLookup("nameprefix", Info{
Display: "Name Prefix", Display: "Name Prefix",
Category: "person", Category: "person",
Description: "A title or honorific added before a person's name", Description: "A title or honorific added before a person's name",
Example: "Mr.", Example: "Mr.",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return namePrefix(f), nil "name prefix",
"honorific",
"title prefix",
"courtesy title",
"pre-nominal",
}, },
Keywords: []string{
"prefix", "title", "mr", "ms", "mrs",
"dr", "prof", "sir", "madam", "rev", "fr",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return namePrefix(f), nil },
}) })
// name suffix (generational/professional)
AddFuncLookup("namesuffix", Info{ AddFuncLookup("namesuffix", Info{
Display: "Name Suffix", Display: "Name Suffix",
Category: "person", Category: "person",
Description: "A title or designation added after a person's name", Description: "A title or designation added after a person's name",
Example: "Jr.", Example: "Jr.",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return nameSuffix(f), nil "name suffix",
"post nominal",
"suffix designation",
"generational suffix",
"professional suffix",
}, },
Keywords: []string{
"suffix", "jr", "sr", "iii", "iv",
"esq", "phd", "md", "mba", "cpa",
"designation",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return nameSuffix(f), nil },
}) })
// first name
AddFuncLookup("firstname", Info{ AddFuncLookup("firstname", Info{
Display: "First Name", Display: "First Name",
Category: "person", Category: "person",
Description: "The name given to a person at birth", Description: "The name given to a person at birth",
Example: "Markus", Example: "Markus",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return firstName(f), nil "first name",
"given name",
"forename",
"personal name",
"given label",
}, },
Keywords: []string{
"first", "given", "name",
"preferred", "callname", "initial",
"personal",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return firstName(f), nil },
}) })
// middle name
AddFuncLookup("middlename", Info{ AddFuncLookup("middlename", Info{
Display: "Middle Name", Display: "Middle Name",
Category: "person", Category: "person",
Description: "Name between a person's first name and last name", Description: "Name between a person's first name and last name",
Example: "Belinda", Example: "Belinda",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return middleName(f), nil "middle name",
"second name",
"additional name",
"secondary name",
"middle initial label",
}, },
Keywords: []string{
"middle", "second", "additional", "secondary",
"name", "initial", "intermediate", "optional",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return middleName(f), nil },
}) })
// last name
AddFuncLookup("lastname", Info{ AddFuncLookup("lastname", Info{
Display: "Last Name", Display: "Last Name",
Category: "person", Category: "person",
Description: "The family name or surname of an individual", Description: "The family name or surname of an individual",
Example: "Daniel", Example: "Daniel",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return lastName(f), nil "last name",
"family name",
"surname",
"patronymic",
"family designation",
}, },
Keywords: []string{
"last", "family", "name",
"lineage", "heritage", "ancestry", "clan",
"tribe",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return lastName(f), nil },
}) })
// gender
AddFuncLookup("gender", Info{ AddFuncLookup("gender", Info{
Display: "Gender", Display: "Gender",
Category: "person", Category: "person",
Description: "Classification based on social and cultural norms that identifies an individual", Description: "Classification that identifies gender",
Example: "male", Example: "male",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return gender(f), nil "gender identity",
"gender label",
"sex category",
"gender marker",
"presentation",
}, },
Keywords: []string{
"male", "female", "nonbinary",
"identity", "label", "category", "sex",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return gender(f), nil },
}) })
// age
AddFuncLookup("age", Info{
Display: "Age",
Category: "person",
Description: "The number of years a person has lived",
Example: "40",
Output: "int",
Aliases: []string{
"age of person", "person age", "age of individual", "years old", "years of age",
},
Keywords: []string{
"years", "old", "birthday", "birthdate", "birth-date",
"lifespan", "maturity", "elderly", "young", "adult", "teenager", "child",
"senior", "juvenile", "minor", "majority", "minority", "generation",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return age(f), nil },
})
// ethnicity
AddFuncLookup("ethnicity", Info{
Display: "Ethnicity",
Category: "person",
Description: "Classification that identifies a person's cultural or ethnic background",
Example: "German",
Output: "string",
Aliases: []string{
"ethnic background",
"ethnic identity",
"cultural background",
"cultural heritage",
"ethnic origin",
},
Keywords: []string{
"ethnic", "heritage", "ancestry",
"origin", "identity", "cultural", "nationality",
"background", "descent", "lineage",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return ethnicity(f), nil },
})
// ssn
AddFuncLookup("ssn", Info{ AddFuncLookup("ssn", Info{
Display: "SSN", Display: "SSN",
Category: "person", Category: "person",
Description: "Unique nine-digit identifier used for government and financial purposes in the United States", Description: "Unique nine-digit identifier used for government and financial purposes in the United States",
Example: "296446360", Example: "296446360",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return ssn(f), nil "social security number",
"ssn number",
"us ssn",
"tax id us",
"federal id",
}, },
Keywords: []string{
"social", "security", "number",
"us", "tax", "irs", "employment",
"benefits", "identification",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return ssn(f), nil },
}) })
AddFuncLookup("ein", Info{
Display: "EIN",
Category: "person",
Description: "Nine-digit Employer Identification Number used by businesses for tax purposes",
Example: "12-3456789",
Output: "string",
Aliases: []string{
"employer id",
"tax id",
"business tax id",
"federal tax id",
"irs number",
},
Keywords: []string{
"employer", "identification", "tax", "business", "federal", "irs", "number", "id",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return ein(f), nil },
})
// hobby
AddFuncLookup("hobby", Info{ AddFuncLookup("hobby", Info{
Display: "Hobby", Display: "Hobby",
Category: "person", Category: "person",
Description: "An activity pursued for leisure and pleasure", Description: "An activity pursued for leisure and pleasure",
Example: "Swimming", Example: "Swimming",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return hobby(f), nil "pastime",
"leisure activity",
"recreational activity",
"interest",
"free-time pursuit",
}, },
Keywords: []string{
"leisure", "recreation",
"activity", "sport", "craft",
"game", "collection",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return hobby(f), nil },
}) })
AddFuncLookup("socialmedia", Info{
Display: "Social Media",
Category: "person",
Description: "Random social media string",
Example: "https://twitter.com/ImpossibleTrousers",
Output: "string",
Aliases: []string{
"social media",
"social link",
"social url",
"social handle",
"social username",
"social profile",
"profile link",
"profile url",
"profile handle",
"account link",
"account url",
"account handle",
"username handle",
"screen name",
// platform-intent phrases (useful for fuzzy scoring)
"twitter link",
"x link",
"instagram link",
"linkedin url",
"github url",
"tiktok handle",
"facebook profile",
},
Keywords: []string{
"social", "media", "profile", "account", "handle", "username",
"screenname", "link", "url",
"twitter", "x", "instagram", "linkedin", "github",
"tiktok", "facebook", "dribbble", "behance",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return socialMedia(f), nil },
})
AddFuncLookup("bio", Info{
Display: "Biography",
Category: "person",
Description: "Random biography",
Example: "Born in New York, John grew up to become a Software Engineer who codes applications.",
Output: "string",
Aliases: []string{
"bio",
"short bio",
"mini bio",
"one line bio",
"profile bio",
"user bio",
"author bio",
"about",
"about me",
"profile summary",
"personal summary",
"blurb",
"elevator pitch",
},
Keywords: []string{
"profile", "summary", "tagline", "intro",
"overview", "description", "story", "background",
"career", "job", "role", "hobby", "personal", "person",
"one-liner", "author", "user",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return f.Bio(), nil },
})
// email
AddFuncLookup("email", Info{ AddFuncLookup("email", Info{
Display: "Email", Display: "Email",
Category: "person", Category: "person",
Description: "Electronic mail used for sending digital messages and communication over the internet", Description: "Electronic mail address",
Example: "markusmoen@pagac.net", Example: "markusmoen@pagac.net",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return email(f), nil "email address",
"mail address",
"contact email",
"user email",
"electronic mailbox",
}, },
Keywords: []string{
"address", "mail", "inbox",
"account", "contact", "sender", "recipient",
"domain", "username",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return email(f), nil },
}) })
// phone (raw digits)
AddFuncLookup("phone", Info{ AddFuncLookup("phone", Info{
Display: "Phone", Display: "Phone",
Category: "person", Category: "person",
Description: "Numerical sequence used to contact individuals via telephone or mobile devices", Description: "Numerical sequence used to contact individuals via telephone or mobile devices",
Example: "6136459948", Example: "6136459948",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return phone(f), nil "phone number",
"telephone number",
"mobile number",
"contact number",
"voice number",
}, },
Keywords: []string{
"number", "telephone", "mobile",
"contact", "dial", "cell", "landline",
"e164", "voice",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return phone(f), nil },
}) })
// phone formatted (readable)
AddFuncLookup("phoneformatted", Info{ AddFuncLookup("phoneformatted", Info{
Display: "Phone Formatted", Display: "Phone Formatted",
Category: "person", Category: "person",
Description: "Formatted phone number of a person", Description: "Formatted phone number of a person",
Example: "136-459-9489", Example: "136-459-9489",
Output: "string", Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Aliases: []string{
return phoneFormatted(f), nil "formatted phone",
"pretty phone",
"display phone",
"readable phone",
"formatted telephone",
}, },
Keywords: []string{
"phone", "formatted", "format", "pattern",
"dashes", "parentheses", "spaces", "separators",
"telephone", "contact",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { return phoneFormatted(f), nil },
}) })
AddFuncLookup("teams", Info{ AddFuncLookup("teams", Info{
@ -402,6 +750,17 @@ func addPersonLookup() {
}`, }`,
Output: "map[string][]string", Output: "map[string][]string",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{
"people grouping",
"team assignment",
"random partition",
"group allocator",
"roster builder",
},
Keywords: []string{
"randomly", "person", "into",
"distribution", "allocation", "roster", "squad",
},
Params: []Param{ Params: []Param{
{Field: "people", Display: "Strings", Type: "[]string", Description: "Array of people"}, {Field: "people", Display: "Strings", Type: "[]string", Description: "Array of people"},
{Field: "teams", Display: "Strings", Type: "[]string", Description: "Array of teams"}, {Field: "teams", Display: "Strings", Type: "[]string", Description: "Array of teams"},

View File

@ -2,7 +2,10 @@ package gofakeit
import ( import (
"fmt" "fmt"
"strconv"
"strings" "strings"
"github.com/brianvoe/gofakeit/v7/data"
) )
type ProductInfo struct { type ProductInfo struct {
@ -69,38 +72,62 @@ func (f *Faker) ProductName() string { return productName(f) }
func productName(f *Faker) string { func productName(f *Faker) string {
name := getRandValue(f, []string{"product", "name"}) name := getRandValue(f, []string{"product", "name"})
switch number(f, 0, 9) { adj := func() string { return getRandValue(f, []string{"product", "adjective"}) }
case 1: suf := func() string { return getRandValue(f, []string{"product", "suffix"}) }
// Name + Adjective + Feature mat := func() string { return productMaterial(f) }
return title(fmt.Sprintf("%s %s %s", name, getRandValue(f, []string{"product", "adjective"}), productFeature(f))) feat := func() string { return productFeature(f) }
case 2:
// Adjective + Material + Name // Small realism helpers: occasional compound/connector without turning into a listing
return title(fmt.Sprintf("%s %s %s", getRandValue(f, []string{"product", "adjective"}), productMaterial(f), name)) compoundAdj := func() string {
case 3: // 1 in 5: "adj-adj" (e.g., "Ultra-Light", "Quick-Dry")
// Color + Name + Suffix if number(f, 1, 5) == 1 {
return title(fmt.Sprintf("%s %s %s", safeColor(f), name, getRandValue(f, []string{"product", "suffix"}))) return fmt.Sprintf("%s-%s", adj(), adj())
case 4: }
// Feature + Name + Adjective return adj()
return title(fmt.Sprintf("%s %s %s", productFeature(f), name, getRandValue(f, []string{"product", "adjective"})))
case 5:
// Material + Color + Name
return title(fmt.Sprintf("%s %s %s", productMaterial(f), safeColor(f), name))
case 6:
// Name + Suffix + Material
return title(fmt.Sprintf("%s %s %s", name, getRandValue(f, []string{"product", "suffix"}), productMaterial(f)))
case 7:
// Adjective + Feature + Name
return title(fmt.Sprintf("%s %s %s", getRandValue(f, []string{"product", "adjective"}), productFeature(f), name))
case 8:
// Color + Material + Name
return title(fmt.Sprintf("%s %s %s", safeColor(f), productMaterial(f), name))
case 9:
// Suffix + Adjective + Name
return title(fmt.Sprintf("%s %s %s", getRandValue(f, []string{"product", "suffix"}), getRandValue(f, []string{"product", "adjective"}), name))
} }
// case: 0 - Adjective + Name + Suffix // Keep it "product name"-ish: 23 chunks, no specs/colors/for-phrases.
return title(fmt.Sprintf("%s %s %s", getRandValue(f, []string{"product", "adjective"}), name, getRandValue(f, []string{"product", "suffix"}))) // Weighted: 2-word names (~70%), 3-word names (~30%)
wordCount, _ := weighted(f, []any{"2word", "3word"}, []float32{70, 30})
switch wordCount {
case "2word":
// 2-word names (most common in real products)
switch number(f, 0, 4) {
case 0, 1:
// Adjective + Name (most common 2-word pattern)
return title(fmt.Sprintf("%s %s", compoundAdj(), name))
case 2:
// Name + Suffix
return title(fmt.Sprintf("%s %s", name, suf()))
case 3:
// Material + Name
return title(fmt.Sprintf("%s %s", mat(), name))
case 4:
// Feature + Name
return title(fmt.Sprintf("%s %s", feat(), name))
}
case "3word":
// 3-word names (less common)
switch number(f, 0, 4) {
case 0, 1:
// Adjective + Name + Suffix (most common 3-word pattern)
return title(fmt.Sprintf("%s %s %s", compoundAdj(), name, suf()))
case 2:
// Name + Feature + Suffix
return title(fmt.Sprintf("%s %s %s", name, feat(), suf()))
case 3:
// Adjective + Feature + Name
return title(fmt.Sprintf("%s %s %s", compoundAdj(), feat(), name))
case 4:
// Name + Material + Suffix
return title(fmt.Sprintf("%s %s %s", name, mat(), suf()))
}
}
// Fallback to 2-word name
return title(fmt.Sprintf("%s %s", compoundAdj(), name))
} }
// ProductDescription will generate a random product description // ProductDescription will generate a random product description
@ -233,6 +260,87 @@ func productSuffix(f *Faker) string {
return getRandValue(f, []string{"product", "suffix"}) return getRandValue(f, []string{"product", "suffix"})
} }
// ProductISBN13 will generate a random ISBN-13 string for the product
func ProductISBN(opts *ISBNOptions) string { return productISBN(GlobalFaker, opts) }
// ProductISBN13 will generate a random ISBN-13 string for the product
func (f *Faker) ProductISBN(opts *ISBNOptions) string { return productISBN(f, opts) }
type ISBNOptions struct {
Version string // "10" or "13"
Separator string // e.g. "-", "" (default: "-")
}
func productISBN(f *Faker, opts *ISBNOptions) string {
if opts == nil {
opts = &ISBNOptions{Version: "13", Separator: "-"}
}
sep := opts.Separator
if sep == "" {
sep = "-"
}
// string of n random digits
randomDigits := func(f *Faker, n int) string {
digits := make([]byte, n)
for i := 0; i < n; i++ {
digits[i] = byte('0' + number(f, 0, 9))
}
return string(digits)
}
switch opts.Version {
case "10":
// ISBN-10 format: group(1)-registrant(4)-publication(3)-check(1)
group := randomDigits(f, 1)
registrant := randomDigits(f, 4)
publication := randomDigits(f, 3)
base := group + registrant + publication
// checksum
sum := 0
for i, c := range base {
digit := int(c - '0')
sum += digit * (10 - i)
}
remainder := (11 - (sum % 11)) % 11
check := "X"
if remainder < 10 {
check = strconv.Itoa(remainder)
}
return strings.Join([]string{group, registrant, publication, check}, sep)
case "13":
// ISBN-13 format: prefix(3)-group(1)-registrant(4)-publication(4)-check(1)
prefix := data.ISBN13Prefix
group := randomDigits(f, 1)
registrant := randomDigits(f, 4)
publication := randomDigits(f, 4)
base := prefix + group + registrant + publication
// checksum
sum := 0
for i, c := range base {
digit := int(c - '0')
if i%2 == 0 {
sum += digit
} else {
sum += digit * 3
}
}
remainder := (10 - (sum % 10)) % 10
check := strconv.Itoa(remainder)
return strings.Join([]string{prefix, group, registrant, publication, check}, sep)
default:
// fallback to ISBN-13 if invalid version provided
return productISBN(f, &ISBNOptions{Version: "13", Separator: sep})
}
}
func addProductLookup() { func addProductLookup() {
AddFuncLookup("product", Info{ AddFuncLookup("product", Info{
Display: "Product", Display: "Product",
@ -262,6 +370,17 @@ func addProductLookup() {
}`, }`,
Output: "map[string]any", Output: "map[string]any",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{
"goods",
"merchandise",
"retail item",
"consumer product",
"commercial item",
},
Keywords: []string{
"sale", "use", "trade", "manufactured",
"market", "inventory", "supply", "distribution", "commodity",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return product(f), nil return product(f), nil
}, },
@ -273,6 +392,19 @@ func addProductLookup() {
Description: "Distinctive title or label assigned to a product for identification and marketing", Description: "Distinctive title or label assigned to a product for identification and marketing",
Example: "olive copper monitor", Example: "olive copper monitor",
Output: "string", Output: "string",
Aliases: []string{
"product title",
"product label",
"brand name",
"item name",
"product identifier",
},
Keywords: []string{
"product", "name", "title", "label", "brand",
"item", "merchandise", "goods", "article",
"identifier", "marketing", "branding",
"catalog", "inventory",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productName(f), nil return productName(f), nil
}, },
@ -284,6 +416,19 @@ func addProductLookup() {
Description: "Explanation detailing the features and characteristics of a product", Description: "Explanation detailing the features and characteristics of a product",
Example: "Backwards caused quarterly without week it hungry thing someone him regularly. Whomever this revolt hence from his timing as quantity us these yours.", Example: "Backwards caused quarterly without week it hungry thing someone him regularly. Whomever this revolt hence from his timing as quantity us these yours.",
Output: "string", Output: "string",
Aliases: []string{
"product details",
"product specs",
"item description",
"feature list",
"marketing copy",
},
Keywords: []string{
"product", "description", "details", "features",
"specifications", "characteristics", "summary",
"overview", "attributes", "benefits",
"marketing", "content", "copy", "info", "text",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productDescription(f), nil return productDescription(f), nil
}, },
@ -295,6 +440,19 @@ func addProductLookup() {
Description: "Classification grouping similar products based on shared characteristics or functions", Description: "Classification grouping similar products based on shared characteristics or functions",
Example: "clothing", Example: "clothing",
Output: "string", Output: "string",
Aliases: []string{
"product classification",
"product type",
"item category",
"product group",
"product segment",
},
Keywords: []string{
"product", "category", "type", "class", "classification",
"group", "segment", "line", "collection", "range",
"electronics", "furniture", "clothing", "appliances",
"food", "toys", "accessories", "goods",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productCategory(f), nil return productCategory(f), nil
}, },
@ -306,6 +464,19 @@ func addProductLookup() {
Description: "Specific characteristic of a product that distinguishes it from others products", Description: "Specific characteristic of a product that distinguishes it from others products",
Example: "ultra-lightweight", Example: "ultra-lightweight",
Output: "string", Output: "string",
Aliases: []string{
"product trait",
"product attribute",
"key feature",
"unique feature",
"special characteristic",
},
Keywords: []string{
"feature", "trait", "attribute", "characteristic",
"capability", "functionality", "specification",
"benefit", "advantage", "highlight",
"unique", "differentiator",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productFeature(f), nil return productFeature(f), nil
}, },
@ -317,6 +488,19 @@ func addProductLookup() {
Description: "The substance from which a product is made, influencing its appearance, durability, and properties", Description: "The substance from which a product is made, influencing its appearance, durability, and properties",
Example: "brass", Example: "brass",
Output: "string", Output: "string",
Aliases: []string{
"material type",
"product substance",
"product composition",
"item material",
"build material",
},
Keywords: []string{
"material", "substance", "composition", "make",
"fabric", "textile", "cloth", "leather", "wool",
"wood", "metal", "plastic", "glass", "stone",
"durability", "properties", "construction",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productMaterial(f), nil return productMaterial(f), nil
}, },
@ -328,6 +512,20 @@ func addProductLookup() {
Description: "Standardized barcode used for product identification and tracking in retail and commerce", Description: "Standardized barcode used for product identification and tracking in retail and commerce",
Example: "012780949980", Example: "012780949980",
Output: "string", Output: "string",
Aliases: []string{
"upc code",
"product barcode",
"product code",
"product sku",
"universal product code",
"retail barcode",
},
Keywords: []string{
"upc", "barcode", "product", "code", "identifier",
"sku", "retail", "commerce", "inventory",
"tracking", "scanning", "checkout", "label",
"universal", "standard",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productUPC(f), nil return productUPC(f), nil
}, },
@ -339,6 +537,20 @@ func addProductLookup() {
Description: "The group of people for whom the product is designed or intended", Description: "The group of people for whom the product is designed or intended",
Example: "adults", Example: "adults",
Output: "[]string", Output: "[]string",
Aliases: []string{
"target audience",
"target market",
"customer group",
"user base",
"demographic group",
},
Keywords: []string{
"audience", "market", "segment", "demographic",
"consumer", "customer", "buyer", "user",
"group", "target", "population", "adults",
"kids", "teens", "families", "professionals",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productAudience(f), nil return productAudience(f), nil
}, },
@ -350,6 +562,19 @@ func addProductLookup() {
Description: "The size or dimension of a product", Description: "The size or dimension of a product",
Example: "medium", Example: "medium",
Output: "string", Output: "string",
Aliases: []string{
"product size",
"product measurement",
"item dimensions",
"product scale",
"size specification",
},
Keywords: []string{
"dimension", "size", "measurement", "proportion",
"scale", "specification", "specs", "length",
"width", "height", "depth", "volume", "weight",
"product", "item",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productDimension(f), nil return productDimension(f), nil
}, },
@ -361,6 +586,19 @@ func addProductLookup() {
Description: "The scenario or purpose for which a product is typically used", Description: "The scenario or purpose for which a product is typically used",
Example: "home", Example: "home",
Output: "string", Output: "string",
Aliases: []string{
"use case",
"product purpose",
"intended use",
"product application",
"usage scenario",
},
Keywords: []string{
"use", "usecase", "purpose", "usage", "application",
"context", "scenario", "situation", "case",
"intention", "goal", "objective", "function",
"home", "office", "outdoor", "industrial", "commercial",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productUseCase(f), nil return productUseCase(f), nil
}, },
@ -372,6 +610,17 @@ func addProductLookup() {
Description: "The key advantage or value the product provides", Description: "The key advantage or value the product provides",
Example: "comfort", Example: "comfort",
Output: "string", Output: "string",
Aliases: []string{
"product advantage",
"product value",
"user benefit",
"customer gain",
"selling point",
},
Keywords: []string{
"benefit", "advantage", "value", "improvement",
"enhancement", "feature", "positive", "outcome",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productBenefit(f), nil return productBenefit(f), nil
}, },
@ -383,8 +632,39 @@ func addProductLookup() {
Description: "A suffix used to differentiate product models or versions", Description: "A suffix used to differentiate product models or versions",
Example: "pro", Example: "pro",
Output: "string", Output: "string",
Aliases: []string{
"product suffix",
"model suffix",
"version suffix",
"edition suffix",
"name suffix",
},
Keywords: []string{
"suffix", "variant", "edition", "version", "model",
"series", "line", "tier", "release", "upgrade",
"plus", "pro", "max", "lite", "mini",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productSuffix(f), nil return productSuffix(f), nil
}, },
}) })
AddFuncLookup("productisbn", Info{
Display: "Product ISBN",
Category: "product",
Description: "ISBN-10 or ISBN-13 identifier for books",
Example: "978-1-4028-9462-6",
Output: "string",
Aliases: []string{
"isbn code", "isbn number", "book isbn", "isbn13",
"isbn10", "publication code", "book identifier",
},
Keywords: []string{
"identifier", "publication", "library", "catalog",
"literature", "reference", "edition", "registration", "publishing",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return productISBN(f, nil), nil
},
})
} }

View File

@ -18,6 +18,12 @@ func addSchoolLookup() {
Description: "An institution for formal education and learning", Description: "An institution for formal education and learning",
Example: `Harborview State Academy`, Example: `Harborview State Academy`,
Output: "string", Output: "string",
Aliases: []string{
"academy", "educational institute", "learning center", "training school", "academic institution",
},
Keywords: []string{
"institution", "education", "learning", "teaching", "university", "college", "campus", "classroom", "study", "pupil", "curriculum", "instruction",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return school(f), nil return school(f), nil
}, },

View File

@ -11,5 +11,9 @@ func Slice(v any) { sliceFunc(GlobalFaker, v) }
func (f *Faker) Slice(v any) { sliceFunc(f, v) } func (f *Faker) Slice(v any) { sliceFunc(f, v) }
func sliceFunc(f *Faker, v any) { func sliceFunc(f *Faker, v any) {
r(f, reflect.TypeOf(v), reflect.ValueOf(v), "", -1) // Note: We intentionally call r with size -1 instead of using structFunc.
// structFunc starts with size 0, which would result in zero-length top-level
// slices and maps. Passing -1 lets rSlice/rMap auto-size (random length)
// when no fakesize tag is provided.
r(f, reflect.TypeOf(v), reflect.ValueOf(v), "", -1, 0)
} }

131
vendor/github.com/brianvoe/gofakeit/v7/song.go generated vendored Normal file
View File

@ -0,0 +1,131 @@
package gofakeit
func SongName() string { return songName(GlobalFaker) }
func (f *Faker) SongName() string { return songName(f) }
func songName(f *Faker) string { return getRandValue(f, []string{"song", "name"}) }
func SongArtist() string { return songArtist(GlobalFaker) }
func (f *Faker) SongArtist() string { return songArtist(f) }
func songArtist(f *Faker) string { return getRandValue(f, []string{"song", "artist"}) }
func SongGenre() string { return songGenre(GlobalFaker) }
func (f *Faker) SongGenre() string { return songGenre(f) }
func songGenre(f *Faker) string { return getRandValue(f, []string{"song", "genre"}) }
type SongInfo struct {
Name string `json:"name" xml:"name"`
Artist string `json:"artist" xml:"artist"`
Genre string `json:"genre" xml:"genre"`
}
func Song() *SongInfo { return song(GlobalFaker) }
func (f *Faker) Song() *SongInfo { return song(f) }
func song(f *Faker) *SongInfo {
return &SongInfo{
Name: songName(f),
Artist: songArtist(f),
Genre: songGenre(f),
}
}
func addSongLookup() {
AddFuncLookup("song", Info{
Display: "Song",
Category: "song",
Description: "Song with a drum and horn instrumentation",
Example: `{
"name": "New Rules",
"genre": "Tropical house"
}`,
Output: "map[string]string",
ContentType: "application/json",
Aliases: []string{
"musical work",
"sound piece",
"single release",
"record title",
"audio selection",
},
Keywords: []string{
"music", "track", "tune", "melody",
"artist", "genre", "name", "composition", "recording",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return song(f), nil
},
})
AddFuncLookup("songname", Info{
Display: "Song Name",
Category: "song",
Description: "Title or name of a specific song used for identification and reference",
Example: "New Rules",
Output: "string",
Aliases: []string{
"song title",
"track name",
"music title",
"song label",
},
Keywords: []string{
"song", "title", "name", "track", "music",
"single", "hit", "tune", "recording",
"composition", "melody",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return songName(f), nil
},
})
AddFuncLookup("songartist", Info{
Display: "Song Artist",
Category: "song",
Description: "The artist of maker of song",
Example: "Dua Lipa",
Output: "string",
Aliases: []string{
"performer name",
"music act",
"band name",
"recording artist",
"song creator",
},
Keywords: []string{
"song", "artist", "singer", "musician", "composer",
"band", "producer", "vocalist", "group", "instrumentalist",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return songArtist(f), nil
},
})
AddFuncLookup("songgenre", Info{
Display: "Genre",
Category: "song",
Description: "Category that classifies song based on common themes, styles, and storytelling approaches",
Example: "Action",
Output: "string",
Aliases: []string{
"music style",
"song category",
"musical classification",
"sound type",
"genre label",
},
Keywords: []string{
"song", "style", "category", "type",
"classification", "theme", "musical", "subgenre", "influence",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return songGenre(f), nil
},
})
}

View File

@ -21,7 +21,7 @@ func sqlFunc(f *Faker, so *SQLOptions) (string, error) {
if so.Table == "" { if so.Table == "" {
return "", errors.New("must provide table name to generate SQL") return "", errors.New("must provide table name to generate SQL")
} }
if so.Fields == nil || len(so.Fields) <= 0 { if len(so.Fields) <= 0 {
return "", errors.New(("must pass fields in order to generate SQL queries")) return "", errors.New(("must pass fields in order to generate SQL queries"))
} }
if so.Count <= 0 { if so.Count <= 0 {
@ -112,6 +112,12 @@ VALUES
(2, 'Santino', 235.13, 40, '1964-07-07 22:25:40');`, (2, 'Santino', 235.13, 40, '1964-07-07 22:25:40');`,
Output: "string", Output: "string",
ContentType: "application/sql", ContentType: "application/sql",
Aliases: []string{
"insert command", "database query", "sql statement", "record insert", "data query",
},
Keywords: []string{
"database", "insert", "command", "records", "table", "tuples", "rows", "data", "values", "query",
},
Params: []Param{ Params: []Param{
{Field: "table", Display: "Table", Type: "string", Description: "Name of the table to insert into"}, {Field: "table", Display: "Table", Type: "string", Description: "Name of the table to insert into"},
{Field: "count", Display: "Count", Type: "int", Default: "100", Description: "Number of inserts to generate"}, {Field: "count", Display: "Count", Type: "int", Default: "100", Description: "Number of inserts to generate"},
@ -153,4 +159,5 @@ VALUES
return sqlFunc(f, &so) return sqlFunc(f, &so)
}, },
}) })
} }

View File

@ -124,6 +124,12 @@ func addStringLookup() {
Description: "Character or symbol from the American Standard Code for Information Interchange (ASCII) character set", Description: "Character or symbol from the American Standard Code for Information Interchange (ASCII) character set",
Example: "g", Example: "g",
Output: "string", Output: "string",
Aliases: []string{
"alphabet", "character", "text symbol", "ascii char", "alphabetical sign",
},
Keywords: []string{
"standard", "code", "information", "interchange", "set", "printable", "typography", "symbolic", "encoding",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return letter(f), nil return letter(f), nil
}, },
@ -135,6 +141,12 @@ func addStringLookup() {
Description: "ASCII string with length N", Description: "ASCII string with length N",
Example: "gbRMaRxHki", Example: "gbRMaRxHki",
Output: "string", Output: "string",
Aliases: []string{
"random letters", "ascii string", "text sequence", "generated letters", "alphabetical string",
},
Keywords: []string{
"sequence", "multiple", "concatenated", "combined", "series", "generated", "batch", "collection",
},
Params: []Param{ Params: []Param{
{Field: "count", Display: "Count", Type: "uint", Description: "Number of digits to generate"}, {Field: "count", Display: "Count", Type: "uint", Description: "Number of digits to generate"},
}, },
@ -154,6 +166,12 @@ func addStringLookup() {
Description: "Speech sound produced with an open vocal tract", Description: "Speech sound produced with an open vocal tract",
Example: "a", Example: "a",
Output: "string", Output: "string",
Aliases: []string{
"vocal sound", "speech letter", "phonetic vowel", "linguistic vowel", "spoken sound",
},
Keywords: []string{
"open", "e", "i", "o", "u", "phonetic", "linguistic", "articulation", "pronunciation", "syllable",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return vowel(f), nil return vowel(f), nil
}, },
@ -165,6 +183,12 @@ func addStringLookup() {
Description: "Numerical symbol used to represent numbers", Description: "Numerical symbol used to represent numbers",
Example: "0", Example: "0",
Output: "string", Output: "string",
Aliases: []string{
"number symbol", "numeric character", "decimal digit", "ascii number", "numerical sign",
},
Keywords: []string{
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "decimal", "base10", "notation", "numeric",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return digit(f), nil return digit(f), nil
}, },
@ -173,9 +197,15 @@ func addStringLookup() {
AddFuncLookup("digitn", Info{ AddFuncLookup("digitn", Info{
Display: "DigitN", Display: "DigitN",
Category: "string", Category: "string",
Description: "string of length N consisting of ASCII digits", Description: "String of length N consisting of ASCII digits",
Example: "0136459948", Example: "0136459948",
Output: "string", Output: "string",
Aliases: []string{
"numeric string", "digit sequence", "number series", "generated digits", "ascii digits",
},
Keywords: []string{
"consisting", "multiple", "concatenated", "combined", "series", "numeric", "sequence", "continuous", "string", "digits",
},
Params: []Param{ Params: []Param{
{Field: "count", Display: "Count", Type: "uint", Description: "Number of digits to generate"}, {Field: "count", Display: "Count", Type: "uint", Description: "Number of digits to generate"},
}, },
@ -195,6 +225,12 @@ func addStringLookup() {
Description: "Replace # with random numerical values", Description: "Replace # with random numerical values",
Example: "(###)###-#### => (555)867-5309", Example: "(###)###-#### => (555)867-5309",
Output: "string", Output: "string",
Aliases: []string{
"hash replace", "number substitute", "pattern filler", "digit replacer", "placeholder numbers",
},
Keywords: []string{
"replace", "hash", "pound", "template", "placeholder", "format", "substitute", "pattern", "randomize", "masking",
},
Params: []Param{ Params: []Param{
{Field: "str", Display: "String", Type: "string", Description: "String value to replace #'s"}, {Field: "str", Display: "String", Type: "string", Description: "String value to replace #'s"},
}, },
@ -214,6 +250,12 @@ func addStringLookup() {
Description: "Replace ? with random generated letters", Description: "Replace ? with random generated letters",
Example: "?????@??????.com => billy@mister.com", Example: "?????@??????.com => billy@mister.com",
Output: "string", Output: "string",
Aliases: []string{
"letter substitute", "pattern letters", "placeholder letters", "random letter filler", "character replacer",
},
Keywords: []string{
"replace", "question", "mark", "template", "placeholder", "format", "substitute", "pattern", "randomize", "masking",
},
Params: []Param{ Params: []Param{
{Field: "str", Display: "String", Type: "string", Description: "String value to replace ?'s"}, {Field: "str", Display: "String", Type: "string", Description: "String value to replace ?'s"},
}, },
@ -234,6 +276,12 @@ func addStringLookup() {
Example: "hello,world,whats,up => whats,world,hello,up", Example: "hello,world,whats,up => whats,world,hello,up",
Output: "[]string", Output: "[]string",
ContentType: "application/json", ContentType: "application/json",
Aliases: []string{
"array shuffle", "list randomize", "string reorder", "string mixer", "sequence shuffle",
},
Keywords: []string{
"collection", "list", "slice", "permutation", "randomized", "scrambled", "jumbled", "unordered",
},
Params: []Param{ Params: []Param{
{Field: "strs", Display: "Strings", Type: "[]string", Description: "Delimited separated strings"}, {Field: "strs", Display: "Strings", Type: "[]string", Description: "Delimited separated strings"},
}, },
@ -254,7 +302,13 @@ func addStringLookup() {
Category: "string", Category: "string",
Description: "Return a random string from a string array", Description: "Return a random string from a string array",
Example: "hello,world,whats,up => world", Example: "hello,world,whats,up => world",
Output: "[]string", Output: "string",
Aliases: []string{
"string picker", "array choice", "string select", "random pick", "string chooser",
},
Keywords: []string{
"selection", "chosen", "picked", "random", "list", "slice", "array", "choice", "element", "option",
},
Params: []Param{ Params: []Param{
{Field: "strs", Display: "Strings", Type: "[]string", Description: "Delimited separated strings"}, {Field: "strs", Display: "Strings", Type: "[]string", Description: "Delimited separated strings"},
}, },
@ -267,4 +321,5 @@ func addStringLookup() {
return randomString(f, strs), nil return randomString(f, strs), nil
}, },
}) })
} }

View File

@ -9,6 +9,10 @@ import (
"time" "time"
) )
// RecursiveDepth controls the maximum recursion depth when populating structs.
// Increase if your data structures are deeply nested; decrease to be more conservative.
var RecursiveDepth = 10
// Struct fills in exported fields of a struct with random data // Struct fills in exported fields of a struct with random data
// based on the value of `fake` tag of exported fields // based on the value of `fake` tag of exported fields
// or with the result of a call to the Fake() method // or with the result of a call to the Fake() method
@ -26,10 +30,10 @@ func Struct(v any) error { return structFunc(GlobalFaker, v) }
func (f *Faker) Struct(v any) error { return structFunc(f, v) } func (f *Faker) Struct(v any) error { return structFunc(f, v) }
func structFunc(f *Faker, v any) error { func structFunc(f *Faker, v any) error {
return r(f, reflect.TypeOf(v), reflect.ValueOf(v), "", 0) return r(f, reflect.TypeOf(v), reflect.ValueOf(v), "", 0, 0)
} }
func r(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { func r(f *Faker, t reflect.Type, v reflect.Value, tag string, size int, depth int) error {
// Handle special types // Handle special types
if t.PkgPath() == "encoding/json" { if t.PkgPath() == "encoding/json" {
@ -50,9 +54,9 @@ func r(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error {
// Handle generic types // Handle generic types
switch t.Kind() { switch t.Kind() {
case reflect.Ptr: case reflect.Ptr:
return rPointer(f, t, v, tag, size) return rPointer(f, t, v, tag, size, depth)
case reflect.Struct: case reflect.Struct:
return rStruct(f, t, v, tag) return rStruct(f, t, v, tag, depth)
case reflect.String: case reflect.String:
return rString(f, t, v, tag) return rString(f, t, v, tag)
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
@ -64,9 +68,9 @@ func r(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error {
case reflect.Bool: case reflect.Bool:
return rBool(f, t, v, tag) return rBool(f, t, v, tag)
case reflect.Array, reflect.Slice: case reflect.Array, reflect.Slice:
return rSlice(f, t, v, tag, size) return rSlice(f, t, v, tag, size, depth)
case reflect.Map: case reflect.Map:
return rMap(f, t, v, tag, size) return rMap(f, t, v, tag, size, depth)
} }
return nil return nil
@ -123,7 +127,12 @@ func rCustom(f *Faker, v reflect.Value, tag string) error {
return nil return nil
} }
func rStruct(f *Faker, t reflect.Type, v reflect.Value, tag string) error { func rStruct(f *Faker, t reflect.Type, v reflect.Value, tag string, depth int) error {
// Prevent recursing deeper than configured levels
if depth >= RecursiveDepth {
return nil
}
// Check if tag exists, if so run custom function // Check if tag exists, if so run custom function
if t.Name() != "" && tag != "" { if t.Name() != "" && tag != "" {
return rCustom(f, v, tag) return rCustom(f, v, tag)
@ -214,7 +223,7 @@ func rStruct(f *Faker, t reflect.Type, v reflect.Value, tag string) error {
} }
// Recursively call r() to fill in the struct // Recursively call r() to fill in the struct
err := r(f, elementT.Type, elementV, fakeTag, size) err := r(f, elementT.Type, elementV, fakeTag, size, depth+1)
if err != nil { if err != nil {
return err return err
} }
@ -223,18 +232,23 @@ func rStruct(f *Faker, t reflect.Type, v reflect.Value, tag string) error {
return nil return nil
} }
func rPointer(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { func rPointer(f *Faker, t reflect.Type, v reflect.Value, tag string, size int, depth int) error {
elemT := t.Elem() elemT := t.Elem()
// Prevent recursing deeper than configured levels
if depth >= RecursiveDepth {
return nil
}
if v.IsNil() { if v.IsNil() {
nv := reflect.New(elemT).Elem() nv := reflect.New(elemT).Elem()
err := r(f, elemT, nv, tag, size) err := r(f, elemT, nv, tag, size, depth+1)
if err != nil { if err != nil {
return err return err
} }
v.Set(nv.Addr()) v.Set(nv.Addr())
} else { } else {
err := r(f, elemT, v.Elem(), tag, size) err := r(f, elemT, v.Elem(), tag, size, depth+1)
if err != nil { if err != nil {
return err return err
} }
@ -243,12 +257,17 @@ func rPointer(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) e
return nil return nil
} }
func rSlice(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { func rSlice(f *Faker, t reflect.Type, v reflect.Value, tag string, size int, depth int) error {
// If you cant even set it dont even try // If you cant even set it dont even try
if !v.CanSet() { if !v.CanSet() {
return errors.New("cannot set slice") return errors.New("cannot set slice")
} }
// Prevent recursing deeper than configured levels
if depth >= RecursiveDepth {
return nil
}
// Check if tag exists, if so run custom function // Check if tag exists, if so run custom function
if t.Name() != "" && tag != "" { if t.Name() != "" && tag != "" {
// Check to see if custom function works if not continue to normal loop of values // Check to see if custom function works if not continue to normal loop of values
@ -284,7 +303,7 @@ func rSlice(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) err
// Loop through the elements length and set based upon the index // Loop through the elements length and set based upon the index
for i := 0; i < size; i++ { for i := 0; i < size; i++ {
nv := reflect.New(elemT) nv := reflect.New(elemT)
err := r(f, elemT, nv.Elem(), tag, ogSize) err := r(f, elemT, nv.Elem(), tag, ogSize, depth+1)
if err != nil { if err != nil {
return err return err
} }
@ -300,18 +319,22 @@ func rSlice(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) err
return nil return nil
} }
func rMap(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error { func rMap(f *Faker, t reflect.Type, v reflect.Value, tag string, size int, depth int) error {
// If you cant even set it dont even try // If you cant even set it dont even try
if !v.CanSet() { if !v.CanSet() {
return errors.New("cannot set slice") return errors.New("cannot set slice")
} }
// Prevent recursing deeper than configured levels
if depth >= RecursiveDepth {
return nil
}
// Check if tag exists, if so run custom function // Check if tag exists, if so run custom function
if tag != "" { if tag != "" {
return rCustom(f, v, tag) return rCustom(f, v, tag)
} else if size > 0 { } else if isFakeable(t) && size <= 0 {
// NOOP // Only call custom function if no fakesize is specified (size <= 0)
} else if isFakeable(t) {
value, err := callFake(f, v, reflect.Map) value, err := callFake(f, v, reflect.Map)
if err != nil { if err != nil {
return err return err
@ -334,14 +357,14 @@ func rMap(f *Faker, t reflect.Type, v reflect.Value, tag string, size int) error
for i := 0; i < newSize; i++ { for i := 0; i < newSize; i++ {
// Create new key // Create new key
mapIndex := reflect.New(t.Key()) mapIndex := reflect.New(t.Key())
err := r(f, t.Key(), mapIndex.Elem(), "", -1) err := r(f, t.Key(), mapIndex.Elem(), "", -1, depth+1)
if err != nil { if err != nil {
return err return err
} }
// Create new value // Create new value
mapValue := reflect.New(t.Elem()) mapValue := reflect.New(t.Elem())
err = r(f, t.Elem(), mapValue.Elem(), "", -1) err = r(f, t.Elem(), mapValue.Elem(), "", -1, depth+1)
if err != nil { if err != nil {
return err return err
} }
@ -586,7 +609,7 @@ func rTime(f *Faker, t reflect.StructField, v reflect.Value, tag string) error {
// Check to see if they are passing in a format to parse the time // Check to see if they are passing in a format to parse the time
timeFormat, timeFormatOK := t.Tag.Lookup("format") timeFormat, timeFormatOK := t.Tag.Lookup("format")
if timeFormatOK { if timeFormatOK {
timeFormat = javaDateFormatToGolangDateFormat(timeFormat) timeFormat = javaDateTimeFormatToGolangFormat(timeFormat)
} else { } else {
// If tag == "{date}" use time.RFC3339 // If tag == "{date}" use time.RFC3339
// They are attempting to use the default date lookup // They are attempting to use the default date lookup

View File

@ -55,7 +55,9 @@ const templateMarkdown = `
*Author: {{FirstName}} {{LastName}}* *Author: {{FirstName}} {{LastName}}*
{{Paragraph 2 5 7 "\n\n"}} {{Paragraph}}
{{Paragraph}}
## Table of Contents ## Table of Contents
- [Installation](#installation) - [Installation](#installation)
@ -119,7 +121,11 @@ Dear {{LastName}},
{{RandomString (SliceString "I trust this email finds you well." "I hope you're doing great." "Hoping this message reaches you in good spirits.")}} {{RandomString (SliceString "Wishing you a fantastic day!" "May your week be filled with joy." "Sending good vibes your way.")}} {{RandomString (SliceString "I trust this email finds you well." "I hope you're doing great." "Hoping this message reaches you in good spirits.")}} {{RandomString (SliceString "Wishing you a fantastic day!" "May your week be filled with joy." "Sending good vibes your way.")}}
{{Paragraph 3 5 10 "\n\n"}} {{Paragraph}}
{{Paragraph}}
{{Paragraph}}
{{RandomString (SliceString "I would appreciate your thoughts on" "I'm eager to hear your feedback on" "I'm curious to know what you think about")}} it. If you have a moment, please feel free to check out the project on {{RandomString (SliceString "GitHub" "GitLab" "Bitbucket")}} {{RandomString (SliceString "I would appreciate your thoughts on" "I'm eager to hear your feedback on" "I'm curious to know what you think about")}} it. If you have a moment, please feel free to check out the project on {{RandomString (SliceString "GitHub" "GitLab" "Bitbucket")}}
@ -342,6 +348,12 @@ func addTemplateLookup() {
Markus Moen`, Markus Moen`,
Output: "string", Output: "string",
ContentType: "text/plain", ContentType: "text/plain",
Aliases: []string{
"document template", "layout", "blueprint", "design pattern", "text template", "generator", "format schema",
},
Keywords: []string{
"generates", "format", "structure", "engine", "document", "pattern", "design", "syntax", "render", "compile",
},
Params: []Param{ Params: []Param{
{Field: "template", Display: "Template", Type: "string", Description: "Golang template to generate the document from"}, {Field: "template", Display: "Template", Type: "string", Description: "Golang template to generate the document from"},
{Field: "data", Display: "Custom Data", Type: "string", Default: "", Optional: true, Description: "Custom data to pass to the template"}, {Field: "data", Display: "Custom Data", Type: "string", Default: "", Optional: true, Description: "Custom data to pass to the template"},
@ -397,6 +409,12 @@ print("purplesheep5 result:", "in progress")
## License ## License
MIT`, MIT`,
Output: "string", Output: "string",
Aliases: []string{
"markup language", "readme format", "lightweight markup", "documentation style", "plain text format", "md file", "doc format",
},
Keywords: []string{
"markdown", "markup", "language", "formatting", "plain", "text", "documentation", "lightweight", "syntax", "rendering", "structure", "readme",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
template_result, err := templateFunc(templateMarkdown, templateFuncMap(f, nil), &MarkdownOptions{}) template_result, err := templateFunc(templateMarkdown, templateFuncMap(f, nil), &MarkdownOptions{})
return string(template_result), err return string(template_result), err
@ -432,6 +450,19 @@ Milford Johnston
jamelhaag@king.org jamelhaag@king.org
(507)096-3058`, (507)096-3058`,
Output: "string", Output: "string",
Aliases: []string{
"email body",
"email text",
"email message",
"message body",
"email content",
},
Keywords: []string{
"email", "body", "message", "content",
"subject", "salutation", "greeting", "closing",
"signature", "footer", "paragraph", "plaintext",
"correspondence", "communication",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
template_result, err := templateFunc(templateEmail, templateFuncMap(f, nil), &EmailOptions{}) template_result, err := templateFunc(templateEmail, templateFuncMap(f, nil), &EmailOptions{})
return string(template_result), err return string(template_result), err

540
vendor/github.com/brianvoe/gofakeit/v7/text.go generated vendored Normal file
View File

@ -0,0 +1,540 @@
package gofakeit
import (
"bytes"
"errors"
"strings"
"unicode"
)
// Comment will generate a random statement or remark expressing an opinion, observation, or reaction
func Comment() string { return comment(GlobalFaker) }
// Comment will generate a random statement or remark expressing an opinion, observation, or reaction
func (f *Faker) Comment() string { return comment(f) }
func comment(f *Faker) string {
template := getRandValue(f, []string{"text", "comment"})
// Generate using your faker
comment, err := generate(f, template)
if err != nil {
return template
}
// ~16% chance to capitalize first letter
if prob, _ := weighted(f, []any{0, 1}, []float32{5, 1}); prob == 1 {
if len(comment) > 0 {
comment = strings.ToUpper(comment[:1]) + comment[1:]
}
}
// ~15% chance to add punctuation
if prob, _ := weighted(f, []any{0, 1}, []float32{17, 3}); prob == 1 {
// Within punctuation: ? (4), ! (3), . (1)
switch p, _ := weighted(f, []any{"?", "!", "."}, []float32{4, 3, 1}); p {
case "?":
comment += "?"
case "!":
comment += "!"
case ".":
comment += "."
}
}
return comment
}
// Phrase will return a random phrase
func Phrase() string { return phrase(GlobalFaker) }
// Phrase will return a random phrase
func (f *Faker) Phrase() string { return phrase(f) }
func phrase(f *Faker) string { return getRandValue(f, []string{"text", "phrase"}) }
// PhraseNoun will return a random noun phrase
func PhraseNoun() string { return phraseNoun(GlobalFaker) }
// PhraseNoun will return a random noun phrase
func (f *Faker) PhraseNoun() string { return phraseNoun(f) }
func phraseNoun(f *Faker) string {
str := ""
// You may also want to add an adjective to describe the noun
if boolFunc(f) {
str = adjectiveDescriptive(f) + " " + noun(f)
} else {
str = noun(f)
}
// Add determiner from weighted list
prob, _ := weighted(f, []any{1, 2, 3}, []float32{2, 1.5, 1})
switch prob {
case 1:
str = getArticle(str) + " " + str
case 2:
str = "the " + str
}
return str
}
// PhraseVerb will return a random preposition phrase
func PhraseVerb() string { return phraseVerb(GlobalFaker) }
// PhraseVerb will return a random preposition phrase
func (f *Faker) PhraseVerb() string { return phraseVerb(f) }
func phraseVerb(f *Faker) string {
// Put together a string builder
sb := []string{}
// You may have an adverb phrase
if boolFunc(f) {
sb = append(sb, phraseAdverb(f))
}
// Lets add the primary verb
sb = append(sb, verbAction(f))
// You may have a noun phrase
if boolFunc(f) {
sb = append(sb, phraseNoun(f))
}
// You may have an adverb phrase
if boolFunc(f) {
sb = append(sb, phraseAdverb(f))
// You may also have a preposition phrase
if boolFunc(f) {
sb = append(sb, phrasePreposition(f))
}
// You may also hae an adverb phrase
if boolFunc(f) {
sb = append(sb, phraseAdverb(f))
}
}
return strings.Join(sb, " ")
}
// PhraseAdverb will return a random adverb phrase
func PhraseAdverb() string { return phraseAdverb(GlobalFaker) }
// PhraseAdverb will return a random adverb phrase
func (f *Faker) PhraseAdverb() string { return phraseAdverb(f) }
func phraseAdverb(f *Faker) string {
if boolFunc(f) {
return adverbDegree(f) + " " + adverbManner(f)
}
return adverbManner(f)
}
// PhrasePreposition will return a random preposition phrase
func PhrasePreposition() string { return phrasePreposition(GlobalFaker) }
// PhrasePreposition will return a random preposition phrase
func (f *Faker) PhrasePreposition() string { return phrasePreposition(f) }
func phrasePreposition(f *Faker) string {
return prepositionSimple(f) + " " + phraseNoun(f)
}
// Sentence will generate a random sentence
// Deprecated: The wordCount parameter is ignored and will be removed in the next major release.
func Sentence(wordCount ...int) string { return sentence(GlobalFaker) }
// Sentence will generate a random sentence
// Deprecated: The wordCount parameter is ignored and will be removed in the next major release.
func (f *Faker) Sentence(wordCount ...int) string { return sentence(f) }
func sentence(f *Faker) string {
sentence, err := generate(f, getRandValue(f, []string{"text", "sentence"}))
if err != nil {
return ""
}
// Capitalize the first letter
return strings.ToUpper(sentence[:1]) + sentence[1:]
}
// Paragraph will generate a random paragraph
// Deprecated: The parameters are ignored and will be removed in the next major release.
func Paragraph(paragraphCount ...any) string {
return paragraph(GlobalFaker)
}
// Paragraph will generate a random paragraph
// Deprecated: The parameters are ignored and will be removed in the next major release.
func (f *Faker) Paragraph(paragraphCount ...any) string {
return paragraph(f)
}
func paragraph(f *Faker) string {
// generate 2-5 sentences
sentenceCount := f.Number(2, 5)
sentences := make([]string, sentenceCount)
for i := 0; i < sentenceCount; i++ {
sentences[i] = sentence(f)
}
return strings.Join(sentences, " ")
}
// Question will return a random question
func Question() string {
return question(GlobalFaker)
}
// Question will return a random question
func (f *Faker) Question() string {
return question(f)
}
func question(f *Faker) string {
question, err := generate(f, getRandValue(f, []string{"text", "question"}))
if err != nil {
return ""
}
// Capitalize the first letter and add a question mark
return strings.ToUpper(question[:1]) + question[1:] + "?"
}
// Quote will return a random quote from a random person
func Quote() string { return quote(GlobalFaker) }
// Quote will return a random quote from a random person
func (f *Faker) Quote() string { return quote(f) }
func quote(f *Faker) string {
quote, err := generate(f, getRandValue(f, []string{"text", "quote"}))
if err != nil {
return ""
}
// Capitalize the first letter after the opening quote
return quote[:1] + strings.ToUpper(quote[1:2]) + quote[2:]
}
// LoremIpsumSentence will generate a random sentence
func LoremIpsumSentence(wordCount int) string {
return loremIpsumSentence(GlobalFaker, wordCount)
}
// LoremIpsumSentence will generate a random sentence
func (f *Faker) LoremIpsumSentence(wordCount int) string {
return loremIpsumSentence(f, wordCount)
}
func loremIpsumSentence(f *Faker, wordCount int) string {
if wordCount <= 0 {
return ""
}
sentence := bytes.Buffer{}
sentence.Grow(wordCount * 6) // estimate 6 bytes per word
for i := 0; i < wordCount; i++ {
word := loremIpsumWord(f)
if i == 0 {
runes := []rune(word)
runes[0] = unicode.ToTitle(runes[0])
word = string(runes)
}
sentence.WriteString(word)
if i < wordCount-1 {
sentence.WriteRune(' ')
}
}
sentence.WriteRune('.')
return sentence.String()
}
// LoremIpsumParagraph will generate a random paragraphGenerator
func LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return loremIpsumParagraph(GlobalFaker, paragraphCount, sentenceCount, wordCount, separator)
}
// LoremIpsumParagraph will generate a random paragraphGenerator
func (f *Faker) LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return loremIpsumParagraph(f, paragraphCount, sentenceCount, wordCount, separator)
}
func loremIpsumParagraph(f *Faker, paragraphCount int, sentenceCount int, wordCount int, separator string) string {
if paragraphCount <= 0 || sentenceCount <= 0 || wordCount <= 0 {
return ""
}
paragraphs := bytes.Buffer{}
paragraphs.Grow(paragraphCount * sentenceCount * wordCount * 6) // estimate 6 bytes per word
for i := 0; i < paragraphCount; i++ {
for e := 0; e < sentenceCount; e++ {
paragraphs.WriteString(loremIpsumSentence(f, wordCount))
if e < sentenceCount-1 {
paragraphs.WriteRune(' ')
}
}
if i < paragraphCount-1 {
paragraphs.WriteString(separator)
}
}
return paragraphs.String()
}
func addTextLookup() {
AddFuncLookup("comment", Info{
Display: "Comment",
Category: "text",
Description: "Statement or remark expressing an opinion, observation, or reaction",
Example: "add some a little bit team",
Output: "string",
Aliases: []string{
"verbal statement", "expressed thought", "spoken remark", "communication element", "casual note",
},
Keywords: []string{
"opinion", "observation", "reaction", "response", "feedback", "critique", "interpretation", "perspective", "reflection", "discussion",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return comment(f), nil
},
})
AddFuncLookup("phrase", Info{
Display: "Phrase",
Category: "text",
Description: "A small group of words standing together",
Example: "time will tell",
Output: "string",
Aliases: []string{"word group", "language unit", "text element", "expression block"},
Keywords: []string{"words", "group", "sentence", "text", "language", "grammar", "expression", "unit", "collection"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phrase(f), nil
},
})
AddFuncLookup("phrasenoun", Info{
Display: "Noun Phrase",
Category: "text",
Description: "Phrase with a noun as its head, functions within sentence like a noun",
Example: "a tribe",
Output: "string",
Aliases: []string{"nominal phrase", "substantive element", "subject phrase", "object phrase"},
Keywords: []string{"phrase", "noun", "grammar", "subject", "object", "head", "sentence", "nominal", "substantive", "entity"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phraseNoun(f), nil
},
})
AddFuncLookup("phraseverb", Info{
Display: "Verb Phrase",
Category: "text",
Description: "Phrase that Consists of a verb and its modifiers, expressing an action or state",
Example: "a tribe",
Output: "string",
Aliases: []string{"predicate phrase", "verbal element", "action phrase", "state phrase"},
Keywords: []string{"phrase", "verb", "grammar", "action", "state", "modifiers", "sentence", "predicate", "verbal", "behavior"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phraseVerb(f), nil
},
})
AddFuncLookup("phraseadverb", Info{
Display: "Adverb Phrase",
Category: "text",
Description: "Phrase that modifies a verb, adjective, or another adverb, providing additional information.",
Example: "fully gladly",
Output: "string",
Aliases: []string{"adverbial phrase", "qualifier element", "modifier phrase", "description phrase"},
Keywords: []string{"phrase", "adverb", "grammar", "modifier", "description", "information", "adverbial", "qualifier", "modification"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phraseAdverb(f), nil
},
})
AddFuncLookup("phrasepreposition", Info{
Display: "Preposition Phrase",
Category: "text",
Description: "Phrase starting with a preposition, showing relation between elements in a sentence.",
Example: "out the black thing",
Output: "string",
Aliases: []string{"prepositional phrase", "relational element", "connection phrase", "grammar bridge"},
Keywords: []string{"phrase", "preposition", "grammar", "relation", "connection", "sentence", "prepositional", "relational", "linking"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phrasePreposition(f), nil
},
})
AddFuncLookup("sentence", Info{
Display: "Sentence",
Category: "text",
Description: "Set of words expressing a statement, question, exclamation, or command",
Example: "Guide person with kind affordances.",
Output: "string",
Aliases: []string{"complete thought", "grammatical unit", "word group", "linguistic element"},
Keywords: []string{"complete", "thought", "grammatical", "unit", "word", "group", "expression", "clause", "utterance"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return sentence(f), nil
},
})
AddFuncLookup("paragraph", Info{
Display: "Paragraph",
Category: "text",
Description: "Distinct section of writing covering a single theme, composed of multiple sentences",
Example: "Protect the place under grumpy load. Decompose work into smaller group. Ruthlessly remove dead work.",
Output: "string",
Aliases: []string{"text block", "writing section", "thematic unit", "content block"},
Keywords: []string{"text", "block", "writing", "section", "theme", "sentences", "composition", "distinct", "passage", "content"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return paragraph(f), nil
},
})
AddFuncLookup("question", Info{
Display: "Question",
Category: "text",
Description: "Statement formulated to inquire or seek clarification",
Example: "Roof chia echo?",
Output: "string",
Aliases: []string{
"interrogative sentence",
"information request",
"asking phrase",
"query prompt",
"clarifying ask",
},
Keywords: []string{
"inquiry", "clarification", "interrogative",
"ask", "who", "what", "when", "where", "why", "how", "mark",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return question(f), nil
},
})
AddFuncLookup("quote", Info{
Display: "Quote",
Category: "text",
Description: "Direct repetition of someone else's words",
Example: `"Does orange help the tissue or distract it"`,
Output: "string",
Aliases: []string{
"direct speech",
"verbatim line",
"cited passage",
"attributed text",
"pulled excerpt",
},
Keywords: []string{
"quotation", "citation", "reference", "excerpt",
"epigraph", "saying", "maxim", "attribution", "blockquote",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return quote(f), nil
},
})
AddFuncLookup("loremipsumsentence", Info{
Display: "Lorem Ipsum Sentence",
Category: "text",
Description: "Sentence of the Lorem Ipsum placeholder text used in design and publishing",
Example: "Quia quae repellat consequatur quidem.",
Output: "string",
Aliases: []string{
"lorem sentence",
"ipsum sentence",
"placeholder sentence",
"latin sentence",
},
Keywords: []string{
"lorem", "ipsum", "sentence", "placeholder",
"latin", "dummy", "filler", "text",
"typography", "mockup",
},
Params: []Param{
{Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
wordCount, err := info.GetInt(m, "wordcount")
if err != nil {
return nil, err
}
if wordCount <= 0 || wordCount > 50 {
return nil, errors.New("invalid word count, must be greater than 0, less than 50")
}
return loremIpsumSentence(f, wordCount), nil
},
})
AddFuncLookup("loremipsumparagraph", Info{
Display: "Lorem Ipsum Paragraph",
Category: "text",
Description: "Paragraph of the Lorem Ipsum placeholder text used in design and publishing",
Example: `Quia quae repellat consequatur quidem nisi quo qui voluptatum accusantium quisquam amet. Quas et ut non dolorem ipsam aut enim assumenda mollitia harum ut. Dicta similique veniam nulla voluptas at excepturi non ad maxime at non. Eaque hic repellat praesentium voluptatem qui consequuntur dolor iusto autem velit aut. Fugit tempore exercitationem harum consequatur voluptatum modi minima aut eaque et et.
Aut ea voluptatem dignissimos expedita odit tempore quod aut beatae ipsam iste. Minus voluptatibus dolorem maiores eius sed nihil vel enim odio voluptatem accusamus. Natus quibusdam temporibus tenetur cumque sint necessitatibus dolorem ex ducimus iusto ex. Voluptatem neque dicta explicabo officiis et ducimus sit ut ut praesentium pariatur. Illum molestias nisi at dolore ut voluptatem accusantium et fugiat et ut.
Explicabo incidunt reprehenderit non quia dignissimos recusandae vitae soluta quia et quia. Aut veniam voluptas consequatur placeat sapiente non eveniet voluptatibus magni velit eum. Nobis vel repellendus sed est qui autem laudantium quidem quam ullam consequatur. Aut iusto ut commodi similique quae voluptatem atque qui fugiat eum aut. Quis distinctio consequatur voluptatem vel aliquid aut laborum facere officiis iure tempora.`,
Output: "string",
Aliases: []string{
"lorem paragraph",
"ipsum paragraph",
"placeholder paragraph",
"latin paragraph",
},
Keywords: []string{
"lorem", "ipsum", "paragraph", "placeholder",
"latin", "dummy", "filler", "text",
"typography", "mockup",
},
Params: []Param{
{Field: "paragraphcount", Display: "Paragraph Count", Type: "int", Default: "2", Description: "Number of paragraphs"},
{Field: "sentencecount", Display: "Sentence Count", Type: "int", Default: "2", Description: "Number of sentences in a paragraph"},
{Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"},
{Field: "paragraphseparator", Display: "Paragraph Separator", Type: "string", Default: "<br />", Description: "String value to add between paragraphs"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
paragraphCount, err := info.GetInt(m, "paragraphcount")
if err != nil {
return nil, err
}
if paragraphCount <= 0 || paragraphCount > 20 {
return nil, errors.New("invalid paragraph count, must be greater than 0, less than 20")
}
sentenceCount, err := info.GetInt(m, "sentencecount")
if err != nil {
return nil, err
}
if sentenceCount <= 0 || sentenceCount > 20 {
return nil, errors.New("invalid sentence count, must be greater than 0, less than 20")
}
wordCount, err := info.GetInt(m, "wordcount")
if err != nil {
return nil, err
}
if wordCount <= 0 || wordCount > 50 {
return nil, errors.New("invalid word count, must be greater than 0, less than 50")
}
paragraphSeparator, err := info.GetString(m, "paragraphseparator")
if err != nil {
return nil, err
}
return loremIpsumParagraph(f, paragraphCount, sentenceCount, wordCount, paragraphSeparator), nil
},
})
}

View File

@ -80,6 +80,12 @@ func addWeightedLookup() {
Description: "Randomly select a given option based upon an equal amount of weights", Description: "Randomly select a given option based upon an equal amount of weights",
Example: "[hello, 2, 6.9],[1, 2, 3] => 6.9", Example: "[hello, 2, 6.9],[1, 2, 3] => 6.9",
Output: "any", Output: "any",
Aliases: []string{
"weighted choice", "probabilistic pick", "random weight", "distribution choice", "chance selection", "ratio selection", "stochastic option",
},
Keywords: []string{
"randomly", "select", "probability", "distribution", "likelihood", "chance", "statistical", "outcome", "bias", "ratio",
},
Params: []Param{ Params: []Param{
{Field: "options", Display: "Options", Type: "[]string", Description: "Array of any values"}, {Field: "options", Display: "Options", Type: "[]string", Description: "Array of any values"},
{Field: "weights", Display: "Weights", Type: "[]float", Description: "Array of weights"}, {Field: "weights", Display: "Weights", Type: "[]float", Description: "Array of weights"},

View File

@ -96,6 +96,17 @@ func addWordAdjectiveLookup() {
Description: "Word describing or modifying a noun", Description: "Word describing or modifying a noun",
Example: "genuine", Example: "genuine",
Output: "string", Output: "string",
Aliases: []string{
"descriptor term",
"qualifying modifier",
"attribute marker",
"descriptive label",
"noun qualifier",
},
Keywords: []string{
"noun", "speech", "quality", "attribute",
"characteristic", "property", "trait", "descriptive", "modifier",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adjective(f), nil return adjective(f), nil
}, },
@ -107,6 +118,17 @@ func addWordAdjectiveLookup() {
Description: "Adjective that provides detailed characteristics about a noun", Description: "Adjective that provides detailed characteristics about a noun",
Example: "brave", Example: "brave",
Output: "string", Output: "string",
Aliases: []string{
"qualitative adjective",
"detail-rich modifier",
"characterizing term",
"specific descriptor",
"noun enhancer",
},
Keywords: []string{
"adjective", "word", "describing", "modifying", "attribute",
"property", "trait", "feature", "aspect", "detailed", "characteristics",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adjectiveDescriptive(f), nil return adjectiveDescriptive(f), nil
}, },
@ -118,6 +140,17 @@ func addWordAdjectiveLookup() {
Description: "Adjective that indicates the quantity or amount of something", Description: "Adjective that indicates the quantity or amount of something",
Example: "a little", Example: "a little",
Output: "string", Output: "string",
Aliases: []string{
"numeric descriptor",
"cardinal qualifier",
"quantifier adjective",
"how many indicator",
"magnitude marker",
},
Keywords: []string{
"adjective", "quantitative", "word", "describing", "modifying",
"count", "volume", "extent", "degree", "magnitude", "quantity", "amount",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adjectiveQuantitative(f), nil return adjectiveQuantitative(f), nil
}, },
@ -129,6 +162,18 @@ func addWordAdjectiveLookup() {
Description: "Adjective derived from a proper noun, often used to describe nationality or origin", Description: "Adjective derived from a proper noun, often used to describe nationality or origin",
Example: "Afghan", Example: "Afghan",
Output: "string", Output: "string",
Aliases: []string{
"nationality adjective",
"eponym-derived",
"proper-noun based",
"demonym adjective",
"origin descriptor",
},
Keywords: []string{
"adjective", "noun", "word", "describing",
"cultural", "regional", "ethnic", "linguistic", "heritage",
"proper", "nationality",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adjectiveProper(f), nil return adjectiveProper(f), nil
}, },
@ -140,6 +185,19 @@ func addWordAdjectiveLookup() {
Description: "Adjective used to point out specific things", Description: "Adjective used to point out specific things",
Example: "this", Example: "this",
Output: "string", Output: "string",
Aliases: []string{
"demonstrative adjective",
"pointing adjective",
"deictic adjective",
"proximal distal adjective",
"reference adjective",
},
Keywords: []string{
"adjective", "demonstrative", "deictic",
"this", "that", "these", "those",
"proximal", "distal", "near", "far",
"pointer", "reference", "specific", "grammar",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adjectiveDemonstrative(f), nil return adjectiveDemonstrative(f), nil
}, },
@ -151,6 +209,18 @@ func addWordAdjectiveLookup() {
Description: "Adjective indicating ownership or possession", Description: "Adjective indicating ownership or possession",
Example: "my", Example: "my",
Output: "string", Output: "string",
Aliases: []string{
"ownership adjective",
"owners descriptor",
"possessive determiner",
"belonging indicator",
"proprietary modifier",
},
Keywords: []string{
"adjective", "word", "grammar",
"my", "your", "his", "her", "its", "our", "their",
"belong", "possessive", "ownership",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adjectivePossessive(f), nil return adjectivePossessive(f), nil
}, },
@ -162,6 +232,17 @@ func addWordAdjectiveLookup() {
Description: "Adjective used to ask questions", Description: "Adjective used to ask questions",
Example: "what", Example: "what",
Output: "string", Output: "string",
Aliases: []string{
"interrogative adjective",
"question word",
"asking adjective",
"inquiry word",
"grammar adjective",
},
Keywords: []string{
"adjective", "word", "grammar", "what", "which", "whose",
"question", "inquiry", "interrogation", "interrogative", "ask",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adjectiveInterrogative(f), nil return adjectiveInterrogative(f), nil
}, },
@ -173,8 +254,21 @@ func addWordAdjectiveLookup() {
Description: "Adjective describing a non-specific noun", Description: "Adjective describing a non-specific noun",
Example: "few", Example: "few",
Output: "string", Output: "string",
Aliases: []string{
"unspecified adjective",
"quantifier-like",
"noncount marker",
"broad determiner",
"approximate amount",
},
Keywords: []string{
"adjective", "noun", "word", "grammar",
"some", "any", "many", "few", "several", "various", "certain",
"indefinite", "non-specific",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adjectiveIndefinite(f), nil return adjectiveIndefinite(f), nil
}, },
}) })
} }

View File

@ -90,6 +90,12 @@ func addWordAdverbLookup() {
Description: "Word that modifies verbs, adjectives, or other adverbs", Description: "Word that modifies verbs, adjectives, or other adverbs",
Example: "smoothly", Example: "smoothly",
Output: "string", Output: "string",
Aliases: []string{
"modifier", "descriptive word", "language part", "expression word", "qualifier",
},
Keywords: []string{
"intensity", "manner", "degree", "place", "time", "frequency", "extent", "emphasis", "usage", "context",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adverb(f), nil return adverb(f), nil
}, },
@ -101,6 +107,12 @@ func addWordAdverbLookup() {
Description: "Adverb that describes how an action is performed", Description: "Adverb that describes how an action is performed",
Example: "stupidly", Example: "stupidly",
Output: "string", Output: "string",
Aliases: []string{
"manner word", "action style", "performance word", "descriptive term", "behavior word",
},
Keywords: []string{
"style", "process", "mode", "technique", "behavior", "attitude", "fashion", "pattern", "characteristic", "approach",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adverbManner(f), nil return adverbManner(f), nil
}, },
@ -112,6 +124,12 @@ func addWordAdverbLookup() {
Description: "Adverb that indicates the degree or intensity of an action or adjective", Description: "Adverb that indicates the degree or intensity of an action or adjective",
Example: "intensely", Example: "intensely",
Output: "string", Output: "string",
Aliases: []string{
"degree word", "intensity word", "level word", "strength word", "extent word",
},
Keywords: []string{
"measure", "force", "strength", "scope", "magnitude", "gradation", "amount", "power", "amplification", "range",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adverbDegree(f), nil return adverbDegree(f), nil
}, },
@ -123,6 +141,12 @@ func addWordAdverbLookup() {
Description: "Adverb that indicates the location or direction of an action", Description: "Adverb that indicates the location or direction of an action",
Example: "east", Example: "east",
Output: "string", Output: "string",
Aliases: []string{
"place word", "location word", "direction word", "position word", "movement word",
},
Keywords: []string{
"orientation", "destination", "area", "region", "spot", "placement", "site", "territory", "geography", "setting",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adverbPlace(f), nil return adverbPlace(f), nil
}, },
@ -134,6 +158,12 @@ func addWordAdverbLookup() {
Description: "Adverb that specifies the exact time an action occurs", Description: "Adverb that specifies the exact time an action occurs",
Example: "now", Example: "now",
Output: "string", Output: "string",
Aliases: []string{
"time word", "definite time", "exact time", "moment word", "specific time",
},
Keywords: []string{
"precise", "instant", "point", "schedule", "fixed", "timestamp", "occasion", "momentary", "calendar", "chronology",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adverbTimeDefinite(f), nil return adverbTimeDefinite(f), nil
}, },
@ -145,6 +175,12 @@ func addWordAdverbLookup() {
Description: "Adverb that gives a general or unspecified time frame", Description: "Adverb that gives a general or unspecified time frame",
Example: "already", Example: "already",
Output: "string", Output: "string",
Aliases: []string{
"time word", "indefinite time", "general time", "approximate time", "vague time",
},
Keywords: []string{
"uncertain", "broad", "loose", "non-specific", "undefined", "imprecise", "approximation", "unsure", "flexible", "open-ended",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adverbTimeIndefinite(f), nil return adverbTimeIndefinite(f), nil
}, },
@ -156,6 +192,12 @@ func addWordAdverbLookup() {
Description: "Adverb that specifies how often an action occurs with a clear frequency", Description: "Adverb that specifies how often an action occurs with a clear frequency",
Example: "hourly", Example: "hourly",
Output: "string", Output: "string",
Aliases: []string{
"frequency word", "repetition word", "regular word", "interval word", "scheduled word",
},
Keywords: []string{
"interval", "regular", "pattern", "routine", "cycle", "repetition", "rate", "periodic", "consistency", "predictable",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adverbFrequencyDefinite(f), nil return adverbFrequencyDefinite(f), nil
}, },
@ -167,8 +209,15 @@ func addWordAdverbLookup() {
Description: "Adverb that specifies how often an action occurs without specifying a particular frequency", Description: "Adverb that specifies how often an action occurs without specifying a particular frequency",
Example: "occasionally", Example: "occasionally",
Output: "string", Output: "string",
Aliases: []string{
"frequency word", "indefinite frequency", "irregular word", "sporadic word", "recurring word",
},
Keywords: []string{
"uncertain", "sporadic", "occasional", "irregular", "unfixed", "varying", "undetermined", "fluctuating", "approximate", "inconsistent",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return adverbFrequencyIndefinite(f), nil return adverbFrequencyIndefinite(f), nil
}, },
}) })
} }

View File

@ -1,72 +0,0 @@
package gofakeit
import (
"strings"
)
// Comment will generate a random statement or remark expressing an opinion, observation, or reaction
func Comment() string { return comment(GlobalFaker) }
// Comment will generate a random statement or remark expressing an opinion, observation, or reaction
func (f *Faker) Comment() string { return comment(f) }
func comment(f *Faker) string {
structures := [][]string{
{"interjection", "adjective", "noun", "verb", "adverb"},
{"noun", "verb", "preposition", "determiner", "adjective", "noun"},
{"noun", "verb", "adverb"},
{"adjective", "noun", "verb"},
{"noun", "verb", "preposition", "noun"},
}
// Randomly select a structure
structure := structures[number(f, 0, len(structures)-1)]
// Build the sentence
var commentParts []string
for _, wordType := range structure {
switch wordType {
case "noun":
commentParts = append(commentParts, noun(f))
case "verb":
commentParts = append(commentParts, verb(f))
case "adjective":
commentParts = append(commentParts, adjective(f))
case "adverb":
commentParts = append(commentParts, adverb(f))
case "interjection":
commentParts = append(commentParts, interjection(f))
case "preposition":
commentParts = append(commentParts, preposition(f))
case "determiner":
commentParts = append(commentParts, nounDeterminer(f))
default:
// Should never hit
panic("Invalid word type")
}
}
// Combine the words into a sentence
sentence := strings.Join(commentParts, " ")
// Capitalize the first letter
sentence = title(sentence)
// Add a period to the end of the sentence
sentence = sentence + "."
return sentence
}
func addWordCommentLookup() {
AddFuncLookup("comment", Info{
Display: "Comment",
Category: "word",
Description: "Statement or remark expressing an opinion, observation, or reaction",
Example: "wow",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return interjection(f), nil
},
})
}

View File

@ -86,6 +86,8 @@ func addWordConnectiveLookup() {
Description: "Word used to connect words or sentences", Description: "Word used to connect words or sentences",
Example: "such as", Example: "such as",
Output: "string", Output: "string",
Aliases: []string{"joining element", "grammar connector", "sentence bridge", "word linker"},
Keywords: []string{"word", "connect", "sentence", "grammar", "used", "conjunction", "link", "joining"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return connective(f), nil return connective(f), nil
}, },
@ -97,6 +99,8 @@ func addWordConnectiveLookup() {
Description: "Connective word used to indicate a temporal relationship between events or actions", Description: "Connective word used to indicate a temporal relationship between events or actions",
Example: "finally", Example: "finally",
Output: "string", Output: "string",
Aliases: []string{"temporal connector", "time relationship", "chronological link", "sequence element"},
Keywords: []string{"connective", "time", "temporal", "relationship", "events", "grammar", "actions", "chronological", "sequence", "timing"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return connectiveTime(f), nil return connectiveTime(f), nil
}, },
@ -108,6 +112,8 @@ func addWordConnectiveLookup() {
Description: "Connective word used to indicate a comparison between two or more things", Description: "Connective word used to indicate a comparison between two or more things",
Example: "in addition", Example: "in addition",
Output: "string", Output: "string",
Aliases: []string{"comparison connector", "contrast element", "similarity link", "grammar bridge"},
Keywords: []string{"connective", "comparative", "comparison", "things", "grammar", "indicate", "contrast", "similarity", "relative"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return connectiveComparative(f), nil return connectiveComparative(f), nil
}, },
@ -119,6 +125,8 @@ func addWordConnectiveLookup() {
Description: "Connective word used to express dissatisfaction or complaints about a situation", Description: "Connective word used to express dissatisfaction or complaints about a situation",
Example: "besides", Example: "besides",
Output: "string", Output: "string",
Aliases: []string{"objection connector", "criticism element", "dissatisfaction link", "grammar bridge"},
Keywords: []string{"connective", "complaint", "dissatisfaction", "situation", "grammar", "express", "objection", "criticism", "negative"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return connectiveComplaint(f), nil return connectiveComplaint(f), nil
}, },
@ -130,6 +138,8 @@ func addWordConnectiveLookup() {
Description: "Connective word used to list or enumerate items or examples", Description: "Connective word used to list or enumerate items or examples",
Example: "firstly", Example: "firstly",
Output: "string", Output: "string",
Aliases: []string{"enumeration connector", "sequence element", "order link", "grammar bridge"},
Keywords: []string{"connective", "listing", "enumerate", "items", "examples", "grammar", "list", "sequence", "order", "numbered"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return connectiveListing(f), nil return connectiveListing(f), nil
}, },
@ -141,6 +151,8 @@ func addWordConnectiveLookup() {
Description: "Connective word used to indicate a cause-and-effect relationship between events or actions", Description: "Connective word used to indicate a cause-and-effect relationship between events or actions",
Example: "an outcome of", Example: "an outcome of",
Output: "string", Output: "string",
Aliases: []string{"causal connector", "effect relationship", "consequence link", "grammar bridge"},
Keywords: []string{"connective", "casual", "cause", "effect", "relationship", "grammar", "events", "actions", "causal", "consequence", "result"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return connectiveCasual(f), nil return connectiveCasual(f), nil
}, },
@ -152,6 +164,8 @@ func addWordConnectiveLookup() {
Description: "Connective word used to provide examples or illustrations of a concept or idea", Description: "Connective word used to provide examples or illustrations of a concept or idea",
Example: "then", Example: "then",
Output: "string", Output: "string",
Aliases: []string{"example connector", "illustration element", "instance link", "grammar bridge"},
Keywords: []string{"connective", "examplify", "examples", "illustrations", "concept", "grammar", "provide", "instance", "demonstration", "sample"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return connectiveExamplify(f), nil return connectiveExamplify(f), nil
}, },

View File

@ -30,6 +30,8 @@ func addWordGeneralLookup() {
Description: "Basic unit of language representing a concept or thing, consisting of letters and having meaning", Description: "Basic unit of language representing a concept or thing, consisting of letters and having meaning",
Example: "man", Example: "man",
Output: "string", Output: "string",
Aliases: []string{"language unit", "speech element", "writing component", "lexical item"},
Keywords: []string{"basic", "unit", "language", "concept", "letters", "meaning", "representing", "lexeme", "vocabulary"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return word(f), nil return word(f), nil
}, },

View File

@ -1,34 +0,0 @@
package gofakeit
import (
"unicode"
)
// SentenceSimple will generate a random simple sentence
func SentenceSimple() string { return sentenceSimple(GlobalFaker) }
// SentenceSimple will generate a random simple sentence
func (f *Faker) SentenceSimple() string { return sentenceSimple(f) }
func sentenceSimple(f *Faker) string {
// simple sentence consists of a noun phrase and a verb phrase
str := phraseNoun(f) + " " + phraseVerb(f) + "."
// capitalize the first letter
strR := []rune(str)
strR[0] = unicode.ToUpper(strR[0])
return string(strR)
}
func addWordGrammerLookup() {
AddFuncLookup("sentencesimple", Info{
Display: "Simple Sentence",
Category: "word",
Description: "Group of words that expresses a complete thought",
Example: "A tribe fly the lemony kitchen.",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return sentenceSimple(f), nil
},
})
}

View File

@ -8,6 +8,14 @@ func (f *Faker) Interjection() string { return interjection(f) }
func interjection(f *Faker) string { return getRandValue(f, []string{"word", "interjection"}) } func interjection(f *Faker) string { return getRandValue(f, []string{"word", "interjection"}) }
// LoremIpsumWord will generate a random word
func LoremIpsumWord() string { return loremIpsumWord(GlobalFaker) }
// LoremIpsumWord will generate a random word
func (f *Faker) LoremIpsumWord() string { return loremIpsumWord(f) }
func loremIpsumWord(f *Faker) string { return getRandValue(f, []string{"lorem", "word"}) }
func addWordMiscLookup() { func addWordMiscLookup() {
AddFuncLookup("interjection", Info{ AddFuncLookup("interjection", Info{
Display: "Interjection", Display: "Interjection",
@ -15,8 +23,32 @@ func addWordMiscLookup() {
Description: "Word expressing emotion", Description: "Word expressing emotion",
Example: "wow", Example: "wow",
Output: "string", Output: "string",
Aliases: []string{"emotional expression", "feeling word", "reaction term", "exclamation element"},
Keywords: []string{"emotion", "word", "expression", "feeling", "reaction", "exclamation", "utterance", "ejaculation", "emotional"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return interjection(f), nil return interjection(f), nil
}, },
}) })
AddFuncLookup("loremipsumword", Info{
Display: "Lorem Ipsum Word",
Category: "word",
Description: "Word of the Lorem Ipsum placeholder text used in design and publishing",
Example: "quia",
Output: "string",
Aliases: []string{
"lorem word",
"ipsum word",
"placeholder word",
"latin word",
},
Keywords: []string{
"lorem", "ipsum", "word", "placeholder",
"latin", "dummy", "filler", "text",
"typography", "mockup",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return loremIpsumWord(f), nil
},
})
} }

View File

@ -125,6 +125,12 @@ func addWordNounLookup() {
Description: "Person, place, thing, or idea, named or referred to in a sentence", Description: "Person, place, thing, or idea, named or referred to in a sentence",
Example: "aunt", Example: "aunt",
Output: "string", Output: "string",
Aliases: []string{
"random noun", "grammar noun", "word type", "part speech", "naming word", "lexical noun", "nominal word",
},
Keywords: []string{
"person", "place", "idea", "sentence", "grammar", "named", "referred", "subject", "object", "entity", "concept", "term", "substantive",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return noun(f), nil return noun(f), nil
}, },
@ -136,6 +142,12 @@ func addWordNounLookup() {
Description: "General name for people, places, or things, not specific or unique", Description: "General name for people, places, or things, not specific or unique",
Example: "part", Example: "part",
Output: "string", Output: "string",
Aliases: []string{
"common noun", "general noun", "generic name", "basic noun", "ordinary noun", "regular noun", "everyday noun",
},
Keywords: []string{
"common", "general", "name", "people", "places", "generic", "basic", "ordinary", "standard", "typical", "regular", "normal",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounCommon(f), nil return nounCommon(f), nil
}, },
@ -147,6 +159,12 @@ func addWordNounLookup() {
Description: "Names for physical entities experienced through senses like sight, touch, smell, or taste", Description: "Names for physical entities experienced through senses like sight, touch, smell, or taste",
Example: "snowman", Example: "snowman",
Output: "string", Output: "string",
Aliases: []string{
"concrete noun", "physical noun", "tangible noun", "material noun", "sensory noun", "real noun", "perceptible noun",
},
Keywords: []string{
"concrete", "physical", "entities", "senses", "sight", "touch", "smell", "taste", "tangible", "material", "solid", "real", "visible", "touchable", "observable",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounConcrete(f), nil return nounConcrete(f), nil
}, },
@ -158,6 +176,12 @@ func addWordNounLookup() {
Description: "Ideas, qualities, or states that cannot be perceived with the five senses", Description: "Ideas, qualities, or states that cannot be perceived with the five senses",
Example: "confusion", Example: "confusion",
Output: "string", Output: "string",
Aliases: []string{
"abstract noun", "concept noun", "idea noun", "intangible noun", "mental noun", "notional noun", "theoretical noun",
},
Keywords: []string{
"abstract", "ideas", "qualities", "states", "senses", "concept", "intangible", "mental", "theoretical", "emotional", "spiritual", "intellectual", "philosophical", "metaphysical",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounAbstract(f), nil return nounAbstract(f), nil
}, },
@ -169,6 +193,12 @@ func addWordNounLookup() {
Description: "Group of people or things regarded as a unit", Description: "Group of people or things regarded as a unit",
Example: "body", Example: "body",
Output: "string", Output: "string",
Aliases: []string{
"collective noun", "group noun", "people group", "crowd noun", "assembly noun", "community noun", "societal noun",
},
Keywords: []string{
"collective", "people", "group", "unit", "regarded", "crowd", "assembly", "gathering", "team", "committee", "audience", "class", "family", "society",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounCollectivePeople(f), nil return nounCollectivePeople(f), nil
}, },
@ -180,6 +210,12 @@ func addWordNounLookup() {
Description: "Group of animals, like a 'pack' of wolves or a 'flock' of birds", Description: "Group of animals, like a 'pack' of wolves or a 'flock' of birds",
Example: "party", Example: "party",
Output: "string", Output: "string",
Aliases: []string{
"animal collective", "pack noun", "flock noun", "herd noun", "swarm noun", "colony noun", "pride noun",
},
Keywords: []string{
"collective", "animal", "group", "pack", "flock", "animals", "herd", "swarm", "pride", "school", "colony", "pod", "gaggle", "murder", "exaltation",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounCollectiveAnimal(f), nil return nounCollectiveAnimal(f), nil
}, },
@ -191,6 +227,12 @@ func addWordNounLookup() {
Description: "Group of objects or items, such as a 'bundle' of sticks or a 'cluster' of grapes", Description: "Group of objects or items, such as a 'bundle' of sticks or a 'cluster' of grapes",
Example: "hand", Example: "hand",
Output: "string", Output: "string",
Aliases: []string{
"object collective", "bundle noun", "cluster noun", "collection noun", "set noun", "batch noun", "pile noun",
},
Keywords: []string{
"collective", "thing", "group", "objects", "items", "bundle", "cluster", "collection", "set", "batch", "stack", "pile", "heap", "bunch", "array", "assortment",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounCollectiveThing(f), nil return nounCollectiveThing(f), nil
}, },
@ -202,6 +244,12 @@ func addWordNounLookup() {
Description: "Items that can be counted individually", Description: "Items that can be counted individually",
Example: "neck", Example: "neck",
Output: "string", Output: "string",
Aliases: []string{
"countable noun", "count noun", "discrete item", "enumerable noun", "plural noun", "numerical noun", "measurable noun",
},
Keywords: []string{
"countable", "items", "counted", "individually", "discrete", "enumerable", "plural", "many", "few", "number", "objects", "things", "units", "pieces",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounCountable(f), nil return nounCountable(f), nil
}, },
@ -213,6 +261,12 @@ func addWordNounLookup() {
Description: "Items that can't be counted individually", Description: "Items that can't be counted individually",
Example: "seafood", Example: "seafood",
Output: "string", Output: "string",
Aliases: []string{
"uncountable noun", "mass noun", "non-count noun", "bulk noun", "substance noun", "continuous noun", "material noun",
},
Keywords: []string{
"uncountable", "items", "counted", "individually", "mass", "bulk", "substance", "material", "liquid", "powder", "grain", "continuous", "indivisible", "measurement",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounUncountable(f), nil return nounUncountable(f), nil
}, },
@ -224,6 +278,12 @@ func addWordNounLookup() {
Description: "Specific name for a particular person, place, or organization", Description: "Specific name for a particular person, place, or organization",
Example: "John", Example: "John",
Output: "string", Output: "string",
Aliases: []string{
"proper noun", "specific name", "person name", "place name", "organization name", "capitalized noun", "unique name",
},
Keywords: []string{
"proper", "specific", "name", "person", "place", "organization", "capitalized", "title", "brand", "company", "city", "country", "individual", "entity", "designation",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounProper(f), nil return nounProper(f), nil
}, },
@ -235,8 +295,15 @@ func addWordNounLookup() {
Description: "Word that introduces a noun and identifies it as a noun", Description: "Word that introduces a noun and identifies it as a noun",
Example: "your", Example: "your",
Output: "string", Output: "string",
Aliases: []string{
"determiner word", "article word", "noun introducer", "specifier word", "modifier word", "defining word", "introductory word",
},
Keywords: []string{
"determiner", "word", "introduces", "identifies", "article", "specifier", "modifier",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return nounDeterminer(f), nil return nounDeterminer(f), nil
}, },
}) })
} }

View File

@ -1,162 +0,0 @@
package gofakeit
import (
"strings"
)
// Phrase will return a random phrase
func Phrase() string { return phrase(GlobalFaker) }
// Phrase will return a random phrase
func (f *Faker) Phrase() string { return phrase(f) }
func phrase(f *Faker) string { return getRandValue(f, []string{"sentence", "phrase"}) }
// PhraseNoun will return a random noun phrase
func PhraseNoun() string { return phraseNoun(GlobalFaker) }
// PhraseNoun will return a random noun phrase
func (f *Faker) PhraseNoun() string { return phraseNoun(f) }
func phraseNoun(f *Faker) string {
str := ""
// You may also want to add an adjective to describe the noun
if boolFunc(f) {
str = adjectiveDescriptive(f) + " " + noun(f)
} else {
str = noun(f)
}
// Add determiner from weighted list
prob, _ := weighted(f, []any{1, 2, 3}, []float32{2, 1.5, 1})
if prob == 1 {
str = getArticle(str) + " " + str
} else if prob == 2 {
str = "the " + str
}
return str
}
// PhraseVerb will return a random preposition phrase
func PhraseVerb() string { return phraseVerb(GlobalFaker) }
// PhraseVerb will return a random preposition phrase
func (f *Faker) PhraseVerb() string { return phraseVerb(f) }
func phraseVerb(f *Faker) string {
// Put together a string builder
sb := []string{}
// You may have an adverb phrase
if boolFunc(f) {
sb = append(sb, phraseAdverb(f))
}
// Lets add the primary verb
sb = append(sb, verbAction(f))
// You may have a noun phrase
if boolFunc(f) {
sb = append(sb, phraseNoun(f))
}
// You may have an adverb phrase
if boolFunc(f) {
sb = append(sb, phraseAdverb(f))
// You may also have a preposition phrase
if boolFunc(f) {
sb = append(sb, phrasePreposition(f))
}
// You may also hae an adverb phrase
if boolFunc(f) {
sb = append(sb, phraseAdverb(f))
}
}
return strings.Join(sb, " ")
}
// PhraseAdverb will return a random adverb phrase
func PhraseAdverb() string { return phraseAdverb(GlobalFaker) }
// PhraseAdverb will return a random adverb phrase
func (f *Faker) PhraseAdverb() string { return phraseAdverb(f) }
func phraseAdverb(f *Faker) string {
if boolFunc(f) {
return adverbDegree(f) + " " + adverbManner(f)
}
return adverbManner(f)
}
// PhrasePreposition will return a random preposition phrase
func PhrasePreposition() string { return phrasePreposition(GlobalFaker) }
// PhrasePreposition will return a random preposition phrase
func (f *Faker) PhrasePreposition() string { return phrasePreposition(f) }
func phrasePreposition(f *Faker) string {
return prepositionSimple(f) + " " + phraseNoun(f)
}
func addWordPhraseLookup() {
AddFuncLookup("phrase", Info{
Display: "Phrase",
Category: "word",
Description: "A small group of words standing together",
Example: "time will tell",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phrase(f), nil
},
})
AddFuncLookup("phrasenoun", Info{
Display: "Noun Phrase",
Category: "word",
Description: "Phrase with a noun as its head, functions within sentence like a noun",
Example: "a tribe",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phraseNoun(f), nil
},
})
AddFuncLookup("phraseverb", Info{
Display: "Verb Phrase",
Category: "word",
Description: "Phrase that Consists of a verb and its modifiers, expressing an action or state",
Example: "a tribe",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phraseVerb(f), nil
},
})
AddFuncLookup("phraseadverb", Info{
Display: "Adverb Phrase",
Category: "word",
Description: "Phrase that modifies a verb, adjective, or another adverb, providing additional information.",
Example: "fully gladly",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phraseAdverb(f), nil
},
})
AddFuncLookup("phrasepreposition", Info{
Display: "Preposition Phrase",
Category: "word",
Description: "Phrase starting with a preposition, showing relation between elements in a sentence.",
Example: "out the black thing",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return phrasePreposition(f), nil
},
})
}

View File

@ -52,6 +52,8 @@ func addWordPrepositionLookup() {
Description: "Words used to express the relationship of a noun or pronoun to other words in a sentence", Description: "Words used to express the relationship of a noun or pronoun to other words in a sentence",
Example: "other than", Example: "other than",
Output: "string", Output: "string",
Aliases: []string{"relationship connector", "grammar link", "sentence bridge", "word connector"},
Keywords: []string{"relationship", "noun", "pronoun", "sentence", "grammar", "express", "connector", "link", "relational"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return preposition(f), nil return preposition(f), nil
}, },
@ -63,6 +65,8 @@ func addWordPrepositionLookup() {
Description: "Single-word preposition showing relationships between 2 parts of a sentence", Description: "Single-word preposition showing relationships between 2 parts of a sentence",
Example: "out", Example: "out",
Output: "string", Output: "string",
Aliases: []string{"basic connector", "fundamental link", "single element", "grammar bridge"},
Keywords: []string{"preposition", "simple", "single-word", "relationships", "parts", "sentence", "grammar", "showing", "basic", "fundamental", "elementary"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return prepositionSimple(f), nil return prepositionSimple(f), nil
}, },
@ -74,6 +78,8 @@ func addWordPrepositionLookup() {
Description: "Two-word combination preposition, indicating a complex relation", Description: "Two-word combination preposition, indicating a complex relation",
Example: "before", Example: "before",
Output: "string", Output: "string",
Aliases: []string{"two-word connector", "complex relation", "combination element", "grammar bridge"},
Keywords: []string{"preposition", "double", "two-word", "combination", "complex", "relation", "grammar", "indicating", "compound", "multi-word", "paired"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return prepositionDouble(f), nil return prepositionDouble(f), nil
}, },
@ -85,6 +91,8 @@ func addWordPrepositionLookup() {
Description: "Preposition that can be formed by combining two or more prepositions", Description: "Preposition that can be formed by combining two or more prepositions",
Example: "according to", Example: "according to",
Output: "string", Output: "string",
Aliases: []string{"multi-part connector", "complex combination", "formed element", "grammar bridge"},
Keywords: []string{"preposition", "compound", "combining", "two", "more", "prepositions", "grammar", "formed", "complex", "multi-part", "constructed"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return prepositionCompound(f), nil return prepositionCompound(f), nil
}, },

View File

@ -107,6 +107,8 @@ func addWordPronounLookup() {
Description: "Word used in place of a noun to avoid repetition", Description: "Word used in place of a noun to avoid repetition",
Example: "me", Example: "me",
Output: "string", Output: "string",
Aliases: []string{"noun substitute", "word replacement", "grammar element", "reference word"},
Keywords: []string{"noun", "replacement", "grammar", "repetition", "substitute", "reference", "avoidance"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronoun(f), nil return pronoun(f), nil
}, },
@ -118,6 +120,8 @@ func addWordPronounLookup() {
Description: "Pronoun referring to a specific persons or things", Description: "Pronoun referring to a specific persons or things",
Example: "it", Example: "it",
Output: "string", Output: "string",
Aliases: []string{"personal reference", "specific entity", "individual pronoun", "grammar element"},
Keywords: []string{"pronoun", "personal", "specific", "person", "thing", "grammar", "referring", "individual", "entity", "identity"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronounPersonal(f), nil return pronounPersonal(f), nil
}, },
@ -129,6 +133,8 @@ func addWordPronounLookup() {
Description: "Pronoun used as the object of a verb or preposition", Description: "Pronoun used as the object of a verb or preposition",
Example: "it", Example: "it",
Output: "string", Output: "string",
Aliases: []string{"object reference", "verb object", "preposition object", "grammar function"},
Keywords: []string{"pronoun", "verb", "preposition", "grammar", "used", "objective", "case", "receiver"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronounObject(f), nil return pronounObject(f), nil
}, },
@ -140,6 +146,8 @@ func addWordPronounLookup() {
Description: "Pronoun indicating ownership or belonging", Description: "Pronoun indicating ownership or belonging",
Example: "mine", Example: "mine",
Output: "string", Output: "string",
Aliases: []string{"ownership indicator", "belonging reference", "possession word", "grammar element"},
Keywords: []string{"pronoun", "possessive", "ownership", "belonging", "grammar", "indicating", "possession", "property"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronounPossessive(f), nil return pronounPossessive(f), nil
}, },
@ -151,6 +159,8 @@ func addWordPronounLookup() {
Description: "Pronoun referring back to the subject of the sentence", Description: "Pronoun referring back to the subject of the sentence",
Example: "myself", Example: "myself",
Output: "string", Output: "string",
Aliases: []string{"self reference", "subject reflection", "backward reference", "grammar element"},
Keywords: []string{"pronoun", "reflective", "subject", "sentence", "grammar", "referring", "reflexive", "self", "mirror"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronounReflective(f), nil return pronounReflective(f), nil
}, },
@ -162,6 +172,8 @@ func addWordPronounLookup() {
Description: "Pronoun that does not refer to a specific person or thing", Description: "Pronoun that does not refer to a specific person or thing",
Example: "few", Example: "few",
Output: "string", Output: "string",
Aliases: []string{"vague reference", "general pronoun", "unspecific word", "grammar element"},
Keywords: []string{"pronoun", "indefinite", "specific", "person", "grammar", "refer", "vague", "general", "unspecified"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronounIndefinite(f), nil return pronounIndefinite(f), nil
}, },
@ -173,6 +185,8 @@ func addWordPronounLookup() {
Description: "Pronoun that points out specific people or things", Description: "Pronoun that points out specific people or things",
Example: "this", Example: "this",
Output: "string", Output: "string",
Aliases: []string{"pointing reference", "specific indicator", "demonstration word", "grammar element"},
Keywords: []string{"pronoun", "demonstrative", "specific", "people", "grammar", "points", "indicate", "reference", "pointing"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronounDemonstrative(f), nil return pronounDemonstrative(f), nil
}, },
@ -184,6 +198,8 @@ func addWordPronounLookup() {
Description: "Pronoun used to ask questions", Description: "Pronoun used to ask questions",
Example: "what", Example: "what",
Output: "string", Output: "string",
Aliases: []string{"question word", "inquiry reference", "interrogation element", "grammar function"},
Keywords: []string{"pronoun", "interrogative", "question", "ask", "grammar", "used", "inquiry", "wh-word", "questioning"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronounInterrogative(f), nil return pronounInterrogative(f), nil
}, },
@ -195,6 +211,8 @@ func addWordPronounLookup() {
Description: "Pronoun that introduces a clause, referring back to a noun or pronoun", Description: "Pronoun that introduces a clause, referring back to a noun or pronoun",
Example: "as", Example: "as",
Output: "string", Output: "string",
Aliases: []string{"backward reference", "linking pronoun", "grammar element"},
Keywords: []string{"pronoun", "relative", "clause", "noun", "grammar", "introduces", "referring", "connector", "link"},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return pronounRelative(f), nil return pronounRelative(f), nil
}, },

View File

@ -1,212 +0,0 @@
package gofakeit
import (
"bytes"
"errors"
"strings"
"unicode"
)
type paragrapOptions struct {
paragraphCount int
sentenceCount int
wordCount int
separator string
}
const bytesPerWordEstimation = 6
type sentenceGenerator func(f *Faker, wordCount int) string
type wordGenerator func(f *Faker) string
// Sentence will generate a random sentence
func Sentence(wordCount int) string { return sentence(GlobalFaker, wordCount) }
// Sentence will generate a random sentence
func (f *Faker) Sentence(wordCount int) string { return sentence(f, wordCount) }
func sentence(f *Faker, wordCount int) string {
return sentenceGen(f, wordCount, word)
}
// Paragraph will generate a random paragraphGenerator
func Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return paragraph(GlobalFaker, paragraphCount, sentenceCount, wordCount, separator)
}
// Paragraph will generate a random paragraphGenerator
func (f *Faker) Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return paragraph(f, paragraphCount, sentenceCount, wordCount, separator)
}
func paragraph(f *Faker, paragraphCount int, sentenceCount int, wordCount int, separator string) string {
return paragraphGen(f, paragrapOptions{paragraphCount, sentenceCount, wordCount, separator}, sentence)
}
func sentenceGen(f *Faker, wordCount int, word wordGenerator) string {
if wordCount <= 0 {
return ""
}
wordSeparator := ' '
sentence := bytes.Buffer{}
sentence.Grow(wordCount * bytesPerWordEstimation)
for i := 0; i < wordCount; i++ {
word := word(f)
if i == 0 {
runes := []rune(word)
runes[0] = unicode.ToTitle(runes[0])
word = string(runes)
}
sentence.WriteString(word)
if i < wordCount-1 {
sentence.WriteRune(wordSeparator)
}
}
sentence.WriteRune('.')
return sentence.String()
}
func paragraphGen(f *Faker, opts paragrapOptions, sentecer sentenceGenerator) string {
if opts.paragraphCount <= 0 || opts.sentenceCount <= 0 || opts.wordCount <= 0 {
return ""
}
//to avoid making Go 1.10 dependency, we cannot use strings.Builder
paragraphs := bytes.Buffer{}
//we presume the length
paragraphs.Grow(opts.paragraphCount * opts.sentenceCount * opts.wordCount * bytesPerWordEstimation)
wordSeparator := ' '
for i := 0; i < opts.paragraphCount; i++ {
for e := 0; e < opts.sentenceCount; e++ {
paragraphs.WriteString(sentecer(f, opts.wordCount))
if e < opts.sentenceCount-1 {
paragraphs.WriteRune(wordSeparator)
}
}
if i < opts.paragraphCount-1 {
paragraphs.WriteString(opts.separator)
}
}
return paragraphs.String()
}
// Question will return a random question
func Question() string {
return question(GlobalFaker)
}
// Question will return a random question
func (f *Faker) Question() string {
return question(f)
}
func question(f *Faker) string {
return strings.Replace(hipsterSentence(f, number(f, 3, 10)), ".", "?", 1)
}
// Quote will return a random quote from a random person
func Quote() string { return quote(GlobalFaker) }
// Quote will return a random quote from a random person
func (f *Faker) Quote() string { return quote(f) }
func quote(f *Faker) string {
return `"` + hipsterSentence(f, number(f, 3, 10)) + `" - ` + firstName(f) + " " + lastName(f)
}
func addWordSentenceLookup() {
AddFuncLookup("sentence", Info{
Display: "Sentence",
Category: "word",
Description: "Set of words expressing a statement, question, exclamation, or command",
Example: "Interpret context record river mind.",
Output: "string",
Params: []Param{
{Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
wordCount, err := info.GetInt(m, "wordcount")
if err != nil {
return nil, err
}
if wordCount <= 0 || wordCount > 50 {
return nil, errors.New("invalid word count, must be greater than 0, less than 50")
}
return sentence(f, wordCount), nil
},
})
AddFuncLookup("paragraph", Info{
Display: "Paragraph",
Category: "word",
Description: "Distinct section of writing covering a single theme, composed of multiple sentences",
Example: "Interpret context record river mind press self should compare property outcome divide. Combine approach sustain consult discover explanation direct address church husband seek army. Begin own act welfare replace press suspect stay link place manchester specialist. Arrive price satisfy sign force application hair train provide basis right pay. Close mark teacher strengthen information attempt head touch aim iron tv take.",
Output: "string",
Params: []Param{
{Field: "paragraphcount", Display: "Paragraph Count", Type: "int", Default: "2", Description: "Number of paragraphs"},
{Field: "sentencecount", Display: "Sentence Count", Type: "int", Default: "2", Description: "Number of sentences in a paragraph"},
{Field: "wordcount", Display: "Word Count", Type: "int", Default: "5", Description: "Number of words in a sentence"},
{Field: "paragraphseparator", Display: "Paragraph Separator", Type: "string", Default: "<br />", Description: "String value to add between paragraphs"},
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
paragraphCount, err := info.GetInt(m, "paragraphcount")
if err != nil {
return nil, err
}
if paragraphCount <= 0 || paragraphCount > 20 {
return nil, errors.New("invalid paragraph count, must be greater than 0, less than 20")
}
sentenceCount, err := info.GetInt(m, "sentencecount")
if err != nil {
return nil, err
}
if sentenceCount <= 0 || sentenceCount > 20 {
return nil, errors.New("invalid sentence count, must be greater than 0, less than 20")
}
wordCount, err := info.GetInt(m, "wordcount")
if err != nil {
return nil, err
}
if wordCount <= 0 || wordCount > 50 {
return nil, errors.New("invalid word count, must be greater than 0, less than 50")
}
paragraphSeparator, err := info.GetString(m, "paragraphseparator")
if err != nil {
return nil, err
}
return paragraph(f, paragraphCount, sentenceCount, wordCount, paragraphSeparator), nil
},
})
AddFuncLookup("question", Info{
Display: "Question",
Category: "word",
Description: "Statement formulated to inquire or seek clarification",
Example: "Roof chia echo?",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return question(f), nil
},
})
AddFuncLookup("quote", Info{
Display: "Quote",
Category: "word",
Description: "Direct repetition of someone else's words",
Example: `"Roof chia echo." - Lura Lockman`,
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return quote(f), nil
},
})
}

View File

@ -64,6 +64,12 @@ func addWordVerbLookup() {
Description: "Word expressing an action, event or state", Description: "Word expressing an action, event or state",
Example: "release", Example: "release",
Output: "string", Output: "string",
Aliases: []string{
"action word", "doing word", "predicate word", "verb form", "process word",
},
Keywords: []string{
"movement", "change", "existence", "process", "condition", "happening", "expression", "statement", "activity", "function",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return verb(f), nil return verb(f), nil
}, },
@ -72,9 +78,15 @@ func addWordVerbLookup() {
AddFuncLookup("verbaction", Info{ AddFuncLookup("verbaction", Info{
Display: "Action Verb", Display: "Action Verb",
Category: "word", Category: "word",
Description: "Verb Indicating a physical or mental action", Description: "Verb indicating a physical or mental action",
Example: "close", Example: "close",
Output: "string", Output: "string",
Aliases: []string{
"movement word", "doing action", "behavior word", "mental action", "physical action",
},
Keywords: []string{
"activity", "task", "operation", "motion", "effort", "performance", "gesture", "response", "execution", "behavior",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return verbAction(f), nil return verbAction(f), nil
}, },
@ -86,6 +98,12 @@ func addWordVerbLookup() {
Description: "Verb that requires a direct object to complete its meaning", Description: "Verb that requires a direct object to complete its meaning",
Example: "follow", Example: "follow",
Output: "string", Output: "string",
Aliases: []string{
"object verb", "requires object", "dependent verb", "object-linked", "receiver word",
},
Keywords: []string{
"direct", "receiver", "transfer", "target", "completion", "relation", "dependent", "object-based", "action-transfer", "link",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return verbTransitive(f), nil return verbTransitive(f), nil
}, },
@ -97,6 +115,12 @@ func addWordVerbLookup() {
Description: "Verb that does not require a direct object to complete its meaning", Description: "Verb that does not require a direct object to complete its meaning",
Example: "laugh", Example: "laugh",
Output: "string", Output: "string",
Aliases: []string{
"standalone verb", "independent word", "no object verb", "complete action", "self-contained verb",
},
Keywords: []string{
"autonomous", "independent", "non-transfer", "self-complete", "expression", "state", "behavior", "occur", "perform", "action-only",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return verbIntransitive(f), nil return verbIntransitive(f), nil
}, },
@ -105,9 +129,15 @@ func addWordVerbLookup() {
AddFuncLookup("verblinking", Info{ AddFuncLookup("verblinking", Info{
Display: "Linking Verb", Display: "Linking Verb",
Category: "word", Category: "word",
Description: "Verb that Connects the subject of a sentence to a subject complement", Description: "Verb that connects the subject of a sentence to a subject complement",
Example: "was", Example: "was",
Output: "string", Output: "string",
Aliases: []string{
"connecting verb", "copular verb", "bridge word", "link word", "equating verb",
},
Keywords: []string{
"relation", "connection", "equivalence", "identification", "state", "being", "subject-link", "copula", "connector", "description",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return verbLinking(f), nil return verbLinking(f), nil
}, },
@ -119,8 +149,16 @@ func addWordVerbLookup() {
Description: "Auxiliary verb that helps the main verb complete the sentence", Description: "Auxiliary verb that helps the main verb complete the sentence",
Example: "be", Example: "be",
Output: "string", Output: "string",
Aliases: []string{
"auxiliary verb", "supporting verb", "assisting word", "helper verb", "modal verb",
},
Keywords: []string{
"tense", "mood", "voice", "aspect", "support", "structure",
"compound", "formation", "assistance",
},
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) { Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return verbHelping(f), nil return verbHelping(f), nil
}, },
}) })
} }

View File

@ -149,7 +149,7 @@ func xmlFunc(f *Faker, xo *XMLOptions) ([]byte, error) {
} }
// Check fields length // Check fields length
if xo.Fields == nil || len(xo.Fields) <= 0 { if len(xo.Fields) <= 0 {
return nil, errors.New("must pass fields in order to build json object(s)") return nil, errors.New("must pass fields in order to build json object(s)")
} }
@ -284,6 +284,17 @@ func addFileXMLLookup() {
</xml>`, </xml>`,
Output: "[]byte", Output: "[]byte",
ContentType: "application/xml", ContentType: "application/xml",
Aliases: []string{
"xml document",
"extensible markup",
"tagged data",
"hierarchical structure",
"serialized tree",
},
Keywords: []string{
"extensible", "markup", "language", "elements", "format",
"structured", "generates", "tags", "attributes", "nested",
},
Params: []Param{ Params: []Param{
{Field: "type", Display: "Type", Type: "string", Default: "single", Options: []string{"single", "array"}, Description: "Type of XML, single or array"}, {Field: "type", Display: "Type", Type: "string", Default: "single", Options: []string{"single", "array"}, Description: "Type of XML, single or array"},
{Field: "rootelement", Display: "Root Element", Type: "string", Default: "xml", Description: "Root element wrapper name"}, {Field: "rootelement", Display: "Root Element", Type: "string", Default: "xml", Description: "Root element wrapper name"},

View File

@ -70,3 +70,5 @@ benchstat <(go test -benchtime 500ms -count 15 -bench 'Sum64$')
- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) - [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)
- [FreeCache](https://github.com/coocood/freecache) - [FreeCache](https://github.com/coocood/freecache)
- [FastCache](https://github.com/VictoriaMetrics/fastcache) - [FastCache](https://github.com/VictoriaMetrics/fastcache)
- [Ristretto](https://github.com/dgraph-io/ristretto)
- [Badger](https://github.com/dgraph-io/badger)

View File

@ -19,10 +19,13 @@ const (
// Store the primes in an array as well. // Store the primes in an array as well.
// //
// The consts are used when possible in Go code to avoid MOVs but we need a // The consts are used when possible in Go code to avoid MOVs but we need a
// contiguous array of the assembly code. // contiguous array for the assembly code.
var primes = [...]uint64{prime1, prime2, prime3, prime4, prime5} var primes = [...]uint64{prime1, prime2, prime3, prime4, prime5}
// Digest implements hash.Hash64. // Digest implements hash.Hash64.
//
// Note that a zero-valued Digest is not ready to receive writes.
// Call Reset or create a Digest using New before calling other methods.
type Digest struct { type Digest struct {
v1 uint64 v1 uint64
v2 uint64 v2 uint64
@ -33,19 +36,31 @@ type Digest struct {
n int // how much of mem is used n int // how much of mem is used
} }
// New creates a new Digest that computes the 64-bit xxHash algorithm. // New creates a new Digest with a zero seed.
func New() *Digest { func New() *Digest {
return NewWithSeed(0)
}
// NewWithSeed creates a new Digest with the given seed.
func NewWithSeed(seed uint64) *Digest {
var d Digest var d Digest
d.Reset() d.ResetWithSeed(seed)
return &d return &d
} }
// Reset clears the Digest's state so that it can be reused. // Reset clears the Digest's state so that it can be reused.
// It uses a seed value of zero.
func (d *Digest) Reset() { func (d *Digest) Reset() {
d.v1 = primes[0] + prime2 d.ResetWithSeed(0)
d.v2 = prime2 }
d.v3 = 0
d.v4 = -primes[0] // ResetWithSeed clears the Digest's state so that it can be reused.
// It uses the given seed to initialize the state.
func (d *Digest) ResetWithSeed(seed uint64) {
d.v1 = seed + prime1 + prime2
d.v2 = seed + prime2
d.v3 = seed
d.v4 = seed - prime1
d.total = 0 d.total = 0
d.n = 0 d.n = 0
} }

View File

@ -6,7 +6,7 @@
package xxhash package xxhash
// Sum64 computes the 64-bit xxHash digest of b. // Sum64 computes the 64-bit xxHash digest of b with a zero seed.
// //
//go:noescape //go:noescape
func Sum64(b []byte) uint64 func Sum64(b []byte) uint64

View File

@ -3,7 +3,7 @@
package xxhash package xxhash
// Sum64 computes the 64-bit xxHash digest of b. // Sum64 computes the 64-bit xxHash digest of b with a zero seed.
func Sum64(b []byte) uint64 { func Sum64(b []byte) uint64 {
// A simpler version would be // A simpler version would be
// d := New() // d := New()

View File

@ -5,7 +5,7 @@
package xxhash package xxhash
// Sum64String computes the 64-bit xxHash digest of s. // Sum64String computes the 64-bit xxHash digest of s with a zero seed.
func Sum64String(s string) uint64 { func Sum64String(s string) uint64 {
return Sum64([]byte(s)) return Sum64([]byte(s))
} }

View File

@ -33,7 +33,7 @@ import (
// //
// See https://github.com/golang/go/issues/42739 for discussion. // See https://github.com/golang/go/issues/42739 for discussion.
// Sum64String computes the 64-bit xxHash digest of s. // Sum64String computes the 64-bit xxHash digest of s with a zero seed.
// It may be faster than Sum64([]byte(s)) by avoiding a copy. // It may be faster than Sum64([]byte(s)) by avoiding a copy.
func Sum64String(s string) uint64 { func Sum64String(s string) uint64 {
b := *(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)})) b := *(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)}))

20
vendor/github.com/docker/cli/AUTHORS generated vendored
View File

@ -26,6 +26,7 @@ Akhil Mohan <akhil.mohan@mayadata.io>
Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Akim Demaille <akim.demaille@docker.com> Akim Demaille <akim.demaille@docker.com>
Alan Thompson <cloojure@gmail.com> Alan Thompson <cloojure@gmail.com>
Alano Terblanche <alano.terblanche@docker.com>
Albert Callarisa <shark234@gmail.com> Albert Callarisa <shark234@gmail.com>
Alberto Roura <mail@albertoroura.com> Alberto Roura <mail@albertoroura.com>
Albin Kerouanton <albinker@gmail.com> Albin Kerouanton <albinker@gmail.com>
@ -65,6 +66,7 @@ Andrew Hsu <andrewhsu@docker.com>
Andrew Macpherson <hopscotch23@gmail.com> Andrew Macpherson <hopscotch23@gmail.com>
Andrew McDonnell <bugs@andrewmcdonnell.net> Andrew McDonnell <bugs@andrewmcdonnell.net>
Andrew Po <absourd.noise@gmail.com> Andrew Po <absourd.noise@gmail.com>
Andrew-Zipperer <atzipperer@gmail.com>
Andrey Petrov <andrey.petrov@shazow.net> Andrey Petrov <andrey.petrov@shazow.net>
Andrii Berehuliak <berkusandrew@gmail.com> Andrii Berehuliak <berkusandrew@gmail.com>
André Martins <aanm90@gmail.com> André Martins <aanm90@gmail.com>
@ -124,11 +126,13 @@ Bryan Bess <squarejaw@bsbess.com>
Bryan Boreham <bjboreham@gmail.com> Bryan Boreham <bjboreham@gmail.com>
Bryan Murphy <bmurphy1976@gmail.com> Bryan Murphy <bmurphy1976@gmail.com>
bryfry <bryon.fryer@gmail.com> bryfry <bryon.fryer@gmail.com>
Calvin Liu <flycalvin@qq.com>
Cameron Spear <cameronspear@gmail.com> Cameron Spear <cameronspear@gmail.com>
Cao Weiwei <cao.weiwei30@zte.com.cn> Cao Weiwei <cao.weiwei30@zte.com.cn>
Carlo Mion <mion00@gmail.com> Carlo Mion <mion00@gmail.com>
Carlos Alexandro Becker <caarlos0@gmail.com> Carlos Alexandro Becker <caarlos0@gmail.com>
Carlos de Paula <me@carlosedp.com> Carlos de Paula <me@carlosedp.com>
Casey Korver <casey@korver.dev>
Ce Gao <ce.gao@outlook.com> Ce Gao <ce.gao@outlook.com>
Cedric Davies <cedricda@microsoft.com> Cedric Davies <cedricda@microsoft.com>
Cezar Sa Espinola <cezarsa@gmail.com> Cezar Sa Espinola <cezarsa@gmail.com>
@ -160,6 +164,8 @@ Christophe Vidal <kriss@krizalys.com>
Christopher Biscardi <biscarch@sketcht.com> Christopher Biscardi <biscarch@sketcht.com>
Christopher Crone <christopher.crone@docker.com> Christopher Crone <christopher.crone@docker.com>
Christopher Jones <tophj@linux.vnet.ibm.com> Christopher Jones <tophj@linux.vnet.ibm.com>
Christopher Petito <47751006+krissetto@users.noreply.github.com>
Christopher Petito <chrisjpetito@gmail.com>
Christopher Svensson <stoffus@stoffus.com> Christopher Svensson <stoffus@stoffus.com>
Christy Norman <christy@linux.vnet.ibm.com> Christy Norman <christy@linux.vnet.ibm.com>
Chun Chen <ramichen@tencent.com> Chun Chen <ramichen@tencent.com>
@ -212,6 +218,7 @@ David Cramer <davcrame@cisco.com>
David Dooling <dooling@gmail.com> David Dooling <dooling@gmail.com>
David Gageot <david@gageot.net> David Gageot <david@gageot.net>
David Karlsson <david.karlsson@docker.com> David Karlsson <david.karlsson@docker.com>
David le Blanc <systemmonkey42@users.noreply.github.com>
David Lechner <david@lechnology.com> David Lechner <david@lechnology.com>
David Scott <dave@recoil.org> David Scott <dave@recoil.org>
David Sheets <dsheets@docker.com> David Sheets <dsheets@docker.com>
@ -298,6 +305,7 @@ Gang Qiao <qiaohai8866@gmail.com>
Gary Schaetz <gary@schaetzkc.com> Gary Schaetz <gary@schaetzkc.com>
Genki Takiuchi <genki@s21g.com> Genki Takiuchi <genki@s21g.com>
George MacRorie <gmacr31@gmail.com> George MacRorie <gmacr31@gmail.com>
George Margaritis <gmargaritis@protonmail.com>
George Xie <georgexsh@gmail.com> George Xie <georgexsh@gmail.com>
Gianluca Borello <g.borello@gmail.com> Gianluca Borello <g.borello@gmail.com>
Gildas Cuisinier <gildas.cuisinier@gcuisinier.net> Gildas Cuisinier <gildas.cuisinier@gcuisinier.net>
@ -306,6 +314,7 @@ Gleb Stsenov <gleb.stsenov@gmail.com>
Goksu Toprak <goksu.toprak@docker.com> Goksu Toprak <goksu.toprak@docker.com>
Gou Rao <gou@portworx.com> Gou Rao <gou@portworx.com>
Govind Rai <raigovind93@gmail.com> Govind Rai <raigovind93@gmail.com>
Grace Choi <grace.54109@gmail.com>
Graeme Wiebe <graeme.wiebe@gmail.com> Graeme Wiebe <graeme.wiebe@gmail.com>
Grant Reaber <grant.reaber@gmail.com> Grant Reaber <grant.reaber@gmail.com>
Greg Pflaum <gpflaum@users.noreply.github.com> Greg Pflaum <gpflaum@users.noreply.github.com>
@ -386,6 +395,7 @@ Jezeniel Zapanta <jpzapanta22@gmail.com>
Jian Zhang <zhangjian.fnst@cn.fujitsu.com> Jian Zhang <zhangjian.fnst@cn.fujitsu.com>
Jie Luo <luo612@zju.edu.cn> Jie Luo <luo612@zju.edu.cn>
Jilles Oldenbeuving <ojilles@gmail.com> Jilles Oldenbeuving <ojilles@gmail.com>
Jim Chen <njucjc@gmail.com>
Jim Galasyn <jim.galasyn@docker.com> Jim Galasyn <jim.galasyn@docker.com>
Jim Lin <b04705003@ntu.edu.tw> Jim Lin <b04705003@ntu.edu.tw>
Jimmy Leger <jimmy.leger@gmail.com> Jimmy Leger <jimmy.leger@gmail.com>
@ -416,6 +426,7 @@ John Willis <john.willis@docker.com>
Jon Johnson <jonjohnson@google.com> Jon Johnson <jonjohnson@google.com>
Jon Zeolla <zeolla@gmail.com> Jon Zeolla <zeolla@gmail.com>
Jonatas Baldin <jonatas.baldin@gmail.com> Jonatas Baldin <jonatas.baldin@gmail.com>
Jonathan A. Sternberg <jonathansternberg@gmail.com>
Jonathan Boulle <jonathanboulle@gmail.com> Jonathan Boulle <jonathanboulle@gmail.com>
Jonathan Lee <jonjohn1232009@gmail.com> Jonathan Lee <jonjohn1232009@gmail.com>
Jonathan Lomas <jonathan@floatinglomas.ca> Jonathan Lomas <jonathan@floatinglomas.ca>
@ -470,6 +481,7 @@ Kevin Woblick <mail@kovah.de>
khaled souf <khaled.souf@gmail.com> khaled souf <khaled.souf@gmail.com>
Kim Eik <kim@heldig.org> Kim Eik <kim@heldig.org>
Kir Kolyshkin <kolyshkin@gmail.com> Kir Kolyshkin <kolyshkin@gmail.com>
Kirill A. Korinsky <kirill@korins.ky>
Kotaro Yoshimatsu <kotaro.yoshimatsu@gmail.com> Kotaro Yoshimatsu <kotaro.yoshimatsu@gmail.com>
Krasi Georgiev <krasi@vip-consult.solutions> Krasi Georgiev <krasi@vip-consult.solutions>
Kris-Mikael Krister <krismikael@protonmail.com> Kris-Mikael Krister <krismikael@protonmail.com>
@ -530,6 +542,7 @@ Marco Vedovati <mvedovati@suse.com>
Marcus Martins <marcus@docker.com> Marcus Martins <marcus@docker.com>
Marianna Tessel <mtesselh@gmail.com> Marianna Tessel <mtesselh@gmail.com>
Marius Ileana <marius.ileana@gmail.com> Marius Ileana <marius.ileana@gmail.com>
Marius Meschter <marius@meschter.me>
Marius Sturm <marius@graylog.com> Marius Sturm <marius@graylog.com>
Mark Oates <fl0yd@me.com> Mark Oates <fl0yd@me.com>
Marsh Macy <marsma@microsoft.com> Marsh Macy <marsma@microsoft.com>
@ -538,6 +551,7 @@ Mary Anthony <mary.anthony@docker.com>
Mason Fish <mason.fish@docker.com> Mason Fish <mason.fish@docker.com>
Mason Malone <mason.malone@gmail.com> Mason Malone <mason.malone@gmail.com>
Mateusz Major <apkd@users.noreply.github.com> Mateusz Major <apkd@users.noreply.github.com>
Mathias Duedahl <64321057+Lussebullen@users.noreply.github.com>
Mathieu Champlon <mathieu.champlon@docker.com> Mathieu Champlon <mathieu.champlon@docker.com>
Mathieu Rollet <matletix@gmail.com> Mathieu Rollet <matletix@gmail.com>
Matt Gucci <matt9ucci@gmail.com> Matt Gucci <matt9ucci@gmail.com>
@ -547,6 +561,7 @@ Matthew Heon <mheon@redhat.com>
Matthieu Hauglustaine <matt.hauglustaine@gmail.com> Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
Mauro Porras P <mauroporrasp@gmail.com> Mauro Porras P <mauroporrasp@gmail.com>
Max Shytikov <mshytikov@gmail.com> Max Shytikov <mshytikov@gmail.com>
Max-Julian Pogner <max-julian@pogner.at>
Maxime Petazzoni <max@signalfuse.com> Maxime Petazzoni <max@signalfuse.com>
Maximillian Fan Xavier <maximillianfx@gmail.com> Maximillian Fan Xavier <maximillianfx@gmail.com>
Mei ChunTao <mei.chuntao@zte.com.cn> Mei ChunTao <mei.chuntao@zte.com.cn>
@ -610,6 +625,7 @@ Nathan McCauley <nathan.mccauley@docker.com>
Neil Peterson <neilpeterson@outlook.com> Neil Peterson <neilpeterson@outlook.com>
Nick Adcock <nick.adcock@docker.com> Nick Adcock <nick.adcock@docker.com>
Nick Santos <nick.santos@docker.com> Nick Santos <nick.santos@docker.com>
Nick Sieger <nick@nicksieger.com>
Nico Stapelbroek <nstapelbroek@gmail.com> Nico Stapelbroek <nstapelbroek@gmail.com>
Nicola Kabar <nicolaka@gmail.com> Nicola Kabar <nicolaka@gmail.com>
Nicolas Borboën <ponsfrilus@gmail.com> Nicolas Borboën <ponsfrilus@gmail.com>
@ -704,6 +720,7 @@ Rory Hunter <roryhunter2@gmail.com>
Ross Boucher <rboucher@gmail.com> Ross Boucher <rboucher@gmail.com>
Rubens Figueiredo <r.figueiredo.52@gmail.com> Rubens Figueiredo <r.figueiredo.52@gmail.com>
Rui Cao <ruicao@alauda.io> Rui Cao <ruicao@alauda.io>
Rui JingAn <quiterace@gmail.com>
Ryan Belgrave <rmb1993@gmail.com> Ryan Belgrave <rmb1993@gmail.com>
Ryan Detzel <ryan.detzel@gmail.com> Ryan Detzel <ryan.detzel@gmail.com>
Ryan Stelly <ryan.stelly@live.com> Ryan Stelly <ryan.stelly@live.com>
@ -797,6 +814,7 @@ Tim Hockin <thockin@google.com>
Tim Sampson <tim@sampson.fi> Tim Sampson <tim@sampson.fi>
Tim Smith <timbot@google.com> Tim Smith <timbot@google.com>
Tim Waugh <twaugh@redhat.com> Tim Waugh <twaugh@redhat.com>
Tim Welsh <timothy.welsh@docker.com>
Tim Wraight <tim.wraight@tangentlabs.co.uk> Tim Wraight <tim.wraight@tangentlabs.co.uk>
timfeirg <kkcocogogo@gmail.com> timfeirg <kkcocogogo@gmail.com>
Timothy Hobbs <timothyhobbs@seznam.cz> Timothy Hobbs <timothyhobbs@seznam.cz>
@ -880,9 +898,11 @@ Zhang Wei <zhangwei555@huawei.com>
Zhang Wentao <zhangwentao234@huawei.com> Zhang Wentao <zhangwentao234@huawei.com>
ZhangHang <stevezhang2014@gmail.com> ZhangHang <stevezhang2014@gmail.com>
zhenghenghuo <zhenghenghuo@zju.edu.cn> zhenghenghuo <zhenghenghuo@zju.edu.cn>
Zhiwei Liang <zliang@akamai.com>
Zhou Hao <zhouhao@cn.fujitsu.com> Zhou Hao <zhouhao@cn.fujitsu.com>
Zhoulin Xie <zhoulin.xie@daocloud.io> Zhoulin Xie <zhoulin.xie@daocloud.io>
Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Zhuo Zhi <h.dwwwwww@gmail.com>
Álex González <agonzalezro@gmail.com> Álex González <agonzalezro@gmail.com>
Álvaro Lázaro <alvaro.lazaro.g@gmail.com> Álvaro Lázaro <alvaro.lazaro.g@gmail.com>
Átila Camurça Alves <camurca.home@gmail.com> Átila Camurça Alves <camurca.home@gmail.com>

View File

@ -14,6 +14,6 @@ United States and other governments.
It is your responsibility to ensure that your use and/or transfer does not It is your responsibility to ensure that your use and/or transfer does not
violate applicable laws. violate applicable laws.
For more information, please see https://www.bis.doc.gov For more information, see https://www.bis.doc.gov
See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. See also https://www.apache.org/dev/crypto.html and/or seek legal counsel.

View File

@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.19 //go:build go1.22
package interpolation package interpolation

View File

@ -1,4 +1,4 @@
version: "3.12" version: "3.13"
services: services:
foo: foo:
@ -207,6 +207,9 @@ services:
aliases: aliases:
- alias1 - alias1
- alias3 - alias3
driver_opts:
"driveropt1": "optval1"
"driveropt2": "optval2"
other-network: other-network:
ipv4_address: 172.16.238.10 ipv4_address: 172.16.238.10
ipv6_address: 2001:3984:3989::10 ipv6_address: 2001:3984:3989::10

View File

@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.19 //go:build go1.22
package loader package loader
@ -29,6 +29,7 @@ var interpolateTypeCastMapping = map[interp.Path]interp.Cast{
servicePath("ulimits", interp.PathMatchAll, "hard"): toInt, servicePath("ulimits", interp.PathMatchAll, "hard"): toInt,
servicePath("ulimits", interp.PathMatchAll, "soft"): toInt, servicePath("ulimits", interp.PathMatchAll, "soft"): toInt,
servicePath("privileged"): toBoolean, servicePath("privileged"): toBoolean,
servicePath("oom_score_adj"): toInt,
servicePath("read_only"): toBoolean, servicePath("read_only"): toBoolean,
servicePath("stdin_open"): toBoolean, servicePath("stdin_open"): toBoolean,
servicePath("tty"): toBoolean, servicePath("tty"): toBoolean,

View File

@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.19 //go:build go1.22
package loader package loader
@ -21,8 +21,8 @@ import (
"github.com/docker/docker/api/types/versions" "github.com/docker/docker/api/types/versions"
"github.com/docker/go-connections/nat" "github.com/docker/go-connections/nat"
units "github.com/docker/go-units" units "github.com/docker/go-units"
"github.com/go-viper/mapstructure/v2"
"github.com/google/shlex" "github.com/google/shlex"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"

View File

@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.19 //go:build go1.22
package loader package loader

View File

@ -0,0 +1,680 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "config_schema_v3.13.json",
"type": "object",
"properties": {
"version": {
"type": "string",
"default": "3.13"
},
"services": {
"id": "#/properties/services",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"$ref": "#/definitions/service"
}
},
"additionalProperties": false
},
"networks": {
"id": "#/properties/networks",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"$ref": "#/definitions/network"
}
}
},
"volumes": {
"id": "#/properties/volumes",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"$ref": "#/definitions/volume"
}
},
"additionalProperties": false
},
"secrets": {
"id": "#/properties/secrets",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"$ref": "#/definitions/secret"
}
},
"additionalProperties": false
},
"configs": {
"id": "#/properties/configs",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"$ref": "#/definitions/config"
}
},
"additionalProperties": false
}
},
"patternProperties": {"^x-": {}},
"additionalProperties": false,
"definitions": {
"service": {
"id": "#/definitions/service",
"type": "object",
"properties": {
"deploy": {"$ref": "#/definitions/deployment"},
"build": {
"oneOf": [
{"type": "string"},
{
"type": "object",
"properties": {
"context": {"type": "string"},
"dockerfile": {"type": "string"},
"args": {"$ref": "#/definitions/list_or_dict"},
"labels": {"$ref": "#/definitions/list_or_dict"},
"cache_from": {"$ref": "#/definitions/list_of_strings"},
"network": {"type": "string"},
"target": {"type": "string"},
"shm_size": {"type": ["integer", "string"]},
"extra_hosts": {"$ref": "#/definitions/list_or_dict"}
},
"additionalProperties": true
}
]
},
"cap_add": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"cap_drop": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"cgroupns_mode": {"type": "string"},
"cgroup_parent": {"type": "string"},
"command": {
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}}
]
},
"configs": {
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{
"type": "object",
"properties": {
"source": {"type": "string"},
"target": {"type": "string"},
"uid": {"type": "string"},
"gid": {"type": "string"},
"mode": {"type": "number"}
}
}
]
}
},
"container_name": {"type": "string"},
"credential_spec": {
"type": "object",
"properties": {
"config": {"type": "string"},
"file": {"type": "string"},
"registry": {"type": "string"}
},
"additionalProperties": false
},
"depends_on": {"$ref": "#/definitions/list_of_strings"},
"devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"dns": {"$ref": "#/definitions/string_or_list"},
"dns_search": {"$ref": "#/definitions/string_or_list"},
"domainname": {"type": "string"},
"entrypoint": {
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}}
]
},
"env_file": {"$ref": "#/definitions/string_or_list"},
"environment": {"$ref": "#/definitions/list_or_dict"},
"expose": {
"type": "array",
"items": {
"type": ["string", "number"],
"format": "expose"
},
"uniqueItems": true
},
"external_links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"extra_hosts": {"$ref": "#/definitions/list_or_dict"},
"healthcheck": {"$ref": "#/definitions/healthcheck"},
"hostname": {"type": "string"},
"image": {"type": "string"},
"init": {"type": "boolean"},
"ipc": {"type": "string"},
"isolation": {"type": "string"},
"labels": {"$ref": "#/definitions/list_or_dict"},
"links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"logging": {
"type": "object",
"properties": {
"driver": {"type": "string"},
"options": {
"type": "object",
"patternProperties": {
"^.+$": {"type": ["string", "number", "null"]}
}
}
},
"additionalProperties": false
},
"mac_address": {"type": "string"},
"network_mode": {"type": "string"},
"networks": {
"oneOf": [
{"$ref": "#/definitions/list_of_strings"},
{
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"oneOf": [
{
"type": "object",
"properties": {
"aliases": {"$ref": "#/definitions/list_of_strings"},
"driver_opts": {
"type": "object",
"patternProperties": {
"^.+$": { "type": ["string", "number"] }
}
},
"ipv4_address": {"type": "string"},
"ipv6_address": {"type": "string"}
},
"additionalProperties": false
},
{"type": "null"}
]
}
},
"additionalProperties": false
}
]
},
"pid": {"type": ["string", "null"]},
"ports": {
"type": "array",
"items": {
"oneOf": [
{"type": "number", "format": "ports"},
{"type": "string", "format": "ports"},
{
"type": "object",
"properties": {
"mode": {"type": "string"},
"target": {"type": "integer"},
"published": {"type": "integer"},
"protocol": {"type": "string"}
},
"additionalProperties": false
}
]
},
"uniqueItems": true
},
"privileged": {"type": "boolean"},
"read_only": {"type": "boolean"},
"restart": {"type": "string"},
"security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"shm_size": {"type": ["number", "string"]},
"secrets": {
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{
"type": "object",
"properties": {
"source": {"type": "string"},
"target": {"type": "string"},
"uid": {"type": "string"},
"gid": {"type": "string"},
"mode": {"type": "number"}
}
}
]
}
},
"sysctls": {"$ref": "#/definitions/list_or_dict"},
"stdin_open": {"type": "boolean"},
"stop_grace_period": {"type": "string", "format": "duration"},
"stop_signal": {"type": "string"},
"tmpfs": {"$ref": "#/definitions/string_or_list"},
"tty": {"type": "boolean"},
"ulimits": {
"type": "object",
"patternProperties": {
"^[a-z]+$": {
"oneOf": [
{"type": "integer"},
{
"type":"object",
"properties": {
"hard": {"type": "integer"},
"soft": {"type": "integer"}
},
"required": ["soft", "hard"],
"additionalProperties": false
}
]
}
}
},
"oom_score_adj": {"type": "integer"},
"user": {"type": "string"},
"userns_mode": {"type": "string"},
"volumes": {
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{
"type": "object",
"required": ["type"],
"properties": {
"type": {"type": "string"},
"source": {"type": "string"},
"target": {"type": "string"},
"read_only": {"type": "boolean"},
"consistency": {"type": "string"},
"bind": {
"type": "object",
"properties": {
"propagation": {"type": "string"}
}
},
"volume": {
"type": "object",
"properties": {
"nocopy": {"type": "boolean"}
}
},
"tmpfs": {
"type": "object",
"properties": {
"size": {
"type": "integer",
"minimum": 0
}
}
}
},
"additionalProperties": false
}
],
"uniqueItems": true
}
},
"working_dir": {"type": "string"}
},
"patternProperties": {"^x-": {}},
"additionalProperties": false
},
"healthcheck": {
"id": "#/definitions/healthcheck",
"type": "object",
"additionalProperties": false,
"properties": {
"disable": {"type": "boolean"},
"interval": {"type": "string", "format": "duration"},
"retries": {"type": "number"},
"test": {
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}}
]
},
"timeout": {"type": "string", "format": "duration"},
"start_period": {"type": "string", "format": "duration"},
"start_interval": {"type": "string", "format": "duration"}
}
},
"deployment": {
"id": "#/definitions/deployment",
"type": ["object", "null"],
"properties": {
"mode": {"type": "string"},
"endpoint_mode": {"type": "string"},
"replicas": {"type": "integer"},
"labels": {"$ref": "#/definitions/list_or_dict"},
"rollback_config": {
"type": "object",
"properties": {
"parallelism": {"type": "integer"},
"delay": {"type": "string", "format": "duration"},
"failure_action": {"type": "string"},
"monitor": {"type": "string", "format": "duration"},
"max_failure_ratio": {"type": "number"},
"order": {"type": "string", "enum": [
"start-first", "stop-first"
]}
},
"additionalProperties": false
},
"update_config": {
"type": "object",
"properties": {
"parallelism": {"type": "integer"},
"delay": {"type": "string", "format": "duration"},
"failure_action": {"type": "string"},
"monitor": {"type": "string", "format": "duration"},
"max_failure_ratio": {"type": "number"},
"order": {"type": "string", "enum": [
"start-first", "stop-first"
]}
},
"additionalProperties": false
},
"resources": {
"type": "object",
"properties": {
"limits": {
"type": "object",
"properties": {
"cpus": {"type": "string"},
"memory": {"type": "string"},
"pids": {"type": "integer"}
},
"additionalProperties": false
},
"reservations": {
"type": "object",
"properties": {
"cpus": {"type": "string"},
"memory": {"type": "string"},
"generic_resources": {"$ref": "#/definitions/generic_resources"}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"restart_policy": {
"type": "object",
"properties": {
"condition": {"type": "string"},
"delay": {"type": "string", "format": "duration"},
"max_attempts": {"type": "integer"},
"window": {"type": "string", "format": "duration"}
},
"additionalProperties": false
},
"placement": {
"type": "object",
"properties": {
"constraints": {"type": "array", "items": {"type": "string"}},
"preferences": {
"type": "array",
"items": {
"type": "object",
"properties": {
"spread": {"type": "string"}
},
"additionalProperties": false
}
},
"max_replicas_per_node": {"type": "integer"}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"generic_resources": {
"id": "#/definitions/generic_resources",
"type": "array",
"items": {
"type": "object",
"properties": {
"discrete_resource_spec": {
"type": "object",
"properties": {
"kind": {"type": "string"},
"value": {"type": "number"}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"network": {
"id": "#/definitions/network",
"type": ["object", "null"],
"properties": {
"name": {"type": "string"},
"driver": {"type": "string"},
"driver_opts": {
"type": "object",
"patternProperties": {
"^.+$": {"type": ["string", "number"]}
}
},
"ipam": {
"type": "object",
"properties": {
"driver": {"type": "string"},
"config": {
"type": "array",
"items": {
"type": "object",
"properties": {
"subnet": {"type": "string"}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"external": {
"type": ["boolean", "object"],
"properties": {
"name": {"type": "string"}
},
"additionalProperties": false
},
"internal": {"type": "boolean"},
"attachable": {"type": "boolean"},
"labels": {"$ref": "#/definitions/list_or_dict"}
},
"patternProperties": {"^x-": {}},
"additionalProperties": false
},
"volume": {
"id": "#/definitions/volume",
"type": ["object", "null"],
"properties": {
"name": {"type": "string"},
"driver": {"type": "string"},
"driver_opts": {
"type": "object",
"patternProperties": {
"^.+$": {"type": ["string", "number"]}
}
},
"external": {
"type": ["boolean", "object"],
"properties": {
"name": {"type": "string"}
},
"additionalProperties": false
},
"labels": {"$ref": "#/definitions/list_or_dict"},
"x-cluster-spec": {
"type": "object",
"properties": {
"group": {"type": "string"},
"access_mode": {
"type": "object",
"properties": {
"scope": {"type": "string"},
"sharing": {"type": "string"},
"block_volume": {"type": "object"},
"mount_volume": {
"type": "object",
"properties": {
"fs_type": {"type": "string"},
"mount_flags": {"type": "array", "items": {"type": "string"}}
}
}
}
},
"accessibility_requirements": {
"type": "object",
"properties": {
"requisite": {
"type": "array",
"items": {
"type": "object",
"properties": {
"segments": {"$ref": "#/definitions/list_or_dict"}
}
}
},
"preferred": {
"type": "array",
"items": {
"type": "object",
"properties": {
"segments": {"$ref": "#/definitions/list_or_dict"}
}
}
}
}
},
"capacity_range": {
"type": "object",
"properties": {
"required_bytes": {"type": "string"},
"limit_bytes": {"type": "string"}
}
},
"availability": {"type": "string"}
}
}
},
"patternProperties": {"^x-": {}},
"additionalProperties": false
},
"secret": {
"id": "#/definitions/secret",
"type": "object",
"properties": {
"name": {"type": "string"},
"file": {"type": "string"},
"external": {
"type": ["boolean", "object"],
"properties": {
"name": {"type": "string"}
}
},
"labels": {"$ref": "#/definitions/list_or_dict"},
"driver": {"type": "string"},
"driver_opts": {
"type": "object",
"patternProperties": {
"^.+$": {"type": ["string", "number"]}
}
},
"template_driver": {"type": "string"}
},
"patternProperties": {"^x-": {}},
"additionalProperties": false
},
"config": {
"id": "#/definitions/config",
"type": "object",
"properties": {
"name": {"type": "string"},
"file": {"type": "string"},
"external": {
"type": ["boolean", "object"],
"properties": {
"name": {"type": "string"}
}
},
"labels": {"$ref": "#/definitions/list_or_dict"},
"template_driver": {"type": "string"}
},
"patternProperties": {"^x-": {}},
"additionalProperties": false
},
"string_or_list": {
"oneOf": [
{"type": "string"},
{"$ref": "#/definitions/list_of_strings"}
]
},
"list_of_strings": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true
},
"list_or_dict": {
"oneOf": [
{
"type": "object",
"patternProperties": {
".+": {
"type": ["string", "number", "null"]
}
},
"additionalProperties": false
},
{"type": "array", "items": {"type": "string"}, "uniqueItems": true}
]
},
"constraints": {
"service": {
"id": "#/definitions/constraints/service",
"anyOf": [
{"required": ["build"]},
{"required": ["image"]}
],
"properties": {
"build": {
"required": ["context"]
}
}
}
}
}
}

View File

@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.19 //go:build go1.22
package schema package schema
@ -14,7 +14,7 @@ import (
) )
const ( const (
defaultVersion = "3.12" defaultVersion = "3.13"
versionField = "version" versionField = "version"
) )
@ -43,7 +43,7 @@ func init() {
} }
// Version returns the version of the config, defaulting to the latest "3.x" // Version returns the version of the config, defaulting to the latest "3.x"
// version (3.12). If only the major version "3" is specified, it is used as // version (3.13). If only the major version "3" is specified, it is used as
// version "3.x" and returns the default version (latest 3.x). // version "3.x" and returns the default version (latest 3.x).
func Version(config map[string]any) string { func Version(config map[string]any) string {
version, ok := config[versionField] version, ok := config[versionField]
@ -102,7 +102,7 @@ func getDescription(err validationError) string {
switch err.parent.Type() { switch err.parent.Type() {
case "invalid_type": case "invalid_type":
if expectedType, ok := err.parent.Details()["expected"].(string); ok { if expectedType, ok := err.parent.Details()["expected"].(string); ok {
return fmt.Sprintf("must be a %s", humanReadableType(expectedType)) return "must be a " + humanReadableType(expectedType)
} }
case jsonschemaOneOf, jsonschemaAnyOf: case jsonschemaOneOf, jsonschemaAnyOf:
if err.child == nil { if err.child == nil {

View File

@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.19 //go:build go1.22
package template package template
@ -48,7 +48,7 @@ type Mapping func(string) (string, bool)
// the substitution and an error. // the substitution and an error.
type SubstituteFunc func(string, Mapping) (string, bool, error) type SubstituteFunc func(string, Mapping) (string, bool, error)
// SubstituteWith subsitute variables in the string with their values. // SubstituteWith substitutes variables in the string with their values.
// It accepts additional substitute function. // It accepts additional substitute function.
func SubstituteWith(template string, mapping Mapping, pattern *regexp.Regexp, subsFuncs ...SubstituteFunc) (string, error) { func SubstituteWith(template string, mapping Mapping, pattern *regexp.Regexp, subsFuncs ...SubstituteFunc) (string, error) {
var err error var err error

View File

@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.19 //go:build go1.22
package types package types
@ -207,6 +207,7 @@ type ServiceConfig struct {
Tty bool `mapstructure:"tty" yaml:"tty,omitempty" json:"tty,omitempty"` Tty bool `mapstructure:"tty" yaml:"tty,omitempty" json:"tty,omitempty"`
Ulimits map[string]*UlimitsConfig `yaml:",omitempty" json:"ulimits,omitempty"` Ulimits map[string]*UlimitsConfig `yaml:",omitempty" json:"ulimits,omitempty"`
User string `yaml:",omitempty" json:"user,omitempty"` User string `yaml:",omitempty" json:"user,omitempty"`
OomScoreAdj int64 `yaml:",omitempty" json:"oom_score_adj,omitempty"`
UserNSMode string `mapstructure:"userns_mode" yaml:"userns_mode,omitempty" json:"userns_mode,omitempty"` UserNSMode string `mapstructure:"userns_mode" yaml:"userns_mode,omitempty" json:"userns_mode,omitempty"`
Volumes []ServiceVolumeConfig `yaml:",omitempty" json:"volumes,omitempty"` Volumes []ServiceVolumeConfig `yaml:",omitempty" json:"volumes,omitempty"`
WorkingDir string `mapstructure:"working_dir" yaml:"working_dir,omitempty" json:"working_dir,omitempty"` WorkingDir string `mapstructure:"working_dir" yaml:"working_dir,omitempty" json:"working_dir,omitempty"`
@ -374,9 +375,10 @@ type PlacementPreferences struct {
// ServiceNetworkConfig is the network configuration for a service // ServiceNetworkConfig is the network configuration for a service
type ServiceNetworkConfig struct { type ServiceNetworkConfig struct {
Aliases []string `yaml:",omitempty" json:"aliases,omitempty"` Aliases []string `yaml:",omitempty" json:"aliases,omitempty"`
Ipv4Address string `mapstructure:"ipv4_address" yaml:"ipv4_address,omitempty" json:"ipv4_address,omitempty"` DriverOpts map[string]string `mapstructure:"driver_opts" yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"`
Ipv6Address string `mapstructure:"ipv6_address" yaml:"ipv6_address,omitempty" json:"ipv6_address,omitempty"` Ipv4Address string `mapstructure:"ipv4_address" yaml:"ipv4_address,omitempty" json:"ipv4_address,omitempty"`
Ipv6Address string `mapstructure:"ipv6_address" yaml:"ipv6_address,omitempty" json:"ipv6_address,omitempty"`
} }
// ServicePortConfig is the port configuration for a service // ServicePortConfig is the port configuration for a service

View File

@ -2,6 +2,7 @@ package opts
import ( import (
"encoding/csv" "encoding/csv"
"errors"
"fmt" "fmt"
"os" "os"
"strconv" "strconv"
@ -68,7 +69,7 @@ func (o *ConfigOpt) Set(value string) error {
} }
if options.ConfigName == "" { if options.ConfigName == "" {
return fmt.Errorf("source is required") return errors.New("source is required")
} }
if options.File.Name == "" { if options.File.Name == "" {
options.File.Name = options.ConfigName options.File.Name = options.ConfigName

Some files were not shown because too many files have changed in this diff Show More