summaryrefslogtreecommitdiff
path: root/vendor/github.com
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-02-05 00:37:32 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-02-05 00:37:32 +0100
commit6960aecc25400320adee1b8802a86839326e15b6 (patch)
tree334f7ca9491080a5e6f9a9747da77281c4958ba2 /vendor/github.com
downloadhepi-6960aecc25400320adee1b8802a86839326e15b6.tar.gz
Engage!
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/go-faker/faker/v4/.gitignore23
-rw-r--r--vendor/github.com/go-faker/faker/v4/.golangci.bck.yaml53
-rw-r--r--vendor/github.com/go-faker/faker/v4/.golangci.yaml60
-rw-r--r--vendor/github.com/go-faker/faker/v4/LICENSE21
-rw-r--r--vendor/github.com/go-faker/faker/v4/Makefile44
-rw-r--r--vendor/github.com/go-faker/faker/v4/README.md111
-rw-r--r--vendor/github.com/go-faker/faker/v4/address.go149
-rw-r--r--vendor/github.com/go-faker/faker/v4/blood.go54
-rw-r--r--vendor/github.com/go-faker/faker/v4/datetime.go830
-rw-r--r--vendor/github.com/go-faker/faker/v4/faker.go1412
-rw-r--r--vendor/github.com/go-faker/faker/v4/internet.go302
-rw-r--r--vendor/github.com/go-faker/faker/v4/lorem.go142
-rw-r--r--vendor/github.com/go-faker/faker/v4/misc/addresses-us-1000.min.json1
-rw-r--r--vendor/github.com/go-faker/faker/v4/misc/country_info.json1754
-rw-r--r--vendor/github.com/go-faker/faker/v4/payment.go100
-rw-r--r--vendor/github.com/go-faker/faker/v4/person.go814
-rw-r--r--vendor/github.com/go-faker/faker/v4/phone.go97
-rw-r--r--vendor/github.com/go-faker/faker/v4/pkg/errors/generic.go36
-rw-r--r--vendor/github.com/go-faker/faker/v4/pkg/interfaces/language.go24
-rw-r--r--vendor/github.com/go-faker/faker/v4/pkg/interfaces/number.go18
-rw-r--r--vendor/github.com/go-faker/faker/v4/pkg/interfaces/type.go10
-rw-r--r--vendor/github.com/go-faker/faker/v4/pkg/options/options.go346
-rw-r--r--vendor/github.com/go-faker/faker/v4/pkg/slice/helpers.go41
-rw-r--r--vendor/github.com/go-faker/faker/v4/price.go107
-rw-r--r--vendor/github.com/go-faker/faker/v4/random_source.go49
-rw-r--r--vendor/github.com/go-faker/faker/v4/tag_argument_extractor.go189
-rw-r--r--vendor/github.com/go-faker/faker/v4/user_agent.go192
-rw-r--r--vendor/github.com/go-faker/faker/v4/uuid.go83
-rw-r--r--vendor/github.com/joho/godotenv/.gitignore1
-rw-r--r--vendor/github.com/joho/godotenv/LICENCE23
-rw-r--r--vendor/github.com/joho/godotenv/README.md202
-rw-r--r--vendor/github.com/joho/godotenv/godotenv.go228
-rw-r--r--vendor/github.com/joho/godotenv/parser.go271
-rw-r--r--vendor/github.com/mattn/go-colorable/LICENSE21
-rw-r--r--vendor/github.com/mattn/go-colorable/README.md48
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_others.go38
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_windows.go1047
-rw-r--r--vendor/github.com/mattn/go-colorable/go.test.sh12
-rw-r--r--vendor/github.com/mattn/go-colorable/noncolorable.go57
-rw-r--r--vendor/github.com/mattn/go-isatty/LICENSE9
-rw-r--r--vendor/github.com/mattn/go-isatty/README.md50
-rw-r--r--vendor/github.com/mattn/go-isatty/doc.go2
-rw-r--r--vendor/github.com/mattn/go-isatty/go.test.sh12
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_bsd.go20
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_others.go17
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_plan9.go23
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_solaris.go21
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_tcgets.go20
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_windows.go125
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/.gitignore21
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/.golangci.yml334
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/LICENSE21
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/README.md241
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/SECURITY.md14
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/SEGMENTIO_README.md76
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/ascii.go124
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/codec.go1183
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/decode.go1195
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/encode.go1054
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/json.go459
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/jsoncolor.go141
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/parse.go735
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/reflect.go20
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/reflect_optimize.go30
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/splash.pngbin0 -> 99137 bytes
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/terminal.go42
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/terminal_windows.go53
-rw-r--r--vendor/github.com/neilotoole/jsoncolor/token.go286
68 files changed, 15338 insertions, 0 deletions
diff --git a/vendor/github.com/go-faker/faker/v4/.gitignore b/vendor/github.com/go-faker/faker/v4/.gitignore
new file mode 100644
index 0000000..b36ea1d
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/.gitignore
@@ -0,0 +1,23 @@
+# Binaries for programs and plugins
+*.exe
+*.dll
+*.so
+*.dylib
+
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+cover.html
+.vscode/
+
+# generated file for Jetbrains Goland IDE
+.idea
+
+# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
+.glide/
+faker
+vendor/
+coverage.txt
+bin/ \ No newline at end of file
diff --git a/vendor/github.com/go-faker/faker/v4/.golangci.bck.yaml b/vendor/github.com/go-faker/faker/v4/.golangci.bck.yaml
new file mode 100644
index 0000000..e15388b
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/.golangci.bck.yaml
@@ -0,0 +1,53 @@
+linters-settings:
+ govet:
+ settings:
+ printf:
+ funcs:
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
+ gocyclo:
+ min-complexity: 70
+ dupl:
+ threshold: 100
+ goconst:
+ min-len: 2
+ min-occurrences: 5
+ misspell:
+ locale: US
+
+linters:
+ # please, do not use `enable-all`: it's deprecated and will be removed soon.
+ # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
+ disable-all: true
+ enable:
+ # - deadcode
+ - errcheck
+ - goconst
+ - gocyclo
+ - revive
+ - gosimple
+ - govet
+ - ineffassign
+ - misspell
+ - staticcheck
+ # - structcheck
+ - typecheck
+ - unconvert
+ - unparam
+ - unused
+ # - varcheck
+
+issues:
+ exclude-rules:
+ - path: person.go # since in the person.go there are so many names that may detected as misspell
+ linters:
+ - misspell
+ - path: datetime.go
+ linters:
+ - misspell
+ - path: .
+ text: "parameter 'v' seems to be unused"
+run:
+ timeout: 5m
diff --git a/vendor/github.com/go-faker/faker/v4/.golangci.yaml b/vendor/github.com/go-faker/faker/v4/.golangci.yaml
new file mode 100644
index 0000000..0b8124c
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/.golangci.yaml
@@ -0,0 +1,60 @@
+version: "2"
+linters:
+ default: none
+ enable:
+ - errcheck
+ - goconst
+ - gocyclo
+ - govet
+ - ineffassign
+ - misspell
+ - revive
+ - staticcheck
+ - unconvert
+ - unparam
+ - unused
+ settings:
+ dupl:
+ threshold: 100
+ goconst:
+ min-len: 2
+ min-occurrences: 5
+ gocyclo:
+ min-complexity: 70
+ govet:
+ settings:
+ printf:
+ funcs:
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
+ misspell:
+ locale: US
+ exclusions:
+ generated: lax
+ presets:
+ - comments
+ - common-false-positives
+ - legacy
+ - std-error-handling
+ rules:
+ - linters:
+ - misspell
+ path: person.go
+ - linters:
+ - misspell
+ path: datetime.go
+ - path: .
+ text: parameter 'v' seems to be unused
+ paths:
+ - third_party$
+ - builtin$
+ - examples$
+formatters:
+ exclusions:
+ generated: lax
+ paths:
+ - third_party$
+ - builtin$
+ - examples$
diff --git a/vendor/github.com/go-faker/faker/v4/LICENSE b/vendor/github.com/go-faker/faker/v4/LICENSE
new file mode 100644
index 0000000..9e00dcd
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Iman Tumorang
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/go-faker/faker/v4/Makefile b/vendor/github.com/go-faker/faker/v4/Makefile
new file mode 100644
index 0000000..176b5a8
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/Makefile
@@ -0,0 +1,44 @@
+
+# Exporting bin folder to the path for makefile
+export PATH := $(PWD)/bin:$(PATH)
+# Default Shell
+export SHELL := bash
+# Type of OS: Linux or Darwin.
+export OSTYPE := $(shell uname -s)
+
+ifeq ($(OSTYPE),Darwin)
+ export MallocNanoZone=0
+endif
+
+include ./misc/makefile/tools.Makefile
+
+build: test
+ @go build ./...
+
+install-deps: gotestsum tparse ## Install Development Dependencies (localy).
+deps: $(GOTESTSUM) $(TPARSE) ## Checks for Global Development Dependencies.
+deps:
+ @echo "Required Tools Are Available"
+
+TESTS_ARGS := --format testname --jsonfile gotestsum.json.out
+TESTS_ARGS += --max-fails 2
+TESTS_ARGS += -- ./...
+TESTS_ARGS += -test.parallel 2
+TESTS_ARGS += -test.count 1
+TESTS_ARGS += -test.failfast
+TESTS_ARGS += -test.coverprofile coverage.out
+TESTS_ARGS += -test.timeout 60s
+TESTS_ARGS += -race
+run-tests: $(GOTESTSUM)
+ @ gotestsum $(TESTS_ARGS) -short
+
+test: run-tests $(TPARSE) ## Run Tests & parse details
+ @cat gotestsum.json.out | $(TPARSE) -all -notests
+
+
+lint: $(GOLANGCI) ## Runs golangci-lint with predefined configuration
+ @echo "Applying linter"
+ golangci-lint version
+ golangci-lint run -c .golangci.yaml ./...
+
+.PHONY: lint lint-prepare clean build unittest \ No newline at end of file
diff --git a/vendor/github.com/go-faker/faker/v4/README.md b/vendor/github.com/go-faker/faker/v4/README.md
new file mode 100644
index 0000000..7e99336
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/README.md
@@ -0,0 +1,111 @@
+# Docs
+
+## [faker](#)
+
+Struct Data Fake Generator
+
+Faker will generate you a fake data based on your Struct.
+
+[![Go Test](https://github.com/go-faker/faker/actions/workflows/go.yml/badge.svg)](https://github.com/go-faker/faker/actions/workflows/go.yml)
+[![codecov](https://codecov.io/gh/go-faker/faker/branch/main/graph/badge.svg)](https://codecov.io/gh/go-faker/faker)
+[![Go Report Card](https://goreportcard.com/badge/github.com/go-faker/faker/v4)](https://goreportcard.com/report/github.com/go-faker/faker/v4)
+[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/go-faker/faker/blob/master/LICENSE)
+[![Go.Dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/go-faker/faker/v4?tab=doc)
+
+## Index
+
+- [Support](#support)
+- [Getting Started](#getting-started)
+- [Example](#example)
+- [Limitation](#limitation)
+- [Contribution](#contribution)
+
+## Support
+
+You can file an [Issue](https://github.com/go-faker/faker/issues/new).
+See documentation in [Go.Dev](https://pkg.go.dev/github.com/go-faker/faker/v4?tab=doc)
+
+## Getting Started
+
+#### Download
+
+```shell
+go get -u github.com/go-faker/faker/v4
+```
+
+# Example
+
+---
+
+- Using Struct's tag:
+ - [basic tags: example_with_tags_test.go](/example_with_tags_test.go)
+ - [length and bounds: example_with_tags_lenbounds_test.go](/example_with_tags_lenbounds_test.go)
+ - [language: example_with_tags_lang_test.go](/example_with_tags_lang_test.go)
+ - [unique: example_with_tags_unique_test.go](example_with_tags_unique_test.go)
+ - [slice length: example_with_tags_slicelength_test.go](example_with_tags_slicelength_test.go)
+- Custom Struct's tag (define your own faker data): [example_custom_faker_test.go](/example_custom_faker_test.go)
+- Without struct's tag: [example_without_tag_test.go](/example_without_tag_test.go)
+- Single Fake Data Function: [example_single_fake_data_test.go](/example_single_fake_data_test.go)
+- custom struct type providers : [example_custom_struct_test.go](/example_custom_struct_test.go)
+- large nested (& circular) struct with map & slice size limits & depth limitations : [example_with_limits_test.go](/example_with_limits_test.go)
+
+## DEMO
+
+---
+
+![Example to use Faker](https://cdn-images-1.medium.com/max/800/1*AkMbxngg7zfvtWiuvFb4Mg.gif)
+
+## Benchmark
+
+---
+
+Bench To Generate Fake Data
+
+#### Without Tag
+
+```bash
+BenchmarkFakerDataNOTTagged-4 500000 3049 ns/op 488 B/op 20 allocs/op
+```
+
+#### Using Tag
+
+```bash
+ BenchmarkFakerDataTagged-4 100000 17470 ns/op 380 B/op 26 allocs/op
+```
+
+### MUST KNOW
+
+---
+
+The Struct Field must be PUBLIC.<br>
+Support For :
+
+- pointer fields of any type
+- `int`, `int8`, `int16`, `int32` & `int64`
+- `uint`, `uint8`, `uint16`, `uint32` & `uint64`
+- `bool`
+- `string`
+- `float32`, `float64`
+- struct & nested struct
+- `slice` / `array` of any type
+- `map` of any key/value of supported types
+- custom struct types by registering a `StructTypeProvider` & implementing your own generator function. This can be used for redefined time, big.Rat, etc. See [example](faker_test.go#L2655) for usage.
+ - default `time.Time` provider is registered, you can override it by registering your own provider.
+
+## Limitation
+
+---
+
+Unfortunately this library has some limitation
+
+- It does not support private fields. Make sure your structs fields you intend to generate fake data for are public, it would otherwise trigger a panic. You can however omit fields using a tag skip `faker:"-"` on your private fields.
+- It does not support the `interface{}` data type. How could we generate anything without knowing its data type?
+- It does not support the `map[interface{}]interface{}`, `map[any_type]interface{}` & `map[interface{}]any_type` data types. Once again, we cannot generate values for an unknown data type.
+- Some extra custom types can be supported IF AND ONLY IF extended with [AddProvider()](https://github.com/go-faker/faker/blob/7473ac7d8d0440d24addac302c73e13c08895764/faker.go#L303) please see [example](example_custom_faker_test.go#L46)
+- The `oneof` tag currently only supports `string`, the `int` types, and both `float32` & `float64`. Further support is coming soon (i.e. hex numbers, etc). See [example](example_with_tags_test.go#L53) for usage.
+
+## Contribution
+
+---
+
+To contrib to this project, you can open a PR or an issue.
diff --git a/vendor/github.com/go-faker/faker/v4/address.go b/vendor/github.com/go-faker/faker/v4/address.go
new file mode 100644
index 0000000..7c3da38
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/address.go
@@ -0,0 +1,149 @@
+package faker
+
+import (
+ _ "embed"
+ "encoding/json"
+ "reflect"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+var (
+ //go:embed misc/addresses-us-1000.min.json
+ addressesUSBytes []byte
+ addressesUS []RealAddress
+
+ //go:embed misc/country_info.json
+ countriesBytes []byte
+ countries []CountryInfo
+)
+
+func init() {
+ data := struct {
+ Addresses []RealAddress `json:"addresses"`
+ Countries []CountryInfo `json:"countries"`
+ }{}
+ if err := json.Unmarshal(addressesUSBytes, &data); err != nil {
+ panic(err)
+ }
+ addressesUS = data.Addresses
+
+ if err := json.Unmarshal(countriesBytes, &data); err != nil {
+ panic(err)
+ }
+ countries = data.Countries
+}
+
+// GetAddress returns a new Addresser interface of Address
+func GetAddress() Addresser {
+ address := &Address{}
+ return address
+}
+
+// Addresser is logical layer for Address
+type Addresser interface {
+ Latitude(v reflect.Value) (interface{}, error)
+ Longitude(v reflect.Value) (interface{}, error)
+ RealWorld(v reflect.Value) (interface{}, error)
+ CountryInfo(v reflect.Value) (interface{}, error)
+}
+
+// Address struct
+type Address struct{}
+
+func (i Address) latitude() float32 {
+ return (rand.Float32() * 180) - 90
+}
+
+// Latitude sets latitude of the address
+func (i Address) Latitude(v reflect.Value) (interface{}, error) {
+ kind := v.Kind()
+ val := i.latitude()
+ if kind == reflect.Float32 {
+ return val, nil
+ }
+ return float64(val), nil
+}
+
+func (i Address) longitude() float32 {
+ return (rand.Float32() * 360) - 180
+}
+
+// Longitude sets longitude of the address
+func (i Address) Longitude(v reflect.Value) (interface{}, error) {
+ kind := v.Kind()
+ val := i.longitude()
+ if kind == reflect.Float32 {
+ return val, nil
+ }
+ return float64(val), nil
+}
+
+func (i Address) realWorld() RealAddress {
+ return addressesUS[rand.Intn(len(addressesUS))]
+}
+
+func (i Address) countryInfo() CountryInfo {
+ return countries[rand.Intn(len(countries))]
+}
+
+func (i Address) CountryInfo(_ reflect.Value) (interface{}, error) {
+ return i.countryInfo(), nil
+}
+
+// RealWorld sets real world address
+func (i Address) RealWorld(_ reflect.Value) (interface{}, error) {
+ return i.realWorld(), nil
+}
+
+// Longitude get fake longitude randomly
+func Longitude(opts ...options.OptionFunc) float64 {
+ return singleFakeData(LONGITUDE, func() interface{} {
+ address := Address{}
+ return float64(address.longitude())
+ }, opts...).(float64)
+}
+
+// Latitude get fake latitude randomly
+func Latitude(opts ...options.OptionFunc) float64 {
+ return singleFakeData(LATITUDE, func() interface{} {
+ address := Address{}
+ return float64(address.latitude())
+ }, opts...).(float64)
+}
+
+type RealCoordinates struct {
+ Latitude float64 `json:"lat"`
+ Longitude float64 `json:"lng"`
+}
+
+type RealAddress struct {
+ Address string `json:"address1"`
+ City string `json:"city"`
+ State string `json:"state"`
+ PostalCode string `json:"postalCode"`
+ Coordinates RealCoordinates `json:"coordinates"`
+}
+
+// GetRealAddress get real world address randomly
+func GetRealAddress(opts ...options.OptionFunc) RealAddress {
+ return singleFakeData(RealAddressTag, func() interface{} {
+ address := Address{}
+ return address.realWorld()
+ }, opts...).(RealAddress)
+}
+
+type CountryInfo struct {
+ Abbr string `json:"abbr"`
+ Name string `json:"name"`
+ Capital string `json:"capital"`
+ Population string `json:"population"`
+ Continent string `json:"continent"`
+}
+
+func GetCountryInfo(opts ...options.OptionFunc) CountryInfo {
+ return singleFakeData(CountryInfoTag, func() interface{} {
+ address := Address{}
+ return address.countryInfo()
+ }, opts...).(CountryInfo)
+}
diff --git a/vendor/github.com/go-faker/faker/v4/blood.go b/vendor/github.com/go-faker/faker/v4/blood.go
new file mode 100644
index 0000000..feb80ec
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/blood.go
@@ -0,0 +1,54 @@
+package faker
+
+import (
+ "fmt"
+ "reflect"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+var bloodTypes = []string{"O", "A", "B", "AB"}
+var bloodRhFactors = []string{"+", "-"}
+
+func GetBlood(opts ...options.OptionFunc) Blooder {
+ opt := options.BuildOptions(opts)
+ db := &Blood{
+ fakerOption: *opt,
+ }
+ return db
+}
+
+type Blooder interface {
+ BloodType(v reflect.Value) (interface{}, error)
+ BloodRHFactor(v reflect.Value) (interface{}, error)
+ BloodGroup(v reflect.Value) (interface{}, error)
+}
+
+// Internet struct
+type Blood struct {
+ fakerOption options.Options
+}
+
+func (b Blood) bloodType() string {
+ return randomElementFromSliceString(bloodTypes)
+}
+
+func (b Blood) BloodType(v reflect.Value) (interface{}, error) {
+ return b.bloodType(), nil
+}
+
+func (b Blood) bloodRhFactor() string {
+ return randomElementFromSliceString(bloodRhFactors)
+}
+
+func (b Blood) BloodRHFactor(v reflect.Value) (interface{}, error) {
+ return b.bloodRhFactor(), nil
+}
+
+func (b Blood) bloodGroup() string {
+ return fmt.Sprintf("%s%s", b.bloodType(), b.bloodRhFactor())
+}
+
+func (b Blood) BloodGroup(v reflect.Value) (interface{}, error) {
+ return b.bloodGroup(), nil
+}
diff --git a/vendor/github.com/go-faker/faker/v4/datetime.go b/vendor/github.com/go-faker/faker/v4/datetime.go
new file mode 100644
index 0000000..e71d334
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/datetime.go
@@ -0,0 +1,830 @@
+package faker
+
+import (
+ "fmt"
+ "reflect"
+ "time"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+var century = []string{"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX", "XXI"}
+var timezones = []string{
+ "Australia/Adelaide",
+ "Australia/Broken_Hill",
+ "Australia/South",
+ "Australia/Yancowinna",
+ "Australia/Darwin",
+ "Australia/North",
+ "America/Eirunepe",
+ "America/Porto_Acre",
+ "America/Rio_Branco",
+ "Brazil/Acre",
+ "Australia/Eucla",
+ "Australia/ACT",
+ "Australia/Canberra",
+ "Australia/Currie",
+ "Australia/Hobart",
+ "Australia/Melbourne",
+ "Australia/NSW",
+ "Australia/Sydney",
+ "Australia/Tasmania",
+ "Australia/Victoria",
+ "Australia/Brisbane",
+ "Australia/Lindeman",
+ "Australia/Queensland",
+ "Asia/Kabul",
+ "America/Anchorage",
+ "America/Juneau",
+ "America/Nome",
+ "America/Sitka",
+ "America/Yakutat",
+ "US/Alaska",
+ "Asia/Almaty",
+ "America/Boa_Vista",
+ "America/Campo_Grande",
+ "America/Cuiaba",
+ "America/Manaus",
+ "America/Porto_Velho",
+ "Asia/Yerevan",
+ "Brazil/West",
+ "Asia/Anadyr",
+ "Asia/Aqtau",
+ "Asia/Aqtobe",
+ "America/Argentina/Buenos_Aires",
+ "America/Argentina/Catamarca",
+ "America/Argentina/ComodRivadavia",
+ "America/Argentina/Cordoba",
+ "America/Argentina/Jujuy",
+ "America/Argentina/La_Rioja",
+ "America/Argentina/Mendoza",
+ "America/Argentina/Rio_Gallegos",
+ "America/Argentina/Salta",
+ "America/Argentina/San_Juan",
+ "America/Argentina/San_Luis",
+ "America/Argentina/Tucuman",
+ "America/Argentina/Ushuaia",
+ "America/Buenos_Aires",
+ "America/Catamarca",
+ "America/Cordoba",
+ "America/Jujuy",
+ "America/Mendoza",
+ "America/Rosario",
+ "America/Anguilla",
+ "America/Antigua",
+ "America/Aruba",
+ "America/Barbados",
+ "America/Blanc-Sablon",
+ "America/Curacao",
+ "America/Dominica",
+ "America/Glace_Bay",
+ "America/Goose_Bay",
+ "America/Grand_Turk",
+ "America/Grenada",
+ "America/Guadeloupe",
+ "America/Halifax",
+ "America/Kralendijk",
+ "America/Lower_Princes",
+ "America/Marigot",
+ "America/Martinique",
+ "America/Moncton",
+ "America/Montserrat",
+ "America/Port_of_Spain",
+ "America/Puerto_Rico",
+ "America/Santo_Domingo",
+ "America/St_Barthelemy",
+ "America/St_Kitts",
+ "America/St_Lucia",
+ "America/St_Thomas",
+ "America/St_Vincent",
+ "America/Thule",
+ "America/Tortola",
+ "America/Virgin",
+ "Asia/Aden",
+ "Asia/Baghdad",
+ "Asia/Bahrain",
+ "Asia/Kuwait",
+ "Asia/Qatar",
+ "Asia/Riyadh",
+ "Atlantic/Bermuda",
+ "Canada/Atlantic",
+ "Antarctica/Casey",
+ "Australia/Perth",
+ "Australia/West",
+ "Atlantic/Azores",
+ "Asia/Baku",
+ "Asia/Dacca",
+ "Asia/Dhaka",
+ "Asia/Brunei",
+ "America/La_Paz",
+ "America/Araguaina",
+ "America/Bahia",
+ "America/Belem",
+ "America/Fortaleza",
+ "America/Maceio",
+ "America/Recife",
+ "America/Santarem",
+ "America/Sao_Paulo",
+ "Brazil/East",
+ "Pacific/Bougainville",
+ "Asia/Thimbu",
+ "Asia/Thimphu",
+ "Africa/Blantyre",
+ "Africa/Bujumbura",
+ "Africa/Gaborone",
+ "Africa/Harare",
+ "Africa/Kigali",
+ "Africa/Lubumbashi",
+ "Africa/Lusaka",
+ "Africa/Maputo",
+ "Indian/Cocos",
+ "Africa/Algiers",
+ "Africa/Ceuta",
+ "Africa/Tunis",
+ "Arctic/Longyearbyen",
+ "Atlantic/Jan_Mayen",
+ "CET",
+ "Europe/Amsterdam",
+ "Europe/Andorra",
+ "Europe/Belgrade",
+ "Europe/Berlin",
+ "Europe/Bratislava",
+ "Europe/Brussels",
+ "Europe/Budapest",
+ "Europe/Busingen",
+ "Europe/Copenhagen",
+ "Europe/Gibraltar",
+ "Europe/Ljubljana",
+ "Europe/Luxembourg",
+ "Europe/Madrid",
+ "Europe/Malta",
+ "Europe/Monaco",
+ "Europe/Oslo",
+ "Europe/Paris",
+ "Europe/Podgorica",
+ "Europe/Prague",
+ "Europe/Rome",
+ "Europe/San_Marino",
+ "Europe/Sarajevo",
+ "Europe/Skopje",
+ "Europe/Stockholm",
+ "Europe/Tirane",
+ "Europe/Vaduz",
+ "Europe/Vatican",
+ "Europe/Vienna",
+ "Europe/Warsaw",
+ "Europe/Zagreb",
+ "Europe/Zurich",
+ "Poland",
+ "NZ-CHAT",
+ "Pacific/Chatham",
+ "Asia/Choibalsan",
+ "Pacific/Chuuk",
+ "Pacific/Truk",
+ "Pacific/Yap",
+ "Pacific/Rarotonga",
+ "America/Santiago",
+ "Antarctica/Palmer",
+ "Chile/Continental",
+ "America/Bogota",
+ "America/Bahia_Banderas",
+ "America/Belize",
+ "America/Chicago",
+ "America/Costa_Rica",
+ "America/El_Salvador",
+ "America/Guatemala",
+ "America/Havana",
+ "America/Indiana/Knox",
+ "America/Indiana/Tell_City",
+ "America/Knox_IN",
+ "America/Managua",
+ "America/Matamoros",
+ "America/Menominee",
+ "America/Merida",
+ "America/Mexico_City",
+ "America/Monterrey",
+ "America/North_Dakota/Beulah",
+ "America/North_Dakota/Center",
+ "America/North_Dakota/New_Salem",
+ "America/Rainy_River",
+ "America/Rankin_Inlet",
+ "America/Regina",
+ "America/Resolute",
+ "America/Swift_Current",
+ "America/Tegucigalpa",
+ "America/Winnipeg",
+ "Asia/Chongqing",
+ "Asia/Chungking",
+ "Asia/Harbin",
+ "Asia/Macao",
+ "Asia/Macau",
+ "Asia/Shanghai",
+ "Asia/Taipei",
+ "CST6CDT",
+ "Canada/Central",
+ "Canada/Saskatchewan",
+ "Cuba",
+ "Mexico/General",
+ "PRC",
+ "ROC",
+ "US/Central",
+ "US/Indiana-Starke",
+ "Atlantic/Cape_Verde",
+ "Indian/Christmas",
+ "Pacific/Guam",
+ "Pacific/Saipan",
+ "Antarctica/Davis",
+ "Antarctica/DumontDUrville",
+ "Chile/EasterIsland",
+ "Pacific/Easter",
+ "Africa/Asmara",
+ "Africa/Asmera",
+ "Africa/Dar_es_Salaam",
+ "Africa/Djibouti",
+ "Africa/Juba",
+ "Africa/Kampala",
+ "Africa/Khartoum",
+ "Africa/Mogadishu",
+ "Africa/Nairobi",
+ "Indian/Antananarivo",
+ "Indian/Comoro",
+ "Indian/Mayotte",
+ "America/Guayaquil",
+ "Africa/Cairo",
+ "Africa/Tripoli",
+ "Asia/Amman",
+ "Asia/Beirut",
+ "Asia/Damascus",
+ "Asia/Gaza",
+ "Asia/Hebron",
+ "Asia/Istanbul",
+ "Asia/Nicosia",
+ "EET",
+ "Egypt",
+ "Europe/Athens",
+ "Europe/Bucharest",
+ "Europe/Chisinau",
+ "Europe/Helsinki",
+ "Europe/Istanbul",
+ "Europe/Kaliningrad",
+ "Europe/Kiev",
+ "Europe/Mariehamn",
+ "Europe/Nicosia",
+ "Europe/Riga",
+ "Europe/Sofia",
+ "Europe/Tallinn",
+ "Europe/Tiraspol",
+ "Europe/Uzhgorod",
+ "Europe/Vilnius",
+ "Europe/Zaporozhye",
+ "Libya",
+ "Turkey",
+ "America/Scoresbysund",
+ "America/Atikokan",
+ "America/Cancun",
+ "America/Cayman",
+ "America/Coral_Harbour",
+ "America/Detroit",
+ "America/Fort_Wayne",
+ "America/Indiana/Indianapolis",
+ "America/Indiana/Marengo",
+ "America/Indiana/Petersburg",
+ "America/Indiana/Vevay",
+ "America/Indiana/Vincennes",
+ "America/Indiana/Winamac",
+ "America/Indianapolis",
+ "America/Iqaluit",
+ "America/Jamaica",
+ "America/Kentucky/Louisville",
+ "America/Kentucky/Monticello",
+ "America/Louisville",
+ "America/Montreal",
+ "America/Nassau",
+ "America/New_York",
+ "America/Nipigon",
+ "America/Panama",
+ "America/Pangnirtung",
+ "America/Port-au-Prince",
+ "America/Thunder_Bay",
+ "America/Toronto",
+ "Canada/Eastern",
+ "EST",
+ "EST5EDT",
+ "Jamaica",
+ "US/East-Indiana",
+ "US/Eastern",
+ "US/Michigan",
+ "Pacific/Fiji",
+ "Atlantic/Stanley",
+ "America/Noronha",
+ "Brazil/DeNoronha",
+ "Pacific/Galapagos",
+ "Pacific/Gambier",
+ "Asia/Tbilisi",
+ "America/Cayenne",
+ "Pacific/Tarawa",
+ "Africa/Abidjan",
+ "Africa/Accra",
+ "Africa/Bamako",
+ "Africa/Banjul",
+ "Africa/Bissau",
+ "Africa/Conakry",
+ "Africa/Dakar",
+ "Africa/Freetown",
+ "Africa/Lome",
+ "Africa/Monrovia",
+ "Africa/Nouakchott",
+ "Africa/Ouagadougou",
+ "Africa/Sao_Tome",
+ "Africa/Timbuktu",
+ "America/Danmarkshavn",
+ "Atlantic/Reykjavik",
+ "Atlantic/St_Helena",
+ "Eire",
+ "Etc/GMT",
+ "Etc/GMT+0",
+ "Etc/GMT-0",
+ "Etc/GMT0",
+ "Etc/Greenwich",
+ "Europe/Belfast",
+ "Europe/Dublin",
+ "Europe/Guernsey",
+ "Europe/Isle_of_Man",
+ "Europe/Jersey",
+ "Europe/London",
+ "GB",
+ "GB-Eire",
+ "GMT",
+ "GMT+0",
+ "GMT-0",
+ "GMT0",
+ "Greenwich",
+ "Iceland",
+ "Etc/GMT+1",
+ "Etc/GMT+10",
+ "Etc/GMT+11",
+ "Etc/GMT+12",
+ "Etc/GMT+2",
+ "Etc/GMT+3",
+ "Etc/GMT+4",
+ "Etc/GMT+5",
+ "Etc/GMT+6",
+ "Etc/GMT+7",
+ "Etc/GMT+8",
+ "Etc/GMT+9",
+ "Etc/GMT-1",
+ "Etc/GMT-10",
+ "Etc/GMT-11",
+ "Etc/GMT-12",
+ "Etc/GMT-13",
+ "Etc/GMT-14",
+ "Etc/GMT-2",
+ "Etc/GMT-3",
+ "Etc/GMT-4",
+ "Etc/GMT-5",
+ "Etc/GMT-6",
+ "Etc/GMT-7",
+ "Etc/GMT-8",
+ "Etc/GMT-9",
+ "Asia/Dubai",
+ "Asia/Muscat",
+ "Atlantic/South_Georgia",
+ "America/Guyana",
+ "Asia/Hong_Kong",
+ "Hongkong",
+ "Asia/Hovd",
+ "America/Adak",
+ "America/Atka",
+ "HST",
+ "Pacific/Honolulu",
+ "Pacific/Johnston",
+ "US/Aleutian",
+ "US/Hawaii",
+ "Asia/Bangkok",
+ "Asia/Ho_Chi_Minh",
+ "Asia/Phnom_Penh",
+ "Asia/Saigon",
+ "Asia/Vientiane",
+ "Indian/Chagos",
+ "Asia/Chita",
+ "Asia/Irkutsk",
+ "Asia/Tehran",
+ "Iran",
+ "Asia/Calcutta",
+ "Asia/Colombo",
+ "Asia/Jerusalem",
+ "Asia/Kolkata",
+ "Asia/Tel_Aviv",
+ "Israel",
+ "Asia/Tokyo",
+ "Japan",
+ "Asia/Bishkek",
+ "Pacific/Kosrae",
+ "Asia/Krasnoyarsk",
+ "Asia/Novokuznetsk",
+ "Asia/Pyongyang",
+ "Asia/Seoul",
+ "ROK",
+ "Australia/LHI",
+ "Australia/Lord_Howe",
+ "Pacific/Kiritimati",
+ "Asia/Magadan",
+ "Pacific/Marquesas",
+ "Antarctica/Mawson",
+ "MET",
+ "Kwajalein",
+ "Pacific/Kwajalein",
+ "Pacific/Majuro",
+ "Antarctica/Macquarie",
+ "Asia/Rangoon",
+ "Europe/Minsk",
+ "Europe/Moscow",
+ "Europe/Simferopol",
+ "Europe/Volgograd",
+ "W-SU",
+ "America/Boise",
+ "America/Cambridge_Bay",
+ "America/Chihuahua",
+ "America/Creston",
+ "America/Dawson_Creek",
+ "America/Denver",
+ "America/Edmonton",
+ "America/Fort_Nelson",
+ "America/Hermosillo",
+ "America/Inuvik",
+ "America/Mazatlan",
+ "America/Ojinaga",
+ "America/Phoenix",
+ "America/Shiprock",
+ "America/Yellowknife",
+ "Canada/Mountain",
+ "MST",
+ "MST7MDT",
+ "Mexico/BajaSur",
+ "Navajo",
+ "US/Arizona",
+ "US/Mountain",
+ "Indian/Mauritius",
+ "Indian/Maldives",
+ "Asia/Kuala_Lumpur",
+ "Asia/Kuching",
+ "Pacific/Noumea",
+ "Pacific/Norfolk",
+ "Asia/Novosibirsk",
+ "Asia/Kathmandu",
+ "Asia/Katmandu",
+ "Pacific/Nauru",
+ "America/St_Johns",
+ "Canada/Newfoundland",
+ "Pacific/Niue",
+ "Antarctica/McMurdo",
+ "Antarctica/South_Pole",
+ "NZ",
+ "Pacific/Auckland",
+ "Asia/Omsk",
+ "Asia/Oral",
+ "America/Lima",
+ "Asia/Kamchatka",
+ "Pacific/Port_Moresby",
+ "Pacific/Enderbury",
+ "Asia/Manila",
+ "Asia/Karachi",
+ "America/Miquelon",
+ "Pacific/Pohnpei",
+ "Pacific/Ponape",
+ "America/Dawson",
+ "America/Ensenada",
+ "America/Los_Angeles",
+ "America/Metlakatla",
+ "America/Santa_Isabel",
+ "America/Tijuana",
+ "America/Vancouver",
+ "America/Whitehorse",
+ "Canada/Pacific",
+ "Canada/Yukon",
+ "Mexico/BajaNorte",
+ "PST8PDT",
+ "Pacific/Pitcairn",
+ "US/Pacific",
+ "Pacific/Palau",
+ "America/Asuncion",
+ "Asia/Qyzylorda",
+ "Indian/Reunion",
+ "Antarctica/Rothera",
+ "Asia/Sakhalin",
+ "Europe/Samara",
+ "Africa/Johannesburg",
+ "Africa/Maseru",
+ "Africa/Mbabane",
+ "Pacific/Guadalcanal",
+ "Indian/Mahe",
+ "Asia/Singapore",
+ "Singapore",
+ "Asia/Srednekolymsk",
+ "America/Paramaribo",
+ "Pacific/Midway",
+ "Pacific/Pago_Pago",
+ "Pacific/Samoa",
+ "US/Samoa",
+ "Antarctica/Syowa",
+ "Pacific/Tahiti",
+ "Indian/Kerguelen",
+ "Asia/Dushanbe",
+ "Pacific/Fakaofo",
+ "Asia/Dili",
+ "Asia/Ashgabat",
+ "Asia/Ashkhabad",
+ "Pacific/Tongatapu",
+ "Pacific/Funafuti",
+ "Etc/UCT",
+ "UCT",
+ "Asia/Ulaanbaatar",
+ "Asia/Ulan_Bator",
+ "Antarctica/Troll",
+ "Etc/UTC",
+ "Etc/Universal",
+ "Etc/Zulu",
+ "UTC",
+ "Universal",
+ "Zulu",
+ "America/Montevideo",
+ "Asia/Samarkand",
+ "Asia/Tashkent",
+ "America/Caracas",
+ "Asia/Ust-Nera",
+ "Asia/Vladivostok",
+ "Antarctica/Vostok",
+ "Pacific/Efate",
+ "Pacific/Wake",
+ "Africa/Windhoek",
+ "Africa/Bangui",
+ "Africa/Brazzaville",
+ "Africa/Douala",
+ "Africa/Kinshasa",
+ "Africa/Lagos",
+ "Africa/Libreville",
+ "Africa/Luanda",
+ "Africa/Malabo",
+ "Africa/Ndjamena",
+ "Africa/Niamey",
+ "Africa/Porto-Novo",
+ "Africa/Casablanca",
+ "Africa/El_Aaiun",
+ "Atlantic/Canary",
+ "Atlantic/Faeroe",
+ "Atlantic/Faroe",
+ "Atlantic/Madeira",
+ "Europe/Lisbon",
+ "Portugal",
+ "WET",
+ "Pacific/Wallis",
+ "America/Godthab",
+ "Asia/Jakarta",
+ "Asia/Pontianak",
+ "Asia/Jayapura",
+ "Asia/Makassar",
+ "Asia/Ujung_Pandang",
+ "Pacific/Apia",
+ "Asia/Kashgar",
+ "Asia/Urumqi",
+ "Asia/Khandyga",
+ "Asia/Yakutsk",
+ "Asia/Yekaterinburg",
+}
+
+// These example values must use the reference time "Mon Jan 2 15:04:05 MST 2006"
+// as described at https://gobyexample.com/time-formatting-parsing
+const (
+ BaseDateFormat = "2006-01-02"
+ TimeFormat = "15:04:05"
+ MonthFormat = "January"
+ YearFormat = "2006"
+ DayFormat = "Monday"
+ DayOfMonthFormat = "_2"
+ TimePeriodFormat = "PM"
+)
+
+// A DateTimer contains random Time generators, returning time string in certain particular format
+type DateTimer interface {
+ UnixTime(v reflect.Value) (interface{}, error)
+ Date(v reflect.Value) (interface{}, error)
+ Time(v reflect.Value) (interface{}, error)
+ MonthName(v reflect.Value) (interface{}, error)
+ Year(v reflect.Value) (interface{}, error)
+ DayOfWeek(v reflect.Value) (interface{}, error)
+ DayOfMonth(v reflect.Value) (interface{}, error)
+ Timestamp(v reflect.Value) (interface{}, error)
+ Century(v reflect.Value) (interface{}, error)
+ TimeZone(v reflect.Value) (interface{}, error)
+ TimePeriod(v reflect.Value) (interface{}, error)
+}
+
+// GetDateTimer returns a new DateTimer interface of DateTime
+func GetDateTimer() DateTimer {
+ date := &DateTime{}
+ return date
+}
+
+// DateTime struct
+type DateTime struct {
+}
+
+func (d DateTime) unixtime() int64 {
+ return RandomUnixTime()
+}
+
+// UnixTime get unix time
+func (d DateTime) UnixTime(v reflect.Value) (interface{}, error) {
+ kind := v.Kind()
+ var val int64
+ if kind == reflect.Int64 {
+ val = d.unixtime()
+ } else {
+ val = 0
+ }
+
+ return val, nil
+}
+
+// UnixTime get unix time randomly
+func UnixTime(opts ...options.OptionFunc) int64 {
+ return singleFakeData(UnixTimeTag, func() interface{} {
+ datetime := DateTime{}
+ return datetime.unixtime()
+ }, opts...).(int64)
+}
+
+func (d DateTime) date() string {
+ return time.Unix(RandomUnixTime(), 0).Format(BaseDateFormat)
+}
+
+// Date formats DateTime using example BaseDateFormat const
+func (d DateTime) Date(v reflect.Value) (interface{}, error) {
+ return d.date(), nil
+}
+
+// Date get fake date in string randomly
+func Date(opts ...options.OptionFunc) string {
+ return singleFakeData(DATE, func() interface{} {
+ datetime := DateTime{}
+ return datetime.date()
+ }, opts...).(string)
+}
+
+func (d DateTime) time() string {
+ return time.Unix(RandomUnixTime(), 0).Format(TimeFormat)
+}
+
+// Time formats DateTime using example Time const
+func (d DateTime) Time(v reflect.Value) (interface{}, error) {
+ return d.time(), nil
+}
+
+// TimeString get time randomly in string format
+func TimeString(opts ...options.OptionFunc) string {
+ return singleFakeData(TIME, func() interface{} {
+ datetime := DateTime{}
+ return datetime.time()
+ }, opts...).(string)
+}
+
+func (d DateTime) monthName() string {
+ return time.Unix(RandomUnixTime(), 0).Format(MonthFormat)
+}
+
+// MonthName formats DateTime using example Month const
+func (d DateTime) MonthName(v reflect.Value) (interface{}, error) {
+ return d.monthName(), nil
+}
+
+// MonthName get month name randomly in string format
+func MonthName(opts ...options.OptionFunc) string {
+ return singleFakeData(MonthNameTag, func() interface{} {
+ datetime := DateTime{}
+ return datetime.monthName()
+ }, opts...).(string)
+}
+
+func (d DateTime) year() string {
+ return time.Unix(RandomUnixTime(), 0).Format(YearFormat)
+}
+
+// Year formats DateTime using example Year const
+func (d DateTime) Year(v reflect.Value) (interface{}, error) {
+ return d.year(), nil
+}
+
+// YearString get year randomly in string format
+func YearString(opts ...options.OptionFunc) string {
+ return singleFakeData(YEAR, func() interface{} {
+ datetime := DateTime{}
+ return datetime.year()
+ }, opts...).(string)
+}
+
+func (d DateTime) dayOfWeek() string {
+ return time.Unix(RandomUnixTime(), 0).Format(DayFormat)
+}
+
+// DayOfWeek formats DateTime using example Day const
+func (d DateTime) DayOfWeek(v reflect.Value) (interface{}, error) {
+ return d.dayOfWeek(), nil
+}
+
+// DayOfWeek get day of week randomly in string format
+func DayOfWeek(opts ...options.OptionFunc) string {
+ return singleFakeData(DayOfWeekTag, func() interface{} {
+ datetime := DateTime{}
+ return datetime.dayOfWeek()
+ }, opts...).(string)
+}
+
+func (d DateTime) dayOfMonth() string {
+ return time.Unix(RandomUnixTime(), 0).Format(DayOfMonthFormat)
+}
+
+// DayOfMonth formats DateTime using example DayOfMonth const
+func (d DateTime) DayOfMonth(v reflect.Value) (interface{}, error) {
+ return d.dayOfMonth(), nil
+}
+
+// DayOfMonth get month randomly in string format
+func DayOfMonth(opts ...options.OptionFunc) string {
+ return singleFakeData(DayOfMonthTag, func() interface{} {
+ datetime := DateTime{}
+ return datetime.dayOfMonth()
+ }, opts...).(string)
+}
+
+func (d DateTime) timestamp() string {
+ return time.Unix(RandomUnixTime(), 0).Format(fmt.Sprintf("%s %s", BaseDateFormat, TimeFormat))
+}
+
+// Timestamp formats DateTime using example Timestamp const
+func (d DateTime) Timestamp(v reflect.Value) (interface{}, error) {
+ return d.timestamp(), nil
+}
+
+// Timestamp get timestamp randomly in string format: 2006-01-02 15:04:05
+func Timestamp(opts ...options.OptionFunc) string {
+ return singleFakeData(TIMESTAMP, func() interface{} {
+ datetime := DateTime{}
+ return datetime.timestamp()
+ }, opts...).(string)
+}
+
+func (d DateTime) century() string {
+ return randomElementFromSliceString(century)
+}
+
+// Century returns a random century
+func (d DateTime) Century(v reflect.Value) (interface{}, error) {
+ return d.century(), nil
+}
+
+// Century get century randomly in string
+func Century(opts ...options.OptionFunc) string {
+ return singleFakeData(CENTURY, func() interface{} {
+ datetime := DateTime{}
+ return datetime.century()
+ }, opts...).(string)
+}
+
+func (d DateTime) timezone() string {
+ return randomElementFromSliceString(timezones)
+}
+
+// TimeZone returns a random timezone
+func (d DateTime) TimeZone(v reflect.Value) (interface{}, error) {
+ return d.timezone(), nil
+}
+
+// Timezone get timezone randomly in string
+func Timezone(opts ...options.OptionFunc) string {
+ return singleFakeData(TIMEZONE, func() interface{} {
+ datetime := DateTime{}
+ return datetime.timezone()
+ }, opts...).(string)
+}
+
+func (d DateTime) period() string {
+ return time.Unix(RandomUnixTime(), 0).Format(TimePeriodFormat)
+}
+
+// TimePeriod formats DateTime using example TimePeriod const
+func (d DateTime) TimePeriod(v reflect.Value) (interface{}, error) {
+ return d.period(), nil
+}
+
+// Timeperiod get timeperiod randomly in string (AM/PM)
+func Timeperiod(opts ...options.OptionFunc) string {
+ return singleFakeData(TimePeriodTag, func() interface{} {
+ datetime := DateTime{}
+ return datetime.period()
+ }, opts...).(string)
+}
+
+// RandomUnixTime is a helper function returning random Unix time
+func RandomUnixTime() int64 {
+ return rand.Int63n(time.Now().Unix())
+}
diff --git a/vendor/github.com/go-faker/faker/v4/faker.go b/vendor/github.com/go-faker/faker/v4/faker.go
new file mode 100644
index 0000000..a4f66f4
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/faker.go
@@ -0,0 +1,1412 @@
+package faker
+
+// Faker is a simple fake data generator for your own struct.
+// Save your time, and Fake your data for your testing now.
+import (
+ cryptorand "crypto/rand"
+ "errors"
+ "fmt"
+ mathrand "math/rand"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+ "sync"
+ "time"
+
+ fakerErrors "github.com/go-faker/faker/v4/pkg/errors"
+ "github.com/go-faker/faker/v4/pkg/interfaces"
+ "github.com/go-faker/faker/v4/pkg/options"
+ "github.com/go-faker/faker/v4/pkg/slice"
+)
+
+var (
+ // Unique values are kept in memory so the generator retries if the value already exists
+ uniqueValues = &sync.Map{}
+)
+
+// Supported tags
+const (
+ letterIdxBits = 6 // 6 bits to represent a letter index
+ letterIdxMask = 1<<letterIdxBits - 1 // All 1-bits, as many as letterIdxBits
+ letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits
+ maxRetry = 10000 // max number of retry for unique values
+ keep = "keep"
+ unique = "unique"
+ ID = "uuid_digit"
+ HyphenatedID = "uuid_hyphenated"
+ EmailTag = "email"
+ MacAddressTag = "mac_address"
+ DomainNameTag = "domain_name"
+ UserNameTag = "username"
+ URLTag = "url"
+ IPV4Tag = "ipv4"
+ IPV6Tag = "ipv6"
+ PASSWORD = "password"
+ JWT = "jwt"
+ LATITUDE = "lat"
+ LONGITUDE = "long"
+ RealAddressTag = "real_address"
+ CreditCardNumber = "cc_number"
+ CreditCardType = "cc_type"
+ PhoneNumber = "phone_number"
+ TollFreeNumber = "toll_free_number"
+ E164PhoneNumberTag = "e_164_phone_number"
+ TitleMaleTag = "title_male"
+ TitleFemaleTag = "title_female"
+ FirstNameTag = "first_name"
+ FirstNameMaleTag = "first_name_male"
+ FirstNameFemaleTag = "first_name_female"
+ LastNameTag = "last_name"
+ NAME = "name"
+ ChineseFirstNameTag = "chinese_first_name"
+ ChineseLastNameTag = "chinese_last_name"
+ ChineseNameTag = "chinese_name"
+ GENDER = "gender"
+ UnixTimeTag = "unix_time"
+ DATE = "date"
+ TIME = "time"
+ MonthNameTag = "month_name"
+ YEAR = "year"
+ DayOfWeekTag = "day_of_week"
+ DayOfMonthTag = "day_of_month"
+ TIMESTAMP = "timestamp"
+ CENTURY = "century"
+ TIMEZONE = "timezone"
+ TimePeriodTag = "time_period"
+ WORD = "word"
+ SENTENCE = "sentence"
+ PARAGRAPH = "paragraph"
+ CurrencyTag = "currency"
+ AmountTag = "amount"
+ AmountWithCurrencyTag = "amount_with_currency"
+ SKIP = "-"
+ Length = "len"
+ SliceLength = "slice_len"
+ Language = "lang"
+ BoundaryStart = "boundary_start"
+ BoundaryEnd = "boundary_end"
+ Equals = "="
+ comma = ","
+ colon = ":"
+ ONEOF = "oneof"
+ RussianFirstNameMaleTag = "russian_first_name_male"
+ RussianLastNameMaleTag = "russian_last_name_male"
+ RussianFirstNameFemaleTag = "russian_first_name_female"
+ RussianLastNameFemaleTag = "russian_last_name_female"
+ BloodTypeTag = "blood_type"
+ CountryInfoTag = "country_info"
+ UserAgentTag = "user_agent"
+)
+
+// PriorityTags define the priority order of the tag
+var PriorityTags = []string{ID, HyphenatedID, EmailTag, MacAddressTag, DomainNameTag, UserNameTag, URLTag, IPV4Tag,
+ IPV6Tag, PASSWORD, JWT, CountryInfoTag, LATITUDE, LONGITUDE, CreditCardNumber, CreditCardType, PhoneNumber, TollFreeNumber,
+ E164PhoneNumberTag, TitleMaleTag, TitleFemaleTag, FirstNameTag, FirstNameMaleTag, FirstNameFemaleTag, LastNameTag,
+ NAME, ChineseFirstNameTag, ChineseLastNameTag, ChineseNameTag, GENDER, UnixTimeTag, DATE, TIME, MonthNameTag,
+ YEAR, DayOfWeekTag, DayOfMonthTag, TIMESTAMP, CENTURY, TIMEZONE, TimePeriodTag, WORD, SENTENCE, PARAGRAPH,
+ CurrencyTag, AmountTag, AmountWithCurrencyTag, SKIP, Length, SliceLength, Language, BoundaryStart, BoundaryEnd, ONEOF, BloodTypeTag,
+ UserAgentTag,
+}
+
+type mapperTagCustom struct {
+ sync.Map
+}
+
+func (m *mapperTagCustom) Load(key string) (interfaces.TaggedFunction, bool) {
+ mappedTagFunc, ok := m.Map.Load(key)
+ if !ok {
+ return nil, ok
+ }
+ tagFunc, ok := mappedTagFunc.(interfaces.TaggedFunction)
+ if ok {
+ return tagFunc, ok
+ }
+ tagPureFunc, ok := mappedTagFunc.(func(v reflect.Value) (interface{}, error))
+ if ok {
+ return tagPureFunc, ok
+ }
+ return nil, false
+}
+
+func (m *mapperTagCustom) Store(key string, taggedFunc interfaces.TaggedFunction) {
+ m.Map.Store(key, taggedFunc)
+}
+
+var defaultTag = sync.Map{}
+
+func initDefaultTag() {
+ defaultTag.Store(BloodTypeTag, BloodTypeTag)
+ defaultTag.Store(EmailTag, EmailTag)
+ defaultTag.Store(MacAddressTag, MacAddressTag)
+ defaultTag.Store(DomainNameTag, DomainNameTag)
+ defaultTag.Store(URLTag, URLTag)
+ defaultTag.Store(UserNameTag, UserNameTag)
+ defaultTag.Store(IPV4Tag, IPV4Tag)
+ defaultTag.Store(IPV6Tag, IPV6Tag)
+ defaultTag.Store(PASSWORD, PASSWORD)
+ defaultTag.Store(JWT, JWT)
+ defaultTag.Store(CreditCardType, CreditCardType)
+ defaultTag.Store(CreditCardNumber, CreditCardNumber)
+ defaultTag.Store(CountryInfoTag, CountryInfoTag)
+ defaultTag.Store(LATITUDE, LATITUDE)
+ defaultTag.Store(LONGITUDE, LONGITUDE)
+ defaultTag.Store(RealAddressTag, RealAddressTag)
+ defaultTag.Store(PhoneNumber, PhoneNumber)
+ defaultTag.Store(TollFreeNumber, TollFreeNumber)
+ defaultTag.Store(E164PhoneNumberTag, E164PhoneNumberTag)
+ defaultTag.Store(TitleMaleTag, TitleMaleTag)
+ defaultTag.Store(TitleFemaleTag, TitleFemaleTag)
+ defaultTag.Store(FirstNameTag, FirstNameTag)
+ defaultTag.Store(FirstNameMaleTag, FirstNameMaleTag)
+ defaultTag.Store(FirstNameFemaleTag, FirstNameFemaleTag)
+ defaultTag.Store(LastNameTag, LastNameTag)
+ defaultTag.Store(NAME, NAME)
+ defaultTag.Store(ChineseFirstNameTag, ChineseFirstNameTag)
+ defaultTag.Store(ChineseLastNameTag, ChineseLastNameTag)
+ defaultTag.Store(ChineseNameTag, ChineseNameTag)
+ defaultTag.Store(GENDER, GENDER)
+ defaultTag.Store(UnixTimeTag, UnixTimeTag)
+ defaultTag.Store(DATE, DATE)
+ defaultTag.Store(TIME, TimeFormat)
+ defaultTag.Store(MonthNameTag, MonthNameTag)
+ defaultTag.Store(YEAR, YearFormat)
+ defaultTag.Store(DayOfWeekTag, DayOfWeekTag)
+ defaultTag.Store(DayOfMonthTag, DayOfMonthFormat)
+ defaultTag.Store(TIMESTAMP, TIMESTAMP)
+ defaultTag.Store(CENTURY, CENTURY)
+ defaultTag.Store(TIMEZONE, TIMEZONE)
+ defaultTag.Store(TimePeriodTag, TimePeriodFormat)
+ defaultTag.Store(WORD, WORD)
+ defaultTag.Store(SENTENCE, SENTENCE)
+ defaultTag.Store(PARAGRAPH, PARAGRAPH)
+ defaultTag.Store(CurrencyTag, CurrencyTag)
+ defaultTag.Store(AmountTag, AmountTag)
+ defaultTag.Store(AmountWithCurrencyTag, AmountWithCurrencyTag)
+ defaultTag.Store(ID, ID)
+ defaultTag.Store(HyphenatedID, HyphenatedID)
+ defaultTag.Store(RussianFirstNameMaleTag, RussianFirstNameMaleTag)
+ defaultTag.Store(RussianLastNameMaleTag, RussianLastNameMaleTag)
+ defaultTag.Store(RussianFirstNameFemaleTag, RussianFirstNameFemaleTag)
+ defaultTag.Store(RussianLastNameFemaleTag, RussianLastNameFemaleTag)
+ defaultTag.Store(UserAgentTag, UserAgentTag)
+}
+
+var mapperTag = mapperTagCustom{}
+
+func initMapperTagDefault() {
+ mapperTag.Store(CreditCardType, GetPayment().CreditCardType)
+ mapperTag.Store(CreditCardNumber, GetPayment().CreditCardNumber)
+ mapperTag.Store(CountryInfoTag, GetAddress().CountryInfo)
+ mapperTag.Store(LATITUDE, GetAddress().Latitude)
+ mapperTag.Store(LONGITUDE, GetAddress().Longitude)
+ mapperTag.Store(RealAddressTag, GetAddress().RealWorld)
+ mapperTag.Store(PhoneNumber, GetPhoner().PhoneNumber)
+ mapperTag.Store(TollFreeNumber, GetPhoner().TollFreePhoneNumber)
+ mapperTag.Store(E164PhoneNumberTag, GetPhoner().E164PhoneNumber)
+ mapperTag.Store(TitleMaleTag, GetPerson().TitleMale)
+ mapperTag.Store(TitleFemaleTag, GetPerson().TitleFeMale)
+ mapperTag.Store(FirstNameTag, GetPerson().FirstName)
+ mapperTag.Store(FirstNameMaleTag, GetPerson().FirstNameMale)
+ mapperTag.Store(FirstNameFemaleTag, GetPerson().FirstNameFemale)
+ mapperTag.Store(LastNameTag, GetPerson().LastName)
+ mapperTag.Store(NAME, GetPerson().Name)
+ mapperTag.Store(ChineseFirstNameTag, GetPerson().ChineseFirstName)
+ mapperTag.Store(ChineseLastNameTag, GetPerson().ChineseLastName)
+ mapperTag.Store(ChineseNameTag, GetPerson().ChineseName)
+ mapperTag.Store(GENDER, GetPerson().Gender)
+ mapperTag.Store(UnixTimeTag, GetDateTimer().UnixTime)
+ mapperTag.Store(DATE, GetDateTimer().Date)
+ mapperTag.Store(TIME, GetDateTimer().Time)
+ mapperTag.Store(MonthNameTag, GetDateTimer().MonthName)
+ mapperTag.Store(YEAR, GetDateTimer().Year)
+ mapperTag.Store(DayOfWeekTag, GetDateTimer().DayOfWeek)
+ mapperTag.Store(DayOfMonthTag, GetDateTimer().DayOfMonth)
+ mapperTag.Store(TIMESTAMP, GetDateTimer().Timestamp)
+ mapperTag.Store(CENTURY, GetDateTimer().Century)
+ mapperTag.Store(TIMEZONE, GetDateTimer().TimeZone)
+ mapperTag.Store(TimePeriodTag, GetDateTimer().TimePeriod)
+ mapperTag.Store(WORD, GetLorem().Word)
+ mapperTag.Store(SENTENCE, GetLorem().Sentence)
+ mapperTag.Store(PARAGRAPH, GetLorem().Paragraph)
+ mapperTag.Store(CurrencyTag, GetPrice().Currency)
+ mapperTag.Store(AmountTag, GetPrice().Amount)
+ mapperTag.Store(AmountWithCurrencyTag, GetPrice().AmountWithCurrency)
+ mapperTag.Store(ID, GetIdentifier().Digit)
+ mapperTag.Store(HyphenatedID, GetIdentifier().Hyphenated)
+ mapperTag.Store(RussianFirstNameMaleTag, GetPerson().RussianFirstNameMale)
+ mapperTag.Store(RussianFirstNameFemaleTag, GetPerson().RussianFirstNameFemale)
+ mapperTag.Store(RussianLastNameMaleTag, GetPerson().RussianLastNameMale)
+ mapperTag.Store(RussianLastNameFemaleTag, GetPerson().RussianLastNameFemale)
+ mapperTag.Store(BloodTypeTag, GetBlood().BloodGroup)
+ mapperTag.Store(UserAgentTag, GetUserAgent().UserAgent)
+}
+
+// Compiled regexp
+var (
+ findLangReg *regexp.Regexp
+ findLenReg *regexp.Regexp
+ findSliceLenReg *regexp.Regexp
+)
+
+func init() {
+ rand = mathrand.New(NewSafeSource(mathrand.NewSource(time.Now().UnixNano())))
+ crypto = cryptorand.Reader
+}
+
+func init() {
+ findLangReg, _ = regexp.Compile("lang=[a-z]{3}")
+ findLenReg, _ = regexp.Compile(`len=\d+`)
+ findSliceLenReg, _ = regexp.Compile(`slice_len=\d+`)
+
+ randNameFlag = rand.Intn(100) // for person
+}
+
+func init() {
+ initDefaultTag()
+ initMapperTagDefault()
+}
+
+// ResetUnique is used to forget generated unique values.
+// Call this when you're done generating a dataset.
+func ResetUnique() {
+ uniqueValues = &sync.Map{}
+}
+
+var (
+ SetGenerateUniqueValues = options.SetGenerateUniqueValues
+ SetIgnoreInterface = options.SetIgnoreInterface
+ SetRandomStringLength = options.SetRandomStringLength
+ SetStringLang = options.SetStringLang
+ SetRandomMapAndSliceSize = options.SetRandomMapAndSliceSize
+ SetRandomMapAndSliceMaxSize = options.SetRandomMapAndSliceMaxSize
+ SetRandomMapAndSliceMinSize = options.SetRandomMapAndSliceMinSize
+ SetRandomNumberBoundaries = options.SetRandomNumberBoundaries
+)
+
+func initMapperTagWithOption(opts ...options.OptionFunc) {
+ mapperTag.Store(EmailTag, GetNetworker(opts...).Email)
+ mapperTag.Store(MacAddressTag, GetNetworker(opts...).MacAddress)
+ mapperTag.Store(DomainNameTag, GetNetworker(opts...).DomainName)
+ mapperTag.Store(URLTag, GetNetworker(opts...).URL)
+ mapperTag.Store(UserNameTag, GetNetworker(opts...).UserName)
+ mapperTag.Store(IPV4Tag, GetNetworker(opts...).IPv4)
+ mapperTag.Store(IPV6Tag, GetNetworker(opts...).IPv6)
+ mapperTag.Store(PASSWORD, GetNetworker(opts...).Password)
+ mapperTag.Store(JWT, GetNetworker(opts...).Jwt)
+}
+
+func initOption(opt ...options.OptionFunc) *options.Options {
+ opts := options.BuildOptions(opt)
+ initMapperTagWithOption(opt...)
+ return opts
+}
+
+// FakeData is the main function. Will generate a fake data based on your struct. You can use this for automation testing, or anything that need automated data.
+// You don't need to Create your own data for your testing.
+func FakeData(a interface{}, opt ...options.OptionFunc) error {
+ opts := initOption(opt...)
+ reflectType := reflect.TypeOf(a)
+
+ if reflectType.Kind() != reflect.Ptr {
+ return errors.New(fakerErrors.ErrValueNotPtr)
+ }
+
+ if reflect.ValueOf(a).IsNil() {
+ return fmt.Errorf(fakerErrors.ErrNotSupportedPointer, reflectType.Elem().String())
+ }
+
+ rval := reflect.ValueOf(a)
+ finalValue, err := getFakedValue(a, opts)
+ if err != nil {
+ return err
+ }
+
+ if rval.Elem().CanSet() && rval.Elem().
+ CanConvert(reflectType.Elem()) {
+ rval.Elem().Set(finalValue.Elem().
+ Convert(reflectType.Elem()))
+ }
+ return nil
+}
+
+// AddProvider extend faker with tag to generate fake data with specified custom algorithm
+// Example:
+//
+// type Gondoruwo struct {
+// Name string
+// Locatadata int
+// }
+//
+// type Sample struct {
+// ID int64 `faker:"customIdFaker"`
+// Gondoruwo Gondoruwo `faker:"gondoruwo"`
+// Danger string `faker:"danger"`
+// }
+//
+// func CustomGenerator() {
+// // explicit
+// faker.AddProvider("customIdFaker", func(v reflect.Value) (interface{}, error) {
+// return int64(43), nil
+// })
+// // functional
+// faker.AddProvider("danger", func() faker.TaggedFunction {
+// return func(v reflect.Value) (interface{}, error) {
+// return "danger-ranger", nil
+// }
+// }())
+// faker.AddProvider("gondoruwo", func(v reflect.Value) (interface{}, error) {
+// obj := Gondoruwo{
+// Name: "Power",
+// Locatadata: 324,
+// }
+// return obj, nil
+// })
+// }
+//
+// func main() {
+// CustomGenerator()
+// var sample Sample
+// faker.FakeData(&sample)
+// fmt.Printf("%+v", sample)
+// }
+//
+// Will print
+//
+// {ID:43 Gondoruwo:{Name:Power Locatadata:324} Danger:danger-ranger}
+//
+// Notes: when using a custom provider make sure to return the same type as the field
+func AddProvider(tag string, provider interfaces.TaggedFunction) error {
+ if _, ok := mapperTag.Load(tag); ok {
+ return errors.New(fakerErrors.ErrTagAlreadyExists)
+ }
+ PriorityTags = append(PriorityTags, tag)
+ mapperTag.Store(tag, provider)
+
+ return nil
+}
+
+// RemoveProvider removes existing customization added with AddProvider
+func RemoveProvider(tag string) error {
+ if _, ok := mapperTag.Load(tag); !ok {
+ return errors.New(fakerErrors.ErrTagDoesNotExist)
+ }
+ mapperTag.Delete(tag)
+ return nil
+}
+
+func getFakedValue(item interface{}, opts *options.Options) (reflect.Value, error) {
+ t := reflect.TypeOf(item)
+ if t == nil {
+ if opts.IgnoreInterface {
+ return reflect.ValueOf(nil), nil
+ }
+ return reflect.Value{}, fmt.Errorf("interface{} not allowed")
+ }
+ if opts.MaxDepthOption.RecursionOutOfLimit(t) {
+ return reflect.Zero(t), nil
+ }
+ opts.MaxDepthOption.RememberType(t)
+ defer func() {
+ opts.MaxDepthOption.ForgetType(t)
+ }()
+ k := t.Kind()
+ switch k {
+ case reflect.Ptr:
+ v := reflect.New(t.Elem())
+ var val reflect.Value
+ var err error
+ if item != reflect.Zero(reflect.TypeOf(item)).Interface() {
+ val, err = getFakedValue(reflect.ValueOf(item).Elem().Interface(), opts)
+
+ } else {
+ val, err = getFakedValue(v.Elem().Interface(), opts)
+ }
+ if err != nil {
+ return reflect.Value{}, err
+ }
+
+ if reflect.ValueOf(val).IsZero() {
+ return v, nil
+ }
+
+ if v.Elem().CanSet() && v.Elem().CanConvert(t.Elem()) {
+ v.Elem().Set(val.Convert(t.Elem()))
+ }
+ return v, nil
+ case reflect.Struct:
+ if structTypeProvider, f := opts.StructTypeProviders[t]; f {
+ ft, err := structTypeProvider()
+ return reflect.ValueOf(ft), err
+ }
+ originalDataVal := reflect.ValueOf(item)
+ v := reflect.New(t).Elem()
+ if opts.MaxFieldDepthOption == 0 {
+ return v, nil
+ } else if opts.MaxFieldDepthOption > 0 {
+ opts.MaxFieldDepthOption--
+ defer func() { opts.MaxFieldDepthOption++ }()
+ }
+ retry := 0 // error if cannot generate unique value after maxRetry tries
+ for i := 0; i < v.NumField(); i++ {
+ if !v.Field(i).CanSet() {
+ continue // to avoid panic to set on unexported field in struct
+ }
+
+ if _, ok := opts.IgnoreFields[t.Field(i).Name]; ok {
+ continue
+ }
+
+ if p, ok := opts.FieldProviders[t.Field(i).Name]; ok {
+ val, err := p()
+ if err != nil {
+ return reflect.Value{}, fmt.Errorf("custom provider for field %s: %w", t.Field(i).Name, err)
+ }
+ v.Field(i).Set(reflect.ValueOf(val))
+ continue
+ }
+
+ tags := decodeTags(t, i, opts.TagName)
+ switch {
+ case tags.keepOriginal:
+ zero, err := isZero(reflect.ValueOf(item).Field(i))
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if zero {
+ err := setDataWithTag(v.Field(i).Addr(), tags.fieldType, *opts)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ continue
+ }
+ v.Field(i).Set(reflect.ValueOf(item).Field(i))
+ case tags.fieldType == "":
+ val, err := getFakedValue(v.Field(i).Interface(), opts)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+
+ if v.Field(i).CanSet() {
+ if !reflect.ValueOf(val).IsZero() && val.CanConvert(v.Field(i).Type()) {
+ val = val.Convert(v.Field(i).Type())
+ v.Field(i).Set(val)
+ }
+
+ }
+ case tags.fieldType == SKIP:
+ data := originalDataVal.Field(i).Interface()
+ if v.CanSet() && data != nil {
+ v.Field(i).Set(reflect.ValueOf(data))
+ }
+ default:
+ err := setDataWithTag(v.Field(i).Addr(), tags.fieldType, *opts)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ }
+
+ if tags.unique {
+ if retry >= maxRetry {
+ return reflect.Value{}, fmt.Errorf(fakerErrors.ErrUniqueFailure, reflect.TypeOf(item).Field(i).Name)
+ }
+ value := v.Field(i).Interface()
+ uniqueVal, _ := uniqueValues.Load(tags.fieldType)
+ uniqueValArr, _ := uniqueVal.([]interface{})
+ if slice.ContainsValue(uniqueValArr, value) { // Retry if unique value already found
+ i--
+ retry++
+ continue
+ }
+ retry = 0
+ uniqueValues.Store(tags.fieldType, append(uniqueValArr, value))
+ } else {
+ retry = 0
+ }
+
+ }
+ return v, nil
+
+ case reflect.String:
+ res, err := randomString(opts.RandomStringLength, *opts)
+ return reflect.ValueOf(res), err
+ case reflect.Slice:
+
+ length := randomSliceAndMapSize(*opts)
+ if opts.SetSliceMapNilIfLenZero && length == 0 {
+ return reflect.Zero(t), nil
+ }
+ v := reflect.MakeSlice(t, length, length)
+ for i := 0; i < length; i++ {
+ val, err := getFakedValue(v.Index(i).Interface(), opts)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ // if the value generated is NIL/Zero
+ // it will kept it as nil
+ if reflect.ValueOf(val).IsZero() {
+ continue
+ }
+ if val.CanConvert(v.Index(i).Type()) {
+ val = val.Convert(v.Index(i).Type())
+ v.Index(i).Set(val)
+ }
+ }
+ return v, nil
+ case reflect.Array:
+ v := reflect.New(t).Elem()
+ for i := 0; i < v.Len(); i++ {
+ val, err := getFakedValue(v.Index(i).Interface(), opts)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if reflect.ValueOf(val).IsZero() {
+ continue
+ }
+ if val.CanConvert(v.Index(i).Type()) {
+ val = val.Convert(v.Index(i).Type())
+ }
+ v.Index(i).Set(val)
+ }
+ return v, nil
+ case reflect.Int:
+ return reflect.ValueOf(randomInteger(opts)), nil
+ case reflect.Int8:
+ return reflect.ValueOf(int8(randomInteger(opts))), nil
+ case reflect.Int16:
+ return reflect.ValueOf(int16(randomInteger(opts))), nil
+ case reflect.Int32:
+ return reflect.ValueOf(int32(randomInteger(opts))), nil
+ case reflect.Int64:
+ return reflect.ValueOf(int64(randomInteger(opts))), nil
+ case reflect.Float32:
+ return reflect.ValueOf(float32(randomFloat(opts))), nil
+ case reflect.Float64:
+ return reflect.ValueOf(randomFloat(opts)), nil
+ case reflect.Bool:
+ val := rand.Intn(2) > 0
+ return reflect.ValueOf(val), nil
+
+ case reflect.Uint:
+ return reflect.ValueOf(uint(randomInteger(opts))), nil
+
+ case reflect.Uint8:
+ return reflect.ValueOf(uint8(randomInteger(opts))), nil
+
+ case reflect.Uint16:
+ return reflect.ValueOf(uint16(randomInteger(opts))), nil
+
+ case reflect.Uint32:
+ return reflect.ValueOf(uint32(randomInteger(opts))), nil
+
+ case reflect.Uint64:
+ return reflect.ValueOf(uint64(randomInteger(opts))), nil
+
+ case reflect.Map:
+ length := randomSliceAndMapSize(*opts)
+ if opts.SetSliceMapNilIfLenZero && length == 0 {
+ return reflect.Zero(t), nil
+ }
+ v := reflect.MakeMap(t)
+ for i := 0; i < length; i++ {
+ keyInstance := reflect.New(t.Key()).Elem().Interface()
+ key, err := getFakedValue(keyInstance, opts)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+
+ valueInstance := reflect.New(t.Elem()).Elem().Interface()
+ val, err := getFakedValue(valueInstance, opts)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+
+ keyIsZero := reflect.ValueOf(key).IsZero()
+ valIsZero := reflect.ValueOf(val).IsZero()
+
+ if keyIsZero || valIsZero {
+ continue
+ }
+ key = key.Convert(t.Key())
+ val = val.Convert(v.Type().Elem())
+ v.SetMapIndex(key, val)
+ }
+ return v, nil
+ default:
+ err := fmt.Errorf("no support for kind %+v", t)
+ return reflect.Value{}, err
+ }
+
+}
+
+func isZero(field reflect.Value) (bool, error) {
+ if field.Kind() == reflect.Map {
+ return field.Len() == 0, nil
+ }
+
+ for _, kind := range []reflect.Kind{reflect.Struct, reflect.Slice, reflect.Array} {
+ if kind == field.Kind() {
+ return false, fmt.Errorf("keep not allowed on struct")
+ }
+ }
+ return reflect.Zero(field.Type()).Interface() == field.Interface(), nil
+}
+
+func decodeTags(typ reflect.Type, i int, tagName string) structTag {
+ tagField := typ.Field(i).Tag.Get(tagName)
+ tags := strings.Split(tagField, ",")
+
+ keepOriginal := false
+ uni := false
+ res := make([]string, 0)
+ pMap := make(map[string]string)
+ for _, tag := range tags {
+ if tag == keep {
+ keepOriginal = true
+ continue
+ } else if tag == unique {
+ uni = true
+ continue
+ }
+ // res = append(res, tag)
+ ptag := strings.ToLower(strings.Trim(strings.Split(tag, "=")[0], " "))
+ pMap[ptag] = tag
+ ptag = strings.ToLower(strings.Trim(strings.Split(tag, ":")[0], " "))
+ pMap[ptag] = tag
+ }
+ // Priority
+ for _, ptag := range PriorityTags {
+ if tag, ok := pMap[ptag]; ok {
+ if ptag == ONEOF {
+ res = append(res, tags...)
+ } else {
+ res = append(res, tag)
+ }
+ delete(pMap, ptag)
+ }
+ }
+ // custom,keep,unique
+ if len(res) < 1 {
+ if !keepOriginal && !uni {
+ res = append(res, tags...)
+ }
+ }
+
+ return structTag{
+ fieldType: strings.Join(res, ","),
+ unique: uni,
+ keepOriginal: keepOriginal,
+ }
+}
+
+type structTag struct {
+ fieldType string
+ unique bool
+ keepOriginal bool
+}
+
+func setDataWithTag(v reflect.Value, tag string, opt options.Options) error {
+ if v.Kind() != reflect.Ptr {
+ return errors.New(fakerErrors.ErrValueNotPtr)
+ }
+ v = reflect.Indirect(v)
+ switch v.Kind() {
+ case reflect.Ptr:
+ if _, exist := mapperTag.Load(tag); !exist {
+ newv := reflect.New(v.Type().Elem())
+ if err := setDataWithTag(newv, tag, opt); err != nil {
+ return err
+ }
+ v.Set(newv)
+ return nil
+ }
+ if _, def := defaultTag.Load(tag); !def {
+ tagFunc, ok := mapperTag.Load(tag)
+ if !ok {
+ return fmt.Errorf(fakerErrors.ErrTagNotSupported, tag)
+ }
+ res, err := tagFunc(v)
+ if err != nil {
+ return err
+ }
+ v.Set(reflect.ValueOf(res))
+ return nil
+ }
+
+ t := v.Type()
+ newv := reflect.New(t.Elem())
+ tagFunc, ok := mapperTag.Load(tag)
+ if !ok {
+ return fmt.Errorf(fakerErrors.ErrTagNotSupported, tag)
+ }
+ res, err := tagFunc(newv.Elem())
+ if err != nil {
+ return err
+ }
+ rval := reflect.ValueOf(res)
+ newv.Elem().Set(rval)
+ v.Set(newv)
+ return nil
+ case reflect.String:
+ return userDefinedString(v, tag, opt)
+ case reflect.Int, reflect.Int32, reflect.Int64, reflect.Int8, reflect.Int16, reflect.Uint, reflect.Uint8,
+ reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64:
+ return userDefinedNumber(v, tag)
+ case reflect.Slice, reflect.Array:
+ return userDefinedArray(v, tag, opt)
+ case reflect.Map:
+ return userDefinedMap(v, tag, opt)
+ default:
+ tagFunc, ok := mapperTag.Load(tag)
+ if !ok {
+ return fmt.Errorf(fakerErrors.ErrTagNotSupported, tag)
+ }
+ res, err := tagFunc(v)
+ if err != nil {
+ return err
+ }
+ v.Set(reflect.ValueOf(res))
+ }
+ return nil
+}
+
+func userDefinedMap(v reflect.Value, tag string, opt options.Options) error {
+ if tagFunc, ok := mapperTag.Load(tag); ok {
+ res, err := tagFunc(v)
+ if err != nil {
+ return err
+ }
+
+ v.Set(reflect.ValueOf(res))
+ return nil
+ }
+
+ length := randomSliceAndMapSize(opt)
+ if opt.SetSliceMapNilIfLenZero && length == 0 {
+ v.Set(reflect.Zero(v.Type()))
+ return nil
+ }
+ definedMap := reflect.MakeMap(v.Type())
+ for i := 0; i < length; i++ {
+ key, err := getValueWithTag(v.Type().Key(), tag, opt)
+ if err != nil {
+ return err
+ }
+ val, err := getValueWithTag(v.Type().Elem(), tag, opt)
+ if err != nil {
+ return err
+ }
+ definedMap.SetMapIndex(reflect.ValueOf(key), reflect.ValueOf(val))
+ }
+ v.Set(definedMap)
+ return nil
+}
+
+func getValueWithTag(t reflect.Type, tag string, opt options.Options) (interface{}, error) {
+ switch t.Kind() {
+ case reflect.Int, reflect.Int32, reflect.Int64, reflect.Int8, reflect.Int16, reflect.Uint, reflect.Uint8,
+ reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64:
+ res, err := extractNumberFromTag(tag, t)
+ if err != nil {
+ return nil, err
+ }
+ return res, nil
+ case reflect.String:
+ res, err := extractStringFromTag(tag, opt)
+ if err != nil {
+ return nil, err
+ }
+ return res, nil
+ default:
+ return 0, errors.New(fakerErrors.ErrUnknownType)
+ }
+}
+
+func getNumberWithBoundary(t reflect.Type, boundary interfaces.RandomIntegerBoundary) (interface{}, error) {
+ switch t.Kind() {
+ case reflect.Uint:
+ return uint(randomIntegerWithBoundary(boundary)), nil
+ case reflect.Uint8:
+ return uint8(randomIntegerWithBoundary(boundary)), nil
+ case reflect.Uint16:
+ return uint16(randomIntegerWithBoundary(boundary)), nil
+ case reflect.Uint32:
+ return uint32(randomIntegerWithBoundary(boundary)), nil
+ case reflect.Uint64:
+ return uint64(randomIntegerWithBoundary(boundary)), nil
+ case reflect.Int:
+ return randomIntegerWithBoundary(boundary), nil
+ case reflect.Int8:
+ return int8(randomIntegerWithBoundary(boundary)), nil
+ case reflect.Int16:
+ return int16(randomIntegerWithBoundary(boundary)), nil
+ case reflect.Int32:
+ return int32(randomIntegerWithBoundary(boundary)), nil
+ case reflect.Int64:
+ return int64(randomIntegerWithBoundary(boundary)), nil
+ default:
+ return nil, errors.New(fakerErrors.ErrNotSupportedTypeForTag)
+ }
+}
+
+func getValueWithNoTag(t reflect.Type, opt options.Options) (interface{}, error) {
+ switch t.Kind() {
+ case reflect.Int, reflect.Int32, reflect.Int64, reflect.Int8, reflect.Int16, reflect.Uint, reflect.Uint8,
+ reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64:
+ boundary := interfaces.RandomIntegerBoundary{
+ Start: opt.RandomIntegerBoundary.Start,
+ End: opt.RandomIntegerBoundary.End}
+ res, err := getNumberWithBoundary(t, boundary)
+ if err != nil {
+ return nil, err
+ }
+ return res, nil
+ case reflect.String:
+ res, err := randomString(opt.RandomStringLength, opt)
+ if err != nil {
+ return nil, err
+ }
+ return res, nil
+ default:
+ return 0, errors.New(fakerErrors.ErrUnknownType)
+ }
+}
+
+func userDefinedArray(v reflect.Value, tag string, opt options.Options) error {
+ tagFunc, tagExists := mapperTag.Load(tag)
+ if tagExists {
+ res, err := tagFunc(v)
+ if err != nil {
+ return err
+ }
+ v.Set(reflect.ValueOf(res))
+ return nil
+ }
+ sliceLen, err := extractSliceLengthFromTag(tag, opt)
+ if err != nil {
+ return err
+ }
+
+ if opt.SetSliceMapNilIfLenZero && sliceLen == 0 {
+ v.Set(reflect.Zero(v.Type()))
+ return nil
+ }
+ //remove slice_len from tag string to avoid extra logic in downstream function
+ tag = findSliceLenReg.ReplaceAllString(tag, "")
+ array := reflect.MakeSlice(v.Type(), sliceLen, sliceLen)
+ for i := 0; i < array.Len(); i++ {
+ k := v.Type().Elem().Kind()
+ if k == reflect.Pointer || k == reflect.Struct {
+ res, err := getFakedValue(array.Index(i).Interface(), &opt)
+ if err != nil {
+ return err
+ }
+ if res.Kind() == reflect.Invalid {
+ return fmt.Errorf("got invalid reflect value")
+ }
+ array.Index(i).Set(res)
+ continue
+ }
+ if tag == "" {
+ res, err := getValueWithNoTag(v.Type().Elem(), opt)
+ if err != nil {
+ return err
+ }
+ array.Index(i).Set(reflect.ValueOf(res))
+ continue
+ }
+
+ res, err := getValueWithTag(v.Type().Elem(), tag, opt)
+ if err != nil {
+ return err
+ }
+ array.Index(i).Set(reflect.ValueOf(res))
+ }
+ v.Set(array)
+ return nil
+}
+
+func userDefinedString(v reflect.Value, tag string, opt options.Options) error {
+ var res interface{}
+ var err error
+
+ if tagFunc, ok := mapperTag.Load(tag); ok {
+ res, err = tagFunc(v)
+ if err != nil {
+ return err
+ }
+ } else {
+ res, err = extractStringFromTag(tag, opt)
+ if err != nil {
+ return err
+ }
+ }
+ if res == nil {
+ return fmt.Errorf(fakerErrors.ErrTagNotSupported, tag)
+ }
+ val, _ := res.(string)
+ v.SetString(val)
+ return nil
+}
+
+func userDefinedNumber(v reflect.Value, tag string) error {
+ var res interface{}
+ var err error
+
+ if tagFunc, ok := mapperTag.Load(tag); ok {
+ res, err = tagFunc(v)
+ if err != nil {
+ return err
+ }
+ } else {
+ res, err = extractNumberFromTag(tag, v.Type())
+ if err != nil {
+ return err
+ }
+ }
+ if res == nil {
+ return fmt.Errorf(fakerErrors.ErrTagNotSupported, tag)
+ }
+
+ if v.CanSet() && v.CanConvert(v.Type()) {
+ v.Set(reflect.ValueOf(res).Convert(v.Type()))
+ }
+ return nil
+}
+
+// extractSliceLengthFromTag checks if the sliceLength tag 'slice_len' is set, if so, returns its value, else return a random length
+func extractSliceLengthFromTag(tag string, opt options.Options) (int, error) {
+ if strings.Contains(tag, SliceLength) {
+ lenParts := strings.Split(findSliceLenReg.FindString(tag), Equals)
+ if len(lenParts) != 2 {
+ return 0, fmt.Errorf(fakerErrors.ErrWrongFormattedTag, tag)
+ }
+ sliceLen, err := strconv.Atoi(lenParts[1])
+ if err != nil {
+ return 0, fmt.Errorf("the given sliceLength has to be numeric, tag: %s", tag)
+ }
+ if sliceLen < 0 {
+ return 0, fmt.Errorf("slice length can not be negative, tag: %s", tag)
+ }
+ return sliceLen, nil
+ }
+
+ return randomSliceAndMapSize(opt), nil //Returns random slice length if the sliceLength tag isn't set
+}
+
+func extractStringFromTag(tag string, opts options.Options) (interface{}, error) {
+ var err error
+ strlen := opts.RandomStringLength
+ strlng := opts.StringLanguage
+ isOneOfTag := strings.Contains(tag, ONEOF)
+ if !strings.Contains(tag, Length) && !strings.Contains(tag, Language) && !isOneOfTag {
+ return nil, fmt.Errorf(fakerErrors.ErrTagNotSupported, tag)
+ }
+ if strings.Contains(tag, Length) {
+ lenParts := strings.Split(findLenReg.FindString(tag), Equals)
+ if len(lenParts) != 2 {
+ return nil, fmt.Errorf(fakerErrors.ErrWrongFormattedTag, tag)
+ }
+ strlen, _ = strconv.Atoi(lenParts[1])
+ }
+ if strings.Contains(tag, Language) {
+ strlng, err = extractLangFromTag(tag)
+ if err != nil {
+ return nil, fmt.Errorf(fakerErrors.ErrWrongFormattedTag, tag)
+ }
+ }
+ if isOneOfTag {
+ var args []string
+ args, err = fetchOneOfArgsFromTag(tag)
+ if err != nil {
+ return nil, err
+ }
+ toRet := args[rand.Intn(len(args))]
+ return strings.TrimSpace(toRet), nil
+ }
+
+ copyOption := opts
+ copyOption.StringLanguage = strlng
+ res, err := randomString(strlen, copyOption)
+ return res, err
+}
+
+func extractLangFromTag(tag string) (*interfaces.LangRuneBoundary, error) {
+ text := findLangReg.FindString(tag)
+ texts := strings.Split(text, Equals)
+ if len(texts) != 2 {
+ return nil, fmt.Errorf(fakerErrors.ErrWrongFormattedTag, text)
+ }
+ switch strings.ToLower(texts[1]) {
+ case "eng":
+ return &interfaces.LangENG, nil
+ case "rus":
+ return &interfaces.LangRUS, nil
+ case "chi":
+ return &interfaces.LangCHI, nil
+ case "jpn":
+ return &interfaces.LangJPN, nil
+ case "kor":
+ return &interfaces.LangKOR, nil
+ case "emj":
+ return &interfaces.EmotEMJ, nil
+ default:
+ return &interfaces.LangENG, nil
+ }
+}
+
+func extractNumberFromTag(tag string, t reflect.Type) (interface{}, error) {
+ hasOneOf := strings.Contains(tag, ONEOF)
+ hasBoundaryStart := strings.Contains(tag, BoundaryStart)
+ hasBoundaryEnd := strings.Contains(tag, BoundaryEnd)
+ usingOneOfTag := hasOneOf && (!hasBoundaryStart && !hasBoundaryEnd)
+ usingBoundariesTags := !hasOneOf && (hasBoundaryStart && hasBoundaryEnd)
+ if !usingOneOfTag && !usingBoundariesTags {
+ return nil, fmt.Errorf(fakerErrors.ErrTagNotSupported, tag)
+ }
+
+ // handling oneof tag
+ if usingOneOfTag {
+ args, err := fetchOneOfArgsFromTag(tag)
+ if err != nil {
+ return nil, err
+ }
+ switch t.Kind() {
+ case reflect.Float64:
+ {
+ toRet, err := extractFloat64FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(float64), nil
+ }
+ case reflect.Float32:
+ {
+ toRet, err := extractFloat32FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(float32), nil
+ }
+ case reflect.Int64:
+ {
+ toRet, err := extractInt64FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(int64), nil
+ }
+ case reflect.Int32:
+ {
+ toRet, err := extractInt32FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(int32), nil
+ }
+ case reflect.Int16:
+ {
+ toRet, err := extractInt16FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(int16), nil
+ }
+ case reflect.Int8:
+ {
+ toRet, err := extractInt8FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(int8), nil
+ }
+ case reflect.Int:
+ {
+ toRet, err := extractIntFromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(int), nil
+ }
+ case reflect.Uint64:
+ {
+ toRet, err := extractUint64FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(uint64), nil
+ }
+ case reflect.Uint32:
+ {
+ toRet, err := extractUint32FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(uint32), nil
+ }
+ case reflect.Uint16:
+ {
+ toRet, err := extractUint16FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(uint16), nil
+ }
+ case reflect.Uint8:
+ {
+ toRet, err := extractUint8FromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(uint8), nil
+ }
+ case reflect.Uint:
+ {
+ toRet, err := extractUintFromTagArgs(args)
+ if err != nil {
+ return nil, err
+ }
+ return toRet.(uint), nil
+ }
+ default:
+ {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedNumberType)
+ }
+ }
+ }
+
+ // handling boundary tags
+ valuesStr := strings.Split(tag, comma)
+ if len(valuesStr) != 2 {
+ return nil, fmt.Errorf(fakerErrors.ErrWrongFormattedTag, tag)
+ }
+
+ // TODO(Xaspy): When Golang provides generics, we will be able to make this method simpler and more beautiful.
+ if t.Kind() == reflect.Float64 || t.Kind() == reflect.Float32 {
+ startBoundary, err := extractFloatFromText(valuesStr[0])
+ if err != nil {
+ return nil, err
+ }
+ endBoundary, err := extractFloatFromText(valuesStr[1])
+ if err != nil {
+ return nil, err
+ }
+ boundary := interfaces.RandomFloatBoundary{Start: startBoundary, End: endBoundary}
+ switch t.Kind() {
+ case reflect.Float32:
+ return float32(randomFloatWithBoundary(boundary)), nil
+ case reflect.Float64:
+ return randomFloatWithBoundary(boundary), nil
+ }
+ }
+
+ startBoundary, err := extractIntFromText(valuesStr[0])
+ if err != nil {
+ return nil, err
+ }
+ endBoundary, err := extractIntFromText(valuesStr[1])
+ if err != nil {
+ return nil, err
+ }
+ boundary := interfaces.RandomIntegerBoundary{Start: startBoundary, End: endBoundary}
+ return getNumberWithBoundary(t, boundary)
+}
+
+func extractIntFromText(text string) (int, error) {
+ text = strings.TrimSpace(text)
+ texts := strings.Split(text, Equals)
+ if len(texts) != 2 {
+ return 0, fmt.Errorf(fakerErrors.ErrWrongFormattedTag, text)
+ }
+ return strconv.Atoi(texts[1])
+}
+
+func extractFloatFromText(text string) (float64, error) {
+ text = strings.TrimSpace(text)
+ texts := strings.Split(text, Equals)
+ if len(texts) != 2 {
+ return 0, fmt.Errorf(fakerErrors.ErrWrongFormattedTag, text)
+ }
+ return strconv.ParseFloat(texts[1], 64)
+}
+
+func fetchOneOfArgsFromTag(tag string) ([]string, error) {
+ items := strings.Split(tag, colon)
+ argsList := items[1:]
+ if len(argsList) != 1 {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ if strings.Contains(argsList[0], ",,") {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrDuplicateSeparator)
+ }
+ if argsList[0] == "" {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrNotEnoughTagArguments)
+ }
+ args := strings.Split(argsList[0], comma)
+ if len(args) < 1 {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrNotEnoughTagArguments)
+ }
+ return args, nil
+}
+
+func randomString(n int, fakerOpt options.Options) (string, error) {
+ b := make([]rune, 0)
+ set := make(map[rune]struct{})
+ if fakerOpt.StringLanguage.Exclude != nil {
+ for _, s := range fakerOpt.StringLanguage.Exclude {
+ set[s] = struct{}{}
+ }
+ }
+
+ counter := 0
+ for i := 0; i < n; {
+ randRune := rune(rand.Intn(int(fakerOpt.StringLanguage.End-fakerOpt.StringLanguage.Start)) + int(fakerOpt.StringLanguage.Start))
+ for slice.ContainsRune(set, randRune) {
+ if counter++; counter >= fakerOpt.MaxGenerateStringRetries {
+ return "", errors.New("max number of string generation retries exhausted")
+ }
+ randRune = rune(rand.Intn(int(fakerOpt.StringLanguage.End-fakerOpt.StringLanguage.Start)) + int(fakerOpt.StringLanguage.Start))
+ _, ok := set[randRune]
+ if !ok {
+ break
+ }
+ }
+ b = append(b, randRune)
+ i++
+ }
+
+ k := string(b)
+ return k, nil
+}
+
+// randomIntegerWithBoundary returns a random integer between input start and end boundary. [start, end)
+func randomIntegerWithBoundary(boundary interfaces.RandomIntegerBoundary) int {
+ span := boundary.End - boundary.Start
+ if span <= 0 {
+ return boundary.Start
+ }
+ return rand.Intn(span) + boundary.Start
+}
+
+// randomFloatWithBoundary returns a random float between input start and end boundary. [start, end)
+func randomFloatWithBoundary(boundary interfaces.RandomFloatBoundary) float64 {
+ span := boundary.End - boundary.Start
+ if span <= 0 {
+ return boundary.Start
+ }
+ return boundary.Start + rand.Float64()*span
+}
+
+// randomInteger returns a random integer between start and end boundary. [start, end)
+func randomInteger(opt *options.Options) int {
+ if opt == nil {
+ opt = options.DefaultOption()
+ }
+
+ return randomIntegerWithBoundary(*opt.RandomIntegerBoundary)
+}
+
+// randomFloat returns a random float between start and end boundary. [start, end)
+func randomFloat(opt *options.Options) float64 {
+ if opt == nil {
+ opt = options.DefaultOption()
+ }
+
+ return randomFloatWithBoundary(*opt.RandomFloatBoundary)
+}
+
+// randomSliceAndMapSize returns a random integer between [0,randomSliceAndMapSize). If the testRandZero is set, returns 0
+// Written for test purposes for shouldSetNil
+func randomSliceAndMapSize(opt options.Options) int {
+ if opt.SetSliceMapRandomToZero {
+ return 0
+ }
+ r := opt.RandomMaxSliceSize - opt.RandomMinSliceSize
+ if r < 1 {
+ r = 1
+ }
+ return opt.RandomMinSliceSize + rand.Intn(r)
+}
+
+func randomElementFromSliceString(s []string) string {
+ return s[rand.Int()%len(s)]
+}
+func randomStringNumber(n int) string {
+ b := make([]byte, n)
+ for i, cache, remain := n-1, rand.Int63(), letterIdxMax; i >= 0; {
+ if remain == 0 {
+ cache, remain = rand.Int63(), letterIdxMax
+ }
+ if idx := int(cache & letterIdxMask); idx < len(numberBytes) {
+ b[i] = numberBytes[idx]
+ i--
+ }
+ cache >>= letterIdxBits
+ remain--
+ }
+
+ return string(b)
+}
+
+// RandomInt Get three parameters , only first mandatory and the rest are optional
+// (minimum_int, maximum_int, count)
+//
+// If only set one parameter : An integer greater than minimum_int will be returned
+// If only set two parameters : All integers between minimum_int and maximum_int will be returned, in a random order.
+// If three parameters: `count` integers between minimum_int and maximum_int will be returned.
+func RandomInt(parameters ...int) (p []int, err error) {
+ switch len(parameters) {
+ case 1:
+ minInt := parameters[0]
+ p = rand.Perm(minInt)
+ for i := range p {
+ p[i] += minInt
+ }
+ case 2:
+ minInt, maxInt := parameters[0], parameters[1]
+ p = rand.Perm(maxInt - minInt + 1)
+
+ for i := range p {
+ p[i] += minInt
+ }
+ case 3:
+ minInt, maxInt := parameters[0], parameters[1]
+ count := parameters[2]
+ p = rand.Perm(maxInt - minInt + 1)
+
+ for i := range p {
+ p[i] += minInt
+ }
+ if len(p) > count {
+ p = p[0:count]
+ }
+ default:
+ err = fmt.Errorf(fakerErrors.ErrMoreArguments, len(parameters))
+ }
+ return p, err
+}
+
+func generateUnique(dataType string, fn func() interface{}) (interface{}, error) {
+ for i := 0; i < maxRetry; i++ {
+ value := fn()
+ uniqueVal, _ := uniqueValues.Load(dataType)
+ uniqueValArr, _ := uniqueVal.([]interface{})
+ if !slice.ContainsValue(uniqueValArr, value) { // Retry if unique value already found
+ uniqueValues.Store(dataType, append(uniqueValArr, value))
+ return value, nil
+ }
+ }
+ return reflect.Value{}, fmt.Errorf(fakerErrors.ErrUniqueFailure, dataType)
+}
+
+func singleFakeData(dataType string, fn func() interface{}, opts ...options.OptionFunc) interface{} {
+ ops := initOption(opts...)
+ if ops.GenerateUniqueValues {
+ v, err := generateUnique(dataType, fn)
+ if err != nil {
+ panic(err)
+ }
+ return v
+ }
+ return fn()
+}
diff --git a/vendor/github.com/go-faker/faker/v4/internet.go b/vendor/github.com/go-faker/faker/v4/internet.go
new file mode 100644
index 0000000..3035ad8
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/internet.go
@@ -0,0 +1,302 @@
+package faker
+
+import (
+ "fmt"
+ "net"
+ "reflect"
+ "strings"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+var tld = []string{"com", "biz", "info", "net", "org", "ru", "edu", "top"}
+var urlFormats = []string{
+ "http://www.%s/",
+ "https://www.%s/",
+ "http://%s/",
+ "https://%s/",
+ "http://www.%s/%s",
+ "https://www.%s/%s",
+ "http://%s/%s",
+ "https://%s/%s",
+ "http://%s/%s.html",
+ "https://%s/%s.html",
+ "http://%s/%s.php",
+ "https://%s/%s.php",
+ "http://%s/%s.jpg",
+ "https://%s/%s.jpg",
+ "http://%s/%s.webp",
+ "https://%s/%s.webp",
+ "http://%s/%s.js",
+ "https://%s/%s.js",
+ "http://%s/%s.css",
+ "https://%s/%s.css",
+ "http://%s/%s.svg",
+ "https://%s/%s.svg",
+}
+
+// GetNetworker returns a new Networker interface of Internet
+func GetNetworker(opts ...options.OptionFunc) Networker {
+ opt := options.BuildOptions(opts)
+ internet := &Internet{
+ fakerOption: *opt,
+ }
+ return internet
+}
+
+// Networker is logical layer for Internet
+type Networker interface {
+ Email(v reflect.Value) (interface{}, error)
+ MacAddress(v reflect.Value) (interface{}, error)
+ DomainName(v reflect.Value) (interface{}, error)
+ URL(v reflect.Value) (interface{}, error)
+ UserName(v reflect.Value) (interface{}, error)
+ IPv4(v reflect.Value) (interface{}, error)
+ IPv6(v reflect.Value) (interface{}, error)
+ Password(v reflect.Value) (interface{}, error)
+ Jwt(v reflect.Value) (interface{}, error)
+}
+
+// Internet struct
+type Internet struct {
+ fakerOption options.Options
+}
+
+func (internet Internet) email() (string, error) {
+ var err error
+ var emailName, emailDomain string
+ if emailName, err = randomString(7, internet.fakerOption); err != nil {
+ return "", err
+ }
+
+ if internet.fakerOption.CustomDomain != nil {
+ emailDomain = *internet.fakerOption.CustomDomain
+ } else {
+ randDomain, err := randomString(7, internet.fakerOption)
+ if err != nil {
+ return "", err
+ }
+
+ emailDomain = randDomain + "." + randomElementFromSliceString(tld)
+ }
+
+ return (emailName + "@" + emailDomain), nil
+}
+
+// Email generates random email id
+func (internet Internet) Email(v reflect.Value) (interface{}, error) {
+ return internet.email()
+}
+
+// Email get email randomly in string
+func Email(opts ...options.OptionFunc) string {
+ return singleFakeData(EmailTag, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ r, err := i.email()
+ if err != nil {
+ panic(err.Error())
+ }
+ return r
+ }, opts...).(string)
+}
+
+func (internet Internet) macAddress() string {
+ ip := make([]byte, 6)
+ for i := 0; i < 6; i++ {
+ ip[i] = byte(rand.Intn(256))
+ }
+ return net.HardwareAddr(ip).String()
+}
+
+// MacAddress generates random MacAddress
+func (internet Internet) MacAddress(v reflect.Value) (interface{}, error) {
+ return internet.macAddress(), nil
+}
+
+// MacAddress get mac address randomly in string
+func MacAddress(opts ...options.OptionFunc) string {
+ return singleFakeData(MacAddressTag, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ return i.macAddress()
+ }, opts...).(string)
+}
+
+func (internet Internet) domainName() (string, error) {
+ domainPart, err := randomString(7, internet.fakerOption)
+ if err != nil {
+ return "", err
+ }
+ return (strings.ToLower(domainPart) + "." + randomElementFromSliceString(tld)), nil
+}
+
+// DomainName generates random domain name
+func (internet Internet) DomainName(v reflect.Value) (interface{}, error) {
+ return internet.domainName()
+}
+
+// DomainName get email domain name in string
+func DomainName(opts ...options.OptionFunc) string {
+ return singleFakeData(DomainNameTag, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ d, err := i.domainName()
+ if err != nil {
+ panic(err.Error())
+ }
+ return d
+ }, opts...).(string)
+}
+
+func (internet Internet) url() (string, error) {
+ format := randomElementFromSliceString(urlFormats)
+ countVerbs := strings.Count(format, "%s")
+ d, err := internet.domainName()
+ if err != nil {
+ return "", nil
+ }
+ if countVerbs == 1 {
+ return fmt.Sprintf(format, d), nil
+ }
+ u, err := internet.username()
+ if err != nil {
+ return "", err
+ }
+ return fmt.Sprintf(format, d, u), nil
+}
+
+// URL generates random URL standardized in urlFormats const
+func (internet Internet) URL(v reflect.Value) (interface{}, error) {
+ return internet.url()
+}
+
+// URL get Url randomly in string
+func URL(opts ...options.OptionFunc) string {
+ return singleFakeData(URLTag, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ u, err := i.url()
+ if err != nil {
+ panic(err.Error())
+ }
+ return u
+ }, opts...).(string)
+}
+
+func (internet Internet) username() (string, error) {
+ return randomString(7, internet.fakerOption)
+}
+
+// UserName generates random username
+func (internet Internet) UserName(v reflect.Value) (interface{}, error) {
+ return internet.username()
+}
+
+// Username get username randomly in string
+func Username(opts ...options.OptionFunc) string {
+ return singleFakeData(UserNameTag, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ u, err := i.username()
+ if err != nil {
+ panic(err.Error())
+ }
+ return u
+ }, opts...).(string)
+}
+
+func (internet Internet) ipv4() string {
+ size := 4
+ ip := make([]byte, size)
+ for i := 0; i < size; i++ {
+ ip[i] = byte(rand.Intn(256))
+ }
+ return net.IP(ip).To4().String()
+}
+
+// IPv4 generates random IPv4 address
+func (internet Internet) IPv4(v reflect.Value) (interface{}, error) {
+ return internet.ipv4(), nil
+}
+
+// IPv4 get IPv4 randomly in string
+func IPv4(opts ...options.OptionFunc) string {
+ return singleFakeData(IPV4Tag, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ return i.ipv4()
+ }, opts...).(string)
+}
+
+func (internet Internet) ipv6() string {
+ size := 16
+ ip := make([]byte, size)
+ for i := 0; i < size; i++ {
+ ip[i] = byte(rand.Intn(256))
+ }
+ return net.IP(ip).To16().String()
+}
+
+// IPv6 generates random IPv6 address
+func (internet Internet) IPv6(v reflect.Value) (interface{}, error) {
+ return internet.ipv6(), nil
+}
+
+// IPv6 get IPv6 randomly in string
+func IPv6(opts ...options.OptionFunc) string {
+ return singleFakeData(IPV6Tag, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ return i.ipv6()
+ }, opts...).(string)
+}
+
+func (internet Internet) password() (string, error) {
+ return randomString(50, internet.fakerOption)
+}
+
+// Password returns a hashed password
+func (internet Internet) Password(v reflect.Value) (interface{}, error) {
+ return internet.password()
+}
+
+// Password get password randomly in string
+func Password(opts ...options.OptionFunc) string {
+ return singleFakeData(PASSWORD, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ p, err := i.password()
+ if err != nil {
+ panic(err.Error())
+ }
+ return p
+ }, opts...).(string)
+}
+
+func (internet Internet) jwt() (string, error) {
+ element, err := randomString(40, internet.fakerOption)
+ sl := element[:]
+ if err != nil {
+ return "", err
+ }
+ return strings.Join([]string{sl, sl, sl}, "."), nil
+}
+
+// Jwt returns a jwt-like random string in xxxx.yyyy.zzzz style
+func (internet Internet) Jwt(v reflect.Value) (interface{}, error) {
+ return internet.jwt()
+}
+
+// Jwt get jwt-like string
+func Jwt(opts ...options.OptionFunc) string {
+ return singleFakeData(JWT, func() interface{} {
+ opt := options.BuildOptions(opts)
+ i := Internet{fakerOption: *opt}
+ p, err := i.jwt()
+ if err != nil {
+ panic(err.Error())
+ }
+ return p
+ }, opts...).(string)
+}
diff --git a/vendor/github.com/go-faker/faker/v4/lorem.go b/vendor/github.com/go-faker/faker/v4/lorem.go
new file mode 100644
index 0000000..27c1144
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/lorem.go
@@ -0,0 +1,142 @@
+package faker
+
+import (
+ "reflect"
+ "strings"
+
+ "golang.org/x/text/cases"
+ "golang.org/x/text/language"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+var wordList = []string{
+ "alias", "consequatur", "aut", "perferendis", "sit", "voluptatem",
+ "accusantium", "doloremque", "aperiam", "eaque", "ipsa", "quae", "ab",
+ "illo", "inventore", "veritatis", "et", "quasi", "architecto",
+ "beatae", "vitae", "dicta", "sunt", "explicabo", "aspernatur", "aut",
+ "odit", "aut", "fugit", "sed", "quia", "consequuntur", "magni",
+ "dolores", "eos", "qui", "ratione", "voluptatem", "sequi", "nesciunt",
+ "neque", "dolorem", "ipsum", "quia", "dolor", "sit", "amet",
+ "consectetur", "adipisci", "velit", "sed", "quia", "non", "numquam",
+ "eius", "modi", "tempora", "incidunt", "ut", "labore", "et", "dolore",
+ "magnam", "aliquam", "quaerat", "voluptatem", "ut", "enim", "ad",
+ "minima", "veniam", "quis", "nostrum", "exercitationem", "ullam",
+ "corporis", "nemo", "enim", "ipsam", "voluptatem", "quia", "voluptas",
+ "sit", "suscipit", "laboriosam", "nisi", "ut", "aliquid", "ex", "ea",
+ "commodi", "consequatur", "quis", "autem", "vel", "eum", "iure",
+ "reprehenderit", "qui", "in", "ea", "voluptate", "velit", "esse",
+ "quam", "nihil", "molestiae", "et", "iusto", "odio", "dignissimos",
+ "ducimus", "qui", "blanditiis", "praesentium", "laudantium", "totam",
+ "rem", "voluptatum", "deleniti", "atque", "corrupti", "quos",
+ "dolores", "et", "quas", "molestias", "excepturi", "sint",
+ "occaecati", "cupiditate", "non", "provident", "sed", "ut",
+ "perspiciatis", "unde", "omnis", "iste", "natus", "error",
+ "similique", "sunt", "in", "culpa", "qui", "officia", "deserunt",
+ "mollitia", "animi", "id", "est", "laborum", "et", "dolorum", "fuga",
+ "et", "harum", "quidem", "rerum", "facilis", "est", "et", "expedita",
+ "distinctio", "nam", "libero", "tempore", "cum", "soluta", "nobis",
+ "est", "eligendi", "optio", "cumque", "nihil", "impedit", "quo",
+ "porro", "quisquam", "est", "qui", "minus", "id", "quod", "maxime",
+ "placeat", "facere", "possimus", "omnis", "voluptas", "assumenda",
+ "est", "omnis", "dolor", "repellendus", "temporibus", "autem",
+ "quibusdam", "et", "aut", "consequatur", "vel", "illum", "qui",
+ "dolorem", "eum", "fugiat", "quo", "voluptas", "nulla", "pariatur",
+ "at", "vero", "eos", "et", "accusamus", "officiis", "debitis", "aut",
+ "rerum", "necessitatibus", "saepe", "eveniet", "ut", "et",
+ "voluptates", "repudiandae", "sint", "et", "molestiae", "non",
+ "recusandae", "itaque", "earum", "rerum", "hic", "tenetur", "a",
+ "sapiente", "delectus", "ut", "aut", "reiciendis", "voluptatibus",
+ "maiores", "doloribus", "asperiores", "repellat",
+}
+
+// DataFaker generates randomized Words, Sentences and Paragraphs
+type DataFaker interface {
+ Word(v reflect.Value) (interface{}, error)
+ Sentence(v reflect.Value) (interface{}, error)
+ Paragraph(v reflect.Value) (interface{}, error)
+}
+
+// GetLorem returns a new DataFaker interface of Lorem struct
+func GetLorem() DataFaker {
+ lorem := &Lorem{}
+ return lorem
+}
+
+// Lorem struct
+type Lorem struct {
+}
+
+func (l Lorem) word() string {
+ return randomElementFromSliceString(wordList)
+}
+
+// Word returns a word from the wordList const
+func (l Lorem) Word(v reflect.Value) (interface{}, error) {
+ return l.word(), nil
+}
+
+// Word get a word randomly in string
+func Word(opts ...options.OptionFunc) string {
+ i := Lorem{}
+ return singleFakeData(WORD, func() interface{} {
+ return i.word()
+ }, opts...).(string)
+}
+
+func (l Lorem) sentence(sentence *strings.Builder) *strings.Builder {
+ r, _ := RandomInt(0, len(wordList)-1, 6)
+ size := len(r)
+ for key, val := range r {
+ if key == 0 {
+ sentence.WriteString(cases.Title(language.Und, cases.NoLower).String(wordList[val]))
+ } else {
+ sentence.WriteString(wordList[val])
+ }
+ if key != size-1 {
+ sentence.WriteString(" ")
+ }
+ }
+
+ sentence.WriteString(".")
+ return sentence
+}
+
+// Sentence returns a sentence using the wordList const
+func (l Lorem) Sentence(_ reflect.Value) (interface{}, error) {
+ sentence := l.sentence(&strings.Builder{})
+ return sentence.String(), nil
+}
+
+// Sentence get a sentence randomly in string
+func Sentence(opts ...options.OptionFunc) string {
+ i := Lorem{}
+ return singleFakeData(SENTENCE, func() interface{} {
+ return i.sentence(&strings.Builder{}).String()
+ }, opts...).(string)
+}
+
+func (l Lorem) paragraph() string {
+ paragraph := &strings.Builder{}
+ size := rand.Intn(10) + 1
+ for i := 0; i < size; i++ {
+ l.sentence(paragraph)
+ if i != size-1 {
+ paragraph.WriteString(" ")
+ }
+ }
+ return paragraph.String()
+}
+
+// Paragraph returns a series of sentences as a paragraph using the wordList const
+func (l Lorem) Paragraph(v reflect.Value) (interface{}, error) {
+ return l.paragraph(), nil
+}
+
+// Paragraph get a paragraph randomly in string
+func Paragraph(opts ...options.OptionFunc) string {
+ i := Lorem{}
+ return singleFakeData(PARAGRAPH, func() interface{} {
+ return i.paragraph()
+ }, opts...).(string)
+}
diff --git a/vendor/github.com/go-faker/faker/v4/misc/addresses-us-1000.min.json b/vendor/github.com/go-faker/faker/v4/misc/addresses-us-1000.min.json
new file mode 100644
index 0000000..e91bf62
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/misc/addresses-us-1000.min.json
@@ -0,0 +1 @@
+{"addresses":[{"address1":"1745 T Street Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20020","coordinates":{"lat":38.867033,"lng":-76.979235}},{"address1":"6007 Applegate Lane","address2":"","city":"Louisville","state":"KY","postalCode":"40219","coordinates":{"lat":38.1343013,"lng":-85.6498512}},{"address1":"560 Penstock Drive","address2":"","city":"Grass Valley","state":"CA","postalCode":"95945","coordinates":{"lat":39.213076,"lng":-121.077583}},{"address1":"150 Carter Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.76556000000001,"lng":-72.473091}},{"address1":"2721 Lindsay Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40206","coordinates":{"lat":38.263793,"lng":-85.700243}},{"address1":"18 Densmore Drive","address2":"","city":"Essex","state":"VT","postalCode":"05452","coordinates":{"lat":44.492953,"lng":-73.101883}},{"address1":"637 Britannia Drive","address2":"","city":"Vallejo","state":"CA","postalCode":"94591","coordinates":{"lat":38.10476999999999,"lng":-122.193849}},{"address1":"5601 West Crocus Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85306","coordinates":{"lat":33.6152469,"lng":-112.179737}},{"address1":"5403 Illinois Avenue","address2":"","city":"Nashville","state":"TN","postalCode":"37209","coordinates":{"lat":36.157077,"lng":-86.853827}},{"address1":"8821 West Myrtle Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85305","coordinates":{"lat":33.5404296,"lng":-112.2488391}},{"address1":"2203 7th Street Road","address2":"","city":"Louisville","state":"KY","postalCode":"40208","coordinates":{"lat":38.218107,"lng":-85.779006}},{"address1":"6463 Vrain Street","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.814056,"lng":-105.046913}},{"address1":"87 Horseshoe Drive","address2":"","city":"West Windsor","state":"VT","postalCode":"05037","coordinates":{"lat":43.4731793,"lng":-72.4967532}},{"address1":"60 Desousa Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7409259,"lng":-72.5619104}},{"address1":"4 Old Colony Way","address2":"","city":"Yarmouth","state":"MA","postalCode":"02664","coordinates":{"lat":41.697168,"lng":-70.189992}},{"address1":"314 South 17th Street","address2":"","city":"Nashville","state":"TN","postalCode":"37206","coordinates":{"lat":36.1719075,"lng":-86.740228}},{"address1":"1649 Timberridge Court","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.084563,"lng":-94.206082}},{"address1":"5461 West Shades Valley Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36108","coordinates":{"lat":32.296422,"lng":-86.34280299999999}},{"address1":"629 Debbie Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37076","coordinates":{"lat":36.208114,"lng":-86.58621199999999}},{"address1":"22572 Toreador Drive","address2":"","city":"Salinas","state":"CA","postalCode":"93908","coordinates":{"lat":36.602449,"lng":-121.699071}},{"address1":"3034 Mica Street","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.0807929,"lng":-94.2066449}},{"address1":"3729 East Mission Boulevard","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0919353,"lng":-94.10654219999999}},{"address1":"5114 Greentree Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.0618539,"lng":-86.738508}},{"address1":"3466 Southview Avenue","address2":"","city":"Montgomery","state":"AL","postalCode":"36111","coordinates":{"lat":32.341227,"lng":-86.2846859}},{"address1":"1513 Cathy Street","address2":"","city":"Savannah","state":"GA","postalCode":"31415","coordinates":{"lat":32.067416,"lng":-81.125331}},{"address1":"600 West 19th Avenue","address2":"APT B","city":"Anchorage","state":"AK","postalCode":"99503","coordinates":{"lat":61.203115,"lng":-149.894107}},{"address1":"1208 Elkader Court North","address2":"","city":"Nashville","state":"TN","postalCode":"37013","coordinates":{"lat":36.080049,"lng":-86.60116099999999}},{"address1":"210 Green Road","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.7909099,"lng":-72.51195129999999}},{"address1":"49548 Road 200","address2":"","city":"O'Neals","state":"CA","postalCode":"93645","coordinates":{"lat":37.153463,"lng":-119.648192}},{"address1":"81 Seaton Place Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20001","coordinates":{"lat":38.9149499,"lng":-77.01170259999999}},{"address1":"1267 Martin Street","address2":"#203","city":"Nashville","state":"TN","postalCode":"37203","coordinates":{"lat":36.1404897,"lng":-86.7695179}},{"address1":"7431 Candace Way","address2":"#1","city":"Louisville","state":"KY","postalCode":"40214","coordinates":{"lat":38.142768,"lng":-85.7717132}},{"address1":"1407 Walden Court","address2":"","city":"Crofton","state":"MD","postalCode":"21114","coordinates":{"lat":39.019306,"lng":-76.660653}},{"address1":"5906 Milton Avenue","address2":"","city":"Deale","state":"MD","postalCode":"20751","coordinates":{"lat":38.784451,"lng":-76.54125499999999}},{"address1":"74 Springfield Street","address2":"B","city":"Agawam","state":"MA","postalCode":"01001","coordinates":{"lat":42.0894922,"lng":-72.6297558}},{"address1":"2905 Stonebridge Court","address2":"","city":"Norman","state":"OK","postalCode":"73071","coordinates":{"lat":35.183319,"lng":-97.40210499999999}},{"address1":"20930 Todd Valley Road","address2":"","city":"Foresthill","state":"CA","postalCode":"95631","coordinates":{"lat":38.989466,"lng":-120.883108}},{"address1":"5928 West Mauna Loa Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85306","coordinates":{"lat":33.6204899,"lng":-112.18702}},{"address1":"802 Madison Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20011","coordinates":{"lat":38.9582381,"lng":-77.0244287}},{"address1":"2811 Battery Place Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20016","coordinates":{"lat":38.9256252,"lng":-77.0982646}},{"address1":"210 Lacross Lane","address2":"","city":"Westmore","state":"VT","postalCode":"05860","coordinates":{"lat":44.771005,"lng":-72.048664}},{"address1":"2010 Rising Hill Drive","address2":"","city":"Norman","state":"OK","postalCode":"73071","coordinates":{"lat":35.177281,"lng":-97.411869}},{"address1":"388 East Main Street","address2":"","city":"Middlebury","state":"VT","postalCode":"05753","coordinates":{"lat":43.9727945,"lng":-73.1023187}},{"address1":"450 Kinhawk Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.030927,"lng":-86.71949099999999}},{"address1":"131 Westerly Street","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.7906813,"lng":-72.53559729999999}},{"address1":"308 Woodleaf Court","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21061","coordinates":{"lat":39.1425931,"lng":-76.6238441}},{"address1":"8502 Madrone Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40258","coordinates":{"lat":38.1286407,"lng":-85.8678042}},{"address1":"23 Sable Run Lane","address2":"","city":"Methuen","state":"MA","postalCode":"01844","coordinates":{"lat":42.759847,"lng":-71.157721}},{"address1":"716 Waller Road","address2":"","city":"Brentwood","state":"TN","postalCode":"37027","coordinates":{"lat":35.998892,"lng":-86.696529}},{"address1":"416 McIver Street","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.10436,"lng":-86.74411599999999}},{"address1":"1508 Massachusetts Avenue Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20003","coordinates":{"lat":38.887255,"lng":-76.98318499999999}},{"address1":"5615 West Villa Maria Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.650988,"lng":-112.180624}},{"address1":"3162 Martin Luther King Junior Boulevard","address2":"#2","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.05233310000001,"lng":-94.2056987}},{"address1":"5306 Ritchie Highway","address2":"","city":"Baltimore","state":"MD","postalCode":"21225","coordinates":{"lat":39.221978,"lng":-76.614183}},{"address1":"109 Summit Street","address2":"","city":"Burlington","state":"VT","postalCode":"05401","coordinates":{"lat":44.4729749,"lng":-73.2026566}},{"address1":"816 West 19th Avenue","address2":"","city":"Anchorage","state":"AK","postalCode":"99503","coordinates":{"lat":61.203221,"lng":-149.898655}},{"address1":"172 Alburg Springs Road","address2":"","city":"Alburgh","state":"VT","postalCode":"05440","coordinates":{"lat":44.995827,"lng":-73.2201539}},{"address1":"159 Downey Drive","address2":"A","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7800126,"lng":-72.5754309}},{"address1":"125 John Street","address2":"","city":"Santa Cruz","state":"CA","postalCode":"95060","coordinates":{"lat":36.950901,"lng":-122.046881}},{"address1":"1101 Lotus Avenue","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21061","coordinates":{"lat":39.191982,"lng":-76.6525659}},{"address1":"8376 Albacore Drive","address2":"","city":"Pasadena","state":"MD","postalCode":"21122","coordinates":{"lat":39.110409,"lng":-76.46565799999999}},{"address1":"491 Arabian Way","address2":"","city":"Grand Junction","state":"CO","postalCode":"81504","coordinates":{"lat":39.07548999999999,"lng":-108.474785}},{"address1":"12245 West 71st Place","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.8267078,"lng":-105.1366798}},{"address1":"80 North East Street","address2":"#4","city":"Holyoke","state":"MA","postalCode":"01040","coordinates":{"lat":42.2041219,"lng":-72.5977704}},{"address1":"4695 East Huntsville Road","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0471975,"lng":-94.0946286}},{"address1":"310 Timrod Road","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.756758,"lng":-72.493501}},{"address1":"1364 Capri Drive","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.2207276,"lng":-85.6808795}},{"address1":"132 Laurel Green Court","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":32.0243075,"lng":-81.2468102}},{"address1":"6657 West Rose Garden Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.676018,"lng":-112.201658}},{"address1":"519 West 75th Avenue","address2":"#APT 000003","city":"Anchorage","state":"AK","postalCode":"99518","coordinates":{"lat":61.15288690000001,"lng":-149.889133}},{"address1":"31353 Santa Elena Way","address2":"","city":"Union City","state":"CA","postalCode":"94587","coordinates":{"lat":37.593981,"lng":-122.059762}},{"address1":"8398 West Denton Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85305","coordinates":{"lat":33.515353,"lng":-112.240812}},{"address1":"700 Winston Place","address2":"","city":"Anchorage","state":"AK","postalCode":"99504","coordinates":{"lat":61.215882,"lng":-149.737337}},{"address1":"232 Maine Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.1527033,"lng":-85.63207129999999}},{"address1":"1 Kempf Drive","address2":"","city":"Easton","state":"MA","postalCode":"02375","coordinates":{"lat":42.0505989,"lng":-71.08029379999999}},{"address1":"5811 Crossings Boulevard","address2":"","city":"Nashville","state":"TN","postalCode":"37013","coordinates":{"lat":36.0370847,"lng":-86.6413728}},{"address1":"5108 Franklin Street","address2":"","city":"Savannah","state":"GA","postalCode":"31405","coordinates":{"lat":32.034987,"lng":-81.121928}},{"address1":"913 Fallview Trail","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.02419100000001,"lng":-86.718305}},{"address1":"270 Chrissy's Court","address2":"","city":"Bristol","state":"VT","postalCode":"05443","coordinates":{"lat":44.1710043,"lng":-73.1065617}},{"address1":"130 Old Route 103","address2":"","city":"Chester","state":"VT","postalCode":"05143","coordinates":{"lat":43.224335,"lng":-72.54227399999999}},{"address1":"10826 Pointe Royal Drive","address2":"","city":"Bakersfield","state":"CA","postalCode":"93311","coordinates":{"lat":35.2930007,"lng":-119.1225908}},{"address1":"74 Ranch Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36109","coordinates":{"lat":32.383322,"lng":-86.235124}},{"address1":"6601 West Ocotillo Road","address2":"","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.53433,"lng":-112.2011246}},{"address1":"19416 Barclay Road","address2":"","city":"Castro Valley","state":"CA","postalCode":"94546","coordinates":{"lat":37.70382,"lng":-122.091054}},{"address1":"1347 Blackwalnut Court","address2":"","city":"Annapolis","state":"MD","postalCode":"21403","coordinates":{"lat":38.936881,"lng":-76.475823}},{"address1":"1770 Colony Way","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.0867,"lng":-94.229754}},{"address1":"165 Saint John Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7762171,"lng":-72.5410548}},{"address1":"2409 Research Boulevard","address2":"","city":"Fort Collins","state":"CO","postalCode":"80526","coordinates":{"lat":40.554586,"lng":-105.087852}},{"address1":"1903 Bashford Manor Lane","address2":"","city":"Louisville","state":"KY","postalCode":"40218","coordinates":{"lat":38.1977059,"lng":-85.675288}},{"address1":"8315 Surf Drive","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32408","coordinates":{"lat":30.163458,"lng":-85.785449}},{"address1":"3301 Old Muldoon Road","address2":"","city":"Anchorage","state":"AK","postalCode":"99504","coordinates":{"lat":61.1908348,"lng":-149.7340096}},{"address1":"8800 Cordell Circle","address2":"#APT 000003","city":"Anchorage","state":"AK","postalCode":"99502","coordinates":{"lat":61.1409305,"lng":-149.9437822}},{"address1":"117 East Cook Avenue","address2":"","city":"Anchorage","state":"AK","postalCode":"99501","coordinates":{"lat":61.230336,"lng":-149.883795}},{"address1":"6231 North 67th Avenue","address2":"#241","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5279666,"lng":-112.2022551}},{"address1":"8505 Waters Avenue","address2":"#66","city":"Savannah","state":"GA","postalCode":"31406","coordinates":{"lat":31.9901877,"lng":-81.1070672}},{"address1":"7 Underwood Place Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20012","coordinates":{"lat":38.969351,"lng":-77.009722}},{"address1":"21950 Arnold Center Road","address2":"","city":"Carson","state":"CA","postalCode":"90810","coordinates":{"lat":33.8272706,"lng":-118.2302826}},{"address1":"1427 South Carolina Avenue Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20003","coordinates":{"lat":38.886615,"lng":-76.9845349}},{"address1":"1420 Turtleback Trail","address2":"","city":"Panama City","state":"FL","postalCode":"32413","coordinates":{"lat":30.281084,"lng":-85.9677169}},{"address1":"6990 Pierson Street","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.824425,"lng":-105.122103}},{"address1":"376 North Williams Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.067997,"lng":-94.142563}},{"address1":"3617 Menlo Court","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.307397,"lng":-86.26001099999999}},{"address1":"711 Parker Street","address2":"","city":"East Longmeadow","state":"MA","postalCode":"01028","coordinates":{"lat":42.082262,"lng":-72.488113}},{"address1":"8521 Crystal Street","address2":"","city":"Anchorage","state":"AK","postalCode":"99502","coordinates":{"lat":61.143426,"lng":-149.94665}},{"address1":"1622 Edgar D Nixon Avenue","address2":"","city":"Montgomery","state":"AL","postalCode":"36104","coordinates":{"lat":32.356384,"lng":-86.3128909}},{"address1":"1608 Gales Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.8985542,"lng":-76.9813444}},{"address1":"122 East Hayes Street","address2":"","city":"Norman","state":"OK","postalCode":"73069","coordinates":{"lat":35.232121,"lng":-97.445053}},{"address1":"5144 Cattail Court","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.041153,"lng":-94.087419}},{"address1":"131 Kent Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.803084,"lng":-72.492786}},{"address1":"2313 Vegas Avenue","address2":"","city":"Castro Valley","state":"CA","postalCode":"94546","coordinates":{"lat":37.689189,"lng":-122.076775}},{"address1":"5420 Sunset Avenue","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32408","coordinates":{"lat":30.145603,"lng":-85.755095}},{"address1":"242 North Ash Street","address2":"","city":"Fruita","state":"CO","postalCode":"81521","coordinates":{"lat":39.161544,"lng":-108.725378}},{"address1":"38676 Greenwich Circle","address2":"","city":"Fremont","state":"CA","postalCode":"94536","coordinates":{"lat":37.562256,"lng":-121.976451}},{"address1":"2426 East Onyx Trail","address2":"#6","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.065707,"lng":-94.1276125}},{"address1":"110 Seaton Place Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20001","coordinates":{"lat":38.9146701,"lng":-77.01264680000001}},{"address1":"5385 Iris Street","address2":"","city":"Arvada","state":"CO","postalCode":"80002","coordinates":{"lat":39.794498,"lng":-105.106056}},{"address1":"5628 West Tonopah Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.6710947,"lng":-112.1810955}},{"address1":"65 Bay Drive","address2":"","city":"Annapolis","state":"MD","postalCode":"21403","coordinates":{"lat":38.937493,"lng":-76.45638699999999}},{"address1":"7401 North 61st Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5450005,"lng":-112.191417}},{"address1":"8 Watkins Road","address2":"","city":"Milton","state":"VT","postalCode":"05468","coordinates":{"lat":44.6028809,"lng":-73.17689299999999}},{"address1":"2209 June Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37214","coordinates":{"lat":36.16848,"lng":-86.695241}},{"address1":"1840 Nobel Place","address2":"","city":"Louisville","state":"KY","postalCode":"40216","coordinates":{"lat":38.198892,"lng":-85.8090129}},{"address1":"2622 Martin Luther King Junior Boulevard","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.053922,"lng":-94.1973008}},{"address1":"4 Glen Circle","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21060","coordinates":{"lat":39.157751,"lng":-76.60633399999999}},{"address1":"7529 West 72nd Avenue","address2":"#4","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.8276128,"lng":-105.0799305}},{"address1":"10996 Largo Drive","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.99178,"lng":-81.14366799999999}},{"address1":"2027 North Shannon Drive","address2":"#5","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0892622,"lng":-94.17333020000001}},{"address1":"154 Boca Lagoon Drive","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32408","coordinates":{"lat":30.171012,"lng":-85.77501099999999}},{"address1":"3311 Wiley Post Loop","address2":"","city":"Anchorage","state":"AK","postalCode":"99517","coordinates":{"lat":61.18686499999999,"lng":-149.946288}},{"address1":"5055 West 58th Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80002","coordinates":{"lat":39.8024171,"lng":-105.0505121}},{"address1":"3228 Chettenham Drive","address2":"","city":"Rancho Cordova","state":"CA","postalCode":"95670","coordinates":{"lat":38.577813,"lng":-121.301333}},{"address1":"1901 North Midwest Boulevard","address2":"","city":"Edmond","state":"OK","postalCode":"73034","coordinates":{"lat":35.67413,"lng":-97.39058399999999}},{"address1":"1536 North Main Street","address2":"","city":"Salinas","state":"CA","postalCode":"93906","coordinates":{"lat":36.7122208,"lng":-121.6522485}},{"address1":"33 Linscott Road","address2":"","city":"Hingham","state":"MA","postalCode":"02043","coordinates":{"lat":42.2257391,"lng":-70.8828675}},{"address1":"1732 27th Avenue","address2":"","city":"Oakland","state":"CA","postalCode":"94601","coordinates":{"lat":37.783431,"lng":-122.228238}},{"address1":"22 Gallatin Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20011","coordinates":{"lat":38.9526368,"lng":-77.0080993}},{"address1":"8125 Glynnwood Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.341844,"lng":-86.14093}},{"address1":"2139 Glynnwood Drive","address2":"","city":"Savannah","state":"GA","postalCode":"31404","coordinates":{"lat":32.021538,"lng":-81.06860999999999}},{"address1":"14 School Street","address2":"","city":"Medway","state":"MA","postalCode":"02053","coordinates":{"lat":42.141711,"lng":-71.395014}},{"address1":"264 Crest Drive","address2":"","city":"Soldotna","state":"AK","postalCode":"99669","coordinates":{"lat":60.497608,"lng":-151.080848}},{"address1":"307 Joel Street","address2":"","city":"Pooler","state":"GA","postalCode":"31322","coordinates":{"lat":32.123265,"lng":-81.24991}},{"address1":"188 River Road","address2":"","city":"Essex","state":"VT","postalCode":"05452","coordinates":{"lat":44.478846,"lng":-73.058294}},{"address1":"1643 Oxford Street","address2":"R C","city":"Berkeley","state":"CA","postalCode":"94709","coordinates":{"lat":37.877894,"lng":-122.266436}},{"address1":"5545 Saddlewood Lane","address2":"","city":"Brentwood","state":"TN","postalCode":"37027","coordinates":{"lat":36.026888,"lng":-86.7576629}},{"address1":"26466 Mockingbird Lane","address2":"","city":"Hayward","state":"CA","postalCode":"94544","coordinates":{"lat":37.6410262,"lng":-122.0864272}},{"address1":"4840 Reservoir Road Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20007","coordinates":{"lat":38.9158933,"lng":-77.0962873}},{"address1":"599 Cambridge Street","address2":"#303","city":"Cambridge","state":"MA","postalCode":"02141","coordinates":{"lat":42.3720518,"lng":-71.08610949999999}},{"address1":"584 Rural Hill Road","address2":"","city":"Nashville","state":"TN","postalCode":"37217","coordinates":{"lat":36.089291,"lng":-86.621854}},{"address1":"10262 West 59th Avenue","address2":"#1","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.803718,"lng":-105.111974}},{"address1":"945 South 5th Street","address2":"#1020","city":"Louisville","state":"KY","postalCode":"40203","coordinates":{"lat":38.2402351,"lng":-85.76031119999999}},{"address1":"2543 The Meadows","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.3463001,"lng":-86.2185382}},{"address1":"153 Atlantic Avenue","address2":"#6","city":"Salisbury","state":"MA","postalCode":"01952","coordinates":{"lat":42.8339101,"lng":-70.81575269999999}},{"address1":"9 Brooklyn Street","address2":"","city":"Morrisville","state":"VT","postalCode":"05488","coordinates":{"lat":44.924599,"lng":-73.12809399999999}},{"address1":"5722 8th Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20011","coordinates":{"lat":38.959305,"lng":-77.024463}},{"address1":"8700 Seaton Boulevard","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.3378676,"lng":-86.1731595}},{"address1":"1004 Bellflower Street","address2":"","city":"Livermore","state":"CA","postalCode":"94551","coordinates":{"lat":37.710745,"lng":-121.732765}},{"address1":"4738 Mallard Common","address2":"","city":"Fremont","state":"CA","postalCode":"94555","coordinates":{"lat":37.5666441,"lng":-122.0444344}},{"address1":"875 Latouche Street","address2":"#APT 001010","city":"Anchorage","state":"AK","postalCode":"99501","coordinates":{"lat":61.2132529,"lng":-149.8608243}},{"address1":"4940 Fuller Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36110","coordinates":{"lat":32.42936,"lng":-86.21683519999999}},{"address1":"5754 Belleau Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.394398,"lng":-86.203138}},{"address1":"1403 Lincoln Street","address2":"","city":"Savannah","state":"GA","postalCode":"31401","coordinates":{"lat":32.0613716,"lng":-81.09482249999999}},{"address1":"140 South Hill Avenue","address2":"#305","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0618737,"lng":-94.16920189999999}},{"address1":"642 South 2nd Street","address2":"#608","city":"Louisville","state":"KY","postalCode":"40202","coordinates":{"lat":38.2472593,"lng":-85.7549195}},{"address1":"6473 Zephyr Street","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.814341,"lng":-105.085116}},{"address1":"4250 North Valley Lake Drive","address2":"#8","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.1279064,"lng":-94.12180719999999}},{"address1":"565 North Lakeshore Drive","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32413","coordinates":{"lat":30.246868,"lng":-85.918511}},{"address1":"5514 West Wedington Drive","address2":"#3","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.079411,"lng":-94.240031}},{"address1":"1909 Wainwright Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.183868,"lng":-85.722174}},{"address1":"4525 West Frier Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5488732,"lng":-112.1565998}},{"address1":"201 West Montgomery Cross Road","address2":"#170","city":"Savannah","state":"GA","postalCode":"31406","coordinates":{"lat":31.9996137,"lng":-81.13121}},{"address1":"915 Heath Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36108","coordinates":{"lat":32.363883,"lng":-86.333247}},{"address1":"95 Briarwood Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.745751,"lng":-72.542544}},{"address1":"69 Washington Street","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.78712489999999,"lng":-72.52083069999999}},{"address1":"2900 North Western Avenue","address2":"","city":"Edmond","state":"OK","postalCode":"73012","coordinates":{"lat":35.687568,"lng":-97.53227299999999}},{"address1":"7841 West Kristal Way","address2":"","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.658804,"lng":-112.228834}},{"address1":"361 Parmley Lane","address2":"","city":"Nashville","state":"TN","postalCode":"37207","coordinates":{"lat":36.2446128,"lng":-86.8197718}},{"address1":"6120 Southeast 84th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73135","coordinates":{"lat":35.380836,"lng":-97.41582}},{"address1":"9428 North 65th Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85302","coordinates":{"lat":33.571222,"lng":-112.20045}},{"address1":"11 Meeting Place Circle","address2":"","city":"Boxford","state":"MA","postalCode":"01921","coordinates":{"lat":42.6946519,"lng":-71.0008529}},{"address1":"4438 Maine Avenue","address2":"","city":"Baldwin Park","state":"CA","postalCode":"91706","coordinates":{"lat":34.093409,"lng":-117.959953}},{"address1":"65 Jones Lane","address2":"","city":"Montevallo","state":"AL","postalCode":"35115","coordinates":{"lat":33.096851,"lng":-86.846577}},{"address1":"3140 Commander Drive","address2":"","city":"Louisville","state":"KY","postalCode":"40220","coordinates":{"lat":38.215781,"lng":-85.653981}},{"address1":"107 Guaymas Place","address2":"","city":"Davis","state":"CA","postalCode":"95616","coordinates":{"lat":38.567048,"lng":-121.746046}},{"address1":"6114 West Glenn Drive","address2":"#1","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5401454,"lng":-112.1912722}},{"address1":"622 Thomas Street","address2":"","city":"Woodland","state":"CA","postalCode":"95776","coordinates":{"lat":38.672731,"lng":-121.76065}},{"address1":"127 Grand Heron Drive","address2":"","city":"Panama City","state":"FL","postalCode":"32407","coordinates":{"lat":30.189702,"lng":-85.80841099999999}},{"address1":"3504 East 16th Avenue","address2":"","city":"Anchorage","state":"AK","postalCode":"99508","coordinates":{"lat":61.2058945,"lng":-149.8158624}},{"address1":"1230 Stafford Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.32403,"lng":-86.14840099999999}},{"address1":"6007 Yarrow Street","address2":"H","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.806211,"lng":-105.084446}},{"address1":"632 Belmar Drive","address2":"","city":"Edmond","state":"OK","postalCode":"73025","coordinates":{"lat":35.7016024,"lng":-97.4912627}},{"address1":"1515 Chandlee Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.176365,"lng":-85.666253}},{"address1":"10632 Admiral Court","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73162","coordinates":{"lat":35.57886200000001,"lng":-97.6270728}},{"address1":"11655 West 81st Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.84356820000001,"lng":-105.1297584}},{"address1":"3500 Blanchard Drive Southwest","address2":"","city":"Washington","state":"DC","postalCode":"20032","coordinates":{"lat":38.8388931,"lng":-77.02011139999999}},{"address1":"2755 Country Drive","address2":"#244","city":"Fremont","state":"CA","postalCode":"94536","coordinates":{"lat":37.557882,"lng":-121.986823}},{"address1":"1850 Berryhill Place","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.3527548,"lng":-86.16858669999999}},{"address1":"58 North U.S.A Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":35.994914,"lng":-94.185867}},{"address1":"8785 Ellis Court","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.853725,"lng":-105.158861}},{"address1":"1636 Briarview Court","address2":"","city":"Severn","state":"MD","postalCode":"21144","coordinates":{"lat":39.12539599999999,"lng":-76.704015}},{"address1":"12 Knox Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.774166,"lng":-72.527697}},{"address1":"425 Middle Turnpike East","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7847772,"lng":-72.50354829999999}},{"address1":"2017 North Hartford Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.08820499999999,"lng":-94.1074905}},{"address1":"5900 Upland Road","address2":"","city":"Brooklyn Park","state":"MD","postalCode":"21225","coordinates":{"lat":39.213888,"lng":-76.61925099999999}},{"address1":"9331 Edison Road","address2":"","city":"Lithia","state":"FL","postalCode":"33547","coordinates":{"lat":27.86851,"lng":-82.07391199999999}},{"address1":"1810 Orchard Place","address2":"","city":"Anchorage","state":"AK","postalCode":"99502","coordinates":{"lat":61.145912,"lng":-149.9134259}},{"address1":"145 Grau Drive","address2":"","city":"Fremont","state":"CA","postalCode":"94536","coordinates":{"lat":37.582453,"lng":-121.994476}},{"address1":"3959 Fairlands Drive","address2":"","city":"Pleasanton","state":"CA","postalCode":"94588","coordinates":{"lat":37.6992001,"lng":-121.8703701}},{"address1":"3613 East 18th Avenue","address2":"","city":"Anchorage","state":"AK","postalCode":"99508","coordinates":{"lat":61.20485339999999,"lng":-149.8135521}},{"address1":"1275 South Holland Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.051782,"lng":-94.226855}},{"address1":"109 Cambridge Station Road","address2":"","city":"Louisville","state":"KY","postalCode":"40223","coordinates":{"lat":38.244527,"lng":-85.56912799999999}},{"address1":"2107 Elfen Glen","address2":"Apt B","city":"Van Buren","state":"AR","postalCode":"72956","coordinates":{"lat":35.469752,"lng":-94.364987}},{"address1":"8522 Ingalls Circle","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.8528593,"lng":-105.0629778}},{"address1":"1809 Cedar Drive","address2":"","city":"Severn","state":"MD","postalCode":"21144","coordinates":{"lat":39.139311,"lng":-76.72028999999999}},{"address1":"1376 Oakland Avenue","address2":"#1","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.080981,"lng":-94.172549}},{"address1":"4306 Bylsma Circle","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.223294,"lng":-85.589715}},{"address1":"233 Buckland Hills Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.8100683,"lng":-72.5453665}},{"address1":"7701 Southwest 104th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73169","coordinates":{"lat":35.3641983,"lng":-97.6475346}},{"address1":"14003 Crossbranch Court","address2":"","city":"Louisville","state":"KY","postalCode":"40245","coordinates":{"lat":38.242033,"lng":-85.489885}},{"address1":"19590 East Batavia Drive","address2":"","city":"Aurora","state":"CO","postalCode":"80011","coordinates":{"lat":39.7420886,"lng":-104.7581149}},{"address1":"6424 Simms Street","address2":"#71","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.8133443,"lng":-105.1283237}},{"address1":"718 Dutchmans Court","address2":"","city":"Nashville","state":"TN","postalCode":"37076","coordinates":{"lat":36.2048851,"lng":-86.5994752}},{"address1":"8496 Isles Court","address2":"","city":"Pasadena","state":"MD","postalCode":"21122","coordinates":{"lat":39.111297,"lng":-76.467049}},{"address1":"100 East Joyce Boulevard","address2":"#110","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.1253411,"lng":-94.1551631}},{"address1":"9036 Calico Court","address2":"","city":"Hesperia","state":"CA","postalCode":"92344","coordinates":{"lat":34.414491,"lng":-117.375403}},{"address1":"2723 East Joyce Boulevard","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.119414,"lng":-94.12229500000001}},{"address1":"90 Via Verde","address2":"","city":"San Lorenzo","state":"CA","postalCode":"94580","coordinates":{"lat":37.67869,"lng":-122.117142}},{"address1":"1015 Castle Road","address2":"","city":"Edmond","state":"OK","postalCode":"73034","coordinates":{"lat":35.665019,"lng":-97.466045}},{"address1":"2787 West Blackstone Crossing","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.0608984,"lng":-94.1993461}},{"address1":"3555 Alamosa Drive","address2":"","city":"Anchorage","state":"AK","postalCode":"99502","coordinates":{"lat":61.142316,"lng":-149.9454749}},{"address1":"6231 North 59th Avenue","address2":"#35","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5285304,"lng":-112.1860744}},{"address1":"311 South Panama Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36107","coordinates":{"lat":32.376833,"lng":-86.27416099999999}},{"address1":"3313 Daisy Trail","address2":"","city":"Nashville","state":"TN","postalCode":"37013","coordinates":{"lat":36.076186,"lng":-86.60113799999999}},{"address1":"5436 Dorbrandt Street","address2":"#APT 000002","city":"Anchorage","state":"AK","postalCode":"99518","coordinates":{"lat":61.17090200000001,"lng":-149.904782}},{"address1":"553 South Arlington Road","address2":"","city":"Orange","state":"CA","postalCode":"92869","coordinates":{"lat":33.7794839,"lng":-117.820383}},{"address1":"615 Q Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20001","coordinates":{"lat":38.9113118,"lng":-77.0206808}},{"address1":"457 Mountain Village Boulevard","address2":"#320-3","city":"Mountain Village","state":"CO","postalCode":"81435","coordinates":{"lat":37.93323040000001,"lng":-107.8515732}},{"address1":"144 Lauderdale Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.309978,"lng":-86.259716}},{"address1":"2 Ambelwood Way","address2":"","city":"Savannah","state":"GA","postalCode":"31411","coordinates":{"lat":31.9138389,"lng":-81.07297989999999}},{"address1":"4113 Holiday Drive","address2":"","city":"Panama City","state":"FL","postalCode":"32408","coordinates":{"lat":30.1548681,"lng":-85.7709976}},{"address1":"2001 Van Hoose Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.039421,"lng":-94.065534}},{"address1":"9457 Winfield Place","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.341347,"lng":-86.14867799999999}},{"address1":"1120 Mitchell Young Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36108","coordinates":{"lat":32.327464,"lng":-86.44011599999999}},{"address1":"12816 West 65th Way","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.8141779,"lng":-105.1426275}},{"address1":"10 Erick Road","address2":"#47","city":"Mansfield","state":"MA","postalCode":"02048","coordinates":{"lat":42.032505,"lng":-71.17718599999999}},{"address1":"481 East Redbud Lane","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.103899,"lng":-94.151128}},{"address1":"320 Northwest 22nd Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73103","coordinates":{"lat":35.491908,"lng":-97.51843099999999}},{"address1":"33 South Hill Avenue","address2":"#306","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0619602,"lng":-94.16977700000001}},{"address1":"355 Gillette Road","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.061143,"lng":-86.70823299999999}},{"address1":"151 Main Street","address2":"","city":"Savannah","state":"GA","postalCode":"31408","coordinates":{"lat":32.113199,"lng":-81.148934}},{"address1":"545 Tracey Drive","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.1354251,"lng":-85.5573034}},{"address1":"3 Southerberry Drive","address2":"","city":"Milton","state":"VT","postalCode":"05468","coordinates":{"lat":44.62322460000001,"lng":-73.1326629}},{"address1":"736 Sicard Street Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20003","coordinates":{"lat":38.8729038,"lng":-76.9949528}},{"address1":"6214 Herzog Street","address2":"","city":"Oakland","state":"CA","postalCode":"94608","coordinates":{"lat":37.84557849999999,"lng":-122.2825201}},{"address1":"1160 North College Avenue","address2":"#2","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0785477,"lng":-94.1566273}},{"address1":"5843 West McLellan Road","address2":"","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5330898,"lng":-112.1857087}},{"address1":"1452 55th Avenue","address2":"B","city":"Oakland","state":"CA","postalCode":"94621","coordinates":{"lat":37.767671,"lng":-122.202326}},{"address1":"4255 Tanager Common","address2":"","city":"Fremont","state":"CA","postalCode":"94555","coordinates":{"lat":37.5738888,"lng":-122.0460256}},{"address1":"13426 West Rovey Avenue","address2":"","city":"Litchfield Park","state":"AZ","postalCode":"85340","coordinates":{"lat":33.522973,"lng":-112.34802}},{"address1":"195 Nursery Street","address2":"#D10","city":"Springfield","state":"MA","postalCode":"01104","coordinates":{"lat":42.1178409,"lng":-72.5892289}},{"address1":"126 Marjorie Lane","address2":"C","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.8073257,"lng":-72.5188292}},{"address1":"22 Charnock Street","address2":"#2","city":"Beverly","state":"MA","postalCode":"01915","coordinates":{"lat":42.55227,"lng":-70.876549}},{"address1":"817 25th Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20037","coordinates":{"lat":38.900077,"lng":-77.053066}},{"address1":"2552 Massachusetts Avenue Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20008","coordinates":{"lat":38.9165459,"lng":-77.057323}},{"address1":"1711 Lore Road","address2":"#APT 000106","city":"Anchorage","state":"AK","postalCode":"99507","coordinates":{"lat":61.15195259999999,"lng":-149.8511487}},{"address1":"19091 Northeast 23rd Street","address2":"","city":"Harrah","state":"OK","postalCode":"73045","coordinates":{"lat":35.493447,"lng":-97.193078}},{"address1":"8318 North 57th Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85302","coordinates":{"lat":33.557537,"lng":-112.183238}},{"address1":"7256 West 84th Way","address2":"#918","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.8506912,"lng":-105.0767393}},{"address1":"706 Seagrove Road","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21060","coordinates":{"lat":39.163384,"lng":-76.609205}},{"address1":"2318 Camryns Crossing","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.221926,"lng":-85.62420000000002}},{"address1":"968 Virginia Avenue","address2":"","city":"Olivehurst","state":"CA","postalCode":"95961","coordinates":{"lat":39.1022419,"lng":-121.581218}},{"address1":"416 South University Boulevard","address2":"","city":"Norman","state":"OK","postalCode":"73069","coordinates":{"lat":35.215351,"lng":-97.446319}},{"address1":"137 Gazebo East Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.3793507,"lng":-86.20407399999999}},{"address1":"10723 Colonial Woods Court","address2":"","city":"Louisville","state":"KY","postalCode":"40223","coordinates":{"lat":38.2496439,"lng":-85.55717709999999}},{"address1":"119 Matthew Lane","address2":"","city":"Nashville","state":"TN","postalCode":"37215","coordinates":{"lat":36.11663619999999,"lng":-86.80955829999999}},{"address1":"3142 West Finger Road","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.042837,"lng":-94.205309}},{"address1":"4 Elm Street","address2":"","city":"Windsor","state":"VT","postalCode":"05089","coordinates":{"lat":43.476997,"lng":-72.398925}},{"address1":"78 School Street","address2":"","city":"Woburn","state":"MA","postalCode":"01801","coordinates":{"lat":42.506877,"lng":-71.15299}},{"address1":"19020 North 68th Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.6574037,"lng":-112.2062039}},{"address1":"2849 Quail Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.095294,"lng":-94.20036300000001}},{"address1":"2456 22nd Avenue","address2":"","city":"Greeley","state":"CO","postalCode":"80631","coordinates":{"lat":40.397153,"lng":-104.713982}},{"address1":"200 Boulder Road","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7792079,"lng":-72.494963}},{"address1":"11150 Sun Valley Drive","address2":"","city":"Oakland","state":"CA","postalCode":"94605","coordinates":{"lat":37.752039,"lng":-122.11822}},{"address1":"505 Southeast 32nd Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73129","coordinates":{"lat":35.4325058,"lng":-97.5032743}},{"address1":"1025 West 19th Street","address2":"#UNIT 1-C","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.18252889999999,"lng":-85.676771}},{"address1":"6725 Pamela Court","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.334546,"lng":-86.20349999999999}},{"address1":"4714 Narrow Lane Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.3140725,"lng":-86.2819674}},{"address1":"11 Proctor Circle","address2":"","city":"Peabody","state":"MA","postalCode":"01960","coordinates":{"lat":42.535503,"lng":-70.953384}},{"address1":"10508 Kovats Court","address2":"","city":"Louisville","state":"KY","postalCode":"40223","coordinates":{"lat":38.2330381,"lng":-85.5695464}},{"address1":"3179 18th Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20010","coordinates":{"lat":38.9312712,"lng":-77.0412983}},{"address1":"3194 Bladensburg Road Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20018","coordinates":{"lat":38.930136,"lng":-76.95929799999999}},{"address1":"260 Rio Del Mar Boulevard","address2":"##14","city":"Aptos","state":"CA","postalCode":"95003","coordinates":{"lat":36.967915,"lng":-121.902513}},{"address1":"1040 West 27th Avenue","address2":"#APT 000401","city":"Anchorage","state":"AK","postalCode":"99503","coordinates":{"lat":61.195892,"lng":-149.901984}},{"address1":"42 Lake Lane","address2":"","city":"Westmore","state":"VT","postalCode":"05860","coordinates":{"lat":44.77954099999999,"lng":-72.0682889}},{"address1":"3718 Bay Tree Road","address2":"","city":"Lynn Haven","state":"FL","postalCode":"32444","coordinates":{"lat":30.205726,"lng":-85.63441999999999}},{"address1":"3408 Bellisima Place","address2":"#204","city":"Louisville","state":"KY","postalCode":"40245","coordinates":{"lat":38.2857023,"lng":-85.5023064}},{"address1":"4109 General Bate Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37204","coordinates":{"lat":36.099427,"lng":-86.787756}},{"address1":"5329 A Street","address2":"","city":"Greeley","state":"CO","postalCode":"80634","coordinates":{"lat":40.4347001,"lng":-104.7702805}},{"address1":"88 Shute Street","address2":"#1","city":"Everett","state":"MA","postalCode":"02149","coordinates":{"lat":42.4192568,"lng":-71.0469179}},{"address1":"480 Keene Road","address2":"","city":"Walden","state":"VT","postalCode":"05836","coordinates":{"lat":44.4879516,"lng":-72.2823264}},{"address1":"4 Cutting Avenue","address2":"","city":"Worcester","state":"MA","postalCode":"01606","coordinates":{"lat":42.307664,"lng":-71.79180099999999}},{"address1":"275 South 40th Street","address2":"","city":"Boulder","state":"CO","postalCode":"80305","coordinates":{"lat":39.988864,"lng":-105.247011}},{"address1":"1189 Northwest End Avenue","address2":"#D3","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0793885,"lng":-94.19657190000001}},{"address1":"25 Cliffside Drive","address2":"D","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.79505229999999,"lng":-72.48762169999999}},{"address1":"2515 60th Avenue","address2":"","city":"Oakland","state":"CA","postalCode":"94605","coordinates":{"lat":37.7705346,"lng":-122.1907449}},{"address1":"2057 Lucas Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36107","coordinates":{"lat":32.3934472,"lng":-86.2766814}},{"address1":"386 Daniels Road","address2":"","city":"New Haven","state":"VT","postalCode":"05472","coordinates":{"lat":44.114323,"lng":-73.1911159}},{"address1":"9805 Meadow Vale Drive","address2":"","city":"Louisville","state":"KY","postalCode":"40242","coordinates":{"lat":38.281955,"lng":-85.57182100000001}},{"address1":"8 Village Circle","address2":"","city":"Randolph","state":"VT","postalCode":"05060","coordinates":{"lat":43.927687,"lng":-72.65563}},{"address1":"1011 San Jose Street","address2":"","city":"San Leandro","state":"CA","postalCode":"94577","coordinates":{"lat":37.72956300000001,"lng":-122.147074}},{"address1":"2505 Walker Lane","address2":"","city":"Nashville","state":"TN","postalCode":"37207","coordinates":{"lat":36.2125119,"lng":-86.806625}},{"address1":"11225 West 79th Drive","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.840784,"lng":-105.124533}},{"address1":"1907 18th Avenue South","address2":"","city":"Nashville","state":"TN","postalCode":"37212","coordinates":{"lat":36.134703,"lng":-86.79737700000001}},{"address1":"16 Conway Street","address2":"","city":"Shelburne Falls","state":"MA","postalCode":"01370","coordinates":{"lat":42.6022637,"lng":-72.74100059999999}},{"address1":"20375 Wisteria Street","address2":"","city":"Castro Valley","state":"CA","postalCode":"94546","coordinates":{"lat":37.696683,"lng":-122.085865}},{"address1":"6408 Fern Crest Road","address2":"","city":"Louisville","state":"KY","postalCode":"40291","coordinates":{"lat":38.154488,"lng":-85.612144}},{"address1":"175 Creek Road","address2":"","city":"Castleton","state":"VT","postalCode":"05735","coordinates":{"lat":43.6055996,"lng":-73.2336737}},{"address1":"2531 Prestwick Avenue","address2":"","city":"Concord","state":"CA","postalCode":"94519","coordinates":{"lat":37.9966039,"lng":-122.0280747}},{"address1":"1002 Highland Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40204","coordinates":{"lat":38.2371577,"lng":-85.7367362}},{"address1":"2927 Leatherwood Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37214","coordinates":{"lat":36.156413,"lng":-86.65534099999999}},{"address1":"8467 Chase Drive","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.851766,"lng":-105.071498}},{"address1":"8556 Nelson Court","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.850965,"lng":-105.117879}},{"address1":"122 Summer Street","address2":"#1","city":"Medford","state":"MA","postalCode":"02155","coordinates":{"lat":42.415648,"lng":-71.116886}},{"address1":"12061 Johns Road","address2":"#APT 000002","city":"Anchorage","state":"AK","postalCode":"99515","coordinates":{"lat":61.111453,"lng":-149.8780899}},{"address1":"8358 WB&A Road","address2":"","city":"Severn","state":"MD","postalCode":"21144","coordinates":{"lat":39.108962,"lng":-76.68668799999999}},{"address1":"43 Henderson Avenue","address2":"","city":"Savannah","state":"GA","postalCode":"31406","coordinates":{"lat":31.97937899999999,"lng":-81.06062}},{"address1":"347 Brewer Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.054592,"lng":-86.708157}},{"address1":"2765 North Barcelona Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.102026,"lng":-94.15365}},{"address1":"5311 Chenoweth Park Lane","address2":"","city":"Louisville","state":"KY","postalCode":"40291","coordinates":{"lat":38.168051,"lng":-85.571491}},{"address1":"6398 Jellison Way","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.8118489,"lng":-105.1121974}},{"address1":"604 Northwest 118th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73114","coordinates":{"lat":35.5902559,"lng":-97.523444}},{"address1":"37 Rushforde Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.738226,"lng":-72.538398}},{"address1":"5434 West Beck Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85306","coordinates":{"lat":33.6266139,"lng":-112.176412}},{"address1":"1516 Ringe Drive","address2":"","city":"Severn","state":"MD","postalCode":"21144","coordinates":{"lat":39.094173,"lng":-76.68423299999999}},{"address1":"3701 Lake Towne Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37013","coordinates":{"lat":36.068871,"lng":-86.612042}},{"address1":"20250 North 67th Avenue","address2":"#2143","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.6705359,"lng":-112.2044722}},{"address1":"62 Prospect Avenue","address2":"#1","city":"Quincy","state":"MA","postalCode":"02170","coordinates":{"lat":42.261576,"lng":-71.020522}},{"address1":"25 Morton Street","address2":"#216","city":"Quincy","state":"MA","postalCode":"02169","coordinates":{"lat":42.24450900000001,"lng":-71.021176}},{"address1":"8202 4 Winds Drive","address2":"#3","city":"Lyndon","state":"KY","postalCode":"40222","coordinates":{"lat":38.26545309999999,"lng":-85.60216830000002}},{"address1":"513 Habberton Road","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.107299,"lng":-94.053033}},{"address1":"1960 Sigfrid Court","address2":"","city":"Annapolis","state":"MD","postalCode":"21401","coordinates":{"lat":38.998796,"lng":-76.564554}},{"address1":"663 Chesapeake Way","address2":"#1","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0498647,"lng":-94.1504411}},{"address1":"3354 Wilmington Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36105","coordinates":{"lat":32.345724,"lng":-86.301384}},{"address1":"8529 Old Harding Lane","address2":"","city":"Nashville","state":"TN","postalCode":"37221","coordinates":{"lat":36.027995,"lng":-87.014506}},{"address1":"22219 Panama City Beach Parkway","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32413","coordinates":{"lat":30.2620426,"lng":-85.96316709999999}},{"address1":"37 East Broad Street","address2":"","city":"Savannah","state":"GA","postalCode":"31401","coordinates":{"lat":32.0776278,"lng":-81.08469219999999}},{"address1":"1309 Columbia Road Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20009","coordinates":{"lat":38.9275945,"lng":-77.0307141}},{"address1":"1211 Castine Court","address2":"","city":"Pasadena","state":"MD","postalCode":"21122","coordinates":{"lat":39.1404092,"lng":-76.5313772}},{"address1":"906 West Berry Street","address2":"#204","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0760793,"lng":-94.1723526}},{"address1":"341 Oakland Street","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.805274,"lng":-72.5180772}},{"address1":"60 Downey Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7786337,"lng":-72.5757232}},{"address1":"3770 North Front Street","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.1183319,"lng":-94.1443548}},{"address1":"25 Church Street","address2":"A","city":"Pittsfield","state":"MA","postalCode":"01201","coordinates":{"lat":42.446859,"lng":-73.255836}},{"address1":"6578 Marauder Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37209","coordinates":{"lat":36.142929,"lng":-86.885521}},{"address1":"2747 68th Avenue","address2":"","city":"Oakland","state":"CA","postalCode":"94605","coordinates":{"lat":37.768532,"lng":-122.180694}},{"address1":"95 Woods Hill Road","address2":"","city":"Swanton","state":"VT","postalCode":"05488","coordinates":{"lat":44.897682,"lng":-73.0753299}},{"address1":"35 Keach Avenue","address2":"","city":"Worcester","state":"MA","postalCode":"01607","coordinates":{"lat":42.2269409,"lng":-71.801441}},{"address1":"1822 North Grand Avenue","address2":"","city":"Pueblo","state":"CO","postalCode":"81003","coordinates":{"lat":38.284427,"lng":-104.611581}},{"address1":"1809 U.S. 80","address2":"","city":"Savannah","state":"GA","postalCode":"31408","coordinates":{"lat":32.0847824,"lng":-81.16739679999999}},{"address1":"5065 North 54th Avenue","address2":"#8","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5118429,"lng":-112.1748805}},{"address1":"1261 Steamboat Drive","address2":"#3","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.0804859,"lng":-94.2049698}},{"address1":"1695 Archer Street","address2":"","city":"Savannah","state":"GA","postalCode":"31405","coordinates":{"lat":32.0475974,"lng":-81.13348289999999}},{"address1":"3904 October Woods Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37013","coordinates":{"lat":36.009291,"lng":-86.624016}},{"address1":"1223 Delaware Avenue","address2":"","city":"Deale","state":"MD","postalCode":"20733","coordinates":{"lat":38.799962,"lng":-76.51803699999999}},{"address1":"10383 Eagle River Lane","address2":"","city":"Anchorage","state":"AK","postalCode":"99577","coordinates":{"lat":61.31412899999999,"lng":-149.509103}},{"address1":"1314 89th Avenue","address2":"","city":"Oakland","state":"CA","postalCode":"94621","coordinates":{"lat":37.7497401,"lng":-122.1762833}},{"address1":"21 Longview Bluff Drive East","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.95754299999999,"lng":-81.13848899999999}},{"address1":"1689 Fisher Pond Road","address2":"","city":"Saint Albans City","state":"VT","postalCode":"05478","coordinates":{"lat":44.826977,"lng":-73.055054}},{"address1":"9920 West 81st Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.8446204,"lng":-105.1083834}},{"address1":"2732 Rosedale Place","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.1230861,"lng":-86.7625204}},{"address1":"10881 Northforde Drive","address2":"","city":"Cupertino","state":"CA","postalCode":"95014","coordinates":{"lat":37.335812,"lng":-122.023985}},{"address1":"926 Mill Court","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.959343,"lng":-81.142287}},{"address1":"7550 Kline Drive","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.8342031,"lng":-105.1106565}},{"address1":"5688 Johnson Court","address2":"","city":"Arvada","state":"CO","postalCode":"80002","coordinates":{"lat":39.798419,"lng":-105.109316}},{"address1":"4439 Gale Street","address2":"","city":"Livermore","state":"CA","postalCode":"94550","coordinates":{"lat":37.690199,"lng":-121.7411119}},{"address1":"6450 West Bethany Home Road","address2":"","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5242005,"lng":-112.1991369}},{"address1":"2931 Shady Oaks Drive","address2":"","city":"Evans","state":"CO","postalCode":"80620","coordinates":{"lat":40.384469,"lng":-104.726478}},{"address1":"6451 West Bell Road","address2":"#1144","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.6380231,"lng":-112.1986753}},{"address1":"644 West Maple Street","address2":"#2","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0703335,"lng":-94.1686289}},{"address1":"1219 North Storer Avenue","address2":"#66","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.078949,"lng":-94.17225499999999}},{"address1":"152 Holly Court","address2":"","city":"Mountain View","state":"CA","postalCode":"94043","coordinates":{"lat":37.390391,"lng":-122.060062}},{"address1":"6086 Kennedy Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.103629,"lng":-94.24773599999999}},{"address1":"2300 Deer Path Circle","address2":"#207","city":"Hurstbourne Acres","state":"KY","postalCode":"40220","coordinates":{"lat":38.2187876,"lng":-85.59292239999999}},{"address1":"802 East 37th Street","address2":"","city":"Savannah","state":"GA","postalCode":"31401","coordinates":{"lat":32.054012,"lng":-81.087324}},{"address1":"5821 Taft Street","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.8029119,"lng":-105.1308558}},{"address1":"188 Saint Matthews Avenue","address2":"#1","city":"Louisville","state":"KY","postalCode":"40207","coordinates":{"lat":38.2577576,"lng":-85.6546706}},{"address1":"68 Hampstead Place","address2":"","city":"Athol","state":"MA","postalCode":"01331","coordinates":{"lat":42.5894395,"lng":-72.2275859}},{"address1":"3164 West Woodfield Way","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.084691,"lng":-94.20445}},{"address1":"7998 Chase Circle","address2":"#1","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.841232,"lng":-105.057933}},{"address1":"1797 Pasatiempo Drive","address2":"","city":"Chico","state":"CA","postalCode":"95928","coordinates":{"lat":39.6777229,"lng":-121.7704692}},{"address1":"3722 Kisling Loop","address2":"","city":"Tyndall Air Force Base","state":"FL","postalCode":"32403","coordinates":{"lat":30.1048481,"lng":-85.65097360000001}},{"address1":"429 Patterson Street","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.102655,"lng":-86.744186}},{"address1":"6140 Fenton Street","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.8080314,"lng":-105.0601435}},{"address1":"7404 West Crest Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85310","coordinates":{"lat":33.6851098,"lng":-112.2167229}},{"address1":"7841 North 59th Lane","address2":"#G37","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5516587,"lng":-112.1879207}},{"address1":"8043 Cranberry Street","address2":"#APT 000001","city":"Anchorage","state":"AK","postalCode":"99502","coordinates":{"lat":61.14769579999999,"lng":-149.9369466}},{"address1":"173 Spruce Street","address2":"#18","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7705332,"lng":-72.51594109999999}},{"address1":"4712 Cherokee Heights Road","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.234223,"lng":-85.566684}},{"address1":"915 Sacramento Street","address2":"","city":"Bakersfield","state":"CA","postalCode":"93305","coordinates":{"lat":35.3798759,"lng":-119.0002119}},{"address1":"317 Windsor Road","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.973034,"lng":-81.141871}},{"address1":"1332 Maple Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36108","coordinates":{"lat":32.3589738,"lng":-86.3278235}},{"address1":"4709 Blagden Terrace Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20011","coordinates":{"lat":38.9481213,"lng":-77.0401892}},{"address1":"5102 Ander Drive","address2":"","city":"Brentwood","state":"TN","postalCode":"37027","coordinates":{"lat":36.0025004,"lng":-86.6944901}},{"address1":"6754 Field Street","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.8193709,"lng":-105.097531}},{"address1":"2347 Glen Eagle Drive","address2":"","city":"Northfield","state":"KY","postalCode":"40222","coordinates":{"lat":38.2862836,"lng":-85.6299745}},{"address1":"1613 Maple Timber Court","address2":"","city":"Nashville","state":"TN","postalCode":"37013","coordinates":{"lat":36.067096,"lng":-86.607005}},{"address1":"269 Park Street","address2":"#1","city":"North Reading","state":"MA","postalCode":"01864","coordinates":{"lat":42.57268,"lng":-71.09888800000002}},{"address1":"6444 North 67th Avenue","address2":"#1081","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5302444,"lng":-112.2049579}},{"address1":"11 Pine Point Road","address2":"","city":"Duxbury","state":"MA","postalCode":"02332","coordinates":{"lat":42.0613192,"lng":-70.6510247}},{"address1":"4136 East Virginia Lane","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.295998,"lng":-86.22073999999999}},{"address1":"5740 North 59th Avenue","address2":"#1156","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5207722,"lng":-112.189044}},{"address1":"95 Central Street","address2":"A","city":"Springfield","state":"MA","postalCode":"01105","coordinates":{"lat":42.098581,"lng":-72.57880999999999}},{"address1":"74 Heard Street","address2":"#1","city":"Chelsea","state":"MA","postalCode":"02150","coordinates":{"lat":42.3972985,"lng":-71.035599}},{"address1":"2500 Snowdoun Chambers Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36105","coordinates":{"lat":32.24569110000001,"lng":-86.2577436}},{"address1":"429 Dennison Ridge Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.750419,"lng":-72.474013}},{"address1":"1208 Lindenwood Drive","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.187016,"lng":-85.681247}},{"address1":"7609 Doris Place","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73162","coordinates":{"lat":35.5759649,"lng":-97.64877299999999}},{"address1":"1915 Southeast 29th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73129","coordinates":{"lat":35.4360844,"lng":-97.4787061}},{"address1":"212 Holiday Circle","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":32.025153,"lng":-81.240329}},{"address1":"32 Amsden Street","address2":"#1","city":"Arlington","state":"MA","postalCode":"02474","coordinates":{"lat":42.4043927,"lng":-71.138137}},{"address1":"4016 Doane Street","address2":"","city":"Fremont","state":"CA","postalCode":"94538","coordinates":{"lat":37.514834,"lng":-121.95302}},{"address1":"8700 Lillington Circle","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.330168,"lng":-86.14481099999999}},{"address1":"7720 Allison Street","address2":"#105","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.8383411,"lng":-105.0855734}},{"address1":"17878 Front Beach Road","address2":"#C-2","city":"Panama City Beach","state":"FL","postalCode":"32413","coordinates":{"lat":30.237658,"lng":-85.91577099999999}},{"address1":"1328 Tuckerman Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20011","coordinates":{"lat":38.9673595,"lng":-77.03106919999999}},{"address1":"4600 East Huntsville Road","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0476559,"lng":-94.0953342}},{"address1":"5038 North Cimarron Drive","address2":"","city":"Beverly Hills","state":"FL","postalCode":"34465","coordinates":{"lat":28.935938,"lng":-82.527367}},{"address1":"1216 West Hill Street","address2":"M","city":"Louisville","state":"KY","postalCode":"40210","coordinates":{"lat":38.227343,"lng":-85.7764254}},{"address1":"3033 Aubert Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40206","coordinates":{"lat":38.250779,"lng":-85.679931}},{"address1":"17020 West 64th Drive","address2":"","city":"Arvada","state":"CO","postalCode":"80007","coordinates":{"lat":39.8131034,"lng":-105.1914804}},{"address1":"12420 West Montebello Avenue","address2":"","city":"Litchfield Park","state":"AZ","postalCode":"85340","coordinates":{"lat":33.519491,"lng":-112.32613}},{"address1":"2538 East 40th Plaza","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.221455,"lng":-85.626834}},{"address1":"827 10th Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.901021,"lng":-76.992391}},{"address1":"5912 North 48th Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5231022,"lng":-112.162186}},{"address1":"37 Fieldside Drive","address2":"","city":"Groton","state":"CT","postalCode":"06340","coordinates":{"lat":41.3668422,"lng":-72.07844349999999}},{"address1":"9176 Ellis Way","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.8624095,"lng":-105.1574648}},{"address1":"5370 Business Park Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.317376,"lng":-86.232969}},{"address1":"1612 Beech Street","address2":"","city":"Louisville","state":"KY","postalCode":"40211","coordinates":{"lat":38.2296247,"lng":-85.805719}},{"address1":"8532 Ingalls Circle","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.8532617,"lng":-105.0629712}},{"address1":"7941 Alpine View Circle","address2":"","city":"Anchorage","state":"AK","postalCode":"99507","coordinates":{"lat":61.1486467,"lng":-149.830947}},{"address1":"8595 West 81st Drive","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.8449341,"lng":-105.0937351}},{"address1":"4296 North Blossom Court","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.1288759,"lng":-94.1239252}},{"address1":"1738 Annabellas Drive","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32407","coordinates":{"lat":30.1877596,"lng":-85.7782311}},{"address1":"3215 Madsen Street","address2":"","city":"Hayward","state":"CA","postalCode":"94541","coordinates":{"lat":37.6618825,"lng":-122.0904612}},{"address1":"4 Village Lake Drive","address2":"#4","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0994717,"lng":-94.1570279}},{"address1":"86 Russell Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.77985700000001,"lng":-72.525724}},{"address1":"570 Broadway","address2":"","city":"Lynnfield","state":"MA","postalCode":"01940","coordinates":{"lat":42.517525,"lng":-71.00125799999999}},{"address1":"1405 Monroe Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20017","coordinates":{"lat":38.93258,"lng":-76.98579699999999}},{"address1":"900 North Leverett Avenue","address2":"#126","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0754825,"lng":-94.1696884}},{"address1":"222 Quince Street","address2":"#2-B","city":"San Diego","state":"CA","postalCode":"92103","coordinates":{"lat":32.7368499,"lng":-117.162443}},{"address1":"370 Wallace Road","address2":"#D-28","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.078257,"lng":-86.724182}},{"address1":"6672 Urban Court","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.817946,"lng":-105.13477}},{"address1":"516 Southwest 60th Terrace","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73139","coordinates":{"lat":35.4051605,"lng":-97.5223633}},{"address1":"1513 Southeast 9th Street","address2":"","city":"Moore","state":"OK","postalCode":"73160","coordinates":{"lat":35.329431,"lng":-97.465397}},{"address1":"154 Byrd Drive","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.161691,"lng":-85.59920199999999}},{"address1":"1106 Homer Avenue","address2":"","city":"Savannah","state":"GA","postalCode":"31405","coordinates":{"lat":32.0453896,"lng":-81.12456809999999}},{"address1":"1010 M Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20001","coordinates":{"lat":38.9054822,"lng":-77.0265494}},{"address1":"5420 Allison Street","address2":"#202","city":"Arvada","state":"CO","postalCode":"80002","coordinates":{"lat":39.7958727,"lng":-105.0858231}},{"address1":"20 Hacker Street","address2":"#3","city":"Worcester","state":"MA","postalCode":"01603","coordinates":{"lat":42.244896,"lng":-71.8175172}},{"address1":"732 Kevin Court","address2":"","city":"Oakland","state":"CA","postalCode":"94621","coordinates":{"lat":37.757904,"lng":-122.206479}},{"address1":"509 Franklin Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20017","coordinates":{"lat":38.9255849,"lng":-76.9990895}},{"address1":"23 Whitcomb Street","address2":"","city":"Springfield","state":"VT","postalCode":"05156","coordinates":{"lat":43.2987361,"lng":-72.4880749}},{"address1":"3377 Sandstone Court","address2":"","city":"Pleasanton","state":"CA","postalCode":"94588","coordinates":{"lat":37.680463,"lng":-121.860128}},{"address1":"14 Huntington Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7772379,"lng":-72.518456}},{"address1":"2802 US Highway 98","address2":"BLDG F","city":"Mexico Beach","state":"FL","postalCode":"32456","coordinates":{"lat":29.9474344,"lng":-85.4170788}},{"address1":"412 Virginia Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40222","coordinates":{"lat":38.2538807,"lng":-85.6152334}},{"address1":"1644 New Jersey Avenue Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20001","coordinates":{"lat":38.91233,"lng":-77.017736}},{"address1":"832 51st Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20019","coordinates":{"lat":38.9008832,"lng":-76.9273381}},{"address1":"894 Windmill Park Lane","address2":"","city":"Mountain View","state":"CA","postalCode":"94043","coordinates":{"lat":37.399505,"lng":-122.077478}},{"address1":"9636 Morar Road","address2":"","city":"Panama City","state":"FL","postalCode":"32409","coordinates":{"lat":30.324968,"lng":-85.620589}},{"address1":"9472 Noble Way","address2":"","city":"Arvada","state":"CO","postalCode":"80007","coordinates":{"lat":39.8690661,"lng":-105.1784169}},{"address1":"618 Staley Avenue","address2":"","city":"Hayward","state":"CA","postalCode":"94541","coordinates":{"lat":37.6629263,"lng":-122.091801}},{"address1":"8704 Bayberry Place","address2":"","city":"Plantation","state":"KY","postalCode":"40242","coordinates":{"lat":38.2814983,"lng":-85.5918425}},{"address1":"2506 West Madison Street","address2":"","city":"Louisville","state":"KY","postalCode":"40211","coordinates":{"lat":38.253755,"lng":-85.7933322}},{"address1":"840 Inglewood Drive","address2":"","city":"West Sacramento","state":"CA","postalCode":"95605","coordinates":{"lat":38.591235,"lng":-121.524984}},{"address1":"10 Dalry Lane","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.941447,"lng":-81.160151}},{"address1":"3301 Nora Lane","address2":"","city":"Louisville","state":"KY","postalCode":"40220","coordinates":{"lat":38.199844,"lng":-85.61509}},{"address1":"8304 Glaser Lane","address2":"","city":"Louisville","state":"KY","postalCode":"40291","coordinates":{"lat":38.1437892,"lng":-85.6080724}},{"address1":"3720 West 86th Avenue","address2":"APT F","city":"Anchorage","state":"AK","postalCode":"99502","coordinates":{"lat":61.142615,"lng":-149.949251}},{"address1":"3298 Chestnut Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20015","coordinates":{"lat":38.979577,"lng":-77.061088}},{"address1":"82 Fairfield Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7673619,"lng":-72.53831}},{"address1":"3138 P Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20007","coordinates":{"lat":38.9091118,"lng":-77.0629963}},{"address1":"80 Locust Avenue","address2":"#110","city":"Worcester","state":"MA","postalCode":"01604","coordinates":{"lat":42.266896,"lng":-71.762913}},{"address1":"2715 Thornbrook Court","address2":"","city":"Odenton","state":"MD","postalCode":"21113","coordinates":{"lat":39.06450299999999,"lng":-76.727459}},{"address1":"3579 2nd Avenue","address2":"","city":"Edgewater","state":"MD","postalCode":"21037","coordinates":{"lat":38.91283200000001,"lng":-76.5224099}},{"address1":"6739 Taft Court","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.8189901,"lng":-105.1325295}},{"address1":"1528 Stafford Avenue","address2":"","city":"Hayward","state":"CA","postalCode":"94541","coordinates":{"lat":37.680081,"lng":-122.074569}},{"address1":"2024 Merrily Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36111","coordinates":{"lat":32.3328739,"lng":-86.28072999999999}},{"address1":"2034 Fairfax Road","address2":"","city":"Annapolis","state":"MD","postalCode":"21401","coordinates":{"lat":38.9734343,"lng":-76.5357427}},{"address1":"1430 East Audubon Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36111","coordinates":{"lat":32.328226,"lng":-86.28300399999999}},{"address1":"3652 East Blue Stone Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72764","coordinates":{"lat":36.139309,"lng":-94.1078069}},{"address1":"3302 Woodland Park Drive","address2":"#APT 000001","city":"Anchorage","state":"AK","postalCode":"99517","coordinates":{"lat":61.190512,"lng":-149.927286}},{"address1":"1771 Daisey Court","address2":"","city":"Millersville","state":"MD","postalCode":"21108","coordinates":{"lat":39.044662,"lng":-76.64797399999999}},{"address1":"406 East Waldburg Street","address2":"","city":"Savannah","state":"GA","postalCode":"31401","coordinates":{"lat":32.064691,"lng":-81.092321}},{"address1":"11843 North 60th Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85304","coordinates":{"lat":33.594584,"lng":-112.188319}},{"address1":"9515 West 74th Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.831067,"lng":-105.103952}},{"address1":"119 Antioch Pike","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.10072,"lng":-86.72331}},{"address1":"1157 1st Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20001","coordinates":{"lat":38.90538280000001,"lng":-77.0121662}},{"address1":"3578 Galindo Street","address2":"","city":"Oakland","state":"CA","postalCode":"94601","coordinates":{"lat":37.783471,"lng":-122.2149729}},{"address1":"12800 Saunders Road","address2":"","city":"Anchorage","state":"AK","postalCode":"99516","coordinates":{"lat":61.10499799999999,"lng":-149.746856}},{"address1":"5556 West Northview Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5433092,"lng":-112.1797889}},{"address1":"3617 Oak Grove Circle","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.333812,"lng":-86.21464499999999}},{"address1":"2443 Sierra Nevada Road","address2":"#N5","city":"Mammoth Lakes","state":"CA","postalCode":"93546","coordinates":{"lat":37.641304,"lng":-118.971489}},{"address1":"10124 Watsonville Road","address2":"","city":"Louisville","state":"KY","postalCode":"40272","coordinates":{"lat":38.105204,"lng":-85.820047}},{"address1":"2441 Chase Park Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36110","coordinates":{"lat":32.4266516,"lng":-86.2700112}},{"address1":"28 Wayne Avenue","address2":"","city":"Waltham","state":"MA","postalCode":"02453","coordinates":{"lat":42.3806325,"lng":-71.2015761}},{"address1":"3605 Normandy Place South","address2":"","city":"Nashville","state":"TN","postalCode":"37209","coordinates":{"lat":36.1459501,"lng":-86.8276312}},{"address1":"25538 Calaroga Avenue","address2":"","city":"Hayward","state":"CA","postalCode":"94545","coordinates":{"lat":37.642952,"lng":-122.098647}},{"address1":"1521 159th Avenue","address2":"","city":"San Leandro","state":"CA","postalCode":"94578","coordinates":{"lat":37.70179340000001,"lng":-122.1192658}},{"address1":"344 Island Road","address2":"","city":"Savannah","state":"GA","postalCode":"31406","coordinates":{"lat":31.927239,"lng":-81.09320199999999}},{"address1":"826 South Hancock Street","address2":"","city":"Louisville","state":"KY","postalCode":"40203","coordinates":{"lat":38.2408519,"lng":-85.744652}},{"address1":"2212 Greenville Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36107","coordinates":{"lat":32.3767039,"lng":-86.275049}},{"address1":"325 East 7th Street","address2":"","city":"Edmond","state":"OK","postalCode":"73034","coordinates":{"lat":35.6480391,"lng":-97.47550249999999}},{"address1":"7 Maple Hill Road","address2":"","city":"Aquinnah","state":"MA","postalCode":"02535","coordinates":{"lat":41.33201400000001,"lng":-70.8181309}},{"address1":"73455 Twentynine Palms Highway","address2":"","city":"Twentynine Palms","state":"CA","postalCode":"92277","coordinates":{"lat":34.1353352,"lng":-116.0598794}},{"address1":"410 West 89th Avenue","address2":"","city":"Anchorage","state":"AK","postalCode":"99515","coordinates":{"lat":61.1402906,"lng":-149.8870399}},{"address1":"24147 Clinton Court","address2":"","city":"Hayward","state":"CA","postalCode":"94545","coordinates":{"lat":37.648857,"lng":-122.112388}},{"address1":"5620 Lilly Street","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.148082,"lng":-85.58977999999999}},{"address1":"207 Spruce Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7690054,"lng":-72.51569599999999}},{"address1":"236 Alden Road","address2":"","city":"Hayward","state":"CA","postalCode":"94541","coordinates":{"lat":37.682588,"lng":-122.112121}},{"address1":"467 North Mountain Ranch Road","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.0706293,"lng":-94.2107741}},{"address1":"2042 High Street","address2":"","city":"Oakland","state":"CA","postalCode":"94601","coordinates":{"lat":37.776415,"lng":-122.209418}},{"address1":"6244 Sun River Drive","address2":"","city":"Sacramento","state":"CA","postalCode":"95824","coordinates":{"lat":38.512894,"lng":-121.41258}},{"address1":"8801 Rosshire Drive","address2":"","city":"Louisville","state":"KY","postalCode":"40118","coordinates":{"lat":38.1216631,"lng":-85.7505505}},{"address1":"449 15th Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.896241,"lng":-76.983372}},{"address1":"4385 Wares Ferry Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36109","coordinates":{"lat":32.389301,"lng":-86.228872}},{"address1":"8546 North 59th Lane","address2":"#171","city":"Glendale","state":"AZ","postalCode":"85302","coordinates":{"lat":33.5615847,"lng":-112.1884147}},{"address1":"8262 Elvaton Road","address2":"","city":"Millersville","state":"MD","postalCode":"21108","coordinates":{"lat":39.12422,"lng":-76.610394}},{"address1":"7018 Russell Court","address2":"","city":"Arvada","state":"CO","postalCode":"80007","coordinates":{"lat":39.824701,"lng":-105.186699}},{"address1":"1353 West 27th Avenue","address2":"#APT 000004","city":"Anchorage","state":"AK","postalCode":"99503","coordinates":{"lat":61.19630069999999,"lng":-149.9098041}},{"address1":"1030 Lake Claire Drive","address2":"","city":"Annapolis","state":"MD","postalCode":"21409","coordinates":{"lat":39.048603,"lng":-76.448911}},{"address1":"10980 Splendor Loop","address2":"","city":"Anchorage","state":"AK","postalCode":"99577","coordinates":{"lat":61.319069,"lng":-149.563601}},{"address1":"36043 Soapberry Commons","address2":"","city":"Fremont","state":"CA","postalCode":"94536","coordinates":{"lat":37.555484,"lng":-122.012744}},{"address1":"419 Wabasso Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40209","coordinates":{"lat":38.1812976,"lng":-85.7511801}},{"address1":"2098 Lower Newton Street","address2":"","city":"Saint Albans City","state":"VT","postalCode":"05478","coordinates":{"lat":44.843051,"lng":-73.106488}},{"address1":"115 Waddell Road","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7660221,"lng":-72.5477647}},{"address1":"463 East Rutgers Loop","address2":"","city":"Montgomery","state":"AL","postalCode":"36109","coordinates":{"lat":32.386378,"lng":-86.22309899999999}},{"address1":"31130 Meadowbrook Avenue","address2":"","city":"Hayward","state":"CA","postalCode":"94544","coordinates":{"lat":37.61744100000001,"lng":-122.038397}},{"address1":"8506 Laviento Drive","address2":"","city":"Anchorage","state":"AK","postalCode":"99515","coordinates":{"lat":61.143603,"lng":-149.8784269}},{"address1":"19404 North 77th Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.6603179,"lng":-112.223814}},{"address1":"302 East Granada Street","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.1004549,"lng":-94.15316299999999}},{"address1":"9321 Amy Lane","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32407","coordinates":{"lat":30.186053,"lng":-85.79181899999999}},{"address1":"1156 Greenhill Road","address2":"","city":"Arnold","state":"MD","postalCode":"21012","coordinates":{"lat":39.052169,"lng":-76.48806499999999}},{"address1":"30 Curtis Road","address2":"#509","city":"Milton","state":"MA","postalCode":"02186","coordinates":{"lat":42.2660192,"lng":-71.0910829}},{"address1":"904 Shepherd Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20011","coordinates":{"lat":38.9396331,"lng":-77.0252273}},{"address1":"124 Crane Street","address2":"","city":"Panama City","state":"FL","postalCode":"32413","coordinates":{"lat":30.203032,"lng":-85.84606699999999}},{"address1":"15847 West 74th Place","address2":"","city":"Arvada","state":"CO","postalCode":"80007","coordinates":{"lat":39.832021,"lng":-105.178337}},{"address1":"435 Granite Street","address2":"","city":"Quincy","state":"MA","postalCode":"02169","coordinates":{"lat":42.2404974,"lng":-71.01624509999999}},{"address1":"4418 Signal Hill Road","address2":"","city":"Louisville","state":"KY","postalCode":"40207","coordinates":{"lat":38.27605399999999,"lng":-85.650572}},{"address1":"2285 Wold Run Drive","address2":"#1","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.0992725,"lng":-94.19149589999999}},{"address1":"110 Castle Hill","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7820711,"lng":-72.4827912}},{"address1":"8474 Chase Drive","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.8522641,"lng":-105.0715699}},{"address1":"4074 North Sunflower Circle","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.125209,"lng":-94.1317431}},{"address1":"249 Yellow Leaf Circle","address2":"","city":"Anchorage","state":"AK","postalCode":"99504","coordinates":{"lat":61.221345,"lng":-149.71888}},{"address1":"8010 Holland Court","address2":"D","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.84229029999999,"lng":-105.1030368}},{"address1":"1300 East Dowling Road","address2":"","city":"Anchorage","state":"AK","postalCode":"99518","coordinates":{"lat":61.1663648,"lng":-149.858972}},{"address1":"189 Danforth Street","address2":"","city":"Framingham","state":"MA","postalCode":"01701","coordinates":{"lat":42.3259861,"lng":-71.39104990000001}},{"address1":"1011 Bell Avenue","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21060","coordinates":{"lat":39.177114,"lng":-76.59223899999999}},{"address1":"5224 Wasena Avenue","address2":"","city":"Baltimore","state":"MD","postalCode":"21225","coordinates":{"lat":39.223779,"lng":-76.60339499999999}},{"address1":"7613 Yule Court","address2":"","city":"Arvada","state":"CO","postalCode":"80007","coordinates":{"lat":39.834511,"lng":-105.202472}},{"address1":"1243 Doris Avenue","address2":"","city":"Pasadena","state":"MD","postalCode":"21122","coordinates":{"lat":39.109591,"lng":-76.486294}},{"address1":"3504 East 5th Street","address2":"","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.156461,"lng":-85.61573399999999}},{"address1":"1 Dunsmuir Lane","address2":"","city":"Savannah","state":"GA","postalCode":"31411","coordinates":{"lat":31.891353,"lng":-81.053618}},{"address1":"1320 Dunbarton Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.401737,"lng":-86.19376799999999}},{"address1":"14524 Lodestar Drive","address2":"","city":"Grass Valley","state":"CA","postalCode":"95949","coordinates":{"lat":39.101221,"lng":-121.008546}},{"address1":"8404 West Myrtle Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85305","coordinates":{"lat":33.5414927,"lng":-112.2400905}},{"address1":"620 Oakland Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.072612,"lng":-94.17295999999999}},{"address1":"39 Cottage Street","address2":"","city":"Athol","state":"MA","postalCode":"01331","coordinates":{"lat":42.5926786,"lng":-72.2271482}},{"address1":"82 Lookout Mountain Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.75723,"lng":-72.491035}},{"address1":"1635 Generals Highway","address2":"","city":"Annapolis","state":"MD","postalCode":"21401","coordinates":{"lat":39.0139641,"lng":-76.5724717}},{"address1":"555 North Dupont Avenue","address2":"#C-55","city":"Nashville","state":"TN","postalCode":"37115","coordinates":{"lat":36.268033,"lng":-86.6999979}},{"address1":"2505 North Hampton Court","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0959268,"lng":-94.1238079}},{"address1":"136 Acacia Drive","address2":"","city":"Blue Lake","state":"CA","postalCode":"95525","coordinates":{"lat":40.879484,"lng":-123.978726}},{"address1":"22825 North 74th Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85310","coordinates":{"lat":33.691213,"lng":-112.219428}},{"address1":"643 Farragut Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20011","coordinates":{"lat":38.951281,"lng":-77.021523}},{"address1":"17 West 26th Circle","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.033699,"lng":-94.15958800000001}},{"address1":"335 C Street Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20003","coordinates":{"lat":38.8858796,"lng":-77.00075350000002}},{"address1":"1418 Paddocks Court","address2":"","city":"Crownsville","state":"MD","postalCode":"21032","coordinates":{"lat":39.05389,"lng":-76.623632}},{"address1":"2917 Miramar Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.107054,"lng":-94.2004709}},{"address1":"301 Argonaut Street","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32413","coordinates":{"lat":30.20514,"lng":-85.84755899999999}},{"address1":"12901 Mission Circle","address2":"","city":"Anchorage","state":"AK","postalCode":"99516","coordinates":{"lat":61.10380240000001,"lng":-149.8253975}},{"address1":"3013 Sprowl Road","address2":"#4","city":"Jeffersontown","state":"KY","postalCode":"40299","coordinates":{"lat":38.1966913,"lng":-85.5693363}},{"address1":"5929 West Via Montoya Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85310","coordinates":{"lat":33.68642,"lng":-112.188159}},{"address1":"325 Joseph Circle","address2":"","city":"Southport","state":"FL","postalCode":"32409","coordinates":{"lat":30.407817,"lng":-85.684715}},{"address1":"922 Urciolo Court","address2":"","city":"Annapolis","state":"MD","postalCode":"21401","coordinates":{"lat":38.979099,"lng":-76.57732589999999}},{"address1":"2212 Daffin Drive","address2":"","city":"Savannah","state":"GA","postalCode":"31404","coordinates":{"lat":32.027338,"lng":-81.07870799999999}},{"address1":"1401 Cordova Street","address2":"#APT 000006","city":"Anchorage","state":"AK","postalCode":"99501","coordinates":{"lat":61.20849370000001,"lng":-149.8792198}},{"address1":"8064 Claytie Circle","address2":"","city":"Nashville","state":"TN","postalCode":"37221","coordinates":{"lat":36.06466899999999,"lng":-86.976433}},{"address1":"566 Middle Turnpike East","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7850955,"lng":-72.4967557}},{"address1":"93 Hamlin Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7735186,"lng":-72.5152106}},{"address1":"123 Remember Baker Lane","address2":"","city":"Hartford","state":"VT","postalCode":"05001","coordinates":{"lat":43.6696484,"lng":-72.4299719}},{"address1":"125 Connors Street","address2":"#516","city":"Gardner","state":"MA","postalCode":"01440","coordinates":{"lat":42.5738871,"lng":-71.9966865}},{"address1":"2315 Chestnut Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36107","coordinates":{"lat":32.367382,"lng":-86.27867599999999}},{"address1":"2716 30th Street Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20020","coordinates":{"lat":38.855798,"lng":-76.96482499999999}},{"address1":"2406 Lindbergh Drive","address2":"","city":"Louisville","state":"KY","postalCode":"40208","coordinates":{"lat":38.215833,"lng":-85.775153}},{"address1":"2035 Ninth Street","address2":"R A","city":"Berkeley","state":"CA","postalCode":"94710","coordinates":{"lat":37.8676351,"lng":-122.2938418}},{"address1":"34 Holyoke Road","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.753855,"lng":-72.498972}},{"address1":"2276 West Woodley Square","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.3256494,"lng":-86.2702235}},{"address1":"20251 North 75th Avenue","address2":"#1046","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.6696067,"lng":-112.2196548}},{"address1":"72 Bentley Avenue","address2":"","city":"Poultney","state":"VT","postalCode":"05764","coordinates":{"lat":43.5158214,"lng":-73.2343441}},{"address1":"2807 Huxley Place","address2":"","city":"Fremont","state":"CA","postalCode":"94555","coordinates":{"lat":37.584941,"lng":-122.03291}},{"address1":"7772 West Palmaire Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85303","coordinates":{"lat":33.540431,"lng":-112.227013}},{"address1":"82 Linnmore Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.777262,"lng":-72.54537499999999}},{"address1":"882 Plantation Way","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.400186,"lng":-86.20771099999999}},{"address1":"8150 North 61st Avenue","address2":"#3128","city":"Glendale","state":"AZ","postalCode":"85302","coordinates":{"lat":33.555668,"lng":-112.1926295}},{"address1":"503 Orchard Road","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21061","coordinates":{"lat":39.19076099999999,"lng":-76.64618}},{"address1":"3616 Echo Lane","address2":"","city":"Nashville","state":"TN","postalCode":"37218","coordinates":{"lat":36.236713,"lng":-86.833956}},{"address1":"376 Whites Road","address2":"","city":"Wilmington","state":"VT","postalCode":"05363","coordinates":{"lat":42.880951,"lng":-72.84163699999999}},{"address1":"322 East Taylor Street","address2":"#1103","city":"Savannah","state":"GA","postalCode":"31401","coordinates":{"lat":32.0706543,"lng":-81.0908408}},{"address1":"605 Main Street","address2":"","city":"Watertown","state":"MA","postalCode":"02472","coordinates":{"lat":42.373378,"lng":-71.202116}},{"address1":"238 West Rock Street","address2":"#4","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0609635,"lng":-94.1628029}},{"address1":"1819 Q Street Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20020","coordinates":{"lat":38.870406,"lng":-76.978219}},{"address1":"1261 Sioux Terrace","address2":"","city":"Nashville","state":"TN","postalCode":"37115","coordinates":{"lat":36.247799,"lng":-86.670508}},{"address1":"7002 Secrest Court","address2":"","city":"Arvada","state":"CO","postalCode":"80007","coordinates":{"lat":39.8236009,"lng":-105.1901759}},{"address1":"169 Avenida Drive","address2":"M","city":"Berkeley","state":"CA","postalCode":"94708","coordinates":{"lat":37.884824,"lng":-122.249694}},{"address1":"6095 Terry Lane","address2":"","city":"Golden","state":"CO","postalCode":"80403","coordinates":{"lat":39.807376,"lng":-105.191019}},{"address1":"3620 Colmar Drive","address2":"","city":"Louisville","state":"KY","postalCode":"40211","coordinates":{"lat":38.235977,"lng":-85.81636}},{"address1":"8820 Vaughn Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.337777,"lng":-86.13765590000001}},{"address1":"113 Hammarlee Road","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21060","coordinates":{"lat":39.177265,"lng":-76.602519}},{"address1":"281 MacArthur Boulevard","address2":"","city":"Oakland","state":"CA","postalCode":"94610","coordinates":{"lat":37.8147324,"lng":-122.25217}},{"address1":"8159 West 81st Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.843993,"lng":-105.089124}},{"address1":"512 North Center Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.15768199999999,"lng":-85.6292129}},{"address1":"4876 Norris Road","address2":"","city":"Fremont","state":"CA","postalCode":"94536","coordinates":{"lat":37.543515,"lng":-122.008143}},{"address1":"8378 Cole Street","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.8479398,"lng":-105.1526049}},{"address1":"2406 Brighton Drive","address2":"","city":"Louisville","state":"KY","postalCode":"40205","coordinates":{"lat":38.217094,"lng":-85.66769599999999}},{"address1":"19 Heritage","address2":"","city":"Oakland","state":"CA","postalCode":"94605","coordinates":{"lat":37.765568,"lng":-122.129528}},{"address1":"6228 West Larkspur Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85304","coordinates":{"lat":33.600267,"lng":-112.193207}},{"address1":"2504 Longest Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40204","coordinates":{"lat":38.239449,"lng":-85.7079849}},{"address1":"3 Mad Anthony Lane","address2":"","city":"Savannah","state":"GA","postalCode":"31411","coordinates":{"lat":31.949414,"lng":-81.02015399999999}},{"address1":"2248 South Sutherland Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.331721,"lng":-86.19776999999999}},{"address1":"330 Michell Court","address2":"","city":"Livermore","state":"CA","postalCode":"94551","coordinates":{"lat":37.690035,"lng":-121.759468}},{"address1":"6748 West San Juan Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85303","coordinates":{"lat":33.518939,"lng":-112.205511}},{"address1":"1734 Tamarack Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20012","coordinates":{"lat":38.993375,"lng":-77.04060299999999}},{"address1":"915 Arkansas Avenue","address2":"","city":"Lynn Haven","state":"FL","postalCode":"32444","coordinates":{"lat":30.244151,"lng":-85.6392089}},{"address1":"116 Queens Lane","address2":"","city":"Nashville","state":"TN","postalCode":"37218","coordinates":{"lat":36.214841,"lng":-86.859562}},{"address1":"8 Linden Circle","address2":"","city":"Somerville","state":"MA","postalCode":"02143","coordinates":{"lat":42.3879993,"lng":-71.11345200000001}},{"address1":"4 Chamois Court","address2":"","city":"Pooler","state":"GA","postalCode":"31322","coordinates":{"lat":32.088701,"lng":-81.24825}},{"address1":"6941 West 87th Way","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.852809,"lng":-105.073449}},{"address1":"354 North University Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0659848,"lng":-94.16817080000001}},{"address1":"6145 East Castro Valley Boulevard","address2":"","city":"Castro Valley","state":"CA","postalCode":"94552","coordinates":{"lat":37.6992206,"lng":-122.0300502}},{"address1":"1401 Saint George Avenue","address2":"","city":"Moore","state":"OK","postalCode":"73160","coordinates":{"lat":35.3503092,"lng":-97.5079329}},{"address1":"1713 Arrow Cove Lane","address2":"","city":"Annapolis","state":"MD","postalCode":"21401","coordinates":{"lat":39.00848999999999,"lng":-76.53611699999999}},{"address1":"56 Gardner Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7630186,"lng":-72.5033322}},{"address1":"327 Idlewylde Drive","address2":"#3","city":"Louisville","state":"KY","postalCode":"40206","coordinates":{"lat":38.260003,"lng":-85.70065199999999}},{"address1":"18789 Crane Avenue","address2":"","city":"Castro Valley","state":"CA","postalCode":"94546","coordinates":{"lat":37.70902600000001,"lng":-122.059504}},{"address1":"814 East 10th Court","address2":"","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.166997,"lng":-85.648022}},{"address1":"6431 Shattuck Avenue","address2":"B","city":"Oakland","state":"CA","postalCode":"94609","coordinates":{"lat":37.85015,"lng":-122.266142}},{"address1":"4719 Bayou Bluff Trail","address2":"","city":"Lynn Haven","state":"FL","postalCode":"32444","coordinates":{"lat":30.236109,"lng":-85.599884}},{"address1":"24 Lambert Street","address2":"","city":"Medford","state":"MA","postalCode":"02155","coordinates":{"lat":42.4235908,"lng":-71.093309}},{"address1":"1318 35th Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20007","coordinates":{"lat":38.90724700000001,"lng":-77.0690174}},{"address1":"4807 North Grove Avenue","address2":"","city":"Warr Acres","state":"OK","postalCode":"73122","coordinates":{"lat":35.5203601,"lng":-97.6147122}},{"address1":"4408 Bonaparte Boulevard","address2":"","city":"Midwest City","state":"OK","postalCode":"73110","coordinates":{"lat":35.482651,"lng":-97.38337399999999}},{"address1":"73 Twin Hills Drive","address2":"","city":"Longmeadow","state":"MA","postalCode":"01106","coordinates":{"lat":42.0420378,"lng":-72.5428872}},{"address1":"34 Harris Street","address2":"#6","city":"Brookline","state":"MA","postalCode":"02446","coordinates":{"lat":42.3382219,"lng":-71.12330899999999}},{"address1":"22352 North 67th Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85310","coordinates":{"lat":33.686126,"lng":-112.203991}},{"address1":"11522 Country Spring Court","address2":"","city":"Cupertino","state":"CA","postalCode":"95014","coordinates":{"lat":37.3004559,"lng":-122.049009}},{"address1":"21 Soling Avenue","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":32.0376484,"lng":-81.2540562}},{"address1":"302 Mcmillin Street","address2":"","city":"Nashville","state":"TN","postalCode":"37203","coordinates":{"lat":36.1583239,"lng":-86.7947425}},{"address1":"129 Grant Street","address2":"","city":"Redlands","state":"CA","postalCode":"92373","coordinates":{"lat":34.0529643,"lng":-117.1847245}},{"address1":"3035 South Highway A1A","address2":"#3B","city":"Melbourne Beach","state":"FL","postalCode":"32951","coordinates":{"lat":28.0357085,"lng":-80.54249569999999}},{"address1":"1637 Acre Circle","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32407","coordinates":{"lat":30.18644399999999,"lng":-85.78322299999999}},{"address1":"130 West Brown Road","address2":"","city":"Mesa","state":"AZ","postalCode":"85201","coordinates":{"lat":33.4356918,"lng":-111.8348295}},{"address1":"2632 Jackson Street East","address2":"","city":"Carson","state":"CA","postalCode":"90810","coordinates":{"lat":33.8360282,"lng":-118.2202665}},{"address1":"4503 North Council Road","address2":"","city":"Bethany","state":"OK","postalCode":"73008","coordinates":{"lat":35.5176604,"lng":-97.65550879999999}},{"address1":"119 Redwood Road","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.751289,"lng":-72.563575}},{"address1":"5721 Frank Hough Road","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.23643,"lng":-85.559361}},{"address1":"2917 Danzig Place","address2":"#102","city":"Louisville","state":"KY","postalCode":"40245","coordinates":{"lat":38.280137,"lng":-85.49418639999999}},{"address1":"26563 Chisholm Court","address2":"","city":"Hayward","state":"CA","postalCode":"94544","coordinates":{"lat":37.641711,"lng":-122.078659}},{"address1":"4221 East Mission Boulevard","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0954898,"lng":-94.10028220000001}},{"address1":"6021 Yarrow Street","address2":"#A1","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.806803,"lng":-105.084306}},{"address1":"7102 North 43rd Avenue","address2":"#160","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5415384,"lng":-112.1514119}},{"address1":"3386 Sudlersville South","address2":"","city":"Laurel","state":"MD","postalCode":"20724","coordinates":{"lat":39.089731,"lng":-76.81937599999999}},{"address1":"6022 West Alice Avenue","address2":"#3","city":"Glendale","state":"AZ","postalCode":"85302","coordinates":{"lat":33.5640709,"lng":-112.1893361}},{"address1":"580 Hollow Wood Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36109","coordinates":{"lat":32.3914018,"lng":-86.2181083}},{"address1":"435 East 5th Avenue","address2":"","city":"Anchorage","state":"AK","postalCode":"99501","coordinates":{"lat":61.217854,"lng":-149.875705}},{"address1":"6713 Holt Road","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.013723,"lng":-86.729686}},{"address1":"5605 North Terry Avenue","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73111","coordinates":{"lat":35.526483,"lng":-97.4830379}},{"address1":"412 West Ila Street","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.071266,"lng":-94.165154}},{"address1":"9403 Fairground Road","address2":"","city":"Louisville","state":"KY","postalCode":"40291","coordinates":{"lat":38.17058,"lng":-85.5852139}},{"address1":"6049 Quail Street","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.806876,"lng":-105.1239949}},{"address1":"17 Hillcrest Road","address2":"","city":"Rutland","state":"VT","postalCode":"05701","coordinates":{"lat":43.6216373,"lng":-72.9688374}},{"address1":"424 Callan Avenue","address2":"#216","city":"San Leandro","state":"CA","postalCode":"94577","coordinates":{"lat":37.72780789999999,"lng":-122.152331}},{"address1":"105 Gilmore Street","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21061","coordinates":{"lat":39.176817,"lng":-76.630884}},{"address1":"910 Arlington Terrace","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.077652,"lng":-94.14529000000002}},{"address1":"2204 7th Street Road","address2":"#12","city":"Louisville","state":"KY","postalCode":"40208","coordinates":{"lat":38.218784,"lng":-85.7800649}},{"address1":"11 North Vineyard Drive","address2":"","city":"Pueblo West","state":"CO","postalCode":"81007","coordinates":{"lat":38.318953,"lng":-104.680591}},{"address1":"3505 Albee Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37076","coordinates":{"lat":36.181781,"lng":-86.611408}},{"address1":"689 Stableway Road","address2":"","city":"Pike Road","state":"AL","postalCode":"36064","coordinates":{"lat":32.354837,"lng":-86.076679}},{"address1":"102 East Cydnee Street","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.10683,"lng":-94.155547}},{"address1":"208 Towne Lake Way","address2":"","city":"Pooler","state":"GA","postalCode":"31322","coordinates":{"lat":32.137605,"lng":-81.25850600000001}},{"address1":"2555 West 69th Court","address2":"","city":"Anchorage","state":"AK","postalCode":"99502","coordinates":{"lat":61.158468,"lng":-149.933297}},{"address1":"58 Rice Street Southwest","address2":"","city":"Washington","state":"DC","postalCode":"20032","coordinates":{"lat":38.83841899999999,"lng":-77.0113105}},{"address1":"2961 Vinson Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36110","coordinates":{"lat":32.42687530000001,"lng":-86.2080404}},{"address1":"172 Chestnut Street","address2":"","city":"Lynn","state":"MA","postalCode":"01902","coordinates":{"lat":42.4696809,"lng":-70.93746680000001}},{"address1":"307 Meadowood Court","address2":"","city":"Lynn Haven","state":"FL","postalCode":"32444","coordinates":{"lat":30.237071,"lng":-85.60347}},{"address1":"403 Turkey Creek Road","address2":"","city":"Mathews","state":"AL","postalCode":"36052","coordinates":{"lat":32.220426,"lng":-86.059168}},{"address1":"11 Rosewood Lane","address2":"","city":"Essex","state":"VT","postalCode":"05452","coordinates":{"lat":44.4912319,"lng":-73.097297}},{"address1":"102 Old Depot Road","address2":"#14","city":"Farmington","state":"AR","postalCode":"72730","coordinates":{"lat":36.040414,"lng":-94.245223}},{"address1":"9 Pierce Road","address2":"","city":"Watertown","state":"MA","postalCode":"02472","coordinates":{"lat":42.380059,"lng":-71.19283399999999}},{"address1":"15254 North 52nd Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85306","coordinates":{"lat":33.6244609,"lng":-112.171094}},{"address1":"11140 West 60th Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.805639,"lng":-105.122694}},{"address1":"803 18th Avenue South","address2":"","city":"Nashville","state":"TN","postalCode":"37203","coordinates":{"lat":36.1500199,"lng":-86.79477}},{"address1":"918 Cheryl Ann Circle","address2":"","city":"Hayward","state":"CA","postalCode":"94544","coordinates":{"lat":37.635859,"lng":-122.076923}},{"address1":"1328 Jenks Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.1726222,"lng":-85.6620902}},{"address1":"2201 Marks Mill Lane","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0917726,"lng":-94.15142089999999}},{"address1":"12371 Atlanta Highway","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.369194,"lng":-86.06518799999999}},{"address1":"3437 Sommerville Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36111","coordinates":{"lat":32.342288,"lng":-86.256546}},{"address1":"829 Dunbarton Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.397179,"lng":-86.205326}},{"address1":"8 Kozera Avenue","address2":"","city":"Hadley","state":"MA","postalCode":"01035","coordinates":{"lat":42.36135549999999,"lng":-72.57288930000001}},{"address1":"89 High Ledge Circle","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7495971,"lng":-72.476336}},{"address1":"35 Lakewood Circle South","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.754591,"lng":-72.52192000000001}},{"address1":"2222 Martin Luther King Junior Boulevard","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0554972,"lng":-94.1910602}},{"address1":"1720 Quacco Road","address2":"A","city":"Pooler","state":"GA","postalCode":"31322","coordinates":{"lat":32.062374,"lng":-81.269502}},{"address1":"116 Jourdan Street","address2":"","city":"Hinesburg","state":"VT","postalCode":"05461","coordinates":{"lat":44.347454,"lng":-73.08877600000001}},{"address1":"2507 R Street Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20020","coordinates":{"lat":38.869211,"lng":-76.970202}},{"address1":"4719 West Cochise Drive","address2":"","city":"Glendale","state":"AZ","postalCode":"85302","coordinates":{"lat":33.580297,"lng":-112.161185}},{"address1":"1838 Crofton Parkway","address2":"","city":"Crofton","state":"MD","postalCode":"21114","coordinates":{"lat":38.9983069,"lng":-76.67975299999999}},{"address1":"26 Seaman Circle","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7668725,"lng":-72.5461613}},{"address1":"2572 Drake Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36108","coordinates":{"lat":32.342203,"lng":-86.33643599999999}},{"address1":"4231 Miramonte Way","address2":"","city":"Union City","state":"CA","postalCode":"94587","coordinates":{"lat":37.591721,"lng":-122.075993}},{"address1":"2508 Grant Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.193964,"lng":-85.712509}},{"address1":"6505 South Lagoon Drive","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32408","coordinates":{"lat":30.155249,"lng":-85.76467099999999}},{"address1":"2032 Gorgas Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36106","coordinates":{"lat":32.357466,"lng":-86.27658699999999}},{"address1":"1129 I Street","address2":"","city":"Anchorage","state":"AK","postalCode":"99501","coordinates":{"lat":61.2110743,"lng":-149.899634}},{"address1":"5201 North Miller Avenue","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73112","coordinates":{"lat":35.523283,"lng":-97.561933}},{"address1":"1987 Boxer Court","address2":"","city":"San Lorenzo","state":"CA","postalCode":"94580","coordinates":{"lat":37.670738,"lng":-122.147019}},{"address1":"3219 Lakeshore Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37138","coordinates":{"lat":36.242959,"lng":-86.625265}},{"address1":"415 West 42nd Street","address2":"","city":"Savannah","state":"GA","postalCode":"31401","coordinates":{"lat":32.0543472,"lng":-81.1064222}},{"address1":"5792 Owl Hill Avenue","address2":"","city":"Santa Rosa","state":"CA","postalCode":"95409","coordinates":{"lat":38.467127,"lng":-122.640498}},{"address1":"6816 West 84th Circle","address2":"#42","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.848863,"lng":-105.0735009}},{"address1":"1900 West Virginia Avenue Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.9114897,"lng":-76.9847941}},{"address1":"2936 State Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.202236,"lng":-85.66611499999999}},{"address1":"2604 13th Street","address2":"","city":"Savannah","state":"GA","postalCode":"31408","coordinates":{"lat":32.092738,"lng":-81.17643199999999}},{"address1":"10304 North 179th Drive","address2":"","city":"Waddell","state":"AZ","postalCode":"85355","coordinates":{"lat":33.5780134,"lng":-112.4458901}},{"address1":"8142 Mallard Shore Drive","address2":"","city":"Laurel","state":"MD","postalCode":"20724","coordinates":{"lat":39.112812,"lng":-76.80575499999999}},{"address1":"653 Stratton Arlington Road","address2":"","city":"Stratton","state":"VT","postalCode":"05360","coordinates":{"lat":43.04115300000001,"lng":-72.90772199999999}},{"address1":"2414 Parker Street","address2":"#R 16","city":"Berkeley","state":"CA","postalCode":"94704","coordinates":{"lat":37.862903,"lng":-122.2595092}},{"address1":"43 Westminster Street","address2":"","city":"Pittsfield","state":"MA","postalCode":"01201","coordinates":{"lat":42.458409,"lng":-73.23273499999999}},{"address1":"422 C Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.8942029,"lng":-76.99988809999999}},{"address1":"535 Saddlewood Lane","address2":"","city":"Montgomery","state":"AL","postalCode":"36109","coordinates":{"lat":32.39012,"lng":-86.218373}},{"address1":"7910 West Krall Street","address2":"","city":"Glendale","state":"AZ","postalCode":"85303","coordinates":{"lat":33.534019,"lng":-112.2299964}},{"address1":"1600 20th Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20009","coordinates":{"lat":38.9113128,"lng":-77.0451932}},{"address1":"1217 Bay Street","address2":"#318-A","city":"Tybee Island","state":"GA","postalCode":"31328","coordinates":{"lat":32.0222005,"lng":-80.8587482}},{"address1":"7645 Marshall Street","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.835952,"lng":-105.070063}},{"address1":"717 Joseph Avenue","address2":"","city":"Nashville","state":"TN","postalCode":"37207","coordinates":{"lat":36.183641,"lng":-86.772214}},{"address1":"2106 Standard Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40210","coordinates":{"lat":38.231378,"lng":-85.7922619}},{"address1":"316 20th Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.8939527,"lng":-76.97642739999999}},{"address1":"227 West Montgomery Cross Road","address2":"#736","city":"Savannah","state":"GA","postalCode":"31406","coordinates":{"lat":31.998812,"lng":-81.134464}},{"address1":"310 12th Avenue","address2":"","city":"Santa Cruz","state":"CA","postalCode":"95062","coordinates":{"lat":36.963154,"lng":-121.994045}},{"address1":"2685 California Street","address2":"#APT 305","city":"Mountain View","state":"CA","postalCode":"94040","coordinates":{"lat":37.4068693,"lng":-122.1129728}},{"address1":"6460 Vermont 113","address2":"","city":"Vershire","state":"VT","postalCode":"05079","coordinates":{"lat":43.9678972,"lng":-72.3154863}},{"address1":"8404 South Villa Avenue","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73159","coordinates":{"lat":35.3818163,"lng":-97.5570041}},{"address1":"7030 West Krall Street","address2":"","city":"Glendale","state":"AZ","postalCode":"85303","coordinates":{"lat":33.534067,"lng":-112.210763}},{"address1":"189 Dalton Avenue","address2":"","city":"Pittsfield","state":"MA","postalCode":"01201","coordinates":{"lat":42.459217,"lng":-73.22532799999999}},{"address1":"2455 Manchester Drive","address2":"","city":"The Village","state":"OK","postalCode":"73120","coordinates":{"lat":35.576392,"lng":-97.55644629999999}},{"address1":"2405 230th Street","address2":"","city":"Pasadena","state":"MD","postalCode":"21122","coordinates":{"lat":39.12585,"lng":-76.549013}},{"address1":"589 East Main Street","address2":"","city":"Newport","state":"VT","postalCode":"05855","coordinates":{"lat":44.943275,"lng":-72.19193299999999}},{"address1":"1520 H Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20006","coordinates":{"lat":38.90021429999999,"lng":-77.0351541}},{"address1":"4603 Grant Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20019","coordinates":{"lat":38.8983173,"lng":-76.9364561}},{"address1":"171 Brickhill Circle","address2":"","city":"Pooler","state":"GA","postalCode":"31322","coordinates":{"lat":32.175349,"lng":-81.25099}},{"address1":"607 North 46th Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.0741371,"lng":-94.22645829999999}},{"address1":"9134 Brook Park Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.3076534,"lng":-86.1451185}},{"address1":"2134 West Mills Drive","address2":"","city":"Orange","state":"CA","postalCode":"92868","coordinates":{"lat":33.786584,"lng":-117.875665}},{"address1":"2 Cockle Shell Road","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.960368,"lng":-81.229034}},{"address1":"1431 King George Boulevard","address2":"#21-C","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.9775273,"lng":-81.2259819}},{"address1":"1804 Calhoun Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.181413,"lng":-85.693748}},{"address1":"23 Florida Avenue Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.910125,"lng":-77.00808099999999}},{"address1":"5630 Silverado Way","address2":"#STE A8","city":"Anchorage","state":"AK","postalCode":"99518","coordinates":{"lat":61.1695128,"lng":-149.8896842}},{"address1":"11300 Lillian Lane","address2":"","city":"Anchorage","state":"AK","postalCode":"99515","coordinates":{"lat":61.11845399999999,"lng":-149.881223}},{"address1":"2209 East Manor Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.075132,"lng":-94.12903399999999}},{"address1":"8325 Northwest 19th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73127","coordinates":{"lat":35.48856,"lng":-97.66233199999999}},{"address1":"6925 Lariat Lane","address2":"","city":"Castro Valley","state":"CA","postalCode":"94552","coordinates":{"lat":37.7157257,"lng":-122.0270913}},{"address1":"6721 Boundary Run","address2":"","city":"Nashville","state":"TN","postalCode":"37221","coordinates":{"lat":36.087655,"lng":-87.006136}},{"address1":"1700 William E Summers III Avenue","address2":"#201","city":"Louisville","state":"KY","postalCode":"40211","coordinates":{"lat":38.22952540000001,"lng":-85.82045680000002}},{"address1":"14 6th Street","address2":"#1","city":"Medford","state":"MA","postalCode":"02155","coordinates":{"lat":42.4074868,"lng":-71.07807670000001}},{"address1":"11865 West 74th Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.830545,"lng":-105.131624}},{"address1":"912 Countryside Lane","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.404751,"lng":-86.18589899999999}},{"address1":"6080 Frontier Lane","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.030597,"lng":-86.73436}},{"address1":"1124 Bluewillow Court","address2":"","city":"Nashville","state":"TN","postalCode":"37013","coordinates":{"lat":36.040783,"lng":-86.577798}},{"address1":"17722 North 79th Avenue","address2":"#1135","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.646496,"lng":-112.2317614}},{"address1":"6 Oak Street","address2":"","city":"Town of Rockingham","state":"VT","postalCode":"05101","coordinates":{"lat":43.134108,"lng":-72.449474}},{"address1":"1537 Northwest 123rd Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73120","coordinates":{"lat":35.5961896,"lng":-97.53951699999999}},{"address1":"10001 Pheasant Lane","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73162","coordinates":{"lat":35.571646,"lng":-97.63995700000001}},{"address1":"10340 West 62nd Place","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.8101545,"lng":-105.1135667}},{"address1":"52 Oleary Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7716925,"lng":-72.5521002}},{"address1":"15082 North 59th Avenue","address2":"#111","city":"Glendale","state":"AZ","postalCode":"85306","coordinates":{"lat":33.6231673,"lng":-112.1871757}},{"address1":"7047 Vinson Road","address2":"","city":"Panama City","state":"FL","postalCode":"32413","coordinates":{"lat":30.336868,"lng":-85.829662}},{"address1":"200 Edson Road","address2":"","city":"Windham","state":"VT","postalCode":"05359","coordinates":{"lat":43.2215166,"lng":-72.7049368}},{"address1":"150 Manistee Drive","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32413","coordinates":{"lat":30.235428,"lng":-85.89155099999999}},{"address1":"2335 Orchard View Lane","address2":"","city":"Escondido","state":"CA","postalCode":"92027","coordinates":{"lat":33.119461,"lng":-117.007959}},{"address1":"65 Clark Street","address2":"#2","city":"Newton","state":"MA","postalCode":"02459","coordinates":{"lat":42.321396,"lng":-71.1995577}},{"address1":"18318 Pioneer Drive","address2":"","city":"Anchorage","state":"AK","postalCode":"99577","coordinates":{"lat":61.364421,"lng":-149.540056}},{"address1":"110 Elmwood Avenue","address2":"","city":"Barre","state":"VT","postalCode":"05641","coordinates":{"lat":44.2097089,"lng":-72.50493600000001}},{"address1":"4800 Huffman Road","address2":"","city":"Anchorage","state":"AK","postalCode":"99516","coordinates":{"lat":61.10827899999999,"lng":-149.791977}},{"address1":"8219 Minor Lane","address2":"#9","city":"Louisville","state":"KY","postalCode":"40219","coordinates":{"lat":38.12841,"lng":-85.7107249}},{"address1":"10129 Spring Gate Drive","address2":"","city":"Louisville","state":"KY","postalCode":"40241","coordinates":{"lat":38.312891,"lng":-85.562299}},{"address1":"65 Arcellia Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.788139,"lng":-72.491989}},{"address1":"12460 West Solano Drive","address2":"","city":"Litchfield Park","state":"AZ","postalCode":"85340","coordinates":{"lat":33.520308,"lng":-112.3275521}},{"address1":"618 Watts Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36104","coordinates":{"lat":32.37152700000001,"lng":-86.294285}},{"address1":"5805 Armada Drive","address2":"","city":"Carlsbad","state":"CA","postalCode":"92008","coordinates":{"lat":33.1238541,"lng":-117.3152497}},{"address1":"1644 Queenstown Road","address2":"","city":"Nichols Hills","state":"OK","postalCode":"73116","coordinates":{"lat":35.542511,"lng":-97.547282}},{"address1":"143 Main Street","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.7886316,"lng":-72.52390249999999}},{"address1":"226 Tranquility Lane","address2":"","city":"Saint Albans Town","state":"VT","postalCode":"05488","coordinates":{"lat":44.8389381,"lng":-73.18372149999999}},{"address1":"831 21st Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.9011079,"lng":-76.974034}},{"address1":"22825 Paseo Place","address2":"","city":"Hayward","state":"CA","postalCode":"94541","coordinates":{"lat":37.6678961,"lng":-122.0832649}},{"address1":"2902 Flint Street","address2":"","city":"Union City","state":"CA","postalCode":"94587","coordinates":{"lat":37.60442,"lng":-122.069607}},{"address1":"919 Windsor Avenue","address2":"","city":"Annapolis","state":"MD","postalCode":"21403","coordinates":{"lat":38.968518,"lng":-76.4905689}},{"address1":"6041 North 72nd Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85303","coordinates":{"lat":33.525117,"lng":-112.215039}},{"address1":"163 Highwood Drive","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.76664299999999,"lng":-72.490877}},{"address1":"1334 East 14th Avenue","address2":"#APT 000004","city":"Anchorage","state":"AK","postalCode":"99501","coordinates":{"lat":61.208547,"lng":-149.857294}},{"address1":"223 Goose Pond Road","address2":"","city":"Fairfax","state":"VT","postalCode":"05454","coordinates":{"lat":44.653053,"lng":-72.971587}},{"address1":"1021 North Center Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.1670475,"lng":-85.6292984}},{"address1":"1559 Alabama Avenue Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20032","coordinates":{"lat":38.8467679,"lng":-76.98076200000001}},{"address1":"1238 Roanwood Way","address2":"","city":"Concord","state":"CA","postalCode":"94521","coordinates":{"lat":37.94042,"lng":-121.944464}},{"address1":"2068 Happy Lane","address2":"","city":"Crofton","state":"MD","postalCode":"21114","coordinates":{"lat":39.013318,"lng":-76.6754904}},{"address1":"5378 Allison Street","address2":"#102","city":"Arvada","state":"CO","postalCode":"80002","coordinates":{"lat":39.7944109,"lng":-105.0860024}},{"address1":"4604 Virginia Loop Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.314591,"lng":-86.24074999999999}},{"address1":"7711 North 51st Avenue","address2":"#1180","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5502243,"lng":-112.1665731}},{"address1":"343 Daman Drive","address2":"","city":"Montgomery","state":"AL","postalCode":"36108","coordinates":{"lat":32.2999,"lng":-86.342286}},{"address1":"3623 Chateau Lane","address2":"","city":"Louisville","state":"KY","postalCode":"40219","coordinates":{"lat":38.1473803,"lng":-85.6954641}},{"address1":"2619 North Quality Lane","address2":"#315","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.09925399999999,"lng":-94.164274}},{"address1":"5334 West Northern Avenue","address2":"#327","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5535111,"lng":-112.1747068}},{"address1":"3835 Oakes Drive","address2":"","city":"Hayward","state":"CA","postalCode":"94542","coordinates":{"lat":37.661345,"lng":-122.032784}},{"address1":"295 Townes Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37211","coordinates":{"lat":36.052158,"lng":-86.70206900000001}},{"address1":"125 13th Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20002","coordinates":{"lat":38.891265,"lng":-76.988068}},{"address1":"7308 Northwest 119th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73162","coordinates":{"lat":35.592396,"lng":-97.643619}},{"address1":"1911 East 58th Avenue","address2":"","city":"Anchorage","state":"AK","postalCode":"99507","coordinates":{"lat":61.16876999999999,"lng":-149.847225}},{"address1":"22649 McManus Drive","address2":"","city":"Anchorage","state":"AK","postalCode":"99567","coordinates":{"lat":61.418189,"lng":-149.460766}},{"address1":"4617 East 3rd Street","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.129243,"lng":-85.606926}},{"address1":"6436 Stoney Point Road","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.266241,"lng":-85.599245}},{"address1":"2577 Rhode Island Avenue Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20018","coordinates":{"lat":38.931902,"lng":-76.969579}},{"address1":"44 Campfield Road","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.768442,"lng":-72.540232}},{"address1":"7132 South Villa Avenue","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73159","coordinates":{"lat":35.392665,"lng":-97.5569639}},{"address1":"107 West Canton Circle","address2":"","city":"Springfield","state":"MA","postalCode":"01104","coordinates":{"lat":42.144682,"lng":-72.57098599999999}},{"address1":"14358 West 88th Place","address2":"C","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.8568436,"lng":-105.161713}},{"address1":"2100 Sandy Creek Trail","address2":"","city":"Edmond","state":"OK","postalCode":"73013","coordinates":{"lat":35.63330699999999,"lng":-97.509911}},{"address1":"6404 West 82nd Drive","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.846475,"lng":-105.067397}},{"address1":"1609 Porter Avenue","address2":"","city":"Nashville","state":"TN","postalCode":"37206","coordinates":{"lat":36.196292,"lng":-86.725028}},{"address1":"8421 Thomas Drive","address2":"#4","city":"Panama City","state":"FL","postalCode":"32408","coordinates":{"lat":30.165178,"lng":-85.78605}},{"address1":"116 Frost Park","address2":"","city":"Hartford","state":"VT","postalCode":"05001","coordinates":{"lat":43.6692262,"lng":-72.3088865}},{"address1":"132 Tensaw Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36117","coordinates":{"lat":32.384289,"lng":-86.147064}},{"address1":"3147 West Old Farmington Road","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.0531475,"lng":-94.2055113}},{"address1":"3538 Mendenhall Court","address2":"","city":"Pleasanton","state":"CA","postalCode":"94588","coordinates":{"lat":37.6991919,"lng":-121.85909}},{"address1":"1623 Mines Road","address2":"","city":"Lowell","state":"VT","postalCode":"05847","coordinates":{"lat":44.795108,"lng":-72.48690599999999}},{"address1":"99 Pond Avenue","address2":"#606","city":"Brookline","state":"MA","postalCode":"02445","coordinates":{"lat":42.3293159,"lng":-71.1152839}},{"address1":"557 West Willoughby Road","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.019975,"lng":-94.16828199999999}},{"address1":"309 Brooke Court","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.1536175,"lng":-85.5881338}},{"address1":"4696 Bull Run Road","address2":"","city":"Ashland City","state":"TN","postalCode":"37015","coordinates":{"lat":36.241285,"lng":-86.940741}},{"address1":"18330 North 79th Avenue","address2":"#3155","city":"Glendale","state":"AZ","postalCode":"85308","coordinates":{"lat":33.6487128,"lng":-112.2313289}},{"address1":"5601 West Missouri Avenue","address2":"#165","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.5152999,"lng":-112.179748}},{"address1":"2903 West 31st Avenue","address2":"#APT 000002","city":"Anchorage","state":"AK","postalCode":"99517","coordinates":{"lat":61.192819,"lng":-149.937665}},{"address1":"2611 Bluefield Avenue","address2":"","city":"Nashville","state":"TN","postalCode":"37214","coordinates":{"lat":36.16786,"lng":-86.670203}},{"address1":"203 East Gwinnett Street","address2":"","city":"Savannah","state":"GA","postalCode":"31401","coordinates":{"lat":32.06637,"lng":-81.093895}},{"address1":"3517 S Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20007","coordinates":{"lat":38.914807,"lng":-77.070229}},{"address1":"1123 Ardee Avenue","address2":"","city":"Nashville","state":"TN","postalCode":"37216","coordinates":{"lat":36.219121,"lng":-86.725616}},{"address1":"3811 W Street Southeast","address2":"","city":"Washington","state":"DC","postalCode":"20020","coordinates":{"lat":38.8629369,"lng":-76.9515086}},{"address1":"2130 Loren Circle","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.071889,"lng":-94.191613}},{"address1":"4 Orchard Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.7747,"lng":-72.5247351}},{"address1":"4755 Coventry Road","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.318132,"lng":-86.28353}},{"address1":"1806 Boscobel Street","address2":"","city":"Nashville","state":"TN","postalCode":"37206","coordinates":{"lat":36.170799,"lng":-86.73835299999999}},{"address1":"7034 West John Garrison Road","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.107097,"lng":-94.2619139}},{"address1":"233 Juniper Drive","address2":"","city":"South Burlington","state":"VT","postalCode":"05403","coordinates":{"lat":44.473457,"lng":-73.176118}},{"address1":"1831 Frankford Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.181993,"lng":-85.692285}},{"address1":"4924 West 65th Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.8146604,"lng":-105.050343}},{"address1":"7095 Gladiola Street","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.824892,"lng":-105.162799}},{"address1":"7564 Moore Court","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.834188,"lng":-105.11569}},{"address1":"8442 Everett Way","address2":"A","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.850942,"lng":-105.096599}},{"address1":"1330 West 82nd Avenue","address2":"","city":"Anchorage","state":"AK","postalCode":"99518","coordinates":{"lat":61.147676,"lng":-149.905329}},{"address1":"4907 Roger Drive","address2":"","city":"Anchorage","state":"AK","postalCode":"99507","coordinates":{"lat":61.17564799999999,"lng":-149.839627}},{"address1":"123 Blossom Road","address2":"","city":"Westport","state":"MA","postalCode":"02790","coordinates":{"lat":41.68531,"lng":-71.0961337}},{"address1":"915 Hargrove Street","address2":"","city":"Ardmore","state":"OK","postalCode":"73401","coordinates":{"lat":34.184371,"lng":-97.13386190000001}},{"address1":"1983 Reidsville Street","address2":"","city":"Annapolis","state":"MD","postalCode":"21401","coordinates":{"lat":38.9817243,"lng":-76.5313745}},{"address1":"12403 Deerfield Road","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.977229,"lng":-81.145139}},{"address1":"1011 Devon Drive","address2":"","city":"Hayward","state":"CA","postalCode":"94542","coordinates":{"lat":37.65444100000001,"lng":-122.067741}},{"address1":"5222 West Laurie Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85302","coordinates":{"lat":33.5587639,"lng":-112.172235}},{"address1":"35 Pilgrim Lane","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.772138,"lng":-72.498806}},{"address1":"2728 Hale Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40211","coordinates":{"lat":38.2390813,"lng":-85.79926999999999}},{"address1":"65 Lowry Road","address2":"","city":"Falmouth","state":"MA","postalCode":"02540","coordinates":{"lat":41.5471365,"lng":-70.6075836}},{"address1":"302 Depot Road","address2":"","city":"Boxborough","state":"MA","postalCode":"01719","coordinates":{"lat":42.5013,"lng":-71.49441}},{"address1":"1402 Maggies Way","address2":"","city":"Waterbury Center","state":"VT","postalCode":"05677","coordinates":{"lat":44.410965,"lng":-72.71017499999999}},{"address1":"81 Lyness Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.76787789999999,"lng":-72.5443361}},{"address1":"6518 Dolphin Court","address2":"","city":"Glen Burnie","state":"MD","postalCode":"21061","coordinates":{"lat":39.198769,"lng":-76.63721}},{"address1":"1842 West Park Place","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73106","coordinates":{"lat":35.4795219,"lng":-97.5431009}},{"address1":"1 Pond View Road","address2":"","city":"Proctor","state":"VT","postalCode":"05765","coordinates":{"lat":43.663678,"lng":-73.0458419}},{"address1":"1340 5th Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20001","coordinates":{"lat":38.907549,"lng":-77.018924}},{"address1":"6000 Parker Drive","address2":"","city":"Deale","state":"MD","postalCode":"20751","coordinates":{"lat":38.780208,"lng":-76.539991}},{"address1":"822 Bowden Street","address2":"","city":"Savannah","state":"GA","postalCode":"31415","coordinates":{"lat":32.071342,"lng":-81.11783199999999}},{"address1":"1710 East Harold Street","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.109875,"lng":-94.1359389}},{"address1":"1518 Jenks Avenue","address2":"","city":"Panama City","state":"FL","postalCode":"32405","coordinates":{"lat":30.1765819,"lng":-85.662077}},{"address1":"814 South Pickard Avenue","address2":"","city":"Norman","state":"OK","postalCode":"73069","coordinates":{"lat":35.206961,"lng":-97.45494099999999}},{"address1":"100 Fenwick Village Drive","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":32.0244412,"lng":-81.23017689999999}},{"address1":"218 Middle Street","address2":"","city":"Brighton","state":"VT","postalCode":"05846","coordinates":{"lat":44.818438,"lng":-71.8846049}},{"address1":"5470 Atlanta Highway","address2":"","city":"Montgomery","state":"AL","postalCode":"36109","coordinates":{"lat":32.3802399,"lng":-86.21232959999999}},{"address1":"43 Main Street","address2":"","city":"Essex","state":"VT","postalCode":"05452","coordinates":{"lat":44.4921,"lng":-73.1074749}},{"address1":"804 East 7th Court","address2":"","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.161259,"lng":-85.648719}},{"address1":"1709 Queensbury Road","address2":"","city":"Moore","state":"OK","postalCode":"73160","coordinates":{"lat":35.3546959,"lng":-97.507938}},{"address1":"646 Clinton Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36108","coordinates":{"lat":32.3602725,"lng":-86.3183004}},{"address1":"708 Pine Drift Drive","address2":"","city":"Odenton","state":"MD","postalCode":"21113","coordinates":{"lat":39.070589,"lng":-76.715406}},{"address1":"5104 West Tierra Buena Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85306","coordinates":{"lat":33.62898759999999,"lng":-112.168811}},{"address1":"1234 Carmel Street","address2":"","city":"Madera","state":"CA","postalCode":"93638","coordinates":{"lat":36.949941,"lng":-120.043739}},{"address1":"1753 Zion Road","address2":"#E33","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.1273162,"lng":-94.1350437}},{"address1":"22538 6th Street","address2":"","city":"Hayward","state":"CA","postalCode":"94541","coordinates":{"lat":37.680829,"lng":-122.07335}},{"address1":"415 Lullwater Drive","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32413","coordinates":{"lat":30.22177929999999,"lng":-85.8841423}},{"address1":"219 Bidwell Street","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.761322,"lng":-72.5498278}},{"address1":"4500 Margalo Avenue","address2":"","city":"Bakersfield","state":"CA","postalCode":"93313","coordinates":{"lat":35.305082,"lng":-119.052448}},{"address1":"8380 West 67th Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80004","coordinates":{"lat":39.817999,"lng":-105.090301}},{"address1":"2334 Nantucket Drive","address2":"","city":"Crofton","state":"MD","postalCode":"21114","coordinates":{"lat":39.0298609,"lng":-76.67307600000001}},{"address1":"720 East Muhammad Ali Boulevard","address2":"","city":"Louisville","state":"KY","postalCode":"40202","coordinates":{"lat":38.2491941,"lng":-85.7396682}},{"address1":"12022 Town Park Circle","address2":"","city":"Anchorage","state":"AK","postalCode":"99577","coordinates":{"lat":61.32927710000001,"lng":-149.5778193}},{"address1":"2305 Ranchland Drive","address2":"","city":"Savannah","state":"GA","postalCode":"31404","coordinates":{"lat":32.026112,"lng":-81.0755779}},{"address1":"1656 Newton Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20010","coordinates":{"lat":38.933985,"lng":-77.03866099999999}},{"address1":"91 85th Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72704","coordinates":{"lat":36.064165,"lng":-94.285358}},{"address1":"228 Central Street","address2":"","city":"Milford","state":"MA","postalCode":"01757","coordinates":{"lat":42.13911,"lng":-71.5115022}},{"address1":"20 Masters Way","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.740694,"lng":-72.51832}},{"address1":"5396 North Reese Avenue","address2":"","city":"Fresno","state":"CA","postalCode":"93722","coordinates":{"lat":36.815278,"lng":-119.864119}},{"address1":"28 Wilfred Road","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.766696,"lng":-72.5597335}},{"address1":"200 Pheasant Avenue","address2":"#103","city":"Louisville","state":"KY","postalCode":"40118","coordinates":{"lat":38.1134628,"lng":-85.76321279999999}},{"address1":"1650 Garland Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.0845144,"lng":-94.1751065}},{"address1":"4600 Ritchie Highway","address2":"","city":"Baltimore","state":"MD","postalCode":"21225","coordinates":{"lat":39.228241,"lng":-76.6136159}},{"address1":"733 East DeRenne Avenue","address2":"","city":"Savannah","state":"GA","postalCode":"31405","coordinates":{"lat":32.024217,"lng":-81.095602}},{"address1":"8349 West Stella Way","address2":"","city":"Glendale","state":"AZ","postalCode":"85305","coordinates":{"lat":33.529493,"lng":-112.240632}},{"address1":"33 Pond Avenue","address2":"#804","city":"Brookline","state":"MA","postalCode":"02445","coordinates":{"lat":42.33094200000001,"lng":-71.1145331}},{"address1":"9 Kimball Court","address2":"#107","city":"Burlington","state":"MA","postalCode":"01803","coordinates":{"lat":42.501798,"lng":-71.168725}},{"address1":"2433 Southwest 36th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73109","coordinates":{"lat":35.42839900000001,"lng":-97.556119}},{"address1":"4607 Artelia Drive","address2":"","city":"Nashville","state":"TN","postalCode":"37013","coordinates":{"lat":36.071468,"lng":-86.675555}},{"address1":"212 Ambleside Drive","address2":"","city":"Severna Park","state":"MD","postalCode":"21146","coordinates":{"lat":39.097022,"lng":-76.55617699999999}},{"address1":"8757 Lamar Circle","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.8557446,"lng":-105.0681477}},{"address1":"130 Carolina Cherry Circle","address2":"","city":"Pooler","state":"GA","postalCode":"31322","coordinates":{"lat":32.1485911,"lng":-81.2620116}},{"address1":"7804 Abercorn Street","address2":"#11","city":"Savannah","state":"GA","postalCode":"31406","coordinates":{"lat":32.00192,"lng":-81.11689830000002}},{"address1":"12870 Old Seward Highway","address2":"#STE 000105","city":"Anchorage","state":"AK","postalCode":"99515","coordinates":{"lat":61.10396369999999,"lng":-149.8575515}},{"address1":"8133 Meadowgreen Place","address2":"","city":"Louisville","state":"KY","postalCode":"40299","coordinates":{"lat":38.1899697,"lng":-85.60704779999999}},{"address1":"5 Meadow Lane","address2":"","city":"Rutland","state":"VT","postalCode":"05701","coordinates":{"lat":43.619797,"lng":-72.983231}},{"address1":"562 South Pierremont Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.05627330000001,"lng":-94.1251461}},{"address1":"1219 Carleton Street","address2":"M","city":"Berkeley","state":"CA","postalCode":"94702","coordinates":{"lat":37.8591054,"lng":-122.285823}},{"address1":"1403 Boulder Court","address2":"","city":"Hanover","state":"MD","postalCode":"21076","coordinates":{"lat":39.140743,"lng":-76.69958}},{"address1":"122 Coral Drive","address2":"","city":"Panama City Beach","state":"FL","postalCode":"32413","coordinates":{"lat":30.233822,"lng":-85.89228399999999}},{"address1":"1404 James Way","address2":"","city":"Edgewater","state":"MD","postalCode":"21037","coordinates":{"lat":38.8879642,"lng":-76.5100926}},{"address1":"4300 Woodley Square","address2":"","city":"Montgomery","state":"AL","postalCode":"36116","coordinates":{"lat":32.3269015,"lng":-86.2695368}},{"address1":"422 Richmond Street","address2":"","city":"El Cerrito","state":"CA","postalCode":"94530","coordinates":{"lat":37.9028101,"lng":-122.2981152}},{"address1":"222 Plymouth Street","address2":"A","city":"Middleborough","state":"MA","postalCode":"02346","coordinates":{"lat":41.928117,"lng":-70.9416075}},{"address1":"451 East Street","address2":"","city":"Huntington","state":"VT","postalCode":"05462","coordinates":{"lat":44.3194104,"lng":-72.9844982}},{"address1":"9209 Eupora Court","address2":"","city":"Jeffersontown","state":"KY","postalCode":"40299","coordinates":{"lat":38.1970417,"lng":-85.58631430000001}},{"address1":"4 Conti Circle","address2":"","city":"Barre","state":"VT","postalCode":"05641","coordinates":{"lat":44.1731699,"lng":-72.4920951}},{"address1":"5264 Shafter Avenue","address2":"","city":"Oakland","state":"CA","postalCode":"94618","coordinates":{"lat":37.839058,"lng":-122.256035}},{"address1":"1630 Eton Way","address2":"","city":"Crofton","state":"MD","postalCode":"21114","coordinates":{"lat":39.008958,"lng":-76.69134199999999}},{"address1":"5244 West Port Au Prince Lane","address2":"","city":"Glendale","state":"AZ","postalCode":"85306","coordinates":{"lat":33.622672,"lng":-112.17283}},{"address1":"1835 Pointer Lane","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.08606899999999,"lng":-94.1187549}},{"address1":"107 Laurel Green Court","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":32.025628,"lng":-81.24673399999999}},{"address1":"7250 Urban Drive","address2":"","city":"Arvada","state":"CO","postalCode":"80005","coordinates":{"lat":39.827875,"lng":-105.133965}},{"address1":"12 Kane Road","address2":"","city":"Manchester","state":"CT","postalCode":"06040","coordinates":{"lat":41.764315,"lng":-72.51276}},{"address1":"4132 Northwest 57th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73112","coordinates":{"lat":35.529164,"lng":-97.594155}},{"address1":"10774 West 54th Lane","address2":"","city":"Arvada","state":"CO","postalCode":"80002","coordinates":{"lat":39.7963587,"lng":-105.11861}},{"address1":"6729 North 54th Avenue","address2":"","city":"Glendale","state":"AZ","postalCode":"85301","coordinates":{"lat":33.536068,"lng":-112.17458}},{"address1":"6483 West 76th Avenue","address2":"","city":"Arvada","state":"CO","postalCode":"80003","coordinates":{"lat":39.834927,"lng":-105.069802}},{"address1":"5732 Jean Drive","address2":"","city":"Union City","state":"CA","postalCode":"94587","coordinates":{"lat":37.580691,"lng":-122.082773}},{"address1":"8221 Surf Drive","address2":"","city":"Panama City","state":"FL","postalCode":"32408","coordinates":{"lat":30.1630986,"lng":-85.7845665}},{"address1":"9101 Vanguard Drive","address2":"","city":"Anchorage","state":"AK","postalCode":"99507","coordinates":{"lat":61.1382426,"lng":-149.84756}},{"address1":"18713 Shilstone Way","address2":"","city":"Edmond","state":"OK","postalCode":"73012","coordinates":{"lat":35.6618776,"lng":-97.53426999999999}},{"address1":"51185 Helmsman Street","address2":"","city":"Kenai","state":"AK","postalCode":"99611","coordinates":{"lat":60.509562,"lng":-151.265293}},{"address1":"128 East Oak Street","address2":"#3","city":"Louisville","state":"KY","postalCode":"40203","coordinates":{"lat":38.2342125,"lng":-85.7539867}},{"address1":"1222 Arcade Boulevard","address2":"","city":"Sacramento","state":"CA","postalCode":"95815","coordinates":{"lat":38.626122,"lng":-121.43861}},{"address1":"1405 Mercedes Avenue","address2":"APARTMENT G","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.1738039,"lng":-85.6462091}},{"address1":"7024 Johnny Mercer Boulevard","address2":"","city":"Savannah","state":"GA","postalCode":"31410","coordinates":{"lat":32.022447,"lng":-80.969861}},{"address1":"3600 Pennsylvania Avenue","address2":"#APT 6","city":"Fremont","state":"CA","postalCode":"94536","coordinates":{"lat":37.5516245,"lng":-121.9872735}},{"address1":"312 North Cove Boulevard","address2":"","city":"Panama City","state":"FL","postalCode":"32401","coordinates":{"lat":30.1520433,"lng":-85.6500713}},{"address1":"3118 Sora Avenue","address2":"","city":"Louisville","state":"KY","postalCode":"40213","coordinates":{"lat":38.208849,"lng":-85.724113}},{"address1":"6420 Via Baron","address2":"","city":"Rancho Palos Verdes","state":"CA","postalCode":"90275","coordinates":{"lat":33.741162,"lng":-118.390767}},{"address1":"3321 Furman Boulevard","address2":"","city":"Louisville","state":"KY","postalCode":"40220","coordinates":{"lat":38.2134349,"lng":-85.640439}},{"address1":"98 Lincoln Street","address2":"","city":"Revere","state":"MA","postalCode":"02151","coordinates":{"lat":42.418115,"lng":-71.027503}},{"address1":"984 Greendale Avenue","address2":"","city":"Needham","state":"MA","postalCode":"02492","coordinates":{"lat":42.275811,"lng":-71.203287}},{"address1":"239 Eastern Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0605438,"lng":-94.18373079999999}},{"address1":"1106 Commanders Way South","address2":"","city":"Annapolis","state":"MD","postalCode":"21409","coordinates":{"lat":39.033352,"lng":-76.447767}},{"address1":"4927 Alvin Sperry Road","address2":"","city":"Mount Juliet","state":"TN","postalCode":"37122","coordinates":{"lat":36.143557,"lng":-86.556877}},{"address1":"1632 North Lunsford Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.0827979,"lng":-94.137607}},{"address1":"2349 East Tall Oaks Drive","address2":"","city":"Fayetteville","state":"AR","postalCode":"72703","coordinates":{"lat":36.09277,"lng":-94.12758799999999}},{"address1":"2036 Hermitage Hills Drive","address2":"","city":"Gambrills","state":"MD","postalCode":"21054","coordinates":{"lat":38.9951,"lng":-76.65160999999999}},{"address1":"119 Oakland Street","address2":"","city":"Manchester","state":"CT","postalCode":"06042","coordinates":{"lat":41.7976637,"lng":-72.5199944}},{"address1":"37675 Fremont Boulevard","address2":"#APT 42","city":"Fremont","state":"CA","postalCode":"94536","coordinates":{"lat":37.555306,"lng":-122.003412}},{"address1":"3104 Southwest 46th Street","address2":"","city":"Oklahoma City","state":"OK","postalCode":"73119","coordinates":{"lat":35.4186213,"lng":-97.56952249999999}},{"address1":"2036 Gorgas Street","address2":"","city":"Montgomery","state":"AL","postalCode":"36106","coordinates":{"lat":32.357301,"lng":-86.276583}},{"address1":"11102 Little Rock Court","address2":"","city":"Louisville","state":"KY","postalCode":"40241","coordinates":{"lat":38.3214271,"lng":-85.5421016}},{"address1":"46 Deslauriers Street","address2":"","city":"Chicopee","state":"MA","postalCode":"01020","coordinates":{"lat":42.1855005,"lng":-72.5733508}},{"address1":"12 Red Fox Drive","address2":"","city":"Savannah","state":"GA","postalCode":"31419","coordinates":{"lat":31.981396,"lng":-81.22833899999999}},{"address1":"503 Blackwood Terrace Southeast","address2":"","city":"Calhoun","state":"GA","postalCode":"30701","coordinates":{"lat":34.459017,"lng":-84.914659}},{"address1":"2223 North Fernwood Court","address2":"","city":"Savannah","state":"GA","postalCode":"31404","coordinates":{"lat":32.029307,"lng":-81.06297099999999}},{"address1":"5444 Nicole Boulevard","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.238007,"lng":-85.562274}},{"address1":"849 East Victoria Street","address2":"#204","city":"Carson","state":"CA","postalCode":"90746","coordinates":{"lat":33.8673562,"lng":-118.2597713}},{"address1":"445 South Potomac Circle","address2":"","city":"Aurora","state":"CO","postalCode":"80012","coordinates":{"lat":39.705341,"lng":-104.830397}},{"address1":"201 East 9th Avenue","address2":"#APT 000102","city":"Anchorage","state":"AK","postalCode":"99501","coordinates":{"lat":61.213897,"lng":-149.880633}},{"address1":"3500 15th Street Northeast","address2":"","city":"Washington","state":"DC","postalCode":"20017","coordinates":{"lat":38.93311000000001,"lng":-76.98485699999999}},{"address1":"4981 Shirley Way","address2":"","city":"Livermore","state":"CA","postalCode":"94550","coordinates":{"lat":37.682649,"lng":-121.733308}},{"address1":"1300 Lemos Lane","address2":"","city":"Fremont","state":"CA","postalCode":"94539","coordinates":{"lat":37.546996,"lng":-121.951627}},{"address1":"5000 V Street Northwest","address2":"","city":"Washington","state":"DC","postalCode":"20007","coordinates":{"lat":38.917076,"lng":-77.09743399999999}},{"address1":"6823 Forsythe Drive","address2":"","city":"Panama City","state":"FL","postalCode":"32404","coordinates":{"lat":30.12332199999999,"lng":-85.571428}},{"address1":"1522 South 36th Street","address2":"","city":"Louisville","state":"KY","postalCode":"40211","coordinates":{"lat":38.231691,"lng":-85.8144612}},{"address1":"313 Lone Oak Drive","address2":"","city":"Norman","state":"OK","postalCode":"73071","coordinates":{"lat":35.221084,"lng":-97.405029}},{"address1":"970 Old Oak Road","address2":"","city":"Livermore","state":"CA","postalCode":"94550","coordinates":{"lat":37.653774,"lng":-121.796632}},{"address1":"1653 Brooks Avenue","address2":"","city":"Fayetteville","state":"AR","postalCode":"72701","coordinates":{"lat":36.04687,"lng":-94.17589699999999}},{"address1":"441 Merritt Avenue","address2":"","city":"Oakland","state":"CA","postalCode":"94610","coordinates":{"lat":37.8058663,"lng":-122.2493644}},{"address1":"632 North Pine Street","address2":"","city":"Anchorage","state":"AK","postalCode":"99508","coordinates":{"lat":61.22930220000001,"lng":-149.7938547}}],"attribution":["City of Haddam (CT)","Ciy of Hartford (CT)","City of Lyme (CT)","City of Manchester (CT)","City of Watertown (CT)","City of Avon (CT)","Town of Fairfield (CT)","City of Groton (CT)","Office of Geographic Information (MassGIS), Commonwealth of Massachusetts, MassIT (MA)","VT Enhanced 911 Board, VCGI (VT)","City of Huntsville (AL)","City of Montgomery (AL)","Shelby County (AL)","Talladega County (AL)","City of Fayetteville (AR)","Arkansas Geographic Information Office (AR)","City of Washington (DC)","Bay County (FL)","Brevard County (FL)","Charlotte County (FL)","Citrus County (FL)","Clay County (FL)","Highlands County, FL (FL)","Hillsborough County (FL)","City of Savannah (GA)","Gordon County (GA)","Muscogee County (GA)","Sumter County (GA)","Metro Louisville, LOJIC partners (KY)","Anne Arundel County (MD)","City of Baltimore (MD)","Frederick County (MD)","Oklahoma and Logan Counties - Association of Central Oklahoma Governments (OK)","Kern, Cleveland, Canadian, Logan Counties (OK)","City of Nashville (TN)","Cooke,Fannin,Grayson Counties - Texoma Council of Governments (TX)","Municipality of Anchorage (AK)","Copyright © 2015 Kenai Peninsula Borough (AK)","Matanuska-Susitna Borough (AK)","City of Glendale (AZ)","City of Mesa (AZ)","Alameda County (CA)","Amador County (CA)","City of Berkeley (CA)","Butte County (CA)","City of Bakersfield (CA)","City of Carson (CA)","City of Cupertino (CA)","City of Hayward and Fairview. Licensed for Public Use (CA)","City of Mountain View (CA)","City of Orange (CA)","Contra Costa County (CA)","El Dorando County (CA)","Fresno County (CA)","Humboldt County (CA)","Kern County (CA)","Kings County (CA)","Lake County (CA)","Lassen County (CA)","Los Angeles County (CA)","Madera County (CA)","Marin County (CA)","Merced County (CA)","Mono County (CA)","Monterey County (CA)","Napa County (CA)","County of Nevada, California (CA)","Orange County (CA)","City of Palo Alto (CA)","County of Placer (CA)","Secramento County (CA)","San Bernardino County (CA)","San Diego Geographic Information Source - JPA (CA)","San Joaquin County (CA)","San Luis Obispo County (CA)","San Mateo County (CA)","Santa Barbara County (CA)","Santa Clara County (CA)","Santa Cruz County (CA)","Shasta County (CA)","Solano County (CA)","Sonoma County (CA)","Stanislaus County (CA)","Tuolumne County (CA)","Yolo County (CA)","Yuba County (CA)","Arapahoe County (CO)","Archuleta County (CO)","City of Arvada (CO)","City of Aurora (CO)","City of Boulder (CO)","City of Fort Collins (CO)","City of Greeley (CO)","City of Loveland (CO)","City of Westminster (CO)","Gilpin County (CO)","Gunnison County (CO)","Jefferson County (CO)","Larimer County (CO)","Mesa County (CO)","Pitkin County (CO)","Pubelo County (CO)","San Miguel County (CO)","City of Honolulu (HI)"]}
diff --git a/vendor/github.com/go-faker/faker/v4/misc/country_info.json b/vendor/github.com/go-faker/faker/v4/misc/country_info.json
new file mode 100644
index 0000000..ed99552
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/misc/country_info.json
@@ -0,0 +1,1754 @@
+{
+ "countries": [
+ {
+ "abbr": "AD",
+ "name": "Andorra",
+ "capital": "Andorra la Vella",
+ "population": "77,006",
+ "continent": "EU"
+ },
+ {
+ "abbr": "AE",
+ "name": "United Arab Emirates",
+ "capital": "Abu Dhabi",
+ "population": "9,630,959",
+ "continent": "AS"
+ },
+ {
+ "abbr": "AF",
+ "name": "Afghanistan",
+ "capital": "Kabul",
+ "population": "37,172,386",
+ "continent": "AS"
+ },
+ {
+ "abbr": "AG",
+ "name": "Antigua and Barbuda",
+ "capital": "St. John's",
+ "population": "96,286",
+ "continent": "NA"
+ },
+ {
+ "abbr": "AI",
+ "name": "Anguilla",
+ "capital": "The Valley",
+ "population": "13,254",
+ "continent": "NA"
+ },
+ {
+ "abbr": "AL",
+ "name": "Albania",
+ "capital": "Tirana",
+ "population": "2,866,376",
+ "continent": "EU"
+ },
+ {
+ "abbr": "AM",
+ "name": "Armenia",
+ "capital": "Yerevan",
+ "population": "2,951,776",
+ "continent": "AS"
+ },
+ {
+ "abbr": "AO",
+ "name": "Angola",
+ "capital": "Luanda",
+ "population": "30,809,762",
+ "continent": "AF"
+ },
+ {
+ "abbr": "AQ",
+ "name": "Antarctica",
+ "capital": "",
+ "population": "0",
+ "continent": "AN"
+ },
+ {
+ "abbr": "AR",
+ "name": "Argentina",
+ "capital": "Buenos Aires",
+ "population": "44,494,502",
+ "continent": "SA"
+ },
+ {
+ "abbr": "AS",
+ "name": "American Samoa",
+ "capital": "Pago Pago",
+ "population": "55,465",
+ "continent": "OC"
+ },
+ {
+ "abbr": "AT",
+ "name": "Austria",
+ "capital": "Vienna",
+ "population": "8,847,037",
+ "continent": "EU"
+ },
+ {
+ "abbr": "AU",
+ "name": "Australia",
+ "capital": "Canberra",
+ "population": "24,992,369",
+ "continent": "OC"
+ },
+ {
+ "abbr": "AW",
+ "name": "Aruba",
+ "capital": "Oranjestad",
+ "population": "105,845",
+ "continent": "NA"
+ },
+ {
+ "abbr": "AX",
+ "name": "Åland",
+ "capital": "Mariehamn",
+ "population": "26,711",
+ "continent": "EU"
+ },
+ {
+ "abbr": "AZ",
+ "name": "Azerbaijan",
+ "capital": "Baku",
+ "population": "9,942,334",
+ "continent": "AS"
+ },
+ {
+ "abbr": "BA",
+ "name": "Bosnia and Herzegovina",
+ "capital": "Sarajevo",
+ "population": "3,323,929",
+ "continent": "EU"
+ },
+ {
+ "abbr": "BB",
+ "name": "Barbados",
+ "capital": "Bridgetown",
+ "population": "286,641",
+ "continent": "NA"
+ },
+ {
+ "abbr": "BD",
+ "name": "Bangladesh",
+ "capital": "Dhaka",
+ "population": "161,356,039",
+ "continent": "AS"
+ },
+ {
+ "abbr": "BE",
+ "name": "Belgium",
+ "capital": "Brussels",
+ "population": "11,422,068",
+ "continent": "EU"
+ },
+ {
+ "abbr": "BF",
+ "name": "Burkina Faso",
+ "capital": "Ouagadougou",
+ "population": "19,751,535",
+ "continent": "AF"
+ },
+ {
+ "abbr": "BG",
+ "name": "Bulgaria",
+ "capital": "Sofia",
+ "population": "7,000,039",
+ "continent": "EU"
+ },
+ {
+ "abbr": "BH",
+ "name": "Bahrain",
+ "capital": "Manama",
+ "population": "1,569,439",
+ "continent": "AS"
+ },
+ {
+ "abbr": "BI",
+ "name": "Burundi",
+ "capital": "Gitega",
+ "population": "11,175,378",
+ "continent": "AF"
+ },
+ {
+ "abbr": "BJ",
+ "name": "Benin",
+ "capital": "Porto-Novo",
+ "population": "11,485,048",
+ "continent": "AF"
+ },
+ {
+ "abbr": "BL",
+ "name": "Saint Barthélemy",
+ "capital": "Gustavia",
+ "population": "8,450",
+ "continent": "NA"
+ },
+ {
+ "abbr": "BM",
+ "name": "Bermuda",
+ "capital": "Hamilton",
+ "population": "63,968",
+ "continent": "NA"
+ },
+ {
+ "abbr": "BN",
+ "name": "Brunei",
+ "capital": "Bandar Seri Begawan",
+ "population": "428,962",
+ "continent": "AS"
+ },
+ {
+ "abbr": "BO",
+ "name": "Bolivia",
+ "capital": "Sucre",
+ "population": "11,353,142",
+ "continent": "SA"
+ },
+ {
+ "abbr": "BQ",
+ "name": "Bonaire, Sint Eustatius, and Saba",
+ "capital": "",
+ "population": "18,012",
+ "continent": "NA"
+ },
+ {
+ "abbr": "BR",
+ "name": "Brazil",
+ "capital": "Brasilia",
+ "population": "209,469,333",
+ "continent": "SA"
+ },
+ {
+ "abbr": "BS",
+ "name": "Bahamas",
+ "capital": "Nassau",
+ "population": "385,640",
+ "continent": "NA"
+ },
+ {
+ "abbr": "BT",
+ "name": "Bhutan",
+ "capital": "Thimphu",
+ "population": "754,394",
+ "continent": "AS"
+ },
+ {
+ "abbr": "BV",
+ "name": "Bouvet Island",
+ "capital": "",
+ "population": "0",
+ "continent": "AN"
+ },
+ {
+ "abbr": "BW",
+ "name": "Botswana",
+ "capital": "Gaborone",
+ "population": "2,254,126",
+ "continent": "AF"
+ },
+ {
+ "abbr": "BY",
+ "name": "Belarus",
+ "capital": "Minsk",
+ "population": "9,485,386",
+ "continent": "EU"
+ },
+ {
+ "abbr": "BZ",
+ "name": "Belize",
+ "capital": "Belmopan",
+ "population": "383,071",
+ "continent": "NA"
+ },
+ {
+ "abbr": "CA",
+ "name": "Canada",
+ "capital": "Ottawa",
+ "population": "37,058,856",
+ "continent": "NA"
+ },
+ {
+ "abbr": "CC",
+ "name": "Cocos (Keeling) Islands",
+ "capital": "West Island",
+ "population": "628",
+ "continent": "AS"
+ },
+ {
+ "abbr": "CD",
+ "name": "DR Congo",
+ "capital": "Kinshasa",
+ "population": "84,068,091",
+ "continent": "AF"
+ },
+ {
+ "abbr": "CF",
+ "name": "Central African Republic",
+ "capital": "Bangui",
+ "population": "4,666,377",
+ "continent": "AF"
+ },
+ {
+ "abbr": "CG",
+ "name": "Congo Republic",
+ "capital": "Brazzaville",
+ "population": "5,244,363",
+ "continent": "AF"
+ },
+ {
+ "abbr": "CH",
+ "name": "Switzerland",
+ "capital": "Bern",
+ "population": "8,516,543",
+ "continent": "EU"
+ },
+ {
+ "abbr": "CI",
+ "name": "Ivory Coast",
+ "capital": "Yamoussoukro",
+ "population": "25,069,229",
+ "continent": "AF"
+ },
+ {
+ "abbr": "CK",
+ "name": "Cook Islands",
+ "capital": "Avarua",
+ "population": "21,388",
+ "continent": "OC"
+ },
+ {
+ "abbr": "CL",
+ "name": "Chile",
+ "capital": "Santiago",
+ "population": "18,729,160",
+ "continent": "SA"
+ },
+ {
+ "abbr": "CM",
+ "name": "Cameroon",
+ "capital": "Yaounde",
+ "population": "25,216,237",
+ "continent": "AF"
+ },
+ {
+ "abbr": "CN",
+ "name": "China",
+ "capital": "Beijing",
+ "population": "1,411,778,724",
+ "continent": "AS"
+ },
+ {
+ "abbr": "CO",
+ "name": "Colombia",
+ "capital": "Bogota",
+ "population": "49,648,685",
+ "continent": "SA"
+ },
+ {
+ "abbr": "CR",
+ "name": "Costa Rica",
+ "capital": "San Jose",
+ "population": "4,999,441",
+ "continent": "NA"
+ },
+ {
+ "abbr": "CU",
+ "name": "Cuba",
+ "capital": "Havana",
+ "population": "11,338,138",
+ "continent": "NA"
+ },
+ {
+ "abbr": "CV",
+ "name": "Cabo Verde",
+ "capital": "Praia",
+ "population": "543,767",
+ "continent": "AF"
+ },
+ {
+ "abbr": "CW",
+ "name": "Curaçao",
+ "capital": "Willemstad",
+ "population": "159,849",
+ "continent": "NA"
+ },
+ {
+ "abbr": "CX",
+ "name": "Christmas Island",
+ "capital": "Flying Fish Cove",
+ "population": "1,500",
+ "continent": "OC"
+ },
+ {
+ "abbr": "CY",
+ "name": "Cyprus",
+ "capital": "Nicosia",
+ "population": "1,189,265",
+ "continent": "EU"
+ },
+ {
+ "abbr": "CZ",
+ "name": "Czechia",
+ "capital": "Prague",
+ "population": "10,625,695",
+ "continent": "EU"
+ },
+ {
+ "abbr": "DE",
+ "name": "Germany",
+ "capital": "Berlin",
+ "population": "82,927,922",
+ "continent": "EU"
+ },
+ {
+ "abbr": "DJ",
+ "name": "Djibouti",
+ "capital": "Djibouti",
+ "population": "958,920",
+ "continent": "AF"
+ },
+ {
+ "abbr": "DK",
+ "name": "Denmark",
+ "capital": "Copenhagen",
+ "population": "5,797,446",
+ "continent": "EU"
+ },
+ {
+ "abbr": "DM",
+ "name": "Dominica",
+ "capital": "Roseau",
+ "population": "71,625",
+ "continent": "NA"
+ },
+ {
+ "abbr": "DO",
+ "name": "Dominican Republic",
+ "capital": "Santo Domingo",
+ "population": "10,627,165",
+ "continent": "NA"
+ },
+ {
+ "abbr": "DZ",
+ "name": "Algeria",
+ "capital": "Algiers",
+ "population": "42,228,429",
+ "continent": "AF"
+ },
+ {
+ "abbr": "EC",
+ "name": "Ecuador",
+ "capital": "Quito",
+ "population": "17,084,357",
+ "continent": "SA"
+ },
+ {
+ "abbr": "EE",
+ "name": "Estonia",
+ "capital": "Tallinn",
+ "population": "1,320,884",
+ "continent": "EU"
+ },
+ {
+ "abbr": "EG",
+ "name": "Egypt",
+ "capital": "Cairo",
+ "population": "98,423,595",
+ "continent": "AF"
+ },
+ {
+ "abbr": "EH",
+ "name": "Western Sahara",
+ "capital": "El-Aaiun",
+ "population": "273,008",
+ "continent": "AF"
+ },
+ {
+ "abbr": "ER",
+ "name": "Eritrea",
+ "capital": "Asmara",
+ "population": "6,209,262",
+ "continent": "AF"
+ },
+ {
+ "abbr": "ES",
+ "name": "Spain",
+ "capital": "Madrid",
+ "population": "46,723,749",
+ "continent": "EU"
+ },
+ {
+ "abbr": "ET",
+ "name": "Ethiopia",
+ "capital": "Addis Ababa",
+ "population": "109,224,559",
+ "continent": "AF"
+ },
+ {
+ "abbr": "FI",
+ "name": "Finland",
+ "capital": "Helsinki",
+ "population": "5,518,050",
+ "continent": "EU"
+ },
+ {
+ "abbr": "FJ",
+ "name": "Fiji",
+ "capital": "Suva",
+ "population": "883,483",
+ "continent": "OC"
+ },
+ {
+ "abbr": "FK",
+ "name": "Falkland Islands",
+ "capital": "Stanley",
+ "population": "2,638",
+ "continent": "SA"
+ },
+ {
+ "abbr": "FM",
+ "name": "Micronesia",
+ "capital": "Palikir",
+ "population": "112,640",
+ "continent": "OC"
+ },
+ {
+ "abbr": "FO",
+ "name": "Faroe Islands",
+ "capital": "Torshavn",
+ "population": "48,497",
+ "continent": "EU"
+ },
+ {
+ "abbr": "FR",
+ "name": "France",
+ "capital": "Paris",
+ "population": "66,987,244",
+ "continent": "EU"
+ },
+ {
+ "abbr": "GA",
+ "name": "Gabon",
+ "capital": "Libreville",
+ "population": "2,119,275",
+ "continent": "AF"
+ },
+ {
+ "abbr": "GB",
+ "name": "United Kingdom",
+ "capital": "London",
+ "population": "66,488,991",
+ "continent": "EU"
+ },
+ {
+ "abbr": "GD",
+ "name": "Grenada",
+ "capital": "St. George's",
+ "population": "111,454",
+ "continent": "NA"
+ },
+ {
+ "abbr": "GE",
+ "name": "Georgia",
+ "capital": "Tbilisi",
+ "population": "3,731,000",
+ "continent": "AS"
+ },
+ {
+ "abbr": "GF",
+ "name": "French Guiana",
+ "capital": "Cayenne",
+ "population": "195,506",
+ "continent": "SA"
+ },
+ {
+ "abbr": "GG",
+ "name": "Guernsey",
+ "capital": "St Peter Port",
+ "population": "65,228",
+ "continent": "EU"
+ },
+ {
+ "abbr": "GH",
+ "name": "Ghana",
+ "capital": "Accra",
+ "population": "29,767,108",
+ "continent": "AF"
+ },
+ {
+ "abbr": "GI",
+ "name": "Gibraltar",
+ "capital": "Gibraltar",
+ "population": "33,718",
+ "continent": "EU"
+ },
+ {
+ "abbr": "GL",
+ "name": "Greenland",
+ "capital": "Nuuk",
+ "population": "56,025",
+ "continent": "NA"
+ },
+ {
+ "abbr": "GM",
+ "name": "The Gambia",
+ "capital": "Banjul",
+ "population": "2,280,102",
+ "continent": "AF"
+ },
+ {
+ "abbr": "GN",
+ "name": "Guinea",
+ "capital": "Conakry",
+ "population": "12,414,318",
+ "continent": "AF"
+ },
+ {
+ "abbr": "GP",
+ "name": "Guadeloupe",
+ "capital": "Basse-Terre",
+ "population": "443,000",
+ "continent": "NA"
+ },
+ {
+ "abbr": "GQ",
+ "name": "Equatorial Guinea",
+ "capital": "Malabo",
+ "population": "1,308,974",
+ "continent": "AF"
+ },
+ {
+ "abbr": "GR",
+ "name": "Greece",
+ "capital": "Athens",
+ "population": "10,727,668",
+ "continent": "EU"
+ },
+ {
+ "abbr": "GS",
+ "name": "South Georgia and South Sandwich Islands",
+ "capital": "Grytviken",
+ "population": "30",
+ "continent": "AN"
+ },
+ {
+ "abbr": "GT",
+ "name": "Guatemala",
+ "capital": "Guatemala City",
+ "population": "17,247,807",
+ "continent": "NA"
+ },
+ {
+ "abbr": "GU",
+ "name": "Guam",
+ "capital": "Hagatna",
+ "population": "165,768",
+ "continent": "OC"
+ },
+ {
+ "abbr": "GW",
+ "name": "Guinea-Bissau",
+ "capital": "Bissau",
+ "population": "1,874,309",
+ "continent": "AF"
+ },
+ {
+ "abbr": "GY",
+ "name": "Guyana",
+ "capital": "Georgetown",
+ "population": "779,004",
+ "continent": "SA"
+ },
+ {
+ "abbr": "HK",
+ "name": "Hong Kong",
+ "capital": "Hong Kong",
+ "population": "7,491,609",
+ "continent": "AS"
+ },
+ {
+ "abbr": "HM",
+ "name": "Heard and McDonald Islands",
+ "capital": "",
+ "population": "0",
+ "continent": "AN"
+ },
+ {
+ "abbr": "HN",
+ "name": "Honduras",
+ "capital": "Tegucigalpa",
+ "population": "9,587,522",
+ "continent": "NA"
+ },
+ {
+ "abbr": "HR",
+ "name": "Croatia",
+ "capital": "Zagreb",
+ "population": "3,871,833",
+ "continent": "EU"
+ },
+ {
+ "abbr": "HT",
+ "name": "Haiti",
+ "capital": "Port-au-Prince",
+ "population": "11,123,176",
+ "continent": "NA"
+ },
+ {
+ "abbr": "HU",
+ "name": "Hungary",
+ "capital": "Budapest",
+ "population": "9,768,785",
+ "continent": "EU"
+ },
+ {
+ "abbr": "ID",
+ "name": "Indonesia",
+ "capital": "Jakarta",
+ "population": "267,663,435",
+ "continent": "AS"
+ },
+ {
+ "abbr": "IE",
+ "name": "Ireland",
+ "capital": "Dublin",
+ "population": "4,853,506",
+ "continent": "EU"
+ },
+ {
+ "abbr": "IL",
+ "name": "Israel",
+ "capital": "Jerusalem",
+ "population": "8,883,800",
+ "continent": "AS"
+ },
+ {
+ "abbr": "IM",
+ "name": "Isle of Man",
+ "capital": "Douglas",
+ "population": "84,077",
+ "continent": "EU"
+ },
+ {
+ "abbr": "IN",
+ "name": "India",
+ "capital": "New Delhi",
+ "population": "1,352,617,328",
+ "continent": "AS"
+ },
+ {
+ "abbr": "IO",
+ "name": "British Indian Ocean Territory",
+ "capital": "Diego Garcia",
+ "population": "4,000",
+ "continent": "AS"
+ },
+ {
+ "abbr": "IQ",
+ "name": "Iraq",
+ "capital": "Baghdad",
+ "population": "38,433,600",
+ "continent": "AS"
+ },
+ {
+ "abbr": "IR",
+ "name": "Iran",
+ "capital": "Tehran",
+ "population": "81,800,269",
+ "continent": "AS"
+ },
+ {
+ "abbr": "IS",
+ "name": "Iceland",
+ "capital": "Reykjavik",
+ "population": "353,574",
+ "continent": "EU"
+ },
+ {
+ "abbr": "IT",
+ "name": "Italy",
+ "capital": "Rome",
+ "population": "60,431,283",
+ "continent": "EU"
+ },
+ {
+ "abbr": "JE",
+ "name": "Jersey",
+ "capital": "Saint Helier",
+ "population": "90,812",
+ "continent": "EU"
+ },
+ {
+ "abbr": "JM",
+ "name": "Jamaica",
+ "capital": "Kingston",
+ "population": "2,934,855",
+ "continent": "NA"
+ },
+ {
+ "abbr": "JO",
+ "name": "Jordan",
+ "capital": "Amman",
+ "population": "9,956,011",
+ "continent": "AS"
+ },
+ {
+ "abbr": "JP",
+ "name": "Japan",
+ "capital": "Tokyo",
+ "population": "126,529,100",
+ "continent": "AS"
+ },
+ {
+ "abbr": "KE",
+ "name": "Kenya",
+ "capital": "Nairobi",
+ "population": "51,393,010",
+ "continent": "AF"
+ },
+ {
+ "abbr": "KG",
+ "name": "Kyrgyzstan",
+ "capital": "Bishkek",
+ "population": "6,315,800",
+ "continent": "AS"
+ },
+ {
+ "abbr": "KH",
+ "name": "Cambodia",
+ "capital": "Phnom Penh",
+ "population": "16,249,798",
+ "continent": "AS"
+ },
+ {
+ "abbr": "KI",
+ "name": "Kiribati",
+ "capital": "Tarawa",
+ "population": "115,847",
+ "continent": "OC"
+ },
+ {
+ "abbr": "KM",
+ "name": "Comoros",
+ "capital": "Moroni",
+ "population": "832,322",
+ "continent": "AF"
+ },
+ {
+ "abbr": "KN",
+ "name": "St Kitts and Nevis",
+ "capital": "Basseterre",
+ "population": "52,441",
+ "continent": "NA"
+ },
+ {
+ "abbr": "KP",
+ "name": "North Korea",
+ "capital": "Pyongyang",
+ "population": "25,549,819",
+ "continent": "AS"
+ },
+ {
+ "abbr": "KR",
+ "name": "South Korea",
+ "capital": "Seoul",
+ "population": "51,635,256",
+ "continent": "AS"
+ },
+ {
+ "abbr": "KW",
+ "name": "Kuwait",
+ "capital": "Kuwait City",
+ "population": "4,137,309",
+ "continent": "AS"
+ },
+ {
+ "abbr": "KY",
+ "name": "Cayman Islands",
+ "capital": "George Town",
+ "population": "64,174",
+ "continent": "NA"
+ },
+ {
+ "abbr": "KZ",
+ "name": "Kazakhstan",
+ "capital": "Nur-Sultan",
+ "population": "18,276,499",
+ "continent": "AS"
+ },
+ {
+ "abbr": "LA",
+ "name": "Laos",
+ "capital": "Vientiane",
+ "population": "7,061,507",
+ "continent": "AS"
+ },
+ {
+ "abbr": "LB",
+ "name": "Lebanon",
+ "capital": "Beirut",
+ "population": "6,848,925",
+ "continent": "AS"
+ },
+ {
+ "abbr": "LC",
+ "name": "Saint Lucia",
+ "capital": "Castries",
+ "population": "181,889",
+ "continent": "NA"
+ },
+ {
+ "abbr": "LI",
+ "name": "Liechtenstein",
+ "capital": "Vaduz",
+ "population": "37,910",
+ "continent": "EU"
+ },
+ {
+ "abbr": "LK",
+ "name": "Sri Lanka",
+ "capital": "Colombo",
+ "population": "21,670,000",
+ "continent": "AS"
+ },
+ {
+ "abbr": "LR",
+ "name": "Liberia",
+ "capital": "Monrovia",
+ "population": "4,818,977",
+ "continent": "AF"
+ },
+ {
+ "abbr": "LS",
+ "name": "Lesotho",
+ "capital": "Maseru",
+ "population": "2,108,132",
+ "continent": "AF"
+ },
+ {
+ "abbr": "LT",
+ "name": "Lithuania",
+ "capital": "Vilnius",
+ "population": "2,789,533",
+ "continent": "EU"
+ },
+ {
+ "abbr": "LU",
+ "name": "Luxembourg",
+ "capital": "Luxembourg",
+ "population": "607,728",
+ "continent": "EU"
+ },
+ {
+ "abbr": "LV",
+ "name": "Latvia",
+ "capital": "Riga",
+ "population": "1,926,542",
+ "continent": "EU"
+ },
+ {
+ "abbr": "LY",
+ "name": "Libya",
+ "capital": "Tripoli",
+ "population": "6,678,567",
+ "continent": "AF"
+ },
+ {
+ "abbr": "MA",
+ "name": "Morocco",
+ "capital": "Rabat",
+ "population": "36,029,138",
+ "continent": "AF"
+ },
+ {
+ "abbr": "MC",
+ "name": "Monaco",
+ "capital": "Monaco",
+ "population": "38,682",
+ "continent": "EU"
+ },
+ {
+ "abbr": "MD",
+ "name": "Moldova",
+ "capital": "Chisinau",
+ "population": "3,545,883",
+ "continent": "EU"
+ },
+ {
+ "abbr": "ME",
+ "name": "Montenegro",
+ "capital": "Podgorica",
+ "population": "622,345",
+ "continent": "EU"
+ },
+ {
+ "abbr": "MF",
+ "name": "Saint Martin",
+ "capital": "Marigot",
+ "population": "37,264",
+ "continent": "NA"
+ },
+ {
+ "abbr": "MG",
+ "name": "Madagascar",
+ "capital": "Antananarivo",
+ "population": "26,262,368",
+ "continent": "AF"
+ },
+ {
+ "abbr": "MH",
+ "name": "Marshall Islands",
+ "capital": "Majuro",
+ "population": "58,413",
+ "continent": "OC"
+ },
+ {
+ "abbr": "MK",
+ "name": "North Macedonia",
+ "capital": "Skopje",
+ "population": "2,082,958",
+ "continent": "EU"
+ },
+ {
+ "abbr": "ML",
+ "name": "Mali",
+ "capital": "Bamako",
+ "population": "19,077,690",
+ "continent": "AF"
+ },
+ {
+ "abbr": "MM",
+ "name": "Myanmar",
+ "capital": "Nay Pyi Taw",
+ "population": "53,708,395",
+ "continent": "AS"
+ },
+ {
+ "abbr": "MN",
+ "name": "Mongolia",
+ "capital": "Ulaanbaatar",
+ "population": "3,170,208",
+ "continent": "AS"
+ },
+ {
+ "abbr": "MO",
+ "name": "Macao",
+ "capital": "Macao",
+ "population": "631,636",
+ "continent": "AS"
+ },
+ {
+ "abbr": "MP",
+ "name": "Northern Mariana Islands",
+ "capital": "Saipan",
+ "population": "56,882",
+ "continent": "OC"
+ },
+ {
+ "abbr": "MQ",
+ "name": "Martinique",
+ "capital": "Fort-de-France",
+ "population": "432,900",
+ "continent": "NA"
+ },
+ {
+ "abbr": "MR",
+ "name": "Mauritania",
+ "capital": "Nouakchott",
+ "population": "4,403,319",
+ "continent": "AF"
+ },
+ {
+ "abbr": "MS",
+ "name": "Montserrat",
+ "capital": "Plymouth",
+ "population": "9,341",
+ "continent": "NA"
+ },
+ {
+ "abbr": "MT",
+ "name": "Malta",
+ "capital": "Valletta",
+ "population": "483,530",
+ "continent": "EU"
+ },
+ {
+ "abbr": "MU",
+ "name": "Mauritius",
+ "capital": "Port Louis",
+ "population": "1,265,303",
+ "continent": "AF"
+ },
+ {
+ "abbr": "MV",
+ "name": "Maldives",
+ "capital": "Male",
+ "population": "515,696",
+ "continent": "AS"
+ },
+ {
+ "abbr": "MW",
+ "name": "Malawi",
+ "capital": "Lilongwe",
+ "population": "17,563,749",
+ "continent": "AF"
+ },
+ {
+ "abbr": "MX",
+ "name": "Mexico",
+ "capital": "Mexico City",
+ "population": "126,190,788",
+ "continent": "NA"
+ },
+ {
+ "abbr": "MY",
+ "name": "Malaysia",
+ "capital": "Kuala Lumpur",
+ "population": "31,528,585",
+ "continent": "AS"
+ },
+ {
+ "abbr": "MZ",
+ "name": "Mozambique",
+ "capital": "Maputo",
+ "population": "29,495,962",
+ "continent": "AF"
+ },
+ {
+ "abbr": "NA",
+ "name": "Namibia",
+ "capital": "Windhoek",
+ "population": "2,448,255",
+ "continent": "AF"
+ },
+ {
+ "abbr": "NC",
+ "name": "New Caledonia",
+ "capital": "Noumea",
+ "population": "284,060",
+ "continent": "OC"
+ },
+ {
+ "abbr": "NE",
+ "name": "Niger",
+ "capital": "Niamey",
+ "population": "22,442,948",
+ "continent": "AF"
+ },
+ {
+ "abbr": "NF",
+ "name": "Norfolk Island",
+ "capital": "Kingston",
+ "population": "1,828",
+ "continent": "OC"
+ },
+ {
+ "abbr": "NG",
+ "name": "Nigeria",
+ "capital": "Abuja",
+ "population": "195,874,740",
+ "continent": "AF"
+ },
+ {
+ "abbr": "NI",
+ "name": "Nicaragua",
+ "capital": "Managua",
+ "population": "6,465,513",
+ "continent": "NA"
+ },
+ {
+ "abbr": "NL",
+ "name": "The Netherlands",
+ "capital": "Amsterdam",
+ "population": "17,231,017",
+ "continent": "EU"
+ },
+ {
+ "abbr": "NO",
+ "name": "Norway",
+ "capital": "Oslo",
+ "population": "5,314,336",
+ "continent": "EU"
+ },
+ {
+ "abbr": "NP",
+ "name": "Nepal",
+ "capital": "Kathmandu",
+ "population": "28,087,871",
+ "continent": "AS"
+ },
+ {
+ "abbr": "NR",
+ "name": "Nauru",
+ "capital": "Yaren",
+ "population": "12,704",
+ "continent": "OC"
+ },
+ {
+ "abbr": "NU",
+ "name": "Niue",
+ "capital": "Alofi",
+ "population": "2,166",
+ "continent": "OC"
+ },
+ {
+ "abbr": "NZ",
+ "name": "New Zealand",
+ "capital": "Wellington",
+ "population": "4,885,500",
+ "continent": "OC"
+ },
+ {
+ "abbr": "OM",
+ "name": "Oman",
+ "capital": "Muscat",
+ "population": "4,829,483",
+ "continent": "AS"
+ },
+ {
+ "abbr": "PA",
+ "name": "Panama",
+ "capital": "Panama City",
+ "population": "4,176,873",
+ "continent": "NA"
+ },
+ {
+ "abbr": "PE",
+ "name": "Peru",
+ "capital": "Lima",
+ "population": "31,989,256",
+ "continent": "SA"
+ },
+ {
+ "abbr": "PF",
+ "name": "French Polynesia",
+ "capital": "Papeete",
+ "population": "277,679",
+ "continent": "OC"
+ },
+ {
+ "abbr": "PG",
+ "name": "Papua New Guinea",
+ "capital": "Port Moresby",
+ "population": "8,606,316",
+ "continent": "OC"
+ },
+ {
+ "abbr": "PH",
+ "name": "Philippines",
+ "capital": "Manila",
+ "population": "106,651,922",
+ "continent": "AS"
+ },
+ {
+ "abbr": "PK",
+ "name": "Pakistan",
+ "capital": "Islamabad",
+ "population": "212,215,030",
+ "continent": "AS"
+ },
+ {
+ "abbr": "PL",
+ "name": "Poland",
+ "capital": "Warsaw",
+ "population": "37,978,548",
+ "continent": "EU"
+ },
+ {
+ "abbr": "PM",
+ "name": "Saint Pierre and Miquelon",
+ "capital": "Saint-Pierre",
+ "population": "7,012",
+ "continent": "NA"
+ },
+ {
+ "abbr": "PN",
+ "name": "Pitcairn Islands",
+ "capital": "Adamstown",
+ "population": "46",
+ "continent": "OC"
+ },
+ {
+ "abbr": "PR",
+ "name": "Puerto Rico",
+ "capital": "San Juan",
+ "population": "3,195,153",
+ "continent": "NA"
+ },
+ {
+ "abbr": "PS",
+ "name": "Palestine",
+ "capital": "East Jerusalem",
+ "population": "4,569,087",
+ "continent": "AS"
+ },
+ {
+ "abbr": "PT",
+ "name": "Portugal",
+ "capital": "Lisbon",
+ "population": "10,281,762",
+ "continent": "EU"
+ },
+ {
+ "abbr": "PW",
+ "name": "Palau",
+ "capital": "Melekeok",
+ "population": "17,907",
+ "continent": "OC"
+ },
+ {
+ "abbr": "PY",
+ "name": "Paraguay",
+ "capital": "Asuncion",
+ "population": "6,956,071",
+ "continent": "SA"
+ },
+ {
+ "abbr": "QA",
+ "name": "Qatar",
+ "capital": "Doha",
+ "population": "2,781,677",
+ "continent": "AS"
+ },
+ {
+ "abbr": "RE",
+ "name": "Réunion",
+ "capital": "Saint-Denis",
+ "population": "776,948",
+ "continent": "AF"
+ },
+ {
+ "abbr": "RO",
+ "name": "Romania",
+ "capital": "Bucharest",
+ "population": "19,473,936",
+ "continent": "EU"
+ },
+ {
+ "abbr": "RS",
+ "name": "Serbia",
+ "capital": "Belgrade",
+ "population": "6,982,084",
+ "continent": "EU"
+ },
+ {
+ "abbr": "RU",
+ "name": "Russia",
+ "capital": "Moscow",
+ "population": "144,478,050",
+ "continent": "EU"
+ },
+ {
+ "abbr": "RW",
+ "name": "Rwanda",
+ "capital": "Kigali",
+ "population": "12,301,939",
+ "continent": "AF"
+ },
+ {
+ "abbr": "SA",
+ "name": "Saudi Arabia",
+ "capital": "Riyadh",
+ "population": "33,699,947",
+ "continent": "AS"
+ },
+ {
+ "abbr": "SB",
+ "name": "Solomon Islands",
+ "capital": "Honiara",
+ "population": "652,858",
+ "continent": "OC"
+ },
+ {
+ "abbr": "SC",
+ "name": "Seychelles",
+ "capital": "Victoria",
+ "population": "96,762",
+ "continent": "AF"
+ },
+ {
+ "abbr": "SD",
+ "name": "Sudan",
+ "capital": "Khartoum",
+ "population": "41,801,533",
+ "continent": "AF"
+ },
+ {
+ "abbr": "SE",
+ "name": "Sweden",
+ "capital": "Stockholm",
+ "population": "10,183,175",
+ "continent": "EU"
+ },
+ {
+ "abbr": "SG",
+ "name": "Singapore",
+ "capital": "Singapore",
+ "population": "5,638,676",
+ "continent": "AS"
+ },
+ {
+ "abbr": "SH",
+ "name": "Saint Helena",
+ "capital": "Jamestown",
+ "population": "7,460",
+ "continent": "AF"
+ },
+ {
+ "abbr": "SI",
+ "name": "Slovenia",
+ "capital": "Ljubljana",
+ "population": "2,067,372",
+ "continent": "EU"
+ },
+ {
+ "abbr": "SJ",
+ "name": "Svalbard and Jan Mayen",
+ "capital": "Longyearbyen",
+ "population": "2,550",
+ "continent": "EU"
+ },
+ {
+ "abbr": "SK",
+ "name": "Slovakia",
+ "capital": "Bratislava",
+ "population": "5,447,011",
+ "continent": "EU"
+ },
+ {
+ "abbr": "SL",
+ "name": "Sierra Leone",
+ "capital": "Freetown",
+ "population": "7,650,154",
+ "continent": "AF"
+ },
+ {
+ "abbr": "SM",
+ "name": "San Marino",
+ "capital": "San Marino",
+ "population": "33,785",
+ "continent": "EU"
+ },
+ {
+ "abbr": "SN",
+ "name": "Senegal",
+ "capital": "Dakar",
+ "population": "15,854,360",
+ "continent": "AF"
+ },
+ {
+ "abbr": "SO",
+ "name": "Somalia",
+ "capital": "Mogadishu",
+ "population": "15,008,154",
+ "continent": "AF"
+ },
+ {
+ "abbr": "SR",
+ "name": "Suriname",
+ "capital": "Paramaribo",
+ "population": "575,991",
+ "continent": "SA"
+ },
+ {
+ "abbr": "SS",
+ "name": "South Sudan",
+ "capital": "Juba",
+ "population": "8,260,490",
+ "continent": "AF"
+ },
+ {
+ "abbr": "ST",
+ "name": "São Tomé and Príncipe",
+ "capital": "Sao Tome",
+ "population": "197,700",
+ "continent": "AF"
+ },
+ {
+ "abbr": "SV",
+ "name": "El Salvador",
+ "capital": "San Salvador",
+ "population": "6,420,744",
+ "continent": "NA"
+ },
+ {
+ "abbr": "SX",
+ "name": "Sint Maarten",
+ "capital": "Philipsburg",
+ "population": "40,654",
+ "continent": "NA"
+ },
+ {
+ "abbr": "SY",
+ "name": "Syria",
+ "capital": "Damascus",
+ "population": "16,906,283",
+ "continent": "AS"
+ },
+ {
+ "abbr": "SZ",
+ "name": "Eswatini",
+ "capital": "Mbabane",
+ "population": "1,136,191",
+ "continent": "AF"
+ },
+ {
+ "abbr": "TC",
+ "name": "Turks and Caicos Islands",
+ "capital": "Cockburn Town",
+ "population": "37,665",
+ "continent": "NA"
+ },
+ {
+ "abbr": "TD",
+ "name": "Chad",
+ "capital": "N'Djamena",
+ "population": "15,477,751",
+ "continent": "AF"
+ },
+ {
+ "abbr": "TF",
+ "name": "French Southern Territories",
+ "capital": "Port-aux-Francais",
+ "population": "140",
+ "continent": "AN"
+ },
+ {
+ "abbr": "TG",
+ "name": "Togo",
+ "capital": "Lome",
+ "population": "7,889,094",
+ "continent": "AF"
+ },
+ {
+ "abbr": "TH",
+ "name": "Thailand",
+ "capital": "Bangkok",
+ "population": "69,428,524",
+ "continent": "AS"
+ },
+ {
+ "abbr": "TJ",
+ "name": "Tajikistan",
+ "capital": "Dushanbe",
+ "population": "9,100,837",
+ "continent": "AS"
+ },
+ {
+ "abbr": "TK",
+ "name": "Tokelau",
+ "capital": "",
+ "population": "1,466",
+ "continent": "OC"
+ },
+ {
+ "abbr": "TL",
+ "name": "Timor-Leste",
+ "capital": "Dili",
+ "population": "1,267,972",
+ "continent": "OC"
+ },
+ {
+ "abbr": "TM",
+ "name": "Turkmenistan",
+ "capital": "Ashgabat",
+ "population": "5,850,908",
+ "continent": "AS"
+ },
+ {
+ "abbr": "TN",
+ "name": "Tunisia",
+ "capital": "Tunis",
+ "population": "11,565,204",
+ "continent": "AF"
+ },
+ {
+ "abbr": "TO",
+ "name": "Tonga",
+ "capital": "Nuku'alofa",
+ "population": "103,197",
+ "continent": "OC"
+ },
+ {
+ "abbr": "TR",
+ "name": "Türkiye",
+ "capital": "Ankara",
+ "population": "82,319,724",
+ "continent": "AS"
+ },
+ {
+ "abbr": "TT",
+ "name": "Trinidad and Tobago",
+ "capital": "Port of Spain",
+ "population": "1,389,858",
+ "continent": "NA"
+ },
+ {
+ "abbr": "TV",
+ "name": "Tuvalu",
+ "capital": "Funafuti",
+ "population": "11,508",
+ "continent": "OC"
+ },
+ {
+ "abbr": "TW",
+ "name": "Taiwan",
+ "capital": "Taipei",
+ "population": "23,451,837",
+ "continent": "AS"
+ },
+ {
+ "abbr": "TZ",
+ "name": "Tanzania",
+ "capital": "Dodoma",
+ "population": "56,318,348",
+ "continent": "AF"
+ },
+ {
+ "abbr": "UA",
+ "name": "Ukraine",
+ "capital": "Kyiv",
+ "population": "44,622,516",
+ "continent": "EU"
+ },
+ {
+ "abbr": "UG",
+ "name": "Uganda",
+ "capital": "Kampala",
+ "population": "42,723,139",
+ "continent": "AF"
+ },
+ {
+ "abbr": "UM",
+ "name": "U.S. Outlying Islands",
+ "capital": "",
+ "population": "0",
+ "continent": "OC"
+ },
+ {
+ "abbr": "US",
+ "name": "United States",
+ "capital": "Washington",
+ "population": "327,167,434",
+ "continent": "NA"
+ },
+ {
+ "abbr": "UY",
+ "name": "Uruguay",
+ "capital": "Montevideo",
+ "population": "3,449,299",
+ "continent": "SA"
+ },
+ {
+ "abbr": "UZ",
+ "name": "Uzbekistan",
+ "capital": "Tashkent",
+ "population": "32,955,400",
+ "continent": "AS"
+ },
+ {
+ "abbr": "VA",
+ "name": "Vatican City",
+ "capital": "Vatican City",
+ "population": "921",
+ "continent": "EU"
+ },
+ {
+ "abbr": "VC",
+ "name": "St Vincent and Grenadines",
+ "capital": "Kingstown",
+ "population": "110,211",
+ "continent": "NA"
+ },
+ {
+ "abbr": "VE",
+ "name": "Venezuela",
+ "capital": "Caracas",
+ "population": "28,870,195",
+ "continent": "SA"
+ },
+ {
+ "abbr": "VG",
+ "name": "British Virgin Islands",
+ "capital": "Road Town",
+ "population": "29,802",
+ "continent": "NA"
+ },
+ {
+ "abbr": "VI",
+ "name": "U.S. Virgin Islands",
+ "capital": "Charlotte Amalie",
+ "population": "106,977",
+ "continent": "NA"
+ },
+ {
+ "abbr": "VN",
+ "name": "Vietnam",
+ "capital": "Hanoi",
+ "population": "95,540,395",
+ "continent": "AS"
+ },
+ {
+ "abbr": "VU",
+ "name": "Vanuatu",
+ "capital": "Port Vila",
+ "population": "292,680",
+ "continent": "OC"
+ },
+ {
+ "abbr": "WF",
+ "name": "Wallis and Futuna",
+ "capital": "Mata Utu",
+ "population": "16,025",
+ "continent": "OC"
+ },
+ {
+ "abbr": "WS",
+ "name": "Samoa",
+ "capital": "Apia",
+ "population": "196,130",
+ "continent": "OC"
+ },
+ {
+ "abbr": "XK",
+ "name": "Kosovo",
+ "capital": "Pristina",
+ "population": "1,845,300",
+ "continent": "EU"
+ },
+ {
+ "abbr": "YE",
+ "name": "Yemen",
+ "capital": "Sanaa",
+ "population": "28,498,687",
+ "continent": "AS"
+ },
+ {
+ "abbr": "YT",
+ "name": "Mayotte",
+ "capital": "Mamoudzou",
+ "population": "279,471",
+ "continent": "AF"
+ },
+ {
+ "abbr": "ZA",
+ "name": "South Africa",
+ "capital": "Pretoria",
+ "population": "57,779,622",
+ "continent": "AF"
+ },
+ {
+ "abbr": "ZM",
+ "name": "Zambia",
+ "capital": "Lusaka",
+ "population": "17,351,822",
+ "continent": "AF"
+ },
+ {
+ "abbr": "ZW",
+ "name": "Zimbabwe",
+ "capital": "Harare",
+ "population": "14,439,018",
+ "continent": "AF"
+ }
+ ]
+} \ No newline at end of file
diff --git a/vendor/github.com/go-faker/faker/v4/payment.go b/vendor/github.com/go-faker/faker/v4/payment.go
new file mode 100644
index 0000000..55ca11e
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/payment.go
@@ -0,0 +1,100 @@
+package faker
+
+import (
+ "reflect"
+ "strconv"
+ "strings"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+const (
+ numberBytes = "0123456789"
+)
+
+// creditCard struct
+type creditCard struct {
+ ccType string
+ length int
+ prefixes []int
+}
+
+var creditCards = map[string]creditCard{
+ "visa": {"VISA", 16, []int{4539, 4556, 4916, 4532, 4929, 40240071, 4485, 4716, 4}},
+ "mastercard": {"MasterCard", 16, []int{51, 52, 53, 54, 55}},
+ "american express": {"American Express", 15, []int{34, 37}},
+ "discover": {"Discover", 16, []int{6011}},
+ "jcb": {"JCB", 16, []int{3528, 3538, 3548, 3558, 3568, 3578, 3588}},
+ "diners club": {"Diners Club", 14, []int{36, 38, 39}},
+}
+
+var cacheCreditCard string
+
+// GetPayment returns a new Render interface of Payment struct
+func GetPayment() Render {
+ pay := &Payment{}
+ return pay
+}
+
+// Render contains Whole Random Credit Card Generators with their types
+type Render interface {
+ CreditCardType(v reflect.Value) (interface{}, error)
+ CreditCardNumber(v reflect.Value) (interface{}, error)
+}
+
+// Payment struct
+type Payment struct{}
+
+func (p Payment) cctype() string {
+ n := len(creditCards)
+ if cacheCreditCard != "" {
+ return cacheCreditCard
+ }
+ var ccTypes []string
+
+ for _, cc := range creditCards {
+ ccTypes = append(ccTypes, cc.ccType)
+ }
+ cacheCreditCard = ccTypes[rand.Intn(n)]
+ return cacheCreditCard
+}
+
+// CreditCardType returns one of the following credit values:
+// VISA, MasterCard, American Express, Discover, JCB and Diners Club
+func (p Payment) CreditCardType(v reflect.Value) (interface{}, error) {
+ return p.cctype(), nil
+}
+
+// CCType get a credit card type randomly in string (VISA, MasterCard, etc)
+func CCType(opts ...options.OptionFunc) string {
+ return singleFakeData(CreditCardType, func() interface{} {
+ p := Payment{}
+ return p.cctype()
+ }, opts...).(string)
+}
+
+func (p Payment) ccnumber() string {
+ ccType := p.cctype()
+ cacheCreditCard = ccType
+ card := creditCards[strings.ToLower(ccType)]
+ prefix := strconv.Itoa(card.prefixes[rand.Intn(len(card.prefixes))])
+
+ num := prefix
+ digit := randomStringNumber(card.length - len(prefix))
+
+ num += digit
+ return num
+}
+
+// CreditCardNumber generated credit card number according to the card number rules
+func (p Payment) CreditCardNumber(v reflect.Value) (interface{}, error) {
+ return p.ccnumber(), nil
+}
+
+// CCNumber get a credit card number randomly in string (VISA, MasterCard, etc)
+func CCNumber(opts ...options.OptionFunc) string {
+ return singleFakeData(CreditCardNumber, func() interface{} {
+ p := Payment{}
+ return p.ccnumber()
+ }, opts...).(string)
+}
diff --git a/vendor/github.com/go-faker/faker/v4/person.go b/vendor/github.com/go-faker/faker/v4/person.go
new file mode 100644
index 0000000..7f37f18
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/person.go
@@ -0,0 +1,814 @@
+package faker
+
+import (
+ "fmt"
+ "reflect"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+// Dowser provides interfaces to generate random logical Names with their initials
+type Dowser interface {
+ TitleMale(v reflect.Value) (interface{}, error)
+ TitleFeMale(v reflect.Value) (interface{}, error)
+ FirstName(v reflect.Value) (interface{}, error)
+ FirstNameMale(v reflect.Value) (interface{}, error)
+ FirstNameFemale(v reflect.Value) (interface{}, error)
+ LastName(v reflect.Value) (interface{}, error)
+ Name(v reflect.Value) (interface{}, error)
+ Gender(v reflect.Value) (interface{}, error)
+ ChineseFirstName(v reflect.Value) (interface{}, error)
+ ChineseLastName(v reflect.Value) (interface{}, error)
+ ChineseName(v reflect.Value) (interface{}, error)
+ RussianFirstNameMale(v reflect.Value) (interface{}, error)
+ RussianFirstNameFemale(v reflect.Value) (interface{}, error)
+ RussianLastNameMale(v reflect.Value) (interface{}, error)
+ RussianLastNameFemale(v reflect.Value) (interface{}, error)
+}
+
+var titlesMale = []string{
+ "Mr.", "Dr.", "Prof.", "Lord", "King", "Prince",
+}
+var titlesFemale = []string{
+ "Mrs.", "Ms.", "Miss", "Dr.", "Prof.", "Lady", "Queen", "Princess",
+}
+var firstNamesMale = []string{
+ "Aaron", "Abdiel", "Abdul", "Abdullah", "Abe", "Abel", "Abelardo", "Abner", "Abraham", "Adalberto", "Adam", "Adan", "Adelbert", "Adolfo", "Adolph", "Adolphus", "Adonis", "Adrain", "Adrian", "Adriel", "Adrien", "Afton", "Agustin", "Ahmad", "Ahmed", "Aidan", "Aiden", "Akeem", "Al", "Alan", "Albert", "Alberto", "Albin", "Alden", "Alec", "Alejandrin", "Alek", "Alessandro", "Alex", "Alexander", "Alexandre", "Alexandro", "Alexie", "Alexis", "Alexys", "Alexzander", "Alf", "Alfonso", "Alfonzo", "Alford", "Alfred", "Alfredo", "Ali", "Allan", "Allen", "Alphonso", "Alvah", "Alvis", "Amani", "Amari", "Ambrose", "Americo", "Amir", "Amos", "Amparo", "Anastacio", "Anderson", "Andre", "Andres", "Andrew", "Andy", "Angel", "Angelo", "Angus", "Anibal", "Ansel", "Ansley", "Anthony", "Antone", "Antonio", "Antwan", "Antwon", "Arch", "Archibald", "Arden", "Arely", "Ari", "Aric", "Ariel", "Arjun", "Arlo", "Armand", "Armando", "Armani", "Arnaldo", "Arne", "Arno", "Arnold", "Arnoldo", "Arnulfo", "Aron", "Art", "Arthur", "Arturo", "Arvel", "Arvid", "Ashton", "August", "Augustus", "Aurelio", "Austen", "Austin", "Austyn", "Avery", "Axel", "Ayden",
+ "Bailey", "Barney", "Baron", "Barrett", "Barry", "Bart", "Bartholome", "Barton", "Baylee", "Beau", "Bell", "Ben", "Benedict", "Benjamin", "Bennett", "Bennie", "Benny", "Benton", "Bernard", "Bernardo", "Bernhard", "Bernie", "Berry", "Berta", "Bertha", "Bertram", "Bertrand", "Bill", "Billy", "Blair", "Blaise", "Blake", "Blaze", "Bo", "Bobbie", "Bobby", "Boris", "Boyd", "Brad", "Braden", "Bradford", "Bradley", "Bradly", "Brady", "Braeden", "Brain", "Brando", "Brandon", "Brandt", "Brannon", "Branson", "Brant", "Braulio", "Braxton", "Brayan", "Brendan", "Brenden", "Brendon", "Brennan", "Brennon", "Brent", "Bret", "Brett", "Brian", "Brice", "Brock", "Broderick", "Brody", "Brook", "Brooks", "Brown", "Bruce", "Bryce", "Brycen", "Bryon", "Buck", "Bud", "Buddy", "Buford", "Burley", "Buster",
+ "Cade", "Caden", "Caesar", "Cale", "Caleb", "Camden", "Cameron", "Camren", "Camron", "Camryn", "Candelario", "Candido", "Carey", "Carleton", "Carlo", "Carlos", "Carmel", "Carmelo", "Carmine", "Carol", "Carroll", "Carson", "Carter", "Cary", "Casey", "Casimer", "Casimir", "Casper", "Ceasar", "Cecil", "Cedrick", "Celestino", "Cesar", "Chad", "Chadd", "Chadrick", "Chaim", "Chance", "Chandler", "Charles", "Charley", "Charlie", "Chase", "Chauncey", "Chaz", "Chelsey", "Chesley", "Chester", "Chet", "Chris", "Christ", "Christian", "Christop", "Christophe", "Christopher", "Cicero", "Cielo", "Clair", "Clark", "Claud", "Claude", "Clay", "Clemens", "Clement", "Cleo", "Cletus", "Cleve", "Cleveland", "Clifford", "Clifton", "Clint", "Clinton", "Clovis", "Cloyd", "Clyde", "Coby", "Cody", "Colby", "Cole", "Coleman", "Colin", "Collin", "Colt", "Colten", "Colton", "Columbus", "Conner", "Connor", "Conor", "Conrad", "Constantin", "Consuelo", "Cooper", "Corbin", "Cordelia", "Cordell", "Cornelius", "Cornell", "Cortez", "Cory", "Coty", "Coy", "Craig", "Crawford", "Cristian", "Cristina", "Cristobal", "Cristopher", "Cruz", "Cullen", "Curt", "Curtis", "Cyril", "Cyrus",
+ "Dagmar", "Dale", "Dallas", "Dallin", "Dalton", "Dameon", "Damian", "Damien", "Damion", "Damon", "Dan", "Dane", "D'angelo", "Dangelo", "Danial", "Danny", "Dante", "Daren", "Darian", "Darien", "Dario", "Darion", "Darius", "Daron", "Darrel", "Darrell", "Darren", "Darrick", "Darrin", "Darrion", "Darron", "Darryl", "Darwin", "Daryl", "Dashawn", "Dave", "David", "Davin", "Davion", "Davon", "Davonte", "Dawson", "Dax", "Dayne", "Dayton", "Dean", "Deangelo", "Declan", "Dedric", "Dedrick", "Dee", "Deion", "Dejon", "Dejuan", "Delaney", "Delbert", "Dell", "Delmer", "Demarco", "Demarcus", "Demario", "Demetrius", "Demond", "Denis", "Dennis", "Deon", "Deondre", "Deontae", "Deonte", "Dereck", "Derek", "Derick", "Deron", "Derrick", "Deshaun", "Deshawn", "Desmond", "Destin", "Devan", "Devante", "Deven", "Devin", "Devon", "Devonte", "Devyn", "Dewayne", "Dewitt", "Dexter", "Diamond", "Diego", "Dillan", "Dillon", "Dimitri", "Dino", "Dion", "Dock", "Domenic", "Domenick", "Domenico", "Domingo", "Dominic", "Don", "Donald", "Donato", "Donavon", "Donnell", "Donnie", "Donny", "Dorcas", "Dorian", "Doris", "Dorthy", "Doug", "Douglas", "Doyle", "Drake", "Dudley", "Duncan", "Durward", "Dustin", "Dusty", "Dwight", "Dylan",
+ "Earl", "Earnest", "Easter", "Easton", "Ed", "Edd", "Eddie", "Edgar", "Edgardo", "Edison", "Edmond", "Edmund", "Eduardo", "Edward", "Edwardo", "Edwin", "Efrain", "Efren", "Einar", "Eino", "Eladio", "Elbert", "Eldon", "Eldred", "Eleazar", "Eli", "Elian", "Elias", "Eliezer", "Elijah", "Eliseo", "Elliot", "Elliott", "Ellis", "Ellsworth", "Elmer", "Elmo", "Elmore", "Eloy", "Elroy", "Elton", "Elvis", "Elwin", "Elwyn", "Emanuel", "Emerald", "Emerson", "Emery", "Emil", "Emile", "Emiliano", "Emilio", "Emmanuel", "Emmet", "Emmett", "Emmitt", "Emory", "Enid", "Enoch", "Enos", "Enrico", "Enrique", "Ephraim", "Eriberto", "Eric", "Erich", "Erick", "Erik", "Erin", "Erling", "Ernest", "Ernesto", "Ernie", "Ervin", "Erwin", "Esteban", "Estevan", "Ethan", "Ethel", "Eugene", "Eusebio", "Evan", "Evans", "Everardo", "Everett", "Evert", "Ewald", "Ewell", "Ezekiel", "Ezequiel", "Ezra",
+ "Fabian", "Faustino", "Fausto", "Favian", "Federico", "Felipe", "Felix", "Felton", "Fermin", "Fern", "Fernando", "Ferne", "Fidel", "Filiberto", "Finn", "Flavio", "Fletcher", "Florencio", "Florian", "Floy", "Floyd", "Ford", "Forest", "Forrest", "Foster", "Francesco", "Francis", "Francisco", "Franco", "Frank", "Frankie", "Franz", "Fred", "Freddie", "Freddy", "Frederic", "Frederick", "Frederik", "Fredrick", "Fredy", "Freeman", "Friedrich", "Fritz", "Furman",
+ "Gabe", "Gabriel", "Gaetano", "Gage", "Gardner", "Garett", "Garfield", "Garland", "Garnet", "Garnett", "Garret", "Garrett", "Garrick", "Garrison", "Garry", "Garth", "Gaston", "Gavin", "Gay", "Gayle", "Gaylord", "Gene", "General", "Gennaro", "Geo", "Geoffrey", "George", "Geovanni", "Geovanny", "Geovany", "Gerald", "Gerard", "Gerardo", "Gerhard", "German", "Gerson", "Gianni", "Gideon", "Gilbert", "Gilberto", "Giles", "Gillian", "Gino", "Giovani", "Giovanni", "Giovanny", "Giuseppe", "Glen", "Glennie", "Godfrey", "Golden", "Gonzalo", "Gordon", "Grady", "Graham", "Grant", "Granville", "Grayce", "Grayson", "Green", "Greg", "Gregg", "Gregorio", "Gregory", "Greyson", "Griffin", "Grover", "Guido", "Guillermo", "Guiseppe", "Gunnar", "Gunner", "Gus", "Gussie", "Gust", "Gustave", "Guy",
+ "Hadley", "Hailey", "Hal", "Haleigh", "Haley", "Halle", "Hank", "Hans", "Hardy", "Harley", "Harmon", "Harold", "Harrison", "Harry", "Harvey", "Haskell", "Hassan", "Hayden", "Hayley", "Hazel", "Hazle", "Heber", "Hector", "Helmer", "Henderson", "Henri", "Henry", "Herbert", "Herman", "Hermann", "Herminio", "Hershel", "Hester", "Hilario", "Hilbert", "Hillard", "Hilton", "Hipolito", "Hiram", "Hobart", "Holden", "Hollis", "Horace", "Horacio", "Houston", "Howard", "Howell", "Hoyt", "Hubert", "Hudson", "Hugh", "Humberto", "Hunter", "Hyman",
+ "Ian", "Ibrahim", "Ignacio", "Ignatius", "Ike", "Imani", "Immanuel", "Irving", "Irwin", "Isaac", "Isac", "Isadore", "Isai", "Isaiah", "Isaias", "Isidro", "Ismael", "Isom", "Israel", "Issac", "Izaiah",
+ "Jabari", "Jace", "Jacey", "Jacinto", "Jack", "Jackson", "Jacques", "Jaden", "Jadon", "Jaeden", "Jaiden", "Jaime", "Jairo", "Jake", "Jakob", "Jaleel", "Jalen", "Jalon", "Jamaal", "Jamal", "Jamar", "Jamarcus", "Jamel", "Jameson", "Jamey", "Jamie", "Jamil", "Jamir", "Jamison", "Jan", "Janick", "Jaquan", "Jared", "Jaren", "Jarod", "Jaron", "Jarred", "Jarrell", "Jarret", "Jarrett", "Jarrod", "Jarvis", "Jasen", "Jasmin", "Jason", "Jasper", "Javier", "Javon", "Javonte", "Jay", "Jayce", "Jaycee", "Jayde", "Jayden", "Jaydon", "Jaylan", "Jaylen", "Jaylin", "Jaylon", "Jayme", "Jayson", "Jean", "Jed", "Jedediah", "Jedidiah", "Jeff", "Jefferey", "Jeffery", "Jeffrey", "Jeffry", "Jennings", "Jensen", "Jerad", "Jerald", "Jeramie", "Jeramy", "Jerel", "Jeremie", "Jeremy", "Jermain", "Jermey", "Jerod", "Jerome", "Jeromy", "Jerrell", "Jerrod", "Jerrold", "Jerry", "Jess", "Jesse", "Jessie", "Jessy", "Jesus", "Jett", "Jettie", "Jevon", "Jillian", "Jimmie", "Jimmy", "Jo", "Joan", "Joany", "Joaquin", "Jocelyn", "Joe", "Joel", "Joesph", "Joey", "Johan", "Johann", "Johathan", "John", "Johnathan", "Johnathon", "Johnnie", "Johnny", "Johnpaul", "Johnson", "Jon", "Jonas", "Jonatan", "Jonathan", "Jonathon", "Jordan", "Jordi", "Jordon", "Jordy", "Jordyn", "Jorge", "Jose", "Joseph", "Josh", "Joshua", "Joshuah", "Josiah", "Josue", "Jovan", "Jovani", "Jovanny", "Jovany", "Judah", "Judd", "Judge", "Judson", "Jules", "Julian", "Julien", "Julio", "Julius", "Junior", "Junius", "Justen", "Justice", "Juston", "Justus", "Justyn", "Juvenal", "Juwan",
+ "Kacey", "Kade", "Kaden", "Kadin", "Kale", "Kaleb", "Kaleigh", "Kaley", "Kameron", "Kamren", "Kamron", "Kamryn", "Kane", "Kareem", "Karl", "Karley", "Karson", "Kay", "Kayden", "Kayleigh", "Kayley", "Keagan", "Keanu", "Keaton", "Keegan", "Keeley", "Keenan", "Keith", "Kellen", "Kelley", "Kelton", "Kelvin", "Ken", "Kendall", "Kendrick", "Kennedi", "Kennedy", "Kenneth", "Kennith", "Kenny", "Kenton", "Kenyon", "Keon", "Keshaun", "Keshawn", "Keven", "Kevin", "Kevon", "Keyon", "Keyshawn", "Khalid", "Khalil", "Kian", "Kiel", "Kieran", "Kiley", "Kim", "King", "Kip", "Kirk", "Kobe", "Koby", "Kody", "Kolby", "Kole", "Korbin", "Korey", "Kory", "Kraig", "Kris", "Kristian", "Kristofer", "Kristoffer", "Kristopher", "Kurt", "Kurtis", "Kyle", "Kyleigh", "Kyler",
+ "Ladarius", "Lafayette", "Lamar", "Lambert", "Lamont", "Lance", "Landen", "Lane", "Laron", "Larry", "Larue", "Laurel", "Lavern", "Laverna", "Laverne", "Lavon", "Lawrence", "Lawson", "Layne", "Lazaro", "Lee", "Leif", "Leland", "Lemuel", "Lennie", "Lenny", "Leo", "Leon", "Leonard", "Leonardo", "Leone", "Leonel", "Leopold", "Leopoldo", "Lesley", "Lester", "Levi", "Lew", "Lewis", "Lexus", "Liam", "Lincoln", "Lindsey", "Linwood", "Lionel", "Lisandro", "Llewellyn", "Lloyd", "Logan", "Lon", "London", "Lonnie", "Lonny", "Lonzo", "Lorenz", "Lorenza", "Lorenzo", "Louie", "Louisa", "Lourdes", "Louvenia", "Lowell", "Loy", "Loyal", "Lucas", "Luciano", "Lucio", "Lucious", "Lucius", "Ludwig", "Luigi", "Luis", "Lukas", "Lula", "Luther", "Lyric",
+ "Mac", "Macey", "Mack", "Mackenzie", "Madisen", "Madison", "Madyson", "Magnus", "Major", "Makenna", "Malachi", "Malcolm", "Mallory", "Manley", "Manuel", "Manuela", "Marc", "Marcel", "Marcelino", "Marcellus", "Marcelo", "Marco", "Marcos", "Marcus", "Mariano", "Mario", "Mark", "Markus", "Marley", "Marlin", "Marlon", "Marques", "Marquis", "Marshall", "Martin", "Marty", "Marvin", "Mason", "Mateo", "Mathew", "Mathias", "Matt", "Matteo", "Maurice", "Mauricio", "Maverick", "Mavis", "Max", "Maxime", "Maximilian", "Maximillian", "Maximo", "Maximus", "Maxine", "Maxwell", "Maynard", "Mckenna", "Mckenzie", "Mekhi", "Melany", "Melvin", "Melvina", "Merl", "Merle", "Merlin", "Merritt", "Mervin", "Micah", "Michael", "Michale", "Micheal", "Michel", "Miguel", "Mike", "Mikel", "Milan", "Miles", "Milford", "Miller", "Milo", "Milton", "Misael", "Mitchel", "Mitchell", "Modesto", "Mohamed", "Mohammad", "Mohammed", "Moises", "Monroe", "Monserrat", "Monserrate", "Montana", "Monte", "Monty", "Morgan", "Moriah", "Morris", "Mortimer", "Morton", "Mose", "Moses", "Moshe", "Muhammad", "Murl", "Murphy", "Murray", "Mustafa", "Myles", "Myrl", "Myron",
+ "Napoleon", "Narciso", "Nash", "Nasir", "Nat", "Nathan", "Nathanael", "Nathanial", "Nathaniel", "Nathen", "Neal", "Ned", "Neil", "Nels", "Nelson", "Nestor", "Newell", "Newton", "Nicholas", "Nicholaus", "Nick", "Nicklaus", "Nickolas", "Nico", "Nicola", "Nicolas", "Nigel", "Nikko", "Niko", "Nikolas", "Nils", "Noah", "Noble", "Noe", "Noel", "Nolan", "Norbert", "Norberto", "Norris", "Norval", "Norwood",
+ "Obie", "Oda", "Odell", "Okey", "Ola", "Olaf", "Ole", "Olen", "Olin", "Oliver", "Omari", "Omer", "Oral", "Oran", "Oren", "Orin", "Orion", "Orland", "Orlando", "Orlo", "Orrin", "Orval", "Orville", "Osbaldo", "Osborne", "Oscar", "Osvaldo", "Oswald", "Oswaldo", "Otho", "Otis", "Ottis", "Otto", "Owen",
+ "Pablo", "Paolo", "Paris", "Parker", "Patrick", "Paul", "Paxton", "Payton", "Pedro", "Percival", "Percy", "Perry", "Pete", "Peter", "Peyton", "Philip", "Pierce", "Pierre", "Pietro", "Porter", "Presley", "Preston", "Price", "Prince",
+ "Quentin", "Quincy", "Quinn", "Quinten", "Quinton",
+ "Rafael", "Raheem", "Rahul", "Raleigh", "Ralph", "Ramiro", "Ramon", "Randal", "Randall", "Randi", "Randy", "Ransom", "Raoul", "Raphael", "Rashad", "Rashawn", "Rasheed", "Raul", "Raven", "Ray", "Raymond", "Raymundo", "Reagan", "Reece", "Reed", "Reese", "Regan", "Reggie", "Reginald", "Reid", "Reilly", "Reinhold", "Remington", "Rene", "Reuben", "Rex", "Rey", "Reyes", "Reymundo", "Reynold", "Rhett", "Rhiannon", "Ricardo", "Richard", "Richie", "Richmond", "Rick", "Rickey", "Rickie", "Ricky", "Rico", "Rigoberto", "Riley", "Robb", "Robbie", "Robert", "Roberto", "Robin", "Rocio", "Rocky", "Rod", "Roderick", "Rodger", "Rodolfo", "Rodrick", "Rodrigo", "Roel", "Rogelio", "Roger", "Rogers", "Rolando", "Rollin", "Roman", "Ron", "Ronaldo", "Ronny", "Roosevelt", "Rory", "Rosario", "Roscoe", "Rosendo", "Ross", "Rowan", "Rowland", "Roy", "Royal", "Royce", "Ruben", "Rudolph", "Rudy", "Rupert", "Russ", "Russel", "Russell", "Rusty", "Ryan", "Ryann", "Ryder", "Rylan", "Ryleigh", "Ryley",
+ "Sage", "Saige", "Salvador", "Salvatore", "Sam", "Samir", "Sammie", "Sammy", "Samson", "Sanford", "Santa", "Santiago", "Santino", "Santos", "Saul", "Savion", "Schuyler", "Scot", "Scottie", "Scotty", "Seamus", "Sean", "Sebastian", "Sedrick", "Selmer", "Seth", "Shad", "Shane", "Shaun", "Shawn", "Shayne", "Sheldon", "Sheridan", "Sherman", "Sherwood", "Sid", "Sidney", "Sigmund", "Sigrid", "Sigurd", "Silas", "Sim", "Simeon", "Skye", "Skylar", "Sofia", "Soledad", "Solon", "Sonny", "Spencer", "Stan", "Stanford", "Stanley", "Stanton", "Stefan", "Stephan", "Stephen", "Stephon", "Sterling", "Steve", "Stevie", "Stewart", "Stone", "Stuart", "Sven", "Sydney", "Sylvan", "Sylvester",
+ "Tad", "Talon", "Tanner", "Tate", "Tatum", "Taurean", "Tavares", "Taylor", "Ted", "Terence", "Terrance", "Terrell", "Terrence", "Terrill", "Terry", "Tevin", "Thad", "Thaddeus", "Theo", "Theodore", "Theron", "Thomas", "Thurman", "Tillman", "Timmothy", "Timmy", "Timothy", "Tito", "Titus", "Tobin", "Toby", "Tod", "Tom", "Tomas", "Tommie", "Toney", "Toni", "Tony", "Torey", "Torrance", "Torrey", "Toy", "Trace", "Tracey", "Travis", "Travon", "Tre", "Tremaine", "Tremayne", "Trent", "Trenton", "Trever", "Trevion", "Trevor", "Trey", "Tristian", "Tristin", "Triston", "Troy", "Trystan", "Turner", "Tyler", "Tyree", "Tyreek", "Tyrel", "Tyrell", "Tyrese", "Tyrique", "Tyshawn", "Tyson",
+ "Ubaldo", "Ulices", "Ulises", "Unique", "Urban", "Uriah", "Uriel",
+ "Valentin", "Van", "Vance", "Vaughn", "Vern", "Verner", "Vernon", "Vicente", "Victor", "Vidal", "Vince", "Vincent", "Vincenzo", "Vinnie", "Virgil", "Vito", "Vladimir",
+ "Wade", "Waino", "Waldo", "Walker", "Wallace", "Walter", "Walton", "Ward", "Warren", "Watson", "Waylon", "Wayne", "Webster", "Weldon", "Wellington", "Wendell", "Werner", "Westley", "Weston", "Wilber", "Wilbert", "Wilburn", "Wiley", "Wilford", "Wilfred", "Wilfredo", "Wilfrid", "Wilhelm", "Will", "Willard", "William", "Willis", "Willy", "Wilmer", "Wilson", "Wilton", "Winfield", "Winston", "Woodrow", "Wyatt", "Wyman",
+ "Xavier", "Xzavier", "Xander",
+ "Yadav", "Yogesh", "Yaatiesh", "Yaamir",
+ "Zachariah", "Zachary", "Zachery", "Zack", "Zackary", "Zackery", "Zakary", "Zander", "Zane", "Zechariah", "Zion",
+}
+var firstNamesFemale = []string{
+ "Aaliyah", "Abagail", "Abbey", "Abbie", "Abbigail", "Abby", "Abigail", "Abigale", "Abigayle", "Ada", "Adah", "Adaline", "Addie", "Addison", "Adela", "Adele", "Adelia", "Adeline", "Adell", "Adella", "Adelle", "Aditya", "Adriana", "Adrianna", "Adrienne", "Aglae", "Agnes", "Agustina", "Aida", "Aileen", "Aimee", "Aisha", "Aiyana", "Alaina", "Alana", "Alanis", "Alanna", "Alayna", "Alba", "Alberta", "Albertha", "Albina", "Alda", "Aleen", "Alejandra", "Alena", "Alene", "Alessandra", "Alessia", "Aletha", "Alexa", "Alexandra", "Alexandrea", "Alexandria", "Alexandrine", "Alexane", "Alexanne", "Alfreda", "Alia", "Alice", "Alicia", "Alisa", "Alisha", "Alison", "Alivia", "Aliya", "Aliyah", "Aliza", "Alize", "Allene", "Allie", "Allison", "Ally", "Alta", "Althea", "Alva", "Alvena", "Alvera", "Alverta", "Alvina", "Alyce", "Alycia", "Alysa", "Alysha", "Alyson", "Alysson", "Amalia", "Amanda", "Amara", "Amaya", "Amber", "Amelia", "Amelie", "Amely", "America", "Amie", "Amina", "Amira", "Amiya", "Amy", "Amya", "Ana", "Anabel", "Anabelle", "Anahi", "Anais", "Anastasia", "Andreane", "Andreanne", "Angela", "Angelica", "Angelina", "Angeline", "Angelita", "Angie", "Anika", "Anissa", "Anita", "Aniya", "Aniyah", "Anjali", "Anna", "Annabel", "Annabell", "Annabelle", "Annalise", "Annamae", "Annamarie", "Anne", "Annetta", "Annette", "Annie", "Antoinette", "Antonetta", "Antonette", "Antonia", "Antonietta", "Antonina", "Anya", "April", "Ara", "Araceli", "Aracely", "Ardella", "Ardith", "Ariane", "Arianna", "Arielle", "Arlene", "Arlie", "Arvilla", "Aryanna", "Asa", "Asha", "Ashlee", "Ashleigh", "Ashley", "Ashly", "Ashlynn", "Ashtyn", "Asia", "Assunta", "Astrid", "Athena", "Aubree", "Aubrey", "Audie", "Audra", "Audreanne", "Audrey", "Augusta", "Augustine", "Aurelia", "Aurelie", "Aurore", "Autumn", "Ava", "Avis", "Ayana", "Ayla", "Aylin",
+ "Baby", "Bailee", "Barbara", "Beatrice", "Beaulah", "Bella", "Belle", "Berenice", "Bernadette", "Bernadine", "Berneice", "Bernice", "Berniece", "Bernita", "Bert", "Beryl", "Bessie", "Beth", "Bethany", "Bethel", "Betsy", "Bette", "Bettie", "Betty", "Bettye", "Beulah", "Beverly", "Bianka", "Billie", "Birdie", "Blanca", "Blanche", "Bonita", "Bonnie", "Brandi", "Brandy", "Brandyn", "Breana", "Breanna", "Breanne", "Brenda", "Brenna", "Bria", "Briana", "Brianne", "Bridget", "Bridgette", "Bridie", "Brielle", "Brigitte", "Brionna", "Brisa", "Britney", "Brittany", "Brooke", "Brooklyn", "Bryana", "Bulah", "Burdette", "Burnice",
+ "Caitlyn", "Caleigh", "Cali", "Calista", "Callie", "Camila", "Camilla", "Camille", "Camylle", "Candace", "Candice", "Candida", "Cara", "Carissa", "Carlee", "Carley", "Carli", "Carlie", "Carlotta", "Carmela", "Carmella", "Carmen", "Carolanne", "Carole", "Carolina", "Caroline", "Carolyn", "Carolyne", "Carrie", "Casandra", "Cassandra", "Cassandre", "Cassidy", "Cassie", "Catalina", "Caterina", "Catharine", "Catherine", "Cathrine", "Cathryn", "Cathy", "Cayla", "Cecelia", "Cecile", "Cecilia", "Celestine", "Celia", "Celine", "Chanel", "Chanelle", "Charity", "Charlene", "Charlotte", "Chasity", "Chaya", "Chelsea", "Chelsie", "Cheyanne", "Cheyenne", "Chloe", "Christa", "Christelle", "Christiana", "Christina", "Christine", "Christy", "Chyna", "Ciara", "Cierra", "Cindy", "Citlalli", "Claire", "Clara", "Clarabelle", "Clare", "Clarissa", "Claudia", "Claudie", "Claudine", "Clementina", "Clementine", "Clemmie", "Cleora", "Cleta", "Clotilde", "Colleen", "Concepcion", "Connie", "Constance", "Cora", "Coralie", "Cordia", "Cordie", "Corene", "Corine", "Corrine", "Cortney", "Courtney", "Creola", "Cristal", "Crystal", "Crystel", "Cydney", "Cynthia",
+ "Dahlia", "Daija", "Daisha", "Daisy", "Dakota", "Damaris", "Dana", "Dandre", "Daniela", "Daniella", "Danielle", "Danika", "Dannie", "Danyka", "Daphne", "Daphnee", "Daphney", "Darby", "Dariana", "Darlene", "Dasia", "Dawn", "Dayana", "Dayna", "Deanna", "Deborah", "Deja", "Dejah", "Delfina", "Delia", "Delilah", "Della", "Delores", "Delpha", "Delphia", "Delphine", "Delta", "Demetris", "Dena", "Desiree", "Dessie", "Destany", "Destinee", "Destiney", "Destini", "Destiny", "Diana", "Dianna", "Dina", "Dixie", "Dolly", "Dolores", "Domenica", "Dominique", "Donna", "Dora", "Dorothea", "Dorothy", "Dorris", "Dortha", "Dovie", "Drew", "Duane", "Dulce",
+ "Earlene", "Earline", "Earnestine", "Ebba", "Ebony", "Eda", "Eden", "Edna", "Edwina", "Edyth", "Edythe", "Effie", "Eileen", "Elaina", "Elda", "Eldora", "Eldridge", "Eleanora", "Eleanore", "Electa", "Elena", "Elenor", "Elenora", "Eleonore", "Elfrieda", "Eliane", "Elinor", "Elinore", "Elisa", "Elisabeth", "Elise", "Elisha", "Elissa", "Eliza", "Elizabeth", "Ella", "Ellen", "Ellie", "Elmira", "Elna", "Elnora", "Elody", "Eloisa", "Eloise", "Elouise", "Elsa", "Else", "Elsie", "Elta", "Elva", "Elvera", "Elvie", "Elyse", "Elyssa", "Elza", "Emelia", "Emelie", "Emely", "Emie", "Emilia", "Emilie", "Emily", "Emma", "Emmalee", "Emmanuelle", "Emmie", "Emmy", "Ena", "Enola", "Era", "Erica", "Ericka", "Erika", "Erna", "Ernestina", "Ernestine", "Eryn", "Esmeralda", "Esperanza", "Esta", "Estefania", "Estel", "Estell", "Estella", "Estelle", "Esther", "Estrella", "Etha", "Ethelyn", "Ethyl", "Ettie", "Eudora", "Eugenia", "Eula", "Eulah", "Eulalia", "Euna", "Eunice", "Eva", "Evalyn", "Evangeline", "Eve", "Eveline", "Evelyn", "Everette", "Evie",
+ "Fabiola", "Fae", "Fannie", "Fanny", "Fatima", "Fay", "Faye", "Felicia", "Felicita", "Felicity", "Felipa", "Filomena", "Fiona", "Flavie", "Fleta", "Flo", "Florence", "Florida", "Florine", "Flossie", "Frances", "Francesca", "Francisca", "Freda", "Frederique", "Freeda", "Freida", "Frida", "Frieda",
+ "Gabriella", "Gabrielle", "Gail", "Genesis", "Genevieve", "Genoveva", "Georgette", "Georgiana", "Georgianna", "Geraldine", "Gerda", "Germaine", "Gerry", "Gertrude", "Gia", "Gilda", "Gina", "Giovanna", "Gisselle", "Gladyce", "Gladys", "Glenda", "Glenna", "Gloria", "Golda", "Grace", "Gracie", "Graciela", "Gregoria", "Greta", "Gretchen", "Guadalupe", "Gudrun", "Gwen", "Gwendolyn",
+ "Hailee", "Hailie", "Halie", "Hallie", "Hanna", "Hannah", "Harmony", "Hassie", "Hattie", "Haven", "Haylee", "Haylie", "Heath", "Heather", "Heaven", "Heidi", "Helen", "Helena", "Helene", "Helga", "Hellen", "Heloise", "Henriette", "Hermina", "Herminia", "Herta", "Hertha", "Hettie", "Hilda", "Hildegard", "Hillary", "Hilma", "Hollie", "Holly", "Hope", "Hortense", "Hosea", "Hulda",
+ "Icie", "Ida", "Idell", "Idella", "Ila", "Ilene", "Iliana", "Ima", "Imelda", "Imogene", "Ines", "Irma", "Isabel", "Isabell", "Isabella", "Isabelle", "Isobel", "Itzel", "Iva", "Ivah", "Ivory", "Ivy", "Izabella",
+ "Jacinthe", "Jackeline", "Jackie", "Jacklyn", "Jacky", "Jaclyn", "Jacquelyn", "Jacynthe", "Jada", "Jade", "Jadyn", "Jaida", "Jailyn", "Jakayla", "Jalyn", "Jammie", "Jana", "Janae", "Jane", "Janelle", "Janessa", "Janet", "Janice", "Janie", "Janis", "Janiya", "Jannie", "Jany", "Jaquelin", "Jaqueline", "Jaunita", "Jayda", "Jayne", "Jazlyn", "Jazmin", "Jazmyn", "Jazmyne", "Jeanette", "Jeanie", "Jeanne", "Jena", "Jenifer", "Jennie", "Jennifer", "Jennyfer", "Jermaine", "Jessica", "Jessika", "Jessyca", "Jewel", "Jewell", "Joana", "Joanie", "Joanne", "Joannie", "Joanny", "Jodie", "Jody", "Joelle", "Johanna", "Jolie", "Jordane", "Josefa", "Josefina", "Josephine", "Josiane", "Josianne", "Josie", "Joy", "Joyce", "Juana", "Juanita", "Jude", "Judy", "Julia", "Juliana", "Julianne", "Julie", "Juliet", "June", "Justina", "Justine",
+ "Kaci", "Kacie", "Kaela", "Kaelyn", "Kaia", "Kailee", "Kailey", "Kailyn", "Kaitlin", "Kaitlyn", "Kali", "Kallie", "Kamille", "Kara", "Karelle", "Karen", "Kari", "Kariane", "Karianne", "Karina", "Karine", "Karlee", "Karli", "Karlie", "Karolann", "Kasandra", "Kasey", "Kassandra", "Katarina", "Katelin", "Katelyn", "Katelynn", "Katharina", "Katherine", "Katheryn", "Kathleen", "Kathlyn", "Kathryn", "Kathryne", "Katlyn", "Katlynn", "Katrina", "Katrine", "Kattie", "Kavon", "Kaya", "Kaycee", "Kayla", "Kaylah", "Kaylee", "Kayli", "Kaylie", "Kaylin", "Keara", "Keely", "Keira", "Kelli", "Kellie", "Kelly", "Kelsi", "Kelsie", "Kendra", "Kenna", "Kenya", "Kenyatta", "Kiana", "Kianna", "Kiara", "Kiarra", "Kiera", "Kimberly", "Kira", "Kirsten", "Kirstin", "Kitty", "Krista", "Kristin", "Kristina", "Kristy", "Krystal", "Krystel", "Krystina", "Kyla", "Kylee", "Kylie", "Kyra",
+ "Lacey", "Lacy", "Laila", "Laisha", "Laney", "Larissa", "Laura", "Lauren", "Laurence", "Lauretta", "Lauriane", "Laurianne", "Laurie", "Laurine", "Laury", "Lauryn", "Lavada", "Lavina", "Lavinia", "Lavonne", "Layla", "Lea", "Leann", "Leanna", "Leanne", "Leatha", "Leda", "Leila", "Leilani", "Lela", "Lelah", "Lelia", "Lempi", "Lenna", "Lenora", "Lenore", "Leola", "Leonie", "Leonor", "Leonora", "Leora", "Lera", "Leslie", "Lesly", "Lessie", "Leta", "Letha", "Letitia", "Lexi", "Lexie", "Lia", "Liana", "Libbie", "Libby", "Lila", "Lilian", "Liliana", "Liliane", "Lilla", "Lillian", "Lilliana", "Lillie", "Lilly", "Lily", "Lilyan", "Lina", "Linda", "Lindsay", "Linnea", "Linnie", "Lisa", "Lisette", "Litzy", "Liza", "Lizeth", "Lizzie", "Lois", "Lola", "Lolita", "Loma", "Lonie", "Lora", "Loraine", "Loren", "Lorena", "Lori", "Lorine", "Lorna", "Lottie", "Lou", "Loyce", "Lucie", "Lucienne", "Lucile", "Lucinda", "Lucy", "Ludie", "Lue", "Luella", "Luisa", "Lulu", "Luna", "Lupe", "Lura", "Lurline", "Luz", "Lyda", "Lydia", "Lyla", "Lynn", "Lysanne",
+ "Mabel", "Mabelle", "Mable", "Maci", "Macie", "Macy", "Madaline", "Madalyn", "Maddison", "Madeline", "Madelyn", "Madelynn", "Madge", "Madie", "Madilyn", "Madisyn", "Madonna", "Mae", "Maegan", "Maeve", "Mafalda", "Magali", "Magdalen", "Magdalena", "Maggie", "Magnolia", "Maia", "Maida", "Maiya", "Makayla", "Makenzie", "Malika", "Malinda", "Mallie", "Malvina", "Mandy", "Mara", "Marcelina", "Marcella", "Marcelle", "Marcia", "Margaret", "Margarete", "Margarett", "Margaretta", "Margarette", "Margarita", "Marge", "Margie", "Margot", "Margret", "Marguerite", "Maria", "Mariah", "Mariam", "Marian", "Mariana", "Mariane", "Marianna", "Marianne", "Maribel", "Marie", "Mariela", "Marielle", "Marietta", "Marilie", "Marilou", "Marilyne", "Marina", "Marion", "Marisa", "Marisol", "Maritza", "Marjolaine", "Marjorie", "Marjory", "Marlee", "Marlen", "Marlene", "Marquise", "Marta", "Martina", "Martine", "Mary", "Maryam", "Maryjane", "Maryse", "Mathilde", "Matilda", "Matilde", "Mattie", "Maud", "Maude", "Maudie", "Maureen", "Maurine", "Maxie", "Maximillia", "May", "Maya", "Maybell", "Maybelle", "Maye", "Maymie", "Mayra", "Mazie", "Mckayla", "Meagan", "Meaghan", "Meda", "Megane", "Meggie", "Meghan", "Melba", "Melisa", "Melissa", "Mellie", "Melody", "Melyna", "Melyssa", "Mercedes", "Meredith", "Mertie", "Meta", "Mia", "Micaela", "Michaela", "Michele", "Michelle", "Mikayla", "Millie", "Mina", "Minerva", "Minnie", "Miracle", "Mireille", "Mireya", "Missouri", "Misty", "Mittie", "Modesta", "Mollie", "Molly", "Mona", "Monica", "Monique", "Mossie", "Mozell", "Mozelle", "Muriel", "Mya", "Myah", "Mylene", "Myra", "Myriam", "Myrna", "Myrtice", "Myrtie", "Myrtis", "Myrtle",
+ "Nadia", "Nakia", "Name", "Nannie", "Naomi", "Naomie", "Natalia", "Natalie", "Natasha", "Nayeli", "Nedra", "Neha", "Nelda", "Nella", "Nelle", "Nellie", "Neoma", "Nettie", "Neva", "Nia", "Nichole", "Nicole", "Nicolette", "Nikita", "Nikki", "Nina", "Noelia", "Noemi", "Noemie", "Noemy", "Nola", "Nona", "Nora", "Norene", "Norma", "Nova", "Novella", "Nya", "Nyah", "Nyasia",
+ "Oceane", "Ocie", "Octavia", "Odessa", "Odie", "Ofelia", "Oleta", "Olga", "Ollie", "Oma", "Ona", "Onie", "Opal", "Ophelia", "Ora", "Orie", "Orpha", "Otha", "Otilia", "Ottilie", "Ova", "Ozella",
+ "Paige", "Palma", "Pamela", "Pansy", "Pascale", "Pasquale", "Pat", "Patience", "Patricia", "Patsy", "Pattie", "Paula", "Pauline", "Pearl", "Pearlie", "Pearline", "Peggie", "Penelope", "Petra", "Phoebe", "Phyllis", "Pink", "Pinkie", "Piper", "Polly", "Precious", "Princess", "Priscilla", "Providenci", "Prudence",
+ "Queen", "Queenie",
+ "Rachael", "Rachel", "Rachelle", "Rae", "Raegan", "Rafaela", "Rahsaan", "Raina", "Ramona", "Raphaelle", "Raquel", "Reanna", "Reba", "Rebeca", "Rebecca", "Rebeka", "Rebekah", "Reina", "Renee", "Ressie", "Reta", "Retha", "Retta", "Reva", "Reyna", "Rhea", "Rhianna", "Rhoda", "Rita", "River", "Roberta", "Robyn", "Roma", "Romaine", "Rosa", "Rosalee", "Rosalia", "Rosalind", "Rosalinda", "Rosalyn", "Rosamond", "Rosanna", "Rose", "Rosella", "Roselyn", "Rosemarie", "Rosemary", "Rosetta", "Rosie", "Rosina", "Roslyn", "Rossie", "Rowena", "Roxane", "Roxanne", "Rozella", "Rubie", "Ruby", "Rubye", "Ruth", "Ruthe", "Ruthie", "Rylee",
+ "Sabina", "Sabrina", "Sabryna", "Sadie", "Sadye", "Sallie", "Sally", "Salma", "Samanta", "Samantha", "Samara", "Sandra", "Sandrine", "Sandy", "Santina", "Sarah", "Sarai", "Sarina", "Sasha", "Savanah", "Savanna", "Savannah", "Scarlett", "Selena", "Selina", "Serena", "Serenity", "Shaina", "Shakira", "Shana", "Shanel", "Shanelle", "Shania", "Shanie", "Shaniya", "Shanna", "Shannon", "Shanny", "Shanon", "Shany", "Sharon", "Shawna", "Shaylee", "Shayna", "Shea", "Sheila", "Shemar", "Shirley", "Shyann", "Shyanne", "Sibyl", "Sienna", "Sierra", "Simone", "Sincere", "Sister", "Skyla", "Sonia", "Sonya", "Sophia", "Sophie", "Stacey", "Stacy", "Stefanie", "Stella", "Stephania", "Stephanie", "Stephany", "Summer", "Sunny", "Susan", "Susana", "Susanna", "Susie", "Suzanne", "Syble", "Sydnee", "Sydni", "Sydnie", "Sylvia",
+ "Tabitha", "Talia", "Tamara", "Tamia", "Tania", "Tanya", "Tara", "Taryn", "Tatyana", "Taya", "Teagan", "Telly", "Teresa", "Tess", "Tessie", "Thalia", "Thea", "Thelma", "Theodora", "Theresa", "Therese", "Theresia", "Thora", "Tia", "Tiana", "Tianna", "Tiara", "Tierra", "Tiffany", "Tina", "Tomasa", "Tracy", "Tressa", "Tressie", "Treva", "Trinity", "Trisha", "Trudie", "Trycia", "Twila", "Tyra",
+ "Una", "Ursula",
+ "Vada", "Valentina", "Valentine", "Valerie", "Vallie", "Vanessa", "Veda", "Velda", "Vella", "Velma", "Velva", "Vena", "Verda", "Verdie", "Vergie", "Verla", "Verlie", "Verna", "Vernice", "Vernie", "Verona", "Veronica", "Vesta", "Vicenta", "Vickie", "Vicky", "Victoria", "Vida", "Vilma", "Vincenza", "Viola", "Violet", "Violette", "Virgie", "Virginia", "Virginie", "Vita", "Viva", "Vivian", "Viviane", "Vivianne", "Vivien", "Vivienne",
+ "Wanda", "Wava", "Wendy", "Whitney", "Wilhelmine", "Willa", "Willie", "Willow", "Wilma", "Winifred", "Winnifred", "Winona",
+ "Xiu-Mei", "Xio",
+ "Yadira", "Yasmeen", "Yasmin", "Yasmine", "Yazmin", "Yesenia", "Yessenia", "Yolanda", "Yoshiko", "Yvette", "Yvonne",
+ "Zaria", "Zelda", "Zella", "Zelma", "Zena", "Zetta", "Zita", "Zoe", "Zoey", "Zoie", "Zoila", "Zola", "Zora", "Zula",
+}
+
+var firstNames = append(firstNamesMale, firstNamesFemale...)
+
+var lastNames = []string{
+ "Abbott", "Abernathy", "Abshire", "Adams", "Altenwerth", "Anderson", "Ankunding", "Armstrong", "Auer", "Aufderhar",
+ "Bahringer", "Bailey", "Balistreri", "Barrows", "Bartell", "Bartoletti", "Barton", "Bashirian", "Batz", "Bauch", "Baumbach", "Bayer", "Beahan", "Beatty", "Bechtelar", "Becker", "Bednar", "Beer", "Beier", "Berge", "Bergnaum", "Bergstrom", "Bernhard", "Bernier", "Bins", "Blanda", "Blick", "Block", "Bode", "Boehm", "Bogan", "Bogisich", "Borer", "Bosco", "Botsford", "Boyer", "Boyle", "Bradtke", "Brakus", "Braun", "Breitenberg", "Brekke", "Brown", "Bruen", "Buckridge",
+ "Carroll", "Carter", "Cartwright", "Casper", "Cassin", "Champlin", "Christiansen", "Cole", "Collier", "Collins", "Conn", "Connelly", "Conroy", "Considine", "Corkery", "Cormier", "Corwin", "Cremin", "Crist", "Crona", "Cronin", "Crooks", "Cruickshank", "Cummerata", "Cummings",
+ "Dach", "D'Amore", "Daniel", "Dare", "Daugherty", "Davis", "Deckow", "Denesik", "Dibbert", "Dickens", "Dicki", "Dickinson", "Dietrich", "Donnelly", "Dooley", "Douglas", "Doyle", "DuBuque", "Durgan",
+ "Ebert", "Effertz", "Eichmann", "Emard", "Emmerich", "Erdman", "Ernser", "Fadel",
+ "Fahey", "Farrell", "Fay", "Feeney", "Feest", "Feil", "Ferry", "Fisher", "Flatley", "Frami", "Franecki", "Friesen", "Fritsch", "Funk",
+ "Gaylord", "Gerhold", "Gerlach", "Gibson", "Gislason", "Gleason", "Gleichner", "Glover", "Goldner", "Goodwin", "Gorczany", "Gottlieb", "Goyette", "Grady", "Graham", "Grant", "Green", "Greenfelder", "Greenholt", "Grimes", "Gulgowski", "Gusikowski", "Gutkowski", "Gutmann",
+ "Haag", "Hackett", "Hagenes", "Hahn", "Haley", "Halvorson", "Hamill", "Hammes", "Hand", "Hane", "Hansen", "Harber", "Harris", "Hartmann", "Harvey", "Hauck", "Hayes", "Heaney", "Heathcote", "Hegmann", "Heidenreich", "Heller", "Herman", "Hermann", "Hermiston", "Herzog", "Hessel", "Hettinger", "Hickle", "Hilll", "Hills", "Hilpert", "Hintz", "Hirthe", "Hodkiewicz", "Hoeger", "Homenick", "Hoppe", "Howe", "Howell", "Hudson", "Huel", "Huels", "Hyatt",
+ "Jacobi", "Jacobs", "Jacobson", "Jakubowski", "Jaskolski", "Jast", "Jenkins", "Jerde", "Johns", "Johnson", "Johnston", "Jones",
+ "Kassulke", "Kautzer", "Keebler", "Keeling", "Kemmer", "Kerluke", "Kertzmann", "Kessler", "Kiehn", "Kihn", "Kilback", "King", "Kirlin", "Klein", "Kling", "Klocko", "Koch", "Koelpin", "Koepp", "Kohler", "Konopelski", "Koss", "Kovacek", "Kozey", "Krajcik", "Kreiger", "Kris", "Kshlerin", "Kub", "Kuhic", "Kuhlman", "Kuhn", "Kulas", "Kunde", "Kunze", "Kuphal", "Kutch", "Kuvalis",
+ "Labadie", "Lakin", "Lang", "Langosh", "Langworth", "Larkin", "Larson", "Leannon", "Lebsack", "Ledner", "Leffler", "Legros", "Lehner", "Lemke", "Lesch", "Leuschke", "Lind", "Lindgren", "Littel", "Little", "Lockman", "Lowe", "Lubowitz", "Lueilwitz", "Luettgen", "Lynch",
+ "Macejkovic", "Maggio", "Mann", "Mante", "Marks", "Marquardt", "Marvin", "Mayer", "Mayert", "McClure", "McCullough", "McDermott", "McGlynn", "McKenzie", "McLaughlin", "Medhurst", "Mertz", "Metz", "Miller", "Mills", "Mitchell", "Moen", "Mohr", "Monahan", "Moore", "Morar", "Morissette", "Mosciski", "Mraz", "Mueller", "Muller", "Murazik", "Murphy", "Murray",
+ "Nader", "Nicolas", "Nienow", "Nikolaus", "Nitzsche", "Nolan",
+ "Oberbrunner", "O'Connell", "O'Conner", "O'Hara", "O'Keefe", "O'Kon", "Okuneva", "Olson", "Ondricka", "O'Reilly", "Orn", "Ortiz", "Osinski",
+ "Pacocha", "Padberg", "Pagac", "Parisian", "Parker", "Paucek", "Pfannerstill", "Pfeffer", "Pollich", "Pouros", "Powlowski", "Predovic", "Price", "Prohaska", "Prosacco", "Purdy",
+ "Quigley", "Quitzon",
+ "Rath", "Ratke", "Rau", "Raynor", "Reichel", "Reichert", "Reilly", "Reinger", "Rempel", "Renner", "Reynolds", "Rice", "Rippin", "Ritchie", "Robel", "Roberts", "Rodriguez", "Rogahn", "Rohan", "Rolfson", "Romaguera", "Roob", "Rosenbaum", "Rowe", "Ruecker", "Runolfsdottir", "Runolfsson", "Runte", "Russel", "Rutherford", "Ryan", "Sanford", "Satterfield", "Sauer", "Sawayn",
+ "Schaden", "Schaefer", "Schamberger", "Schiller", "Schimmel", "Schinner", "Schmeler", "Schmidt", "Schmitt", "Schneider", "Schoen", "Schowalter", "Schroeder", "Schulist", "Schultz", "Schumm", "Schuppe", "Schuster", "Senger", "Shanahan", "Shields", "Simonis", "Sipes", "Skiles", "Smith", "Smitham", "Spencer", "Spinka", "Sporer", "Stamm", "Stanton", "Stark", "Stehr", "Steuber", "Stiedemann", "Stokes", "Stoltenberg", "Stracke", "Streich", "Stroman", "Strosin", "Swaniawski", "Swift",
+ "Terry", "Thiel", "Thompson", "Tillman", "Torp", "Torphy", "Towne", "Toy", "Trantow", "Tremblay", "Treutel", "Tromp", "Turcotte", "Turner",
+ "Ullrich", "Upton", "Vandervort", "Veum", "Volkman", "Von", "VonRueden", "Waelchi", "Walker", "Walsh", "Walter", "Ward", "Waters", "Watsica", "Weber", "Wehner", "Weimann", "Weissnat", "Welch", "West", "White", "Wiegand", "Wilderman", "Wilkinson", "Will", "Williamson", "Willms", "Windler", "Wintheiser", "Wisoky", "Wisozk", "Witting", "Wiza", "Wolf", "Wolff", "Wuckert", "Wunsch", "Wyman",
+ "Yost", "Yundt", "Zboncak", "Zemlak", "Ziemann", "Zieme", "Zulauf",
+}
+
+var randNameFlag int
+
+var genders = []string{"Male", "Female", "Prefer to skip"}
+
+var chineseFirstNames = []string{
+ "赵", "钱", "孙", "李", "周", "吴", "郑", "王", "冯", "陈", "褚", "卫", "蒋", "沈", "韩", "杨", "朱", "秦", "尤", "许",
+ "何", "吕", "施", "张", "孔", "曹", "严", "华", "金", "魏", "陶", "姜", "戚", "谢", "邹", "喻", "柏", "水", "窦", "章",
+ "云", "苏", "潘", "葛", "奚", "范", "彭", "郎", "鲁", "韦", "昌", "马", "苗", "凤", "花", "方", "俞", "任", "袁", "柳",
+ "酆", "鲍", "史", "唐", "费", "廉", "岑", "薛", "雷", "贺", "倪", "汤", "滕", "殷", "罗", "毕", "郝", "邬", "安", "常",
+ "乐", "于", "时", "傅", "皮", "卞", "齐", "康", "伍", "余", "元", "卜", "顾", "孟", "平", "黄", "和", "穆", "萧", "尹",
+ "姚", "邵", "湛", "汪", "祁", "毛", "禹", "狄", "米", "贝", "明", "臧", "计", "伏", "成", "戴", "谈", "宋", "茅", "庞",
+ "熊", "纪", "舒", "屈", "项", "祝", "董", "梁", "杜", "阮", "蓝", "闵", "席", "季", "麻", "强", "贾", "路", "娄", "危",
+ "江", "童", "颜", "郭", "梅", "盛", "林", "刁", "钟", "徐", "邱", "骆", "高", "夏", "蔡", "田", "樊", "胡", "凌", "霍",
+ "虞", "万", "支", "柯", "昝", "管", "卢", "莫", "经", "房", "裘", "缪", "干", "解", "应", "宗", "丁", "宣", "贲", "邓",
+ "郁", "单", "杭", "洪", "包", "诸", "左", "石", "崔", "吉", "钮", "龚", "程", "嵇", "邢", "滑", "裴", "陆", "荣", "翁",
+ "荀", "羊", "於", "惠", "甄", "麴", "家", "封", "芮", "羿", "储", "靳", "汲", "邴", "糜", "松", "井", "段", "富", "巫",
+ "乌", "焦", "巴", "弓", "牧", "隗", "山", "谷", "车", "侯", "宓", "蓬", "全", "郗", "班", "仰", "秋", "仲", "伊", "宫",
+ "宁", "仇", "栾", "暴", "甘", "钭", "厉", "戎", "祖", "武", "符", "刘", "景", "詹", "束", "龙", "叶", "幸", "司", "韶",
+ "郜", "黎", "蓟", "薄", "印", "宿", "白", "怀", "蒲", "邰", "从", "鄂", "索", "咸", "籍", "赖", "卓", "蔺", "屠", "蒙",
+ "池", "乔", "阴", "郁", "胥", "能", "苍", "双", "闻", "莘", "党", "翟", "谭", "贡", "劳", "逄", "姬", "申", "扶", "堵",
+ "冉", "宰", "郦", "雍", "舄", "璩", "桑", "桂", "濮", "牛", "寿", "通", "边", "扈", "燕", "冀", "郏", "浦", "尚", "农",
+ "温", "别", "庄", "晏", "柴", "瞿", "阎", "充", "慕", "连", "茹", "习", "宦", "艾", "鱼", "容", "向", "古", "易", "慎",
+ "戈", "廖", "庾", "终", "暨", "居", "衡", "步", "都", "耿", "满", "弘", "匡", "国", "文", "寇", "广", "禄", "阙", "东",
+ "殴", "殳", "沃", "利", "蔚", "越", "夔", "隆", "师", "巩", "厍", "聂", "晁", "勾", "敖", "融", "冷", "訾", "辛", "阚",
+ "那", "简", "饶", "空", "曾", "毋", "沙", "乜", "养", "鞠", "须", "丰", "巢", "关", "蒯", "相", "查", "後", "荆", "红",
+ "游", "竺", "权", "逯", "盖", "益", "桓", "公", "司马", "上官", "欧阳", "夏侯", "诸葛",
+}
+
+var chineseLastNames = []string{
+ "澄邈", "德泽", "海超", "海阳", "海荣", "海逸", "海昌", "瀚钰", "瀚文", "涵亮", "涵煦", "明宇",
+ "涵衍", "浩皛", "浩波", "浩博", "浩初", "浩宕", "浩歌", "浩广", "浩邈", "浩气", "浩思", "浩言",
+ "鸿宝", "鸿波", "鸿博", "鸿才", "鸿畅", "鸿畴", "鸿达", "鸿德", "鸿飞", "鸿风", "鸿福", "鸿光",
+ "鸿晖", "鸿朗", "鸿文", "鸿轩", "鸿煊", "鸿骞", "鸿远", "鸿云", "鸿哲", "鸿祯", "鸿志", "鸿卓",
+ "嘉澍", "光济", "澎湃", "彭泽", "鹏池", "鹏海", "浦和", "浦泽", "瑞渊", "越泽", "博耘", "德运",
+ "辰宇", "辰皓", "辰钊", "辰铭", "辰锟", "辰阳", "辰韦", "辰良", "辰沛", "晨轩", "晨涛", "晨濡",
+ "晨潍", "鸿振", "吉星", "铭晨", "起运", "运凡", "运凯", "运鹏", "运浩", "运诚", "运良", "运鸿",
+ "运锋", "运盛", "运升", "运杰", "运珧", "运骏", "运凯", "运乾", "维运", "运晟", "运莱", "运华",
+ "耘豪", "星爵", "星腾", "星睿", "星泽", "星鹏", "星然", "震轩", "震博", "康震", "震博", "振强",
+ "振博", "振华", "振锐", "振凯", "振海", "振国", "振平", "昂然", "昂雄", "昂杰", "昂熙", "昌勋",
+ "昌盛", "昌淼", "昌茂", "昌黎", "昌燎", "昌翰", "晨朗", "德明", "德昌", "德曜", "范明", "飞昂",
+ "高旻", "晗日", "昊然", "昊天", "昊苍", "昊英", "昊宇", "昊嘉", "昊明", "昊伟", "昊硕", "昊磊",
+ "昊东", "鸿晖", "鸿朗", "华晖", "金鹏", "晋鹏", "敬曦", "景明", "景天", "景浩", "俊晖", "君昊",
+ "昆锐", "昆卉", "昆峰", "昆颉", "昆谊", "昆皓", "昆鹏", "昆明", "昆杰", "昆雄", "昆纶", "鹏涛",
+ "依秋", "依波", "香巧", "紫萱", "涵易", "忆之", "幻巧", "美倩", "安寒", "白亦", "惜玉", "碧春",
+ "怜雪", "听南", "念蕾", "紫夏", "凌旋", "芷梦", "凌寒", "梦竹", "千凡", "丹蓉", "慧贞", "思菱",
+ "平卉", "笑柳", "雪卉", "南蓉", "谷梦", "巧兰", "绿蝶", "飞荷", "佳蕊", "芷荷", "怀瑶", "慕易",
+ "若芹", "紫安", "曼冬", "寻巧", "雅昕", "尔槐", "以旋", "初夏", "依丝", "怜南", "傲菡", "谷蕊",
+ "笑槐", "飞兰", "笑卉", "迎荷", "佳音", "梦君", "妙绿", "觅雪", "寒安", "沛凝", "白容", "乐蓉",
+ "映安", "依云", "映冬", "凡雁", "梦秋", "梦凡", "秋巧", "若云", "元容", "怀蕾", "灵寒", "天薇",
+ "翠安", "乐琴", "宛南", "怀蕊", "白风", "访波", "亦凝", "易绿", "夜南", "曼凡", "亦巧", "青易",
+ "冰真", "白萱", "友安", "海之", "小蕊", "又琴", "天风", "若松", "盼菡", "秋荷", "香彤", "语梦",
+ "惜蕊", "迎彤", "沛白", "雁彬", "易蓉", "雪晴", "诗珊", "春冬", "晴钰", "冰绿", "半梅", "笑容",
+ "沛凝", "映秋", "盼烟", "晓凡", "涵雁", "问凝", "冬萱", "晓山", "雁蓉", "梦蕊", "山菡", "南莲",
+ "飞双", "凝丝", "思萱", "怀梦", "雨梅", "冷霜", "向松", "迎丝", "迎梅", "雅彤", "香薇", "以山",
+ "碧萱", "寒云", "向南", "书雁", "怀薇", "思菱", "忆文", "翠巧", "书文", "若山", "向秋", "凡白",
+ "绮烟", "从蕾", "天曼", "又亦", "从语", "绮彤", "之玉", "凡梅", "依琴", "沛槐", "又槐", "元绿",
+}
+
+var russianFirstNamesMale = []string{
+ "Авдей", "Авксентий", "Агафон", "Акакий", "Александр", "Алексей", "Альберт", "Альвиан", "Анатолий", "Андрей", "Аникита",
+ "Антон", "Антонин", "Анфим", "Аристарх", "Аркадий", "Арсений", "Артём", "Артемий", "Артур", "Архипп", "Афанасий", "Богдан",
+ "Борис", "Вавила", "Вадим", "Валентин", "Валерий", "Валерьян", "Варлам", "Варсонофий", "Варфоломей", "Василий", "Венедикт",
+ "Вениамин", "Викентий", "Виктор", "Виссарион", "Виталий", "Владимир", "Владислав", "Владлен", "Влас", "Всеволод",
+ "Вячеслав", "Гавриил", "Галактион", "Геласий", "Геннадий", "Георгий", "Герасим", "Герман", "Германн", "Глеб", "Гордей",
+ "Григорий", "Данакт", "Даниил", "Демид", "Демьян", "Денис", "Дмитрий", "Добрыня", "Донат", "Дорофей", "Евгений",
+ "Евграф", "Евдоким", "Евсей", "Евстафий", "Егор", "Емельян", "Еремей", "Ермолай", "Ерофей", "Ефим", "Ефрем", "Ждан",
+ "Зиновий", "Иакинф", "Иван", "Игнатий", "Игорь", "Илья", "Иннокентий", "Ираклий", "Ириней", "Исидор", "Иуда", "Иулиан",
+ "Капитон", "Ким", "Кир", "Кирилл", "Климент", "Кондрат", "Конон", "Константин", "Корнилий", "Кузьма", "Куприян",
+ "Лаврентий", "Лев", "Леонид", "Леонтий", "Логгин", "Лука", "Лукий", "Лукьян", "Магистриан", "Макар", "Максим", "Марк",
+ "Мартын", "Матвей", "Мелентий", "Мина", "Мирон", "Мирослав", "Митрофан", "Михаил", "Мстислав", "Назар", "Нестор",
+ "Никанор", "Никита", "Никифор", "Никодим", "Николай", "Никон", "Олег", "Онисим", "Онуфрий", "Павел", "Паисий", "Панкратий",
+ "Пантелеймон", "Парфений", "Пафнутий", "Пахомий", "Пётр", "Платон", "Поликарп", "Порфирий", "Потап", "Пров", "Прокопий",
+ "Протасий", "Прохор", "Родион", "Родослав", "Роман", "Ростислав", "Руслан", "Савва", "Савелий", "Самуил", "Святополк",
+ "Святослав", "Севастьян", "Семён", "Серафим", "Сергей", "Сила", "Сильвестр", "Созон", "Софрон", "Спиридон", "Станислав",
+ "Степан", "Тарас", "Тимофей", "Тимур", "Тит", "Тихон", "Трифон", "Трофим", "Фаддей", "Фёдор", "Федосей", "Федот", "Феликс",
+ "Феоктист", "Филат", "Филимон", "Филипп", "Фирс", "Фока", "Фома", "Фотий", "Фрол", "Харитон", "Хрисанф", "Христофор",
+ "Эдуард", "Эраст", "Юлиан", "Юрий", "Юстин", "Яков", "Якун", "Ярослав", "Иосиф",
+}
+var russianFirstNamesFemale = []string{
+ "Ава", "Августа", "Августина", "Авдотья", "Аврора", "Агапия", "Агата", "Агафья", "Аглая", "Агния", "Агунда", "Ада",
+ "Аделаида", "Аделина", "Адель", "Адиля", "Адриана", "Аза", "Азалия", "Азиза", "Аида", "Аиша", "Ай", "Айару", "Айгерим",
+ "Айгуль", "Айлин", "Айнагуль", "Айнур", "Айсель", "Айсун", "Айсылу", "Аксинья", "Алана", "Алевтина", "Александра",
+ "Алексия", "Алеста", "Алина", "Алиса", "Алия", "Алла", "Алсу", "Алтын", "Альба", "Альбина", "Альфия", "Аля", "Алёна",
+ "Амалия", "Амаль", "Амина", "Амира", "Анабель", "Анаит", "Анастасия", "Ангелина", "Анжела", "Анжелика", "Анисья", "Анита",
+ "Анна", "Антонина", "Анфиса", "Аполлинария", "Арабелла", "Ариадна", "Ариана", "Арианда", "Арина", "Ария", "Асель", "Асия",
+ "Астрид", "Ася", "Афина", "Аэлита", "Ая", "Аяна", "Бажена", "Беатрис", "Бела", "Белинда", "Белла", "Берта", "Богдана",
+ "Божена", "Бьянка", "Бэлла", "Валентина", "Валерия", "Ванда", "Ванесса", "Варвара", "Василина", "Василиса", "Венера",
+ "Вера", "Вероника", "Веста", "Вета", "Викторина", "Виктория", "Вилена", "Виола", "Виолетта", "Вита", "Виталина", "Виталия",
+ "Влада", "Владана", "Владислава", "Габриэлла", "Галина", "Галия", "Гаяна", "Гаянэ", "Генриетта", "Глафира", "Гоар",
+ "Грета", "Гульзира", "Гульмира", "Гульназ", "Гульнара", "Гульшат", "Гюзель", "Далида", "Дамира", "Дана", "Даниэла",
+ "Дания", "Дара", "Дарина", "Дарья", "Даяна", "Джамиля", "Дженна", "Дженнифер", "Джессика", "Джиневра", "Диана", "Дильназ",
+ "Дильнара", "Диля", "Дилярам", "Дина", "Динара", "Долорес", "Доминика", "Домна", "Домника", "Ева", "Евангелина",
+ "Евгения", "Евдокия", "Екатерина", "Елена", "Елизавета", "Есения", "Ея", "Жаклин", "Жанна", "Жансая", "Жасмин", "Жозефина",
+ "Жоржина", "Забава", "Заира", "Залина", "Замира", "Зара", "Зарема", "Зарина", "Земфира", "Зинаида", "Зита", "Злата",
+ "Златослава", "Зоряна", "Зоя", "Зульфия", "Зухра", "Ивета", "Иветта", "Изабелла", "Илина", "Иллирика", "Илона", "Ильзира",
+ "Илюза", "Инга", "Индира", "Инесса", "Инна", "Иоанна", "Ира", "Ирада", "Ираида", "Ирина", "Ирма", "Искра", "Ия", "Камила",
+ "Камилла", "Кара", "Каре", "Карима", "Карина", "Каролина", "Кира", "Клавдия", "Клара", "Констанция", "Кора", "Корнелия",
+ "Кристина", "Ксения", "Лада", "Лана", "Лара", "Лариса", "Лаура", "Лейла", "Леона", "Лера", "Леся", "Лета", "Лиана", "Лидия",
+ "Лиза", "Лика", "Лили", "Лилиана", "Лилит", "Лилия", "Лина", "Линда", "Лиора", "Лира", "Лия", "Лола", "Лолита", "Лора",
+ "Луиза", "Лукерья", "Лукия", "Луна", "Любава", "Любовь", "Людмила", "Люсиль", "Люсьена", "Люция", "Люче", "Ляйсан", "Ляля",
+ "Мавиле", "Мавлюда", "Магда", "Магдалeна", "Мадина", "Мадлен", "Майя", "Макария", "Малика", "Мара", "Маргарита", "Марианна",
+ "Марика", "Марина", "Мария", "Мариям", "Марта", "Марфа", "Мелания", "Мелисса", "Мехри", "Мика", "Мила", "Милада", "Милана",
+ "Милен", "Милена", "Милица", "Милослава", "Мина", "Мира", "Мирослава", "Мирра", "Михримах", "Мишель", "Мия", "Моника",
+ "Муза", "Надежда", "Наиля", "Наима", "Нана", "Наоми", "Наргиза", "Наталья", "Нелли", "Нея", "Ника", "Николь", "Нина",
+ "Нинель", "Номина", "Нонна", "Нора", "Нурия", "Одетта", "Оксана", "Октябрина", "Олеся", "Оливия", "Ольга", "Офелия",
+ "Павлина", "Памела", "Патриция", "Паула", "Пейтон", "Пелагея", "Перизат", "Платонида", "Полина", "Прасковья", "Равшана",
+ "Рада", "Разина", "Раиля", "Раиса", "Раифа", "Ралина", "Рамина", "Раяна", "Ребекка", "Регина", "Резеда", "Рена", "Рената",
+ "Риана", "Рианна", "Рикарда", "Римма", "Рина", "Рита", "Роберта", "Рогнеда", "Роза", "Роксана", "Роксолана", "Рузалия",
+ "Рузанна", "Русалина", "Руслана", "Руфина", "Руфь", "Сабина", "Сабрина", "Сажида", "Саида", "Салима", "Саломея", "Сальма",
+ "Самира", "Сандра", "Сания", "Сара", "Сати", "Сауле", "Сафия", "Сафура", "Саяна", "Светлана", "Севара", "Селена", "Сельма",
+ "Серафима", "Сесилия", "Сиара", "Сильвия", "Симона", "Снежана", "Соня", "Софья", "Стелла", "Стефания", "Сусанна", "Таисия",
+ "Тамара", "Тамила", "Тара", "Татьяна", "Тая", "Таяна", "Теона", "Тереза", "Тея", "Тина", "Тиффани", "Томирис", "Тора",
+ "Тэмми", "Ульяна", "Ума", "Урсула", "Устинья", "Фазиля", "Фаина", "Фарида", "Фариза", "Фатима", "Федора", "Фелисити",
+ "Фелиция", "Феруза", "Физалия", "Фируза", "Флора", "Флоренс", "Флорентина", "Флоренция", "Флориана", "Фредерика",
+ "Фрида", "Фёкла", "Хадия", "Хилари", "Хлоя", "Хюррем", "Цагана", "Цветана", "Цецилия", "Циара", "Челси", "Чеслава",
+ "Чулпан", "Шакира", "Шарлотта", "Шахина", "Шейла", "Шелли", "Шерил", "Эвелина", "Эвита", "Элеонора", "Элиана", "Элиза",
+ "Элина", "Элла", "Эльвина", "Эльвира", "Эльмира", "Эльнара", "Эля", "Эмили", "Эмилия", "Эмма", "Энже", "Эрика", "Эрмина",
+ "Эсмеральда", "Эсмира", "Эстер", "Этель", "Этери", "Юлианна", "Юлия", "Юна", "Юния", "Юнона", "Ядвига", "Яна", "Янина",
+ "Ярина", "Ярослава", "Ясмина"}
+
+var russianLastNamesMale = []string{
+ "Абакумов", "Абдуллаев", "Абрамов", "Абрикосов", "Абросимов", "Абузяров", "Авакумов", "Аввакум", "Авдеев", "Авдеенко",
+ "Авдиев", "Авен", "Аверкиев", "Аверков", "Аверченко", "Авилин", "Авилов", "Авксентьев", "Аврамов", "Авсеев", "Авченко",
+ "Агапеев", "Агапов", "Агапьев", "Агафонов", "Агеев", "Агутин", "Адамович", "Адрианов", "Ажаев", "Азаров", "Азарьев",
+ "Азарьин", "Азольский", "Айзман", "Айтматов", "Акатов", "Акатьев", "Акбулатов", "Акимов", "Акиндинов", "Акинфиев",
+ "Акинфов", "Аксенов", "Аксентьев", "Аксёнов", "Акулин", "Акулов", "Алданов", "Алейников", "Александров", "Алексеев",
+ "Алексиевич", "Алексин", "Алехин", "Алешковский", "Алимпиев", "Алипов", "Алипьев", "Алисов", "Алпатов", "Алтухов",
+ "Алферьев", "Алфимов", "Алфёров", "Алябьев", "Амарантов", "Амвросов", "Амвросьев", "Аммосов", "Амосов", "Амфитеатров",
+ "Ананьев", "Ананьин", "Анастасов", "Анастасьев", "Андреев", "Андрианов", "Андроников", "Андронов", "Андропов",
+ "Андрусов", "Анемподистов", "Аникеев", "Анисимов", "Анискин", "Анкидинов", "Анкудинов", "Анненков", "Аннинский",
+ "Антипин", "Антипов", "Антипьев", "Антонов", "Антоньев", "Ануров", "Анурьев", "Анфимов", "Анхимов", "Анцыферов",
+ "Анчаров", "Анюков", "Апарин", "Арабов", "Арановский", "Арбатов", "Арбитман", "Арбузов", "Ардалионов", "Аренский",
+ "Арепьев", "Арефин", "Арефов", "Арефьев", "Аристархов", "Аристов", "Аркадов", "Аркадьев", "Аркадьин", "Арро", "Арсенов",
+ "Арсеньев", "Артамонов", "Артемьев", "Артёмов", "Архангельский", "Архипов", "Архипьев", "Арцыбашев", "Арцыбушев",
+ "Асафов", "Асафьев", "Асеев", "Астапов", "Астафьев", "Астахов", "Асташин", "Аствацатуров", "Атаманов", "Афанасов",
+ "Афанасьев", "Афлатуни", "Афремов", "Африканов", "Африкантов", "Афросимов", "Ахадов", "Ахмедов", "Бабаевский",
+ "Бабаченко", "Бабель", "Бабиков", "Бабуров", "Бабченко", "Бавильский", "Багиров", "Багринцев", "Багрянцев", "Бажов",
+ "Байбородин", "Бакланов", "Бакунин", "Балдин", "Балков", "Банников", "Банщиков", "Баранов", "Бартенев", "Басинский",
+ "Баскаков", "Басманов", "Басыров", "Бацкалевич", "Бачило", "Безбатько", "Бездетко", "Беззубенко", "Безрученко",
+ "Безручко", "Белезянский", "Беленко", "Беленький", "Белинский", "Белобоцкий", "Белобровко", "Белов", "Белозеров",
+ "Белозёров", "Белоиван", "Белокуров", "Беломлинский", "Белоножко", "Белооченко", "Белоруков", "Белорусец", "Белоусов",
+ "Белошапко", "Белый", "Белых", "Беляев", "Беляков", "Белянкин", "Бенедиктов", "Бенигсен", "Березин", "Березовский",
+ "Берестов", "Берсенев", "Берсенёв", "Берёза", "Берёзин", "Беседин", "Беспаленко", "Беспалов", "Беспалько", "Беспутин",
+ "Бессараб", "Бестужев", "Марлинский", "Бианки", "Бирюков", "Битов", "Блинов", "Блок", "Блохин", "Бобков", "Боборыкин",
+ "Бобров", "Бобылёв", "Богатченко", "Богданов", "Богданович", "Боголюбский", "Богомолов", "Богомяков", "Богословский",
+ "Богоявленский", "Богуславский", "Бодров", "Бодылев", "Боженко", "Бойко", "Болмат", "Болотов", "Болтышев", "Болучевский",
+ "Большаков", "Бондарев", "Бондарь", "Борисенко", "Борисов", "Борищенко", "Бормор", "Борн", "Боровой", "Бородин",
+ "Бортников", "Борцов", "Босов", "Боченков", "Бочков", "Бочоришвили", "Бояндин", "Боярский", "Бояшов", "Брагин", "Брасс",
+ "Брежнев", "Брешковский", "Бровцев", "Бродский", "Бруштейн", "Брюсов", "Бугрименко", "Бузин", "Буйда", "Букша", "Булатов",
+ "Булгаков", "Булганин", "Булгарин", "Булочников", "Булычев", "Бундур", "Бунин", "Буняченко", "Бураченко", "Буркатовский",
+ "Бурмистров", "Буров", "Буровский", "Буряченко", "Бутин", "Бутов", "Буторин", "Бушин", "Быков", "Быченко", "Бычков",
+ "Вавилин", "Вавилов", "Вайман", "Вайнеры", "Вайсбеккер", "Вакуленко", "Вакулин", "Вакулов", "Валентинов", "Валетов",
+ "Варавва", "Варламов", "Варнавин", "Варченко", "Варшавский", "Васечкин", "Васечко", "Василев", "Василенко", "Василов",
+ "Васильев", "Васильевич", "Васькин", "Васюченко", "Вахтин", "Веденский", "Веллер", "Вельтман", "Веневитинов",
+ "Венедиктов", "Вепрев", "Верзилов", "Веркин", "Верников", "Вершинин", "Веселов", "Веселый", "Ветров", "Визбор",
+ "Викентьев", "Виккерс", "Викторов", "Вильмонт", "Виноградов", "Винтилов", "Вирхов", "Витковский", "Витушев", "Витязев",
+ "Вихров", "Вишневский", "Вишняков", "Владимиров", "Владимирский", "Владимов", "Власов", "Власьев", "Внифатьев",
+ "Вовчок", "Воддеников", "Водолазкин", "Войнов", "Войнович", "Волков", "Володарский", "Володихин", "Волос", "Волочков",
+ "Вонифатов", "Вонифатьев", "Воробьев", "Воробьёв", "Воронов", "Воронцов", "Воротников", "Воскобойников", "Востряков",
+ "Вотрин", "Всеволожский", "Вяземский", "Габышев", "Гаврилин", "Гаврилов", "Гагарин", "Газданов", "Гай", "Гайдар",
+ "Гайдук", "Галактионов", "Галкин", "Галковский", "Галктионов", "Гальего", "Гальцов", "Гаммер", "Гандлевский", "Ганиев",
+ "Ганичев", "Гарасимов", "Гаррос", "Гатапов", "Гедеонов", "Геласимов", "Геннадиев", "Геогиевский", "Герасимов",
+ "Гераскин", "Геращенко", "Герман", "Германов", "Гермогенов", "Герцен", "Гершанов", "Гиваргизов", "Гиляровский",
+ "Гиршович", "Гладилин", "Гладков", "Гладышев", "Глинка", "Глуховский", "Глушик", "Гляделкин", "Гнатюк", "Гнедич",
+ "Гнилорыбов", "Гоголь", "Гогуа", "Голиков", "Головачёв", "Голофтеев", "Голубев", "Голунов", "Гомзиков", "Гончаров",
+ "Горалик", "Горбачёв", "Горбунов", "Гордеев", "Горелов", "Горенштейн", "Горланов", "Горлов", "Горчев", "Горшков",
+ "Горький", "Гостев", "Гранин", "Графинин", "Гребенщиков", "Гриб", "Грибанов", "Григоров", "Григорович", "Григорьев",
+ "Грин", "Гришин", "Гришковец", "Грозный", "Громов", "Гроссман", "Грунин", "Грязев", "Губерман", "Гуляев", "Гумилёв",
+ "Гуревич", "Гурский", "Гурьев", "Гусев", "Гусельников", "Гутенёв", "Гуцко", "Гущин", "Давыдов", "Далин", "Далматов",
+ "Даль", "Данилин", "Данилкин", "Данилов", "Данильчук", "Данихнов", "Даниэль", "Данов", "Даньков", "Дашкевич", "Дашков",
+ "Девяткин", "Дегтев", "Дедов", "Деев", "Дежнев", "Дежнёв", "Дементьев", "Демидов", "Денежкин", "Денисенко", "Денисов",
+ "Денисьев", "Деревенский", "Дзержинский", "Дижур", "Диксон", "Димитриев", "Дмитриев", "Дмитрук", "Добродеев",
+ "Добролюбов", "Доброхотов", "Добычин", "Довлатов", "Додолев", "Долгих", "Долгопят", "Долженко", "Долин", "Долинский",
+ "Долиняк", "Долотин", "Домбровский", "Домников", "Донецкий", "Донцов", "Доримедонтов", "Дормедонтов", "Дормидонтов",
+ "Доронин", "Дорофеев", "Дорошенко", "Достоевский", "Драгунский", "Дракохурст", "Дриянский", "Дроздов", "Дружаев",
+ "Дружинин", "Дружников", "Дубаев", "Дубин", "Дубинин", "Дубинянский", "Дубов", "Дудин", "Дудинцев", "Дышев", "Дьяконов",
+ "Дьячков", "Дёготь", "Дёмушкин", "Евгенов", "Евгеньев", "Евдокимов", "Евлампиев", "Евменов", "Евменьев", "Евплов",
+ "Евсеев", "Евстафьев", "Евстигнеев", "Евстифеев", "Евстратов", "Евсюков", "Евтифеев", "Евтихеев", "Евтушенко", "Егоров",
+ "Егорьев", "Ежов", "Екимов", "Елагин", "Еланцев", "Елеазаров", "Елеферьев", "Елизаров", "Елизарьев", "Елисеев", "Елфимов",
+ "Ельчин", "Ельшин", "Емельянов", "Емец", "Ененко", "Епенетов", "Епимахов", "Епинетов", "Епифанов", "Епифаньев", "Ерастов",
+ "Еремеев", "Ермаков", "Ермилин", "Ермилов", "Ермошин", "Ерофеев", "Ерошкин", "Ершов", "Ерёмин", "Есенин", "Есин", "Есипов",
+ "Естамонов", "Ефимов", "Ефимьев", "Ефремов", "Ефросинов", "Ешкилев", "Жаринов", "Жарковский", "Жбанов", "Жвалевский",
+ "Жвалов", "Жданов", "Жемчужников", "Жеребцов", "Жерихов", "Живаго", "Живетьев", "Жириновский", "Житинский", "Житков",
+ "Жук", "Жуков", "Жуковский", "Жуликов", "Жулин", "Журавлёв", "Журавский", "Заболотских", "Заболоцкий", "Заборов",
+ "Заволокин", "Загорцев", "Задорнов", "Задоров", "Зайончковский", "Зайцев", "Зализняк", "Залотуха", "Залыгин", "Замуткин",
+ "Замыслов", "Замятин", "Заостровцев", "Заплетин", "Зарубин", "Затворник", "Захаров", "Захарьев", "Захарьин", "Збруев",
+ "Зверев", "Звоницкий", "Звягин", "Зеленин", "Земляной", "Земсков", "Зиганшин", "Зикунов", "Зимин", "Зиновьев",
+ "Златовратский", "Златогорский", "Златоустский", "Знаменский", "Золотцев", "Золотько", "Зондберг", "Зонис", "Зорин",
+ "Зорич", "Зосимов", "Зотеев", "Зотов", "Зотьев", "Зощенко", "Зудин", "Зуев", "Зыкин", "Зыков", "Зюганов", "Зюзюкин",
+ "Зябликов", "Ивакин", "Иваницкий", "Иванкин", "Иванов", "Иванченко", "Ивлев", "Ивонин", "Ивонов", "Игнатов", "Игнатьев",
+ "Игнашев", "Игумнов", "Идиатуллин", "Идов", "Иевлев", "Иженяков", "Измайлов", "Изосимов", "Изотов", "Иличевский",
+ "Ильенков", "Ильин", "Ильницкий", "Инин", "Иовлев", "Ионин", "Ионов", "Ипатов", "Ипатьев", "Ипполитов", "Иринеев",
+ "Исаев", "Исаин", "Исаков", "Искандер", "Кабаков", "Кабанов", "Каверин", "Каганов", "Казакевич", "Казаков", "Казанцев",
+ "Казимиров", "Казинцев", "Калашников", "Каледин", "Калинин", "Каминов", "Каминский", "Камша", "Канаев", "Кандауров",
+ "Кандель", "Каневский", "Канович", "Кантор", "Капитонов", "Каплан", "Капнист", "Капустин", "Карабанов", "Карагодин",
+ "Карамзин", "Карасев", "Карасёв", "Караулов", "Каренин", "Карив", "Карионов", "Карлов", "Карпеев", "Карпенков", "Карпов",
+ "Картофельников", "Каруселин", "Касимов", "Кассиль", "Катаев", "Катерли", "Катишонок", "Катков", "Кац", "Кашафутдинов",
+ "Кашин", "Каштанов", "Квартальнов", "Кедрин", "Кенжеев", "Кердан", "Кетро", "Киктенко", "Ким", "Киприанов", "Кириков",
+ "Кирилин", "Кириллов", "Кирилов", "Киркиж", "Киров", "Кирпиченко", "Кирсанов", "Киселёв", "Кисин", "Кислицын", "Китов",
+ "Клеников", "Клеопин", "Клеопов", "Клепиков", "Клепов", "Клех", "Климентов", "Климентьев", "Клюев", "Кнабенгоф", "Князев",
+ "Кобах", "Кобзев", "Кобрин", "Ковалев", "Коваленко", "Коваль", "Ковальджи", "Ковалёв", "Ковшов", "Кожевников", "Козел",
+ "Козлачков", "Козлов", "Козырев", "Козьмин", "Коклюшкин", "Колесников", "Колин", "Колобов", "Колокольцев", "Колпакиди",
+ "Колпаков", "Колядин", "Комаров", "Комиссаров", "Кондратов", "Кондратьев", "Коновалов", "Кононов", "Кононыхин",
+ "Константинов", "Конторович", "Контровский", "Конюков", "Конюшевский", "Коняев", "Копелев", "Копылов", "Корабальников",
+ "Корецкий", "Коржавин", "Коркищенко", "Кормильцев", "Корнилов", "Корнильев", "Коровин", "Королев", "Короленко",
+ "Королюк", "Королёв", "Коростелёв", "Корчагин", "Корявин", "Косник", "Косой", "Костин", "Косьмин", "Котляревский",
+ "Котов", "Котовский", "Кофанов", "Кох", "Кочергин", "Кошелев", "Кошелёв", "Кравченко", "Крамаренко", "Крапивин",
+ "Красильников", "Красник", "Кривомазов", "Кривцов", "Кругосветов", "Круз", "Крупин", "Крупник", "Крупнов", "Крусанов",
+ "Крутихин", "Кручёных", "Крылов", "Крюков", "Крячко", "Куваев", "Кувалдин", "Кудинов", "Кудрявцев", "Кудряшов",
+ "Кузечкин", "Кузиков", "Кузнецов", "Кузьмин", "Кулагин", "Кулаков", "Куликов", "Купреянов", "Куприн", "Купряшин",
+ "Куратов", "Курилов", "Курков", "Курочкин", "Курчаткин", "Кучерский", "Лаврентьев", "Лаврин", "Лавров", "Лагин",
+ "Лагунов", "Лазарев", "Лайдон", "Лактионов", "Ланьков", "Лапин", "Лапицкий", "Лапутин", "Ларионов", "Латынин", "Лахтионов",
+ "Лебедев", "Лебедь", "Леванидов", "Левин", "Левитас", "Левитин", "Левонов", "Левонтьев", "Леонидов", "Леонов",
+ "Леонтьев", "Лепёхин", "Лермонтов", "Лесин", "Лесков", "Ливадный", "Ливанов", "Ливри", "Лигачёв", "Лидский", "Лимонов",
+ "Липатов", "Липкин", "Липовецкий", "Липскеров", "Листьев", "Литаврин", "Литвинов", "Лиханов", "Лихачёв", "Личутин",
+ "Лобанов", "Лобков", "Ловчиков", "Логинов", "Ложкомоев", "Лойко", "Ломакин", "Ломов", "Ломоносов", "Лорченков",
+ "Лоскутов", "Лошкомоев", "Лощиц", "Лугинов", "Лужин", "Лукин", "Лукошин", "Лукьяненко", "Лукьянов", "Лунц", "Луппов",
+ "Луппол", "Лутьянов", "Лыжин", "Лыткин", "Любимов", "Люкин", "Люсин", "Лялин", "Мавров", "Мазин", "Маканин", "Макаревич",
+ "Макаренко", "Макаров", "Макарьев", "Макин", "Максимишин", "Максимов", "Максимушкин", "Малафеев", "Малахеев",
+ "Малахов", "Малецкий", "Маликов", "Малинин", "Малкин", "Малышев", "Маляров", "Мамантов", "Мамедов",
+ "Мамлеев", "Мамонтов", "Мандельштам", "Мануйлов", "Манулкин", "Манылин", "Манылов", "Марамзин", "Маргелов", "Маринин",
+ "Маркелов", "Маркианов", "Марков", "Марковчин", "Мартемьянов", "Мартынов", "Мартытов", "Мартьянов", "Маршак", "Маслов",
+ "Матвеев", "Маханенко", "Махнач", "Машкин", "Маяковский", "Маямсин", "Маятников", "Медведев", "Медков", "Мелитонов", "Мелихов",
+ "Мельников", "Мень", "Мережковский", "Мерецков", "Меркулов", "Меркульев", "Меркуров", "Меркурьев", "Меркушев",
+ "Метлицкий", "Мигулёв", "Микитов", "Микушевич", "Милов", "Минаев", "Минин", "Мирер", "Миронов", "Мирошников", "Мисайлов",
+ "Митрофанов", "Митрофаньев", "Мифтахутдинов", "Михаилов", "Михайлин", "Михайлов", "Михайловский", "Михаленко",
+ "Михальченко", "Михеев", "Мишин", "Мишкин", "Мишнев", "Мишустин", "Могила", "Могутин", "Модестов", "Можаев", "Мозгов",
+ "Мозговой", "Мозжухин", "Моисеев", "Мойсеев", "Молчанов", "Монастырский", "Мордовцев", "Морковин", "Морозов",
+ "Морщаков", "Мосеев", "Москвин", "Моторин", "Мохнаткин", "Муравьёв", "Мурман", "Мурманенко", "Мурманец", "Мурманин",
+ "Мурманов", "Мурмановский", "Мурманский", "Мурманцев", "Мурманчук", "Мурманюк", "Муромский", "Мухин", "Мышкин", "Мягков",
+ "Мясников", "Набоков", "Навальный", "Нагибин", "Нагорный", "Надсон", "Назаров", "Назарьев", "Найман", "Нарбиков",
+ "Нарежный", "Нарицин", "Наседкин", "Насонов", "Наугольный", "Наумов", "Нахапетов", "Невзоров", "Негин", "Незнанский",
+ "Неклюдов", "Некрасов", "Немиров", "Немцов", "Немчинов", "Ненароков", "Несмеянов", "Неспанов", "Нестеров", "Нетребо",
+ "Нетёсов", "Нефедьев", "Нефёдов", "Нехлюдов", "Нехорошев", "Нечаев", "Никандров", "Никаноров", "Никитин", "Никифоров",
+ "Никодимов", "Николаев", "Николаевич", "Николаенко", "Николин", "Никонов", "Никтитин", "Никулин", "Новгородцев",
+ "Новиков", "Новодворский", "Новосельцев", "Новосёлов", "Норов", "Носков", "Носов", "Обросимов", "Обухов", "Овдокимов",
+ "Овечкин", "Овросимов", "Овсеев", "Овчинников", "Огарев", "Оглоблин", "Одинцов", "Одоевский", "Окатов", "Окулов",
+ "Окунев", "Олейников", "Олефир", "Олеша", "Олимпиев", "Олисов", "Олсуфьев", "Олтухов", "Олферьев", "Ольбик", "Омельчук",
+ "Омельянов", "Онисимов", "Опимахов", "Орехов", "Орлов", "Орловский", "Осеев", "Осинский", "Осипов", "Осокин", "Осоргин",
+ "Остальский", "Останин", "Остапов", "Остафьев", "Остратов", "Островский", "Офросимов", "Охотин", "Очин", "Павлинов",
+ "Павлов", "Павловский", "Павлюк", "Палей", "Палицин", "Пальцев", "Памфилов", "Панаев", "Панкеев", "Панкратов",
+ "Панкратьев", "Панов", "Пантелеев", "Панфилов", "Панфильев", "Панюшкин", "Парамонов", "Парменьев", "Пармёнов",
+ "Парфенчиков", "Парфеньев", "Парфёнов", "Паршов", "Парщиков", "Пасечник", "Пастернак", "Пастухов", "Патрикеев",
+ "Паустовский", "Паушкин", "Пафнутьев", "Пафомов", "Пахмутов", "Пахомов", "Пахомьев", "Пашков", "Пашковский", "Певзнер",
+ "Пелевин", "Пепперштейн", "Первушин", "Пересторин", "Пермяков", "Перумов", "Перфильев", "Перфишин", "Перхуров",
+ "Перхурьев", "Перцев", "Песков", "Пестов", "Петелин", "Петкевич", "Петров", "Петрушевский", "Петухов", "Пивоваров",
+ "Пигасов", "Пигасьев", "Пикуль", "Пильняк", "Пименов", "Писарев", "Писемский", "Питиримов", "Пишенко", "Пияшев",
+ "Плавильщиков", "Плакидин", "Платов", "Платонов", "Платухин", "Плотников", "Плющев", "Победоносцев", "Подгородецкий",
+ "Подистов", "Подколзин", "Подушков", "Позамантир", "Позгалёв", "Покровский", "Полевой", "Поливанов", "Полиевктов",
+ "Поликарпов", "Полоков", "Полоцкий", "Полуектов", "Полуехтов", "Полукарпов", "Полуянов", "Полуяхтов", "Поляков",
+ "Поляновский", "Полянский", "Померанцев", "Помяловский", "Пономарев", "Пономарёв", "Поплавский", "Попов", "Попугаев",
+ "Порфирьев", "Потапов", "Потапьев", "Прашкевич", "Привалов", "Пригов", "Пригожин", "Прилепин", "Приставкин", "Пришвин",
+ "Проклов", "Прокопивич", "Прокопов", "Прокопьев", "Прокофьев", "Пророков", "Просвирнин", "Протасов", "Протасьев",
+ "Протоклитов", "Проханов", "Прохоров", "Прошин", "Прудников", "Прутков", "Пудеев", "Пудов", "Пупкин", "Путин", "Пучков",
+ "Пушкин", "Пчёлкин", "Пьецух", "Пьянов", "Работников", "Радзинский", "Радивонов", "Радищев", "Радугин", "Развожаев",
+ "Раков", "Ранцов", "Распутин", "Расторгуев", "Ратников", "Рахматуллин", "Рачков", "Рекемчук", "Ремезов", "Ремизов",
+ "Ремнёв", "Репников", "Ржевский", "Римский", "Робски", "Рогов", "Родивонов", "Родионов", "Родченков", "Рожков",
+ "Розанов", "Ромазанов", "Романов", "Ростов", "Рубанов", "Рубин", "Русаков", "Рыбаков", "Рыжонок", "Рылеев", "Рыльников",
+ "Рысев", "Рябов", "Саблин", "Саватеев", "Саватьев", "Саввович", "Савельев", "Савин", "Савинов", "Савкин", "Савостьянов",
+ "Савченко", "Савёлов", "Садофов", "Садофьев", "Садулаев", "Садур", "Сажин", "Сазонов", "Сакин", "Саломатов", "Сальников",
+ "Самойлов", "Самсонов", "Самылин", "Самылов", "Санаев", "Сапронов", "Сапрыкин", "Сараскин", "Сафонов", "Сафронов",
+ "Сахарнов", "Сахновский", "Сбитнев", "Сбруев", "Светлов", "Свечин", "Свинаренко", "Свиридов", "Свитнев", "Свободных",
+ "Севастьянов", "Севела", "Северьянов", "Северянин", "Сегал", "Сегень", "Сейдов", "Секацкий", "Селезнёв", "Селиверстов",
+ "Селин", "Семенов", "Семёнов", "Сенчин", "Серафимович", "Сергеев", "Серебренников", "Серебрянский", "Серенко", "Серов",
+ "Сид", "Сиднин", "Сидоркин", "Сидоров", "Силин", "Симбирский", "Симеонов", "Симонов", "Синявский", "Синякин", "Ситников",
+ "Скапидаров", "Скатов", "Скворцов", "Скидан", "Скоренко", "Скоробогатов", "Скороходов", "Скульский", "Скуратов",
+ "Славин", "Славников", "Слаповский", "Слепнев", "Слепнёв", "Слепухин", "Слюньков", "Слюсаренко", "Смехов", "Смирнов",
+ "Смоленский", "Смолин", "Смольников", "Смородинский", "Снегирев", "Собакин", "Соболев", "Соболь", "Собчак", "Советов",
+ "Согрин", "Созонов", "Созонтов", "Соков", "Соколов", "Сокуров", "Солженицин", "Солнцев", "Соловьев", "Соловьёв",
+ "Сологуб", "Солодников", "Соломатин", "Солопов", "Сопронов", "Сорбатский", "Сорокин", "Соротокин", "Соснора",
+ "Сотников", "Софонов", "Софронов", "Софроньев", "Сошников", "Спивак", "Спиридонов", "Спиридоньев", "Ставецкий",
+ "Ставрогин", "Стариков", "Старков", "Старобинец", "Стародубцев", "Старостенко", "Старченко", "Стельмах", "Степанов",
+ "Степной", "Стефашин", "Стогниенко", "Стогов", "Стратоников", "Стрелков", "Стругацкие", "Субботин", "Суворов",
+ "Сударушкин", "Сумароков", "Супрунов", "Суров", "Суханов", "Сухилин", "Сухов", "Сысоев", "Сычев", "Сычин", "Сычёв",
+ "Табаков", "Табатчиков", "Таланов", "Таралов", "Тарасов", "Тарасьев", "Тарковский", "Тарн", "Тарусов", "Тархов",
+ "Тасбулатов", "Тендряков", "Терентьев", "Терехов", "Терешков", "Тесаков", "Тетерин", "Тимофеев", "Титов", "Титовых",
+ "Тиханин", "Тихомиров", "Тихон", "Тихонов", "Тованичев", "Токарев", "Токарь", "Толстой", "Толстых", "Топчиев",
+ "Торлопов", "Третьяков", "Трефилов", "Трефильев", "Трифонов", "Тропин", "Трофимов", "Троцкий", "Трудолюбов",
+ "Труфанов", "Тургенев", "Туркул", "Туров", "Туровский", "Тучков", "Тынянов", "Тюльпанов", "Тютчев", "Тёмкин",
+ "Уваров", "Углев", "Удалов", "Удальцов", "Удачин", "Удодов", "Улицкий", "Ульянов", "Упатов", "Успенский", "Устинов",
+ "Устьянов", "Уткин", "Утёсов", "Фавстов", "Фадеев", "Фалалеев", "Фандеев", "Фатеев", "Фатьянов", "Федин", "Федоров",
+ "Федосеев", "Федосов", "Федосьев", "Федотов", "Федотьев", "Федулеев", "Федулин", "Федулов", "Феклисов", "Фенев",
+ "Феоктистов", "Феонин", "Феофанов", "Феофилактов", "Феофилов", "Фетисов", "Фефилов", "Филаретов", "Филатов",
+ "Филатьев", "Филахтов", "Филимонихин", "Филимонов", "Филипов", "Филиппов", "Филиппьев", "Филипьев", "Филков",
+ "Филонов", "Философов", "Фионин", "Фирсов", "Флегонтов", "Флегонтьев", "Фокин", "Фомин", "Фомичёв", "Фонвизин",
+ "Фортунатов", "Фотеев", "Фотиев", "Фотьев", "Фофанов", "Фраерманн", "Фрай", "Фролов", "Фурман", "Фурманов", "Фурсов",
+ "Фурцев", "Фёдоров", "Хадеев", "Хаецкий", "Хазанов", "Хазин", "Харитонов", "Харламов", "Харлампиев", "Хармс", "Хаустов",
+ "Хемлин", "Херасков", "Хлестаков", "Хлопонин", "Хлумов", "Ходасевич", "Хохлов", "Хрисогонов", "Христофоров",
+ "Цветанков", "Цветков", "Цепов", "Цыганов", "Цыпкин", "Чаплин", "Чаплыгин", "Чарский", "Чарушников", "Чванов",
+ "Чебышёв", "Чекмаев", "Черепанов", "Черепенников", "Черкашин", "Чернев", "Чернов", "Черноусов", "Чернышев",
+ "Чернышевский", "Чертанов", "Черчесов", "Чехов", "Чивилихин", "Чиж", "Чижов", "Чиков", "Чипчиков", "Чирков", "Чистов",
+ "Чичваркин", "Чудаков", "Чудинов", "Чуковский", "Чулаки", "Чумаков", "Чуприянов", "Чурилов", "Чуров", "Шабалов",
+ "Шакиров", "Шаламов", "Шаликов", "Шалыганов", "Шамбаров", "Шапошников", "Шарапов", "Шаргунов", "Шаров", "Шатыренок",
+ "Шахмагонов", "Шашков", "Шварц", "Шевкун", "Шевцов", "Шевченко", "Шемякин", "Шепилов", "Шерстобитов", "Шестаков",
+ "Шестинский", "Шестков", "Шеянов", "Шилов", "Ширяев", "Шишкин", "Шишков", "Шмелев", "Шолохов", "Шпанов", "Шубин",
+ "Шукшин", "Шуртаков", "Шутко", "Щеглов", "Щекин", "Щекочихин", "Щелконогов", "Щепа", "Щепило", "Щепкин", "Щербаков",
+ "Щербин", "Щукин", "Эйсмонт", "Эмин", "Эренбург", "Юдин", "Юдов", "Юзефович", "Юппи", "Юровских", "Юрский", "Юхновский",
+ "Яворский", "Ягужинский", "Ядов", "Язов", "Якимов", "Яковлев", "Якушев", "Янин", "Янковский", "Янов", "Ярин", "Ярок",
+ "Яськов", "Яхин",
+}
+
+var russianLastNamesFemale = []string{
+ "Абакумова", "Абдуллаева", "Абрамова", "Абрикосова", "Абросимова", "Абузярова", "Авакумова", "Авдеева", "Авдиева",
+ "Аверкиева", "Аверкова", "Авилина", "Авилова", "Авксентьева", "Аврамова", "Авсеева", "Агапеева", "Агапова", "Агапьева",
+ "Агафонова", "Агеева", "Агутина", "Адрианова", "Ажаева", "Азарова", "Азарьева", "Азарьина", "Азольская", "Айтматова",
+ "Акатова", "Акатьева", "Акбулатова", "Акимова", "Акиндинова", "Акинфиева", "Акинфова", "Аксенова", "Аксентьева",
+ "Аксёнова", "Акулина", "Акулова", "Алданова", "Алейникова", "Александрова", "Алексеева", "Алексина", "Алехина",
+ "Алешковская", "Алимпиева", "Алипова", "Алипьева", "Алисова", "Алпатова", "Алтухова", "Алферьева", "Алфимова",
+ "Алфёрова", "Алябьева", "Амарантова", "Амвросова", "Амвросьева", "Аммосова", "Амосова", "Амфитеатрова", "Ананьева",
+ "Ананьина", "Анастасова", "Анастасьева", "Андреева", "Андрианова", "Андроникова", "Андронова", "Андропова", "Андрусова",
+ "Анемподистова", "Аникеева", "Анисимова", "Анискина", "Анкидинова", "Анкудинова", "Анненкова", "Аннинская", "Антипина",
+ "Антипова", "Антипьева", "Антонова", "Антоньева", "Анурова", "Анурьева", "Анфимова", "Анхимова", "Анцыферова", "Анчарова",
+ "Анюкова", "Апарина", "Арабова", "Арановская", "Арбатова", "Арбузова", "Ардалионова", "Аренская", "Арепьева", "Арефина",
+ "Арефова", "Арефьева", "Аристархова", "Аристова", "Аркадова", "Аркадьева", "Аркадьина", "Арсенова", "Арсеньева",
+ "Артамонова", "Артемьева", "Артёмова", "Архангельская", "Архипова", "Архипьева", "Арцыбашева", "Арцыбушева", "Асафова",
+ "Асафьева", "Асеева", "Астапова", "Астафьева", "Астахова", "Асташина", "Аствацатурова", "Атаманова", "Афанасова",
+ "Афанасьева", "Афремова", "Африканова", "Африкантова", "Афросимова", "Ахадова", "Ахмедова", "Бабаевская", "Бабикова",
+ "Бабурова", "Бавильская", "Багирова", "Багринцева", "Багрянцева", "Бажова", "Байбородина", "Бакланова", "Бакунина",
+ "Балдина", "Балкова", "Банникова", "Банщикова", "Баранова", "Бартенева", "Басинская", "Баскакова", "Басманова",
+ "Басырова", "Белезянская", "Белинская", "Белова", "Белозерова", "Белозёрова", "Белокурова", "Беломлинская",
+ "Белорукова", "Белоусова", "Беляева", "Белякова", "Белянкина", "Бенедиктова", "Березина", "Березовская", "Берестова",
+ "Берсенева", "Берёзина", "Беседина", "Беспалова", "Беспутина", "Бестужева", "Марлинская", "Бирюкова", "Битова", "Блинова",
+ "Блохина", "Бобкова", "Боборыкина", "Боброва", "Богданова", "Боголюбская", "Богомолова", "Богомякова", "Богословская",
+ "Богоявленская", "Богуславская", "Бодрова", "Бодылева", "Болотова", "Болтышева", "Болучевская", "Большакова",
+ "Бондарева", "Борисова", "Боровая", "Бородина", "Бортникова", "Борцова", "Босова", "Боченкова", "Бочкова", "Бояндина",
+ "Боярская", "Бояшова", "Брагина", "Брежнева", "Брешковская", "Бровцева", "Бродская", "Брюсова", "Бузина", "Булатова",
+ "Булгакова", "Булганина", "Булгарина", "Булочникова", "Булычева", "Бунина", "Буркатовская", "Бурмистрова", "Бурова",
+ "Буровская", "Бутина", "Бутова", "Буторина", "Бушина", "Быкова", "Бычкова", "Вавилина", "Вавилова", "Вакулина",
+ "Вакулова", "Валентинова", "Валетова", "Варламова", "Варнавина", "Варшавская", "Васечкина", "Василева", "Василова",
+ "Васильева", "Васькина", "Вахтина", "Веденская", "Веневитинова", "Венедиктова", "Вепрева", "Верзилова", "Веркина",
+ "Верникова", "Вершинина", "Веселова", "Ветрова", "Викентьева", "Викторова", "Виноградова", "Винтилова", "Вирхова",
+ "Витковская", "Витушева", "Витязева", "Вихрова", "Вишневская", "Вишнякова", "Владимирова", "Владимирская", "Владимова",
+ "Власова", "Власьева", "Внифатьева", "Водденикова", "Водолазкина", "Войнова", "Волкова", "Володарская", "Володихина",
+ "Волочкова", "Вонифатова", "Вонифатьева", "Воробьева", "Воронова", "Воронцова", "Воротникова", "Воскобойникова",
+ "Вострякова", "Вотрина", "Всеволожская", "Вяземская", "Габышева", "Гаврилина", "Гаврилова", "Гагарина", "Газданова",
+ "Галактионова", "Галкина", "Галковская", "Галктионова", "Гальцова", "Гандлевская", "Ганиева", "Ганичева", "Гарасимова",
+ "Гатапова", "Гедеонова", "Геласимова", "Геннадиева", "Геогиевская", "Герасимова", "Гераскина", "Германова",
+ "Гермогенова", "Гершанова", "Гиваргизова", "Гиляровская", "Гладилина", "Гладкова", "Гладышева", "Глуховская",
+ "Гляделкина", "Гнилорыбова", "Голикова", "Голофтеева", "Голубева", "Голунова", "Гомзикова", "Гончарова", "Горбунова",
+ "Гордеева", "Горелова", "Горланова", "Горлова", "Горчева", "Горшкова", "Гостева", "Гранина", "Графинина", "Гребенщикова",
+ "Грибанова", "Григорова", "Григорьева", "Грина", "Гришина", "Громова", "Грунина", "Грязева", "Гуляева", "Гурская",
+ "Гурьева", "Гусева", "Гусельникова", "Гущина", "Давыдова", "Далина", "Далматова", "Данилина", "Данилкина", "Данилова",
+ "Данихнова", "Данова", "Данькова", "Дашкова", "Девяткина", "Дегтева", "Дедова", "Деева", "Дежнева", "Дементьева",
+ "Демидова", "Денежкина", "Денисова", "Денисьева", "Деревенская", "Дзержинская", "Димитриева", "Дмитриева", "Добродеева",
+ "Добролюбова", "Доброхотова", "Добычина", "Довлатова", "Додолева", "Долина", "Долинская", "Долотина", "Домбровская",
+ "Домникова", "Донцова", "Доримедонтова", "Дормедонтова", "Дормидонтова", "Доронина", "Дорофеева", "Достоевская",
+ "Драгунская", "Дриянская", "Дроздова", "Дружаева", "Дружинина", "Дружникова", "Дубаева", "Дубина", "Дубинина",
+ "Дубинянская", "Дубова", "Дудина", "Дудинцева", "Дышева", "Дьяконова", "Дьячкова", "Дёмушкина", "Евгенова", "Евгеньева",
+ "Евдокимова", "Евлампиева", "Евменова", "Евменьева", "Евплова", "Евсеева", "Евстафьева", "Евстигнеева", "Евстифеева",
+ "Евстратова", "Евсюкова", "Евтифеева", "Евтихеева", "Егорова", "Егорьева", "Ежова", "Екимова", "Елагина", "Еланцева",
+ "Елеазарова", "Елеферьева", "Елизарова", "Елизарьева", "Елисеева", "Елфимова", "Ельчина", "Ельшина", "Емельянова",
+ "Епенетова", "Епимахова", "Епинетова", "Епифанова", "Епифаньева", "Ерастова", "Еремеева", "Ермакова", "Ермилина",
+ "Ермилова", "Ермошина", "Ерофеева", "Ерошкина", "Ершова", "Ерёмина", "Есенина", "Есина", "Есипова", "Естамонова",
+ "Ефимова", "Ефимьева", "Ефремова", "Ефросинова", "Ешкилева", "Жаринова", "Жарковская", "Жбанова", "Жвалевская",
+ "Жвалова", "Жданова", "Жемчужникова", "Жеребцова", "Жерихова", "Живетьева", "Жириновская", "Житинская", "Житкова",
+ "Жукова", "Жуковская", "Жуликова", "Жулина", "Журавская", "Заборова", "Заволокина", "Загорцева", "Задорнова", "Задорова",
+ "Зайончковская", "Зайцева", "Залыгина", "Замуткина", "Замыслова", "Замятина", "Заостровцева", "Заплетина", "Зарубина",
+ "Захарова", "Захарьева", "Захарьина", "Збруева", "Зверева", "Звягина", "Зеленина", "Земляная", "Земскова", "Зиганшина",
+ "Зикунова", "Зимина", "Зиновьева", "Златовратская", "Златогорская", "Златоустская", "Знаменская", "Золотцева",
+ "Зорина", "Зосимова", "Зотеева", "Зотова", "Зотьева", "Зудина", "Зуева", "Зыкина", "Зыкова", "Зюганова", "Зюзюкина",
+ "Зябликова", "Ивакина", "Иванкина", "Иванова", "Ивлева", "Ивонина", "Ивонова", "Игнатова", "Игнатьева", "Игнашева",
+ "Игумнова", "Идиатуллина", "Идова", "Иевлева", "Иженякова", "Измайлова", "Изосимова", "Изотова", "Иличевская",
+ "Ильенкова", "Ильина", "Инина", "Иовлева", "Ионина", "Ионова", "Ипатова", "Ипатьева", "Ипполитова", "Иринеева",
+ "Исаева", "Исаина", "Исакова", "Кабакова", "Кабанова", "Каверина", "Каганова", "Казакова", "Казанцева", "Казимирова",
+ "Казинцева", "Калашникова", "Каледина", "Калинина", "Каминова", "Каминская", "Канаева", "Кандаурова", "Каневская",
+ "Капитонова", "Капустина", "Карабанова", "Карагодина", "Карамзина", "Карасева", "Караулова", "Каренина", "Карионова",
+ "Карлова", "Карпеева", "Карпенкова", "Карпова", "Картофельникова", "Каруселина", "Касимова", "Катаева", "Каткова",
+ "Кашафутдинова", "Кашина", "Каштанова", "Квартальнова", "Кедрина", "Кенжеева", "Киприанова", "Кирикова", "Кирилина",
+ "Кириллова", "Кирилова", "Кирова", "Кирсанова", "Кисина", "Китова", "Кленикова", "Клеопина", "Клеопова", "Клепикова",
+ "Клепова", "Климентова", "Климентьева", "Клюева", "Князева", "Кобзева", "Кобрина", "Ковалева", "Ковшова", "Кожевникова",
+ "Козлачкова", "Козлова", "Козырева", "Козьмина", "Коклюшкина", "Колесникова", "Колина", "Колобова", "Колокольцева",
+ "Колпакова", "Колядина", "Комарова", "Комиссарова", "Кондратова", "Кондратьева", "Коновалова", "Кононова", "Кононыхина",
+ "Константинова", "Контровская", "Конюкова", "Конюшевская", "Коняева", "Копелева", "Копылова", "Корабальникова",
+ "Коржавина", "Кормильцева", "Корнилова", "Корнильева", "Коровина", "Королева", "Корчагина", "Корявина", "Косая",
+ "Костина", "Косьмина", "Котляревская", "Котова", "Котовская", "Кофанова", "Кочергина", "Кошелева", "Крапивина",
+ "Красильникова", "Кривомазова", "Кривцова", "Кругосветова", "Крупина", "Крупнова", "Крусанова", "Крутихина", "Крылова",
+ "Крюкова", "Куваева", "Кувалдина", "Кудинова", "Кудрявцева", "Кудряшова", "Кузечкина", "Кузикова", "Кузнецова",
+ "Кузьмина", "Кулагина", "Кулакова", "Куликова", "Купреянова", "Куприна", "Купряшина", "Куратова", "Курилова", "Куркова",
+ "Курочкина", "Курчаткина", "Кучерская", "Лаврентьева", "Лаврина", "Лаврова", "Лагина", "Лагунова", "Лазарева",
+ "Лактионова", "Ланькова", "Лапина", "Лапутина", "Ларионова", "Латынина", "Лахтионова", "Лебедева", "Леванидова",
+ "Левина", "Левитина", "Левонова", "Левонтьева", "Леонидова", "Леонова", "Леонтьева", "Лепёхина", "Лермонтова",
+ "Лесина", "Лескова", "Ливанова", "Лидская", "Лимонова", "Липатова", "Липкина", "Липскерова", "Листьева", "Литаврина",
+ "Литвинова", "Лиханова", "Личутина", "Лобанова", "Лобкова", "Ловчикова", "Логинова", "Ложкомоева", "Ломакина", "Ломова",
+ "Ломоносова", "Лорченкова", "Лоскутова", "Лошкомоева", "Лугинова", "Лужина", "Лукина", "Лукошина", "Лукьянова",
+ "Луппова", "Лутьянова", "Лыжина", "Лыткина", "Любимова", "Люкина", "Люсина", "Лялина", "Маврова", "Мазина", "Маканина",
+ "Макарова", "Макарьева", "Макина", "Максимишина", "Максимова", "Максимушкина", "Малафеева", "Малахеева", "Малахова",
+ "Маликова", "Малинина", "Малкина", "Малышева", "Малярова", "Мамантова", "Мамедова", "Мамлеева", "Мамонтова", "Мануйлова",
+ "Манулкина", "Манылина", "Манылова", "Марамзина", "Маргелова", "Маринина", "Маркелова", "Маркианова", "Маркова",
+ "Марковчина", "Мартемьянова", "Мартынова", "Мартытова", "Мартьянова", "Маслова", "Матвеева", "Машкина", "Маяковская",
+ "Маятникова", "Медведева", "Медкова", "Мелитонова", "Мелихова", "Мельникова", "Мережковская", "Мерецкова", "Меркулова",
+ "Меркульева", "Меркурова", "Меркурьева", "Меркушева", "Микитова", "Милова", "Минаева", "Минина", "Миронова",
+ "Мирошникова", "Мисайлова", "Митрофанова", "Митрофаньева", "Мифтахутдинова", "Михаилова", "Михайлина", "Михайлова",
+ "Михайловская", "Михеева", "Мишина", "Мишкина", "Мишнева", "Мишустина", "Могутина", "Модестова", "Можаева", "Мозгова",
+ "Мозговая", "Мозжухина", "Моисеева", "Мойсеева", "Молчанова", "Монастырская", "Мордовцева", "Морковина", "Морозова",
+ "Морщакова", "Мосеева", "Москвина", "Моторина", "Мохнаткина", "Мурманина", "Мурманова", "Мурмановская", "Мурманская",
+ "Мурманцева", "Муромская", "Мухина", "Мышкина", "Мягкова", "Мясникова", "Набокова", "Нагибина", "Назарова", "Назарьева",
+ "Нарбикова", "Нарицина", "Наседкина", "Насонова", "Наумова", "Нахапетова", "Невзорова", "Негина", "Незнанская",
+ "Неклюдова", "Некрасова", "Немирова", "Немцова", "Немчинова", "Ненарокова", "Несмеянова", "Неспанова", "Нестерова",
+ "Нетёсова", "Нефедьева", "Нефёдова", "Нехлюдова", "Нехорошева", "Нечаева", "Никандрова", "Никанорова", "Никитина",
+ "Никифорова", "Никодимова", "Николаева", "Николина", "Никонова", "Никтитина", "Никулина", "Новгородцева", "Новикова",
+ "Новодворская", "Новосельцева", "Новосёлова", "Норова", "Носкова", "Носова", "Обросимова", "Обухова", "Овдокимова",
+ "Овечкина", "Овросимова", "Овсеева", "Овчинникова", "Огарева", "Оглоблина", "Одинцова", "Одоевская", "Окатова",
+ "Окулова", "Окунева", "Олейникова", "Олимпиева", "Олисова", "Олсуфьева", "Олтухова", "Олферьева", "Омельянова",
+ "Онисимова", "Опимахова", "Орехова", "Орлова", "Орловская", "Осеева", "Осинская", "Осипова", "Осокина", "Осоргина",
+ "Остальская", "Останина", "Остапова", "Остафьева", "Остратова", "Островская", "Офросимова", "Охотина", "Очина",
+ "Павлинова", "Павлова", "Павловская", "Палицина", "Пальцева", "Памфилова", "Панаева", "Панкеева", "Панкратова",
+ "Панкратьева", "Панова", "Пантелеева", "Панфилова", "Панфильева", "Панюшкина", "Парамонова", "Парменьева", "Пармёнова",
+ "Парфенчикова", "Парфеньева", "Парфёнова", "Паршова", "Парщикова", "Пастухова", "Патрикеева", "Паустовская",
+ "Паушкина", "Пафнутьева", "Пафомова", "Пахмутова", "Пахомова", "Пахомьева", "Пашкова", "Пашковская", "Пелевина",
+ "Первушина", "Пересторина", "Пермякова", "Перумова", "Перфильева", "Перфишина", "Перхурова", "Перхурьева", "Перцева",
+ "Пескова", "Пестова", "Петелина", "Петрова", "Петрушевская", "Петухова", "Пивоварова", "Пигасова", "Пигасьева",
+ "Пименова", "Писарева", "Писемская", "Питиримова", "Пияшева", "Плавильщикова", "Плакидина", "Платова", "Платонова",
+ "Платухина", "Плотникова", "Плющева", "Победоносцева", "Подистова", "Подколзина", "Подушкова", "Покровская", "Полевая",
+ "Поливанова", "Полиевктова", "Поликарпова", "Полокова", "Полуектова", "Полуехтова", "Полукарпова", "Полуянова",
+ "Полуяхтова", "Полякова", "Поляновская", "Полянская", "Померанцева", "Помяловская", "Пономарева", "Поплавская",
+ "Попова", "Попугаева", "Порфирьева", "Потапова", "Потапьева", "Привалова", "Пригова", "Пригожина", "Прилепина",
+ "Приставкина", "Пришвина", "Проклова", "Прокопова", "Прокопьева", "Прокофьева", "Пророкова", "Просвирнина", "Протасова",
+ "Протасьева", "Протоклитова", "Проханова", "Прохорова", "Прошина", "Прудникова", "Пруткова", "Пудеева", "Пудова",
+ "Пупкина", "Путина", "Пучкова", "Пушкина", "Пчёлкина", "Пьянова", "Работникова", "Радзинская", "Радивонова", "Радищева",
+ "Радугина", "Развожаева", "Ракова", "Ранцова", "Распутина", "Расторгуева", "Ратникова", "Рахматуллина", "Рачкова",
+ "Ремезова", "Ремизова", "Репникова", "Ржевская", "Римская", "Рогова", "Родивонова", "Родионова", "Родченкова",
+ "Рожкова", "Розанова", "Ромазанова", "Романова", "Ростова", "Рубанова", "Рубина", "Русакова", "Рыбакова", "Рылеева",
+ "Рыльникова", "Рысева", "Рябова", "Саблина", "Саватеева", "Саватьева", "Савельева", "Савина", "Савинова", "Савкина",
+ "Савостьянова", "Савёлова", "Садофова", "Садофьева", "Садулаева", "Сажина", "Сазонова", "Сакина", "Саломатова",
+ "Сальникова", "Самойлова", "Самсонова", "Самылина", "Самылова", "Санаева", "Сапронова", "Сапрыкина", "Сараскина",
+ "Сафонова", "Сафронова", "Сахарнова", "Сахновская", "Сбитнева", "Сбруева", "Светлова", "Свечина", "Свиридова", "Свитнева",
+ "Севастьянова", "Северьянова", "Северянина", "Сейдова", "Селиверстова", "Селина", "Семенова", "Семёнова", "Сенчина",
+ "Сергеева", "Серебренникова", "Серебрянская", "Серова", "Сиднина", "Сидоркина", "Сидорова", "Силина", "Симбирская",
+ "Симеонова", "Симонова", "Синявская", "Синякина", "Ситникова", "Скапидарова", "Скатова", "Скворцова", "Скоробогатова",
+ "Скороходова", "Скульская", "Скуратова", "Славина", "Славникова", "Слаповская", "Слепнева", "Слепухина", "Слюнькова",
+ "Смехова", "Смирнова", "Смоленская", "Смолина", "Смольникова", "Смородинская", "Снегирева", "Собакина", "Соболева",
+ "Советова", "Согрина", "Созонова", "Созонтова", "Сокова", "Соколова", "Сокурова", "Солженицина", "Солнцева",
+ "Соловьева", "Солодникова", "Соломатина", "Солопова", "Сопронова", "Сорбатская", "Сорокина", "Соротокина",
+ "Сотникова", "Софонова", "Софронова", "Софроньева", "Сошникова", "Спиридонова", "Спиридоньева", "Ставрогина",
+ "Старикова", "Старкова", "Стародубцева", "Степанова", "Степная", "Стефашина", "Стогова", "Стратоникова", "Стрелкова",
+ "Субботина", "Суворова", "Сударушкина", "Сумарокова", "Супрунова", "Сурова", "Суханова", "Сухилина", "Сухова",
+ "Сысоева", "Сычева", "Сычина", "Табакова", "Табатчикова", "Таланова", "Таралова", "Тарасова", "Тарасьева",
+ "Тарковская", "Тарусова", "Тархова", "Тасбулатова", "Тендрякова", "Терентьева", "Терехова", "Терешкова", "Тесакова",
+ "Тетерина", "Тимофеева", "Титова", "Тиханина", "Тихомирова", "Тихонова", "Тованичева", "Токарева", "Толстая",
+ "Топчиева", "Торлопова", "Третьякова", "Трефилова", "Трефильева", "Трифонова", "Тропина", "Трофимова", "Трудолюбова",
+ "Труфанова", "Тургенева", "Турова", "Туровская", "Тучкова", "Тынянова", "Тюльпанова", "Тютчева", "Тёмкина", "Уварова",
+ "Углева", "Удалова", "Удальцова", "Удачина", "Удодова", "Ульянова", "Упатова", "Успенская", "Устинова", "Устьянова",
+ "Уткина", "Утёсова", "Фавстова", "Фадеева", "Фалалеева", "Фандеева", "Фатеева", "Фатьянова", "Федина", "Федорова",
+ "Федосеева", "Федосова", "Федосьева", "Федотова", "Федотьева", "Федулеева", "Федулина", "Федулова", "Феклисова",
+ "Фенева", "Феоктистова", "Феонина", "Феофанова", "Феофилактова", "Феофилова", "Фетисова", "Фефилова", "Филаретова",
+ "Филатова", "Филатьева", "Филахтова", "Филимонихина", "Филимонова", "Филипова", "Филиппова", "Филиппьева", "Филипьева",
+ "Филкова", "Филонова", "Философова", "Фионина", "Фирсова", "Флегонтова", "Флегонтьева", "Фокина", "Фомина", "Фонвизина",
+ "Фортунатова", "Фотеева", "Фотиева", "Фотьева", "Фофанова", "Фролова", "Фурманова", "Фурсова", "Фурцева", "Фёдорова",
+ "Хадеева", "Хазанова", "Хазина", "Харитонова", "Харламова", "Харлампиева", "Хаустова", "Хемлина", "Хераскова",
+ "Хлестакова", "Хлопонина", "Хлумова", "Хохлова", "Хрисогонова", "Христофорова", "Цветанкова", "Цветкова", "Цепова",
+ "Цыганова", "Цыпкина", "Чаплина", "Чаплыгина", "Чарская", "Чарушникова", "Чванова", "Чекмаева", "Черепанова",
+ "Черепенникова", "Черкашина", "Чернева", "Чернова", "Черноусова", "Чернышева", "Чернышевская", "Чертанова",
+ "Черчесова", "Чехова", "Чивилихина", "Чижова", "Чикова", "Чипчикова", "Чиркова", "Чистова", "Чичваркина", "Чудакова",
+ "Чудинова", "Чуковская", "Чумакова", "Чуприянова", "Чурилова", "Чурова", "Шабалова", "Шакирова", "Шаламова", "Шаликова",
+ "Шалыганова", "Шамбарова", "Шапошникова", "Шарапова", "Шаргунова", "Шарова", "Шахмагонова", "Шашкова", "Шевцова",
+ "Шемякина", "Шепилова", "Шерстобитова", "Шестакова", "Шестинская", "Шесткова", "Шеянова", "Шилова", "Ширяева", "Шишкина",
+ "Шишкова", "Шмелева", "Шолохова", "Шпанова", "Шубина", "Шукшина", "Шуртакова", "Щеглова", "Щекина", "Щекочихина",
+ "Щелконогова", "Щепкина", "Щербакова", "Щербина", "Щукина", "Эмина", "Юдина", "Юдова", "Юрская", "Юхновская", "Яворская",
+ "Ягужинская", "Ядова", "Язова", "Якимова", "Яковлева", "Якушева", "Янина", "Янковская", "Янова", "Ярина",
+ "Яськова", "Яхина",
+}
+
+// GetPerson returns a new Dowser interface of Person struct
+func GetPerson() Dowser {
+ person := &Person{}
+ return person
+}
+
+// Person struct
+type Person struct {
+}
+
+func (p Person) titlemale() string {
+ return randomElementFromSliceString(titlesMale)
+}
+
+// TitleMale generates random titles for males
+func (p Person) TitleMale(v reflect.Value) (interface{}, error) {
+ return p.titlemale(), nil
+}
+
+// TitleMale get a title male randomly in string ("Mr.", "Dr.", "Prof.", "Lord", "King", "Prince")
+func TitleMale(opts ...options.OptionFunc) string {
+ return singleFakeData(TitleMaleTag, func() interface{} {
+ p := Person{}
+ return p.titlemale()
+ }, opts...).(string)
+}
+
+func (p Person) titleFemale() string {
+ return randomElementFromSliceString(titlesFemale)
+}
+
+// TitleFeMale generates random titles for females
+func (p Person) TitleFeMale(v reflect.Value) (interface{}, error) {
+ return p.titleFemale(), nil
+}
+
+// TitleFemale get a title female randomly in string ("Mrs.", "Ms.", "Miss", "Dr.", "Prof.", "Lady", "Queen", "Princess")
+func TitleFemale(opts ...options.OptionFunc) string {
+ return singleFakeData(TitleFemaleTag, func() interface{} {
+ p := Person{}
+ return p.titleFemale()
+ }, opts...).(string)
+}
+
+func (p Person) firstname() string {
+ return randomElementFromSliceString(firstNames)
+}
+
+// FirstName returns first names
+func (p Person) FirstName(v reflect.Value) (interface{}, error) {
+ return p.firstname(), nil
+}
+
+// FirstName get fake firstname
+func FirstName(opts ...options.OptionFunc) string {
+ return singleFakeData(FirstNameTag, func() interface{} {
+ p := Person{}
+ return p.firstname()
+ }, opts...).(string)
+}
+
+func (p Person) firstnamemale() string {
+ return randomElementFromSliceString(firstNamesMale)
+}
+
+// FirstNameMale returns first names for males
+func (p Person) FirstNameMale(v reflect.Value) (interface{}, error) {
+ return p.firstnamemale(), nil
+}
+
+// FirstNameMale get fake firstname for male
+func FirstNameMale(opts ...options.OptionFunc) string {
+ return singleFakeData(FirstNameMaleTag, func() interface{} {
+ p := Person{}
+ return p.firstnamemale()
+ }, opts...).(string)
+}
+
+func (p Person) firstnamefemale() string {
+ return randomElementFromSliceString(firstNamesFemale)
+}
+
+// FirstNameFemale returns first names for females
+func (p Person) FirstNameFemale(v reflect.Value) (interface{}, error) {
+ return p.firstnamefemale(), nil
+}
+
+// FirstNameFemale get fake firstname for female
+func FirstNameFemale(opts ...options.OptionFunc) string {
+ return singleFakeData(FirstNameFemaleTag, func() interface{} {
+ p := Person{}
+ return p.firstnamefemale()
+ }, opts...).(string)
+}
+
+func (p Person) lastname() string {
+ return randomElementFromSliceString(lastNames)
+}
+
+// LastName returns last name
+func (p Person) LastName(v reflect.Value) (interface{}, error) {
+ return p.lastname(), nil
+}
+
+// LastName get fake lastname
+func LastName(opts ...options.OptionFunc) string {
+ return singleFakeData(LastNameTag, func() interface{} {
+ p := Person{}
+ return p.lastname()
+ }, opts...).(string)
+}
+
+func (p Person) name() string {
+ if randNameFlag > 50 {
+ return fmt.Sprintf("%s %s %s", randomElementFromSliceString(titlesFemale), randomElementFromSliceString(firstNamesFemale), randomElementFromSliceString(lastNames))
+ }
+ return fmt.Sprintf("%s %s %s", randomElementFromSliceString(titlesMale), randomElementFromSliceString(firstNamesMale), randomElementFromSliceString(lastNames))
+}
+
+// Name returns a random name
+func (p Person) Name(v reflect.Value) (interface{}, error) {
+ return p.name(), nil
+}
+
+// Name get fake name
+func Name(opts ...options.OptionFunc) string {
+ return singleFakeData(NAME, func() interface{} {
+ p := Person{}
+ return p.name()
+ }, opts...).(string)
+}
+
+// Gender returns a random gender
+func (p Person) Gender(v reflect.Value) (interface{}, error) {
+ return p.gender(), nil
+}
+
+func (p Person) gender() string {
+ return randomElementFromSliceString(genders)
+}
+
+// Gender get fake gender
+func Gender(opts ...options.OptionFunc) string {
+ return singleFakeData(GENDER, func() interface{} {
+ p := Person{}
+ return p.gender()
+ }, opts...).(string)
+}
+
+// ChineseFirstName returns a random chinese first name
+func (p Person) ChineseFirstName(v reflect.Value) (interface{}, error) {
+ return p.chineseFirstName(), nil
+}
+
+func (p Person) chineseFirstName() string {
+ return randomElementFromSliceString(chineseFirstNames)
+}
+
+// ChineseFirstName get chinese first name
+func ChineseFirstName(opts ...options.OptionFunc) string {
+ return singleFakeData(ChineseFirstNameTag, func() interface{} {
+ p := Person{}
+ return p.chineseFirstName()
+ }, opts...).(string)
+}
+
+// ChineseLastName returns a random chinese last name
+func (p Person) ChineseLastName(v reflect.Value) (interface{}, error) {
+ return p.chineseLastName(), nil
+}
+
+func (p Person) chineseLastName() string {
+ return randomElementFromSliceString(chineseLastNames)
+}
+
+// ChineseLastName get chinese lsst name
+func ChineseLastName(opts ...options.OptionFunc) string {
+ return singleFakeData(ChineseLastNameTag, func() interface{} {
+ p := Person{}
+ return p.chineseLastName()
+ }, opts...).(string)
+}
+
+// ChineseName returns a random nhinese name
+func (p Person) ChineseName(v reflect.Value) (interface{}, error) {
+ return p.chineseName(), nil
+}
+
+func (p Person) chineseName() string {
+ return fmt.Sprintf("%s%s", randomElementFromSliceString(chineseFirstNames), randomElementFromSliceString(chineseLastNames))
+}
+
+// ChineseName get chinese lsst name
+func ChineseName(opts ...options.OptionFunc) string {
+ return singleFakeData(ChineseNameTag, func() interface{} {
+ p := Person{}
+ return p.chineseName()
+ }, opts...).(string)
+}
+
+func (p Person) russianFirstNameMale() string {
+ return randomElementFromSliceString(russianFirstNamesMale)
+}
+
+func (p Person) russianLastNameMale() string {
+ return randomElementFromSliceString(russianLastNamesMale)
+}
+
+func (p Person) russianFirstNameFemale() string {
+ return randomElementFromSliceString(russianFirstNamesFemale)
+}
+
+func (p Person) russianLastNameFemale() string {
+ return randomElementFromSliceString(russianLastNamesFemale)
+}
+
+// RussianFirstNameMale returns russian male firstname
+func (p Person) RussianFirstNameMale(v reflect.Value) (interface{}, error) {
+ return p.russianFirstNameMale(), nil
+}
+
+// RussianFirstNameFemale returns russian female firstname
+func (p Person) RussianFirstNameFemale(v reflect.Value) (interface{}, error) {
+ return p.russianFirstNameFemale(), nil
+}
+
+// RussianLastNameMale returns russian male lastname
+func (p Person) RussianLastNameMale(v reflect.Value) (interface{}, error) {
+ return p.russianLastNameMale(), nil
+}
+
+// RussianLastNameFemale returns russian female lastname
+func (p Person) RussianLastNameFemale(v reflect.Value) (interface{}, error) {
+ return p.russianLastNameFemale(), nil
+}
diff --git a/vendor/github.com/go-faker/faker/v4/phone.go b/vendor/github.com/go-faker/faker/v4/phone.go
new file mode 100644
index 0000000..1dddf77
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/phone.go
@@ -0,0 +1,97 @@
+package faker
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+ "github.com/go-faker/faker/v4/pkg/slice"
+)
+
+// GetPhoner serves as a constructor for Phoner interface
+func GetPhoner() Phoner {
+ phone := &Phone{}
+ return phone
+}
+
+// Phoner serves overall tele-phonic contact generator
+type Phoner interface {
+ PhoneNumber(v reflect.Value) (interface{}, error)
+ TollFreePhoneNumber(v reflect.Value) (interface{}, error)
+ E164PhoneNumber(v reflect.Value) (interface{}, error)
+}
+
+// Phone struct
+type Phone struct {
+}
+
+func (p Phone) phonenumber() string {
+ randInt, _ := RandomInt(1, 10)
+ str := strings.Join(slice.IntToString(randInt), "")
+ return fmt.Sprintf("%s-%s-%s", str[:3], str[3:6], str[6:10])
+}
+
+// PhoneNumber generates phone numbers of type: "201-886-0269"
+func (p Phone) PhoneNumber(v reflect.Value) (interface{}, error) {
+ return p.phonenumber(), nil
+}
+
+// Phonenumber get fake phone number
+func Phonenumber(opts ...options.OptionFunc) string {
+ return singleFakeData(PhoneNumber, func() interface{} {
+ p := Phone{}
+ return p.phonenumber()
+ }, opts...).(string)
+}
+
+func (p Phone) tollfreephonenumber() string {
+ out := ""
+ boxDigitsStart := []string{"777", "888"}
+
+ ints, _ := RandomInt(1, 9)
+ for index, v := range slice.IntToString(ints) {
+ if index == 3 {
+ out += "-"
+ }
+ out += v
+ }
+ return fmt.Sprintf("(%s) %s", boxDigitsStart[rand.Intn(len(boxDigitsStart))], out)
+}
+
+// TollFreePhoneNumber generates phone numbers of type: "(888) 937-7238"
+func (p Phone) TollFreePhoneNumber(v reflect.Value) (interface{}, error) {
+ return p.tollfreephonenumber(), nil
+}
+
+// TollFreePhoneNumber get fake TollFreePhoneNumber
+func TollFreePhoneNumber(opts ...options.OptionFunc) string {
+ return singleFakeData(TollFreeNumber, func() interface{} {
+ p := Phone{}
+ return p.tollfreephonenumber()
+ }, opts...).(string)
+}
+
+func (p Phone) e164PhoneNumber() string {
+ out := ""
+ boxDigitsStart := []string{"7", "8"}
+ ints, _ := RandomInt(1, 10)
+
+ for _, v := range slice.IntToString(ints) {
+ out += v
+ }
+ return fmt.Sprintf("+%s%s", boxDigitsStart[rand.Intn(len(boxDigitsStart))], strings.Join(slice.IntToString(ints), ""))
+}
+
+// E164PhoneNumber generates phone numbers of type: "+27113456789"
+func (p Phone) E164PhoneNumber(v reflect.Value) (interface{}, error) {
+ return p.e164PhoneNumber(), nil
+}
+
+// E164PhoneNumber get fake E164PhoneNumber
+func E164PhoneNumber(opts ...options.OptionFunc) string {
+ return singleFakeData(E164PhoneNumberTag, func() interface{} {
+ p := Phone{}
+ return p.e164PhoneNumber()
+ }, opts...).(string)
+}
diff --git a/vendor/github.com/go-faker/faker/v4/pkg/errors/generic.go b/vendor/github.com/go-faker/faker/v4/pkg/errors/generic.go
new file mode 100644
index 0000000..c6cb0cd
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/pkg/errors/generic.go
@@ -0,0 +1,36 @@
+package errors
+
+// Generic Error Messages for tags
+//
+// ErrUnsupportedKindPtr: Error when get fake from ptr
+// ErrUnsupportedKind: Error on passing unsupported kind
+// ErrValueNotPtr: Error when value is not pointer
+// ErrTagNotSupported: Error when tag is not supported
+// ErrTagAlreadyExists: Error when tag exists and call AddProvider
+// ErrTagDoesNotExist: Error when tag does not exist and call RemoveProvider
+// ErrMoreArguments: Error on passing more arguments
+// ErrNotSupportedPointer: Error when passing unsupported pointer
+var (
+ ErrUnsupportedKindPtr = "Unsupported kind: %s Change Without using * (pointer) in Field of %s"
+ ErrUnsupportedKind = "Unsupported kind: %s"
+ ErrValueNotPtr = "Not a pointer value"
+ ErrTagNotSupported = "Tag unsupported: %s"
+ ErrTagAlreadyExists = "Tag exists"
+ ErrTagDoesNotExist = "Tag does not exist"
+ ErrFieldTagIdentifierInvalid = "Field tag identifier invalid"
+ ErrMoreArguments = "Passed more arguments than is possible : (%d)"
+ ErrNotSupportedPointer = "Use sample:=new(%s)\n faker.FakeData(sample) instead"
+ ErrSmallerThanZero = "Size:%d is smaller than zero."
+ ErrSmallerThanOne = "Size:%d is smaller than one."
+ ErrUniqueFailure = "Failed to generate a unique value for field \"%s\""
+
+ ErrStartValueBiggerThanEnd = "Start value can not be bigger than end value."
+ ErrWrongFormattedTag = "Tag \"%s\" is not written properly"
+ ErrUnknownType = "Unknown Type"
+ ErrNotSupportedTypeForTag = "Type is not supported by tag."
+ ErrUnsupportedTagArguments = "Tag arguments are not compatible with field type."
+ ErrDuplicateSeparator = "Duplicate separator for tag arguments."
+ ErrNotEnoughTagArguments = "Not enough arguments for tag."
+ ErrUnsupportedNumberType = "Unsupported Number type."
+ ErrOnlyStructTypeSupported = "only struct type supported."
+)
diff --git a/vendor/github.com/go-faker/faker/v4/pkg/interfaces/language.go b/vendor/github.com/go-faker/faker/v4/pkg/interfaces/language.go
new file mode 100644
index 0000000..dff1859
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/pkg/interfaces/language.go
@@ -0,0 +1,24 @@
+package interfaces
+
+// LangRuneBoundary is for language boundary
+type LangRuneBoundary struct {
+ Start rune
+ End rune
+ Exclude []rune
+}
+
+// Language rune boundaries here
+var (
+ // LangENG is for english language
+ LangENG = LangRuneBoundary{65, 122, []rune{91, 92, 93, 94, 95, 96}}
+ // LangCHI is for chinese language
+ LangCHI = LangRuneBoundary{19968, 40869, nil}
+ // LangRUS is for russian language
+ LangRUS = LangRuneBoundary{1025, 1105, nil}
+ // LangJPN is for japanese Hiragana Katakana language
+ LangJPN = LangRuneBoundary{12353, 12534, []rune{12436, 12437, 12438, 12439, 12440, 12441, 12442, 12443, 12444, 12445, 12446, 12447, 12448}}
+ // LangKOR is for korean Hangul language
+ LangKOR = LangRuneBoundary{44032, 55203, nil}
+ // EmotEMJ is for emoticons
+ EmotEMJ = LangRuneBoundary{126976, 129535, nil}
+)
diff --git a/vendor/github.com/go-faker/faker/v4/pkg/interfaces/number.go b/vendor/github.com/go-faker/faker/v4/pkg/interfaces/number.go
new file mode 100644
index 0000000..59dddfb
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/pkg/interfaces/number.go
@@ -0,0 +1,18 @@
+package interfaces
+
+// RandomIntegerBoundary is the struct for random integer boundaries
+type RandomIntegerBoundary struct {
+ Start int
+ End int
+}
+
+// RandomFloatBoundary is the struct for random float boundaries
+type RandomFloatBoundary struct {
+ Start float64
+ End float64
+}
+
+var (
+ DefaultIntBoundary = RandomIntegerBoundary{Start: 0, End: 100}
+ DefaultFloatBoundary = RandomFloatBoundary{Start: 0, End: 100}
+)
diff --git a/vendor/github.com/go-faker/faker/v4/pkg/interfaces/type.go b/vendor/github.com/go-faker/faker/v4/pkg/interfaces/type.go
new file mode 100644
index 0000000..5742ed0
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/pkg/interfaces/type.go
@@ -0,0 +1,10 @@
+package interfaces
+
+import "reflect"
+
+// CustomProviderFunction used as the standard layout function for custom providers
+type CustomProviderFunction func() (interface{}, error)
+
+// TaggedFunction used as the standard layout function for tag providers in struct.
+// This type also can be used for custom provider.
+type TaggedFunction func(v reflect.Value) (interface{}, error)
diff --git a/vendor/github.com/go-faker/faker/v4/pkg/options/options.go b/vendor/github.com/go-faker/faker/v4/pkg/options/options.go
new file mode 100644
index 0000000..3348b3e
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/pkg/options/options.go
@@ -0,0 +1,346 @@
+package options
+
+import (
+ "errors"
+ "fmt"
+ "math/rand"
+ "reflect"
+ "sync/atomic"
+ "time"
+ "unsafe"
+
+ fakerErrors "github.com/go-faker/faker/v4/pkg/errors"
+ "github.com/go-faker/faker/v4/pkg/interfaces"
+)
+
+var (
+ // global settings, read/write must be concurrent safe
+ generateUniqueValues atomic.Value
+ ignoreInterface atomic.Value
+ randomStringLen int32 = 25
+ lang unsafe.Pointer
+ randomMaxSize int32 = 100
+ randomMinSize int32
+ iBoundary unsafe.Pointer
+)
+
+func init() {
+ generateUniqueValues.Store(false)
+ ignoreInterface.Store(false)
+ lang = unsafe.Pointer(&interfaces.LangENG)
+ iBoundary = unsafe.Pointer(&interfaces.DefaultIntBoundary)
+}
+
+// Options represent all available option for faker.
+type Options struct {
+ // IgnoreFields used for ignoring a field when generating the fake data
+ IgnoreFields map[string]struct{}
+ // FieldProviders used for storing the custom provider function
+ FieldProviders map[string]interfaces.CustomProviderFunction
+ // StructTypeProviders used for storing the struct type of custom provider function
+ StructTypeProviders map[reflect.Type]interfaces.CustomProviderFunction
+ // MaxDepthOption used for configuring the max depth of nested identical structs for faker
+ MaxDepthOption *MaxDepthOption
+ // MaxFieldDepthOption used for configuring the max depth of fields that are filled for a struct
+ MaxFieldDepthOption int
+ // IgnoreInterface used for ignoring any interface field
+ IgnoreInterface bool
+ // StringLanguage used for setting the language for any string in faker
+ StringLanguage *interfaces.LangRuneBoundary
+ // GenerateUniqueValues to ensure the generated data is unique
+ GenerateUniqueValues bool
+ // RandomStringLength to ensure the generated string is expected as we want
+ RandomStringLength int
+ // RandomMaxSliceSize used for setting the maximum of slice size, or map size that will be generated
+ RandomMaxSliceSize int
+ // RandomMinSliceSize used for setting the minimum of slize, array, map size that will be generated
+ RandomMinSliceSize int
+ // MaxGenerateStringRetries set how much tries for generating random string
+ MaxGenerateStringRetries int
+ // SetSliceMapNilIfLenZero allows to set nil for the slice and maps, if size is 0.
+ SetSliceMapNilIfLenZero bool
+ // SetSliceMapRandomToZero sets random integer generation to zero for slice and maps
+ SetSliceMapRandomToZero bool
+ // RandomIntegerBoundary sets boundary random integer value generation. Boundaries can not exceed integer(4 byte...)
+ RandomIntegerBoundary *interfaces.RandomIntegerBoundary
+ // RandomFloatBoundary sets the boundary for random float value generation. Boundaries should comply with float values constraints (IEEE 754)
+ RandomFloatBoundary *interfaces.RandomFloatBoundary
+ // SetTagName sets the tag name that should be used
+ TagName string
+ // CustomDomain is used for specifying a custom domain when generating email
+ CustomDomain *string
+}
+
+// MaxDepthOption used for configuring the max depth of nested struct for faker
+type MaxDepthOption struct {
+ typeSeen map[reflect.Type]int
+ recursionMaxDepth int
+}
+
+func (o *MaxDepthOption) RememberType(t reflect.Type) {
+ o.typeSeen[t]++
+}
+
+func (o *MaxDepthOption) ForgetType(t reflect.Type) {
+ o.typeSeen[t]--
+}
+
+func (o *MaxDepthOption) RecursionOutOfLimit(t reflect.Type) bool {
+ return o.typeSeen[t] > o.recursionMaxDepth
+}
+
+// BuildOptions build all option functions into one option
+func BuildOptions(optFuncs []OptionFunc) *Options {
+ ops := DefaultOption()
+
+ for _, optFunc := range optFuncs {
+ optFunc(ops)
+ }
+
+ return ops
+}
+
+// DefaultOption build the default option
+func DefaultOption() *Options {
+ ops := &Options{}
+ ops.StructTypeProviders = make(map[reflect.Type]interfaces.CustomProviderFunction)
+ ops.StructTypeProviders[reflect.TypeOf(time.Time{})] = func() (interface{}, error) {
+ return time.Now().Add(time.Duration(rand.Int63())), nil
+ }
+ ops.MaxDepthOption = &MaxDepthOption{
+ typeSeen: make(map[reflect.Type]int, 1),
+ recursionMaxDepth: 1,
+ }
+ ops.MaxFieldDepthOption = -1
+ ops.GenerateUniqueValues = generateUniqueValues.Load().(bool)
+ ops.IgnoreInterface = ignoreInterface.Load().(bool)
+ ops.StringLanguage = (*interfaces.LangRuneBoundary)(atomic.LoadPointer(&lang))
+ ops.RandomStringLength = int(atomic.LoadInt32(&randomStringLen))
+ ops.RandomMaxSliceSize = int(atomic.LoadInt32(&randomMaxSize))
+ ops.RandomMinSliceSize = int(atomic.LoadInt32(&randomMinSize))
+ ops.MaxGenerateStringRetries = 1000000 //default
+ ops.RandomIntegerBoundary = (*interfaces.RandomIntegerBoundary)(atomic.LoadPointer(&iBoundary))
+ ops.RandomFloatBoundary = &interfaces.DefaultFloatBoundary
+ ops.TagName = "faker"
+ return ops
+}
+
+// OptionFunc define the options contract
+type OptionFunc func(oo *Options)
+
+// WithFieldsToIgnore used for ignoring a field when generating the fake data
+func WithFieldsToIgnore(fieldNames ...string) OptionFunc {
+ return func(oo *Options) {
+ if oo.IgnoreFields == nil {
+ oo.IgnoreFields = make(map[string]struct{}, len(fieldNames))
+ }
+ for _, f := range fieldNames {
+ oo.IgnoreFields[f] = struct{}{}
+ }
+ }
+}
+
+// WithCustomDomain is used to set a custom domain for generating fake email
+func WithCustomDomain(domain string) OptionFunc {
+ return func(oo *Options) {
+ oo.CustomDomain = &domain
+ }
+}
+
+// WithCustomFieldProvider used for storing the custom provider function
+func WithCustomFieldProvider(fieldName string, provider interfaces.CustomProviderFunction) OptionFunc {
+ return func(oo *Options) {
+ if oo.FieldProviders == nil {
+ oo.FieldProviders = make(map[string]interfaces.CustomProviderFunction, 1)
+ }
+ oo.FieldProviders[fieldName] = provider
+ }
+}
+
+// WithRecursionMaxDepth used for configuring the max depth of recursion struct for faker
+func WithRecursionMaxDepth(depth uint) OptionFunc {
+ return func(oo *Options) {
+ if oo.MaxDepthOption == nil {
+ oo.MaxDepthOption = &MaxDepthOption{
+ recursionMaxDepth: 1, // default
+ typeSeen: make(map[reflect.Type]int, 1),
+ }
+ }
+ oo.MaxDepthOption.recursionMaxDepth = int(depth)
+ }
+}
+
+// WithMaxFieldDepthOption used for configuring the max depth of fields that are filled for a struct
+func WithMaxFieldDepthOption(depth int) OptionFunc {
+ return func(oo *Options) {
+ oo.MaxFieldDepthOption = depth
+ }
+}
+
+// WithStructTypeProviders used for configuring the custom provider of struct type
+func WithStructTypeProviders(t interface{}, provider interfaces.CustomProviderFunction) OptionFunc {
+ if reflect.TypeOf(t).Kind() != reflect.Struct {
+ panic(fakerErrors.ErrOnlyStructTypeSupported)
+ }
+ return func(oo *Options) {
+ oo.StructTypeProviders[reflect.TypeOf(t)] = provider
+ }
+}
+
+// WithIgnoreInterface allows to set a flag to ignore found interface{}s.
+func WithIgnoreInterface(value bool) OptionFunc {
+ return func(oo *Options) {
+ oo.IgnoreInterface = value
+ }
+}
+
+// WithStringLanguage sets language of random string generation (LangENG, LangCHI, LangRUS, LangJPN, LangKOR, EmotEMJ)
+func WithStringLanguage(l interfaces.LangRuneBoundary) OptionFunc {
+ return func(oo *Options) {
+ oo.StringLanguage = &l
+ }
+}
+
+// WithGenerateUniqueValues allows to set the single fake data generator functions to generate unique data.
+func WithGenerateUniqueValues(unique bool) OptionFunc {
+ return func(oo *Options) {
+ oo.GenerateUniqueValues = unique
+ }
+}
+
+// WithRandomStringLength sets a length for random string generation
+func WithRandomStringLength(size uint) OptionFunc {
+ return func(oo *Options) {
+ oo.RandomStringLength = int(size)
+ }
+}
+
+// WithRandomMapAndSliceMaxSize sets the max size for maps and slices for random generation.
+func WithRandomMapAndSliceMaxSize(size uint) OptionFunc {
+ if size < 1 {
+ err := fmt.Errorf(fakerErrors.ErrSmallerThanOne, size)
+ panic(err)
+ }
+ return func(oo *Options) {
+ oo.RandomMaxSliceSize = int(size)
+ }
+}
+
+// WithRandomMapAndSliceMinSize sets the min size for maps and slices for random generation.
+func WithRandomMapAndSliceMinSize(size uint) OptionFunc {
+ return func(oo *Options) {
+ oo.RandomMinSliceSize = int(size)
+ }
+}
+
+// WithMaxGenerateStringRetries set how much tries for generating random string
+func WithMaxGenerateStringRetries(retries uint) OptionFunc {
+ return func(oo *Options) {
+ oo.MaxGenerateStringRetries = int(retries)
+ }
+}
+
+// WithNilIfLenIsZero allows to set nil for the slice and maps, if size is 0.
+func WithNilIfLenIsZero(setNil bool) OptionFunc {
+ return func(oo *Options) {
+ oo.SetSliceMapNilIfLenZero = setNil
+ }
+}
+
+// WithSliceMapRandomToZero Sets random integer generation to zero for slice and maps
+func WithSliceMapRandomToZero(setNumberToZero bool) OptionFunc {
+ return func(oo *Options) {
+ oo.SetSliceMapRandomToZero = setNumberToZero
+ }
+}
+
+// WithRandomIntegerBoundaries sets boundary random integer value generation. Boundaries can not exceed integer(4 byte...)
+func WithRandomIntegerBoundaries(boundary interfaces.RandomIntegerBoundary) OptionFunc {
+ if boundary.Start > boundary.End {
+ err := errors.New(fakerErrors.ErrStartValueBiggerThanEnd)
+ panic(err)
+ }
+ return func(oo *Options) {
+ oo.RandomIntegerBoundary = &boundary
+ }
+}
+
+// WithRandomFloatBoundaries sets the boundary for random float value generation. Boundaries should comply with float values constraints (IEEE 754)
+func WithRandomFloatBoundaries(boundary interfaces.RandomFloatBoundary) OptionFunc {
+ if boundary.Start > boundary.End {
+ err := errors.New(fakerErrors.ErrStartValueBiggerThanEnd)
+ panic(err)
+ }
+ return func(oo *Options) {
+ oo.RandomFloatBoundary = &boundary
+ }
+}
+
+// WithTagName sets the tag name to use. Default tag name is 'faker'.
+func WithTagName(tagName string) OptionFunc {
+ if tagName == "" {
+ err := errors.New(fakerErrors.ErrFieldTagIdentifierInvalid)
+ panic(err)
+ }
+ return func(oo *Options) {
+ oo.TagName = tagName
+ }
+}
+
+// SetGenerateUniqueValues allows to set the single fake data generator functions to generate unique data.
+func SetGenerateUniqueValues(unique bool) {
+ generateUniqueValues.Store(unique)
+}
+
+// SetIgnoreInterface allows to set a flag to ignore found interface{}s.
+func SetIgnoreInterface(ignore bool) {
+ ignoreInterface.Store(ignore)
+}
+
+// SetRandomStringLength sets a length for random string generation
+func SetRandomStringLength(size int) error {
+ if size < 0 {
+ return fmt.Errorf(fakerErrors.ErrSmallerThanZero, size)
+ }
+ atomic.StoreInt32(&randomStringLen, int32(size))
+ return nil
+}
+
+// SetStringLang sets language of random string generation (LangENG, LangCHI, LangRUS, LangJPN, LangKOR, EmotEMJ)
+func SetStringLang(l interfaces.LangRuneBoundary) {
+ atomic.StorePointer(&lang, unsafe.Pointer(&l))
+}
+
+// SetRandomMapAndSliceSize sets the size for maps and slices for random generation.
+// deprecates, currently left for old version usage
+func SetRandomMapAndSliceSize(size int) error {
+ return SetRandomMapAndSliceMaxSize(size)
+}
+
+// SetRandomMapAndSliceMaxSize sets the max size for maps and slices for random generation.
+func SetRandomMapAndSliceMaxSize(size int) error {
+ if size < 1 {
+ return fmt.Errorf(fakerErrors.ErrSmallerThanOne, size)
+ }
+ atomic.StoreInt32(&randomMaxSize, int32(size))
+ return nil
+}
+
+// SetRandomMapAndSliceMinSize sets the min size for maps and slices for random generation.
+func SetRandomMapAndSliceMinSize(size int) error {
+ if size < 0 {
+ return fmt.Errorf(fakerErrors.ErrSmallerThanZero, size)
+ }
+ atomic.StoreInt32(&randomMinSize, int32(size))
+ return nil
+}
+
+// SetRandomNumberBoundaries sets boundary for random number generation
+func SetRandomNumberBoundaries(start, end int) error {
+ if start > end {
+ return errors.New(fakerErrors.ErrStartValueBiggerThanEnd)
+ }
+ ptr := &interfaces.RandomIntegerBoundary{Start: start, End: end}
+ atomic.StorePointer(&iBoundary, unsafe.Pointer(ptr))
+ return nil
+}
diff --git a/vendor/github.com/go-faker/faker/v4/pkg/slice/helpers.go b/vendor/github.com/go-faker/faker/v4/pkg/slice/helpers.go
new file mode 100644
index 0000000..c85c74b
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/pkg/slice/helpers.go
@@ -0,0 +1,41 @@
+package slice
+
+import (
+ "strconv"
+)
+
+// Contains Check item in slice string type
+func Contains(slice []string, item string) bool {
+ for _, s := range slice {
+ if s == item {
+ return true
+ }
+ }
+ return false
+}
+
+// ContainsRune Check item in map rune type
+func ContainsRune(set map[rune]struct{}, item rune) bool {
+ _, ok := set[item]
+ return ok
+}
+
+// ContainsValue check if value exists in slice, no matter its type
+func ContainsValue(slice []interface{}, value interface{}) bool {
+ for _, v := range slice {
+ if v == value {
+ return true
+ }
+ }
+ return false
+}
+
+// IntToString Convert slice int to slice string
+func IntToString(intSl []int) (str []string) {
+ for i := range intSl {
+ number := intSl[i]
+ text := strconv.Itoa(number)
+ str = append(str, text)
+ }
+ return str
+}
diff --git a/vendor/github.com/go-faker/faker/v4/price.go b/vendor/github.com/go-faker/faker/v4/price.go
new file mode 100644
index 0000000..756d67a
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/price.go
@@ -0,0 +1,107 @@
+package faker
+
+import (
+ "fmt"
+ "math"
+ "reflect"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+// Currency Codes | Source: https://en.wikipedia.org/wiki/ISO_4217
+var currencies = []string{
+ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG",
+ "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND",
+ "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD",
+ "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU",
+ "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", "HRK", "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", "MXV", "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", "SSP", "STN", "SVC",
+ "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD",
+ "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW",
+ "UZS", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA",
+ "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT",
+ "XSU", "XTS", "XUA", "XXX", "YER", "ZAR", "ZMW", "ZWL",
+}
+
+// Money provides an interface to generate a custom price with or without a random currency code
+type Money interface {
+ Currency(v reflect.Value) (interface{}, error)
+ Amount(v reflect.Value) (interface{}, error)
+ AmountWithCurrency(v reflect.Value) (interface{}, error)
+}
+
+// Price struct
+type Price struct {
+}
+
+// GetPrice returns a new Money interface of Price struct
+func GetPrice() Money {
+ return &Price{}
+}
+
+func (p Price) currency() string {
+ return randomElementFromSliceString(currencies)
+}
+
+// Currency returns a random currency from currencies
+func (p Price) Currency(v reflect.Value) (interface{}, error) {
+ return p.currency(), nil
+}
+
+// Currency get fake Currency (IDR, USD)
+func Currency(opts ...options.OptionFunc) string {
+ return singleFakeData(CurrencyTag, func() interface{} {
+ p := Price{}
+ return p.currency()
+ }, opts...).(string)
+}
+
+func (p Price) amount() float64 {
+ return precision(rand.Float64()*math.Pow10(rand.Intn(8)), rand.Intn(2)+1)
+}
+
+// Amount returns a random floating price amount
+// with a random precision of [1,2] up to (10**8 - 1)
+func (p Price) Amount(v reflect.Value) (interface{}, error) {
+ kind := v.Kind()
+ val := p.amount()
+ if kind == reflect.Float32 {
+ v.Set(reflect.ValueOf(float32(val)))
+ return float32(val), nil
+ }
+ v.Set(reflect.ValueOf(val))
+ return val, nil
+}
+
+func (p Price) amountwithcurrency() string {
+ val := p.amount()
+ return fmt.Sprintf("%s %f", p.currency(), val)
+}
+
+// AmountWithCurrency combines both price and currency together
+func (p Price) AmountWithCurrency(v reflect.Value) (interface{}, error) {
+ return p.amountwithcurrency(), nil
+}
+
+// AmountWithCurrency get fake AmountWithCurrency USD 49257.100
+func AmountWithCurrency(opts ...options.OptionFunc) string {
+ return singleFakeData(AmountWithCurrencyTag, func() interface{} {
+ p := Price{}
+ return p.amountwithcurrency()
+ }, opts...).(string)
+}
+
+// precision | a helper function to set precision of price
+func precision(val float64, pre int) float64 {
+ div := math.Pow10(pre)
+ return float64(int64(val*div)) / div
+}
diff --git a/vendor/github.com/go-faker/faker/v4/random_source.go b/vendor/github.com/go-faker/faker/v4/random_source.go
new file mode 100644
index 0000000..96b7a15
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/random_source.go
@@ -0,0 +1,49 @@
+package faker
+
+import (
+ "io"
+ mathrand "math/rand"
+ "sync"
+)
+
+var (
+ rand *mathrand.Rand
+ crypto io.Reader
+)
+
+type safeSource struct {
+ mx sync.Mutex
+ mathrand.Source
+}
+
+func (s *safeSource) Int63() int64 {
+ s.mx.Lock()
+ defer s.mx.Unlock()
+
+ return s.Source.Int63()
+}
+
+// NewSafeSource wraps an unsafe rand.Source with a mutex to guard the random source
+// against concurrent access.
+func NewSafeSource(in mathrand.Source) mathrand.Source {
+ return &safeSource{
+ Source: in,
+ }
+}
+
+// SetRandomSource sets a new random source at the package level.
+//
+// To use a concurrent-safe source, you may wrap it with NewSafeSource,
+// e.g. SetRandomSource(NewSafeSource(mysource)).
+//
+// The default is the global, concurrent-safe source provided by math/rand.
+func SetRandomSource(in mathrand.Source) {
+ rand = mathrand.New(in)
+}
+
+// SetCryptoSource sets a new reader for functions using a cryptographically-safe random generator (e.g. UUID).
+//
+// The default is the global source provided by crypto/rand.
+func SetCryptoSource(in io.Reader) {
+ crypto = in
+}
diff --git a/vendor/github.com/go-faker/faker/v4/tag_argument_extractor.go b/vendor/github.com/go-faker/faker/v4/tag_argument_extractor.go
new file mode 100644
index 0000000..ae087c9
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/tag_argument_extractor.go
@@ -0,0 +1,189 @@
+package faker
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+
+ fakerErrors "github.com/go-faker/faker/v4/pkg/errors"
+)
+
+func extractFloat64FromTagArgs(args []string) (interface{}, error) {
+ bytes := 64
+ var floatValues []float64
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseFloat(k, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, j)
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractFloat32FromTagArgs(args []string) (interface{}, error) {
+ bytes := 32
+ var floatValues []float32
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseFloat(k, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, float32(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractInt64FromTagArgs(args []string) (interface{}, error) {
+ bytes := 64
+ var floatValues []int64
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseInt(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, j)
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractInt32FromTagArgs(args []string) (interface{}, error) {
+ bytes := 32
+ var floatValues []int32
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseInt(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, int32(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractInt16FromTagArgs(args []string) (interface{}, error) {
+ bytes := 16
+ var floatValues []int16
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseInt(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, int16(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractInt8FromTagArgs(args []string) (interface{}, error) {
+ bytes := 8
+ var floatValues []int8
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseInt(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, int8(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractIntFromTagArgs(args []string) (interface{}, error) {
+ bytes := 0
+ var floatValues []int
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseInt(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, int(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractUint64FromTagArgs(args []string) (interface{}, error) {
+ bytes := 64
+ var floatValues []uint64
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseUint(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, j)
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractUint32FromTagArgs(args []string) (interface{}, error) {
+ bytes := 32
+ var floatValues []uint32
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseUint(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, uint32(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractUint16FromTagArgs(args []string) (interface{}, error) {
+ bytes := 16
+ var floatValues []uint16
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseUint(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, uint16(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractUint8FromTagArgs(args []string) (interface{}, error) {
+ bytes := 8
+ var floatValues []uint8
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseUint(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, uint8(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
+
+func extractUintFromTagArgs(args []string) (interface{}, error) {
+ bytes := 0
+ var floatValues []uint
+ for _, i := range args {
+ k := strings.TrimSpace(i)
+ j, err := strconv.ParseUint(k, 10, bytes)
+ if err != nil {
+ return nil, fmt.Errorf("%s", fakerErrors.ErrUnsupportedTagArguments)
+ }
+ floatValues = append(floatValues, uint(j))
+ }
+ toRet := floatValues[rand.Intn(len(floatValues))]
+ return toRet, nil
+}
diff --git a/vendor/github.com/go-faker/faker/v4/user_agent.go b/vendor/github.com/go-faker/faker/v4/user_agent.go
new file mode 100644
index 0000000..6ba6cc9
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/user_agent.go
@@ -0,0 +1,192 @@
+package faker
+
+import (
+ "fmt"
+ "reflect"
+ "time"
+
+ "github.com/go-faker/faker/v4/pkg/interfaces"
+)
+
+var (
+ browserTypes = []string{"chrome", "firefox", "internetExplorer", "msedge", "opera", "safari"}
+ windowsPlatformTokens = []string{"Windows NT 6.2", "Windows NT 6.1", "Windows NT 6.0", "Windows NT 5.2",
+ "Windows NT 5.1", "Windows NT 5.01", "Windows NT 5.0", "Windows NT 4.0", "Windows 98; Win 9x 4.90",
+ "Windows 98", "Windows 95", "Windows CE",
+ }
+ linuxProcessor = []string{"i686", "x86_64"}
+ macProcessor = []string{"Intel", "PPC", "U; Intel", "U; PPC"}
+ // langCodes contains language codes extracted from https://gist.github.com/JamieMason/3748498.
+ langCodes = []string{"af-ZA", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY",
+ "ar-MA", "ar-OM", "ar-QA", "ar-SA", "ar-SY", "ar-TN", "ar-YE", "be-BY", "bg-BG", "ca-ES", "cs-CZ", "cy-GB",
+ "da-DK", "de-AT", "de-DE", "de-CH", "de-LI", "de-LU", "dv-MV", "el-GR", "en-AU", "en-BZ", "en-CA", "en-GB",
+ "en-IE", "en-JM", "en-NZ", "en-PH", "en-TT", "en-US", "en-ZA", "en-ZW", "es-AR", "es-BO", "es-CL", "es-CO",
+ "es-CR", "es-DO", "es-EC", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY",
+ "es-SV", "es-UY", "es-VE", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fo-FO", "fr-BE", "fr-CA", "fr-FR", "fr-CH",
+ "fr-LU", "fr-MC", "gl-ES", "gu-IN", "he-IL", "hi-IN", "hr-BA", "hr-HR", "hu-HU", "hy-AM", "id-ID", "is-IS",
+ "it-CH", "it-IT", "ja-JP", "ka-GE", "kk-KZ", "kn-IN", "ko-KR", "ky-KG", "lt-LT", "lv-LV", "mi-NZ", "mk-MK",
+ "mn-MN", "mr-IN", "ms-BN", "ms-MY", "mt-MT", "nb-NO", "nl-BE", "nl-NL", "nn-NO", "ns-ZA", "pa-IN", "pl-PL",
+ "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sa-IN", "se-FI", "se-NO", "se-SE", "sk-SK", "sl-SI", "sq-AL", "sv-FI",
+ "sv-SE", "sw-KE", "ta-IN", "te-IN", "th-TH", "tn-ZA", "tr-TR", "tt-RU", "uk-UA", "ur-PK", "vi-VN", "xh-ZA",
+ "zh-CN", "zh-HK", "zh-MO", "zh-SG", "zh-TW", "zu-ZA",
+ }
+)
+
+func GetUserAgent() UserAgenter {
+ ua := &UserAgent{}
+ return ua
+}
+
+type UserAgenter interface {
+ UserAgent(v reflect.Value) (interface{}, error)
+}
+
+// UserAgent implements logic loosely based on https://fakerphp.org/formatters/user-agent/.
+type UserAgent struct{}
+
+func (ua UserAgent) UserAgent(reflect.Value) (interface{}, error) {
+ browserType := randomElementFromSliceString(browserTypes)
+ switch browserType {
+ case "chrome":
+ return ua.chrome(), nil
+ case "firefox":
+ return ua.firefox(), nil
+ case "internetExplorer":
+ return ua.internetExplorer(), nil
+ case "msedge":
+ return ua.msEdge(), nil
+ case "opera":
+ return ua.opera(), nil
+ case "safari":
+ return ua.safari(), nil
+ }
+ return nil, fmt.Errorf(`unknown browser type: "%s"`, browserType)
+}
+
+// chrome generates a user agent string that resembles Google Chrome.
+// Example: "Mozilla/5.0 (X11; Linux i686) AppleWebKit/532.2 (KHTML, like Gecko) Chrome/69.0.3460.334 Safari/532.2"
+func (ua UserAgent) chrome() string {
+ chromeVer := fmt.Sprintf("%d.0.%d.%d",
+ ua.intBetween(36, 127), ua.intBetween(0, 6000), ua.intBetween(0, 400),
+ )
+ platformToken := randomElementFromSliceString([]string{
+ ua.linuxPlatformToken(),
+ ua.macPlatformToken("_"),
+ ua.windowsPlatformToken(),
+ })
+ safariType := randomElementFromSliceString([]string{"Safari", "Mobile Safari"})
+ webKitVer := ua.webKitVersion(false)
+ return fmt.Sprintf("Mozilla/5.0 (%s) AppleWebKit/%s (KHTML, like Gecko) Chrome/%s %s/%s",
+ platformToken, webKitVer, chromeVer, safariType, webKitVer,
+ )
+}
+
+// firefox generates a user agent string that resembles Firefox.
+// Example: "Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20130219 Firefox/58.0"
+func (ua UserAgent) firefox() string {
+ firefoxVer := fmt.Sprintf("%d.0", ua.intBetween(35, 129))
+ platformToken := randomElementFromSliceString([]string{
+ ua.linuxPlatformToken(),
+ ua.macPlatformToken("."),
+ ua.windowsPlatformToken(),
+ })
+ return fmt.Sprintf("Mozilla/5.0 (%s; rv:%s) Gecko/%s Firefox/%s",
+ platformToken, firefoxVer, ua.geckoVersion(), firefoxVer,
+ )
+}
+
+// internetExplorer generates a user agent string that resembles Internet Explorer
+// Example: "Mozilla/5.0 (compatible; MSIE 9.0; Windows 98; Win 9x 4.90; Trident/5.0)"
+func (ua UserAgent) internetExplorer() string {
+ return fmt.Sprintf("Mozilla/5.0 (compatible; MSIE %d.0; %s; Trident/%d.0)",
+ ua.intBetween(5, 11), ua.windowsPlatformToken(), ua.intBetween(3, 7),
+ )
+}
+
+// msEdge generates a user agent string that resembles MS Edge
+// Example: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/533.0 (KHTML, like Gecko) Chrome/86.0.4685.32 Safari/533.0 Edg/86.0.4685.32"
+func (ua UserAgent) msEdge() string {
+ webKitVer := ua.webKitVersion(false)
+ chromiumVer := fmt.Sprintf("%d.0.%d.%d", ua.intBetween(79, 99), ua.intBetween(4000, 4844), ua.intBetween(10, 99))
+ platformToken := randomElementFromSliceString([]string{
+ ua.linuxPlatformToken(),
+ ua.windowsPlatformToken(),
+ ua.macPlatformToken("_"),
+ })
+ return fmt.Sprintf("Mozilla/5.0 (%s) AppleWebKit/%s (KHTML, like Gecko) Chrome/%s Safari/%s Edg/%s",
+ platformToken, webKitVer, chromiumVer, webKitVer, chromiumVer,
+ )
+}
+
+// opera generates a user agent string that resembles Opera.
+// Example: "Opera/8.40 (X11; Linux i686; zh-TW) Presto/2.12.181 Version/10.57"
+func (ua UserAgent) opera() string {
+ platformToken := randomElementFromSliceString([]string{
+ ua.linuxPlatformToken(),
+ ua.windowsPlatformToken(),
+ })
+ operaVer := fmt.Sprintf("%d.%d", ua.intBetween(8, 9), ua.intBetween(10, 99))
+ prestoVer := fmt.Sprintf("2.%d.%d", ua.intBetween(8, 12), ua.intBetween(160, 355))
+ ver := fmt.Sprintf("%d.%d", ua.intBetween(10, 12), ua.intBetween(0, 70))
+ return fmt.Sprintf("Opera/%s (%s; %s) Presto/%s Version/%s",
+ operaVer, platformToken, randomElementFromSliceString(langCodes), prestoVer, ver,
+ )
+}
+
+// safari generates a user agent string that resembles Safari.
+// Example: "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7_3; bg-BG) AppleWebKit/548.43.16 (KHTML, like Gecko) Version/7.5 Safari/548.43.16"
+func (ua UserAgent) safari() string {
+ webKitVer := ua.webKitVersion(true)
+ safariVer := fmt.Sprintf("%d.%d", ua.intBetween(4, 17), ua.intBetween(0, 5))
+ if ua.intBetween(0, 100) < 50 {
+ safariVer = fmt.Sprintf("%s.%d", safariVer, ua.intBetween(1, 20))
+ }
+ platform := randomElementFromSliceString([]string{
+ fmt.Sprintf("Windows; U; %s; %s", ua.windowsPlatformToken(), randomElementFromSliceString(langCodes)),
+ fmt.Sprintf("%s; %s", ua.macPlatformToken("_"), randomElementFromSliceString(langCodes)),
+ })
+
+ return fmt.Sprintf("Mozilla/5.0 (%s) AppleWebKit/%s (KHTML, like Gecko) Version/%s Safari/%s",
+ platform, webKitVer, safariVer, webKitVer,
+ )
+}
+
+func (ua UserAgent) linuxPlatformToken() string {
+ return fmt.Sprintf("X11; Linux %s", randomElementFromSliceString(linuxProcessor))
+}
+
+func (ua UserAgent) macPlatformToken(sep string) string {
+ return fmt.Sprintf("Macintosh; %s Mac OS X %d%s%d%s%d",
+ randomElementFromSliceString(macProcessor), ua.intBetween(10, 17), sep, ua.intBetween(5, 8), sep, ua.intBetween(0, 9),
+ )
+}
+
+func (ua UserAgent) windowsPlatformToken() string {
+ return randomElementFromSliceString(windowsPlatformTokens)
+}
+
+// webKitVersion generates a random string that resembles an AppleWebKit version string.
+func (ua UserAgent) webKitVersion(withPatchVer bool) string {
+ majorVer := ua.intBetween(531, 618)
+ if withPatchVer {
+ return fmt.Sprintf("%d.%d.%d", majorVer, ua.intBetween(1, 50), ua.intBetween(1, 20))
+ }
+ return fmt.Sprintf("%d.%d", majorVer, ua.intBetween(0, 10))
+}
+
+// geckoVersion generates a random string that resembles a Gecko version string.
+func (ua UserAgent) geckoVersion() string {
+ const YYYYMMDD = "20060102"
+ minDate := time.Date(2010, 1, 1, 0, 0, 0, 0, time.UTC)
+ maxDate := time.Now()
+ randDuration := time.Duration(rand.Int63n(maxDate.Unix()-minDate.Unix())) * time.Second
+ return minDate.Add(randDuration).Format(YYYYMMDD)
+}
+
+// intBetween generates a random integer in the range [min, max].
+//
+//nolint:revive
+func (ua UserAgent) intBetween(min, max int) int {
+ boundary := interfaces.RandomIntegerBoundary{Start: min, End: max + 1}
+ return randomIntegerWithBoundary(boundary)
+}
diff --git a/vendor/github.com/go-faker/faker/v4/uuid.go b/vendor/github.com/go-faker/faker/v4/uuid.go
new file mode 100644
index 0000000..f63eb0d
--- /dev/null
+++ b/vendor/github.com/go-faker/faker/v4/uuid.go
@@ -0,0 +1,83 @@
+package faker
+
+import (
+ "fmt"
+ "io"
+ "reflect"
+
+ "github.com/go-faker/faker/v4/pkg/options"
+)
+
+// GetIdentifier returns a new Identifier
+func GetIdentifier() Identifier {
+ return &UUID{}
+}
+
+// Identifier ...
+type Identifier interface {
+ Digit(v reflect.Value) (interface{}, error)
+ Hyphenated(v reflect.Value) (interface{}, error)
+}
+
+// UUID struct
+type UUID struct{}
+
+// createUUID returns a 16 byte slice with random values
+func createUUID() ([]byte, error) {
+ b := make([]byte, 16)
+ _, err := io.ReadFull(crypto, b)
+ if err != nil {
+ return b, err
+ }
+ // variant bits; see section 4.1.1
+ b[8] = b[8]&^0xc0 | 0x80
+ // version 4 (pseudo-random); see section 4.1.3
+ b[6] = b[6]&^0xf0 | 0x40
+ return b, nil
+}
+
+func (u UUID) hyphenated() (string, error) {
+ b, err := createUUID()
+ if err != nil {
+ return "", err
+ }
+ uuid := fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
+ return uuid, err
+}
+
+// Hyphenated returns a 36 byte hyphenated UUID
+func (u UUID) Hyphenated(v reflect.Value) (interface{}, error) {
+ return u.hyphenated()
+}
+
+// UUIDHyphenated get fake Hyphenated UUID
+func UUIDHyphenated(opts ...options.OptionFunc) string {
+ return singleFakeData(HyphenatedID, func() interface{} {
+ u := UUID{}
+ res, _ := u.hyphenated()
+ return res
+ }, opts...).(string)
+}
+
+func (u UUID) digit() (string, error) {
+ b, err := createUUID()
+ if err != nil {
+ return "", err
+ }
+ uuid := fmt.Sprintf("%x", b)
+ return uuid, err
+}
+
+// Digit returns a 32 bytes UUID
+func (u UUID) Digit(v reflect.Value) (interface{}, error) {
+ return u.digit()
+}
+
+// UUIDDigit get fake Digit UUID
+func UUIDDigit(opts ...options.OptionFunc) string {
+ return singleFakeData(ID, func() interface{} {
+ u := UUID{}
+ res, _ := u.digit()
+ return res
+ }, opts...).(string)
+}
diff --git a/vendor/github.com/joho/godotenv/.gitignore b/vendor/github.com/joho/godotenv/.gitignore
new file mode 100644
index 0000000..e43b0f9
--- /dev/null
+++ b/vendor/github.com/joho/godotenv/.gitignore
@@ -0,0 +1 @@
+.DS_Store
diff --git a/vendor/github.com/joho/godotenv/LICENCE b/vendor/github.com/joho/godotenv/LICENCE
new file mode 100644
index 0000000..e7ddd51
--- /dev/null
+++ b/vendor/github.com/joho/godotenv/LICENCE
@@ -0,0 +1,23 @@
+Copyright (c) 2013 John Barton
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/vendor/github.com/joho/godotenv/README.md b/vendor/github.com/joho/godotenv/README.md
new file mode 100644
index 0000000..bfbe66a
--- /dev/null
+++ b/vendor/github.com/joho/godotenv/README.md
@@ -0,0 +1,202 @@
+# GoDotEnv ![CI](https://github.com/joho/godotenv/workflows/CI/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/joho/godotenv)](https://goreportcard.com/report/github.com/joho/godotenv)
+
+A Go (golang) port of the Ruby [dotenv](https://github.com/bkeepers/dotenv) project (which loads env vars from a .env file).
+
+From the original Library:
+
+> Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables.
+>
+> But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. Dotenv load variables from a .env file into ENV when the environment is bootstrapped.
+
+It can be used as a library (for loading in env for your own daemons etc.) or as a bin command.
+
+There is test coverage and CI for both linuxish and Windows environments, but I make no guarantees about the bin version working on Windows.
+
+## Installation
+
+As a library
+
+```shell
+go get github.com/joho/godotenv
+```
+
+or if you want to use it as a bin command
+
+go >= 1.17
+```shell
+go install github.com/joho/godotenv/cmd/godotenv@latest
+```
+
+go < 1.17
+```shell
+go get github.com/joho/godotenv/cmd/godotenv
+```
+
+## Usage
+
+Add your application configuration to your `.env` file in the root of your project:
+
+```shell
+S3_BUCKET=YOURS3BUCKET
+SECRET_KEY=YOURSECRETKEYGOESHERE
+```
+
+Then in your Go app you can do something like
+
+```go
+package main
+
+import (
+ "log"
+ "os"
+
+ "github.com/joho/godotenv"
+)
+
+func main() {
+ err := godotenv.Load()
+ if err != nil {
+ log.Fatal("Error loading .env file")
+ }
+
+ s3Bucket := os.Getenv("S3_BUCKET")
+ secretKey := os.Getenv("SECRET_KEY")
+
+ // now do something with s3 or whatever
+}
+```
+
+If you're even lazier than that, you can just take advantage of the autoload package which will read in `.env` on import
+
+```go
+import _ "github.com/joho/godotenv/autoload"
+```
+
+While `.env` in the project root is the default, you don't have to be constrained, both examples below are 100% legit
+
+```go
+godotenv.Load("somerandomfile")
+godotenv.Load("filenumberone.env", "filenumbertwo.env")
+```
+
+If you want to be really fancy with your env file you can do comments and exports (below is a valid env file)
+
+```shell
+# I am a comment and that is OK
+SOME_VAR=someval
+FOO=BAR # comments at line end are OK too
+export BAR=BAZ
+```
+
+Or finally you can do YAML(ish) style
+
+```yaml
+FOO: bar
+BAR: baz
+```
+
+as a final aside, if you don't want godotenv munging your env you can just get a map back instead
+
+```go
+var myEnv map[string]string
+myEnv, err := godotenv.Read()
+
+s3Bucket := myEnv["S3_BUCKET"]
+```
+
+... or from an `io.Reader` instead of a local file
+
+```go
+reader := getRemoteFile()
+myEnv, err := godotenv.Parse(reader)
+```
+
+... or from a `string` if you so desire
+
+```go
+content := getRemoteFileContent()
+myEnv, err := godotenv.Unmarshal(content)
+```
+
+### Precedence & Conventions
+
+Existing envs take precedence of envs that are loaded later.
+
+The [convention](https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use)
+for managing multiple environments (i.e. development, test, production)
+is to create an env named `{YOURAPP}_ENV` and load envs in this order:
+
+```go
+env := os.Getenv("FOO_ENV")
+if "" == env {
+ env = "development"
+}
+
+godotenv.Load(".env." + env + ".local")
+if "test" != env {
+ godotenv.Load(".env.local")
+}
+godotenv.Load(".env." + env)
+godotenv.Load() // The Original .env
+```
+
+If you need to, you can also use `godotenv.Overload()` to defy this convention
+and overwrite existing envs instead of only supplanting them. Use with caution.
+
+### Command Mode
+
+Assuming you've installed the command as above and you've got `$GOPATH/bin` in your `$PATH`
+
+```
+godotenv -f /some/path/to/.env some_command with some args
+```
+
+If you don't specify `-f` it will fall back on the default of loading `.env` in `PWD`
+
+By default, it won't override existing environment variables; you can do that with the `-o` flag.
+
+### Writing Env Files
+
+Godotenv can also write a map representing the environment to a correctly-formatted and escaped file
+
+```go
+env, err := godotenv.Unmarshal("KEY=value")
+err := godotenv.Write(env, "./.env")
+```
+
+... or to a string
+
+```go
+env, err := godotenv.Unmarshal("KEY=value")
+content, err := godotenv.Marshal(env)
+```
+
+## Contributing
+
+Contributions are welcome, but with some caveats.
+
+This library has been declared feature complete (see [#182](https://github.com/joho/godotenv/issues/182) for background) and will not be accepting issues or pull requests adding new functionality or breaking the library API.
+
+Contributions would be gladly accepted that:
+
+* bring this library's parsing into closer compatibility with the mainline dotenv implementations, in particular [Ruby's dotenv](https://github.com/bkeepers/dotenv) and [Node.js' dotenv](https://github.com/motdotla/dotenv)
+* keep the library up to date with the go ecosystem (ie CI bumps, documentation changes, changes in the core libraries)
+* bug fixes for use cases that pertain to the library's purpose of easing development of codebases deployed into twelve factor environments
+
+*code changes without tests and references to peer dotenv implementations will not be accepted*
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Added some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
+
+## Releases
+
+Releases should follow [Semver](http://semver.org/) though the first couple of releases are `v1` and `v1.1`.
+
+Use [annotated tags for all releases](https://github.com/joho/godotenv/issues/30). Example `git tag -a v1.2.1`
+
+## Who?
+
+The original library [dotenv](https://github.com/bkeepers/dotenv) was written by [Brandon Keepers](http://opensoul.org/), and this port was done by [John Barton](https://johnbarton.co/) based off the tests/fixtures in the original library.
diff --git a/vendor/github.com/joho/godotenv/godotenv.go b/vendor/github.com/joho/godotenv/godotenv.go
new file mode 100644
index 0000000..61b0ebb
--- /dev/null
+++ b/vendor/github.com/joho/godotenv/godotenv.go
@@ -0,0 +1,228 @@
+// Package godotenv is a go port of the ruby dotenv library (https://github.com/bkeepers/dotenv)
+//
+// Examples/readme can be found on the GitHub page at https://github.com/joho/godotenv
+//
+// The TL;DR is that you make a .env file that looks something like
+//
+// SOME_ENV_VAR=somevalue
+//
+// and then in your go code you can call
+//
+// godotenv.Load()
+//
+// and all the env vars declared in .env will be available through os.Getenv("SOME_ENV_VAR")
+package godotenv
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "os"
+ "os/exec"
+ "sort"
+ "strconv"
+ "strings"
+)
+
+const doubleQuoteSpecialChars = "\\\n\r\"!$`"
+
+// Parse reads an env file from io.Reader, returning a map of keys and values.
+func Parse(r io.Reader) (map[string]string, error) {
+ var buf bytes.Buffer
+ _, err := io.Copy(&buf, r)
+ if err != nil {
+ return nil, err
+ }
+
+ return UnmarshalBytes(buf.Bytes())
+}
+
+// Load will read your env file(s) and load them into ENV for this process.
+//
+// Call this function as close as possible to the start of your program (ideally in main).
+//
+// If you call Load without any args it will default to loading .env in the current path.
+//
+// You can otherwise tell it which files to load (there can be more than one) like:
+//
+// godotenv.Load("fileone", "filetwo")
+//
+// It's important to note that it WILL NOT OVERRIDE an env variable that already exists - consider the .env file to set dev vars or sensible defaults.
+func Load(filenames ...string) (err error) {
+ filenames = filenamesOrDefault(filenames)
+
+ for _, filename := range filenames {
+ err = loadFile(filename, false)
+ if err != nil {
+ return // return early on a spazout
+ }
+ }
+ return
+}
+
+// Overload will read your env file(s) and load them into ENV for this process.
+//
+// Call this function as close as possible to the start of your program (ideally in main).
+//
+// If you call Overload without any args it will default to loading .env in the current path.
+//
+// You can otherwise tell it which files to load (there can be more than one) like:
+//
+// godotenv.Overload("fileone", "filetwo")
+//
+// It's important to note this WILL OVERRIDE an env variable that already exists - consider the .env file to forcefully set all vars.
+func Overload(filenames ...string) (err error) {
+ filenames = filenamesOrDefault(filenames)
+
+ for _, filename := range filenames {
+ err = loadFile(filename, true)
+ if err != nil {
+ return // return early on a spazout
+ }
+ }
+ return
+}
+
+// Read all env (with same file loading semantics as Load) but return values as
+// a map rather than automatically writing values into env
+func Read(filenames ...string) (envMap map[string]string, err error) {
+ filenames = filenamesOrDefault(filenames)
+ envMap = make(map[string]string)
+
+ for _, filename := range filenames {
+ individualEnvMap, individualErr := readFile(filename)
+
+ if individualErr != nil {
+ err = individualErr
+ return // return early on a spazout
+ }
+
+ for key, value := range individualEnvMap {
+ envMap[key] = value
+ }
+ }
+
+ return
+}
+
+// Unmarshal reads an env file from a string, returning a map of keys and values.
+func Unmarshal(str string) (envMap map[string]string, err error) {
+ return UnmarshalBytes([]byte(str))
+}
+
+// UnmarshalBytes parses env file from byte slice of chars, returning a map of keys and values.
+func UnmarshalBytes(src []byte) (map[string]string, error) {
+ out := make(map[string]string)
+ err := parseBytes(src, out)
+
+ return out, err
+}
+
+// Exec loads env vars from the specified filenames (empty map falls back to default)
+// then executes the cmd specified.
+//
+// Simply hooks up os.Stdin/err/out to the command and calls Run().
+//
+// If you want more fine grained control over your command it's recommended
+// that you use `Load()`, `Overload()` or `Read()` and the `os/exec` package yourself.
+func Exec(filenames []string, cmd string, cmdArgs []string, overload bool) error {
+ op := Load
+ if overload {
+ op = Overload
+ }
+ if err := op(filenames...); err != nil {
+ return err
+ }
+
+ command := exec.Command(cmd, cmdArgs...)
+ command.Stdin = os.Stdin
+ command.Stdout = os.Stdout
+ command.Stderr = os.Stderr
+ return command.Run()
+}
+
+// Write serializes the given environment and writes it to a file.
+func Write(envMap map[string]string, filename string) error {
+ content, err := Marshal(envMap)
+ if err != nil {
+ return err
+ }
+ file, err := os.Create(filename)
+ if err != nil {
+ return err
+ }
+ defer file.Close()
+ _, err = file.WriteString(content + "\n")
+ if err != nil {
+ return err
+ }
+ return file.Sync()
+}
+
+// Marshal outputs the given environment as a dotenv-formatted environment file.
+// Each line is in the format: KEY="VALUE" where VALUE is backslash-escaped.
+func Marshal(envMap map[string]string) (string, error) {
+ lines := make([]string, 0, len(envMap))
+ for k, v := range envMap {
+ if d, err := strconv.Atoi(v); err == nil {
+ lines = append(lines, fmt.Sprintf(`%s=%d`, k, d))
+ } else {
+ lines = append(lines, fmt.Sprintf(`%s="%s"`, k, doubleQuoteEscape(v)))
+ }
+ }
+ sort.Strings(lines)
+ return strings.Join(lines, "\n"), nil
+}
+
+func filenamesOrDefault(filenames []string) []string {
+ if len(filenames) == 0 {
+ return []string{".env"}
+ }
+ return filenames
+}
+
+func loadFile(filename string, overload bool) error {
+ envMap, err := readFile(filename)
+ if err != nil {
+ return err
+ }
+
+ currentEnv := map[string]bool{}
+ rawEnv := os.Environ()
+ for _, rawEnvLine := range rawEnv {
+ key := strings.Split(rawEnvLine, "=")[0]
+ currentEnv[key] = true
+ }
+
+ for key, value := range envMap {
+ if !currentEnv[key] || overload {
+ _ = os.Setenv(key, value)
+ }
+ }
+
+ return nil
+}
+
+func readFile(filename string) (envMap map[string]string, err error) {
+ file, err := os.Open(filename)
+ if err != nil {
+ return
+ }
+ defer file.Close()
+
+ return Parse(file)
+}
+
+func doubleQuoteEscape(line string) string {
+ for _, c := range doubleQuoteSpecialChars {
+ toReplace := "\\" + string(c)
+ if c == '\n' {
+ toReplace = `\n`
+ }
+ if c == '\r' {
+ toReplace = `\r`
+ }
+ line = strings.Replace(line, string(c), toReplace, -1)
+ }
+ return line
+}
diff --git a/vendor/github.com/joho/godotenv/parser.go b/vendor/github.com/joho/godotenv/parser.go
new file mode 100644
index 0000000..cc709af
--- /dev/null
+++ b/vendor/github.com/joho/godotenv/parser.go
@@ -0,0 +1,271 @@
+package godotenv
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "regexp"
+ "strings"
+ "unicode"
+)
+
+const (
+ charComment = '#'
+ prefixSingleQuote = '\''
+ prefixDoubleQuote = '"'
+
+ exportPrefix = "export"
+)
+
+func parseBytes(src []byte, out map[string]string) error {
+ src = bytes.Replace(src, []byte("\r\n"), []byte("\n"), -1)
+ cutset := src
+ for {
+ cutset = getStatementStart(cutset)
+ if cutset == nil {
+ // reached end of file
+ break
+ }
+
+ key, left, err := locateKeyName(cutset)
+ if err != nil {
+ return err
+ }
+
+ value, left, err := extractVarValue(left, out)
+ if err != nil {
+ return err
+ }
+
+ out[key] = value
+ cutset = left
+ }
+
+ return nil
+}
+
+// getStatementPosition returns position of statement begin.
+//
+// It skips any comment line or non-whitespace character.
+func getStatementStart(src []byte) []byte {
+ pos := indexOfNonSpaceChar(src)
+ if pos == -1 {
+ return nil
+ }
+
+ src = src[pos:]
+ if src[0] != charComment {
+ return src
+ }
+
+ // skip comment section
+ pos = bytes.IndexFunc(src, isCharFunc('\n'))
+ if pos == -1 {
+ return nil
+ }
+
+ return getStatementStart(src[pos:])
+}
+
+// locateKeyName locates and parses key name and returns rest of slice
+func locateKeyName(src []byte) (key string, cutset []byte, err error) {
+ // trim "export" and space at beginning
+ src = bytes.TrimLeftFunc(src, isSpace)
+ if bytes.HasPrefix(src, []byte(exportPrefix)) {
+ trimmed := bytes.TrimPrefix(src, []byte(exportPrefix))
+ if bytes.IndexFunc(trimmed, isSpace) == 0 {
+ src = bytes.TrimLeftFunc(trimmed, isSpace)
+ }
+ }
+
+ // locate key name end and validate it in single loop
+ offset := 0
+loop:
+ for i, char := range src {
+ rchar := rune(char)
+ if isSpace(rchar) {
+ continue
+ }
+
+ switch char {
+ case '=', ':':
+ // library also supports yaml-style value declaration
+ key = string(src[0:i])
+ offset = i + 1
+ break loop
+ case '_':
+ default:
+ // variable name should match [A-Za-z0-9_.]
+ if unicode.IsLetter(rchar) || unicode.IsNumber(rchar) || rchar == '.' {
+ continue
+ }
+
+ return "", nil, fmt.Errorf(
+ `unexpected character %q in variable name near %q`,
+ string(char), string(src))
+ }
+ }
+
+ if len(src) == 0 {
+ return "", nil, errors.New("zero length string")
+ }
+
+ // trim whitespace
+ key = strings.TrimRightFunc(key, unicode.IsSpace)
+ cutset = bytes.TrimLeftFunc(src[offset:], isSpace)
+ return key, cutset, nil
+}
+
+// extractVarValue extracts variable value and returns rest of slice
+func extractVarValue(src []byte, vars map[string]string) (value string, rest []byte, err error) {
+ quote, hasPrefix := hasQuotePrefix(src)
+ if !hasPrefix {
+ // unquoted value - read until end of line
+ endOfLine := bytes.IndexFunc(src, isLineEnd)
+
+ // Hit EOF without a trailing newline
+ if endOfLine == -1 {
+ endOfLine = len(src)
+
+ if endOfLine == 0 {
+ return "", nil, nil
+ }
+ }
+
+ // Convert line to rune away to do accurate countback of runes
+ line := []rune(string(src[0:endOfLine]))
+
+ // Assume end of line is end of var
+ endOfVar := len(line)
+ if endOfVar == 0 {
+ return "", src[endOfLine:], nil
+ }
+
+ // Work backwards to check if the line ends in whitespace then
+ // a comment (ie asdasd # some comment)
+ for i := endOfVar - 1; i >= 0; i-- {
+ if line[i] == charComment && i > 0 {
+ if isSpace(line[i-1]) {
+ endOfVar = i
+ break
+ }
+ }
+ }
+
+ trimmed := strings.TrimFunc(string(line[0:endOfVar]), isSpace)
+
+ return expandVariables(trimmed, vars), src[endOfLine:], nil
+ }
+
+ // lookup quoted string terminator
+ for i := 1; i < len(src); i++ {
+ if char := src[i]; char != quote {
+ continue
+ }
+
+ // skip escaped quote symbol (\" or \', depends on quote)
+ if prevChar := src[i-1]; prevChar == '\\' {
+ continue
+ }
+
+ // trim quotes
+ trimFunc := isCharFunc(rune(quote))
+ value = string(bytes.TrimLeftFunc(bytes.TrimRightFunc(src[0:i], trimFunc), trimFunc))
+ if quote == prefixDoubleQuote {
+ // unescape newlines for double quote (this is compat feature)
+ // and expand environment variables
+ value = expandVariables(expandEscapes(value), vars)
+ }
+
+ return value, src[i+1:], nil
+ }
+
+ // return formatted error if quoted string is not terminated
+ valEndIndex := bytes.IndexFunc(src, isCharFunc('\n'))
+ if valEndIndex == -1 {
+ valEndIndex = len(src)
+ }
+
+ return "", nil, fmt.Errorf("unterminated quoted value %s", src[:valEndIndex])
+}
+
+func expandEscapes(str string) string {
+ out := escapeRegex.ReplaceAllStringFunc(str, func(match string) string {
+ c := strings.TrimPrefix(match, `\`)
+ switch c {
+ case "n":
+ return "\n"
+ case "r":
+ return "\r"
+ default:
+ return match
+ }
+ })
+ return unescapeCharsRegex.ReplaceAllString(out, "$1")
+}
+
+func indexOfNonSpaceChar(src []byte) int {
+ return bytes.IndexFunc(src, func(r rune) bool {
+ return !unicode.IsSpace(r)
+ })
+}
+
+// hasQuotePrefix reports whether charset starts with single or double quote and returns quote character
+func hasQuotePrefix(src []byte) (prefix byte, isQuored bool) {
+ if len(src) == 0 {
+ return 0, false
+ }
+
+ switch prefix := src[0]; prefix {
+ case prefixDoubleQuote, prefixSingleQuote:
+ return prefix, true
+ default:
+ return 0, false
+ }
+}
+
+func isCharFunc(char rune) func(rune) bool {
+ return func(v rune) bool {
+ return v == char
+ }
+}
+
+// isSpace reports whether the rune is a space character but not line break character
+//
+// this differs from unicode.IsSpace, which also applies line break as space
+func isSpace(r rune) bool {
+ switch r {
+ case '\t', '\v', '\f', '\r', ' ', 0x85, 0xA0:
+ return true
+ }
+ return false
+}
+
+func isLineEnd(r rune) bool {
+ if r == '\n' || r == '\r' {
+ return true
+ }
+ return false
+}
+
+var (
+ escapeRegex = regexp.MustCompile(`\\.`)
+ expandVarRegex = regexp.MustCompile(`(\\)?(\$)(\()?\{?([A-Z0-9_]+)?\}?`)
+ unescapeCharsRegex = regexp.MustCompile(`\\([^$])`)
+)
+
+func expandVariables(v string, m map[string]string) string {
+ return expandVarRegex.ReplaceAllStringFunc(v, func(s string) string {
+ submatch := expandVarRegex.FindStringSubmatch(s)
+
+ if submatch == nil {
+ return s
+ }
+ if submatch[1] == "\\" || submatch[2] == "(" {
+ return submatch[0][1:]
+ } else if submatch[4] != "" {
+ return m[submatch[4]]
+ }
+ return s
+ })
+}
diff --git a/vendor/github.com/mattn/go-colorable/LICENSE b/vendor/github.com/mattn/go-colorable/LICENSE
new file mode 100644
index 0000000..91b5cef
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Yasuhiro Matsumoto
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/mattn/go-colorable/README.md b/vendor/github.com/mattn/go-colorable/README.md
new file mode 100644
index 0000000..ca04837
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/README.md
@@ -0,0 +1,48 @@
+# go-colorable
+
+[![Build Status](https://github.com/mattn/go-colorable/workflows/test/badge.svg)](https://github.com/mattn/go-colorable/actions?query=workflow%3Atest)
+[![Codecov](https://codecov.io/gh/mattn/go-colorable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-colorable)
+[![GoDoc](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable)
+[![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable)
+
+Colorable writer for windows.
+
+For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.)
+This package is possible to handle escape sequence for ansi color on windows.
+
+## Too Bad!
+
+![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png)
+
+
+## So Good!
+
+![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png)
+
+## Usage
+
+```go
+logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
+logrus.SetOutput(colorable.NewColorableStdout())
+
+logrus.Info("succeeded")
+logrus.Warn("not correct")
+logrus.Error("something error")
+logrus.Fatal("panic")
+```
+
+You can compile above code on non-windows OSs.
+
+## Installation
+
+```
+$ go get github.com/mattn/go-colorable
+```
+
+# License
+
+MIT
+
+# Author
+
+Yasuhiro Matsumoto (a.k.a mattn)
diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go
new file mode 100644
index 0000000..c1a78aa
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/colorable_others.go
@@ -0,0 +1,38 @@
+//go:build !windows || appengine
+// +build !windows appengine
+
+package colorable
+
+import (
+ "io"
+ "os"
+
+ _ "github.com/mattn/go-isatty"
+)
+
+// NewColorable returns new instance of Writer which handles escape sequence.
+func NewColorable(file *os.File) io.Writer {
+ if file == nil {
+ panic("nil passed instead of *os.File to NewColorable()")
+ }
+
+ return file
+}
+
+// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.
+func NewColorableStdout() io.Writer {
+ return os.Stdout
+}
+
+// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.
+func NewColorableStderr() io.Writer {
+ return os.Stderr
+}
+
+// EnableColorsStdout enable colors if possible.
+func EnableColorsStdout(enabled *bool) func() {
+ if enabled != nil {
+ *enabled = true
+ }
+ return func() {}
+}
diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go
new file mode 100644
index 0000000..2df7b85
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go
@@ -0,0 +1,1047 @@
+//go:build windows && !appengine
+// +build windows,!appengine
+
+package colorable
+
+import (
+ "bytes"
+ "io"
+ "math"
+ "os"
+ "strconv"
+ "strings"
+ "sync"
+ syscall "golang.org/x/sys/windows"
+ "unsafe"
+
+ "github.com/mattn/go-isatty"
+)
+
+const (
+ foregroundBlue = 0x1
+ foregroundGreen = 0x2
+ foregroundRed = 0x4
+ foregroundIntensity = 0x8
+ foregroundMask = (foregroundRed | foregroundBlue | foregroundGreen | foregroundIntensity)
+ backgroundBlue = 0x10
+ backgroundGreen = 0x20
+ backgroundRed = 0x40
+ backgroundIntensity = 0x80
+ backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity)
+ commonLvbUnderscore = 0x8000
+
+ cENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4
+)
+
+const (
+ genericRead = 0x80000000
+ genericWrite = 0x40000000
+)
+
+const (
+ consoleTextmodeBuffer = 0x1
+)
+
+type wchar uint16
+type short int16
+type dword uint32
+type word uint16
+
+type coord struct {
+ x short
+ y short
+}
+
+type smallRect struct {
+ left short
+ top short
+ right short
+ bottom short
+}
+
+type consoleScreenBufferInfo struct {
+ size coord
+ cursorPosition coord
+ attributes word
+ window smallRect
+ maximumWindowSize coord
+}
+
+type consoleCursorInfo struct {
+ size dword
+ visible int32
+}
+
+var (
+ kernel32 = syscall.NewLazySystemDLL("kernel32.dll")
+ procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
+ procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute")
+ procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition")
+ procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW")
+ procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute")
+ procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo")
+ procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo")
+ procSetConsoleTitle = kernel32.NewProc("SetConsoleTitleW")
+ procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
+ procSetConsoleMode = kernel32.NewProc("SetConsoleMode")
+ procCreateConsoleScreenBuffer = kernel32.NewProc("CreateConsoleScreenBuffer")
+)
+
+// writer provides colorable Writer to the console
+type writer struct {
+ out io.Writer
+ handle syscall.Handle
+ althandle syscall.Handle
+ oldattr word
+ oldpos coord
+ rest bytes.Buffer
+ mutex sync.Mutex
+}
+
+// NewColorable returns new instance of writer which handles escape sequence from File.
+func NewColorable(file *os.File) io.Writer {
+ if file == nil {
+ panic("nil passed instead of *os.File to NewColorable()")
+ }
+
+ if isatty.IsTerminal(file.Fd()) {
+ var mode uint32
+ if r, _, _ := procGetConsoleMode.Call(file.Fd(), uintptr(unsafe.Pointer(&mode))); r != 0 && mode&cENABLE_VIRTUAL_TERMINAL_PROCESSING != 0 {
+ return file
+ }
+ var csbi consoleScreenBufferInfo
+ handle := syscall.Handle(file.Fd())
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ return &writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}}
+ }
+ return file
+}
+
+// NewColorableStdout returns new instance of writer which handles escape sequence for stdout.
+func NewColorableStdout() io.Writer {
+ return NewColorable(os.Stdout)
+}
+
+// NewColorableStderr returns new instance of writer which handles escape sequence for stderr.
+func NewColorableStderr() io.Writer {
+ return NewColorable(os.Stderr)
+}
+
+var color256 = map[int]int{
+ 0: 0x000000,
+ 1: 0x800000,
+ 2: 0x008000,
+ 3: 0x808000,
+ 4: 0x000080,
+ 5: 0x800080,
+ 6: 0x008080,
+ 7: 0xc0c0c0,
+ 8: 0x808080,
+ 9: 0xff0000,
+ 10: 0x00ff00,
+ 11: 0xffff00,
+ 12: 0x0000ff,
+ 13: 0xff00ff,
+ 14: 0x00ffff,
+ 15: 0xffffff,
+ 16: 0x000000,
+ 17: 0x00005f,
+ 18: 0x000087,
+ 19: 0x0000af,
+ 20: 0x0000d7,
+ 21: 0x0000ff,
+ 22: 0x005f00,
+ 23: 0x005f5f,
+ 24: 0x005f87,
+ 25: 0x005faf,
+ 26: 0x005fd7,
+ 27: 0x005fff,
+ 28: 0x008700,
+ 29: 0x00875f,
+ 30: 0x008787,
+ 31: 0x0087af,
+ 32: 0x0087d7,
+ 33: 0x0087ff,
+ 34: 0x00af00,
+ 35: 0x00af5f,
+ 36: 0x00af87,
+ 37: 0x00afaf,
+ 38: 0x00afd7,
+ 39: 0x00afff,
+ 40: 0x00d700,
+ 41: 0x00d75f,
+ 42: 0x00d787,
+ 43: 0x00d7af,
+ 44: 0x00d7d7,
+ 45: 0x00d7ff,
+ 46: 0x00ff00,
+ 47: 0x00ff5f,
+ 48: 0x00ff87,
+ 49: 0x00ffaf,
+ 50: 0x00ffd7,
+ 51: 0x00ffff,
+ 52: 0x5f0000,
+ 53: 0x5f005f,
+ 54: 0x5f0087,
+ 55: 0x5f00af,
+ 56: 0x5f00d7,
+ 57: 0x5f00ff,
+ 58: 0x5f5f00,
+ 59: 0x5f5f5f,
+ 60: 0x5f5f87,
+ 61: 0x5f5faf,
+ 62: 0x5f5fd7,
+ 63: 0x5f5fff,
+ 64: 0x5f8700,
+ 65: 0x5f875f,
+ 66: 0x5f8787,
+ 67: 0x5f87af,
+ 68: 0x5f87d7,
+ 69: 0x5f87ff,
+ 70: 0x5faf00,
+ 71: 0x5faf5f,
+ 72: 0x5faf87,
+ 73: 0x5fafaf,
+ 74: 0x5fafd7,
+ 75: 0x5fafff,
+ 76: 0x5fd700,
+ 77: 0x5fd75f,
+ 78: 0x5fd787,
+ 79: 0x5fd7af,
+ 80: 0x5fd7d7,
+ 81: 0x5fd7ff,
+ 82: 0x5fff00,
+ 83: 0x5fff5f,
+ 84: 0x5fff87,
+ 85: 0x5fffaf,
+ 86: 0x5fffd7,
+ 87: 0x5fffff,
+ 88: 0x870000,
+ 89: 0x87005f,
+ 90: 0x870087,
+ 91: 0x8700af,
+ 92: 0x8700d7,
+ 93: 0x8700ff,
+ 94: 0x875f00,
+ 95: 0x875f5f,
+ 96: 0x875f87,
+ 97: 0x875faf,
+ 98: 0x875fd7,
+ 99: 0x875fff,
+ 100: 0x878700,
+ 101: 0x87875f,
+ 102: 0x878787,
+ 103: 0x8787af,
+ 104: 0x8787d7,
+ 105: 0x8787ff,
+ 106: 0x87af00,
+ 107: 0x87af5f,
+ 108: 0x87af87,
+ 109: 0x87afaf,
+ 110: 0x87afd7,
+ 111: 0x87afff,
+ 112: 0x87d700,
+ 113: 0x87d75f,
+ 114: 0x87d787,
+ 115: 0x87d7af,
+ 116: 0x87d7d7,
+ 117: 0x87d7ff,
+ 118: 0x87ff00,
+ 119: 0x87ff5f,
+ 120: 0x87ff87,
+ 121: 0x87ffaf,
+ 122: 0x87ffd7,
+ 123: 0x87ffff,
+ 124: 0xaf0000,
+ 125: 0xaf005f,
+ 126: 0xaf0087,
+ 127: 0xaf00af,
+ 128: 0xaf00d7,
+ 129: 0xaf00ff,
+ 130: 0xaf5f00,
+ 131: 0xaf5f5f,
+ 132: 0xaf5f87,
+ 133: 0xaf5faf,
+ 134: 0xaf5fd7,
+ 135: 0xaf5fff,
+ 136: 0xaf8700,
+ 137: 0xaf875f,
+ 138: 0xaf8787,
+ 139: 0xaf87af,
+ 140: 0xaf87d7,
+ 141: 0xaf87ff,
+ 142: 0xafaf00,
+ 143: 0xafaf5f,
+ 144: 0xafaf87,
+ 145: 0xafafaf,
+ 146: 0xafafd7,
+ 147: 0xafafff,
+ 148: 0xafd700,
+ 149: 0xafd75f,
+ 150: 0xafd787,
+ 151: 0xafd7af,
+ 152: 0xafd7d7,
+ 153: 0xafd7ff,
+ 154: 0xafff00,
+ 155: 0xafff5f,
+ 156: 0xafff87,
+ 157: 0xafffaf,
+ 158: 0xafffd7,
+ 159: 0xafffff,
+ 160: 0xd70000,
+ 161: 0xd7005f,
+ 162: 0xd70087,
+ 163: 0xd700af,
+ 164: 0xd700d7,
+ 165: 0xd700ff,
+ 166: 0xd75f00,
+ 167: 0xd75f5f,
+ 168: 0xd75f87,
+ 169: 0xd75faf,
+ 170: 0xd75fd7,
+ 171: 0xd75fff,
+ 172: 0xd78700,
+ 173: 0xd7875f,
+ 174: 0xd78787,
+ 175: 0xd787af,
+ 176: 0xd787d7,
+ 177: 0xd787ff,
+ 178: 0xd7af00,
+ 179: 0xd7af5f,
+ 180: 0xd7af87,
+ 181: 0xd7afaf,
+ 182: 0xd7afd7,
+ 183: 0xd7afff,
+ 184: 0xd7d700,
+ 185: 0xd7d75f,
+ 186: 0xd7d787,
+ 187: 0xd7d7af,
+ 188: 0xd7d7d7,
+ 189: 0xd7d7ff,
+ 190: 0xd7ff00,
+ 191: 0xd7ff5f,
+ 192: 0xd7ff87,
+ 193: 0xd7ffaf,
+ 194: 0xd7ffd7,
+ 195: 0xd7ffff,
+ 196: 0xff0000,
+ 197: 0xff005f,
+ 198: 0xff0087,
+ 199: 0xff00af,
+ 200: 0xff00d7,
+ 201: 0xff00ff,
+ 202: 0xff5f00,
+ 203: 0xff5f5f,
+ 204: 0xff5f87,
+ 205: 0xff5faf,
+ 206: 0xff5fd7,
+ 207: 0xff5fff,
+ 208: 0xff8700,
+ 209: 0xff875f,
+ 210: 0xff8787,
+ 211: 0xff87af,
+ 212: 0xff87d7,
+ 213: 0xff87ff,
+ 214: 0xffaf00,
+ 215: 0xffaf5f,
+ 216: 0xffaf87,
+ 217: 0xffafaf,
+ 218: 0xffafd7,
+ 219: 0xffafff,
+ 220: 0xffd700,
+ 221: 0xffd75f,
+ 222: 0xffd787,
+ 223: 0xffd7af,
+ 224: 0xffd7d7,
+ 225: 0xffd7ff,
+ 226: 0xffff00,
+ 227: 0xffff5f,
+ 228: 0xffff87,
+ 229: 0xffffaf,
+ 230: 0xffffd7,
+ 231: 0xffffff,
+ 232: 0x080808,
+ 233: 0x121212,
+ 234: 0x1c1c1c,
+ 235: 0x262626,
+ 236: 0x303030,
+ 237: 0x3a3a3a,
+ 238: 0x444444,
+ 239: 0x4e4e4e,
+ 240: 0x585858,
+ 241: 0x626262,
+ 242: 0x6c6c6c,
+ 243: 0x767676,
+ 244: 0x808080,
+ 245: 0x8a8a8a,
+ 246: 0x949494,
+ 247: 0x9e9e9e,
+ 248: 0xa8a8a8,
+ 249: 0xb2b2b2,
+ 250: 0xbcbcbc,
+ 251: 0xc6c6c6,
+ 252: 0xd0d0d0,
+ 253: 0xdadada,
+ 254: 0xe4e4e4,
+ 255: 0xeeeeee,
+}
+
+// `\033]0;TITLESTR\007`
+func doTitleSequence(er *bytes.Reader) error {
+ var c byte
+ var err error
+
+ c, err = er.ReadByte()
+ if err != nil {
+ return err
+ }
+ if c != '0' && c != '2' {
+ return nil
+ }
+ c, err = er.ReadByte()
+ if err != nil {
+ return err
+ }
+ if c != ';' {
+ return nil
+ }
+ title := make([]byte, 0, 80)
+ for {
+ c, err = er.ReadByte()
+ if err != nil {
+ return err
+ }
+ if c == 0x07 || c == '\n' {
+ break
+ }
+ title = append(title, c)
+ }
+ if len(title) > 0 {
+ title8, err := syscall.UTF16PtrFromString(string(title))
+ if err == nil {
+ procSetConsoleTitle.Call(uintptr(unsafe.Pointer(title8)))
+ }
+ }
+ return nil
+}
+
+// returns Atoi(s) unless s == "" in which case it returns def
+func atoiWithDefault(s string, def int) (int, error) {
+ if s == "" {
+ return def, nil
+ }
+ return strconv.Atoi(s)
+}
+
+// Write writes data on console
+func (w *writer) Write(data []byte) (n int, err error) {
+ w.mutex.Lock()
+ defer w.mutex.Unlock()
+ var csbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
+
+ handle := w.handle
+
+ var er *bytes.Reader
+ if w.rest.Len() > 0 {
+ var rest bytes.Buffer
+ w.rest.WriteTo(&rest)
+ w.rest.Reset()
+ rest.Write(data)
+ er = bytes.NewReader(rest.Bytes())
+ } else {
+ er = bytes.NewReader(data)
+ }
+ var plaintext bytes.Buffer
+loop:
+ for {
+ c1, err := er.ReadByte()
+ if err != nil {
+ plaintext.WriteTo(w.out)
+ break loop
+ }
+ if c1 != 0x1b {
+ plaintext.WriteByte(c1)
+ continue
+ }
+ _, err = plaintext.WriteTo(w.out)
+ if err != nil {
+ break loop
+ }
+ c2, err := er.ReadByte()
+ if err != nil {
+ break loop
+ }
+
+ switch c2 {
+ case '>':
+ continue
+ case ']':
+ w.rest.WriteByte(c1)
+ w.rest.WriteByte(c2)
+ er.WriteTo(&w.rest)
+ if bytes.IndexByte(w.rest.Bytes(), 0x07) == -1 {
+ break loop
+ }
+ er = bytes.NewReader(w.rest.Bytes()[2:])
+ err := doTitleSequence(er)
+ if err != nil {
+ break loop
+ }
+ w.rest.Reset()
+ continue
+ // https://github.com/mattn/go-colorable/issues/27
+ case '7':
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ w.oldpos = csbi.cursorPosition
+ continue
+ case '8':
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos)))
+ continue
+ case 0x5b:
+ // execute part after switch
+ default:
+ continue
+ }
+
+ w.rest.WriteByte(c1)
+ w.rest.WriteByte(c2)
+ er.WriteTo(&w.rest)
+
+ var buf bytes.Buffer
+ var m byte
+ for i, c := range w.rest.Bytes()[2:] {
+ if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' {
+ m = c
+ er = bytes.NewReader(w.rest.Bytes()[2+i+1:])
+ w.rest.Reset()
+ break
+ }
+ buf.Write([]byte(string(c)))
+ }
+ if m == 0 {
+ break loop
+ }
+
+ switch m {
+ case 'A':
+ n, err = atoiWithDefault(buf.String(), 1)
+ if err != nil {
+ continue
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ csbi.cursorPosition.y -= short(n)
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+ case 'B':
+ n, err = atoiWithDefault(buf.String(), 1)
+ if err != nil {
+ continue
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ csbi.cursorPosition.y += short(n)
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+ case 'C':
+ n, err = atoiWithDefault(buf.String(), 1)
+ if err != nil {
+ continue
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ csbi.cursorPosition.x += short(n)
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+ case 'D':
+ n, err = atoiWithDefault(buf.String(), 1)
+ if err != nil {
+ continue
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ csbi.cursorPosition.x -= short(n)
+ if csbi.cursorPosition.x < 0 {
+ csbi.cursorPosition.x = 0
+ }
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+ case 'E':
+ n, err = atoiWithDefault(buf.String(), 1)
+ if err != nil {
+ continue
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ csbi.cursorPosition.x = 0
+ csbi.cursorPosition.y += short(n)
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+ case 'F':
+ n, err = atoiWithDefault(buf.String(), 1)
+ if err != nil {
+ continue
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ csbi.cursorPosition.x = 0
+ csbi.cursorPosition.y -= short(n)
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+ case 'G':
+ n, err = strconv.Atoi(buf.String())
+ if err != nil {
+ continue
+ }
+ if n < 1 {
+ n = 1
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ csbi.cursorPosition.x = short(n - 1)
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+ case 'H', 'f':
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ if buf.Len() > 0 {
+ token := strings.Split(buf.String(), ";")
+ switch len(token) {
+ case 1:
+ n1, err := strconv.Atoi(token[0])
+ if err != nil {
+ continue
+ }
+ csbi.cursorPosition.y = short(n1 - 1)
+ case 2:
+ n1, err := strconv.Atoi(token[0])
+ if err != nil {
+ continue
+ }
+ n2, err := strconv.Atoi(token[1])
+ if err != nil {
+ continue
+ }
+ csbi.cursorPosition.x = short(n2 - 1)
+ csbi.cursorPosition.y = short(n1 - 1)
+ }
+ } else {
+ csbi.cursorPosition.y = 0
+ }
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
+ case 'J':
+ n := 0
+ if buf.Len() > 0 {
+ n, err = strconv.Atoi(buf.String())
+ if err != nil {
+ continue
+ }
+ }
+ var count, written dword
+ var cursor coord
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ switch n {
+ case 0:
+ cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y}
+ count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x)
+ case 1:
+ cursor = coord{x: csbi.window.left, y: csbi.window.top}
+ count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.window.top-csbi.cursorPosition.y)*dword(csbi.size.x)
+ case 2:
+ cursor = coord{x: csbi.window.left, y: csbi.window.top}
+ count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x)
+ }
+ procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+ procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+ case 'K':
+ n := 0
+ if buf.Len() > 0 {
+ n, err = strconv.Atoi(buf.String())
+ if err != nil {
+ continue
+ }
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ var cursor coord
+ var count, written dword
+ switch n {
+ case 0:
+ cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y}
+ count = dword(csbi.size.x - csbi.cursorPosition.x)
+ case 1:
+ cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y}
+ count = dword(csbi.size.x - csbi.cursorPosition.x)
+ case 2:
+ cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y}
+ count = dword(csbi.size.x)
+ }
+ procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+ procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+ case 'X':
+ n := 0
+ if buf.Len() > 0 {
+ n, err = strconv.Atoi(buf.String())
+ if err != nil {
+ continue
+ }
+ }
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ var cursor coord
+ var written dword
+ cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y}
+ procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+ procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
+ case 'm':
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ attr := csbi.attributes
+ cs := buf.String()
+ if cs == "" {
+ procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(w.oldattr))
+ continue
+ }
+ token := strings.Split(cs, ";")
+ for i := 0; i < len(token); i++ {
+ ns := token[i]
+ if n, err = strconv.Atoi(ns); err == nil {
+ switch {
+ case n == 0 || n == 100:
+ attr = w.oldattr
+ case n == 4:
+ attr |= commonLvbUnderscore
+ case (1 <= n && n <= 3) || n == 5:
+ attr |= foregroundIntensity
+ case n == 7 || n == 27:
+ attr =
+ (attr &^ (foregroundMask | backgroundMask)) |
+ ((attr & foregroundMask) << 4) |
+ ((attr & backgroundMask) >> 4)
+ case n == 22:
+ attr &^= foregroundIntensity
+ case n == 24:
+ attr &^= commonLvbUnderscore
+ case 30 <= n && n <= 37:
+ attr &= backgroundMask
+ if (n-30)&1 != 0 {
+ attr |= foregroundRed
+ }
+ if (n-30)&2 != 0 {
+ attr |= foregroundGreen
+ }
+ if (n-30)&4 != 0 {
+ attr |= foregroundBlue
+ }
+ case n == 38: // set foreground color.
+ if i < len(token)-2 && (token[i+1] == "5" || token[i+1] == "05") {
+ if n256, err := strconv.Atoi(token[i+2]); err == nil {
+ if n256foreAttr == nil {
+ n256setup()
+ }
+ attr &= backgroundMask
+ attr |= n256foreAttr[n256%len(n256foreAttr)]
+ i += 2
+ }
+ } else if len(token) == 5 && token[i+1] == "2" {
+ var r, g, b int
+ r, _ = strconv.Atoi(token[i+2])
+ g, _ = strconv.Atoi(token[i+3])
+ b, _ = strconv.Atoi(token[i+4])
+ i += 4
+ if r > 127 {
+ attr |= foregroundRed
+ }
+ if g > 127 {
+ attr |= foregroundGreen
+ }
+ if b > 127 {
+ attr |= foregroundBlue
+ }
+ } else {
+ attr = attr & (w.oldattr & backgroundMask)
+ }
+ case n == 39: // reset foreground color.
+ attr &= backgroundMask
+ attr |= w.oldattr & foregroundMask
+ case 40 <= n && n <= 47:
+ attr &= foregroundMask
+ if (n-40)&1 != 0 {
+ attr |= backgroundRed
+ }
+ if (n-40)&2 != 0 {
+ attr |= backgroundGreen
+ }
+ if (n-40)&4 != 0 {
+ attr |= backgroundBlue
+ }
+ case n == 48: // set background color.
+ if i < len(token)-2 && token[i+1] == "5" {
+ if n256, err := strconv.Atoi(token[i+2]); err == nil {
+ if n256backAttr == nil {
+ n256setup()
+ }
+ attr &= foregroundMask
+ attr |= n256backAttr[n256%len(n256backAttr)]
+ i += 2
+ }
+ } else if len(token) == 5 && token[i+1] == "2" {
+ var r, g, b int
+ r, _ = strconv.Atoi(token[i+2])
+ g, _ = strconv.Atoi(token[i+3])
+ b, _ = strconv.Atoi(token[i+4])
+ i += 4
+ if r > 127 {
+ attr |= backgroundRed
+ }
+ if g > 127 {
+ attr |= backgroundGreen
+ }
+ if b > 127 {
+ attr |= backgroundBlue
+ }
+ } else {
+ attr = attr & (w.oldattr & foregroundMask)
+ }
+ case n == 49: // reset foreground color.
+ attr &= foregroundMask
+ attr |= w.oldattr & backgroundMask
+ case 90 <= n && n <= 97:
+ attr = (attr & backgroundMask)
+ attr |= foregroundIntensity
+ if (n-90)&1 != 0 {
+ attr |= foregroundRed
+ }
+ if (n-90)&2 != 0 {
+ attr |= foregroundGreen
+ }
+ if (n-90)&4 != 0 {
+ attr |= foregroundBlue
+ }
+ case 100 <= n && n <= 107:
+ attr = (attr & foregroundMask)
+ attr |= backgroundIntensity
+ if (n-100)&1 != 0 {
+ attr |= backgroundRed
+ }
+ if (n-100)&2 != 0 {
+ attr |= backgroundGreen
+ }
+ if (n-100)&4 != 0 {
+ attr |= backgroundBlue
+ }
+ }
+ procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(attr))
+ }
+ }
+ case 'h':
+ var ci consoleCursorInfo
+ cs := buf.String()
+ if cs == "5>" {
+ procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 0
+ procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+ } else if cs == "?25" {
+ procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 1
+ procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+ } else if cs == "?1049" {
+ if w.althandle == 0 {
+ h, _, _ := procCreateConsoleScreenBuffer.Call(uintptr(genericRead|genericWrite), 0, 0, uintptr(consoleTextmodeBuffer), 0, 0)
+ w.althandle = syscall.Handle(h)
+ if w.althandle != 0 {
+ handle = w.althandle
+ }
+ }
+ }
+ case 'l':
+ var ci consoleCursorInfo
+ cs := buf.String()
+ if cs == "5>" {
+ procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 1
+ procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+ } else if cs == "?25" {
+ procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 0
+ procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci)))
+ } else if cs == "?1049" {
+ if w.althandle != 0 {
+ syscall.CloseHandle(w.althandle)
+ w.althandle = 0
+ handle = w.handle
+ }
+ }
+ case 's':
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ w.oldpos = csbi.cursorPosition
+ case 'u':
+ procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos)))
+ }
+ }
+
+ return len(data), nil
+}
+
+type consoleColor struct {
+ rgb int
+ red bool
+ green bool
+ blue bool
+ intensity bool
+}
+
+func (c consoleColor) foregroundAttr() (attr word) {
+ if c.red {
+ attr |= foregroundRed
+ }
+ if c.green {
+ attr |= foregroundGreen
+ }
+ if c.blue {
+ attr |= foregroundBlue
+ }
+ if c.intensity {
+ attr |= foregroundIntensity
+ }
+ return
+}
+
+func (c consoleColor) backgroundAttr() (attr word) {
+ if c.red {
+ attr |= backgroundRed
+ }
+ if c.green {
+ attr |= backgroundGreen
+ }
+ if c.blue {
+ attr |= backgroundBlue
+ }
+ if c.intensity {
+ attr |= backgroundIntensity
+ }
+ return
+}
+
+var color16 = []consoleColor{
+ {0x000000, false, false, false, false},
+ {0x000080, false, false, true, false},
+ {0x008000, false, true, false, false},
+ {0x008080, false, true, true, false},
+ {0x800000, true, false, false, false},
+ {0x800080, true, false, true, false},
+ {0x808000, true, true, false, false},
+ {0xc0c0c0, true, true, true, false},
+ {0x808080, false, false, false, true},
+ {0x0000ff, false, false, true, true},
+ {0x00ff00, false, true, false, true},
+ {0x00ffff, false, true, true, true},
+ {0xff0000, true, false, false, true},
+ {0xff00ff, true, false, true, true},
+ {0xffff00, true, true, false, true},
+ {0xffffff, true, true, true, true},
+}
+
+type hsv struct {
+ h, s, v float32
+}
+
+func (a hsv) dist(b hsv) float32 {
+ dh := a.h - b.h
+ switch {
+ case dh > 0.5:
+ dh = 1 - dh
+ case dh < -0.5:
+ dh = -1 - dh
+ }
+ ds := a.s - b.s
+ dv := a.v - b.v
+ return float32(math.Sqrt(float64(dh*dh + ds*ds + dv*dv)))
+}
+
+func toHSV(rgb int) hsv {
+ r, g, b := float32((rgb&0xFF0000)>>16)/256.0,
+ float32((rgb&0x00FF00)>>8)/256.0,
+ float32(rgb&0x0000FF)/256.0
+ min, max := minmax3f(r, g, b)
+ h := max - min
+ if h > 0 {
+ if max == r {
+ h = (g - b) / h
+ if h < 0 {
+ h += 6
+ }
+ } else if max == g {
+ h = 2 + (b-r)/h
+ } else {
+ h = 4 + (r-g)/h
+ }
+ }
+ h /= 6.0
+ s := max - min
+ if max != 0 {
+ s /= max
+ }
+ v := max
+ return hsv{h: h, s: s, v: v}
+}
+
+type hsvTable []hsv
+
+func toHSVTable(rgbTable []consoleColor) hsvTable {
+ t := make(hsvTable, len(rgbTable))
+ for i, c := range rgbTable {
+ t[i] = toHSV(c.rgb)
+ }
+ return t
+}
+
+func (t hsvTable) find(rgb int) consoleColor {
+ hsv := toHSV(rgb)
+ n := 7
+ l := float32(5.0)
+ for i, p := range t {
+ d := hsv.dist(p)
+ if d < l {
+ l, n = d, i
+ }
+ }
+ return color16[n]
+}
+
+func minmax3f(a, b, c float32) (min, max float32) {
+ if a < b {
+ if b < c {
+ return a, c
+ } else if a < c {
+ return a, b
+ } else {
+ return c, b
+ }
+ } else {
+ if a < c {
+ return b, c
+ } else if b < c {
+ return b, a
+ } else {
+ return c, a
+ }
+ }
+}
+
+var n256foreAttr []word
+var n256backAttr []word
+
+func n256setup() {
+ n256foreAttr = make([]word, 256)
+ n256backAttr = make([]word, 256)
+ t := toHSVTable(color16)
+ for i, rgb := range color256 {
+ c := t.find(rgb)
+ n256foreAttr[i] = c.foregroundAttr()
+ n256backAttr[i] = c.backgroundAttr()
+ }
+}
+
+// EnableColorsStdout enable colors if possible.
+func EnableColorsStdout(enabled *bool) func() {
+ var mode uint32
+ h := os.Stdout.Fd()
+ if r, _, _ := procGetConsoleMode.Call(h, uintptr(unsafe.Pointer(&mode))); r != 0 {
+ if r, _, _ = procSetConsoleMode.Call(h, uintptr(mode|cENABLE_VIRTUAL_TERMINAL_PROCESSING)); r != 0 {
+ if enabled != nil {
+ *enabled = true
+ }
+ return func() {
+ procSetConsoleMode.Call(h, uintptr(mode))
+ }
+ }
+ }
+ if enabled != nil {
+ *enabled = true
+ }
+ return func() {}
+}
diff --git a/vendor/github.com/mattn/go-colorable/go.test.sh b/vendor/github.com/mattn/go-colorable/go.test.sh
new file mode 100644
index 0000000..012162b
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/go.test.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+set -e
+echo "" > coverage.txt
+
+for d in $(go list ./... | grep -v vendor); do
+ go test -race -coverprofile=profile.out -covermode=atomic "$d"
+ if [ -f profile.out ]; then
+ cat profile.out >> coverage.txt
+ rm profile.out
+ fi
+done
diff --git a/vendor/github.com/mattn/go-colorable/noncolorable.go b/vendor/github.com/mattn/go-colorable/noncolorable.go
new file mode 100644
index 0000000..05d6f74
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/noncolorable.go
@@ -0,0 +1,57 @@
+package colorable
+
+import (
+ "bytes"
+ "io"
+)
+
+// NonColorable holds writer but removes escape sequence.
+type NonColorable struct {
+ out io.Writer
+}
+
+// NewNonColorable returns new instance of Writer which removes escape sequence from Writer.
+func NewNonColorable(w io.Writer) io.Writer {
+ return &NonColorable{out: w}
+}
+
+// Write writes data on console
+func (w *NonColorable) Write(data []byte) (n int, err error) {
+ er := bytes.NewReader(data)
+ var plaintext bytes.Buffer
+loop:
+ for {
+ c1, err := er.ReadByte()
+ if err != nil {
+ plaintext.WriteTo(w.out)
+ break loop
+ }
+ if c1 != 0x1b {
+ plaintext.WriteByte(c1)
+ continue
+ }
+ _, err = plaintext.WriteTo(w.out)
+ if err != nil {
+ break loop
+ }
+ c2, err := er.ReadByte()
+ if err != nil {
+ break loop
+ }
+ if c2 != 0x5b {
+ continue
+ }
+
+ for {
+ c, err := er.ReadByte()
+ if err != nil {
+ break loop
+ }
+ if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' {
+ break
+ }
+ }
+ }
+
+ return len(data), nil
+}
diff --git a/vendor/github.com/mattn/go-isatty/LICENSE b/vendor/github.com/mattn/go-isatty/LICENSE
new file mode 100644
index 0000000..65dc692
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/LICENSE
@@ -0,0 +1,9 @@
+Copyright (c) Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
+
+MIT License (Expat)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/mattn/go-isatty/README.md b/vendor/github.com/mattn/go-isatty/README.md
new file mode 100644
index 0000000..3841835
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/README.md
@@ -0,0 +1,50 @@
+# go-isatty
+
+[![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty)
+[![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-isatty)
+[![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master)
+[![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty)
+
+isatty for golang
+
+## Usage
+
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/mattn/go-isatty"
+ "os"
+)
+
+func main() {
+ if isatty.IsTerminal(os.Stdout.Fd()) {
+ fmt.Println("Is Terminal")
+ } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
+ fmt.Println("Is Cygwin/MSYS2 Terminal")
+ } else {
+ fmt.Println("Is Not Terminal")
+ }
+}
+```
+
+## Installation
+
+```
+$ go get github.com/mattn/go-isatty
+```
+
+## License
+
+MIT
+
+## Author
+
+Yasuhiro Matsumoto (a.k.a mattn)
+
+## Thanks
+
+* k-takata: base idea for IsCygwinTerminal
+
+ https://github.com/k-takata/go-iscygpty
diff --git a/vendor/github.com/mattn/go-isatty/doc.go b/vendor/github.com/mattn/go-isatty/doc.go
new file mode 100644
index 0000000..17d4f90
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/doc.go
@@ -0,0 +1,2 @@
+// Package isatty implements interface to isatty
+package isatty
diff --git a/vendor/github.com/mattn/go-isatty/go.test.sh b/vendor/github.com/mattn/go-isatty/go.test.sh
new file mode 100644
index 0000000..012162b
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/go.test.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+set -e
+echo "" > coverage.txt
+
+for d in $(go list ./... | grep -v vendor); do
+ go test -race -coverprofile=profile.out -covermode=atomic "$d"
+ if [ -f profile.out ]; then
+ cat profile.out >> coverage.txt
+ rm profile.out
+ fi
+done
diff --git a/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/mattn/go-isatty/isatty_bsd.go
new file mode 100644
index 0000000..d0ea68f
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_bsd.go
@@ -0,0 +1,20 @@
+//go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine && !tinygo
+// +build darwin freebsd openbsd netbsd dragonfly hurd
+// +build !appengine
+// +build !tinygo
+
+package isatty
+
+import "golang.org/x/sys/unix"
+
+// IsTerminal return true if the file descriptor is terminal.
+func IsTerminal(fd uintptr) bool {
+ _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA)
+ return err == nil
+}
+
+// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
+// terminal. This is also always false on this environment.
+func IsCygwinTerminal(fd uintptr) bool {
+ return false
+}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_others.go b/vendor/github.com/mattn/go-isatty/isatty_others.go
new file mode 100644
index 0000000..7402e06
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_others.go
@@ -0,0 +1,17 @@
+//go:build (appengine || js || nacl || tinygo || wasm) && !windows
+// +build appengine js nacl tinygo wasm
+// +build !windows
+
+package isatty
+
+// IsTerminal returns true if the file descriptor is terminal which
+// is always false on js and appengine classic which is a sandboxed PaaS.
+func IsTerminal(fd uintptr) bool {
+ return false
+}
+
+// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2
+// terminal. This is also always false on this environment.
+func IsCygwinTerminal(fd uintptr) bool {
+ return false
+}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_plan9.go b/vendor/github.com/mattn/go-isatty/isatty_plan9.go
new file mode 100644
index 0000000..bae7f9b
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_plan9.go
@@ -0,0 +1,23 @@
+//go:build plan9
+// +build plan9
+
+package isatty
+
+import (
+ "syscall"
+)
+
+// IsTerminal returns true if the given file descriptor is a terminal.
+func IsTerminal(fd uintptr) bool {
+ path, err := syscall.Fd2path(int(fd))
+ if err != nil {
+ return false
+ }
+ return path == "/dev/cons" || path == "/mnt/term/dev/cons"
+}
+
+// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
+// terminal. This is also always false on this environment.
+func IsCygwinTerminal(fd uintptr) bool {
+ return false
+}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_solaris.go b/vendor/github.com/mattn/go-isatty/isatty_solaris.go
new file mode 100644
index 0000000..0c3acf2
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_solaris.go
@@ -0,0 +1,21 @@
+//go:build solaris && !appengine
+// +build solaris,!appengine
+
+package isatty
+
+import (
+ "golang.org/x/sys/unix"
+)
+
+// IsTerminal returns true if the given file descriptor is a terminal.
+// see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c
+func IsTerminal(fd uintptr) bool {
+ _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA)
+ return err == nil
+}
+
+// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
+// terminal. This is also always false on this environment.
+func IsCygwinTerminal(fd uintptr) bool {
+ return false
+}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_tcgets.go b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go
new file mode 100644
index 0000000..0337d8c
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go
@@ -0,0 +1,20 @@
+//go:build (linux || aix || zos) && !appengine && !tinygo
+// +build linux aix zos
+// +build !appengine
+// +build !tinygo
+
+package isatty
+
+import "golang.org/x/sys/unix"
+
+// IsTerminal return true if the file descriptor is terminal.
+func IsTerminal(fd uintptr) bool {
+ _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
+ return err == nil
+}
+
+// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
+// terminal. This is also always false on this environment.
+func IsCygwinTerminal(fd uintptr) bool {
+ return false
+}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/mattn/go-isatty/isatty_windows.go
new file mode 100644
index 0000000..8e3c991
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_windows.go
@@ -0,0 +1,125 @@
+//go:build windows && !appengine
+// +build windows,!appengine
+
+package isatty
+
+import (
+ "errors"
+ "strings"
+ "syscall"
+ "unicode/utf16"
+ "unsafe"
+)
+
+const (
+ objectNameInfo uintptr = 1
+ fileNameInfo = 2
+ fileTypePipe = 3
+)
+
+var (
+ kernel32 = syscall.NewLazyDLL("kernel32.dll")
+ ntdll = syscall.NewLazyDLL("ntdll.dll")
+ procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
+ procGetFileInformationByHandleEx = kernel32.NewProc("GetFileInformationByHandleEx")
+ procGetFileType = kernel32.NewProc("GetFileType")
+ procNtQueryObject = ntdll.NewProc("NtQueryObject")
+)
+
+func init() {
+ // Check if GetFileInformationByHandleEx is available.
+ if procGetFileInformationByHandleEx.Find() != nil {
+ procGetFileInformationByHandleEx = nil
+ }
+}
+
+// IsTerminal return true if the file descriptor is terminal.
+func IsTerminal(fd uintptr) bool {
+ var st uint32
+ r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0)
+ return r != 0 && e == 0
+}
+
+// Check pipe name is used for cygwin/msys2 pty.
+// Cygwin/MSYS2 PTY has a name like:
+// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master
+func isCygwinPipeName(name string) bool {
+ token := strings.Split(name, "-")
+ if len(token) < 5 {
+ return false
+ }
+
+ if token[0] != `\msys` &&
+ token[0] != `\cygwin` &&
+ token[0] != `\Device\NamedPipe\msys` &&
+ token[0] != `\Device\NamedPipe\cygwin` {
+ return false
+ }
+
+ if token[1] == "" {
+ return false
+ }
+
+ if !strings.HasPrefix(token[2], "pty") {
+ return false
+ }
+
+ if token[3] != `from` && token[3] != `to` {
+ return false
+ }
+
+ if token[4] != "master" {
+ return false
+ }
+
+ return true
+}
+
+// getFileNameByHandle use the undocomented ntdll NtQueryObject to get file full name from file handler
+// since GetFileInformationByHandleEx is not available under windows Vista and still some old fashion
+// guys are using Windows XP, this is a workaround for those guys, it will also work on system from
+// Windows vista to 10
+// see https://stackoverflow.com/a/18792477 for details
+func getFileNameByHandle(fd uintptr) (string, error) {
+ if procNtQueryObject == nil {
+ return "", errors.New("ntdll.dll: NtQueryObject not supported")
+ }
+
+ var buf [4 + syscall.MAX_PATH]uint16
+ var result int
+ r, _, e := syscall.Syscall6(procNtQueryObject.Addr(), 5,
+ fd, objectNameInfo, uintptr(unsafe.Pointer(&buf)), uintptr(2*len(buf)), uintptr(unsafe.Pointer(&result)), 0)
+ if r != 0 {
+ return "", e
+ }
+ return string(utf16.Decode(buf[4 : 4+buf[0]/2])), nil
+}
+
+// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2
+// terminal.
+func IsCygwinTerminal(fd uintptr) bool {
+ if procGetFileInformationByHandleEx == nil {
+ name, err := getFileNameByHandle(fd)
+ if err != nil {
+ return false
+ }
+ return isCygwinPipeName(name)
+ }
+
+ // Cygwin/msys's pty is a pipe.
+ ft, _, e := syscall.Syscall(procGetFileType.Addr(), 1, fd, 0, 0)
+ if ft != fileTypePipe || e != 0 {
+ return false
+ }
+
+ var buf [2 + syscall.MAX_PATH]uint16
+ r, _, e := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(),
+ 4, fd, fileNameInfo, uintptr(unsafe.Pointer(&buf)),
+ uintptr(len(buf)*2), 0, 0)
+ if r == 0 || e != 0 {
+ return false
+ }
+
+ l := *(*uint32)(unsafe.Pointer(&buf))
+ return isCygwinPipeName(string(utf16.Decode(buf[2 : 2+l/2])))
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/.gitignore b/vendor/github.com/neilotoole/jsoncolor/.gitignore
new file mode 100644
index 0000000..97fe1d6
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/.gitignore
@@ -0,0 +1,21 @@
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, built with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# Dependency directories (remove the comment below to include it)
+# vendor/
+
+*.iml
+.idea
+TODO.md
+**/.DS_Store
+/scratch/
diff --git a/vendor/github.com/neilotoole/jsoncolor/.golangci.yml b/vendor/github.com/neilotoole/jsoncolor/.golangci.yml
new file mode 100644
index 0000000..a53fb78
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/.golangci.yml
@@ -0,0 +1,334 @@
+# This code is licensed under the terms of the MIT license.
+
+## Golden config for golangci-lint v1.54
+#
+# This is the best config for golangci-lint based on my experience and opinion.
+# It is very strict, but not extremely strict.
+# Feel free to adopt and change it for your needs.
+#
+# @neilotoole: ^^ Well, it's less strict now!
+# Based on: https://gist.github.com/maratori/47a4d00457a92aa426dbd48a18776322
+
+run:
+ # Timeout for analysis, e.g. 30s, 5m.
+ # Default: 1m
+ timeout: 5m
+
+ tests: false
+
+ skip-dirs:
+ - scratch
+
+
+
+
+
+output:
+ sort-results: true
+
+# This file contains only configs which differ from defaults.
+# All possible options can be found here https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
+linters-settings:
+ cyclop:
+ # The maximal code complexity to report.
+ # Default: 10
+ max-complexity: 50
+ # The maximal average package complexity.
+ # If it's higher than 0.0 (float) the check is enabled
+ # Default: 0.0
+ package-average: 10.0
+
+ errcheck:
+ # Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
+ # Such cases aren't reported by default.
+ # Default: false
+ check-type-assertions: true
+
+ exhaustive:
+ # Program elements to check for exhaustiveness.
+ # Default: [ switch ]
+ check:
+ - switch
+ - map
+
+ funlen:
+ # Checks the number of lines in a function.
+ # If lower than 0, disable the check.
+ # Default: 60
+ lines: 150
+ # Checks the number of statements in a function.
+ # If lower than 0, disable the check.
+ # Default: 40
+ statements: 100
+
+ gocognit:
+ # Minimal code complexity to report
+ # Default: 30 (but we recommend 10-20)
+ min-complexity: 50
+
+ gocritic:
+ # Settings passed to gocritic.
+ # The settings key is the name of a supported gocritic checker.
+ # The list of supported checkers can be find in https://go-critic.github.io/overview.
+ settings:
+ captLocal:
+ # Whether to restrict checker to params only.
+ # Default: true
+ paramsOnly: false
+ underef:
+ # Whether to skip (*x).method() calls where x is a pointer receiver.
+ # Default: true
+ skipRecvDeref: false
+
+ gocyclo:
+ # Minimal code complexity to report.
+ # Default: 30 (but we recommend 10-20)
+ min-complexity: 50
+
+ gofumpt:
+ # Module path which contains the source code being formatted.
+ # Default: ""
+ module-path: github.com/neilotoole/jsoncolor
+ # Choose whether to use the extra rules.
+ # Default: false
+ extra-rules: true
+
+ gomnd:
+ # List of function patterns to exclude from analysis.
+ # Values always ignored: `time.Date`,
+ # `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
+ # `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
+ # Default: []
+ ignored-functions:
+ - make
+ - os.Chmod
+ - os.Mkdir
+ - os.MkdirAll
+ - os.OpenFile
+ - os.WriteFile
+ - prometheus.ExponentialBuckets
+ - prometheus.ExponentialBucketsRange
+ - prometheus.LinearBuckets
+ ignored-numbers:
+ - "2"
+ - "3"
+
+ gomodguard:
+ blocked:
+ # List of blocked modules.
+ # Default: []
+ modules:
+ - github.com/golang/protobuf:
+ recommendations:
+ - google.golang.org/protobuf
+ reason: "see https://developers.google.com/protocol-buffers/docs/reference/go/faq#modules"
+ - github.com/satori/go.uuid:
+ recommendations:
+ - github.com/google/uuid
+ reason: "satori's package is not maintained"
+ - github.com/gofrs/uuid:
+ recommendations:
+ - github.com/google/uuid
+ reason: "gofrs' package is not go module"
+
+ govet:
+ # Enable all analyzers.
+ # Default: false
+ enable-all: true
+ # Disable analyzers by name.
+ # Run `go tool vet help` to see all analyzers.
+ # Default: []
+ disable:
+ - fieldalignment # too strict
+ # Settings per analyzer.
+ settings:
+ shadow:
+ # Whether to be strict about shadowing; can be noisy.
+ # Default: false
+ strict: false
+
+ lll:
+ # Max line length, lines longer will be reported.
+ # '\t' is counted as 1 character by default, and can be changed with the tab-width option.
+ # Default: 120.
+ line-length: 120
+ # Tab width in spaces.
+ # Default: 1
+ tab-width: 1
+
+ nakedret:
+ # Make an issue if func has more lines of code than this setting, and it has naked returns.
+ # Default: 30
+ max-func-lines: 0
+
+ nestif:
+ # Minimal complexity of if statements to report.
+ # Default: 5
+ min-complexity: 20
+
+ nolintlint:
+ # Exclude following linters from requiring an explanation.
+ # Default: []
+ allow-no-explanation: [ funlen, gocognit, lll ]
+ # Enable to require an explanation of nonzero length after each nolint directive.
+ # Default: false
+ require-explanation: false
+ # Enable to require nolint directives to mention the specific linter being suppressed.
+ # Default: false
+ require-specific: true
+
+ rowserrcheck:
+ # database/sql is always checked
+ # Default: []
+ packages:
+# - github.com/jmoiron/sqlx
+
+ tenv:
+ # The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures.
+ # Otherwise, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked.
+ # Default: false
+ all: true
+
+
+linters:
+ disable-all: true
+
+ enable:
+ ## enabled by default
+ - errcheck # checking for unchecked errors, these unchecked errors can be critical bugs in some cases
+ - gosimple # specializes in simplifying a code
+ - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # detects when assignments to existing variables are not used
+ - staticcheck # is a go vet on steroids, applying a ton of static analysis checks
+ - typecheck # like the front-end of a Go compiler, parses and type-checks Go code
+ - unused # checks for unused constants, variables, functions and types
+
+
+ # ## disabled by default
+ - asasalint # checks for pass []any as any in variadic func(...any)
+ - asciicheck # checks that your code does not contain non-ASCII identifiers
+ - bidichk # checks for dangerous unicode character sequences
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - cyclop # checks function and package cyclomatic complexity
+ - dupl # tool for code clone detection
+ - durationcheck # checks for two durations multiplied together
+ - errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
+ - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
+ - execinquery # checks query string in Query function which reads your Go src files and warning it finds
+ - exhaustive # checks exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - forbidigo # forbids identifiers
+ - funlen # tool for detection of long functions
+ - gochecknoinits # checks that no init functions are present in Go code
+ - gocognit # computes and checks the cognitive complexity of functions
+ - goconst # finds repeated strings that could be replaced by a constant
+ - gocritic # provides diagnostics that check for bugs, performance and style issues
+ - gocyclo # computes and checks the cyclomatic complexity of functions
+ - godot # checks if comments end in a period
+ - gofumpt
+ - goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt
+ # - gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod
+ - gomodguard # allow and block lists linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations
+ - goprintffuncname # checks that printf-like functions are named with f at the end
+ - gosec # inspects source code for security problems
+ - lll # reports long lines
+ - loggercheck # checks key value pairs for common logger libraries (kitlog,klog,logr,zap)
+ - makezero # finds slice declarations with non-zero initial length
+ - nakedret # finds naked returns in functions greater than a specified function length
+ - nestif # reports deeply nested if statements
+ - nilerr # finds the code that returns nil even if it checks that the error is not nil
+ - nilnil # checks that there is no simultaneous return of nil error and an invalid value
+ - noctx # finds sending http request without context.Context
+ - nolintlint # reports ill-formed or insufficient nolint directives
+ - nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL
+ - predeclared # finds code that shadows one of Go's predeclared identifiers
+ - promlinter # checks Prometheus metrics naming via promlint
+ - reassign # checks that package variables are not reassigned
+ - revive # fast, configurable, extensible, flexible, and beautiful linter for Go, drop-in replacement of golint
+ - stylecheck # is a replacement for golint
+ - tenv # detects using os.Setenv instead of t.Setenv since Go1.17
+ - testableexamples # checks if examples are testable (have an expected output)
+ - tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes
+ - unconvert # removes unnecessary type conversions
+ - unparam # reports unused function parameters
+ - usestdlibvars # detects the possibility to use variables/constants from the Go standard library
+ - whitespace # detects leading and trailing whitespace
+
+ ## These three linters are disabled for now due to generics: https://github.com/golangci/golangci-lint/issues/2649
+ #- rowserrcheck # checks whether Err of rows is checked successfully # Disabled because: https://github.com/golangci/golangci-lint/issues/2649
+ #- sqlclosecheck # checks that sql.Rows and sql.Stmt are closed
+ #- wastedassign # finds wasted assignment statements
+
+
+ ## you may want to enable
+ #- decorder # checks declaration order and count of types, constants, variables and functions
+ #- exhaustruct # checks if all structure fields are initialized
+ #- gochecknoglobals # checks that no global variables exist
+ #- godox # detects FIXME, TODO and other comment keywords
+ #- goheader # checks is file header matches to pattern
+ #- gomnd # detects magic numbers
+ #- interfacebloat # checks the number of methods inside an interface
+ #- ireturn # accept interfaces, return concrete types
+ #- prealloc # [premature optimization, but can be used in some cases] finds slice declarations that could potentially be preallocated
+ #- varnamelen # [great idea, but too many false positives] checks that the length of a variable's name matches its scope
+ #- wrapcheck # checks that errors returned from external packages are wrapped
+
+ ## disabled
+ #- containedctx # detects struct contained context.Context field
+ #- contextcheck # [too many false positives] checks the function whether use a non-inherited context
+ #- depguard # [replaced by gomodguard] checks if package imports are in a list of acceptable packages
+ #- dogsled # checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ #- dupword # [useless without config] checks for duplicate words in the source code
+ #- errchkjson # [don't see profit + I'm against of omitting errors like in the first example https://github.com/breml/errchkjson] checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted
+ #- forcetypeassert # [replaced by errcheck] finds forced type assertions
+ #- goerr113 # [too strict] checks the errors handling expressions
+ #- gofmt # [replaced by goimports] checks whether code was gofmt-ed
+ #- gofumpt # [replaced by goimports, gofumports is not available yet] checks whether code was gofumpt-ed
+ #- grouper # analyzes expression groups
+ #- importas # enforces consistent import aliases
+ #- maintidx # measures the maintainability index of each function
+ #- misspell # [useless] finds commonly misspelled English words in comments
+ #- nlreturn # [too strict and mostly code is not more readable] checks for a new line before return and branch statements to increase code clarity
+ #- paralleltest # [too many false positives] detects missing usage of t.Parallel() method in your Go test
+ #- tagliatelle # checks the struct tags
+ #- thelper # detects golang test helpers without t.Helper() call and checks the consistency of test helpers
+ #- wsl # [too strict and mostly code is not more readable] whitespace linter forces you to use empty lines
+
+ ## deprecated
+ #- deadcode # [deprecated, replaced by unused] finds unused code
+ #- exhaustivestruct # [deprecated, replaced by exhaustruct] checks if all struct's fields are initialized
+ #- golint # [deprecated, replaced by revive] golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ #- ifshort # [deprecated] checks that your code uses short syntax for if-statements whenever possible
+ #- interfacer # [deprecated] suggests narrower interface types
+ #- maligned # [deprecated, replaced by govet fieldalignment] detects Go structs that would take less memory if their fields were sorted
+ #- nosnakecase # [deprecated, replaced by revive var-naming] detects snake case of variable naming and function name
+ #- scopelint # [deprecated, replaced by exportloopref] checks for unpinned variables in go programs
+ #- structcheck # [deprecated, replaced by unused] finds unused struct fields
+ #- varcheck # [deprecated, replaced by unused] finds unused global variables and constants
+
+
+issues:
+ # Maximum count of issues with the same text.
+ # Set to 0 to disable.
+ # Default: 3
+ max-same-issues: 3
+
+ exclude-rules:
+ - source: "^//\\s*go:generate\\s"
+ linters: [ lll ]
+ - source: "(noinspection|TODO)"
+ linters: [ godot ]
+ - source: "//noinspection"
+ linters: [ gocritic ]
+ - source: "^\\s+if _, ok := err\\.\\([^.]+\\.InternalError\\); ok {"
+ linters: [ errorlint ]
+ - path: "_test\\.go"
+ linters:
+ - bodyclose
+ - dupl
+ - funlen
+ - goconst
+ - gosec
+ - noctx
+ - wrapcheck
+
diff --git a/vendor/github.com/neilotoole/jsoncolor/LICENSE b/vendor/github.com/neilotoole/jsoncolor/LICENSE
new file mode 100644
index 0000000..76e1f9c
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 Neil O'Toole
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/neilotoole/jsoncolor/README.md b/vendor/github.com/neilotoole/jsoncolor/README.md
new file mode 100644
index 0000000..a8da54c
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/README.md
@@ -0,0 +1,241 @@
+[![Actions Status](https://github.com/neilotoole/jsoncolor/workflows/Go/badge.svg)](https://github.com/neilotoole/jsoncolor/actions?query=workflow%3AGo)
+[![Go Report Card](https://goreportcard.com/badge/neilotoole/jsoncolor)](https://goreportcard.com/report/neilotoole/jsoncolor)
+[![release](https://img.shields.io/badge/release-v0.7.0-green.svg)](https://github.com/neilotoole/jsoncolor/releases/tag/v0.7.0)
+[![Go Reference](https://pkg.go.dev/badge/github.com/neilotoole/jsoncolor.svg)](https://pkg.go.dev/github.com/neilotoole/jsoncolor)
+[![license](https://img.shields.io/github/license/neilotoole/jsoncolor)](./LICENSE)
+
+# jsoncolor
+
+Package `neilotoole/jsoncolor` is a drop-in replacement for stdlib
+[`encoding/json`](https://pkg.go.dev/encoding/json) that outputs colorized JSON.
+
+Why? Well, [`jq`](https://jqlang.github.io/jq/) colorizes its output by default, and color output
+is desirable for many Go CLIs. This package performs colorization (and indentation) inline
+in the encoder, and is significantly faster than stdlib at indentation.
+
+From the example [`jc`](./cmd/jc/main.go) app:
+
+![jsoncolor-output](./splash.png)
+
+## Usage
+
+Get the package per the normal mechanism (requires Go 1.16+):
+
+```shell
+go get -u github.com/neilotoole/jsoncolor
+```
+
+Then:
+
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/mattn/go-colorable"
+ json "github.com/neilotoole/jsoncolor"
+ "os"
+)
+
+func main() {
+ var enc *json.Encoder
+
+ // Note: this check will fail if running inside Goland (and
+ // other IDEs?) as IsColorTerminal will return false.
+ if json.IsColorTerminal(os.Stdout) {
+ // Safe to use color
+ out := colorable.NewColorable(os.Stdout) // needed for Windows
+ enc = json.NewEncoder(out)
+
+ // DefaultColors are similar to jq
+ clrs := json.DefaultColors()
+
+ // Change some values, just for fun
+ clrs.Bool = json.Color("\x1b[36m") // Change the bool color
+ clrs.String = json.Color{} // Disable the string color
+
+ enc.SetColors(clrs)
+ } else {
+ // Can't use color; but the encoder will still work
+ enc = json.NewEncoder(os.Stdout)
+ }
+
+ m := map[string]interface{}{
+ "a": 1,
+ "b": true,
+ "c": "hello",
+ }
+
+ if err := enc.Encode(m); err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(1)
+ }
+}
+```
+
+### Configuration
+
+To enable colorization, invoke [`enc.SetColors`](https://pkg.go.dev/github.com/neilotoole/jsoncolor#Encoder.SetColors).
+
+The [`Colors`](https://pkg.go.dev/github.com/neilotoole/jsoncolor#Colors) struct
+holds color config. The zero value and `nil` are both safe for use (resulting in no colorization).
+
+The [`DefaultColors`](https://pkg.go.dev/github.com/neilotoole/jsoncolor#DefaultColors) func
+returns a `Colors` struct that produces results similar to `jq`:
+
+```go
+// DefaultColors returns the default Colors configuration.
+// These colors largely follow jq's default colorization,
+// with some deviation.
+func DefaultColors() *Colors {
+ return &Colors{
+ Null: Color("\x1b[2m"),
+ Bool: Color("\x1b[1m"),
+ Number: Color("\x1b[36m"),
+ String: Color("\x1b[32m"),
+ Key: Color("\x1b[34;1m"),
+ Bytes: Color("\x1b[2m"),
+ Time: Color("\x1b[32;2m"),
+ Punc: Color{}, // No colorization
+ }
+}
+```
+
+As seen above, use the `Color` zero value (`Color{}`) to
+disable colorization for that JSON element.
+
+### Helper for `fatih/color`
+
+It can be inconvenient to use terminal codes, e.g. `json.Color("\x1b[36m")`.
+A helper package provides an adapter for [`fatih/color`](https://github.com/fatih/color).
+
+```go
+ // import "github.com/neilotoole/jsoncolor/helper/fatihcolor"
+ // import "github.com/fatih/color"
+ // import "github.com/mattn/go-colorable"
+
+ out := colorable.NewColorable(os.Stdout) // needed for Windows
+ enc = json.NewEncoder(out)
+
+ fclrs := fatihcolor.DefaultColors()
+ // Change some values, just for fun
+ fclrs.Number = color.New(color.FgBlue)
+ fclrs.String = color.New(color.FgCyan)
+
+ clrs := fatihcolor.ToCoreColors(fclrs)
+ enc.SetColors(clrs)
+```
+
+### Drop-in for `encoding/json`
+
+This package is a full drop-in for stdlib [`encoding/json`](https://pkg.go.dev/encoding/json)
+(thanks to the ancestral [`segmentio/encoding/json`](https://pkg.go.dev/github.com/segmentio/encoding/json)
+pkg being a full drop-in).
+
+To drop-in, just use an import alias:
+
+```go
+ import json "github.com/neilotoole/jsoncolor"
+```
+
+## Example app: `jc`
+
+See [`cmd/jc`](cmd/jc/main.go) for a trivial CLI implementation that can accept JSON input,
+and output that JSON in color.
+
+```shell
+# From project root
+$ go install ./cmd/jc
+$ cat ./testdata/sakila_actor.json | jc
+```
+
+## Benchmarks
+
+Note that this package contains [`golang_bench_test.go`](./golang_bench_test.go), which
+is inherited from `segmentj`. But here we're interested in [`benchmark_test.go:BenchmarkEncode`](./benchmark_test.go),
+which benchmarks encoding performance versus other JSON encoder packages.
+The results below benchmark the following:
+
+- Stdlib [`encoding/json`](https://pkg.go.dev/encoding/json) (`go1.17.1`).
+- [`segmentj`](https://github.com/segmentio/encoding): `v0.1.14`, which was when `jsoncolor` was forked. The newer `segmentj` code performs even better.
+- `neilotoole/jsoncolor`: (this package) `v0.6.0`.
+- [`nwidger/jsoncolor`](https://github.com/nwidger/jsoncolor): `v0.3.0`, latest at time of benchmarks.
+
+Note that two other Go JSON colorization packages ([`hokaccha/go-prettyjson`](https://github.com/hokaccha/go-prettyjson) and
+[`TylerBrock/colorjson`](https://github.com/TylerBrock/colorjson)) are excluded from
+these benchmarks because they do not provide a stdlib-compatible `Encoder` impl.
+
+```
+$ go test -bench=BenchmarkEncode -benchtime="5s"
+goarch: amd64
+pkg: github.com/neilotoole/jsoncolor
+cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
+BenchmarkEncode/stdlib_NoIndent-16 181 33047390 ns/op 8870685 B/op 120022 allocs/op
+BenchmarkEncode/stdlib_Indent-16 124 48093178 ns/op 10470366 B/op 120033 allocs/op
+BenchmarkEncode/segmentj_NoIndent-16 415 14658699 ns/op 3788911 B/op 10020 allocs/op
+BenchmarkEncode/segmentj_Indent-16 195 30628798 ns/op 5404492 B/op 10025 allocs/op
+BenchmarkEncode/neilotoole_NoIndent_NoColor-16 362 16522399 ns/op 3789034 B/op 10020 allocs/op
+BenchmarkEncode/neilotoole_Indent_NoColor-16 303 20146856 ns/op 5460753 B/op 10021 allocs/op
+BenchmarkEncode/neilotoole_NoIndent_Color-16 295 19989420 ns/op 10326019 B/op 10029 allocs/op
+BenchmarkEncode/neilotoole_Indent_Color-16 246 24714163 ns/op 11996890 B/op 10030 allocs/op
+BenchmarkEncode/nwidger_NoIndent_NoColor-16 10 541107983 ns/op 92934231 B/op 4490210 allocs/op
+BenchmarkEncode/nwidger_Indent_NoColor-16 7 798088086 ns/op 117258321 B/op 6290213 allocs/op
+BenchmarkEncode/nwidger_indent_NoIndent_Colo-16 10 542002051 ns/op 92935639 B/op 4490224 allocs/op
+BenchmarkEncode/nwidger_indent_Indent_Color-16 7 799928353 ns/op 117259195 B/op 6290220 allocs/op
+```
+
+As always, take benchmarks with a large grain of salt, as they're based on a (small) synthetic benchmark.
+More benchmarks would give a better picture (and note as well that the benchmarked `segmentj` is an older version, `v0.1.14`).
+
+All that having been said, what can we surmise from these particular results?
+
+- `segmentj` performs better than `stdlib` at all encoding tasks.
+- `jsoncolor` performs better than `segmentj` for indentation (which makes sense, as indentation is performed inline).
+- `jsoncolor` performs better than `stdlib` at all encoding tasks.
+
+Again, trust these benchmarks at your peril. Create your own benchmarks for your own workload.
+
+## Notes
+
+- The [`.golangci.yml`](./.golangci.yml) linter settings have been fiddled with to hush some
+ linting issues inherited from the `segmentio` codebase at the time of forking. Thus, the linter report
+ may not be of great use. In an ideal world, the `jsoncolor` functionality would be [ported](https://github.com/neilotoole/jsoncolor/issues/15) to a
+ more recent (and better-linted) version of the `segementio` codebase.
+- The `segmentio` encoder (at least as of `v0.1.14`) encodes `time.Duration` as string, while `stdlib` outputs as `int64`.
+ This package follows `stdlib`.
+- The [`Colors.Punc`](https://pkg.go.dev/github.com/neilotoole/jsoncolor#Colors) field controls all
+ punctuation colorization, i.e. `[]{},:"`. It is probably worthwhile to [separate](https://github.com/neilotoole/jsoncolor/issues/16)
+ these out into individually-configurable elements.
+
+<a name="history"></a>
+## CHANGELOG
+
+History: this package is an extract of [`sq`](https://github.com/neilotoole/sq)'s JSON encoding package, which itself is a fork of the
+[`segmentio/encoding`](https://github.com/segmentio/encoding) JSON encoding package. Note that the
+original `sq` JSON encoder was forked from Segment's codebase at `v0.1.14`, so
+the codebases have drifted significantly by now.
+
+### [v0.7.1](https://github.com/neilotoole/jsoncolor/releases/tag/v0.7.1)
+
+- [#27](https://github.com/neilotoole/jsoncolor/pull/27): Improved Windows terminal color support checking.
+
+### [v0.7.0](https://github.com/neilotoole/jsoncolor/releases/tag/v0.7.0)
+
+- [#21](https://github.com/neilotoole/jsoncolor/pull/21): Support for [`encoding.TextMarshaler`](https://pkg.go.dev/encoding#TextMarshaler).
+- [#22](https://github.com/neilotoole/jsoncolor/pull/22): Removed redundant dependencies.
+- [#26](https://github.com/neilotoole/jsoncolor/pull/26): Updated dependencies.
+
+## Acknowledgments
+
+- [`jq`](https://stedolan.github.io/jq/): sine qua non.
+- [`segmentio/encoding`](https://github.com/segmentio/encoding): `jsoncolor` is layered into Segment's JSON encoder. They did the hard work. Much gratitude to that team.
+- [`sq`](https://github.com/neilotoole/sq): `jsoncolor` is effectively an extract of code created specifically for `sq`.
+- [`mattn/go-colorable`](https://github.com/mattn/go-colorable): no project is complete without `mattn` having played a role.
+- [`fatih/color`](https://github.com/fatih/color): the color library.
+- [`@hermannm`](https://github.com/hermannm): for several PRs.
+
+### Related
+
+- [`nwidger/jsoncolor`](https://github.com/nwidger/jsoncolor)
+- [`hokaccha/go-prettyjson`](https://github.com/hokaccha/go-prettyjson)
+- [`TylerBrock/colorjson`](https://github.com/TylerBrock/colorjson)
diff --git a/vendor/github.com/neilotoole/jsoncolor/SECURITY.md b/vendor/github.com/neilotoole/jsoncolor/SECURITY.md
new file mode 100644
index 0000000..af83493
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/SECURITY.md
@@ -0,0 +1,14 @@
+# Security Policy
+
+## Supported Versions
+
+
+| Version | Supported |
+| ------- | ------------------ |
+| v0.7.0 | :white_check_mark: |
+| v0.6.0 | :x: |
+
+
+## Reporting a Vulnerability
+
+Open an [issue](https://github.com/neilotoole/jsoncolor/issues/new).
diff --git a/vendor/github.com/neilotoole/jsoncolor/SEGMENTIO_README.md b/vendor/github.com/neilotoole/jsoncolor/SEGMENTIO_README.md
new file mode 100644
index 0000000..c5ed94b
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/SEGMENTIO_README.md
@@ -0,0 +1,76 @@
+# encoding/json [![GoDoc](https://godoc.org/github.com/segmentio/encoding/json?status.svg)](https://godoc.org/github.com/segmentio/encoding/json)
+
+Go package offering a replacement implementation of the standard library's
+[`encoding/json`](https://golang.org/pkg/encoding/json/) package, with much
+better performance.
+
+## Usage
+
+The exported API of this package mirrors the standard library's
+[`encoding/json`](https://golang.org/pkg/encoding/json/) package, the only
+change needed to take advantage of the performance improvements is the import
+path of the `json` package, from:
+```go
+import (
+ "encoding/json"
+)
+```
+to
+```go
+import (
+ "github.com/segmentio/encoding/json"
+)
+```
+
+One way to gain higher encoding throughput is to disable HTML escaping.
+It allows the string encoding to use a much more efficient code path which
+does not require parsing UTF-8 runes most of the time.
+
+## Performance Improvements
+
+The internal implementation uses a fair amount of unsafe operations (untyped
+code, pointer arithmetic, etc...) to avoid using reflection as much as possible,
+which is often the reason why serialization code has a large CPU and memory
+footprint.
+
+The package aims for zero unnecessary dynamic memory allocations and hot code
+paths that are mostly free from calls into the reflect package.
+
+## Compatibility with encoding/json
+
+This package aims to be a drop-in replacement, therefore it is tested to behave
+exactly like the standard library's package. However, there are still a few
+missing features that have not been ported yet:
+
+- Streaming decoder, currently the `Decoder` implementation offered by the
+package does not support progressively reading values from a JSON array (unlike
+the standard library). In our experience this is a very rare use-case, if you
+need it you're better off sticking to the standard library, or spend a bit of
+time implementing it in here ;)
+
+Note that none of those features should result in performance degradations if
+they were implemented in the package, and we welcome contributions!
+
+## Trade-offs
+
+As one would expect, we had to make a couple of trade-offs to achieve greater
+performance than the standard library, but there were also features that we
+did not want to give away.
+
+Other open-source packages offering a reduced CPU and memory footprint usually
+do so by designing a different API, or require code generation (therefore adding
+complexity to the build process). These were not acceptable conditions for us,
+as we were not willing to trade off developer productivity for better runtime
+performance. To achieve this, we chose to exactly replicate the standard
+library interfaces and behavior, which meant the package implementation was the
+only area that we were able to work with. The internals of this package make
+heavy use of unsafe pointer arithmetics and other performance optimizations,
+and therefore are not as approachable as typical Go programs. Basically, we put
+a bigger burden on maintainers to achieve better runtime cost without
+sacrificing developer productivity.
+
+For these reasons, we also don't believe that this code should be ported upstream
+to the standard `encoding/json` package. The standard library has to remain
+readable and approachable to maximize stability and maintainability, and make
+projects like this one possible because a high quality reference implementation
+already exists.
diff --git a/vendor/github.com/neilotoole/jsoncolor/ascii.go b/vendor/github.com/neilotoole/jsoncolor/ascii.go
new file mode 100644
index 0000000..6c66eb5
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/ascii.go
@@ -0,0 +1,124 @@
+package jsoncolor
+
+import "unsafe"
+
+// asciiValid returns true if b contains only ASCII characters.
+//
+// From https://github.com/segmentio/encoding/blob/v0.1.14/ascii/valid.go#L28
+//
+//go:nosplit
+func asciiValid(b []byte) bool {
+ s, n := unsafe.Pointer(&b), uintptr(len(b))
+
+ i := uintptr(0)
+ p := *(*unsafe.Pointer)(s)
+
+ for n >= 8 {
+ if ((*(*uint64)(unsafe.Pointer(uintptr(p) + i))) & 0x8080808080808080) != 0 {
+ return false
+ }
+ i += 8
+ n -= 8
+ }
+
+ if n >= 4 {
+ if ((*(*uint32)(unsafe.Pointer(uintptr(p) + i))) & 0x80808080) != 0 {
+ return false
+ }
+ i += 4
+ n -= 4
+ }
+
+ var x uint32
+ switch n {
+ case 3:
+ x = uint32(*(*uint8)(unsafe.Pointer(uintptr(p) + i))) | uint32(*(*uint16)(unsafe.Pointer(uintptr(p) + i + 1)))<<8
+ case 2:
+ x = uint32(*(*uint16)(unsafe.Pointer(uintptr(p) + i)))
+ case 1:
+ x = uint32(*(*uint8)(unsafe.Pointer(uintptr(p) + i)))
+ default:
+ return true
+ }
+ return (x & 0x80808080) == 0
+}
+
+// asciiValidPrint returns true if b contains only printable ASCII characters.
+//
+// From https://github.com/segmentio/encoding/blob/v0.1.14/ascii/valid.go#L83
+//
+//go:nosplit
+func asciiValidPrint(b []byte) bool {
+ s, n := unsafe.Pointer(&b), uintptr(len(b))
+
+ if n == 0 {
+ return true
+ }
+
+ i := uintptr(0)
+ p := *(*unsafe.Pointer)(s)
+
+ for (n - i) >= 8 {
+ x := *(*uint64)(unsafe.Pointer(uintptr(p) + i))
+ if hasLess64(x, 0x20) || hasMore64(x, 0x7e) {
+ return false
+ }
+ i += 8
+ }
+
+ if (n - i) >= 4 {
+ x := *(*uint32)(unsafe.Pointer(uintptr(p) + i))
+ if hasLess32(x, 0x20) || hasMore32(x, 0x7e) {
+ return false
+ }
+ i += 4
+ }
+
+ var x uint32
+ switch n - i {
+ case 3:
+ x = 0x20000000 | uint32(*(*uint8)(unsafe.Pointer(uintptr(p) + i))) | uint32(*(*uint16)(unsafe.Pointer(uintptr(p) + i + 1)))<<8
+ case 2:
+ x = 0x20200000 | uint32(*(*uint16)(unsafe.Pointer(uintptr(p) + i)))
+ case 1:
+ x = 0x20202000 | uint32(*(*uint8)(unsafe.Pointer(uintptr(p) + i)))
+ default:
+ return true
+ }
+ return !(hasLess32(x, 0x20) || hasMore32(x, 0x7e))
+}
+
+// https://graphics.stanford.edu/~seander/bithacks.html#HasLessInWord
+const (
+ hasLessConstL64 = (^uint64(0)) / 255
+ hasLessConstR64 = hasLessConstL64 * 128
+
+ hasLessConstL32 = (^uint32(0)) / 255
+ hasLessConstR32 = hasLessConstL32 * 128
+
+ hasMoreConstL64 = (^uint64(0)) / 255
+ hasMoreConstR64 = hasMoreConstL64 * 128
+
+ hasMoreConstL32 = (^uint32(0)) / 255
+ hasMoreConstR32 = hasMoreConstL32 * 128
+)
+
+//go:nosplit
+func hasLess64(x, n uint64) bool {
+ return ((x - (hasLessConstL64 * n)) & ^x & hasLessConstR64) != 0
+}
+
+//go:nosplit
+func hasLess32(x, n uint32) bool {
+ return ((x - (hasLessConstL32 * n)) & ^x & hasLessConstR32) != 0
+}
+
+//go:nosplit
+func hasMore64(x, n uint64) bool {
+ return (((x + (hasMoreConstL64 * (127 - n))) | x) & hasMoreConstR64) != 0
+}
+
+//go:nosplit
+func hasMore32(x, n uint32) bool {
+ return (((x + (hasMoreConstL32 * (127 - n))) | x) & hasMoreConstR32) != 0
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/codec.go b/vendor/github.com/neilotoole/jsoncolor/codec.go
new file mode 100644
index 0000000..b3b42ef
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/codec.go
@@ -0,0 +1,1183 @@
+package jsoncolor
+
+import (
+ "encoding"
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "sort"
+ "strconv"
+ "strings"
+ "sync/atomic"
+ "time"
+ "unicode"
+ "unsafe"
+)
+
+type codec struct {
+ encode encodeFunc
+ decode decodeFunc
+}
+
+type encoder struct {
+ flags AppendFlags
+ clrs *Colors
+ indentr *indenter
+}
+type decoder struct{ flags ParseFlags }
+
+type encodeFunc func(encoder, []byte, unsafe.Pointer) ([]byte, error)
+type decodeFunc func(decoder, []byte, unsafe.Pointer) ([]byte, error)
+
+type emptyFunc func(unsafe.Pointer) bool
+type sortFunc func([]reflect.Value)
+
+var (
+ // Eventually consistent cache mapping go types to dynamically generated
+ // codecs.
+ //
+ // Note: using a uintptr as key instead of reflect.Type shaved ~15ns off of
+ // the ~30ns Marhsal/Unmarshal functions which were dominated by the map
+ // lookup time for simple types like bool, int, etc..
+ cache unsafe.Pointer // map[unsafe.Pointer]codec
+)
+
+func cacheLoad() map[unsafe.Pointer]codec {
+ p := atomic.LoadPointer(&cache)
+ return *(*map[unsafe.Pointer]codec)(unsafe.Pointer(&p))
+}
+
+func cacheStore(typ reflect.Type, cod codec, oldCodecs map[unsafe.Pointer]codec) {
+ newCodecs := make(map[unsafe.Pointer]codec, len(oldCodecs)+1)
+ newCodecs[typeid(typ)] = cod
+
+ for t, c := range oldCodecs {
+ newCodecs[t] = c
+ }
+
+ atomic.StorePointer(&cache, *(*unsafe.Pointer)(unsafe.Pointer(&newCodecs)))
+}
+
+func typeid(t reflect.Type) unsafe.Pointer {
+ return (*iface)(unsafe.Pointer(&t)).ptr
+}
+
+func constructCachedCodec(t reflect.Type, cache map[unsafe.Pointer]codec) codec {
+ c := constructCodec(t, map[reflect.Type]*structType{}, t.Kind() == reflect.Ptr)
+
+ if inlined(t) {
+ c.encode = constructInlineValueEncodeFunc(c.encode)
+ }
+
+ cacheStore(t, c, cache)
+ return c
+}
+
+func constructCodec(t reflect.Type, seen map[reflect.Type]*structType, canAddr bool) (c codec) {
+ switch t {
+ case nullType, nil:
+ c = codec{encode: encoder.encodeNull, decode: decoder.decodeNull}
+
+ case numberType:
+ c = codec{encode: encoder.encodeNumber, decode: decoder.decodeNumber}
+
+ case bytesType:
+ c = codec{encode: encoder.encodeBytes, decode: decoder.decodeBytes}
+
+ case durationType:
+ c = codec{encode: encoder.encodeDuration, decode: decoder.decodeDuration}
+
+ case timeType:
+ c = codec{encode: encoder.encodeTime, decode: decoder.decodeTime}
+
+ case interfaceType:
+ c = codec{encode: encoder.encodeInterface, decode: decoder.decodeInterface}
+
+ case rawMessageType:
+ c = codec{encode: encoder.encodeRawMessage, decode: decoder.decodeRawMessage}
+
+ case numberPtrType:
+ c = constructPointerCodec(numberPtrType, nil)
+
+ case durationPtrType:
+ c = constructPointerCodec(durationPtrType, nil)
+
+ case timePtrType:
+ c = constructPointerCodec(timePtrType, nil)
+
+ case rawMessagePtrType:
+ c = constructPointerCodec(rawMessagePtrType, nil)
+ }
+
+ if c.encode != nil {
+ return
+ }
+
+ switch t.Kind() {
+ case reflect.Bool:
+ c = codec{encode: encoder.encodeBool, decode: decoder.decodeBool}
+
+ case reflect.Int:
+ c = codec{encode: encoder.encodeInt, decode: decoder.decodeInt}
+
+ case reflect.Int8:
+ c = codec{encode: encoder.encodeInt8, decode: decoder.decodeInt8}
+
+ case reflect.Int16:
+ c = codec{encode: encoder.encodeInt16, decode: decoder.decodeInt16}
+
+ case reflect.Int32:
+ c = codec{encode: encoder.encodeInt32, decode: decoder.decodeInt32}
+
+ case reflect.Int64:
+ c = codec{encode: encoder.encodeInt64, decode: decoder.decodeInt64}
+
+ case reflect.Uint:
+ c = codec{encode: encoder.encodeUint, decode: decoder.decodeUint}
+
+ case reflect.Uintptr:
+ c = codec{encode: encoder.encodeUintptr, decode: decoder.decodeUintptr}
+
+ case reflect.Uint8:
+ c = codec{encode: encoder.encodeUint8, decode: decoder.decodeUint8}
+
+ case reflect.Uint16:
+ c = codec{encode: encoder.encodeUint16, decode: decoder.decodeUint16}
+
+ case reflect.Uint32:
+ c = codec{encode: encoder.encodeUint32, decode: decoder.decodeUint32}
+
+ case reflect.Uint64:
+ c = codec{encode: encoder.encodeUint64, decode: decoder.decodeUint64}
+
+ case reflect.Float32:
+ c = codec{encode: encoder.encodeFloat32, decode: decoder.decodeFloat32}
+
+ case reflect.Float64:
+ c = codec{encode: encoder.encodeFloat64, decode: decoder.decodeFloat64}
+
+ case reflect.String:
+ c = codec{encode: encoder.encodeString, decode: decoder.decodeString}
+
+ case reflect.Interface:
+ c = constructInterfaceCodec(t)
+
+ case reflect.Array:
+ c = constructArrayCodec(t, seen, canAddr)
+
+ case reflect.Slice:
+ c = constructSliceCodec(t, seen)
+
+ case reflect.Map:
+ c = constructMapCodec(t, seen)
+
+ case reflect.Struct:
+ c = constructStructCodec(t, seen, canAddr)
+
+ case reflect.Ptr:
+ c = constructPointerCodec(t, seen)
+
+ default:
+ c = constructUnsupportedTypeCodec(t)
+ }
+
+ p := reflect.PtrTo(t)
+
+ if canAddr {
+ switch {
+ case p.Implements(jsonMarshalerType):
+ c.encode = constructJSONMarshalerEncodeFunc(t, true)
+ case p.Implements(textMarshalerType):
+ c.encode = constructTextMarshalerEncodeFunc(t, true)
+ }
+ }
+
+ switch {
+ case t.Implements(jsonMarshalerType):
+ c.encode = constructJSONMarshalerEncodeFunc(t, false)
+ case t.Implements(textMarshalerType):
+ c.encode = constructTextMarshalerEncodeFunc(t, false)
+ }
+
+ switch {
+ case p.Implements(jsonUnmarshalerType):
+ c.decode = constructJSONUnmarshalerDecodeFunc(t, true)
+ case p.Implements(textUnmarshalerType):
+ c.decode = constructTextUnmarshalerDecodeFunc(t, true)
+ }
+
+ return
+}
+
+func constructStringCodec(t reflect.Type, seen map[reflect.Type]*structType, canAddr bool) codec {
+ c := constructCodec(t, seen, canAddr)
+ return codec{
+ encode: constructStringEncodeFunc(c.encode),
+ decode: constructStringDecodeFunc(c.decode),
+ }
+}
+
+func constructStringEncodeFunc(encode encodeFunc) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeToString(b, p, encode)
+ }
+}
+
+func constructStringDecodeFunc(decode decodeFunc) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeFromString(b, p, decode)
+ }
+}
+
+func constructStringToIntDecodeFunc(t reflect.Type, decode decodeFunc) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeFromStringToInt(b, p, t, decode)
+ }
+}
+
+func constructArrayCodec(t reflect.Type, seen map[reflect.Type]*structType, canAddr bool) codec {
+ e := t.Elem()
+ c := constructCodec(e, seen, canAddr)
+ s := alignedSize(e)
+ return codec{
+ encode: constructArrayEncodeFunc(s, t, c.encode),
+ decode: constructArrayDecodeFunc(s, t, c.decode),
+ }
+}
+
+func constructArrayEncodeFunc(size uintptr, t reflect.Type, encode encodeFunc) encodeFunc {
+ n := t.Len()
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeArray(b, p, n, size, t, encode)
+ }
+}
+
+func constructArrayDecodeFunc(size uintptr, t reflect.Type, decode decodeFunc) decodeFunc {
+ n := t.Len()
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeArray(b, p, n, size, t, decode)
+ }
+}
+
+func constructSliceCodec(t reflect.Type, seen map[reflect.Type]*structType) codec {
+ e := t.Elem()
+ s := alignedSize(e)
+
+ if e.Kind() == reflect.Uint8 {
+ // Go 1.7+ behavior: slices of byte types (and aliases) may override the
+ // default encoding and decoding behaviors by implementing marshaler and
+ // unmarshaler interfaces.
+ p := reflect.PtrTo(e)
+ c := codec{}
+
+ switch {
+ case e.Implements(jsonMarshalerType):
+ c.encode = constructJSONMarshalerEncodeFunc(e, false)
+ case e.Implements(textMarshalerType):
+ c.encode = constructTextMarshalerEncodeFunc(e, false)
+ case p.Implements(jsonMarshalerType):
+ c.encode = constructJSONMarshalerEncodeFunc(e, true)
+ case p.Implements(textMarshalerType):
+ c.encode = constructTextMarshalerEncodeFunc(e, true)
+ }
+
+ switch {
+ case e.Implements(jsonUnmarshalerType):
+ c.decode = constructJSONUnmarshalerDecodeFunc(e, false)
+ case e.Implements(textUnmarshalerType):
+ c.decode = constructTextUnmarshalerDecodeFunc(e, false)
+ case p.Implements(jsonUnmarshalerType):
+ c.decode = constructJSONUnmarshalerDecodeFunc(e, true)
+ case p.Implements(textUnmarshalerType):
+ c.decode = constructTextUnmarshalerDecodeFunc(e, true)
+ }
+
+ if c.encode != nil {
+ c.encode = constructSliceEncodeFunc(s, t, c.encode)
+ } else {
+ c.encode = encoder.encodeBytes
+ }
+
+ if c.decode != nil {
+ c.decode = constructSliceDecodeFunc(s, t, c.decode)
+ } else {
+ c.decode = decoder.decodeBytes
+ }
+
+ return c
+ }
+
+ c := constructCodec(e, seen, true)
+ return codec{
+ encode: constructSliceEncodeFunc(s, t, c.encode),
+ decode: constructSliceDecodeFunc(s, t, c.decode),
+ }
+}
+
+func constructSliceEncodeFunc(size uintptr, t reflect.Type, encode encodeFunc) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeSlice(b, p, size, t, encode)
+ }
+}
+
+func constructSliceDecodeFunc(size uintptr, t reflect.Type, decode decodeFunc) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeSlice(b, p, size, t, decode)
+ }
+}
+
+func constructMapCodec(t reflect.Type, seen map[reflect.Type]*structType) codec {
+ var sortKeys sortFunc
+ k := t.Key()
+ v := t.Elem()
+
+ // Faster implementations for some common cases.
+ switch {
+ case k == stringType && v == interfaceType:
+ return codec{
+ encode: encoder.encodeMapStringInterface,
+ decode: decoder.decodeMapStringInterface,
+ }
+
+ case k == stringType && v == rawMessageType:
+ return codec{
+ encode: encoder.encodeMapStringRawMessage,
+ decode: decoder.decodeMapStringRawMessage,
+ }
+ }
+
+ kc := codec{}
+ vc := constructCodec(v, seen, false)
+
+ if k.Implements(textMarshalerType) || reflect.PtrTo(k).Implements(textUnmarshalerType) {
+ kc.encode = constructTextMarshalerEncodeFunc(k, false)
+ kc.decode = constructTextUnmarshalerDecodeFunc(k, true)
+
+ sortKeys = func(keys []reflect.Value) {
+ sort.Slice(keys, func(i, j int) bool {
+ // This is a performance abomination but the use case is rare
+ // enough that it shouldn't be a problem in practice.
+ k1, _ := keys[i].Interface().(encoding.TextMarshaler).MarshalText()
+ k2, _ := keys[j].Interface().(encoding.TextMarshaler).MarshalText()
+ return string(k1) < string(k2)
+ })
+ }
+ } else {
+ switch k.Kind() {
+ case reflect.String:
+ kc.encode = encoder.encodeKey
+ kc.decode = decoder.decodeString
+
+ sortKeys = func(keys []reflect.Value) {
+ sort.Slice(keys, func(i, j int) bool { return keys[i].String() < keys[j].String() })
+ }
+
+ case reflect.Int,
+ reflect.Int8,
+ reflect.Int16,
+ reflect.Int32,
+ reflect.Int64:
+ kc = constructStringCodec(k, seen, false)
+
+ sortKeys = func(keys []reflect.Value) {
+ sort.Slice(keys, func(i, j int) bool { return intStringsAreSorted(keys[i].Int(), keys[j].Int()) })
+ }
+
+ case reflect.Uint,
+ reflect.Uintptr,
+ reflect.Uint8,
+ reflect.Uint16,
+ reflect.Uint32,
+ reflect.Uint64:
+ kc = constructStringCodec(k, seen, false)
+
+ sortKeys = func(keys []reflect.Value) {
+ sort.Slice(keys, func(i, j int) bool { return uintStringsAreSorted(keys[i].Uint(), keys[j].Uint()) })
+ }
+
+ default:
+ return constructUnsupportedTypeCodec(t)
+ }
+ }
+
+ if inlined(v) {
+ vc.encode = constructInlineValueEncodeFunc(vc.encode)
+ }
+
+ return codec{
+ encode: constructMapEncodeFunc(t, kc.encode, vc.encode, sortKeys),
+ decode: constructMapDecodeFunc(t, kc.decode, vc.decode),
+ }
+}
+
+func constructMapEncodeFunc(t reflect.Type, encodeKey, encodeValue encodeFunc, sortKeys sortFunc) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeMap(b, p, t, encodeKey, encodeValue, sortKeys)
+ }
+}
+
+func constructMapDecodeFunc(t reflect.Type, decodeKey, decodeValue decodeFunc) decodeFunc {
+ kt := t.Key()
+ vt := t.Elem()
+ kz := reflect.Zero(kt)
+ vz := reflect.Zero(vt)
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeMap(b, p, t, kt, vt, kz, vz, decodeKey, decodeValue)
+ }
+}
+
+func constructStructCodec(t reflect.Type, seen map[reflect.Type]*structType, canAddr bool) codec {
+ st := constructStructType(t, seen, canAddr)
+ return codec{
+ encode: constructStructEncodeFunc(st),
+ decode: constructStructDecodeFunc(st),
+ }
+}
+
+func constructStructType(t reflect.Type, seen map[reflect.Type]*structType, canAddr bool) *structType {
+ // Used for preventing infinite recursion on types that have pointers to
+ // themselves.
+ st := seen[t]
+
+ if st == nil {
+ st = &structType{
+ fields: make([]structField, 0, t.NumField()),
+ fieldsIndex: make(map[string]*structField),
+ ficaseIndex: make(map[string]*structField),
+ typ: t,
+ }
+
+ seen[t] = st
+ st.fields = appendStructFields(st.fields, t, 0, seen, canAddr)
+
+ for i := range st.fields {
+ f := &st.fields[i]
+ s := strings.ToLower(f.name)
+ st.fieldsIndex[f.name] = f
+ // When there is ambiguity because multiple fields have the same
+ // case-insensitive representation, the first field must win.
+ if _, exists := st.ficaseIndex[s]; !exists {
+ st.ficaseIndex[s] = f
+ }
+ }
+ }
+
+ return st
+}
+
+func constructStructEncodeFunc(st *structType) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeStruct(b, p, st)
+ }
+}
+
+func constructStructDecodeFunc(st *structType) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeStruct(b, p, st)
+ }
+}
+
+func constructEmbeddedStructPointerCodec(t reflect.Type, unexported bool, offset uintptr, field codec) codec {
+ return codec{
+ encode: constructEmbeddedStructPointerEncodeFunc(t, unexported, offset, field.encode),
+ decode: constructEmbeddedStructPointerDecodeFunc(t, unexported, offset, field.decode),
+ }
+}
+
+func constructEmbeddedStructPointerEncodeFunc(t reflect.Type, unexported bool, offset uintptr, encode encodeFunc) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeEmbeddedStructPointer(b, p, t, unexported, offset, encode)
+ }
+}
+
+func constructEmbeddedStructPointerDecodeFunc(t reflect.Type, unexported bool, offset uintptr, decode decodeFunc) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeEmbeddedStructPointer(b, p, t, unexported, offset, decode)
+ }
+}
+
+func appendStructFields(fields []structField, t reflect.Type, offset uintptr, seen map[reflect.Type]*structType, canAddr bool) []structField {
+ type embeddedField struct {
+ index int
+ offset uintptr
+ pointer bool
+ unexported bool
+ subtype *structType
+ subfield *structField
+ }
+
+ names := make(map[string]struct{})
+ embedded := make([]embeddedField, 0, 10)
+
+ for i, n := 0, t.NumField(); i < n; i++ {
+ f := t.Field(i)
+
+ var (
+ name = f.Name
+ anonymous = f.Anonymous
+ tag = false
+ omitempty = false
+ stringify = false
+ unexported = len(f.PkgPath) != 0
+ )
+
+ if unexported && !anonymous { // unexported
+ continue
+ }
+
+ if parts := strings.Split(f.Tag.Get("json"), ","); len(parts) != 0 {
+ if len(parts[0]) != 0 {
+ name, tag = parts[0], true
+ }
+
+ if name == "-" && len(parts) == 1 { // ignored
+ continue
+ }
+
+ if !isValidTag(name) {
+ name = f.Name
+ }
+
+ for _, tag := range parts[1:] {
+ switch tag {
+ case "omitempty":
+ omitempty = true
+ case "string":
+ stringify = true
+ }
+ }
+ }
+
+ if anonymous && !tag { // embedded
+ typ := f.Type
+ ptr := f.Type.Kind() == reflect.Ptr
+
+ if ptr {
+ typ = f.Type.Elem()
+ }
+
+ if typ.Kind() == reflect.Struct {
+ // When the embedded fields is inlined the fields can be looked
+ // up by offset from the address of the wrapping object, so we
+ // simply add the embedded struct fields to the list of fields
+ // of the current struct type.
+ subtype := constructStructType(typ, seen, canAddr)
+
+ for j := range subtype.fields {
+ embedded = append(embedded, embeddedField{
+ index: i<<32 | j,
+ offset: offset + f.Offset,
+ pointer: ptr,
+ unexported: unexported,
+ subtype: subtype,
+ subfield: &subtype.fields[j],
+ })
+ }
+
+ continue
+ }
+
+ if unexported { // ignore unexported non-struct types
+ continue
+ }
+ }
+
+ codec := constructCodec(f.Type, seen, canAddr)
+
+ if stringify {
+ // https://golang.org/pkg/encoding/json/#Marshal
+ //
+ // The "string" option signals that a field is stored as JSON inside
+ // a JSON-encoded string. It applies only to fields of string,
+ // floating point, integer, or boolean types. This extra level of
+ // encoding is sometimes used when communicating with JavaScript
+ // programs:
+ typ := f.Type
+
+ if typ.Kind() == reflect.Ptr {
+ typ = typ.Elem()
+ }
+
+ switch typ.Kind() {
+ case reflect.Int,
+ reflect.Int8,
+ reflect.Int16,
+ reflect.Int32,
+ reflect.Int64,
+ reflect.Uint,
+ reflect.Uintptr,
+ reflect.Uint8,
+ reflect.Uint16,
+ reflect.Uint32,
+ reflect.Uint64:
+ codec.encode = constructStringEncodeFunc(codec.encode)
+ codec.decode = constructStringToIntDecodeFunc(typ, codec.decode)
+ case reflect.Bool,
+ reflect.Float32,
+ reflect.Float64,
+ reflect.String:
+ codec.encode = constructStringEncodeFunc(codec.encode)
+ codec.decode = constructStringDecodeFunc(codec.decode)
+ }
+ }
+
+ fields = append(fields, structField{
+ codec: codec,
+ offset: offset + f.Offset,
+ empty: emptyFuncOf(f.Type),
+ tag: tag,
+ omitempty: omitempty,
+ name: name,
+ index: i << 32,
+ typ: f.Type,
+ zero: reflect.Zero(f.Type),
+ })
+
+ names[name] = struct{}{}
+ }
+
+ // Only unambiguous embedded fields must be serialized.
+ ambiguousNames := make(map[string]int)
+ ambiguousTags := make(map[string]int)
+
+ // Embedded types can never override a field that was already present at
+ // the top-level.
+ for name := range names {
+ ambiguousNames[name]++
+ ambiguousTags[name]++
+ }
+
+ for _, embfield := range embedded {
+ ambiguousNames[embfield.subfield.name]++
+ if embfield.subfield.tag {
+ ambiguousTags[embfield.subfield.name]++
+ }
+ }
+
+ for _, embfield := range embedded {
+ subfield := *embfield.subfield
+
+ if ambiguousNames[subfield.name] > 1 && !(subfield.tag && ambiguousTags[subfield.name] == 1) {
+ continue // ambiguous embedded field
+ }
+
+ if embfield.pointer {
+ subfield.codec = constructEmbeddedStructPointerCodec(embfield.subtype.typ, embfield.unexported, subfield.offset, subfield.codec)
+ subfield.offset = embfield.offset
+ } else {
+ subfield.offset += embfield.offset
+ }
+
+ // To prevent dominant flags more than one level below the embedded one.
+ subfield.tag = false
+
+ // To ensure the order of the fields in the output is the same is in the
+ // struct type.
+ subfield.index = embfield.index
+
+ fields = append(fields, subfield)
+ }
+
+ for i := range fields {
+ fields[i].json = encodeString(fields[i].name, 0)
+ fields[i].html = encodeString(fields[i].name, EscapeHTML)
+ }
+
+ sort.Slice(fields, func(i, j int) bool { return fields[i].index < fields[j].index })
+ return fields
+}
+
+func encodeString(s string, flags AppendFlags) string {
+ b := make([]byte, 0, len(s)+2)
+ e := encoder{flags: flags}
+ b, _ = e.doEncodeString(b, unsafe.Pointer(&s))
+ return *(*string)(unsafe.Pointer(&b))
+}
+
+func constructPointerCodec(t reflect.Type, seen map[reflect.Type]*structType) codec {
+ e := t.Elem()
+ c := constructCodec(e, seen, true)
+ return codec{
+ encode: constructPointerEncodeFunc(e, c.encode),
+ decode: constructPointerDecodeFunc(e, c.decode),
+ }
+}
+
+func constructPointerEncodeFunc(t reflect.Type, encode encodeFunc) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodePointer(b, p, t, encode)
+ }
+}
+
+func constructPointerDecodeFunc(t reflect.Type, decode decodeFunc) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodePointer(b, p, t, decode)
+ }
+}
+
+func constructInterfaceCodec(t reflect.Type) codec {
+ return codec{
+ encode: constructMaybeEmptyInterfaceEncoderFunc(t),
+ decode: constructMaybeEmptyInterfaceDecoderFunc(t),
+ }
+}
+
+func constructMaybeEmptyInterfaceEncoderFunc(t reflect.Type) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeMaybeEmptyInterface(b, p, t)
+ }
+}
+
+func constructMaybeEmptyInterfaceDecoderFunc(t reflect.Type) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeMaybeEmptyInterface(b, p, t)
+ }
+}
+
+func constructUnsupportedTypeCodec(t reflect.Type) codec {
+ return codec{
+ encode: constructUnsupportedTypeEncodeFunc(t),
+ decode: constructUnsupportedTypeDecodeFunc(t),
+ }
+}
+
+func constructUnsupportedTypeEncodeFunc(t reflect.Type) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeUnsupportedTypeError(b, p, t)
+ }
+}
+
+func constructUnsupportedTypeDecodeFunc(t reflect.Type) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeUnmarshalTypeError(b, p, t)
+ }
+}
+
+func constructJSONMarshalerEncodeFunc(t reflect.Type, pointer bool) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeJSONMarshaler(b, p, t, pointer)
+ }
+}
+
+func constructJSONUnmarshalerDecodeFunc(t reflect.Type, pointer bool) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeJSONUnmarshaler(b, p, t, pointer)
+ }
+}
+
+func constructTextMarshalerEncodeFunc(t reflect.Type, pointer bool) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.encodeTextMarshaler(b, p, t, pointer)
+ }
+}
+
+func constructTextUnmarshalerDecodeFunc(t reflect.Type, pointer bool) decodeFunc {
+ return func(d decoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return d.decodeTextUnmarshaler(b, p, t, pointer)
+ }
+}
+
+func constructInlineValueEncodeFunc(encode encodeFunc) encodeFunc {
+ return func(e encoder, b []byte, p unsafe.Pointer) ([]byte, error) {
+ return encode(e, b, noescape(unsafe.Pointer(&p)))
+ }
+}
+
+// noescape hides a pointer from escape analysis. noescape is
+// the identity function but escape analysis doesn't think the
+// output depends on the input. noescape is inlined and currently
+// compiles down to zero instructions.
+// USE CAREFULLY!
+// This was copied from the runtime; see issues 23382 and 7921.
+//go:nosplit
+func noescape(p unsafe.Pointer) unsafe.Pointer {
+ x := uintptr(p)
+ return unsafe.Pointer(x ^ 0)
+}
+
+func alignedSize(t reflect.Type) uintptr {
+ a := t.Align()
+ s := t.Size()
+ return align(uintptr(a), uintptr(s))
+}
+
+func align(align, size uintptr) uintptr {
+ if align != 0 && (size%align) != 0 {
+ size = ((size / align) + 1) * align
+ }
+ return size
+}
+
+func inlined(t reflect.Type) bool {
+ switch t.Kind() {
+ case reflect.Ptr:
+ return true
+ case reflect.Map:
+ return true
+ case reflect.Struct:
+ return t.NumField() == 1 && inlined(t.Field(0).Type)
+ default:
+ return false
+ }
+}
+
+func isValidTag(s string) bool {
+ if s == "" {
+ return false
+ }
+ for _, c := range s {
+ switch {
+ case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
+ // Backslash and quote chars are reserved, but
+ // otherwise any punctuation chars are allowed
+ // in a tag name.
+ default:
+ if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
+ return false
+ }
+ }
+ }
+ return true
+}
+
+func emptyFuncOf(t reflect.Type) emptyFunc {
+ switch t {
+ case bytesType, rawMessageType:
+ return func(p unsafe.Pointer) bool { return (*slice)(p).len == 0 }
+ }
+
+ switch t.Kind() {
+ case reflect.Array:
+ if t.Len() == 0 {
+ return func(unsafe.Pointer) bool { return true }
+ }
+
+ case reflect.Map:
+ return func(p unsafe.Pointer) bool { return reflect.NewAt(t, p).Elem().Len() == 0 }
+
+ case reflect.Slice:
+ return func(p unsafe.Pointer) bool { return (*slice)(p).len == 0 }
+
+ case reflect.String:
+ return func(p unsafe.Pointer) bool { return len(*(*string)(p)) == 0 }
+
+ case reflect.Bool:
+ return func(p unsafe.Pointer) bool { return !*(*bool)(p) }
+
+ case reflect.Int, reflect.Uint:
+ return func(p unsafe.Pointer) bool { return *(*uint)(p) == 0 }
+
+ case reflect.Uintptr:
+ return func(p unsafe.Pointer) bool { return *(*uintptr)(p) == 0 }
+
+ case reflect.Int8, reflect.Uint8:
+ return func(p unsafe.Pointer) bool { return *(*uint8)(p) == 0 }
+
+ case reflect.Int16, reflect.Uint16:
+ return func(p unsafe.Pointer) bool { return *(*uint16)(p) == 0 }
+
+ case reflect.Int32, reflect.Uint32:
+ return func(p unsafe.Pointer) bool { return *(*uint32)(p) == 0 }
+
+ case reflect.Int64, reflect.Uint64:
+ return func(p unsafe.Pointer) bool { return *(*uint64)(p) == 0 }
+
+ case reflect.Float32:
+ return func(p unsafe.Pointer) bool { return *(*float32)(p) == 0 }
+
+ case reflect.Float64:
+ return func(p unsafe.Pointer) bool { return *(*float64)(p) == 0 }
+
+ case reflect.Ptr:
+ return func(p unsafe.Pointer) bool { return *(*unsafe.Pointer)(p) == nil }
+
+ case reflect.Interface:
+ return func(p unsafe.Pointer) bool { return (*iface)(p).ptr == nil }
+ }
+
+ return func(unsafe.Pointer) bool { return false }
+}
+
+type iface struct {
+ typ unsafe.Pointer
+ ptr unsafe.Pointer
+}
+
+type slice struct {
+ data unsafe.Pointer
+ len int
+ cap int
+}
+
+type structType struct {
+ fields []structField
+ fieldsIndex map[string]*structField
+ ficaseIndex map[string]*structField
+ typ reflect.Type
+ inlined bool
+}
+
+type structField struct {
+ codec codec
+ offset uintptr
+ empty emptyFunc
+ tag bool
+ omitempty bool
+ json string
+ html string
+ name string
+ typ reflect.Type
+ zero reflect.Value
+ index int
+}
+
+func unmarshalTypeError(b []byte, t reflect.Type) error {
+ return &UnmarshalTypeError{Value: strconv.Quote(prefix(b)), Type: t}
+}
+
+func unmarshalOverflow(b []byte, t reflect.Type) error {
+ return &UnmarshalTypeError{Value: "number " + prefix(b) + " overflows", Type: t}
+}
+
+func unexpectedEOF(b []byte) error {
+ return syntaxError(b, "unexpected end of JSON input")
+}
+
+var syntaxErrorMsgOffset = ^uintptr(0)
+
+func init() {
+ t := reflect.TypeOf(SyntaxError{})
+ for i, n := 0, t.NumField(); i < n; i++ {
+ if f := t.Field(i); f.Type.Kind() == reflect.String {
+ syntaxErrorMsgOffset = f.Offset
+ }
+ }
+}
+
+func syntaxError(b []byte, msg string, args ...interface{}) error {
+ e := new(SyntaxError)
+ i := syntaxErrorMsgOffset
+ if i != ^uintptr(0) {
+ s := "json: " + fmt.Sprintf(msg, args...) + ": " + prefix(b)
+ p := unsafe.Pointer(e)
+ // Hack to set the unexported `msg` field.
+ *(*string)(unsafe.Pointer(uintptr(p) + i)) = s
+ }
+ return e
+}
+
+func inputError(b []byte, t reflect.Type) ([]byte, error) {
+ if len(b) == 0 {
+ return nil, unexpectedEOF(b)
+ }
+ _, r, err := parseValue(b)
+ if err != nil {
+ return r, err
+ }
+ return skipSpaces(r), unmarshalTypeError(b, t)
+}
+
+func objectKeyError(b []byte, err error) ([]byte, error) {
+ if len(b) == 0 {
+ return nil, unexpectedEOF(b)
+ }
+ switch err.(type) {
+ case *UnmarshalTypeError:
+ err = syntaxError(b, "invalid character '%c' looking for beginning of object key", b[0])
+ }
+ return b, err
+}
+
+func prefix(b []byte) string {
+ if len(b) < 32 {
+ return string(b)
+ }
+ return string(b[:32]) + "..."
+}
+
+func intStringsAreSorted(i0, i1 int64) bool {
+ var b0, b1 [32]byte
+ return string(strconv.AppendInt(b0[:0], i0, 10)) < string(strconv.AppendInt(b1[:0], i1, 10))
+}
+
+func uintStringsAreSorted(u0, u1 uint64) bool {
+ var b0, b1 [32]byte
+ return string(strconv.AppendUint(b0[:0], u0, 10)) < string(strconv.AppendUint(b1[:0], u1, 10))
+}
+
+//go:nosplit
+func stringToBytes(s string) []byte {
+ return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ // nolint:govet // from segment's code
+ Data: ((*reflect.StringHeader)(unsafe.Pointer(&s))).Data,
+ Len: len(s),
+ Cap: len(s),
+ }))
+}
+
+var (
+ nullType = reflect.TypeOf(nil)
+ boolType = reflect.TypeOf(false)
+
+ intType = reflect.TypeOf(int(0))
+ int8Type = reflect.TypeOf(int8(0))
+ int16Type = reflect.TypeOf(int16(0))
+ int32Type = reflect.TypeOf(int32(0))
+ int64Type = reflect.TypeOf(int64(0))
+
+ uintType = reflect.TypeOf(uint(0))
+ uint8Type = reflect.TypeOf(uint8(0))
+ uint16Type = reflect.TypeOf(uint16(0))
+ uint32Type = reflect.TypeOf(uint32(0))
+ uint64Type = reflect.TypeOf(uint64(0))
+ uintptrType = reflect.TypeOf(uintptr(0))
+
+ float32Type = reflect.TypeOf(float32(0))
+ float64Type = reflect.TypeOf(float64(0))
+
+ numberType = reflect.TypeOf(json.Number(""))
+ stringType = reflect.TypeOf("")
+ bytesType = reflect.TypeOf(([]byte)(nil))
+ durationType = reflect.TypeOf(time.Duration(0))
+ timeType = reflect.TypeOf(time.Time{})
+ rawMessageType = reflect.TypeOf(RawMessage(nil))
+
+ numberPtrType = reflect.PtrTo(numberType)
+ durationPtrType = reflect.PtrTo(durationType)
+ timePtrType = reflect.PtrTo(timeType)
+ rawMessagePtrType = reflect.PtrTo(rawMessageType)
+
+ sliceInterfaceType = reflect.TypeOf(([]interface{})(nil))
+ mapStringInterfaceType = reflect.TypeOf((map[string]interface{})(nil))
+ mapStringRawMessageType = reflect.TypeOf((map[string]RawMessage)(nil))
+
+ interfaceType = reflect.TypeOf((*interface{})(nil)).Elem()
+ jsonMarshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
+ jsonUnmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem()
+ textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
+ textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
+)
+
+// =============================================================================
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// appendDuration appends a human-readable representation of d to b.
+//
+// The function copies the implementation of time.Duration.String but prevents
+// Go from making a dynamic memory allocation on the returned value.
+func appendDuration(b []byte, d time.Duration) []byte {
+ // Largest time is 2540400h10m10.000000000s
+ var buf [32]byte
+ w := len(buf)
+
+ u := uint64(d)
+ neg := d < 0
+ if neg {
+ u = -u
+ }
+
+ if u < uint64(time.Second) {
+ // Special case: if duration is smaller than a second,
+ // use smaller units, like 1.2ms
+ var prec int
+ w--
+ buf[w] = 's'
+ w--
+ switch {
+ case u == 0:
+ return append(b, '0', 's')
+ case u < uint64(time.Microsecond):
+ // print nanoseconds
+ prec = 0
+ buf[w] = 'n'
+ case u < uint64(time.Millisecond):
+ // print microseconds
+ prec = 3
+ // U+00B5 'µ' micro sign == 0xC2 0xB5
+ w-- // Need room for two bytes.
+ copy(buf[w:], "µ")
+ default:
+ // print milliseconds
+ prec = 6
+ buf[w] = 'm'
+ }
+ w, u = fmtFrac(buf[:w], u, prec)
+ w = fmtInt(buf[:w], u)
+ } else {
+ w--
+ buf[w] = 's'
+
+ w, u = fmtFrac(buf[:w], u, 9)
+
+ // u is now integer seconds
+ w = fmtInt(buf[:w], u%60)
+ u /= 60
+
+ // u is now integer minutes
+ if u > 0 {
+ w--
+ buf[w] = 'm'
+ w = fmtInt(buf[:w], u%60)
+ u /= 60
+
+ // u is now integer hours
+ // Stop at hours because days can be different lengths.
+ if u > 0 {
+ w--
+ buf[w] = 'h'
+ w = fmtInt(buf[:w], u)
+ }
+ }
+ }
+
+ if neg {
+ w--
+ buf[w] = '-'
+ }
+
+ return append(b, buf[w:]...)
+}
+
+// fmtFrac formats the fraction of v/10**prec (e.g., ".12345") into the
+// tail of buf, omitting trailing zeros. it omits the decimal
+// point too when the fraction is 0. It returns the index where the
+// output bytes begin and the value v/10**prec.
+func fmtFrac(buf []byte, v uint64, prec int) (nw int, nv uint64) {
+ // Omit trailing zeros up to and including decimal point.
+ w := len(buf)
+ print := false
+ for i := 0; i < prec; i++ {
+ digit := v % 10
+ print = print || digit != 0
+ if print {
+ w--
+ buf[w] = byte(digit) + '0'
+ }
+ v /= 10
+ }
+ if print {
+ w--
+ buf[w] = '.'
+ }
+ return w, v
+}
+
+// fmtInt formats v into the tail of buf.
+// It returns the index where the output begins.
+func fmtInt(buf []byte, v uint64) int {
+ w := len(buf)
+ if v == 0 {
+ w--
+ buf[w] = '0'
+ } else {
+ for v > 0 {
+ w--
+ buf[w] = byte(v%10) + '0'
+ v /= 10
+ }
+ }
+ return w
+}
+
+// =============================================================================
diff --git a/vendor/github.com/neilotoole/jsoncolor/decode.go b/vendor/github.com/neilotoole/jsoncolor/decode.go
new file mode 100644
index 0000000..b30a38f
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/decode.go
@@ -0,0 +1,1195 @@
+package jsoncolor
+
+import (
+ "bytes"
+ "encoding"
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "math"
+ "reflect"
+ "strconv"
+ "time"
+ "unsafe"
+)
+
+func (d decoder) decodeNull(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+ return inputError(b, nullType)
+}
+
+func (d decoder) decodeBool(b []byte, p unsafe.Pointer) ([]byte, error) {
+ switch {
+ case hasTruePrefix(b):
+ *(*bool)(p) = true
+ return b[4:], nil
+
+ case hasFalsePrefix(b):
+ *(*bool)(p) = false
+ return b[5:], nil
+
+ case hasNullPrefix(b):
+ return b[4:], nil
+
+ default:
+ return inputError(b, boolType)
+ }
+}
+
+func (d decoder) decodeInt(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseInt(b, intType)
+ if err != nil {
+ return r, err
+ }
+
+ *(*int)(p) = int(v)
+ return r, nil
+}
+
+func (d decoder) decodeInt8(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseInt(b, int8Type)
+ if err != nil {
+ return r, err
+ }
+
+ if v < math.MinInt8 || v > math.MaxInt8 {
+ return r, unmarshalOverflow(b[:len(b)-len(r)], int8Type)
+ }
+
+ *(*int8)(p) = int8(v)
+ return r, nil
+}
+
+func (d decoder) decodeInt16(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseInt(b, int16Type)
+ if err != nil {
+ return r, err
+ }
+
+ if v < math.MinInt16 || v > math.MaxInt16 {
+ return r, unmarshalOverflow(b[:len(b)-len(r)], int16Type)
+ }
+
+ *(*int16)(p) = int16(v)
+ return r, nil
+}
+
+func (d decoder) decodeInt32(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseInt(b, int32Type)
+ if err != nil {
+ return r, err
+ }
+
+ if v < math.MinInt32 || v > math.MaxInt32 {
+ return r, unmarshalOverflow(b[:len(b)-len(r)], int32Type)
+ }
+
+ *(*int32)(p) = int32(v)
+ return r, nil
+}
+
+func (d decoder) decodeInt64(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseInt(b, int64Type)
+ if err != nil {
+ return r, err
+ }
+
+ *(*int64)(p) = v
+ return r, nil
+}
+
+func (d decoder) decodeUint(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseUint(b, uintType)
+ if err != nil {
+ return r, err
+ }
+
+ *(*uint)(p) = uint(v)
+ return r, nil
+}
+
+func (d decoder) decodeUintptr(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseUint(b, uintptrType)
+ if err != nil {
+ return r, err
+ }
+
+ *(*uintptr)(p) = uintptr(v)
+ return r, nil
+}
+
+func (d decoder) decodeUint8(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseUint(b, uint8Type)
+ if err != nil {
+ return r, err
+ }
+
+ if v > math.MaxUint8 {
+ return r, unmarshalOverflow(b[:len(b)-len(r)], uint8Type)
+ }
+
+ *(*uint8)(p) = uint8(v)
+ return r, nil
+}
+
+func (d decoder) decodeUint16(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseUint(b, uint16Type)
+ if err != nil {
+ return r, err
+ }
+
+ if v > math.MaxUint16 {
+ return r, unmarshalOverflow(b[:len(b)-len(r)], uint16Type)
+ }
+
+ *(*uint16)(p) = uint16(v)
+ return r, nil
+}
+
+func (d decoder) decodeUint32(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseUint(b, uint32Type)
+ if err != nil {
+ return r, err
+ }
+
+ if v > math.MaxUint32 {
+ return r, unmarshalOverflow(b[:len(b)-len(r)], uint32Type)
+ }
+
+ *(*uint32)(p) = uint32(v)
+ return r, nil
+}
+
+func (d decoder) decodeUint64(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseUint(b, uint64Type)
+ if err != nil {
+ return r, err
+ }
+
+ *(*uint64)(p) = v
+ return r, nil
+}
+
+func (d decoder) decodeFloat32(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseNumber(b)
+ if err != nil {
+ return inputError(b, float32Type)
+ }
+
+ f, err := strconv.ParseFloat(*(*string)(unsafe.Pointer(&v)), 32)
+ if err != nil {
+ return inputError(b, float32Type)
+ }
+
+ *(*float32)(p) = float32(f)
+ return r, nil
+}
+
+func (d decoder) decodeFloat64(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseNumber(b)
+ if err != nil {
+ return inputError(b, float64Type)
+ }
+
+ f, err := strconv.ParseFloat(*(*string)(unsafe.Pointer(&v)), 64)
+ if err != nil {
+ return inputError(b, float64Type)
+ }
+
+ *(*float64)(p) = f
+ return r, nil
+}
+
+func (d decoder) decodeNumber(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ v, r, err := parseNumber(b)
+ if err != nil {
+ return inputError(b, numberType)
+ }
+
+ if (d.flags & DontCopyNumber) != 0 {
+ *(*Number)(p) = *(*Number)(unsafe.Pointer(&v))
+ } else {
+ *(*Number)(p) = Number(v)
+ }
+
+ return r, nil
+}
+
+func (d decoder) decodeString(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ s, r, new, err := parseStringUnquote(b, nil)
+ if err != nil {
+ if len(b) == 0 || b[0] != '"' {
+ return inputError(b, stringType)
+ }
+ return r, err
+ }
+
+ if new || (d.flags&DontCopyString) != 0 {
+ *(*string)(p) = *(*string)(unsafe.Pointer(&s))
+ } else {
+ *(*string)(p) = string(s)
+ }
+
+ return r, nil
+}
+
+func (d decoder) decodeFromString(b []byte, p unsafe.Pointer, decode decodeFunc) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return decode(d, b, p)
+ }
+
+ v, b, _, err := parseStringUnquote(b, nil)
+ if err != nil {
+ return inputError(v, stringType)
+ }
+
+ if v, err = decode(d, v, p); err != nil {
+ return b, err
+ }
+
+ if v = skipSpaces(v); len(v) != 0 {
+ return b, syntaxError(v, "unexpected trailing tokens after string value")
+ }
+
+ return b, nil
+}
+
+func (d decoder) decodeFromStringToInt(b []byte, p unsafe.Pointer, t reflect.Type, decode decodeFunc) ([]byte, error) {
+ if hasPrefix(b, "null") {
+ return decode(d, b, p)
+ }
+
+ if len(b) > 0 && b[0] != '"' {
+ v, r, err := parseNumber(b)
+ if err == nil {
+ // The encoding/json package will return a *json.UnmarshalTypeError if
+ // the input was a floating point number representation, even tho a
+ // string is expected here.
+ isFloat := true
+ switch {
+ case bytes.IndexByte(v, '.') >= 0:
+ case bytes.IndexByte(v, 'e') >= 0:
+ case bytes.IndexByte(v, 'E') >= 0:
+ default:
+ isFloat = false
+ }
+ if isFloat {
+ _, err := strconv.ParseFloat(*(*string)(unsafe.Pointer(&v)), 64)
+ if err != nil {
+ return r, unmarshalTypeError(v, t)
+ }
+ }
+ }
+ return r, fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into int")
+ }
+
+ if len(b) > 1 && b[0] == '"' && b[1] == '"' {
+ return b, fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal \"\" into int")
+ }
+
+ v, b, _, err := parseStringUnquote(b, nil)
+ if err != nil {
+ return inputError(v, t)
+ }
+
+ if hasLeadingZeroes(v) {
+ // In this context the encoding/json package accepts leading zeroes because
+ // it is not constrained by the JSON syntax, remove them so the parsing
+ // functions don't return syntax errors.
+ u := make([]byte, 0, len(v))
+ i := 0
+
+ if i < len(v) && v[i] == '-' || v[i] == '+' {
+ u = append(u, v[i])
+ i++
+ }
+
+ for (i+1) < len(v) && v[i] == '0' && '0' <= v[i+1] && v[i+1] <= '9' {
+ i++
+ }
+
+ v = append(u, v[i:]...)
+ }
+
+ if r, err := decode(d, v, p); err != nil {
+ if _, isSyntaxError := err.(*SyntaxError); isSyntaxError {
+ if hasPrefix(v, "-") {
+ // The standard library interprets sequences of '-' characters
+ // as numbers but still returns type errors in this case...
+ return b, unmarshalTypeError(v, t)
+ }
+ return b, fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into int", prefix(v))
+ }
+ // When the input value was a valid number representation we retain the
+ // error returned by the decoder.
+ if _, _, err := parseNumber(v); err != nil {
+ // When the input value valid JSON we mirror the behavior of the
+ // encoding/json package and return a generic error.
+ if _, _, err := parseValue(v); err == nil {
+ return b, fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into int", prefix(v))
+ }
+ }
+ return b, err
+ } else if len(r) != 0 {
+ return r, unmarshalTypeError(v, t)
+ }
+
+ return b, nil
+}
+
+func (d decoder) decodeBytes(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ *(*[]byte)(p) = nil
+ return b[4:], nil
+ }
+
+ if len(b) < 2 {
+ return inputError(b, bytesType)
+ }
+
+ if b[0] != '"' {
+ // Go 1.7- behavior: bytes slices may be decoded from array of integers.
+ if len(b) > 0 && b[0] == '[' {
+ return d.decodeSlice(b, p, 1, bytesType, decoder.decodeUint8)
+ }
+ return inputError(b, bytesType)
+ }
+
+ // The input string contains escaped sequences, we need to parse it before
+ // decoding it to match the encoding/json package behvaior.
+ src, r, _, err := parseStringUnquote(b, nil)
+ if err != nil {
+ return inputError(b, bytesType)
+ }
+
+ dst := make([]byte, base64.StdEncoding.DecodedLen(len(src)))
+
+ n, err := base64.StdEncoding.Decode(dst, src)
+ if err != nil {
+ return r, err
+ }
+
+ *(*[]byte)(p) = dst[:n]
+ return r, nil
+}
+
+func (d decoder) decodeDuration(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ // in order to inter-operate with the stdlib, we must be able to interpret
+ // durations passed as integer values. there's some discussion about being
+ // flexible on how durations are formatted, but for the time being, it's
+ // been punted to go2 at the earliest: https://github.com/golang/go/issues/4712
+ if len(b) > 0 && b[0] != '"' {
+ v, r, err := parseInt(b, durationType)
+ if err != nil {
+ return inputError(b, int32Type)
+ }
+
+ if v < math.MinInt64 || v > math.MaxInt64 {
+ return r, unmarshalOverflow(b[:len(b)-len(r)], int32Type)
+ }
+
+ *(*time.Duration)(p) = time.Duration(v)
+ return r, nil
+ }
+
+ if len(b) < 2 || b[0] != '"' {
+ return inputError(b, durationType)
+ }
+
+ i := bytes.IndexByte(b[1:], '"') + 1
+ if i <= 0 {
+ return inputError(b, durationType)
+ }
+
+ s := b[1:i] // trim quotes
+
+ v, err := time.ParseDuration(*(*string)(unsafe.Pointer(&s)))
+ if err != nil {
+ return inputError(b, durationType)
+ }
+
+ *(*time.Duration)(p) = v
+ return b[i+1:], nil
+}
+
+func (d decoder) decodeTime(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ if len(b) < 2 || b[0] != '"' {
+ return inputError(b, timeType)
+ }
+
+ i := bytes.IndexByte(b[1:], '"') + 1
+ if i <= 0 {
+ return inputError(b, timeType)
+ }
+
+ s := b[1:i] // trim quotes
+
+ v, err := time.Parse(time.RFC3339Nano, *(*string)(unsafe.Pointer(&s)))
+ if err != nil {
+ return inputError(b, timeType)
+ }
+
+ *(*time.Time)(p) = v
+ return b[i+1:], nil
+}
+
+func (d decoder) decodeArray(b []byte, p unsafe.Pointer, n int, size uintptr, t reflect.Type, decode decodeFunc) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ if len(b) < 2 || b[0] != '[' {
+ return inputError(b, t)
+ }
+ b = b[1:]
+
+ var err error
+ for i := 0; i < n; i++ {
+ b = skipSpaces(b)
+
+ if i != 0 {
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected EOF after array element")
+ }
+ switch b[0] {
+ case ',':
+ b = skipSpaces(b[1:])
+ case ']':
+ return b[1:], nil
+ default:
+ return b, syntaxError(b, "expected ',' after array element but found '%c'", b[0])
+ }
+ }
+
+ b, err = decode(d, b, unsafe.Pointer(uintptr(p)+(uintptr(i)*size)))
+ if err != nil {
+ if e, ok := err.(*UnmarshalTypeError); ok {
+ e.Struct = t.String() + e.Struct
+ e.Field = strconv.Itoa(i) + "." + e.Field
+ }
+ return b, err
+ }
+ }
+
+ // The encoding/json package ignores extra elements found when decoding into
+ // array types (which have a fixed size).
+ for {
+ b = skipSpaces(b)
+
+ if len(b) == 0 {
+ return b, syntaxError(b, "missing closing ']' in array value")
+ }
+
+ switch b[0] {
+ case ',':
+ b = skipSpaces(b[1:])
+ case ']':
+ return b[1:], nil
+ }
+
+ _, b, err = parseValue(b)
+ if err != nil {
+ return b, err
+ }
+ }
+}
+
+var (
+ // This is a placeholder used to consturct non-nil empty slices.
+ empty struct{}
+)
+
+func (d decoder) decodeSlice(b []byte, p unsafe.Pointer, size uintptr, t reflect.Type, decode decodeFunc) ([]byte, error) {
+ if hasNullPrefix(b) {
+ *(*slice)(p) = slice{}
+ return b[4:], nil
+ }
+
+ if len(b) < 2 {
+ return inputError(b, t)
+ }
+
+ if b[0] != '[' {
+ // Go 1.7- behavior: fallback to decoding as a []byte if the element
+ // type is byte; allow conversions from JSON strings even tho the
+ // underlying type implemented unmarshaler interfaces.
+ if t.Elem().Kind() == reflect.Uint8 {
+ return d.decodeBytes(b, p)
+ }
+ return inputError(b, t)
+ }
+
+ input := b
+ b = b[1:]
+
+ s := (*slice)(p)
+ s.len = 0
+
+ var err error
+ for {
+ b = skipSpaces(b)
+
+ if len(b) != 0 && b[0] == ']' {
+ if s.data == nil {
+ s.data = unsafe.Pointer(&empty)
+ }
+ return b[1:], nil
+ }
+
+ if s.len != 0 {
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected EOF after array element")
+ }
+ if b[0] != ',' {
+ return b, syntaxError(b, "expected ',' after array element but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+ }
+
+ if s.len == s.cap {
+ c := s.cap
+
+ if c == 0 {
+ c = 10
+ } else {
+ c *= 2
+ }
+
+ *s = extendSlice(t, s, c)
+ }
+
+ b, err = decode(d, b, unsafe.Pointer(uintptr(s.data)+(uintptr(s.len)*size)))
+ if err != nil {
+ if _, r, err := parseValue(input); err != nil {
+ return r, err
+ } else {
+ b = r
+ }
+ if e, ok := err.(*UnmarshalTypeError); ok {
+ e.Struct = t.String() + e.Struct
+ e.Field = strconv.Itoa(s.len) + "." + e.Field
+ }
+ return b, err
+ }
+
+ s.len++
+ }
+}
+
+func (d decoder) decodeMap(b []byte, p unsafe.Pointer, t, kt, vt reflect.Type, kz, vz reflect.Value, decodeKey, decodeValue decodeFunc) ([]byte, error) {
+ if hasNullPrefix(b) {
+ *(*unsafe.Pointer)(p) = nil
+ return b[4:], nil
+ }
+
+ if len(b) < 2 || b[0] != '{' {
+ return inputError(b, t)
+ }
+ i := 0
+ m := reflect.NewAt(t, p).Elem()
+
+ k := reflect.New(kt).Elem()
+ v := reflect.New(vt).Elem()
+
+ kptr := (*iface)(unsafe.Pointer(&k)).ptr
+ vptr := (*iface)(unsafe.Pointer(&v)).ptr
+ input := b
+
+ if m.IsNil() {
+ m = reflect.MakeMap(t)
+ }
+
+ var err error
+ b = b[1:]
+ for {
+ k.Set(kz)
+ v.Set(vz)
+ b = skipSpaces(b)
+
+ if len(b) != 0 && b[0] == '}' {
+ *(*unsafe.Pointer)(p) = unsafe.Pointer(m.Pointer())
+ return b[1:], nil
+ }
+
+ if i != 0 {
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected end of JONS input after object field value")
+ }
+ if b[0] != ',' {
+ return b, syntaxError(b, "expected ',' after object field value but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+ }
+
+ if hasPrefix(b, "null") {
+ return b, syntaxError(b, "cannot decode object key string from 'null' value")
+ }
+
+ if b, err = decodeKey(d, b, kptr); err != nil {
+ return objectKeyError(b, err)
+ }
+ b = skipSpaces(b)
+
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected end of JSON input after object field key")
+ }
+ if b[0] != ':' {
+ return b, syntaxError(b, "expected ':' after object field key but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+
+ if b, err = decodeValue(d, b, vptr); err != nil {
+ if _, r, err := parseValue(input); err != nil {
+ return r, err
+ } else {
+ b = r
+ }
+ if e, ok := err.(*UnmarshalTypeError); ok {
+ e.Struct = "map[" + kt.String() + "]" + vt.String() + "{" + e.Struct + "}"
+ e.Field = fmt.Sprint(k.Interface()) + "." + e.Field
+ }
+ return b, err
+ }
+
+ m.SetMapIndex(k, v)
+ i++
+ }
+}
+
+func (d decoder) decodeMapStringInterface(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ *(*unsafe.Pointer)(p) = nil
+ return b[4:], nil
+ }
+
+ if len(b) < 2 || b[0] != '{' {
+ return inputError(b, mapStringInterfaceType)
+ }
+
+ i := 0
+ m := *(*map[string]interface{})(p)
+
+ if m == nil {
+ m = make(map[string]interface{}, 64)
+ }
+
+ var err error
+ var key string
+ var val interface{}
+ var input = b
+
+ b = b[1:]
+ for {
+ key = ""
+ val = nil
+
+ b = skipSpaces(b)
+
+ if len(b) != 0 && b[0] == '}' {
+ *(*unsafe.Pointer)(p) = *(*unsafe.Pointer)(unsafe.Pointer(&m))
+ return b[1:], nil
+ }
+
+ if i != 0 {
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected end of JSON input after object field value")
+ }
+ if b[0] != ',' {
+ return b, syntaxError(b, "expected ',' after object field value but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+ }
+
+ if hasPrefix(b, "null") {
+ return b, syntaxError(b, "cannot decode object key string from 'null' value")
+ }
+
+ b, err = d.decodeString(b, unsafe.Pointer(&key))
+ if err != nil {
+ return objectKeyError(b, err)
+ }
+ b = skipSpaces(b)
+
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected end of JSON input after object field key")
+ }
+ if b[0] != ':' {
+ return b, syntaxError(b, "expected ':' after object field key but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+
+ b, err = d.decodeInterface(b, unsafe.Pointer(&val))
+ if err != nil {
+ if _, r, err := parseValue(input); err != nil {
+ return r, err
+ } else {
+ b = r
+ }
+ if e, ok := err.(*UnmarshalTypeError); ok {
+ e.Struct = mapStringInterfaceType.String() + e.Struct
+ e.Field = key + "." + e.Field
+ }
+ return b, err
+ }
+
+ m[key] = val
+ i++
+ }
+}
+
+func (d decoder) decodeMapStringRawMessage(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if hasNullPrefix(b) {
+ *(*unsafe.Pointer)(p) = nil
+ return b[4:], nil
+ }
+
+ if len(b) < 2 || b[0] != '{' {
+ return inputError(b, mapStringRawMessageType)
+ }
+
+ i := 0
+ m := *(*map[string]RawMessage)(p)
+
+ if m == nil {
+ m = make(map[string]RawMessage, 64)
+ }
+
+ var err error
+ var key string
+ var val RawMessage
+ var input = b
+
+ b = b[1:]
+ for {
+ key = ""
+ val = nil
+
+ b = skipSpaces(b)
+
+ if len(b) != 0 && b[0] == '}' {
+ *(*unsafe.Pointer)(p) = *(*unsafe.Pointer)(unsafe.Pointer(&m))
+ return b[1:], nil
+ }
+
+ if i != 0 {
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected end of JSON input after object field value")
+ }
+ if b[0] != ',' {
+ return b, syntaxError(b, "expected ',' after object field value but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+ }
+
+ if hasPrefix(b, "null") {
+ return b, syntaxError(b, "cannot decode object key string from 'null' value")
+ }
+
+ b, err = d.decodeString(b, unsafe.Pointer(&key))
+ if err != nil {
+ return objectKeyError(b, err)
+ }
+ b = skipSpaces(b)
+
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected end of JSON input after object field key")
+ }
+ if b[0] != ':' {
+ return b, syntaxError(b, "expected ':' after object field key but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+
+ b, err = d.decodeRawMessage(b, unsafe.Pointer(&val))
+ if err != nil {
+ if _, r, err := parseValue(input); err != nil {
+ return r, err
+ } else {
+ b = r
+ }
+ if e, ok := err.(*UnmarshalTypeError); ok {
+ e.Struct = mapStringRawMessageType.String() + e.Struct
+ e.Field = key + "." + e.Field
+ }
+ return b, err
+ }
+
+ m[key] = val
+ i++
+ }
+}
+
+func (d decoder) decodeStruct(b []byte, p unsafe.Pointer, st *structType) ([]byte, error) {
+ if hasNullPrefix(b) {
+ return b[4:], nil
+ }
+
+ if len(b) < 2 || b[0] != '{' {
+ return inputError(b, st.typ)
+ }
+
+ var err error
+ var k []byte
+ var i int
+
+ // memory buffer used to convert short field names to lowercase
+ var buf [64]byte
+ var key []byte
+ var input = b
+
+ b = b[1:]
+ for {
+ b = skipSpaces(b)
+
+ if len(b) != 0 && b[0] == '}' {
+ return b[1:], nil
+ }
+
+ if i != 0 {
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected end of JSON input after object field value")
+ }
+ if b[0] != ',' {
+ return b, syntaxError(b, "expected ',' after object field value but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+ }
+ i++
+
+ if hasPrefix(b, "null") {
+ return b, syntaxError(b, "cannot decode object key string from 'null' value")
+ }
+
+ k, b, _, err = parseStringUnquote(b, nil)
+ if err != nil {
+ return objectKeyError(b, err)
+ }
+ b = skipSpaces(b)
+
+ if len(b) == 0 {
+ return b, syntaxError(b, "unexpected end of JSON input after object field key")
+ }
+ if b[0] != ':' {
+ return b, syntaxError(b, "expected ':' after object field key but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+
+ f := st.fieldsIndex[string(k)]
+
+ if f == nil && (d.flags&DontMatchCaseInsensitiveStructFields) == 0 {
+ key = appendToLower(buf[:0], k)
+ f = st.ficaseIndex[string(key)]
+ }
+
+ if f == nil {
+ if (d.flags & DisallowUnknownFields) != 0 {
+ return b, fmt.Errorf("json: unknown field %q", k)
+ }
+ if _, b, err = parseValue(b); err != nil {
+ return b, err
+ }
+ continue
+ }
+
+ if b, err = f.codec.decode(d, b, unsafe.Pointer(uintptr(p)+f.offset)); err != nil {
+ if _, r, err := parseValue(input); err != nil {
+ return r, err
+ } else {
+ b = r
+ }
+ if e, ok := err.(*UnmarshalTypeError); ok {
+ e.Struct = st.typ.String() + e.Struct
+ e.Field = string(k) + "." + e.Field
+ }
+ return b, err
+ }
+ }
+}
+
+func (d decoder) decodeEmbeddedStructPointer(b []byte, p unsafe.Pointer, t reflect.Type, unexported bool, offset uintptr, decode decodeFunc) ([]byte, error) {
+ v := *(*unsafe.Pointer)(p)
+
+ if v == nil {
+ if unexported {
+ return nil, fmt.Errorf("json: cannot set embedded pointer to unexported struct: %s", t)
+ }
+ v = unsafe.Pointer(reflect.New(t).Pointer())
+ *(*unsafe.Pointer)(p) = v
+ }
+
+ return decode(d, b, unsafe.Pointer(uintptr(v)+offset))
+}
+
+func (d decoder) decodePointer(b []byte, p unsafe.Pointer, t reflect.Type, decode decodeFunc) ([]byte, error) {
+ if hasNullPrefix(b) {
+ pp := *(*unsafe.Pointer)(p)
+ if pp != nil && t.Kind() == reflect.Ptr {
+ return decode(d, b, pp)
+ }
+ *(*unsafe.Pointer)(p) = nil
+ return b[4:], nil
+ }
+
+ v := *(*unsafe.Pointer)(p)
+ if v == nil {
+ v = unsafe.Pointer(reflect.New(t).Pointer())
+ *(*unsafe.Pointer)(p) = v
+ }
+
+ return decode(d, b, v)
+}
+
+func (d decoder) decodeInterface(b []byte, p unsafe.Pointer) ([]byte, error) {
+ val := *(*interface{})(p)
+ *(*interface{})(p) = nil
+
+ if t := reflect.TypeOf(val); t != nil && t.Kind() == reflect.Ptr {
+ if v := reflect.ValueOf(val); v.IsNil() || t.Elem().Kind() != reflect.Ptr {
+ // If the destination is nil the only value that is OK to decode is
+ // `null`, and the encoding/json package always nils the destination
+ // interface value in this case.
+ if hasNullPrefix(b) {
+ *(*interface{})(p) = nil
+ return b[4:], nil
+ }
+ }
+
+ b, err := Parse(b, val, d.flags)
+ if err == nil {
+ *(*interface{})(p) = val
+ }
+ return b, err
+ }
+
+ v, b, err := parseValue(b)
+ if err != nil {
+ return b, err
+ }
+
+ switch v[0] {
+ case '{':
+ m := make(map[string]interface{})
+ v, err = d.decodeMapStringInterface(v, unsafe.Pointer(&m))
+ val = m
+
+ case '[':
+ a := make([]interface{}, 0, 10)
+ v, err = d.decodeSlice(v, unsafe.Pointer(&a), unsafe.Sizeof(a[0]), sliceInterfaceType, decoder.decodeInterface)
+ val = a
+
+ case '"':
+ s := ""
+ v, err = d.decodeString(v, unsafe.Pointer(&s))
+ val = s
+
+ case 'n':
+ v, err = d.decodeNull(v, nil)
+ val = nil
+
+ case 't', 'f':
+ x := false
+ v, err = d.decodeBool(v, unsafe.Pointer(&x))
+ val = x
+
+ case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ if (d.flags & UseNumber) != 0 {
+ n := Number("")
+ v, err = d.decodeNumber(v, unsafe.Pointer(&n))
+ val = n
+ } else {
+ f := 0.0
+ v, err = d.decodeFloat64(v, unsafe.Pointer(&f))
+ val = f
+ }
+
+ default:
+ return b, syntaxError(v, "expected token but found '%c'", v[0])
+ }
+
+ if err != nil {
+ return b, err
+ }
+
+ if v = skipSpaces(v); len(v) != 0 {
+ return b, syntaxError(v, "unexpected trailing trailing tokens after json value")
+ }
+
+ *(*interface{})(p) = val
+ return b, nil
+}
+
+func (d decoder) decodeMaybeEmptyInterface(b []byte, p unsafe.Pointer, t reflect.Type) ([]byte, error) {
+ if hasNullPrefix(b) {
+ *(*interface{})(p) = nil
+ return b[4:], nil
+ }
+
+ if x := reflect.NewAt(t, p).Elem(); !x.IsNil() {
+ if e := x.Elem(); e.Kind() == reflect.Ptr {
+ return Parse(b, e.Interface(), d.flags)
+ }
+ } else if t.NumMethod() == 0 { // empty interface
+ return Parse(b, (*interface{})(p), d.flags)
+ }
+
+ return d.decodeUnmarshalTypeError(b, p, t)
+}
+
+func (d decoder) decodeUnmarshalTypeError(b []byte, p unsafe.Pointer, t reflect.Type) ([]byte, error) {
+ v, b, err := parseValue(b)
+ if err != nil {
+ return b, err
+ }
+ return b, &UnmarshalTypeError{
+ Value: string(v),
+ Type: t,
+ }
+}
+
+func (d decoder) decodeRawMessage(b []byte, p unsafe.Pointer) ([]byte, error) {
+ v, r, err := parseValue(b)
+ if err != nil {
+ return inputError(b, rawMessageType)
+ }
+
+ if (d.flags & DontCopyRawMessage) == 0 {
+ v = append(make([]byte, 0, len(v)), v...)
+ }
+
+ *(*RawMessage)(p) = json.RawMessage(v)
+ return r, err
+}
+
+func (d decoder) decodeJSONUnmarshaler(b []byte, p unsafe.Pointer, t reflect.Type, pointer bool) ([]byte, error) {
+ v, b, err := parseValue(b)
+ if err != nil {
+ return b, err
+ }
+
+ if len(v) != 0 && v[0] == 'n' { // null
+ return b, nil
+ }
+
+ u := reflect.NewAt(t, p)
+ if !pointer {
+ u = u.Elem()
+ t = t.Elem()
+ }
+ if u.IsNil() {
+ u.Set(reflect.New(t))
+ }
+ return b, u.Interface().(Unmarshaler).UnmarshalJSON(v)
+}
+
+func (d decoder) decodeTextUnmarshaler(b []byte, p unsafe.Pointer, t reflect.Type, pointer bool) ([]byte, error) {
+ var value string
+
+ v, b, err := parseValue(b)
+ if err != nil {
+ return b, err
+ }
+ if len(v) == 0 {
+ return inputError(v, t)
+ }
+
+ switch v[0] {
+ case 'n':
+ _, _, err := parseNull(v)
+ return b, err
+ case '"':
+ s, _, _, err := parseStringUnquote(v, nil)
+ if err != nil {
+ return b, err
+ }
+ u := reflect.NewAt(t, p)
+ if !pointer {
+ u = u.Elem()
+ t = t.Elem()
+ }
+ if u.IsNil() {
+ u.Set(reflect.New(t))
+ }
+ return b, u.Interface().(encoding.TextUnmarshaler).UnmarshalText(s)
+ case '{':
+ value = "object"
+ case '[':
+ value = "array"
+ case 't':
+ value = "true"
+ case 'f':
+ value = "false"
+ case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ value = "number"
+ }
+
+ return b, &UnmarshalTypeError{Value: value, Type: reflect.PtrTo(t)}
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/encode.go b/vendor/github.com/neilotoole/jsoncolor/encode.go
new file mode 100644
index 0000000..4259352
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/encode.go
@@ -0,0 +1,1054 @@
+package jsoncolor
+
+import (
+ "bytes"
+ "encoding"
+ "encoding/base64"
+ "math"
+ "reflect"
+ "sort"
+ "strconv"
+ "sync"
+ "time"
+ "unicode/utf8"
+ "unsafe"
+)
+
+const hex = "0123456789abcdef"
+
+func (e encoder) encodeNull(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendNull(b), nil
+}
+
+func (e encoder) encodeBool(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendBool(b, *(*bool)(p)), nil
+}
+
+func (e encoder) encodeInt(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendInt64(b, int64(*(*int)(p))), nil
+}
+
+func (e encoder) encodeInt8(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendInt64(b, int64(*(*int8)(p))), nil
+}
+
+func (e encoder) encodeInt16(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendInt64(b, int64(*(*int16)(p))), nil
+}
+
+func (e encoder) encodeInt32(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendInt64(b, int64(*(*int32)(p))), nil
+}
+
+func (e encoder) encodeInt64(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendInt64(b, *(*int64)(p)), nil
+}
+
+func (e encoder) encodeUint(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendUint64(b, uint64(*(*uint)(p))), nil
+}
+
+func (e encoder) encodeUintptr(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendUint64(b, uint64(*(*uintptr)(p))), nil
+}
+
+func (e encoder) encodeUint8(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendUint64(b, uint64(*(*uint8)(p))), nil
+}
+
+func (e encoder) encodeUint16(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendUint64(b, uint64(*(*uint16)(p))), nil
+}
+
+func (e encoder) encodeUint32(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendUint64(b, uint64(*(*uint32)(p))), nil
+}
+
+func (e encoder) encodeUint64(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return e.clrs.appendUint64(b, *(*uint64)(p)), nil
+}
+
+func (e encoder) encodeFloat32(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if e.clrs == nil {
+ return e.encodeFloat(b, float64(*(*float32)(p)), 32)
+ }
+
+ b = append(b, e.clrs.Number...)
+ var err error
+ b, err = e.encodeFloat(b, float64(*(*float32)(p)), 32)
+ b = append(b, ansiReset...)
+ return b, err
+}
+
+func (e encoder) encodeFloat64(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if e.clrs == nil {
+ return e.encodeFloat(b, *(*float64)(p), 64)
+ }
+
+ b = append(b, e.clrs.Number...)
+ var err error
+ b, err = e.encodeFloat(b, *(*float64)(p), 64)
+ b = append(b, ansiReset...)
+ return b, err
+}
+
+func (e encoder) encodeFloat(b []byte, f float64, bits int) ([]byte, error) {
+ switch {
+ case math.IsNaN(f):
+ return b, &UnsupportedValueError{Value: reflect.ValueOf(f), Str: "NaN"}
+ case math.IsInf(f, 0):
+ return b, &UnsupportedValueError{Value: reflect.ValueOf(f), Str: "inf"}
+ }
+
+ // Convert as if by ES6 number to string conversion.
+ // This matches most other JSON generators.
+ // See golang.org/issue/6384 and golang.org/issue/14135.
+ // Like fmt %g, but the exponent cutoffs are different
+ // and exponents themselves are not padded to two digits.
+ abs := math.Abs(f)
+ fmt := byte('f')
+ // Note: Must use float32 comparisons for underlying float32 value to get precise cutoffs right.
+ if abs != 0 {
+ if bits == 64 && (abs < 1e-6 || abs >= 1e21) || bits == 32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) {
+ fmt = 'e'
+ }
+ }
+
+ b = strconv.AppendFloat(b, f, fmt, -1, int(bits))
+
+ if fmt == 'e' {
+ // clean up e-09 to e-9
+ n := len(b)
+ if n >= 4 && b[n-4] == 'e' && b[n-3] == '-' && b[n-2] == '0' {
+ b[n-2] = b[n-1]
+ b = b[:n-1]
+ }
+ }
+
+ return b, nil
+}
+
+func (e encoder) encodeNumber(b []byte, p unsafe.Pointer) ([]byte, error) {
+ n := *(*Number)(p)
+ if n == "" {
+ n = "0"
+ }
+
+ _, _, err := parseNumber(stringToBytes(string(n)))
+ if err != nil {
+ return b, err
+ }
+
+ if e.clrs == nil {
+ return append(b, n...), nil
+ }
+
+ b = append(b, e.clrs.Number...)
+ b = append(b, n...)
+ b = append(b, ansiReset...)
+ return b, nil
+}
+
+func (e encoder) encodeKey(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if e.clrs == nil {
+ return e.doEncodeString(b, p)
+ }
+
+ b = append(b, e.clrs.Key...)
+ var err error
+ b, err = e.doEncodeString(b, p)
+ b = append(b, ansiReset...)
+ return b, err
+}
+
+func (e encoder) encodeString(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if e.clrs == nil {
+ return e.doEncodeString(b, p)
+ }
+
+ b = append(b, e.clrs.String...)
+ var err error
+ b, err = e.doEncodeString(b, p)
+ b = append(b, ansiReset...)
+ return b, err
+}
+
+func (e encoder) doEncodeString(b []byte, p unsafe.Pointer) ([]byte, error) {
+ s := *(*string)(p)
+ i := 0
+ j := 0
+ escapeHTML := (e.flags & EscapeHTML) != 0
+
+ b = append(b, '"')
+
+ for j < len(s) {
+ c := s[j]
+
+ if c >= 0x20 && c <= 0x7f && c != '\\' && c != '"' && (!escapeHTML || (c != '<' && c != '>' && c != '&')) {
+ // fast path: most of the time, printable ascii characters are used
+ j++
+ continue
+ }
+
+ switch c {
+ case '\\', '"':
+ b = append(b, s[i:j]...)
+ b = append(b, '\\', c)
+ i = j + 1
+ j = j + 1
+ continue
+
+ case '\n':
+ b = append(b, s[i:j]...)
+ b = append(b, '\\', 'n')
+ i = j + 1
+ j = j + 1
+ continue
+
+ case '\r':
+ b = append(b, s[i:j]...)
+ b = append(b, '\\', 'r')
+ i = j + 1
+ j = j + 1
+ continue
+
+ case '\t':
+ b = append(b, s[i:j]...)
+ b = append(b, '\\', 't')
+ i = j + 1
+ j = j + 1
+ continue
+
+ case '<', '>', '&':
+ b = append(b, s[i:j]...)
+ b = append(b, `\u00`...)
+ b = append(b, hex[c>>4], hex[c&0xF])
+ i = j + 1
+ j = j + 1
+ continue
+ }
+
+ // This encodes bytes < 0x20 except for \t, \n and \r.
+ if c < 0x20 {
+ b = append(b, s[i:j]...)
+ b = append(b, `\u00`...)
+ b = append(b, hex[c>>4], hex[c&0xF])
+ i = j + 1
+ j = j + 1
+ continue
+ }
+
+ r, size := utf8.DecodeRuneInString(s[j:])
+
+ if r == utf8.RuneError && size == 1 {
+ b = append(b, s[i:j]...)
+ b = append(b, `\ufffd`...)
+ i = j + size
+ j = j + size
+ continue
+ }
+
+ switch r {
+ case '\u2028', '\u2029':
+ // U+2028 is LINE SEPARATOR.
+ // U+2029 is PARAGRAPH SEPARATOR.
+ // They are both technically valid characters in JSON strings,
+ // but don't work in JSONP, which has to be evaluated as JavaScript,
+ // and can lead to security holes there. It is valid JSON to
+ // escape them, so we do so unconditionally.
+ // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion.
+ b = append(b, s[i:j]...)
+ b = append(b, `\u202`...)
+ b = append(b, hex[r&0xF])
+ i = j + size
+ j = j + size
+ continue
+ }
+
+ j += size
+ }
+
+ b = append(b, s[i:]...)
+ b = append(b, '"')
+ return b, nil
+}
+
+func (e encoder) encodeToString(b []byte, p unsafe.Pointer, encode encodeFunc) ([]byte, error) {
+ i := len(b)
+
+ b, err := encode(e, b, p)
+ if err != nil {
+ return b, err
+ }
+
+ j := len(b)
+ s := b[i:]
+
+ if b, err = e.doEncodeString(b, unsafe.Pointer(&s)); err != nil {
+ return b, err
+ }
+
+ n := copy(b[i:], b[j:])
+ return b[:i+n], nil
+}
+
+func (e encoder) encodeBytes(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if e.clrs == nil {
+ return e.doEncodeBytes(b, p)
+ }
+
+ b = append(b, e.clrs.Bytes...)
+ var err error
+ b, err = e.doEncodeBytes(b, p)
+ return append(b, ansiReset...), err
+}
+
+func (e encoder) doEncodeBytes(b []byte, p unsafe.Pointer) ([]byte, error) {
+ v := *(*[]byte)(p)
+ if v == nil {
+ return e.clrs.appendNull(b), nil
+ }
+
+ n := base64.StdEncoding.EncodedLen(len(v)) + 2
+
+ if avail := cap(b) - len(b); avail < n {
+ newB := make([]byte, cap(b)+(n-avail))
+ copy(newB, b)
+ b = newB[:len(b)]
+ }
+
+ i := len(b)
+ j := len(b) + n
+
+ b = b[:j]
+ b[i] = '"'
+ base64.StdEncoding.Encode(b[i+1:j-1], v)
+ b[j-1] = '"'
+ return b, nil
+}
+
+func (e encoder) encodeDuration(b []byte, p unsafe.Pointer) ([]byte, error) {
+ // NOTE: The segmentj encoder does special handling for time.Duration (converts to string).
+ // The stdlib encoder does not. It just outputs the int64 value.
+ // We choose to follow the stdlib pattern, for fuller compatibility.
+
+ b = e.clrs.appendInt64(b, int64(*(*time.Duration)(p)))
+ return b, nil
+
+ // NOTE: if we were to follow the segmentj pattern, we'd execute the code below.
+ //if e.clrs == nil {
+ // b = append(b, '"')
+ //
+ // b = appendDuration(b, *(*time.Duration)(p))
+ // b = append(b, '"')
+ // return b, nil
+ //}
+ //
+ //b = append(b, e.clrs.Time...)
+ //b = append(b, '"')
+ //b = appendDuration(b, *(*time.Duration)(p))
+ //b = append(b, '"')
+ //b = append(b, ansiReset...)
+ //return b, nil
+}
+
+func (e encoder) encodeTime(b []byte, p unsafe.Pointer) ([]byte, error) {
+ if e.clrs == nil {
+ t := *(*time.Time)(p)
+ b = append(b, '"')
+ b = t.AppendFormat(b, time.RFC3339Nano)
+ b = append(b, '"')
+ return b, nil
+ }
+
+ t := *(*time.Time)(p)
+ b = append(b, e.clrs.Time...)
+ b = append(b, '"')
+ b = t.AppendFormat(b, time.RFC3339Nano)
+ b = append(b, '"')
+ b = append(b, ansiReset...)
+ return b, nil
+}
+
+func (e encoder) encodeArray(b []byte, p unsafe.Pointer, n int, size uintptr, t reflect.Type, encode encodeFunc) ([]byte, error) {
+ var start = len(b)
+ var err error
+
+ b = e.clrs.appendPunc(b, '[')
+
+ if n > 0 {
+ e.indentr.push()
+ for i := 0; i < n; i++ {
+ if i != 0 {
+ b = e.clrs.appendPunc(b, ',')
+ }
+
+ b = e.indentr.appendByte(b, '\n')
+ b = e.indentr.appendIndent(b)
+
+ if b, err = encode(e, b, unsafe.Pointer(uintptr(p)+(uintptr(i)*size))); err != nil {
+ return b[:start], err
+ }
+ }
+ e.indentr.pop()
+ b = e.indentr.appendByte(b, '\n')
+ b = e.indentr.appendIndent(b)
+ }
+
+ b = e.clrs.appendPunc(b, ']')
+
+ return b, nil
+}
+
+func (e encoder) encodeSlice(b []byte, p unsafe.Pointer, size uintptr, t reflect.Type, encode encodeFunc) ([]byte, error) {
+ s := (*slice)(p)
+
+ if s.data == nil && s.len == 0 && s.cap == 0 {
+ return e.clrs.appendNull(b), nil
+ }
+
+ return e.encodeArray(b, s.data, s.len, size, t, encode)
+}
+
+func (e encoder) encodeMap(b []byte, p unsafe.Pointer, t reflect.Type, encodeKey, encodeValue encodeFunc, sortKeys sortFunc) ([]byte, error) {
+ m := reflect.NewAt(t, p).Elem()
+ if m.IsNil() {
+ return e.clrs.appendNull(b), nil
+ }
+
+ keys := m.MapKeys()
+ if sortKeys != nil && (e.flags&SortMapKeys) != 0 {
+ sortKeys(keys)
+ }
+
+ var start = len(b)
+ var err error
+ b = e.clrs.appendPunc(b, '{')
+
+ if len(keys) != 0 {
+ b = e.indentr.appendByte(b, '\n')
+
+ e.indentr.push()
+ for i, k := range keys {
+ v := m.MapIndex(k)
+
+ if i != 0 {
+ b = e.clrs.appendPunc(b, ',')
+ b = e.indentr.appendByte(b, '\n')
+ }
+
+ b = e.indentr.appendIndent(b)
+ if b, err = encodeKey(e, b, (*iface)(unsafe.Pointer(&k)).ptr); err != nil {
+ return b[:start], err
+ }
+
+ b = e.clrs.appendPunc(b, ':')
+ b = e.indentr.appendByte(b, ' ')
+
+ if b, err = encodeValue(e, b, (*iface)(unsafe.Pointer(&v)).ptr); err != nil {
+ return b[:start], err
+ }
+ }
+ b = e.indentr.appendByte(b, '\n')
+ e.indentr.pop()
+ b = e.indentr.appendIndent(b)
+ }
+
+ b = e.clrs.appendPunc(b, '}')
+ return b, nil
+}
+
+type element struct {
+ key string
+ val interface{}
+ raw RawMessage
+}
+
+type mapslice struct {
+ elements []element
+}
+
+func (m *mapslice) Len() int { return len(m.elements) }
+func (m *mapslice) Less(i, j int) bool { return m.elements[i].key < m.elements[j].key }
+func (m *mapslice) Swap(i, j int) { m.elements[i], m.elements[j] = m.elements[j], m.elements[i] }
+
+var mapslicePool = sync.Pool{
+ New: func() interface{} { return new(mapslice) },
+}
+
+func (e encoder) encodeMapStringInterface(b []byte, p unsafe.Pointer) ([]byte, error) {
+ m := *(*map[string]interface{})(p)
+ if m == nil {
+ return e.clrs.appendNull(b), nil
+ }
+
+ if (e.flags & SortMapKeys) == 0 {
+ // Optimized code path when the program does not need the map keys to be
+ // sorted.
+ b = e.clrs.appendPunc(b, '{')
+
+ if len(m) != 0 {
+ b = e.indentr.appendByte(b, '\n')
+
+ var err error
+ var i = 0
+
+ e.indentr.push()
+ for k, v := range m {
+ if i != 0 {
+ b = e.clrs.appendPunc(b, ',')
+ b = e.indentr.appendByte(b, '\n')
+ }
+
+ b = e.indentr.appendIndent(b)
+
+ b, err = e.encodeKey(b, unsafe.Pointer(&k))
+ if err != nil {
+ return b, err
+ }
+
+ b = e.clrs.appendPunc(b, ':')
+ b = e.indentr.appendByte(b, ' ')
+
+ b, err = Append(b, v, e.flags, e.clrs, e.indentr)
+ if err != nil {
+ return b, err
+ }
+
+ i++
+ }
+ b = e.indentr.appendByte(b, '\n')
+ e.indentr.pop()
+ b = e.indentr.appendIndent(b)
+ }
+
+ b = e.clrs.appendPunc(b, '}')
+ return b, nil
+ }
+
+ s := mapslicePool.Get().(*mapslice)
+ if cap(s.elements) < len(m) {
+ s.elements = make([]element, 0, align(10, uintptr(len(m))))
+ }
+ for key, val := range m {
+ s.elements = append(s.elements, element{key: key, val: val})
+ }
+ sort.Sort(s)
+
+ var start = len(b)
+ var err error
+ b = e.clrs.appendPunc(b, '{')
+
+ if len(s.elements) > 0 {
+ b = e.indentr.appendByte(b, '\n')
+
+ e.indentr.push()
+ for i, elem := range s.elements {
+ if i != 0 {
+ b = e.clrs.appendPunc(b, ',')
+ b = e.indentr.appendByte(b, '\n')
+ }
+
+ b = e.indentr.appendIndent(b)
+
+ b, _ = e.encodeKey(b, unsafe.Pointer(&elem.key))
+ b = e.clrs.appendPunc(b, ':')
+ b = e.indentr.appendByte(b, ' ')
+
+ b, err = Append(b, elem.val, e.flags, e.clrs, e.indentr)
+ if err != nil {
+ break
+ }
+ }
+ b = e.indentr.appendByte(b, '\n')
+ e.indentr.pop()
+ b = e.indentr.appendIndent(b)
+ }
+
+ for i := range s.elements {
+ s.elements[i] = element{}
+ }
+
+ s.elements = s.elements[:0]
+ mapslicePool.Put(s)
+
+ if err != nil {
+ return b[:start], err
+ }
+
+ b = e.clrs.appendPunc(b, '}')
+ return b, nil
+}
+
+func (e encoder) encodeMapStringRawMessage(b []byte, p unsafe.Pointer) ([]byte, error) {
+ m := *(*map[string]RawMessage)(p)
+ if m == nil {
+ return e.clrs.appendNull(b), nil
+ }
+
+ if (e.flags & SortMapKeys) == 0 {
+ // Optimized code path when the program does not need the map keys to be
+ // sorted.
+ b = e.clrs.appendPunc(b, '{')
+
+ if len(m) != 0 {
+ b = e.indentr.appendByte(b, '\n')
+
+ var err error
+ var i = 0
+
+ e.indentr.push()
+ for k, v := range m {
+ if i != 0 {
+ b = e.clrs.appendPunc(b, ',')
+ b = e.indentr.appendByte(b, '\n')
+ }
+
+ b = e.indentr.appendIndent(b)
+
+ b, _ = e.encodeKey(b, unsafe.Pointer(&k))
+
+ b = e.clrs.appendPunc(b, ':')
+ b = e.indentr.appendByte(b, ' ')
+
+ b, err = e.encodeRawMessage(b, unsafe.Pointer(&v))
+ if err != nil {
+ break
+ }
+
+ i++
+ }
+ b = e.indentr.appendByte(b, '\n')
+ e.indentr.pop()
+ b = e.indentr.appendIndent(b)
+ }
+
+ b = e.clrs.appendPunc(b, '}')
+ return b, nil
+ }
+
+ s := mapslicePool.Get().(*mapslice)
+ if cap(s.elements) < len(m) {
+ s.elements = make([]element, 0, align(10, uintptr(len(m))))
+ }
+ for key, raw := range m {
+ s.elements = append(s.elements, element{key: key, raw: raw})
+ }
+ sort.Sort(s)
+
+ var start = len(b)
+ var err error
+ b = e.clrs.appendPunc(b, '{')
+
+ if len(s.elements) > 0 {
+ b = e.indentr.appendByte(b, '\n')
+
+ e.indentr.push()
+
+ for i, elem := range s.elements {
+ if i != 0 {
+ b = e.clrs.appendPunc(b, ',')
+ b = e.indentr.appendByte(b, '\n')
+ }
+
+ b = e.indentr.appendIndent(b)
+
+ b, _ = e.encodeKey(b, unsafe.Pointer(&elem.key))
+ b = e.clrs.appendPunc(b, ':')
+ b = e.indentr.appendByte(b, ' ')
+
+ b, err = e.encodeRawMessage(b, unsafe.Pointer(&elem.raw))
+ if err != nil {
+ break
+ }
+ }
+ b = e.indentr.appendByte(b, '\n')
+ e.indentr.pop()
+ b = e.indentr.appendIndent(b)
+ }
+
+ for i := range s.elements {
+ s.elements[i] = element{}
+ }
+
+ s.elements = s.elements[:0]
+ mapslicePool.Put(s)
+
+ if err != nil {
+ return b[:start], err
+ }
+
+ b = e.clrs.appendPunc(b, '}')
+ return b, nil
+}
+
+func (e encoder) encodeStruct(b []byte, p unsafe.Pointer, st *structType) ([]byte, error) {
+ var start = len(b)
+ var err error
+ var k string
+ var n int
+
+ b = e.clrs.appendPunc(b, '{')
+
+ if len(st.fields) > 0 {
+ b = e.indentr.appendByte(b, '\n')
+ }
+
+ e.indentr.push()
+
+ for i := range st.fields {
+ f := &st.fields[i]
+ v := unsafe.Pointer(uintptr(p) + f.offset)
+
+ if f.omitempty && f.empty(v) {
+ continue
+ }
+
+ if n != 0 {
+ b = e.clrs.appendPunc(b, ',')
+ b = e.indentr.appendByte(b, '\n')
+ }
+
+ if (e.flags & EscapeHTML) != 0 {
+ k = f.html
+ } else {
+ k = f.json
+ }
+
+ lengthBeforeKey := len(b)
+ b = e.indentr.appendIndent(b)
+
+ if e.clrs == nil {
+ b = append(b, k...)
+ } else {
+ b = append(b, e.clrs.Key...)
+ b = append(b, k...)
+ b = append(b, ansiReset...)
+ }
+
+ b = e.clrs.appendPunc(b, ':')
+
+ b = e.indentr.appendByte(b, ' ')
+
+ if b, err = f.codec.encode(e, b, v); err != nil {
+ if err == (rollback{}) {
+ b = b[:lengthBeforeKey]
+ continue
+ }
+ return b[:start], err
+ }
+
+ n++
+ }
+
+ if n > 0 {
+ b = e.indentr.appendByte(b, '\n')
+ }
+
+ e.indentr.pop()
+ b = e.indentr.appendIndent(b)
+
+ b = e.clrs.appendPunc(b, '}')
+ return b, nil
+}
+
+type rollback struct{}
+
+func (rollback) Error() string { return "rollback" }
+
+func (e encoder) encodeEmbeddedStructPointer(b []byte, p unsafe.Pointer, t reflect.Type, unexported bool, offset uintptr, encode encodeFunc) ([]byte, error) {
+ p = *(*unsafe.Pointer)(p)
+ if p == nil {
+ return b, rollback{}
+ }
+ return encode(e, b, unsafe.Pointer(uintptr(p)+offset))
+}
+
+func (e encoder) encodePointer(b []byte, p unsafe.Pointer, t reflect.Type, encode encodeFunc) ([]byte, error) {
+ if p = *(*unsafe.Pointer)(p); p != nil {
+ return encode(e, b, p)
+ }
+ return e.encodeNull(b, nil)
+}
+
+func (e encoder) encodeInterface(b []byte, p unsafe.Pointer) ([]byte, error) {
+ return Append(b, *(*interface{})(p), e.flags, e.clrs, e.indentr)
+}
+
+func (e encoder) encodeMaybeEmptyInterface(b []byte, p unsafe.Pointer, t reflect.Type) ([]byte, error) {
+ return Append(b, reflect.NewAt(t, p).Elem().Interface(), e.flags, e.clrs, e.indentr)
+}
+
+func (e encoder) encodeUnsupportedTypeError(b []byte, p unsafe.Pointer, t reflect.Type) ([]byte, error) {
+ return b, &UnsupportedTypeError{Type: t}
+}
+
+// encodeRawMessage encodes a RawMessage to bytes. Unfortunately, this
+// implementation has a deficiency: it uses Unmarshal to build an
+// object from the RawMessage, which in the case of a struct, results
+// in a map being constructed, and thus the order of the keys is not
+// guaranteed to be maintained. A superior implementation would decode and
+// then re-encode (with color/indentation) the basic JSON tokens on the fly.
+// Note also that if TrustRawMessage is set, and the RawMessage is
+// invalid JSON (cannot be parsed by Unmarshal), then this function
+// falls back to encodeRawMessageNoParseTrusted, which seems to exhibit the
+// correct behavior. It's a bit of a mess, but seems to do the trick.
+func (e encoder) encodeRawMessage(b []byte, p unsafe.Pointer) ([]byte, error) {
+ v := *(*RawMessage)(p)
+
+ if v == nil {
+ return e.clrs.appendNull(b), nil
+ }
+
+ var s []byte
+
+ if (e.flags & TrustRawMessage) != 0 {
+ s = v
+ } else {
+ var err error
+ s, _, err = parseValue(v)
+ if err != nil {
+ return b, &UnsupportedValueError{Value: reflect.ValueOf(v), Str: err.Error()}
+ }
+ }
+
+ var x interface{}
+ if err := Unmarshal(s, &x); err != nil {
+ return e.encodeRawMessageNoParseTrusted(b, p)
+ }
+
+ return Append(b, x, e.flags, e.clrs, e.indentr)
+}
+
+// encodeRawMessageNoParseTrusted is a fallback method that is
+// used by encodeRawMessage if it fails to parse a trusted RawMessage.
+// The (invalid) JSON produced by this method is not colorized.
+// This method may have wonky logic or even bugs in it; little effort
+// has been expended on it because it's a rarely visited edge case.
+func (e encoder) encodeRawMessageNoParseTrusted(b []byte, p unsafe.Pointer) ([]byte, error) {
+ v := *(*RawMessage)(p)
+
+ if v == nil {
+ return e.clrs.appendNull(b), nil
+ }
+
+ var s []byte
+
+ if (e.flags & TrustRawMessage) != 0 {
+ s = v
+ } else {
+ var err error
+ s, _, err = parseValue(v)
+ if err != nil {
+ return b, &UnsupportedValueError{Value: reflect.ValueOf(v), Str: err.Error()}
+ }
+ }
+
+ if e.indentr == nil {
+ if (e.flags & EscapeHTML) != 0 {
+ return appendCompactEscapeHTML(b, s), nil
+ }
+
+ return append(b, s...), nil
+ }
+
+ // In order to get the tests inherited from the original segmentio
+ // encoder to work, we need to support indentation.
+
+ // This below is sloppy, but seems to work.
+ if (e.flags & EscapeHTML) != 0 {
+ s = appendCompactEscapeHTML(nil, s)
+ }
+
+ // The "prefix" arg to Indent is the current indentation.
+ pre := e.indentr.appendIndent(nil)
+
+ buf := &bytes.Buffer{}
+ // And now we just make use of the existing Indent function.
+ err := Indent(buf, s, string(pre), e.indentr.indent)
+ if err != nil {
+ return b, err
+ }
+
+ s = buf.Bytes()
+
+ return append(b, s...), nil
+}
+
+
+// encodeJSONMarshaler suffers from the same defect as encodeRawMessage; it
+// can result in keys being reordered.
+func (e encoder) encodeJSONMarshaler(b []byte, p unsafe.Pointer, t reflect.Type, pointer bool) ([]byte, error) {
+ v := reflect.NewAt(t, p)
+
+ if !pointer {
+ v = v.Elem()
+ }
+
+ switch v.Kind() {
+ case reflect.Ptr, reflect.Interface:
+ if v.IsNil() {
+ return e.clrs.appendNull(b), nil
+ }
+ }
+
+ j, err := v.Interface().(Marshaler).MarshalJSON()
+ if err != nil {
+ return b, err
+ }
+
+ // We effectively delegate to the encodeRawMessage method.
+ return Append(b, RawMessage(j), e.flags, e.clrs, e.indentr)
+}
+
+func (e encoder) encodeTextMarshaler(b []byte, p unsafe.Pointer, t reflect.Type, pointer bool) ([]byte, error) {
+ v := reflect.NewAt(t, p)
+
+ if !pointer {
+ v = v.Elem()
+ }
+
+ switch v.Kind() {
+ case reflect.Ptr, reflect.Interface:
+ if v.IsNil() {
+ return e.clrs.appendNull(b), nil
+ }
+ }
+
+ s, err := v.Interface().(encoding.TextMarshaler).MarshalText()
+ if err != nil {
+ return b, err
+ }
+
+ if e.clrs == nil {
+ return e.doEncodeString(b, unsafe.Pointer(&s))
+ }
+
+ b = append(b, e.clrs.TextMarshaler...)
+ b, err = e.doEncodeString(b, unsafe.Pointer(&s))
+ b = append(b, ansiReset...)
+ return b, err
+}
+
+func appendCompactEscapeHTML(dst []byte, src []byte) []byte {
+ start := 0
+ escape := false
+ inString := false
+
+ for i, c := range src {
+ if !inString {
+ switch c {
+ case '"': // enter string
+ inString = true
+ case ' ', '\n', '\r', '\t': // skip space
+ if start < i {
+ dst = append(dst, src[start:i]...)
+ }
+ start = i + 1
+ }
+ continue
+ }
+
+ if escape {
+ escape = false
+ continue
+ }
+
+ if c == '\\' {
+ escape = true
+ continue
+ }
+
+ if c == '"' {
+ inString = false
+ continue
+ }
+
+ if c == '<' || c == '>' || c == '&' {
+ if start < i {
+ dst = append(dst, src[start:i]...)
+ }
+ dst = append(dst, `\u00`...)
+ dst = append(dst, hex[c>>4], hex[c&0xF])
+ start = i + 1
+ continue
+ }
+
+ // Convert U+2028 and U+2029 (E2 80 A8 and E2 80 A9).
+ if c == 0xE2 && i+2 < len(src) && src[i+1] == 0x80 && src[i+2]&^1 == 0xA8 {
+ if start < i {
+ dst = append(dst, src[start:i]...)
+ }
+ dst = append(dst, `\u202`...)
+ dst = append(dst, hex[src[i+2]&0xF])
+ start = i + 3
+ continue
+ }
+ }
+
+ if start < len(src) {
+ dst = append(dst, src[start:]...)
+ }
+
+ return dst
+}
+
+// indenter is used to indent JSON. The push and pop methods
+// change indentation level. The appendIndent method appends the
+// computed indentation. The appendByte method appends a byte. All
+// methods are safe to use with a nil receiver.
+type indenter struct {
+ disabled bool
+ prefix string
+ indent string
+ depth int
+}
+
+// newIndenter returns a new indenter instance. If prefix and
+// indent are both empty, the indenter is effectively disabled,
+// and the appendIndent and appendByte methods are no-op.
+func newIndenter(prefix, indent string) *indenter {
+ return &indenter{
+ disabled: prefix == "" && indent == "",
+ prefix: prefix,
+ indent: indent,
+ }
+}
+
+// push increases the indentation level.
+func (in *indenter) push() {
+ if in != nil {
+ in.depth++
+ }
+}
+
+// pop decreases the indentation level.
+func (in *indenter) pop() {
+ if in != nil {
+ in.depth--
+ }
+}
+
+// appendByte appends a to b if the indenter is non-nil and enabled.
+// Otherwise b is returned unmodified.
+func (in *indenter) appendByte(b []byte, a byte) []byte {
+ if in == nil || in.disabled {
+ return b
+ }
+
+ return append(b, a)
+}
+
+// appendIndent writes indentation to b, returning the resulting slice.
+// If the indenter is nil or disabled b is returned unchanged.
+func (in *indenter) appendIndent(b []byte) []byte {
+ if in == nil || in.disabled {
+ return b
+ }
+
+ b = append(b, in.prefix...)
+ for i := 0; i < in.depth; i++ {
+ b = append(b, in.indent...)
+ }
+ return b
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/json.go b/vendor/github.com/neilotoole/jsoncolor/json.go
new file mode 100644
index 0000000..3dc5b46
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/json.go
@@ -0,0 +1,459 @@
+package jsoncolor
+
+import (
+ "bytes"
+ "encoding/json"
+ "io"
+ "reflect"
+ "runtime"
+ "sync"
+ "unsafe"
+)
+
+// Delim is documented at https://golang.org/pkg/encoding/json/#Delim
+type Delim = json.Delim
+
+// InvalidUTF8Error is documented at https://golang.org/pkg/encoding/json/#InvalidUTF8Error
+type InvalidUTF8Error = json.InvalidUTF8Error
+
+// InvalidUnmarshalError is documented at https://golang.org/pkg/encoding/json/#InvalidUnmarshalError
+type InvalidUnmarshalError = json.InvalidUnmarshalError
+
+// Marshaler is documented at https://golang.org/pkg/encoding/json/#Marshaler
+type Marshaler = json.Marshaler
+
+// MarshalerError is documented at https://golang.org/pkg/encoding/json/#MarshalerError
+type MarshalerError = json.MarshalerError
+
+// Number is documented at https://golang.org/pkg/encoding/json/#Number
+type Number = json.Number
+
+// RawMessage is documented at https://golang.org/pkg/encoding/json/#RawMessage
+type RawMessage = json.RawMessage
+
+// A SyntaxError is a description of a JSON syntax error.
+type SyntaxError = json.SyntaxError
+
+// Token is documented at https://golang.org/pkg/encoding/json/#Token
+type Token = json.Token
+
+// UnmarshalFieldError is documented at https://golang.org/pkg/encoding/json/#UnmarshalFieldError
+type UnmarshalFieldError = json.UnmarshalFieldError
+
+// UnmarshalTypeError is documented at https://golang.org/pkg/encoding/json/#UnmarshalTypeError
+type UnmarshalTypeError = json.UnmarshalTypeError
+
+// Unmarshaler is documented at https://golang.org/pkg/encoding/json/#Unmarshaler
+type Unmarshaler = json.Unmarshaler
+
+// UnsupportedTypeError is documented at https://golang.org/pkg/encoding/json/#UnsupportedTypeError
+type UnsupportedTypeError = json.UnsupportedTypeError
+
+// UnsupportedValueError is documented at https://golang.org/pkg/encoding/json/#UnsupportedValueError
+type UnsupportedValueError = json.UnsupportedValueError
+
+// AppendFlags is a type used to represent configuration options that can be
+// applied when formatting json output.
+type AppendFlags int
+
+const (
+ // EscapeHTML is a formatting flag used to to escape HTML in json strings.
+ EscapeHTML AppendFlags = 1 << iota
+
+ // SortMapKeys is formatting flag used to enable sorting of map keys when
+ // encoding JSON (this matches the behavior of the standard encoding/json
+ // package).
+ SortMapKeys
+
+ // TrustRawMessage is a performance optimization flag to skip value
+ // checking of raw messages. It should only be used if the values are
+ // known to be valid json (e.g., they were created by json.Unmarshal).
+ TrustRawMessage
+)
+
+// ParseFlags is a type used to represent configuration options that can be
+// applied when parsing json input.
+type ParseFlags int
+
+const (
+ // DisallowUnknownFields is a parsing flag used to prevent decoding of
+ // objects to Go struct values when a field of the input does not match
+ // with any of the struct fields.
+ DisallowUnknownFields ParseFlags = 1 << iota
+
+ // UseNumber is a parsing flag used to load numeric values as Number
+ // instead of float64.
+ UseNumber
+
+ // DontCopyString is a parsing flag used to provide zero-copy support when
+ // loading string values from a json payload. It is not always possible to
+ // avoid dynamic memory allocations, for example when a string is escaped in
+ // the json data a new buffer has to be allocated, but when the `wire` value
+ // can be used as content of a Go value the decoder will simply point into
+ // the input buffer.
+ DontCopyString
+
+ // DontCopyNumber is a parsing flag used to provide zero-copy support when
+ // loading Number values (see DontCopyString and DontCopyRawMessage).
+ DontCopyNumber
+
+ // DontCopyRawMessage is a parsing flag used to provide zero-copy support
+ // when loading RawMessage values from a json payload. When used, the
+ // RawMessage values will not be allocated into new memory buffers and
+ // will instead point directly to the area of the input buffer where the
+ // value was found.
+ DontCopyRawMessage
+
+ // DontMatchCaseInsensitiveStructFields is a parsing flag used to prevent
+ // matching fields in a case-insensitive way. This can prevent degrading
+ // performance on case conversions, and can also act as a stricter decoding
+ // mode.
+ DontMatchCaseInsensitiveStructFields
+
+ // ZeroCopy is a parsing flag that combines all the copy optimizations
+ // available in the package.
+ //
+ // The zero-copy optimizations are better used in request-handler style
+ // code where none of the values are retained after the handler returns.
+ ZeroCopy = DontCopyString | DontCopyNumber | DontCopyRawMessage
+)
+
+// Append acts like Marshal but appends the json representation to b instead of
+// always reallocating a new slice.
+func Append(b []byte, x interface{}, flags AppendFlags, clrs *Colors, indentr *indenter) ([]byte, error) {
+ if x == nil {
+ // Special case for nil values because it makes the rest of the code
+ // simpler to assume that it won't be seeing nil pointers.
+ return clrs.appendNull(b), nil
+ }
+
+ t := reflect.TypeOf(x)
+ p := (*iface)(unsafe.Pointer(&x)).ptr
+
+ cache := cacheLoad()
+ c, found := cache[typeid(t)]
+
+ if !found {
+ c = constructCachedCodec(t, cache)
+ }
+
+ b, err := c.encode(encoder{flags: flags, clrs: clrs, indentr: indentr}, b, p)
+ runtime.KeepAlive(x)
+ return b, err
+}
+
+// Compact is documented at https://golang.org/pkg/encoding/json/#Compact
+func Compact(dst *bytes.Buffer, src []byte) error {
+ return json.Compact(dst, src)
+}
+
+// HTMLEscape is documented at https://golang.org/pkg/encoding/json/#HTMLEscape
+func HTMLEscape(dst *bytes.Buffer, src []byte) {
+ json.HTMLEscape(dst, src)
+}
+
+// Indent is documented at https://golang.org/pkg/encoding/json/#Indent
+func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error {
+ return json.Indent(dst, src, prefix, indent)
+}
+
+// Marshal is documented at https://golang.org/pkg/encoding/json/#Marshal
+func Marshal(x interface{}) ([]byte, error) {
+ var err error
+ var buf = encoderBufferPool.Get().(*encoderBuffer)
+
+ if buf.data, err = Append(buf.data[:0], x, EscapeHTML|SortMapKeys, nil, nil); err != nil {
+ return nil, err
+ }
+
+ b := make([]byte, len(buf.data))
+ copy(b, buf.data)
+ encoderBufferPool.Put(buf)
+ return b, nil
+}
+
+// MarshalIndent is documented at https://golang.org/pkg/encoding/json/#MarshalIndent
+func MarshalIndent(x interface{}, prefix, indent string) ([]byte, error) {
+ b, err := Marshal(x)
+
+ if err == nil {
+ tmp := &bytes.Buffer{}
+ tmp.Grow(2 * len(b))
+
+ if err = Indent(tmp, b, prefix, indent); err != nil {
+ return b, err
+ }
+
+ b = tmp.Bytes()
+ }
+
+ return b, err
+}
+
+// Unmarshal is documented at https://golang.org/pkg/encoding/json/#Unmarshal
+func Unmarshal(b []byte, x interface{}) error {
+ r, err := Parse(b, x, 0)
+ if len(r) != 0 {
+ if _, ok := err.(*SyntaxError); !ok {
+ // The encoding/json package prioritizes reporting errors caused by
+ // unexpected trailing bytes over other issues; here we emulate this
+ // behavior by overriding the error.
+ err = syntaxError(r, "invalid character '%c' after top-level value", r[0])
+ }
+ }
+ return err
+}
+
+// Parse behaves like Unmarshal but the caller can pass a set of flags to
+// configure the parsing behavior.
+func Parse(b []byte, x interface{}, flags ParseFlags) ([]byte, error) {
+ t := reflect.TypeOf(x)
+ p := (*iface)(unsafe.Pointer(&x)).ptr
+
+ if t == nil || p == nil || t.Kind() != reflect.Ptr {
+ _, r, err := parseValue(skipSpaces(b))
+ r = skipSpaces(r)
+ if err != nil {
+ return r, err
+ }
+ return r, &InvalidUnmarshalError{Type: t}
+ }
+ t = t.Elem()
+
+ cache := cacheLoad()
+ c, found := cache[typeid(t)]
+
+ if !found {
+ c = constructCachedCodec(t, cache)
+ }
+
+ r, err := c.decode(decoder{flags: flags}, skipSpaces(b), p)
+ return skipSpaces(r), err
+}
+
+// Valid is documented at https://golang.org/pkg/encoding/json/#Valid
+func Valid(data []byte) bool {
+ _, data, err := parseValue(skipSpaces(data))
+ if err != nil {
+ return false
+ }
+ return len(skipSpaces(data)) == 0
+}
+
+// Decoder is documented at https://golang.org/pkg/encoding/json/#Decoder
+type Decoder struct {
+ reader io.Reader
+ buffer []byte
+ remain []byte
+ inputOffset int64
+ err error
+ flags ParseFlags
+}
+
+// NewDecoder is documented at https://golang.org/pkg/encoding/json/#NewDecoder
+func NewDecoder(r io.Reader) *Decoder { return &Decoder{reader: r} }
+
+// Buffered is documented at https://golang.org/pkg/encoding/json/#Decoder.Buffered
+func (dec *Decoder) Buffered() io.Reader {
+ return bytes.NewReader(dec.remain)
+}
+
+// Decode is documented at https://golang.org/pkg/encoding/json/#Decoder.Decode
+func (dec *Decoder) Decode(v interface{}) error {
+ raw, err := dec.readValue()
+ if err != nil {
+ return err
+ }
+ _, err = Parse(raw, v, dec.flags)
+ return err
+}
+
+const (
+ minBufferSize = 32768
+ minReadSize = 4096
+)
+
+// readValue reads one JSON value from the buffer and returns its raw bytes. It
+// is optimized for the "one JSON value per line" case.
+func (dec *Decoder) readValue() (v []byte, err error) {
+ var n int
+ var r []byte
+
+ for {
+ if len(dec.remain) != 0 {
+ v, r, err = parseValue(dec.remain)
+ if err == nil {
+ dec.remain, n = skipSpacesN(r)
+ dec.inputOffset += int64(len(v) + n)
+ return
+ }
+ if len(r) != 0 {
+ // Parsing of the next JSON value stopped at a position other
+ // than the end of the input buffer, which indicaates that a
+ // syntax error was encountered.
+ return
+ }
+ }
+
+ if err = dec.err; err != nil {
+ if len(dec.remain) != 0 && err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ return
+ }
+
+ if dec.buffer == nil {
+ dec.buffer = make([]byte, 0, minBufferSize)
+ } else {
+ dec.buffer = dec.buffer[:copy(dec.buffer[:cap(dec.buffer)], dec.remain)]
+ dec.remain = nil
+ }
+
+ if (cap(dec.buffer) - len(dec.buffer)) < minReadSize {
+ buf := make([]byte, len(dec.buffer), 2*cap(dec.buffer))
+ copy(buf, dec.buffer)
+ dec.buffer = buf
+ }
+
+ n, err = io.ReadFull(dec.reader, dec.buffer[len(dec.buffer):cap(dec.buffer)])
+ if n > 0 {
+ dec.buffer = dec.buffer[:len(dec.buffer)+n]
+ if err != nil {
+ err = nil
+ }
+ } else if err == io.ErrUnexpectedEOF {
+ err = io.EOF
+ }
+ dec.remain, n = skipSpacesN(dec.buffer)
+ dec.inputOffset += int64(n)
+ dec.err = err
+ }
+}
+
+// DisallowUnknownFields is documented at https://golang.org/pkg/encoding/json/#Decoder.DisallowUnknownFields
+func (dec *Decoder) DisallowUnknownFields() { dec.flags |= DisallowUnknownFields }
+
+// UseNumber is documented at https://golang.org/pkg/encoding/json/#Decoder.UseNumber
+func (dec *Decoder) UseNumber() { dec.flags |= UseNumber }
+
+// DontCopyString is an extension to the standard encoding/json package
+// which instructs the decoder to not copy strings loaded from the json
+// payloads when possible.
+func (dec *Decoder) DontCopyString() { dec.flags |= DontCopyString }
+
+// DontCopyNumber is an extension to the standard encoding/json package
+// which instructs the decoder to not copy numbers loaded from the json
+// payloads.
+func (dec *Decoder) DontCopyNumber() { dec.flags |= DontCopyNumber }
+
+// DontCopyRawMessage is an extension to the standard encoding/json package
+// which instructs the decoder to not allocate RawMessage values in separate
+// memory buffers (see the documentation of the DontcopyRawMessage flag for
+// more detais).
+func (dec *Decoder) DontCopyRawMessage() { dec.flags |= DontCopyRawMessage }
+
+// DontMatchCaseInsensitiveStructFields is an extension to the standard
+// encoding/json package which instructs the decoder to not match object fields
+// against struct fields in a case-insensitive way, the field names have to
+// match exactly to be decoded into the struct field values.
+func (dec *Decoder) DontMatchCaseInsensitiveStructFields() {
+ dec.flags |= DontMatchCaseInsensitiveStructFields
+}
+
+// ZeroCopy is an extension to the standard encoding/json package which enables
+// all the copy optimizations of the decoder.
+func (dec *Decoder) ZeroCopy() { dec.flags |= ZeroCopy }
+
+// InputOffset returns the input stream byte offset of the current decoder position.
+// The offset gives the location of the end of the most recently returned token
+// and the beginning of the next token.
+func (dec *Decoder) InputOffset() int64 {
+ return dec.inputOffset
+}
+
+// Encoder is documented at https://golang.org/pkg/encoding/json/#Encoder
+type Encoder struct {
+ writer io.Writer
+ buffer *bytes.Buffer
+ err error
+ flags AppendFlags
+ clrs *Colors
+ indentr *indenter
+}
+
+// NewEncoder is documented at https://golang.org/pkg/encoding/json/#NewEncoder
+func NewEncoder(w io.Writer) *Encoder { return &Encoder{writer: w, flags: EscapeHTML | SortMapKeys} }
+
+// SetColors sets the colors for the encoder to use.
+func (enc *Encoder) SetColors(c *Colors) {
+ enc.clrs = c
+}
+
+// Encode is documented at https://golang.org/pkg/encoding/json/#Encoder.Encode
+func (enc *Encoder) Encode(v interface{}) error {
+ if enc.err != nil {
+ return enc.err
+ }
+
+ var err error
+ var buf = encoderBufferPool.Get().(*encoderBuffer)
+
+ // Note: unlike the original segmentio encoder, indentation is
+ // performed via the Append function.
+ buf.data, err = Append(buf.data[:0], v, enc.flags, enc.clrs, enc.indentr)
+ if err != nil {
+ encoderBufferPool.Put(buf)
+ return err
+ }
+
+ buf.data = append(buf.data, '\n')
+ b := buf.data
+
+ if _, err := enc.writer.Write(b); err != nil {
+ enc.err = err
+ }
+
+ encoderBufferPool.Put(buf)
+ return err
+}
+
+// SetEscapeHTML is documented at https://golang.org/pkg/encoding/json/#Encoder.SetEscapeHTML
+func (enc *Encoder) SetEscapeHTML(on bool) {
+ if on {
+ enc.flags |= EscapeHTML
+ } else {
+ enc.flags &= ^EscapeHTML
+ }
+}
+
+// SetIndent is documented at https://golang.org/pkg/encoding/json/#Encoder.SetIndent
+func (enc *Encoder) SetIndent(prefix, indent string) {
+ enc.indentr = newIndenter(prefix, indent)
+}
+
+// SetSortMapKeys is an extension to the standard encoding/json package which
+// allows the program to toggle sorting of map keys on and off.
+func (enc *Encoder) SetSortMapKeys(on bool) {
+ if on {
+ enc.flags |= SortMapKeys
+ } else {
+ enc.flags &= ^SortMapKeys
+ }
+}
+
+// SetTrustRawMessage skips value checking when encoding a raw json message. It should only
+// be used if the values are known to be valid json, e.g. because they were originally created
+// by json.Unmarshal.
+func (enc *Encoder) SetTrustRawMessage(on bool) {
+ if on {
+ enc.flags |= TrustRawMessage
+ } else {
+ enc.flags &= ^TrustRawMessage
+ }
+}
+
+var encoderBufferPool = sync.Pool{
+ New: func() interface{} { return &encoderBuffer{data: make([]byte, 0, 4096)} },
+}
+
+type encoderBuffer struct{ data []byte }
diff --git a/vendor/github.com/neilotoole/jsoncolor/jsoncolor.go b/vendor/github.com/neilotoole/jsoncolor/jsoncolor.go
new file mode 100644
index 0000000..4c8835c
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/jsoncolor.go
@@ -0,0 +1,141 @@
+package jsoncolor
+
+import (
+ "strconv"
+)
+
+// Colors specifies colorization of JSON output. Each field
+// is a Color, which is simply the bytes of the terminal color code.
+type Colors struct {
+ // Null is the color for JSON nil.
+ Null Color
+
+ // Bool is the color for boolean values.
+ Bool Color
+
+ // Number is the color for number values.
+ Number Color
+
+ // String is the color for string values.
+ String Color
+
+ // Key is the color for JSON keys.
+ Key Color
+
+ // Bytes is the color for byte data.
+ Bytes Color
+
+ // Time is the color for datetime values.
+ Time Color
+
+ // Punc is the color for JSON punctuation: []{},: etc.
+ Punc Color
+
+ // TextMarshaler is the color for values implementing encoding.TextMarshaler.
+ TextMarshaler Color
+}
+
+// appendNull appends a colorized "null" to b.
+func (c *Colors) appendNull(b []byte) []byte {
+ if c == nil {
+ return append(b, "null"...)
+ }
+
+ b = append(b, c.Null...)
+ b = append(b, "null"...)
+ return append(b, ansiReset...)
+}
+
+// appendBool appends the colorized bool v to b.
+func (c *Colors) appendBool(b []byte, v bool) []byte {
+ if c == nil {
+ if v {
+ return append(b, "true"...)
+ }
+
+ return append(b, "false"...)
+ }
+
+ b = append(b, c.Bool...)
+ if v {
+ b = append(b, "true"...)
+ } else {
+ b = append(b, "false"...)
+ }
+
+ return append(b, ansiReset...)
+}
+
+// appendKey appends the colorized key v to b.
+func (c *Colors) appendKey(b []byte, v []byte) []byte {
+ if c == nil {
+ return append(b, v...)
+ }
+
+ b = append(b, c.Key...)
+ b = append(b, v...)
+ return append(b, ansiReset...)
+}
+
+// appendInt64 appends the colorized int64 v to b.
+func (c *Colors) appendInt64(b []byte, v int64) []byte {
+ if c == nil {
+ return strconv.AppendInt(b, v, 10)
+ }
+
+ b = append(b, c.Number...)
+ b = strconv.AppendInt(b, v, 10)
+ return append(b, ansiReset...)
+}
+
+// appendUint64 appends the colorized uint64 v to b.
+func (c *Colors) appendUint64(b []byte, v uint64) []byte {
+ if c == nil {
+ return strconv.AppendUint(b, v, 10)
+ }
+
+ b = append(b, c.Number...)
+ b = strconv.AppendUint(b, v, 10)
+ return append(b, ansiReset...)
+}
+
+// appendPunc appends the colorized punctuation mark v to b.
+func (c *Colors) appendPunc(b []byte, v byte) []byte {
+ if c == nil {
+ return append(b, v)
+ }
+
+ b = append(b, c.Punc...)
+ b = append(b, v)
+ return append(b, ansiReset...)
+}
+
+// Color is used to render terminal colors. In effect, Color is
+// the bytes of the ANSI prefix code. The zero value is valid (results in
+// no colorization). When Color is non-zero, the encoder writes the prefix,
+// then the actual value, then the ANSI reset code.
+//
+// Example value:
+//
+// number := Color("\x1b[36m")
+type Color []byte
+
+// ansiReset is the ANSI ansiReset escape code.
+const ansiReset = "\x1b[0m"
+
+// DefaultColors returns the default Colors configuration.
+// These colors largely follow jq's default colorization,
+// with some deviation.
+func DefaultColors() *Colors {
+ return &Colors{
+ Null: Color("\x1b[2m"),
+ Bool: Color("\x1b[1m"),
+ Number: Color("\x1b[36m"),
+ String: Color("\x1b[32m"),
+ Key: Color("\x1b[34;1m"),
+ Bytes: Color("\x1b[2m"),
+ Time: Color("\x1b[32;2m"),
+ Punc: Color{}, // No colorization
+ TextMarshaler: Color("\x1b[32m"), // Same as String
+ }
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/parse.go b/vendor/github.com/neilotoole/jsoncolor/parse.go
new file mode 100644
index 0000000..0f43b4c
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/parse.go
@@ -0,0 +1,735 @@
+package jsoncolor
+
+import (
+ "bytes"
+ "math"
+ "reflect"
+ "unicode"
+ "unicode/utf16"
+ "unicode/utf8"
+)
+
+// All spaces characters defined in the json specification.
+const (
+ sp = ' '
+ ht = '\t'
+ nl = '\n'
+ cr = '\r'
+)
+
+const (
+ escape = '\\'
+ quote = '"' //nolint:varcheck // from original code
+)
+
+func skipSpaces(b []byte) []byte {
+ b, _ = skipSpacesN(b)
+ return b
+}
+
+func skipSpacesN(b []byte) ([]byte, int) {
+ for i := range b {
+ switch b[i] {
+ case sp, ht, nl, cr:
+ default:
+ return b[i:], i
+ }
+ }
+ return nil, 0
+}
+
+// parseInt parses a decimanl representation of an int64 from b.
+//
+// The function is equivalent to calling strconv.ParseInt(string(b), 10, 64) but
+// it prevents Go from making a memory allocation for converting a byte slice to
+// a string (escape analysis fails due to the error returned by strconv.ParseInt).
+//
+// Because it only works with base 10 the function is also significantly faster
+// than strconv.ParseInt.
+func parseInt(b []byte, t reflect.Type) (int64, []byte, error) {
+ var value int64
+ var count int
+
+ if len(b) == 0 {
+ return 0, b, syntaxError(b, "cannot decode integer from an empty input")
+ }
+
+ if b[0] == '-' {
+ const max = math.MinInt64
+ const lim = max / 10
+
+ if len(b) == 1 {
+ return 0, b, syntaxError(b, "cannot decode integer from '-'")
+ }
+
+ if len(b) > 2 && b[1] == '0' && '0' <= b[2] && b[2] <= '9' {
+ return 0, b, syntaxError(b, "invalid leading character '0' in integer")
+ }
+
+ for _, d := range b[1:] {
+ if !(d >= '0' && d <= '9') {
+ if count == 0 {
+ b, err := inputError(b, t)
+ return 0, b, err
+ }
+ break
+ }
+
+ if value < lim {
+ return 0, b, unmarshalOverflow(b, t)
+ }
+
+ value *= 10
+ x := int64(d - '0')
+
+ if value < (max + x) {
+ return 0, b, unmarshalOverflow(b, t)
+ }
+
+ value -= x
+ count++
+ }
+
+ count++
+ } else {
+ const max = math.MaxInt64
+ const lim = max / 10
+
+ if len(b) > 1 && b[0] == '0' && '0' <= b[1] && b[1] <= '9' {
+ return 0, b, syntaxError(b, "invalid leading character '0' in integer")
+ }
+
+ for _, d := range b {
+ if !(d >= '0' && d <= '9') {
+ if count == 0 {
+ b, err := inputError(b, t)
+ return 0, b, err
+ }
+ break
+ }
+ x := int64(d - '0')
+
+ if value > lim {
+ return 0, b, unmarshalOverflow(b, t)
+ }
+
+ if value *= 10; value > (max - x) {
+ return 0, b, unmarshalOverflow(b, t)
+ }
+
+ value += x
+ count++
+ }
+ }
+
+ if count < len(b) {
+ switch b[count] {
+ case '.', 'e', 'E': // was this actually a float?
+ v, r, err := parseNumber(b)
+ if err != nil {
+ v, r = b[:count+1], b[count+1:]
+ }
+ return 0, r, unmarshalTypeError(v, t)
+ }
+ }
+
+ return value, b[count:], nil
+}
+
+// parseUint is like parseInt but for unsigned integers.
+func parseUint(b []byte, t reflect.Type) (uint64, []byte, error) {
+ const max = math.MaxUint64
+ const lim = max / 10
+
+ var value uint64
+ var count int
+
+ if len(b) == 0 {
+ return 0, b, syntaxError(b, "cannot decode integer value from an empty input")
+ }
+
+ if len(b) > 1 && b[0] == '0' && '0' <= b[1] && b[1] <= '9' {
+ return 0, b, syntaxError(b, "invalid leading character '0' in integer")
+ }
+
+ for _, d := range b {
+ if !(d >= '0' && d <= '9') {
+ if count == 0 {
+ b, err := inputError(b, t)
+ return 0, b, err
+ }
+ break
+ }
+ x := uint64(d - '0')
+
+ if value > lim {
+ return 0, b, unmarshalOverflow(b, t)
+ }
+
+ if value *= 10; value > (max - x) {
+ return 0, b, unmarshalOverflow(b, t)
+ }
+
+ value += x
+ count++
+ }
+
+ if count < len(b) {
+ switch b[count] {
+ case '.', 'e', 'E': // was this actually a float?
+ v, r, err := parseNumber(b)
+ if err != nil {
+ v, r = b[:count+1], b[count+1:]
+ }
+ return 0, r, unmarshalTypeError(v, t)
+ }
+ }
+
+ return value, b[count:], nil
+}
+
+// parseUintHex parses a hexadecimanl representation of a uint64 from b.
+//
+// The function is equivalent to calling strconv.ParseUint(string(b), 16, 64) but
+// it prevents Go from making a memory allocation for converting a byte slice to
+// a string (escape analysis fails due to the error returned by strconv.ParseUint).
+//
+// Because it only works with base 16 the function is also significantly faster
+// than strconv.ParseUint.
+func parseUintHex(b []byte) (uint64, []byte, error) {
+ const max = math.MaxUint64
+ const lim = max / 0x10
+
+ var value uint64
+ var count int
+
+ if len(b) == 0 {
+ return 0, b, syntaxError(b, "cannot decode hexadecimal value from an empty input")
+ }
+
+parseLoop:
+ for i, d := range b {
+ var x uint64
+
+ switch {
+ case d >= '0' && d <= '9':
+ x = uint64(d - '0')
+
+ case d >= 'A' && d <= 'F':
+ x = uint64(d-'A') + 0xA
+
+ case d >= 'a' && d <= 'f':
+ x = uint64(d-'a') + 0xA
+
+ default:
+ if i == 0 {
+ return 0, b, syntaxError(b, "expected hexadecimal digit but found '%c'", d)
+ }
+ break parseLoop
+ }
+
+ if value > lim {
+ return 0, b, syntaxError(b, "hexadecimal value out of range")
+ }
+
+ if value *= 0x10; value > (max - x) {
+ return 0, b, syntaxError(b, "hexadecimal value out of range")
+ }
+
+ value += x
+ count++
+ }
+
+ return value, b[count:], nil
+}
+
+func parseNull(b []byte) ([]byte, []byte, error) {
+ if hasNullPrefix(b) {
+ return b[:4], b[4:], nil
+ }
+ if len(b) < 4 {
+ return nil, b[len(b):], unexpectedEOF(b)
+ }
+ return nil, b, syntaxError(b, "expected 'null' but found invalid token")
+}
+
+func parseTrue(b []byte) ([]byte, []byte, error) {
+ if hasTruePrefix(b) {
+ return b[:4], b[4:], nil
+ }
+ if len(b) < 4 {
+ return nil, b[len(b):], unexpectedEOF(b)
+ }
+ return nil, b, syntaxError(b, "expected 'true' but found invalid token")
+}
+
+func parseFalse(b []byte) ([]byte, []byte, error) {
+ if hasFalsePrefix(b) {
+ return b[:5], b[5:], nil
+ }
+ if len(b) < 5 {
+ return nil, b[len(b):], unexpectedEOF(b)
+ }
+ return nil, b, syntaxError(b, "expected 'false' but found invalid token")
+}
+
+func parseNumber(b []byte) (v, r []byte, err error) {
+ if len(b) == 0 {
+ r, err = b, unexpectedEOF(b)
+ return
+ }
+
+ i := 0
+ // sign
+ if b[i] == '-' {
+ i++
+ }
+
+ if i == len(b) {
+ r, err = b[i:], syntaxError(b, "missing number value after sign")
+ return
+ }
+
+ if b[i] < '0' || b[i] > '9' {
+ r, err = b[i:], syntaxError(b, "expected digit but got '%c'", b[i])
+ return
+ }
+
+ // integer part
+ if b[i] == '0' {
+ i++
+ if i == len(b) || (b[i] != '.' && b[i] != 'e' && b[i] != 'E') {
+ v, r = b[:i], b[i:]
+ return
+ }
+ if '0' <= b[i] && b[i] <= '9' {
+ r, err = b[i:], syntaxError(b, "cannot decode number with leading '0' character")
+ return
+ }
+ }
+
+ for i < len(b) && '0' <= b[i] && b[i] <= '9' {
+ i++
+ }
+
+ // decimal part
+ if i < len(b) && b[i] == '.' {
+ i++
+ decimalStart := i
+
+ for i < len(b) {
+ if c := b[i]; !('0' <= c && c <= '9') {
+ if i == decimalStart {
+ r, err = b[i:], syntaxError(b, "expected digit but found '%c'", c)
+ return
+ }
+ break
+ }
+ i++
+ }
+
+ if i == decimalStart {
+ r, err = b[i:], syntaxError(b, "expected decimal part after '.'")
+ return
+ }
+ }
+
+ // exponent part
+ if i < len(b) && (b[i] == 'e' || b[i] == 'E') {
+ i++
+
+ if i < len(b) {
+ if c := b[i]; c == '+' || c == '-' {
+ i++
+ }
+ }
+
+ if i == len(b) {
+ r, err = b[i:], syntaxError(b, "missing exponent in number")
+ return
+ }
+
+ exponentStart := i
+
+ for i < len(b) {
+ if c := b[i]; !('0' <= c && c <= '9') {
+ if i == exponentStart {
+ err = syntaxError(b, "expected digit but found '%c'", c)
+ return
+ }
+ break
+ }
+ i++
+ }
+ }
+
+ v, r = b[:i], b[i:]
+ return
+}
+
+func parseUnicode(b []byte) (rune, int, error) {
+ if len(b) < 4 {
+ return 0, 0, syntaxError(b, "unicode code point must have at least 4 characters")
+ }
+
+ u, r, err := parseUintHex(b[:4])
+ if err != nil {
+ return 0, 0, syntaxError(b, "parsing unicode code point: %s", err)
+ }
+
+ if len(r) != 0 {
+ return 0, 0, syntaxError(b, "invalid unicode code point")
+ }
+
+ return rune(u), 4, nil
+}
+
+func parseStringFast(b []byte) ([]byte, []byte, bool, error) {
+ if len(b) < 2 {
+ return nil, b[len(b):], false, unexpectedEOF(b)
+ }
+ if b[0] != '"' {
+ return nil, b, false, syntaxError(b, "expected '\"' at the beginning of a string value")
+ }
+
+ n := bytes.IndexByte(b[1:], '"') + 2
+ if n <= 1 {
+ return nil, b[len(b):], false, syntaxError(b, "missing '\"' at the end of a string value")
+ }
+ if bytes.IndexByte(b[1:n], '\\') < 0 && asciiValidPrint(b[1:n]) {
+ return b[:n], b[n:], false, nil
+ }
+
+ for i := 1; i < len(b); i++ {
+ switch b[i] {
+ case '\\':
+ if i++; i < len(b) {
+ switch b[i] {
+ case '"', '\\', '/', 'n', 'r', 't', 'f', 'b':
+ case 'u':
+ _, n, err := parseUnicode(b[i+1:])
+ if err != nil {
+ return nil, b, false, err
+ }
+ i += n
+ default:
+ return nil, b, false, syntaxError(b, "invalid character '%c' in string escape code", b[i])
+ }
+ }
+
+ case '"':
+ return b[:i+1], b[i+1:], true, nil
+
+ default:
+ if b[i] < 0x20 {
+ return nil, b, false, syntaxError(b, "invalid character '%c' in string escape code", b[i])
+ }
+ }
+ }
+
+ return nil, b[len(b):], false, syntaxError(b, "missing '\"' at the end of a string value")
+}
+
+func parseString(b []byte) ([]byte, []byte, error) {
+ s, b, _, err := parseStringFast(b)
+ return s, b, err
+}
+
+func parseStringUnquote(b []byte, r []byte) ([]byte, []byte, bool, error) {
+ s, b, escaped, err := parseStringFast(b)
+ if err != nil {
+ return s, b, false, err
+ }
+
+ s = s[1 : len(s)-1] // trim the quotes
+
+ if !escaped {
+ return s, b, false, nil
+ }
+
+ if r == nil {
+ r = make([]byte, 0, len(s))
+ }
+
+ for len(s) != 0 {
+ i := bytes.IndexByte(s, '\\')
+
+ if i < 0 {
+ r = appendCoerceInvalidUTF8(r, s)
+ break
+ }
+
+ r = appendCoerceInvalidUTF8(r, s[:i])
+ s = s[i+1:]
+
+ c := s[0]
+ switch c {
+ case '"', '\\', '/':
+ // simple escaped character
+ case 'n':
+ c = '\n'
+
+ case 'r':
+ c = '\r'
+
+ case 't':
+ c = '\t'
+
+ case 'b':
+ c = '\b'
+
+ case 'f':
+ c = '\f'
+
+ case 'u':
+ s = s[1:]
+
+ r1, n1, err := parseUnicode(s)
+ if err != nil {
+ return r, b, true, err
+ }
+ s = s[n1:]
+
+ if utf16.IsSurrogate(r1) {
+ if !hasPrefix(s, `\u`) {
+ r1 = unicode.ReplacementChar
+ } else {
+ r2, n2, err := parseUnicode(s[2:])
+ if err != nil {
+ return r, b, true, err
+ }
+ if r1 = utf16.DecodeRune(r1, r2); r1 != unicode.ReplacementChar {
+ s = s[2+n2:]
+ }
+ }
+ }
+
+ r = appendRune(r, r1)
+ continue
+
+ default: // not sure what this escape sequence is
+ return r, b, false, syntaxError(s, "invalid character '%c' in string escape code", c)
+ }
+
+ r = append(r, c)
+ s = s[1:]
+ }
+
+ return r, b, true, nil
+}
+
+func appendRune(b []byte, r rune) []byte {
+ n := len(b)
+ b = append(b, 0, 0, 0, 0)
+ return b[:n+utf8.EncodeRune(b[n:], r)]
+}
+
+func appendCoerceInvalidUTF8(b []byte, s []byte) []byte {
+ c := [4]byte{}
+
+ for _, r := range string(s) {
+ b = append(b, c[:utf8.EncodeRune(c[:], r)]...)
+ }
+
+ return b
+}
+
+func parseObject(b []byte) ([]byte, []byte, error) {
+ if len(b) < 2 {
+ return nil, b[len(b):], unexpectedEOF(b)
+ }
+
+ if b[0] != '{' {
+ return nil, b, syntaxError(b, "expected '{' at the beginning of an object value")
+ }
+
+ var err error
+ var a = b
+ var n = len(b)
+ var i = 0
+
+ b = b[1:]
+ for {
+ b = skipSpaces(b)
+
+ if len(b) == 0 {
+ return nil, b, syntaxError(b, "cannot decode object from empty input")
+ }
+
+ if b[0] == '}' {
+ j := (n - len(b)) + 1
+ return a[:j], a[j:], nil
+ }
+
+ if i != 0 {
+ if len(b) == 0 {
+ return nil, b, syntaxError(b, "unexpected EOF after object field value")
+ }
+ if b[0] != ',' {
+ return nil, b, syntaxError(b, "expected ',' after object field value but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+ if len(b) == 0 {
+ return nil, b, unexpectedEOF(b)
+ }
+ if b[0] == '}' {
+ return nil, b, syntaxError(b, "unexpected trailing comma after object field")
+ }
+ }
+
+ _, b, err = parseString(b)
+ if err != nil {
+ return nil, b, err
+ }
+ b = skipSpaces(b)
+
+ if len(b) == 0 {
+ return nil, b, syntaxError(b, "unexpected EOF after object field key")
+ }
+ if b[0] != ':' {
+ return nil, b, syntaxError(b, "expected ':' after object field key but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+
+ _, b, err = parseValue(b)
+ if err != nil {
+ return nil, b, err
+ }
+
+ i++
+ }
+}
+
+func parseArray(b []byte) ([]byte, []byte, error) {
+ if len(b) < 2 {
+ return nil, b[len(b):], unexpectedEOF(b)
+ }
+
+ if b[0] != '[' {
+ return nil, b, syntaxError(b, "expected '[' at the beginning of array value")
+ }
+
+ var err error
+ var a = b
+ var n = len(b)
+ var i = 0
+
+ b = b[1:]
+ for {
+ b = skipSpaces(b)
+
+ if len(b) == 0 {
+ return nil, b, syntaxError(b, "missing closing ']' after array value")
+ }
+
+ if b[0] == ']' {
+ j := (n - len(b)) + 1
+ return a[:j], a[j:], nil
+ }
+
+ if i != 0 {
+ if len(b) == 0 {
+ return nil, b, syntaxError(b, "unexpected EOF after array element")
+ }
+ if b[0] != ',' {
+ return nil, b, syntaxError(b, "expected ',' after array element but found '%c'", b[0])
+ }
+ b = skipSpaces(b[1:])
+ if len(b) == 0 {
+ return nil, b, unexpectedEOF(b)
+ }
+ if b[0] == ']' {
+ return nil, b, syntaxError(b, "unexpected trailing comma after object field")
+ }
+ }
+
+ _, b, err = parseValue(b)
+ if err != nil {
+ return nil, b, err
+ }
+
+ i++
+ }
+}
+
+func parseValue(b []byte) ([]byte, []byte, error) {
+ if len(b) != 0 {
+ switch b[0] {
+ case '{':
+ return parseObject(b)
+ case '[':
+ return parseArray(b)
+ case '"':
+ return parseString(b)
+ case 'n':
+ return parseNull(b)
+ case 't':
+ return parseTrue(b)
+ case 'f':
+ return parseFalse(b)
+ case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ return parseNumber(b)
+ default:
+ return nil, b, syntaxError(b, "invalid character '%c' looking for beginning of value", b[0])
+ }
+ }
+ return nil, b, syntaxError(b, "unexpected end of JSON input")
+}
+
+func hasNullPrefix(b []byte) bool {
+ return len(b) >= 4 && string(b[:4]) == "null"
+}
+
+func hasTruePrefix(b []byte) bool {
+ return len(b) >= 4 && string(b[:4]) == "true"
+}
+
+func hasFalsePrefix(b []byte) bool {
+ return len(b) >= 5 && string(b[:5]) == "false"
+}
+
+func hasPrefix(b []byte, s string) bool {
+ return len(b) >= len(s) && s == string(b[:len(s)])
+}
+
+func hasLeadingSign(b []byte) bool {
+ return len(b) > 0 && (b[0] == '+' || b[0] == '-')
+}
+
+func hasLeadingZeroes(b []byte) bool {
+ if hasLeadingSign(b) {
+ b = b[1:]
+ }
+ return len(b) > 1 && b[0] == '0' && '0' <= b[1] && b[1] <= '9'
+}
+
+func appendToLower(b, s []byte) []byte {
+ if asciiValid(s) { // fast path for ascii strings
+ i := 0
+
+ for j := range s {
+ c := s[j]
+
+ if 'A' <= c && c <= 'Z' {
+ b = append(b, s[i:j]...)
+ b = append(b, c+('a'-'A'))
+ i = j + 1
+ }
+ }
+
+ return append(b, s[i:]...)
+ }
+
+ for _, r := range string(s) {
+ b = appendRune(b, foldRune(r))
+ }
+
+ return b
+}
+
+func foldRune(r rune) rune {
+ if r = unicode.SimpleFold(r); 'A' <= r && r <= 'Z' {
+ r = r + ('a' - 'A')
+ }
+ return r
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/reflect.go b/vendor/github.com/neilotoole/jsoncolor/reflect.go
new file mode 100644
index 0000000..0dcf174
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/reflect.go
@@ -0,0 +1,20 @@
+//go:build go1.15
+// +build go1.15
+
+package jsoncolor
+
+import (
+ "reflect"
+ "unsafe"
+)
+
+func extendSlice(t reflect.Type, s *slice, n int) slice {
+ arrayType := reflect.ArrayOf(n, t.Elem())
+ arrayData := reflect.New(arrayType)
+ reflect.Copy(arrayData.Elem(), reflect.NewAt(t, unsafe.Pointer(s)).Elem())
+ return slice{
+ data: unsafe.Pointer(arrayData.Pointer()),
+ len: s.len,
+ cap: n,
+ }
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/reflect_optimize.go b/vendor/github.com/neilotoole/jsoncolor/reflect_optimize.go
new file mode 100644
index 0000000..03fc849
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/reflect_optimize.go
@@ -0,0 +1,30 @@
+//go:build !go1.15
+// +build !go1.15
+
+package jsoncolor
+
+import (
+ "reflect"
+ "unsafe"
+)
+
+//go:linkname unsafe_NewArray reflect.unsafe_NewArray
+func unsafe_NewArray(rtype unsafe.Pointer, length int) unsafe.Pointer
+
+//go:linkname typedslicecopy reflect.typedslicecopy
+//go:noescape
+func typedslicecopy(elemType unsafe.Pointer, dst, src slice) int
+
+func extendSlice(t reflect.Type, s *slice, n int) slice {
+ elemTypeRef := t.Elem()
+ elemTypePtr := ((*iface)(unsafe.Pointer(&elemTypeRef))).ptr
+
+ d := slice{
+ data: unsafe_NewArray(elemTypePtr, n),
+ len: s.len,
+ cap: n,
+ }
+
+ typedslicecopy(elemTypePtr, d, *s)
+ return d
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/splash.png b/vendor/github.com/neilotoole/jsoncolor/splash.png
new file mode 100644
index 0000000..f962327
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/splash.png
Binary files differ
diff --git a/vendor/github.com/neilotoole/jsoncolor/terminal.go b/vendor/github.com/neilotoole/jsoncolor/terminal.go
new file mode 100644
index 0000000..e9398f9
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/terminal.go
@@ -0,0 +1,42 @@
+//go:build !windows
+
+package jsoncolor
+
+import (
+ "io"
+ "os"
+
+ "golang.org/x/term"
+)
+
+// IsColorTerminal returns true if w is a colorable terminal.
+// It respects [NO_COLOR], [FORCE_COLOR] and TERM=dumb environment variables.
+//
+// [NO_COLOR]: https://no-color.org/
+// [FORCE_COLOR]: https://force-color.org/
+func IsColorTerminal(w io.Writer) bool {
+ if os.Getenv("NO_COLOR") != "" {
+ return false
+ }
+ if os.Getenv("FORCE_COLOR") != "" {
+ return true
+ }
+ if os.Getenv("TERM") == "dumb" {
+ return false
+ }
+
+ if w == nil {
+ return false
+ }
+
+ f, ok := w.(*os.File)
+ if !ok {
+ return false
+ }
+
+ if !term.IsTerminal(int(f.Fd())) {
+ return false
+ }
+
+ return true
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/terminal_windows.go b/vendor/github.com/neilotoole/jsoncolor/terminal_windows.go
new file mode 100644
index 0000000..38259dc
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/terminal_windows.go
@@ -0,0 +1,53 @@
+package jsoncolor
+
+import (
+ "io"
+ "os"
+
+ "golang.org/x/sys/windows"
+)
+
+// IsColorTerminal returns true if w is a colorable terminal.
+// It respects [NO_COLOR], [FORCE_COLOR] and TERM=dumb environment variables.
+//
+// [NO_COLOR]: https://no-color.org/
+// [FORCE_COLOR]: https://force-color.org/
+func IsColorTerminal(w io.Writer) bool {
+ if os.Getenv("NO_COLOR") != "" {
+ return false
+ }
+ if os.Getenv("FORCE_COLOR") != "" {
+ return true
+ }
+ if os.Getenv("TERM") == "dumb" {
+ return false
+ }
+
+ if w == nil {
+ return false
+ }
+
+ f, ok := w.(*os.File)
+ if !ok {
+ return false
+ }
+ fd := f.Fd()
+
+ console := windows.Handle(fd)
+ var mode uint32
+ if err := windows.GetConsoleMode(console, &mode); err != nil {
+ return false
+ }
+
+ var want uint32 = windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING
+ if (mode & want) == want {
+ return true
+ }
+
+ mode |= want
+ if err := windows.SetConsoleMode(console, mode); err != nil {
+ return false
+ }
+
+ return true
+}
diff --git a/vendor/github.com/neilotoole/jsoncolor/token.go b/vendor/github.com/neilotoole/jsoncolor/token.go
new file mode 100644
index 0000000..ba3277e
--- /dev/null
+++ b/vendor/github.com/neilotoole/jsoncolor/token.go
@@ -0,0 +1,286 @@
+package jsoncolor
+
+// Tokenizer is an iterator-style type which can be used to progressively parse
+// through a json input.
+//
+// Tokenizing json is useful to build highly efficient parsing operations, for
+// example when doing tranformations on-the-fly where as the program reads the
+// input and produces the transformed json to an output buffer.
+//
+// Here is a common pattern to use a tokenizer:
+//
+// for t := json.NewTokenizer(b); t.Next(); {
+// switch t.Delim {
+// case '{':
+// ...
+// case '}':
+// ...
+// case '[':
+// ...
+// case ']':
+// ...
+// case ':':
+// ...
+// case ',':
+// ...
+// }
+//
+// switch {
+// case t.Value.String():
+// ...
+// case t.Value.Null():
+// ...
+// case t.Value.True():
+// ...
+// case t.Value.False():
+// ...
+// case t.Value.Number():
+// ...
+// }
+// }
+//
+type Tokenizer struct {
+ // When the tokenizer is positioned on a json delimiter this field is not
+ // zero. In this case the possible values are '{', '}', '[', ']', ':', and
+ // ','.
+ Delim Delim
+
+ // This field contains the raw json token that the tokenizer is pointing at.
+ // When Delim is not zero, this field is a single-element byte slice
+ // continaing the delimiter value. Otherwise, this field holds values like
+ // null, true, false, numbers, or quoted strings.
+ Value RawValue
+
+ // When the tokenizer has encountered invalid content this field is not nil.
+ Err error
+
+ // When the value is in an array or an object, this field contains the depth
+ // at which it was found.
+ Depth int
+
+ // When the value is in an array or an object, this field contains the
+ // position at which it was found.
+ Index int
+
+ // This field is true when the value is the key of an object.
+ IsKey bool
+
+ // Tells whether the next value read from the tokenizer is a key.
+ isKey bool
+
+ // json input for the tokenizer, pointing at data right after the last token
+ // that was parsed.
+ json []byte
+
+ // Stack used to track entering and leaving arrays, objects, and keys. The
+ // buffer is used as a AppendPre-allocated space to
+ stack []state
+ buffer [8]state
+}
+
+type state struct {
+ typ scope
+ len int
+}
+
+type scope int
+
+const (
+ inArray scope = iota
+ inObject
+)
+
+// NewTokenizer constructs a new Tokenizer which reads its json input from b.
+func NewTokenizer(b []byte) *Tokenizer { return &Tokenizer{json: b} }
+
+// Reset erases the state of t and re-initializes it with the json input from b.
+func (t *Tokenizer) Reset(b []byte) {
+ // This code is similar to:
+ //
+ // *t = Tokenizer{json: b}
+ //
+ // However, it does not compile down to an invocation of duff-copy, which
+ // ends up being slower and prevents the code from being inlined.
+ t.Delim = 0
+ t.Value = nil
+ t.Err = nil
+ t.Depth = 0
+ t.Index = 0
+ t.IsKey = false
+ t.isKey = false
+ t.json = b
+ t.stack = nil
+}
+
+// Next returns a new tokenizer pointing at the next token, or the zero-value of
+// Tokenizer if the end of the json input has been reached.
+//
+// If the tokenizer encounters malformed json while reading the input the method
+// sets t.Err to an error describing the issue, and returns false. Once an error
+// has been encountered, the tokenizer will always fail until its input is
+// cleared by a call to its Reset method.
+func (t *Tokenizer) Next() bool {
+ if t.Err != nil {
+ return false
+ }
+
+ // Inlined code of the skipSpaces function, this give a ~15% speed boost.
+ i := 0
+skipLoop:
+ for _, c := range t.json {
+ switch c {
+ case sp, ht, nl, cr:
+ i++
+ default:
+ break skipLoop
+ }
+ }
+
+ if t.json = t.json[i:]; len(t.json) == 0 {
+ t.Reset(nil)
+ return false
+ }
+
+ var d Delim
+ var v []byte
+ var b []byte
+ var err error
+
+ switch t.json[0] {
+ case '"':
+ v, b, err = parseString(t.json)
+ case 'n':
+ v, b, err = parseNull(t.json)
+ case 't':
+ v, b, err = parseTrue(t.json)
+ case 'f':
+ v, b, err = parseFalse(t.json)
+ case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ v, b, err = parseNumber(t.json)
+ case '{', '}', '[', ']', ':', ',':
+ d, v, b = Delim(t.json[0]), t.json[:1], t.json[1:]
+ default:
+ v, b, err = t.json[:1], t.json[1:], syntaxError(t.json, "expected token but found '%c'", t.json[0])
+ }
+
+ t.Delim = d
+ t.Value = RawValue(v)
+ t.Err = err
+ t.Depth = t.depth()
+ t.Index = t.index()
+ t.IsKey = d == 0 && t.isKey
+ t.json = b
+
+ if d != 0 {
+ switch d {
+ case '{':
+ t.isKey = true
+ t.push(inObject)
+ case '[':
+ t.push(inArray)
+ case '}':
+ err = t.pop(inObject)
+ t.Depth--
+ t.Index = t.index()
+ case ']':
+ err = t.pop(inArray)
+ t.Depth--
+ t.Index = t.index()
+ case ':':
+ t.isKey = false
+ case ',':
+ if t.is(inObject) {
+ t.isKey = true
+ }
+ t.stack[len(t.stack)-1].len++
+ }
+ }
+
+ return (d != 0 || len(v) != 0) && err == nil
+}
+
+func (t *Tokenizer) push(typ scope) {
+ if t.stack == nil {
+ t.stack = t.buffer[:0]
+ }
+ t.stack = append(t.stack, state{typ: typ, len: 1})
+}
+
+func (t *Tokenizer) pop(expect scope) error {
+ i := len(t.stack) - 1
+
+ if i < 0 {
+ return syntaxError(t.json, "found unexpected character while tokenizing json input")
+ }
+
+ if found := t.stack[i]; expect != found.typ {
+ return syntaxError(t.json, "found unexpected character while tokenizing json input")
+ }
+
+ t.stack = t.stack[:i]
+ return nil
+}
+
+func (t *Tokenizer) is(typ scope) bool {
+ return len(t.stack) != 0 && t.stack[len(t.stack)-1].typ == typ
+}
+
+func (t *Tokenizer) depth() int {
+ return len(t.stack)
+}
+
+func (t *Tokenizer) index() int {
+ if len(t.stack) == 0 {
+ return 0
+ }
+ return t.stack[len(t.stack)-1].len - 1
+}
+
+// RawValue represents a raw json value, it is intended to carry null, true,
+// false, number, and string values only.
+type RawValue []byte
+
+// String returns true if v contains a string value.
+func (v RawValue) String() bool { return len(v) != 0 && v[0] == '"' }
+
+// Null returns true if v contains a null value.
+func (v RawValue) Null() bool { return len(v) != 0 && v[0] == 'n' }
+
+// True returns true if v contains a true value.
+func (v RawValue) True() bool { return len(v) != 0 && v[0] == 't' }
+
+// False returns true if v contains a false value.
+func (v RawValue) False() bool { return len(v) != 0 && v[0] == 'f' }
+
+// Number returns true if v contains a number value.
+func (v RawValue) Number() bool {
+ if len(v) != 0 {
+ switch v[0] {
+ case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ return true
+ }
+ }
+ return false
+}
+
+// AppendUnquote writes the unquoted version of the string value in v into b.
+func (v RawValue) AppendUnquote(b []byte) []byte {
+ s, r, new, err := parseStringUnquote([]byte(v), b)
+ if err != nil {
+ panic(err)
+ }
+ if len(r) != 0 {
+ panic(syntaxError(r, "unexpected trailing tokens after json value"))
+ }
+ if new {
+ b = s
+ } else {
+ b = append(b, s...)
+ }
+ return b
+}
+
+// Unquote returns the unquoted version of the string value in v.
+func (v RawValue) Unquote() []byte {
+ return v.AppendUnquote(nil)
+}