diff --git a/.drone1.yml b/.drone1.yml
index 6de3603d6..3e23c3a14 100644
--- a/.drone1.yml
+++ b/.drone1.yml
@@ -56,7 +56,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
environment:
- GOFLAGS: '-mod=vendor'
+ GOPROXY: 'https://goproxy.kolaente.de'
commands:
- make build
when:
@@ -66,7 +66,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
environment:
- GOFLAGS: '-mod=vendor'
+ GOPROXY: 'https://goproxy.kolaente.de'
depends_on: [ build ]
commands:
- make generate
@@ -149,6 +149,8 @@ steps:
- name: test
image: vikunja/golang-build:latest
pull: true
+ environment:
+ GOPROXY: 'https://goproxy.kolaente.de'
commands:
- make generate
- make test
@@ -160,6 +162,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
environment:
+ GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
VIKUNJA_DATABASE_TYPE: sqlite
commands:
@@ -173,6 +176,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
environment:
+ GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
VIKUNJA_DATABASE_TYPE: mysql
VIKUNJA_DATABASE_HOST: test-mysql-unit
@@ -190,6 +194,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
environment:
+ GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
VIKUNJA_DATABASE_TYPE: postgres
VIKUNJA_DATABASE_HOST: test-postgres-unit
@@ -207,6 +212,8 @@ steps:
- name: integration-test
image: vikunja/golang-build:latest
pull: true
+ environment:
+ GOPROXY: 'https://goproxy.kolaente.de'
commands:
- make generate
- make integration-test
@@ -218,6 +225,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
environment:
+ GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
VIKUNJA_DATABASE_TYPE: sqlite
commands:
@@ -231,6 +239,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
environment:
+ GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
VIKUNJA_DATABASE_TYPE: mysql
VIKUNJA_DATABASE_HOST: test-mysql-integration
@@ -248,6 +257,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
environment:
+ GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
VIKUNJA_DATABASE_TYPE: postgres
VIKUNJA_DATABASE_HOST: test-postgres-integration
diff --git a/.gitignore b/.gitignore
index fe00be7a7..0cb73d8bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@ pkg/static/templates_vfsdata.go
files/
!pkg/files/
vikunja-dump*
+vendor/
diff --git a/Dockerfile b/Dockerfile
index 7a1691d78..f6ad6d2aa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,7 +6,6 @@ FROM golang:1-alpine AS build-env
ARG VIKUNJA_VERSION
ENV TAGS "sqlite"
ENV GO111MODULE=on
-ENV GOFLAGS=-mod=vendor
# Build deps
RUN apk --no-cache add build-base git
diff --git a/Makefile b/Makefile
index ed3d7fe13..9e6ac9049 100644
--- a/Makefile
+++ b/Makefile
@@ -13,15 +13,15 @@ else
endif
endif
-GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go")
+GOFILES := $(shell find . -name "*.go" -type f ! -path "*/bindata.go")
GOFMT ?= gofmt -s
-GOFLAGS := -v -mod=vendor
+GOFLAGS := -v
EXTRA_GOFLAGS ?=
LDFLAGS := -X "code.vikunja.io/api/pkg/version.Version=$(shell git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')" -X "main.Tags=$(TAGS)"
-PACKAGES ?= $(filter-out code.vikunja.io/api/pkg/integrations,$(shell go list -mod=vendor ./... | grep -v /vendor/))
+PACKAGES ?= $(filter-out code.vikunja.io/api/pkg/integrations,$(shell go list))
SOURCES ?= $(shell find . -name "*.go" -type f)
TAGS ?=
diff --git a/docs/content/doc/development/development.md b/docs/content/doc/development/development.md
index 2e5a6ad4e..d04b84055 100644
--- a/docs/content/doc/development/development.md
+++ b/docs/content/doc/development/development.md
@@ -32,9 +32,6 @@ See [testing]({{< ref "test.md">}}).
If you're able to use go modules, you can clone the project wherever you want to and work from there.
-However, when building or running tests, please supply the `-mod=vendor` flag to go so it builds using the
-dependencies from the `vendor/` folder.
-
#### Development-setup without go modules
Some internal packages are referenced using their respective package URL. This can become problematic.
diff --git a/vendor/code.vikunja.io/web/.gitignore b/vendor/code.vikunja.io/web/.gitignore
deleted file mode 100644
index 62c893550..000000000
--- a/vendor/code.vikunja.io/web/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.idea/
\ No newline at end of file
diff --git a/vendor/code.vikunja.io/web/LICENSE b/vendor/code.vikunja.io/web/LICENSE
deleted file mode 100644
index 0a041280b..000000000
--- a/vendor/code.vikunja.io/web/LICENSE
+++ /dev/null
@@ -1,165 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
diff --git a/vendor/code.vikunja.io/web/Readme.md b/vendor/code.vikunja.io/web/Readme.md
deleted file mode 100644
index d82ad9e36..000000000
--- a/vendor/code.vikunja.io/web/Readme.md
+++ /dev/null
@@ -1,229 +0,0 @@
-# Vikunja Web Handler
-
-[](LICENSE)
-[](https://goreportcard.com/report/code.vikunja.io/web)
-
-> When I started Vikunja, I started like everyone else, by writing a bunch of functions to do the logic and then a bunch of
-handler functions to parse the request data and call the implemented functions to do the logic and eventually return a dataset.
-After I implemented some functions, I've decided to save me a lot of hassle and put most of that "parse the request and call a
-processing function"-logic to a general interface to facilitate development and not having to have a lot of similar code all over the place.
-
-This webhandler was built to be used in a REST-API, it takes and returns JSON, but can also be used in combination with own
-other handler implementations, enabling a lot of flexibility while develeoping.
-
-## Features
-
-* Easy to use
-* Built for REST-APIs
-* Beautiful error handling built in
-* Manages rights
-* Pluggable authentication mechanisms
-
-## Table of contents
-
-* [Installation](#installation)
-* [Todos](#todos)
-* [CRUDable](#crudable)
-* [Rights](#rights)
-* [Handler Config](#handler-config)
- * [Auth](#auth)
- * [Logging](#logging)
- * [Full Example](#full-example)
-* [Preprocessing](#preprocessing)
- * [Pagination](#pagination)
- * [Search](#search)
-* [Standard web handler](#defining-routes-using-the-standard-web-handler)
-* [Errors](#errors)
-* [URL param binder](#how-the-url-param-binder-works)
-
-### TODOs
-
-* [x] Improve docs/Merge with the ones of Vikunja
-* [x] Description of web.HTTPError
-* [x] Rights methods should return errors (I know, this will break a lot of existing stuff)
-* [ ] optional Before- and after-{load|update|create} methods which do some preprocessing/after processing like making human-readable names from automatically up counting consts
-* [ ] "Magic": Check if a passed struct implements Crudable methods and use a general (user defined) function if not
-
-## Installation
-
-Using the web handler in your application is pretty straight forward, simply run `go get -u code.vikunja.io/web` and start using it.
-
-In order to use the common web handler, the struct must implement the `web.CRUDable` and `web.Rights` interface.
-
-To learn how to use the handler, take a look at the [handler config](#handler-config) [defining routes](#defining-routes-using-the-standard-web-handler)
-
-## CRUDable
-
-This interface defines methods to Create/Read/ReadAll/Update/Delete something. It is defined as followed:
-
-```go
-type CRUDable interface {
- Create(Auth) error
- ReadOne() error
- ReadAll(auth Auth, search string, page int64, perPage int64) (result interface{}, resultCount int64, numberOfPages int64, err error)
- Update() error
- Delete() error
-}
-```
-
-Each of these methods is called on an instance of a struct like so:
-
-```go
-func (l *List) ReadOne() (err error) {
- *l, err = GetListByID(l.ID)
- return
-}
-```
-
-In that case, it takes the `ID` saved in the struct instance, gets the full list object and fills the original object with it.
-(See [parambinder](#how-the-url-param-binder-works) to understand where that `ID` is coming from in that specific case).
-
-All functions should behave like this, if they create or update something, the struct instance they are called on should
-contain the created/updated struct instance. The only exception is `ReadAll()` which returns an interface.
-Usually this method returns a slice of results because you cannot make an array of a set type (If you know a
-way to do this, don't hesitate to [drop me a message](https://vikunja.io/en/contact/)).
-
-## Rights
-
-This interface defines methods to check for rights on structs. They accept an `Auth`-element as parameter and return a `bool` and `error`.
-
-The `error` is handled [as usual](#errors).
-
-The interface is defined as followed:
-
-```go
-type Rights interface {
- IsAdmin(Auth) (bool, error)
- CanWrite(Auth) (bool, error)
- CanRead(Auth) (bool, error)
- CanDelete(Auth) (bool, error)
- CanUpdate(Auth) (bool, error)
- CanCreate(Auth) (bool, error)
-}
-```
-
-When using the standard web handler, all methods are called before their `CRUD` counterparts.
-Use pointers for methods like `CanRead()` to get the base data of the model first, then check the right and then add addintional data.
-
-## Handler Config
-
-The handler has some options which you can (and need to) configure.
-
-#### Auth
-
-`Auth` is an interface with some methods to decouple the action of getting the current user from the web handler.
-The function defined via `Auths` should return a struct which implements the `Auth` interface.
-
-To define the thing which gets the appropriate auth object, you need to call a middleware like so (After all auth middlewares were called):
-
-#### Logging
-
-You can provide your own instance of `logger.Logger` (using [go-logging](https://github.com/op/go-logging)) to the handler.
-It will use this instance to log errors which are not better specified or things like users trying to do something they're
-not allowed to do and so on.
-
-#### MaxItemsPerPage
-
-Contains the maximum number of items per page.
-If the client requests more items than this, the number of items requested is set to this value.
-
-See [pagination](#pagination) for more.
-
-#### Full Example
-
-```go
-handler.SetAuthProvider(&web.Auths{
- AuthObject: func(echo.Context) (web.Auth, error) {
- return models.GetCurrentUser(c) // Your functions
- },
-})
-handler.SetLoggingProvider(&log.Log)
-```
-
-## Preprocessing
-
-### Pagination
-
-The `ReadAll`-method has a number of parameters:
-
-```go
-ReadAll(auth Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfItems int64, err error)
-```
-
-The third parameter contains the requested page, the fourth parameter contains the number of items per page.
-You should calculate the limits accordingly.
-
-If the number of items per page are not set by the client, the web handler will pass the maximum number of items per page instead.
-This makes items per page optional for clients.
-Take a look at [the config section](#handler-config) for information on how to set that value.
-
-You need to return a number of things:
-
-* The result itself, usually a slice
-* The number of items you return in `result`. Most of the time, this is just `len(result)`. You need to return this value to make the clients aware if they requested a number of items > max items per page.
-* The total number of items available. We use the total number of items here and not the number pages so the implementations don't have to deal with calculating the number of pages from that. The total number of clients is then calculated and returned to the client, ite can then be used by the clients to build client-side pagination or similar.
-* An error.
-
-The number of items and the total number of pages available will be returned in the `x-pagination-total-pages` and `x-pagination-result-count` response headers.
-_You should put this in your api documentation._
-
-### Search
-
-When using the `ReadAll`-method, the first parameter is a search term which should be used to search items of your struct.
-You define the critera inside of that function.
-
-Users can then pass the `?s=something` parameter to the url to search, _thats something you should put in your api documentation_.
-
-As the logic for "give me everything" and "give me everything where the name contains 'something'" is mostly the same, we made
-the decision to design the function like this, in order to keep the places with mostly the same logic as few as possible.
-Also just adding `?s=query` to the url one already knows and uses is a lot more convenient.
-
-## Defining routes using the standard web handler
-
-You can define routes for the standard web handler like so:
-
-`models.List` needs to implement `web.CRUDable` and `web.Rights`.
-
-```go
-listHandler := &crud.WebHandler{
- EmptyStruct: func() crud.CObject {
- return &models.List{}
- },
-}
-a.GET("/lists", listHandler.ReadAllWeb)
-a.GET("/lists/:list", listHandler.ReadOneWeb)
-a.POST("/lists/:list", listHandler.UpdateWeb)
-a.DELETE("/lists/:list", listHandler.DeleteWeb)
-a.PUT("/namespaces/:namespace/lists", listHandler.CreateWeb)
-```
-
-The handler will take care of everything like parsing the request, checking rights, pretty-print errors and return appropriate responses.
-
-## Errors
-
-Error types with their messages and http-codes should be implemented by you somewhere in your application and then returned by
-the appropriate function when an error occures. If the error type implements `HTTPError`, the server returns a user-friendly
-error message when this error occours. This means it returns a good HTTP status code, a message, and an error code. The error
-code should be unique across all error codes and can be used on the client to show a localized error message or do other stuff
-based on the exact error the server returns. That way the client won't have to "guess" that the error message remains the same
-over multiple versions of your application.
-
-An `HTTPError` is defined as follows:
-
-```go
-type HTTPError struct {
- HTTPCode int `json:"-"` // Can be any valid HTTP status code, I'd reccomend to use the constants of the http package.
- Code int `json:"code"` // Must be a uniqe int identifier for this specific error. I'd reccomend defining a constant for this.
- Message string `json:"message"` // A user-readable message what went wrong.
-}
-```
-
-You can learn more about how exactly custom error types are created in the [vikunja docs](https://vikunja.io/docs/custom-errors/).
-
-## How the url param binder works
-
-The binder binds all values inside the url to their respective fields in a struct. Those fields need to have a tag
-`param` with the name of the url placeholder which must be the same as in routes.
-
-Whenever one of the standard CRUD methods is invoked, this binder is called, which enables one handler method
-to handle all kinds of different urls with different parameters.
diff --git a/vendor/code.vikunja.io/web/go.mod b/vendor/code.vikunja.io/web/go.mod
deleted file mode 100644
index 0136c1deb..000000000
--- a/vendor/code.vikunja.io/web/go.mod
+++ /dev/null
@@ -1,12 +0,0 @@
-module code.vikunja.io/web
-
-go 1.14
-
-require (
- github.com/labstack/echo/v4 v4.1.7-0.20190627175217-8fb7b5be270f
- github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
- golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 // indirect
- golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
- golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb // indirect
- golang.org/x/tools v0.0.0-20190628034336-212fb13d595e // indirect
-)
diff --git a/vendor/code.vikunja.io/web/go.sum b/vendor/code.vikunja.io/web/go.sum
deleted file mode 100644
index 2f26d67d2..000000000
--- a/vendor/code.vikunja.io/web/go.sum
+++ /dev/null
@@ -1,68 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/labstack/echo/v4 v4.1.5 h1:RztCXCvfMljychg0G/IzW5T7hL6ADqqwREwcX279Q1g=
-github.com/labstack/echo/v4 v4.1.5/go.mod h1:3LbYC6VkwmUnmLPZ8WFdHdQHG77e9GQbjyhWdb1QvC4=
-github.com/labstack/echo/v4 v4.1.6 h1:WOvLa4T1KzWCRpANwz0HGgWDelXSSGwIKtKBbFdHTv4=
-github.com/labstack/echo/v4 v4.1.6/go.mod h1:kU/7PwzgNxZH4das4XNsSpBSOD09XIF5YEPzjpkGnGE=
-github.com/labstack/echo/v4 v4.1.7-0.20190627175217-8fb7b5be270f h1:fNJtR+TNyxTdYCZU40fc8Or8RyBqMOKYNv+Zay5gjvk=
-github.com/labstack/echo/v4 v4.1.7-0.20190627175217-8fb7b5be270f/go.mod h1:kU/7PwzgNxZH4das4XNsSpBSOD09XIF5YEPzjpkGnGE=
-github.com/labstack/gommon v0.2.8 h1:JvRqmeZcfrHC5u6uVleB4NxxNbzx6gpbJiQknDbKQu0=
-github.com/labstack/gommon v0.2.8/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4=
-github.com/labstack/gommon v0.2.9 h1:heVeuAYtevIQVYkGj6A41dtfT91LrvFG220lavpWhrU=
-github.com/labstack/gommon v0.2.9/go.mod h1:E8ZTmW9vw5az5/ZyHWCp0Lw4OH2ecsaBP1C/NKavGG4=
-github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
-github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
-github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
-github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc=
-github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
-github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
-github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
-github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284 h1:rlLehGeYg6jfoyz/eDqDU1iRXLKfR42nnNh57ytKEWo=
-golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A=
-golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c h1:uOCk1iQW6Vc18bnC13MfzScl+wdKBmM9Y9kU7Z83/lw=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190607181551-461777fb6f67/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190609082536-301114b31cce/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190621203818-d432491b9138 h1:t8BZD9RDjkm9/h7yYN6kE8oaeov5r9aztkB7zKA5Tkg=
-golang.org/x/sys v0.0.0-20190621203818-d432491b9138/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb h1:fgwFCsaw9buMuxNd6+DQfAuSFqbNiQZpcgJQAgJsK6k=
-golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190608022120-eacb66d2a7c3/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190628034336-212fb13d595e/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
diff --git a/vendor/code.vikunja.io/web/handler/config.go b/vendor/code.vikunja.io/web/handler/config.go
deleted file mode 100644
index b961138a3..000000000
--- a/vendor/code.vikunja.io/web/handler/config.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2019 Vikunja and contributors.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see .
-//
-
-package handler
-
-import (
- "code.vikunja.io/web"
- "github.com/op/go-logging"
-)
-
-// Config contains the config for the web handler
-type Config struct {
- AuthProvider *web.Auths
- LoggingProvider *logging.Logger
- MaxItemsPerPage int
-}
-
-var config *Config
-
-func init() {
- config = &Config{}
-}
-
-// SetAuthProvider sets the auth provider in config
-func SetAuthProvider(provider *web.Auths) {
- config.AuthProvider = provider
-}
-
-// SetLoggingProvider sets the logging provider in the config
-func SetLoggingProvider(logger *logging.Logger) {
- config.LoggingProvider = logger
-}
-
-// SetMaxItemsPerPage sets the max number of items per page in the config
-func SetMaxItemsPerPage(maxItemsPerPage int) {
- config.MaxItemsPerPage = maxItemsPerPage
-}
diff --git a/vendor/code.vikunja.io/web/handler/create.go b/vendor/code.vikunja.io/web/handler/create.go
deleted file mode 100644
index 6063f0e94..000000000
--- a/vendor/code.vikunja.io/web/handler/create.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2018 Vikunja and contributors.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see .
-
-package handler
-
-import (
- "fmt"
- "github.com/labstack/echo/v4"
- "net/http"
-)
-
-// CreateWeb is the handler to create an object
-func (c *WebHandler) CreateWeb(ctx echo.Context) error {
- // Get our model
- currentStruct := c.EmptyStruct()
-
- // Get the object & bind params to struct
- if err := ctx.Bind(currentStruct); err != nil {
- config.LoggingProvider.Debugf("Invalid model error. Internal error was: %s", err.Error())
- if he, is := err.(*echo.HTTPError); is {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
- }
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
- }
-
- // Validate the struct
- if err := ctx.Validate(currentStruct); err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, err)
- }
-
- // Get the user to pass for later checks
- currentAuth, err := config.AuthProvider.AuthObject(ctx)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Could not determine the current user.")
- }
-
- // Check rights
- canCreate, err := currentStruct.CanCreate(currentAuth)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- if !canCreate {
- config.LoggingProvider.Noticef("Tried to create while not having the rights for it (User: %v)", currentAuth)
- return echo.NewHTTPError(http.StatusForbidden)
- }
-
- // Create
- err = currentStruct.Create(currentAuth)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
-
- err = ctx.JSON(http.StatusCreated, currentStruct)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- return err
-}
diff --git a/vendor/code.vikunja.io/web/handler/delete.go b/vendor/code.vikunja.io/web/handler/delete.go
deleted file mode 100644
index 8be2d619d..000000000
--- a/vendor/code.vikunja.io/web/handler/delete.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2018 Vikunja and contributors.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see .
-
-package handler
-
-import (
- "fmt"
- "github.com/labstack/echo/v4"
- "net/http"
-)
-
-type message struct {
- Message string `json:"message"`
-}
-
-// DeleteWeb is the web handler to delete something
-func (c *WebHandler) DeleteWeb(ctx echo.Context) error {
-
- // Get our model
- currentStruct := c.EmptyStruct()
-
- // Bind params to struct
- if err := ctx.Bind(currentStruct); err != nil {
- config.LoggingProvider.Debugf("Invalid model error. Internal error was: %s", err.Error())
- if he, is := err.(*echo.HTTPError); is {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
- }
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
- }
-
- // Check if the user has the right to delete
- currentAuth, err := config.AuthProvider.AuthObject(ctx)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError)
- }
- canDelete, err := currentStruct.CanDelete(currentAuth)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- if !canDelete {
- config.LoggingProvider.Noticef("Tried to delete while not having the rights for it (User: %v)", currentAuth)
- return echo.NewHTTPError(http.StatusForbidden)
- }
-
- err = currentStruct.Delete()
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
-
- err = ctx.JSON(http.StatusOK, message{"Successfully deleted."})
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- return err
-}
diff --git a/vendor/code.vikunja.io/web/handler/helper.go b/vendor/code.vikunja.io/web/handler/helper.go
deleted file mode 100644
index 92f3371d8..000000000
--- a/vendor/code.vikunja.io/web/handler/helper.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2018 Vikunja and contributors.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see .
-
-package handler
-
-import (
- "code.vikunja.io/web"
- "github.com/labstack/echo/v4"
- "net/http"
-)
-
-// WebHandler defines the webhandler object
-// This does web stuff, aka returns json etc. Uses CRUDable Methods to get the data
-type WebHandler struct {
- EmptyStruct func() CObject
-}
-
-// CObject is the definition of our object, holds the structs
-type CObject interface {
- web.CRUDable
- web.Rights
-}
-
-// HandleHTTPError does what it says
-func HandleHTTPError(err error, ctx echo.Context) *echo.HTTPError {
- if a, has := err.(web.HTTPErrorProcessor); has {
- errDetails := a.HTTPError()
- return echo.NewHTTPError(errDetails.HTTPCode, errDetails)
- }
- config.LoggingProvider.Error(err.Error())
- return echo.NewHTTPError(http.StatusInternalServerError)
-}
diff --git a/vendor/code.vikunja.io/web/handler/read_all.go b/vendor/code.vikunja.io/web/handler/read_all.go
deleted file mode 100644
index 49decbab2..000000000
--- a/vendor/code.vikunja.io/web/handler/read_all.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2018 Vikunja and contributors.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see .
-
-package handler
-
-import (
- "fmt"
- "github.com/labstack/echo/v4"
- "math"
- "net/http"
- "strconv"
-)
-
-// ReadAllWeb is the webhandler to get all objects of a type
-func (c *WebHandler) ReadAllWeb(ctx echo.Context) error {
- // Get our model
- currentStruct := c.EmptyStruct()
-
- currentAuth, err := config.AuthProvider.AuthObject(ctx)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Could not determine the current user.")
- }
-
- // Get the object & bind params to struct
- if err := ctx.Bind(currentStruct); err != nil {
- config.LoggingProvider.Debugf("Invalid model error. Internal error was: %s", err.Error())
- if he, is := err.(*echo.HTTPError); is {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
- }
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
- }
-
- // Pagination
- page := ctx.QueryParam("page")
- if page == "" {
- page = "1"
- }
- pageNumber, err := strconv.Atoi(page)
- if err != nil {
- config.LoggingProvider.Error(err.Error())
- return echo.NewHTTPError(http.StatusBadRequest, "Bad page requested.")
- }
- if pageNumber < 0 {
- return echo.NewHTTPError(http.StatusBadRequest, "Page number cannot be negative.")
- }
-
- // Items per page
- var perPageNumber int
- perPage := ctx.QueryParam("per_page")
- // If we dont have an "items per page" parameter, we want to use the default.
- // To prevent Atoi from failing, we check this here.
- if perPage != "" {
- perPageNumber, err = strconv.Atoi(perPage)
- if err != nil {
- config.LoggingProvider.Error(err.Error())
- return echo.NewHTTPError(http.StatusBadRequest, "Bad per page amount requested.")
- }
- }
- // Set default page count
- if perPageNumber == 0 {
- perPageNumber = config.MaxItemsPerPage
- }
- if perPageNumber < 1 {
- return echo.NewHTTPError(http.StatusBadRequest, "Per page amount cannot be negative.")
- }
- if perPageNumber > config.MaxItemsPerPage {
- perPageNumber = config.MaxItemsPerPage
- }
-
- // Search
- search := ctx.QueryParam("s")
-
- result, resultCount, numberOfItems, err := currentStruct.ReadAll(currentAuth, search, pageNumber, perPageNumber)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
-
- // Calculate the number of pages from the number of items
- // We always round up, because if we don't have a number of items which is exactly dividable by the number of items per page,
- // we would get a result that is one page off.
- var numberOfPages = math.Ceil(float64(numberOfItems) / float64(perPageNumber))
- // If we return all results, we only have one page
- if pageNumber < 0 {
- numberOfPages = 1
- }
- // If we don't have results, we don't have a page
- if resultCount == 0 {
- numberOfPages = 0
- }
-
- ctx.Response().Header().Set("x-pagination-total-pages", strconv.FormatFloat(numberOfPages, 'f', 0, 64))
- ctx.Response().Header().Set("x-pagination-result-count", strconv.FormatInt(int64(resultCount), 10))
- ctx.Response().Header().Set("Access-Control-Expose-Headers", "x-pagination-total-pages, x-pagination-result-count")
-
- err = ctx.JSON(http.StatusOK, result)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- return err
-}
diff --git a/vendor/code.vikunja.io/web/handler/read_one.go b/vendor/code.vikunja.io/web/handler/read_one.go
deleted file mode 100644
index 578a4cb66..000000000
--- a/vendor/code.vikunja.io/web/handler/read_one.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2018 Vikunja and contributors.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see .
-
-package handler
-
-import (
- "fmt"
- "github.com/labstack/echo/v4"
- "net/http"
-)
-
-// ReadOneWeb is the webhandler to get one object
-func (c *WebHandler) ReadOneWeb(ctx echo.Context) error {
- // Get our model
- currentStruct := c.EmptyStruct()
-
- // Get the object & bind params to struct
- if err := ctx.Bind(currentStruct); err != nil {
- config.LoggingProvider.Debugf("Invalid model error. Internal error was: %s", err.Error())
- if he, is := err.(*echo.HTTPError); is {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
- }
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
- }
-
- // Check rights
- currentAuth, err := config.AuthProvider.AuthObject(ctx)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Could not determine the current user.")
- }
- canRead, err := currentStruct.CanRead(currentAuth)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- if !canRead {
- config.LoggingProvider.Noticef("Tried to read while not having the rights for it (User: %v)", currentAuth)
- return echo.NewHTTPError(http.StatusForbidden, "You don't have the right to see this")
- }
-
- // Get our object
- err = currentStruct.ReadOne()
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
-
- err = ctx.JSON(http.StatusOK, currentStruct)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- return err
-}
diff --git a/vendor/code.vikunja.io/web/handler/update.go b/vendor/code.vikunja.io/web/handler/update.go
deleted file mode 100644
index 8c5a0f566..000000000
--- a/vendor/code.vikunja.io/web/handler/update.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2018 Vikunja and contributors.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see .
-
-package handler
-
-import (
- "fmt"
- "github.com/labstack/echo/v4"
- "net/http"
-)
-
-// UpdateWeb is the webhandler to update an object
-func (c *WebHandler) UpdateWeb(ctx echo.Context) error {
-
- // Get our model
- currentStruct := c.EmptyStruct()
-
- // Get the object & bind params to struct
- if err := ctx.Bind(currentStruct); err != nil {
- config.LoggingProvider.Debugf("Invalid model error. Internal error was: %s", err.Error())
- if he, is := err.(*echo.HTTPError); is {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
- }
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
- }
-
- // Validate the struct
- if err := ctx.Validate(currentStruct); err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, err)
- }
-
- // Check if the user has the right to do that
- currentAuth, err := config.AuthProvider.AuthObject(ctx)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Could not determine the current user.")
- }
- canUpdate, err := currentStruct.CanUpdate(currentAuth)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- if !canUpdate {
- config.LoggingProvider.Noticef("Tried to update while not having the rights for it (User: %v)", currentAuth)
- return echo.NewHTTPError(http.StatusForbidden)
- }
-
- // Do the update
- err = currentStruct.Update()
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
-
- err = ctx.JSON(http.StatusOK, currentStruct)
- if err != nil {
- return HandleHTTPError(err, ctx)
- }
- return err
-}
diff --git a/vendor/code.vikunja.io/web/web.go b/vendor/code.vikunja.io/web/web.go
deleted file mode 100644
index 0b92cc102..000000000
--- a/vendor/code.vikunja.io/web/web.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2018 Vikunja and contributors.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see .
-
-package web
-
-import "github.com/labstack/echo/v4"
-
-// Rights defines rights methods
-type Rights interface {
- IsAdmin(Auth) (bool, error)
- CanWrite(Auth) (bool, error)
- CanRead(Auth) (bool, error)
- CanDelete(Auth) (bool, error)
- CanUpdate(Auth) (bool, error)
- CanCreate(Auth) (bool, error)
-}
-
-// CRUDable defines the crud methods
-type CRUDable interface {
- Create(Auth) error
- ReadOne() error
- ReadAll(auth Auth, search string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error)
- Update() error
- Delete() error
-}
-
-// HTTPErrorProcessor is executed when the defined error is thrown, it will make sure the user sees an appropriate error message and http status code
-type HTTPErrorProcessor interface {
- HTTPError() HTTPError
-}
-
-// HTTPError holds informations about an http error
-type HTTPError struct {
- HTTPCode int `json:"-"`
- Code int `json:"code"`
- Message string `json:"message"`
-}
-
-// Auth defines the authentication interface used to get some auth thing
-type Auth interface {
- // Most of the time, we need an ID from the auth object only. Having this method saves the need to cast it.
- GetID() int64
-}
-
-// Authprovider is a holder for the implementation of an authprovider by the application
-type Authprovider interface {
- GetAuthObject(echo.Context) (Auth, error)
-}
-
-// Auths holds the authobject
-type Auths struct {
- AuthObject func(echo.Context) (Auth, error)
-}
diff --git a/vendor/gitea.com/xorm/xorm-redis-cache/.gitignore b/vendor/gitea.com/xorm/xorm-redis-cache/.gitignore
deleted file mode 100644
index 836562412..000000000
--- a/vendor/gitea.com/xorm/xorm-redis-cache/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
diff --git a/vendor/gitea.com/xorm/xorm-redis-cache/LICENSE b/vendor/gitea.com/xorm/xorm-redis-cache/LICENSE
deleted file mode 100644
index d4c318933..000000000
--- a/vendor/gitea.com/xorm/xorm-redis-cache/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2014, xorm
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of the {organization} nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/vendor/gitea.com/xorm/xorm-redis-cache/README.md b/vendor/gitea.com/xorm/xorm-redis-cache/README.md
deleted file mode 100644
index 8ef30880a..000000000
--- a/vendor/gitea.com/xorm/xorm-redis-cache/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-xorm-redis-cache
-================
-
-XORM Redis Cache is a cacher implementation for XORM cache.
-
-[](https://godoc.org/gitea.com/xorm/xorm-redis-cache)
\ No newline at end of file
diff --git a/vendor/gitea.com/xorm/xorm-redis-cache/go.mod b/vendor/gitea.com/xorm/xorm-redis-cache/go.mod
deleted file mode 100644
index 2ea1d5372..000000000
--- a/vendor/gitea.com/xorm/xorm-redis-cache/go.mod
+++ /dev/null
@@ -1,10 +0,0 @@
-module gitea.com/xorm/xorm-redis-cache
-
-go 1.13
-
-require (
- gitea.com/xorm/tests v0.7.0
- github.com/garyburd/redigo v1.6.0
- github.com/go-sql-driver/mysql v1.4.1
- xorm.io/xorm v1.0.1
-)
diff --git a/vendor/gitea.com/xorm/xorm-redis-cache/go.sum b/vendor/gitea.com/xorm/xorm-redis-cache/go.sum
deleted file mode 100644
index a3e9fb4a8..000000000
--- a/vendor/gitea.com/xorm/xorm-redis-cache/go.sum
+++ /dev/null
@@ -1,173 +0,0 @@
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.37.4 h1:glPeL3BQJsbF6aIIYfZizMwc5LTYz250bDMjttbBGAU=
-cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
-gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
-gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU=
-gitea.com/xorm/tests v0.7.0 h1:pFcaxTGGAWw3rDuVfhBdyr+mX1uzdTtncyAKxkCQ/IE=
-gitea.com/xorm/tests v0.7.0/go.mod h1:ngmhQrSBgihBbOqw1hdReSQJAnTlbStYTn0vruUFwDc=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
-github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
-github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
-github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
-github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4 h1:YcpmyvADGYw5LqMnHqSkyIELsHCGF6PkrmM31V8rF7o=
-github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
-github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
-github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
-github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/garyburd/redigo v1.6.0 h1:0VruCpn7yAIIu7pWVClQC8wxCJEcG3nyzpMSHKi1PQc=
-github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
-github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
-github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
-github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
-github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
-github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
-github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
-github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
-github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
-github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
-github.com/jackc/pgx v3.6.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
-github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
-github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
-github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
-github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/mattn/go-oci8 v0.0.0-20191108001511-cbd8d5bc1da0/go.mod h1:/M9VLO+lUPmxvoOK2PfWRZ8mTtB4q1Hy9lEGijv9Nr8=
-github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o=
-github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
-github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
-github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
-github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
-github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
-github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
-github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
-github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
-github.com/shopspring/decimal v0.0.0-20191009025716-f1972eb1d1f5/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
-github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
-github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
-github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
-github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
-go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
-golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c h1:Vj5n4GlwjmQteupaxJ9+0FNOmBrHfq7vN4btdGoDZgI=
-golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
-golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To=
-golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.6.0 h1:Tfd7cKwKbFRsI8RMAD3oqqw7JPFRrvFlOsfbgVkjOOw=
-google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-xorm.io/builder v0.3.7 h1:2pETdKRK+2QG4mLX4oODHEhn5Z8j1m8sXa7jfu+/SZI=
-xorm.io/builder v0.3.7/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
-xorm.io/xorm v1.0.1 h1:/lITxpJtkZauNpdzj+L9CN/3OQxZaABrbergMcJu+Cw=
-xorm.io/xorm v1.0.1/go.mod h1:o4vnEsQ5V2F1/WK6w4XTwmiWJeGj82tqjAnHe44wVHY=
diff --git a/vendor/gitea.com/xorm/xorm-redis-cache/redis_cacher.go b/vendor/gitea.com/xorm/xorm-redis-cache/redis_cacher.go
deleted file mode 100644
index bcd63e7d5..000000000
--- a/vendor/gitea.com/xorm/xorm-redis-cache/redis_cacher.go
+++ /dev/null
@@ -1,315 +0,0 @@
-package xormrediscache
-
-import (
- "bytes"
- "encoding/gob"
- "fmt"
- "hash/crc32"
- "reflect"
- "time"
- "unsafe"
-
- "github.com/garyburd/redigo/redis"
- "xorm.io/xorm/caches"
- "xorm.io/xorm/log"
-)
-
-const (
- DEFAULT_EXPIRATION = time.Duration(0)
- FOREVER_EXPIRATION = time.Duration(-1)
-
- LOGGING_PREFIX = "[redis_cacher]"
-)
-
-// RedisCacher wraps the Redis client to meet the Cache interface.
-type RedisCacher struct {
- pool *redis.Pool
- defaultExpiration time.Duration
-
- Logger log.ContextLogger
-}
-
-// NewRedisCacher creates a Redis Cacher, host as IP endpoint, i.e., localhost:6379, provide empty string or nil if Redis server doesn't
-// require AUTH command, defaultExpiration sets the expire duration for a key to live. Until redigo supports
-// sharding/clustering, only one host will be in hostList
-//
-// engine.SetDefaultCacher(xormrediscache.NewRedisCacher("localhost:6379", "", xormrediscache.DEFAULT_EXPIRATION, engine.Logger))
-//
-// or set MapCacher
-//
-// engine.MapCacher(&user, xormrediscache.NewRedisCacher("localhost:6379", "", xormrediscache.DEFAULT_EXPIRATION, engine.Logger))
-//
-func NewRedisCacher(host string, password string, defaultExpiration time.Duration, logger log.ContextLogger) *RedisCacher {
- var pool = &redis.Pool{
- MaxIdle: 5,
- IdleTimeout: 240 * time.Second,
- Dial: func() (redis.Conn, error) {
- // the redis protocol should probably be made sett-able
- c, err := redis.Dial("tcp", host)
- if err != nil {
- return nil, err
- }
- if len(password) > 0 {
- if _, err := c.Do("AUTH", password); err != nil {
- c.Close()
- return nil, err
- }
- } else {
- // check with PING
- if _, err := c.Do("PING"); err != nil {
- c.Close()
- return nil, err
- }
- }
- return c, err
- },
- // custom connection test method
- TestOnBorrow: func(c redis.Conn, t time.Time) error {
- if _, err := c.Do("PING"); err != nil {
- return err
- }
- return nil
- },
- }
- return MakeRedisCacher(pool, defaultExpiration, logger)
-}
-
-// MakeRedisCacher build a cacher based on redis.Pool
-func MakeRedisCacher(pool *redis.Pool, defaultExpiration time.Duration, logger log.ContextLogger) *RedisCacher {
- return &RedisCacher{pool: pool, defaultExpiration: defaultExpiration, Logger: logger}
-}
-
-func exists(conn redis.Conn, key string) bool {
- existed, _ := redis.Bool(conn.Do("EXISTS", key))
- return existed
-}
-
-func (c *RedisCacher) logErrf(format string, contents ...interface{}) {
- if c.Logger != nil {
- c.Logger.Errorf(fmt.Sprintf("%s %s", LOGGING_PREFIX, format), contents...)
- }
-}
-
-func (c *RedisCacher) logDebugf(format string, contents ...interface{}) {
- if c.Logger != nil {
- c.Logger.Debugf(fmt.Sprintf("%s %s", LOGGING_PREFIX, format), contents...)
- }
-}
-
-func (c *RedisCacher) getBeanKey(tableName string, id string) string {
- return fmt.Sprintf("xorm:bean:%s:%s", tableName, id)
-}
-
-func (c *RedisCacher) getSqlKey(tableName string, sql string) string {
- // hash sql to minimize key length
- crc := crc32.ChecksumIEEE([]byte(sql))
- return fmt.Sprintf("xorm:sql:%s:%d", tableName, crc)
-}
-
-// Flush deletes all xorm cached objects
-func (c *RedisCacher) Flush() error {
- // conn := c.pool.Get()
- // defer conn.Close()
- // _, err := conn.Do("FLUSHALL")
- // return err
- return c.delObject("xorm:*")
-}
-
-func (c *RedisCacher) getObject(key string) interface{} {
- conn := c.pool.Get()
- defer conn.Close()
- raw, err := conn.Do("GET", key)
- if raw == nil {
- return nil
- }
- item, err := redis.Bytes(raw, err)
- if err != nil {
- c.logErrf("redis.Bytes failed: %s", err)
- return nil
- }
-
- value, err := c.deserialize(item)
-
- return value
-}
-
-func (c *RedisCacher) GetIds(tableName, sql string) interface{} {
- sqlKey := c.getSqlKey(tableName, sql)
- c.logDebugf(" GetIds|tableName:%s|sql:%s|key:%s", tableName, sql, sqlKey)
- return c.getObject(sqlKey)
-}
-
-func (c *RedisCacher) GetBean(tableName string, id string) interface{} {
- beanKey := c.getBeanKey(tableName, id)
- c.logDebugf("[xorm/redis_cacher] GetBean|tableName:%s|id:%s|key:%s", tableName, id, beanKey)
- return c.getObject(beanKey)
-}
-
-func (c *RedisCacher) putObject(key string, value interface{}) {
- c.invoke(c.pool.Get().Do, key, value, c.defaultExpiration)
-}
-
-func (c *RedisCacher) PutIds(tableName, sql string, ids interface{}) {
- sqlKey := c.getSqlKey(tableName, sql)
- c.logDebugf("PutIds|tableName:%s|sql:%s|key:%s|obj:%s|type:%v", tableName, sql, sqlKey, ids, reflect.TypeOf(ids))
- c.putObject(sqlKey, ids)
-}
-
-func (c *RedisCacher) PutBean(tableName string, id string, obj interface{}) {
- beanKey := c.getBeanKey(tableName, id)
- c.logDebugf("PutBean|tableName:%s|id:%s|key:%s|type:%v", tableName, id, beanKey, reflect.TypeOf(obj))
- c.putObject(beanKey, obj)
-}
-
-func (c *RedisCacher) delObject(key string) error {
- c.logDebugf("delObject key:[%s]", key)
-
- conn := c.pool.Get()
- defer conn.Close()
- if !exists(conn, key) {
- c.logErrf("delObject key:[%s] err: %v", key, caches.ErrCacheMiss)
- return caches.ErrCacheMiss
- }
- _, err := conn.Do("DEL", key)
- return err
-}
-
-func (c *RedisCacher) delObjects(key string) error {
-
- c.logDebugf("delObjects key:[%s]", key)
-
- conn := c.pool.Get()
- defer conn.Close()
-
- keys, err := conn.Do("KEYS", key)
- c.logDebugf("delObjects keys: %v", keys)
-
- if err == nil {
- for _, key := range keys.([]interface{}) {
- conn.Do("DEL", key)
- }
- }
- return err
-}
-
-func (c *RedisCacher) DelIds(tableName, sql string) {
- c.delObject(c.getSqlKey(tableName, sql))
-}
-
-func (c *RedisCacher) DelBean(tableName string, id string) {
- c.delObject(c.getBeanKey(tableName, id))
-}
-
-func (c *RedisCacher) ClearIds(tableName string) {
- c.delObjects(fmt.Sprintf("xorm:sql:%s:*", tableName))
-}
-
-func (c *RedisCacher) ClearBeans(tableName string) {
- c.delObjects(c.getBeanKey(tableName, "*"))
-}
-
-func (c *RedisCacher) invoke(f func(string, ...interface{}) (interface{}, error),
- key string, value interface{}, expires time.Duration) error {
-
- switch expires {
- case DEFAULT_EXPIRATION:
- expires = c.defaultExpiration
- case FOREVER_EXPIRATION:
- expires = time.Duration(0)
- }
-
- b, err := c.serialize(value)
- if err != nil {
- return err
- }
- conn := c.pool.Get()
- defer conn.Close()
- if expires > 0 {
- _, err := f("SETEX", key, int32(expires/time.Second), b)
- return err
- } else {
- _, err := f("SET", key, b)
- return err
- }
-}
-
-func (c *RedisCacher) serialize(value interface{}) ([]byte, error) {
-
- err := c.registerGobConcreteType(value)
- if err != nil {
- return nil, err
- }
-
- if reflect.TypeOf(value).Kind() == reflect.Struct {
- return nil, fmt.Errorf("serialize func only take pointer of a struct")
- }
-
- var b bytes.Buffer
- encoder := gob.NewEncoder(&b)
-
- c.logDebugf("serialize type:%v", reflect.TypeOf(value))
- err = encoder.Encode(&value)
- if err != nil {
- c.logErrf("gob encoding '%s' failed: %s|value:%v", value, err, value)
- return nil, err
- }
- return b.Bytes(), nil
-}
-
-func (c *RedisCacher) deserialize(byt []byte) (ptr interface{}, err error) {
- b := bytes.NewBuffer(byt)
- decoder := gob.NewDecoder(b)
-
- var p interface{}
- err = decoder.Decode(&p)
- if err != nil {
- c.logErrf("decode failed: %v", err)
- return
- }
-
- v := reflect.ValueOf(p)
- c.logDebugf("deserialize type:%v", v.Type())
- if v.Kind() == reflect.Struct {
-
- var pp interface{} = &p
- datas := reflect.ValueOf(pp).Elem().InterfaceData()
-
- sp := reflect.NewAt(v.Type(),
- unsafe.Pointer(datas[1])).Interface()
- ptr = sp
- vv := reflect.ValueOf(ptr)
- c.logDebugf("deserialize convert ptr type:%v | CanAddr:%t", vv.Type(), vv.CanAddr())
- } else {
- ptr = p
- }
- return
-}
-
-func (c *RedisCacher) registerGobConcreteType(value interface{}) error {
-
- t := reflect.TypeOf(value)
-
- c.logDebugf("registerGobConcreteType:%v", t)
-
- switch t.Kind() {
- case reflect.Ptr:
- v := reflect.ValueOf(value)
- i := v.Elem().Interface()
- gob.Register(&i)
- case reflect.Struct, reflect.Map, reflect.Slice:
- gob.Register(value)
- case reflect.String, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Bool, reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128:
- // do nothing since already registered known type
- default:
- return fmt.Errorf("unhandled type: %v", t)
- }
- return nil
-}
-
-func (c *RedisCacher) GetPool() (*redis.Pool, error) {
- return c.pool, nil
-}
-
-func (c *RedisCacher) SetPool(pool *redis.Pool) {
- c.pool = pool
-}
diff --git a/vendor/gitea.com/xorm/xorm-redis-cache/run_test.sh b/vendor/gitea.com/xorm/xorm-redis-cache/run_test.sh
deleted file mode 100644
index c20065630..000000000
--- a/vendor/gitea.com/xorm/xorm-redis-cache/run_test.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-redis-cli FLUSHALL
-if [ $? == "0" ];then
- go test -v -run=TestMysqlWithCache
-else
- echo "no redis-server running on localhost"
-fi
diff --git a/vendor/github.com/BurntSushi/toml/.gitignore b/vendor/github.com/BurntSushi/toml/.gitignore
deleted file mode 100644
index 0cd380037..000000000
--- a/vendor/github.com/BurntSushi/toml/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-TAGS
-tags
-.*.swp
-tomlcheck/tomlcheck
-toml.test
diff --git a/vendor/github.com/BurntSushi/toml/.travis.yml b/vendor/github.com/BurntSushi/toml/.travis.yml
deleted file mode 100644
index 8b8afc4f0..000000000
--- a/vendor/github.com/BurntSushi/toml/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: go
-go:
- - 1.1
- - 1.2
- - 1.3
- - 1.4
- - 1.5
- - 1.6
- - tip
-install:
- - go install ./...
- - go get github.com/BurntSushi/toml-test
-script:
- - export PATH="$PATH:$HOME/gopath/bin"
- - make test
diff --git a/vendor/github.com/BurntSushi/toml/COMPATIBLE b/vendor/github.com/BurntSushi/toml/COMPATIBLE
deleted file mode 100644
index 6efcfd0ce..000000000
--- a/vendor/github.com/BurntSushi/toml/COMPATIBLE
+++ /dev/null
@@ -1,3 +0,0 @@
-Compatible with TOML version
-[v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md)
-
diff --git a/vendor/github.com/BurntSushi/toml/COPYING b/vendor/github.com/BurntSushi/toml/COPYING
deleted file mode 100644
index 01b574320..000000000
--- a/vendor/github.com/BurntSushi/toml/COPYING
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 TOML authors
-
-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/BurntSushi/toml/Makefile b/vendor/github.com/BurntSushi/toml/Makefile
deleted file mode 100644
index 3600848d3..000000000
--- a/vendor/github.com/BurntSushi/toml/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-install:
- go install ./...
-
-test: install
- go test -v
- toml-test toml-test-decoder
- toml-test -encoder toml-test-encoder
-
-fmt:
- gofmt -w *.go */*.go
- colcheck *.go */*.go
-
-tags:
- find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS
-
-push:
- git push origin master
- git push github master
-
diff --git a/vendor/github.com/BurntSushi/toml/README.md b/vendor/github.com/BurntSushi/toml/README.md
deleted file mode 100644
index 7c1b37ecc..000000000
--- a/vendor/github.com/BurntSushi/toml/README.md
+++ /dev/null
@@ -1,218 +0,0 @@
-## TOML parser and encoder for Go with reflection
-
-TOML stands for Tom's Obvious, Minimal Language. This Go package provides a
-reflection interface similar to Go's standard library `json` and `xml`
-packages. This package also supports the `encoding.TextUnmarshaler` and
-`encoding.TextMarshaler` interfaces so that you can define custom data
-representations. (There is an example of this below.)
-
-Spec: https://github.com/toml-lang/toml
-
-Compatible with TOML version
-[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md)
-
-Documentation: https://godoc.org/github.com/BurntSushi/toml
-
-Installation:
-
-```bash
-go get github.com/BurntSushi/toml
-```
-
-Try the toml validator:
-
-```bash
-go get github.com/BurntSushi/toml/cmd/tomlv
-tomlv some-toml-file.toml
-```
-
-[](https://travis-ci.org/BurntSushi/toml) [](https://godoc.org/github.com/BurntSushi/toml)
-
-### Testing
-
-This package passes all tests in
-[toml-test](https://github.com/BurntSushi/toml-test) for both the decoder
-and the encoder.
-
-### Examples
-
-This package works similarly to how the Go standard library handles `XML`
-and `JSON`. Namely, data is loaded into Go values via reflection.
-
-For the simplest example, consider some TOML file as just a list of keys
-and values:
-
-```toml
-Age = 25
-Cats = [ "Cauchy", "Plato" ]
-Pi = 3.14
-Perfection = [ 6, 28, 496, 8128 ]
-DOB = 1987-07-05T05:45:00Z
-```
-
-Which could be defined in Go as:
-
-```go
-type Config struct {
- Age int
- Cats []string
- Pi float64
- Perfection []int
- DOB time.Time // requires `import time`
-}
-```
-
-And then decoded with:
-
-```go
-var conf Config
-if _, err := toml.Decode(tomlData, &conf); err != nil {
- // handle error
-}
-```
-
-You can also use struct tags if your struct field name doesn't map to a TOML
-key value directly:
-
-```toml
-some_key_NAME = "wat"
-```
-
-```go
-type TOML struct {
- ObscureKey string `toml:"some_key_NAME"`
-}
-```
-
-### Using the `encoding.TextUnmarshaler` interface
-
-Here's an example that automatically parses duration strings into
-`time.Duration` values:
-
-```toml
-[[song]]
-name = "Thunder Road"
-duration = "4m49s"
-
-[[song]]
-name = "Stairway to Heaven"
-duration = "8m03s"
-```
-
-Which can be decoded with:
-
-```go
-type song struct {
- Name string
- Duration duration
-}
-type songs struct {
- Song []song
-}
-var favorites songs
-if _, err := toml.Decode(blob, &favorites); err != nil {
- log.Fatal(err)
-}
-
-for _, s := range favorites.Song {
- fmt.Printf("%s (%s)\n", s.Name, s.Duration)
-}
-```
-
-And you'll also need a `duration` type that satisfies the
-`encoding.TextUnmarshaler` interface:
-
-```go
-type duration struct {
- time.Duration
-}
-
-func (d *duration) UnmarshalText(text []byte) error {
- var err error
- d.Duration, err = time.ParseDuration(string(text))
- return err
-}
-```
-
-### More complex usage
-
-Here's an example of how to load the example from the official spec page:
-
-```toml
-# This is a TOML document. Boom.
-
-title = "TOML Example"
-
-[owner]
-name = "Tom Preston-Werner"
-organization = "GitHub"
-bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
-dob = 1979-05-27T07:32:00Z # First class dates? Why not?
-
-[database]
-server = "192.168.1.1"
-ports = [ 8001, 8001, 8002 ]
-connection_max = 5000
-enabled = true
-
-[servers]
-
- # You can indent as you please. Tabs or spaces. TOML don't care.
- [servers.alpha]
- ip = "10.0.0.1"
- dc = "eqdc10"
-
- [servers.beta]
- ip = "10.0.0.2"
- dc = "eqdc10"
-
-[clients]
-data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
-
-# Line breaks are OK when inside arrays
-hosts = [
- "alpha",
- "omega"
-]
-```
-
-And the corresponding Go types are:
-
-```go
-type tomlConfig struct {
- Title string
- Owner ownerInfo
- DB database `toml:"database"`
- Servers map[string]server
- Clients clients
-}
-
-type ownerInfo struct {
- Name string
- Org string `toml:"organization"`
- Bio string
- DOB time.Time
-}
-
-type database struct {
- Server string
- Ports []int
- ConnMax int `toml:"connection_max"`
- Enabled bool
-}
-
-type server struct {
- IP string
- DC string
-}
-
-type clients struct {
- Data [][]interface{}
- Hosts []string
-}
-```
-
-Note that a case insensitive match will be tried if an exact match can't be
-found.
-
-A working example of the above can be found in `_examples/example.{go,toml}`.
diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go
deleted file mode 100644
index b0fd51d5b..000000000
--- a/vendor/github.com/BurntSushi/toml/decode.go
+++ /dev/null
@@ -1,509 +0,0 @@
-package toml
-
-import (
- "fmt"
- "io"
- "io/ioutil"
- "math"
- "reflect"
- "strings"
- "time"
-)
-
-func e(format string, args ...interface{}) error {
- return fmt.Errorf("toml: "+format, args...)
-}
-
-// Unmarshaler is the interface implemented by objects that can unmarshal a
-// TOML description of themselves.
-type Unmarshaler interface {
- UnmarshalTOML(interface{}) error
-}
-
-// Unmarshal decodes the contents of `p` in TOML format into a pointer `v`.
-func Unmarshal(p []byte, v interface{}) error {
- _, err := Decode(string(p), v)
- return err
-}
-
-// Primitive is a TOML value that hasn't been decoded into a Go value.
-// When using the various `Decode*` functions, the type `Primitive` may
-// be given to any value, and its decoding will be delayed.
-//
-// A `Primitive` value can be decoded using the `PrimitiveDecode` function.
-//
-// The underlying representation of a `Primitive` value is subject to change.
-// Do not rely on it.
-//
-// N.B. Primitive values are still parsed, so using them will only avoid
-// the overhead of reflection. They can be useful when you don't know the
-// exact type of TOML data until run time.
-type Primitive struct {
- undecoded interface{}
- context Key
-}
-
-// DEPRECATED!
-//
-// Use MetaData.PrimitiveDecode instead.
-func PrimitiveDecode(primValue Primitive, v interface{}) error {
- md := MetaData{decoded: make(map[string]bool)}
- return md.unify(primValue.undecoded, rvalue(v))
-}
-
-// PrimitiveDecode is just like the other `Decode*` functions, except it
-// decodes a TOML value that has already been parsed. Valid primitive values
-// can *only* be obtained from values filled by the decoder functions,
-// including this method. (i.e., `v` may contain more `Primitive`
-// values.)
-//
-// Meta data for primitive values is included in the meta data returned by
-// the `Decode*` functions with one exception: keys returned by the Undecoded
-// method will only reflect keys that were decoded. Namely, any keys hidden
-// behind a Primitive will be considered undecoded. Executing this method will
-// update the undecoded keys in the meta data. (See the example.)
-func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error {
- md.context = primValue.context
- defer func() { md.context = nil }()
- return md.unify(primValue.undecoded, rvalue(v))
-}
-
-// Decode will decode the contents of `data` in TOML format into a pointer
-// `v`.
-//
-// TOML hashes correspond to Go structs or maps. (Dealer's choice. They can be
-// used interchangeably.)
-//
-// TOML arrays of tables correspond to either a slice of structs or a slice
-// of maps.
-//
-// TOML datetimes correspond to Go `time.Time` values.
-//
-// All other TOML types (float, string, int, bool and array) correspond
-// to the obvious Go types.
-//
-// An exception to the above rules is if a type implements the
-// encoding.TextUnmarshaler interface. In this case, any primitive TOML value
-// (floats, strings, integers, booleans and datetimes) will be converted to
-// a byte string and given to the value's UnmarshalText method. See the
-// Unmarshaler example for a demonstration with time duration strings.
-//
-// Key mapping
-//
-// TOML keys can map to either keys in a Go map or field names in a Go
-// struct. The special `toml` struct tag may be used to map TOML keys to
-// struct fields that don't match the key name exactly. (See the example.)
-// A case insensitive match to struct names will be tried if an exact match
-// can't be found.
-//
-// The mapping between TOML values and Go values is loose. That is, there
-// may exist TOML values that cannot be placed into your representation, and
-// there may be parts of your representation that do not correspond to
-// TOML values. This loose mapping can be made stricter by using the IsDefined
-// and/or Undecoded methods on the MetaData returned.
-//
-// This decoder will not handle cyclic types. If a cyclic type is passed,
-// `Decode` will not terminate.
-func Decode(data string, v interface{}) (MetaData, error) {
- rv := reflect.ValueOf(v)
- if rv.Kind() != reflect.Ptr {
- return MetaData{}, e("Decode of non-pointer %s", reflect.TypeOf(v))
- }
- if rv.IsNil() {
- return MetaData{}, e("Decode of nil %s", reflect.TypeOf(v))
- }
- p, err := parse(data)
- if err != nil {
- return MetaData{}, err
- }
- md := MetaData{
- p.mapping, p.types, p.ordered,
- make(map[string]bool, len(p.ordered)), nil,
- }
- return md, md.unify(p.mapping, indirect(rv))
-}
-
-// DecodeFile is just like Decode, except it will automatically read the
-// contents of the file at `fpath` and decode it for you.
-func DecodeFile(fpath string, v interface{}) (MetaData, error) {
- bs, err := ioutil.ReadFile(fpath)
- if err != nil {
- return MetaData{}, err
- }
- return Decode(string(bs), v)
-}
-
-// DecodeReader is just like Decode, except it will consume all bytes
-// from the reader and decode it for you.
-func DecodeReader(r io.Reader, v interface{}) (MetaData, error) {
- bs, err := ioutil.ReadAll(r)
- if err != nil {
- return MetaData{}, err
- }
- return Decode(string(bs), v)
-}
-
-// unify performs a sort of type unification based on the structure of `rv`,
-// which is the client representation.
-//
-// Any type mismatch produces an error. Finding a type that we don't know
-// how to handle produces an unsupported type error.
-func (md *MetaData) unify(data interface{}, rv reflect.Value) error {
-
- // Special case. Look for a `Primitive` value.
- if rv.Type() == reflect.TypeOf((*Primitive)(nil)).Elem() {
- // Save the undecoded data and the key context into the primitive
- // value.
- context := make(Key, len(md.context))
- copy(context, md.context)
- rv.Set(reflect.ValueOf(Primitive{
- undecoded: data,
- context: context,
- }))
- return nil
- }
-
- // Special case. Unmarshaler Interface support.
- if rv.CanAddr() {
- if v, ok := rv.Addr().Interface().(Unmarshaler); ok {
- return v.UnmarshalTOML(data)
- }
- }
-
- // Special case. Handle time.Time values specifically.
- // TODO: Remove this code when we decide to drop support for Go 1.1.
- // This isn't necessary in Go 1.2 because time.Time satisfies the encoding
- // interfaces.
- if rv.Type().AssignableTo(rvalue(time.Time{}).Type()) {
- return md.unifyDatetime(data, rv)
- }
-
- // Special case. Look for a value satisfying the TextUnmarshaler interface.
- if v, ok := rv.Interface().(TextUnmarshaler); ok {
- return md.unifyText(data, v)
- }
- // BUG(burntsushi)
- // The behavior here is incorrect whenever a Go type satisfies the
- // encoding.TextUnmarshaler interface but also corresponds to a TOML
- // hash or array. In particular, the unmarshaler should only be applied
- // to primitive TOML values. But at this point, it will be applied to
- // all kinds of values and produce an incorrect error whenever those values
- // are hashes or arrays (including arrays of tables).
-
- k := rv.Kind()
-
- // laziness
- if k >= reflect.Int && k <= reflect.Uint64 {
- return md.unifyInt(data, rv)
- }
- switch k {
- case reflect.Ptr:
- elem := reflect.New(rv.Type().Elem())
- err := md.unify(data, reflect.Indirect(elem))
- if err != nil {
- return err
- }
- rv.Set(elem)
- return nil
- case reflect.Struct:
- return md.unifyStruct(data, rv)
- case reflect.Map:
- return md.unifyMap(data, rv)
- case reflect.Array:
- return md.unifyArray(data, rv)
- case reflect.Slice:
- return md.unifySlice(data, rv)
- case reflect.String:
- return md.unifyString(data, rv)
- case reflect.Bool:
- return md.unifyBool(data, rv)
- case reflect.Interface:
- // we only support empty interfaces.
- if rv.NumMethod() > 0 {
- return e("unsupported type %s", rv.Type())
- }
- return md.unifyAnything(data, rv)
- case reflect.Float32:
- fallthrough
- case reflect.Float64:
- return md.unifyFloat64(data, rv)
- }
- return e("unsupported type %s", rv.Kind())
-}
-
-func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error {
- tmap, ok := mapping.(map[string]interface{})
- if !ok {
- if mapping == nil {
- return nil
- }
- return e("type mismatch for %s: expected table but found %T",
- rv.Type().String(), mapping)
- }
-
- for key, datum := range tmap {
- var f *field
- fields := cachedTypeFields(rv.Type())
- for i := range fields {
- ff := &fields[i]
- if ff.name == key {
- f = ff
- break
- }
- if f == nil && strings.EqualFold(ff.name, key) {
- f = ff
- }
- }
- if f != nil {
- subv := rv
- for _, i := range f.index {
- subv = indirect(subv.Field(i))
- }
- if isUnifiable(subv) {
- md.decoded[md.context.add(key).String()] = true
- md.context = append(md.context, key)
- if err := md.unify(datum, subv); err != nil {
- return err
- }
- md.context = md.context[0 : len(md.context)-1]
- } else if f.name != "" {
- // Bad user! No soup for you!
- return e("cannot write unexported field %s.%s",
- rv.Type().String(), f.name)
- }
- }
- }
- return nil
-}
-
-func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error {
- tmap, ok := mapping.(map[string]interface{})
- if !ok {
- if tmap == nil {
- return nil
- }
- return badtype("map", mapping)
- }
- if rv.IsNil() {
- rv.Set(reflect.MakeMap(rv.Type()))
- }
- for k, v := range tmap {
- md.decoded[md.context.add(k).String()] = true
- md.context = append(md.context, k)
-
- rvkey := indirect(reflect.New(rv.Type().Key()))
- rvval := reflect.Indirect(reflect.New(rv.Type().Elem()))
- if err := md.unify(v, rvval); err != nil {
- return err
- }
- md.context = md.context[0 : len(md.context)-1]
-
- rvkey.SetString(k)
- rv.SetMapIndex(rvkey, rvval)
- }
- return nil
-}
-
-func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error {
- datav := reflect.ValueOf(data)
- if datav.Kind() != reflect.Slice {
- if !datav.IsValid() {
- return nil
- }
- return badtype("slice", data)
- }
- sliceLen := datav.Len()
- if sliceLen != rv.Len() {
- return e("expected array length %d; got TOML array of length %d",
- rv.Len(), sliceLen)
- }
- return md.unifySliceArray(datav, rv)
-}
-
-func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error {
- datav := reflect.ValueOf(data)
- if datav.Kind() != reflect.Slice {
- if !datav.IsValid() {
- return nil
- }
- return badtype("slice", data)
- }
- n := datav.Len()
- if rv.IsNil() || rv.Cap() < n {
- rv.Set(reflect.MakeSlice(rv.Type(), n, n))
- }
- rv.SetLen(n)
- return md.unifySliceArray(datav, rv)
-}
-
-func (md *MetaData) unifySliceArray(data, rv reflect.Value) error {
- sliceLen := data.Len()
- for i := 0; i < sliceLen; i++ {
- v := data.Index(i).Interface()
- sliceval := indirect(rv.Index(i))
- if err := md.unify(v, sliceval); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (md *MetaData) unifyDatetime(data interface{}, rv reflect.Value) error {
- if _, ok := data.(time.Time); ok {
- rv.Set(reflect.ValueOf(data))
- return nil
- }
- return badtype("time.Time", data)
-}
-
-func (md *MetaData) unifyString(data interface{}, rv reflect.Value) error {
- if s, ok := data.(string); ok {
- rv.SetString(s)
- return nil
- }
- return badtype("string", data)
-}
-
-func (md *MetaData) unifyFloat64(data interface{}, rv reflect.Value) error {
- if num, ok := data.(float64); ok {
- switch rv.Kind() {
- case reflect.Float32:
- fallthrough
- case reflect.Float64:
- rv.SetFloat(num)
- default:
- panic("bug")
- }
- return nil
- }
- return badtype("float", data)
-}
-
-func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error {
- if num, ok := data.(int64); ok {
- if rv.Kind() >= reflect.Int && rv.Kind() <= reflect.Int64 {
- switch rv.Kind() {
- case reflect.Int, reflect.Int64:
- // No bounds checking necessary.
- case reflect.Int8:
- if num < math.MinInt8 || num > math.MaxInt8 {
- return e("value %d is out of range for int8", num)
- }
- case reflect.Int16:
- if num < math.MinInt16 || num > math.MaxInt16 {
- return e("value %d is out of range for int16", num)
- }
- case reflect.Int32:
- if num < math.MinInt32 || num > math.MaxInt32 {
- return e("value %d is out of range for int32", num)
- }
- }
- rv.SetInt(num)
- } else if rv.Kind() >= reflect.Uint && rv.Kind() <= reflect.Uint64 {
- unum := uint64(num)
- switch rv.Kind() {
- case reflect.Uint, reflect.Uint64:
- // No bounds checking necessary.
- case reflect.Uint8:
- if num < 0 || unum > math.MaxUint8 {
- return e("value %d is out of range for uint8", num)
- }
- case reflect.Uint16:
- if num < 0 || unum > math.MaxUint16 {
- return e("value %d is out of range for uint16", num)
- }
- case reflect.Uint32:
- if num < 0 || unum > math.MaxUint32 {
- return e("value %d is out of range for uint32", num)
- }
- }
- rv.SetUint(unum)
- } else {
- panic("unreachable")
- }
- return nil
- }
- return badtype("integer", data)
-}
-
-func (md *MetaData) unifyBool(data interface{}, rv reflect.Value) error {
- if b, ok := data.(bool); ok {
- rv.SetBool(b)
- return nil
- }
- return badtype("boolean", data)
-}
-
-func (md *MetaData) unifyAnything(data interface{}, rv reflect.Value) error {
- rv.Set(reflect.ValueOf(data))
- return nil
-}
-
-func (md *MetaData) unifyText(data interface{}, v TextUnmarshaler) error {
- var s string
- switch sdata := data.(type) {
- case TextMarshaler:
- text, err := sdata.MarshalText()
- if err != nil {
- return err
- }
- s = string(text)
- case fmt.Stringer:
- s = sdata.String()
- case string:
- s = sdata
- case bool:
- s = fmt.Sprintf("%v", sdata)
- case int64:
- s = fmt.Sprintf("%d", sdata)
- case float64:
- s = fmt.Sprintf("%f", sdata)
- default:
- return badtype("primitive (string-like)", data)
- }
- if err := v.UnmarshalText([]byte(s)); err != nil {
- return err
- }
- return nil
-}
-
-// rvalue returns a reflect.Value of `v`. All pointers are resolved.
-func rvalue(v interface{}) reflect.Value {
- return indirect(reflect.ValueOf(v))
-}
-
-// indirect returns the value pointed to by a pointer.
-// Pointers are followed until the value is not a pointer.
-// New values are allocated for each nil pointer.
-//
-// An exception to this rule is if the value satisfies an interface of
-// interest to us (like encoding.TextUnmarshaler).
-func indirect(v reflect.Value) reflect.Value {
- if v.Kind() != reflect.Ptr {
- if v.CanSet() {
- pv := v.Addr()
- if _, ok := pv.Interface().(TextUnmarshaler); ok {
- return pv
- }
- }
- return v
- }
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- return indirect(reflect.Indirect(v))
-}
-
-func isUnifiable(rv reflect.Value) bool {
- if rv.CanSet() {
- return true
- }
- if _, ok := rv.Interface().(TextUnmarshaler); ok {
- return true
- }
- return false
-}
-
-func badtype(expected string, data interface{}) error {
- return e("cannot load TOML value of type %T into a Go %s", data, expected)
-}
diff --git a/vendor/github.com/BurntSushi/toml/decode_meta.go b/vendor/github.com/BurntSushi/toml/decode_meta.go
deleted file mode 100644
index b9914a679..000000000
--- a/vendor/github.com/BurntSushi/toml/decode_meta.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package toml
-
-import "strings"
-
-// MetaData allows access to meta information about TOML data that may not
-// be inferrable via reflection. In particular, whether a key has been defined
-// and the TOML type of a key.
-type MetaData struct {
- mapping map[string]interface{}
- types map[string]tomlType
- keys []Key
- decoded map[string]bool
- context Key // Used only during decoding.
-}
-
-// IsDefined returns true if the key given exists in the TOML data. The key
-// should be specified hierarchially. e.g.,
-//
-// // access the TOML key 'a.b.c'
-// IsDefined("a", "b", "c")
-//
-// IsDefined will return false if an empty key given. Keys are case sensitive.
-func (md *MetaData) IsDefined(key ...string) bool {
- if len(key) == 0 {
- return false
- }
-
- var hash map[string]interface{}
- var ok bool
- var hashOrVal interface{} = md.mapping
- for _, k := range key {
- if hash, ok = hashOrVal.(map[string]interface{}); !ok {
- return false
- }
- if hashOrVal, ok = hash[k]; !ok {
- return false
- }
- }
- return true
-}
-
-// Type returns a string representation of the type of the key specified.
-//
-// Type will return the empty string if given an empty key or a key that
-// does not exist. Keys are case sensitive.
-func (md *MetaData) Type(key ...string) string {
- fullkey := strings.Join(key, ".")
- if typ, ok := md.types[fullkey]; ok {
- return typ.typeString()
- }
- return ""
-}
-
-// Key is the type of any TOML key, including key groups. Use (MetaData).Keys
-// to get values of this type.
-type Key []string
-
-func (k Key) String() string {
- return strings.Join(k, ".")
-}
-
-func (k Key) maybeQuotedAll() string {
- var ss []string
- for i := range k {
- ss = append(ss, k.maybeQuoted(i))
- }
- return strings.Join(ss, ".")
-}
-
-func (k Key) maybeQuoted(i int) string {
- quote := false
- for _, c := range k[i] {
- if !isBareKeyChar(c) {
- quote = true
- break
- }
- }
- if quote {
- return "\"" + strings.Replace(k[i], "\"", "\\\"", -1) + "\""
- }
- return k[i]
-}
-
-func (k Key) add(piece string) Key {
- newKey := make(Key, len(k)+1)
- copy(newKey, k)
- newKey[len(k)] = piece
- return newKey
-}
-
-// Keys returns a slice of every key in the TOML data, including key groups.
-// Each key is itself a slice, where the first element is the top of the
-// hierarchy and the last is the most specific.
-//
-// The list will have the same order as the keys appeared in the TOML data.
-//
-// All keys returned are non-empty.
-func (md *MetaData) Keys() []Key {
- return md.keys
-}
-
-// Undecoded returns all keys that have not been decoded in the order in which
-// they appear in the original TOML document.
-//
-// This includes keys that haven't been decoded because of a Primitive value.
-// Once the Primitive value is decoded, the keys will be considered decoded.
-//
-// Also note that decoding into an empty interface will result in no decoding,
-// and so no keys will be considered decoded.
-//
-// In this sense, the Undecoded keys correspond to keys in the TOML document
-// that do not have a concrete type in your representation.
-func (md *MetaData) Undecoded() []Key {
- undecoded := make([]Key, 0, len(md.keys))
- for _, key := range md.keys {
- if !md.decoded[key.String()] {
- undecoded = append(undecoded, key)
- }
- }
- return undecoded
-}
diff --git a/vendor/github.com/BurntSushi/toml/doc.go b/vendor/github.com/BurntSushi/toml/doc.go
deleted file mode 100644
index b371f396e..000000000
--- a/vendor/github.com/BurntSushi/toml/doc.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Package toml provides facilities for decoding and encoding TOML configuration
-files via reflection. There is also support for delaying decoding with
-the Primitive type, and querying the set of keys in a TOML document with the
-MetaData type.
-
-The specification implemented: https://github.com/toml-lang/toml
-
-The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify
-whether a file is a valid TOML document. It can also be used to print the
-type of each key in a TOML document.
-
-Testing
-
-There are two important types of tests used for this package. The first is
-contained inside '*_test.go' files and uses the standard Go unit testing
-framework. These tests are primarily devoted to holistically testing the
-decoder and encoder.
-
-The second type of testing is used to verify the implementation's adherence
-to the TOML specification. These tests have been factored into their own
-project: https://github.com/BurntSushi/toml-test
-
-The reason the tests are in a separate project is so that they can be used by
-any implementation of TOML. Namely, it is language agnostic.
-*/
-package toml
diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go
deleted file mode 100644
index d905c21a2..000000000
--- a/vendor/github.com/BurntSushi/toml/encode.go
+++ /dev/null
@@ -1,568 +0,0 @@
-package toml
-
-import (
- "bufio"
- "errors"
- "fmt"
- "io"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-)
-
-type tomlEncodeError struct{ error }
-
-var (
- errArrayMixedElementTypes = errors.New(
- "toml: cannot encode array with mixed element types")
- errArrayNilElement = errors.New(
- "toml: cannot encode array with nil element")
- errNonString = errors.New(
- "toml: cannot encode a map with non-string key type")
- errAnonNonStruct = errors.New(
- "toml: cannot encode an anonymous field that is not a struct")
- errArrayNoTable = errors.New(
- "toml: TOML array element cannot contain a table")
- errNoKey = errors.New(
- "toml: top-level values must be Go maps or structs")
- errAnything = errors.New("") // used in testing
-)
-
-var quotedReplacer = strings.NewReplacer(
- "\t", "\\t",
- "\n", "\\n",
- "\r", "\\r",
- "\"", "\\\"",
- "\\", "\\\\",
-)
-
-// Encoder controls the encoding of Go values to a TOML document to some
-// io.Writer.
-//
-// The indentation level can be controlled with the Indent field.
-type Encoder struct {
- // A single indentation level. By default it is two spaces.
- Indent string
-
- // hasWritten is whether we have written any output to w yet.
- hasWritten bool
- w *bufio.Writer
-}
-
-// NewEncoder returns a TOML encoder that encodes Go values to the io.Writer
-// given. By default, a single indentation level is 2 spaces.
-func NewEncoder(w io.Writer) *Encoder {
- return &Encoder{
- w: bufio.NewWriter(w),
- Indent: " ",
- }
-}
-
-// Encode writes a TOML representation of the Go value to the underlying
-// io.Writer. If the value given cannot be encoded to a valid TOML document,
-// then an error is returned.
-//
-// The mapping between Go values and TOML values should be precisely the same
-// as for the Decode* functions. Similarly, the TextMarshaler interface is
-// supported by encoding the resulting bytes as strings. (If you want to write
-// arbitrary binary data then you will need to use something like base64 since
-// TOML does not have any binary types.)
-//
-// When encoding TOML hashes (i.e., Go maps or structs), keys without any
-// sub-hashes are encoded first.
-//
-// If a Go map is encoded, then its keys are sorted alphabetically for
-// deterministic output. More control over this behavior may be provided if
-// there is demand for it.
-//
-// Encoding Go values without a corresponding TOML representation---like map
-// types with non-string keys---will cause an error to be returned. Similarly
-// for mixed arrays/slices, arrays/slices with nil elements, embedded
-// non-struct types and nested slices containing maps or structs.
-// (e.g., [][]map[string]string is not allowed but []map[string]string is OK
-// and so is []map[string][]string.)
-func (enc *Encoder) Encode(v interface{}) error {
- rv := eindirect(reflect.ValueOf(v))
- if err := enc.safeEncode(Key([]string{}), rv); err != nil {
- return err
- }
- return enc.w.Flush()
-}
-
-func (enc *Encoder) safeEncode(key Key, rv reflect.Value) (err error) {
- defer func() {
- if r := recover(); r != nil {
- if terr, ok := r.(tomlEncodeError); ok {
- err = terr.error
- return
- }
- panic(r)
- }
- }()
- enc.encode(key, rv)
- return nil
-}
-
-func (enc *Encoder) encode(key Key, rv reflect.Value) {
- // Special case. Time needs to be in ISO8601 format.
- // Special case. If we can marshal the type to text, then we used that.
- // Basically, this prevents the encoder for handling these types as
- // generic structs (or whatever the underlying type of a TextMarshaler is).
- switch rv.Interface().(type) {
- case time.Time, TextMarshaler:
- enc.keyEqElement(key, rv)
- return
- }
-
- k := rv.Kind()
- switch k {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,
- reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,
- reflect.Uint64,
- reflect.Float32, reflect.Float64, reflect.String, reflect.Bool:
- enc.keyEqElement(key, rv)
- case reflect.Array, reflect.Slice:
- if typeEqual(tomlArrayHash, tomlTypeOfGo(rv)) {
- enc.eArrayOfTables(key, rv)
- } else {
- enc.keyEqElement(key, rv)
- }
- case reflect.Interface:
- if rv.IsNil() {
- return
- }
- enc.encode(key, rv.Elem())
- case reflect.Map:
- if rv.IsNil() {
- return
- }
- enc.eTable(key, rv)
- case reflect.Ptr:
- if rv.IsNil() {
- return
- }
- enc.encode(key, rv.Elem())
- case reflect.Struct:
- enc.eTable(key, rv)
- default:
- panic(e("unsupported type for key '%s': %s", key, k))
- }
-}
-
-// eElement encodes any value that can be an array element (primitives and
-// arrays).
-func (enc *Encoder) eElement(rv reflect.Value) {
- switch v := rv.Interface().(type) {
- case time.Time:
- // Special case time.Time as a primitive. Has to come before
- // TextMarshaler below because time.Time implements
- // encoding.TextMarshaler, but we need to always use UTC.
- enc.wf(v.UTC().Format("2006-01-02T15:04:05Z"))
- return
- case TextMarshaler:
- // Special case. Use text marshaler if it's available for this value.
- if s, err := v.MarshalText(); err != nil {
- encPanic(err)
- } else {
- enc.writeQuoted(string(s))
- }
- return
- }
- switch rv.Kind() {
- case reflect.Bool:
- enc.wf(strconv.FormatBool(rv.Bool()))
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,
- reflect.Int64:
- enc.wf(strconv.FormatInt(rv.Int(), 10))
- case reflect.Uint, reflect.Uint8, reflect.Uint16,
- reflect.Uint32, reflect.Uint64:
- enc.wf(strconv.FormatUint(rv.Uint(), 10))
- case reflect.Float32:
- enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 32)))
- case reflect.Float64:
- enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 64)))
- case reflect.Array, reflect.Slice:
- enc.eArrayOrSliceElement(rv)
- case reflect.Interface:
- enc.eElement(rv.Elem())
- case reflect.String:
- enc.writeQuoted(rv.String())
- default:
- panic(e("unexpected primitive type: %s", rv.Kind()))
- }
-}
-
-// By the TOML spec, all floats must have a decimal with at least one
-// number on either side.
-func floatAddDecimal(fstr string) string {
- if !strings.Contains(fstr, ".") {
- return fstr + ".0"
- }
- return fstr
-}
-
-func (enc *Encoder) writeQuoted(s string) {
- enc.wf("\"%s\"", quotedReplacer.Replace(s))
-}
-
-func (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) {
- length := rv.Len()
- enc.wf("[")
- for i := 0; i < length; i++ {
- elem := rv.Index(i)
- enc.eElement(elem)
- if i != length-1 {
- enc.wf(", ")
- }
- }
- enc.wf("]")
-}
-
-func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) {
- if len(key) == 0 {
- encPanic(errNoKey)
- }
- for i := 0; i < rv.Len(); i++ {
- trv := rv.Index(i)
- if isNil(trv) {
- continue
- }
- panicIfInvalidKey(key)
- enc.newline()
- enc.wf("%s[[%s]]", enc.indentStr(key), key.maybeQuotedAll())
- enc.newline()
- enc.eMapOrStruct(key, trv)
- }
-}
-
-func (enc *Encoder) eTable(key Key, rv reflect.Value) {
- panicIfInvalidKey(key)
- if len(key) == 1 {
- // Output an extra newline between top-level tables.
- // (The newline isn't written if nothing else has been written though.)
- enc.newline()
- }
- if len(key) > 0 {
- enc.wf("%s[%s]", enc.indentStr(key), key.maybeQuotedAll())
- enc.newline()
- }
- enc.eMapOrStruct(key, rv)
-}
-
-func (enc *Encoder) eMapOrStruct(key Key, rv reflect.Value) {
- switch rv := eindirect(rv); rv.Kind() {
- case reflect.Map:
- enc.eMap(key, rv)
- case reflect.Struct:
- enc.eStruct(key, rv)
- default:
- panic("eTable: unhandled reflect.Value Kind: " + rv.Kind().String())
- }
-}
-
-func (enc *Encoder) eMap(key Key, rv reflect.Value) {
- rt := rv.Type()
- if rt.Key().Kind() != reflect.String {
- encPanic(errNonString)
- }
-
- // Sort keys so that we have deterministic output. And write keys directly
- // underneath this key first, before writing sub-structs or sub-maps.
- var mapKeysDirect, mapKeysSub []string
- for _, mapKey := range rv.MapKeys() {
- k := mapKey.String()
- if typeIsHash(tomlTypeOfGo(rv.MapIndex(mapKey))) {
- mapKeysSub = append(mapKeysSub, k)
- } else {
- mapKeysDirect = append(mapKeysDirect, k)
- }
- }
-
- var writeMapKeys = func(mapKeys []string) {
- sort.Strings(mapKeys)
- for _, mapKey := range mapKeys {
- mrv := rv.MapIndex(reflect.ValueOf(mapKey))
- if isNil(mrv) {
- // Don't write anything for nil fields.
- continue
- }
- enc.encode(key.add(mapKey), mrv)
- }
- }
- writeMapKeys(mapKeysDirect)
- writeMapKeys(mapKeysSub)
-}
-
-func (enc *Encoder) eStruct(key Key, rv reflect.Value) {
- // Write keys for fields directly under this key first, because if we write
- // a field that creates a new table, then all keys under it will be in that
- // table (not the one we're writing here).
- rt := rv.Type()
- var fieldsDirect, fieldsSub [][]int
- var addFields func(rt reflect.Type, rv reflect.Value, start []int)
- addFields = func(rt reflect.Type, rv reflect.Value, start []int) {
- for i := 0; i < rt.NumField(); i++ {
- f := rt.Field(i)
- // skip unexported fields
- if f.PkgPath != "" && !f.Anonymous {
- continue
- }
- frv := rv.Field(i)
- if f.Anonymous {
- t := f.Type
- switch t.Kind() {
- case reflect.Struct:
- // Treat anonymous struct fields with
- // tag names as though they are not
- // anonymous, like encoding/json does.
- if getOptions(f.Tag).name == "" {
- addFields(t, frv, f.Index)
- continue
- }
- case reflect.Ptr:
- if t.Elem().Kind() == reflect.Struct &&
- getOptions(f.Tag).name == "" {
- if !frv.IsNil() {
- addFields(t.Elem(), frv.Elem(), f.Index)
- }
- continue
- }
- // Fall through to the normal field encoding logic below
- // for non-struct anonymous fields.
- }
- }
-
- if typeIsHash(tomlTypeOfGo(frv)) {
- fieldsSub = append(fieldsSub, append(start, f.Index...))
- } else {
- fieldsDirect = append(fieldsDirect, append(start, f.Index...))
- }
- }
- }
- addFields(rt, rv, nil)
-
- var writeFields = func(fields [][]int) {
- for _, fieldIndex := range fields {
- sft := rt.FieldByIndex(fieldIndex)
- sf := rv.FieldByIndex(fieldIndex)
- if isNil(sf) {
- // Don't write anything for nil fields.
- continue
- }
-
- opts := getOptions(sft.Tag)
- if opts.skip {
- continue
- }
- keyName := sft.Name
- if opts.name != "" {
- keyName = opts.name
- }
- if opts.omitempty && isEmpty(sf) {
- continue
- }
- if opts.omitzero && isZero(sf) {
- continue
- }
-
- enc.encode(key.add(keyName), sf)
- }
- }
- writeFields(fieldsDirect)
- writeFields(fieldsSub)
-}
-
-// tomlTypeName returns the TOML type name of the Go value's type. It is
-// used to determine whether the types of array elements are mixed (which is
-// forbidden). If the Go value is nil, then it is illegal for it to be an array
-// element, and valueIsNil is returned as true.
-
-// Returns the TOML type of a Go value. The type may be `nil`, which means
-// no concrete TOML type could be found.
-func tomlTypeOfGo(rv reflect.Value) tomlType {
- if isNil(rv) || !rv.IsValid() {
- return nil
- }
- switch rv.Kind() {
- case reflect.Bool:
- return tomlBool
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,
- reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,
- reflect.Uint64:
- return tomlInteger
- case reflect.Float32, reflect.Float64:
- return tomlFloat
- case reflect.Array, reflect.Slice:
- if typeEqual(tomlHash, tomlArrayType(rv)) {
- return tomlArrayHash
- }
- return tomlArray
- case reflect.Ptr, reflect.Interface:
- return tomlTypeOfGo(rv.Elem())
- case reflect.String:
- return tomlString
- case reflect.Map:
- return tomlHash
- case reflect.Struct:
- switch rv.Interface().(type) {
- case time.Time:
- return tomlDatetime
- case TextMarshaler:
- return tomlString
- default:
- return tomlHash
- }
- default:
- panic("unexpected reflect.Kind: " + rv.Kind().String())
- }
-}
-
-// tomlArrayType returns the element type of a TOML array. The type returned
-// may be nil if it cannot be determined (e.g., a nil slice or a zero length
-// slize). This function may also panic if it finds a type that cannot be
-// expressed in TOML (such as nil elements, heterogeneous arrays or directly
-// nested arrays of tables).
-func tomlArrayType(rv reflect.Value) tomlType {
- if isNil(rv) || !rv.IsValid() || rv.Len() == 0 {
- return nil
- }
- firstType := tomlTypeOfGo(rv.Index(0))
- if firstType == nil {
- encPanic(errArrayNilElement)
- }
-
- rvlen := rv.Len()
- for i := 1; i < rvlen; i++ {
- elem := rv.Index(i)
- switch elemType := tomlTypeOfGo(elem); {
- case elemType == nil:
- encPanic(errArrayNilElement)
- case !typeEqual(firstType, elemType):
- encPanic(errArrayMixedElementTypes)
- }
- }
- // If we have a nested array, then we must make sure that the nested
- // array contains ONLY primitives.
- // This checks arbitrarily nested arrays.
- if typeEqual(firstType, tomlArray) || typeEqual(firstType, tomlArrayHash) {
- nest := tomlArrayType(eindirect(rv.Index(0)))
- if typeEqual(nest, tomlHash) || typeEqual(nest, tomlArrayHash) {
- encPanic(errArrayNoTable)
- }
- }
- return firstType
-}
-
-type tagOptions struct {
- skip bool // "-"
- name string
- omitempty bool
- omitzero bool
-}
-
-func getOptions(tag reflect.StructTag) tagOptions {
- t := tag.Get("toml")
- if t == "-" {
- return tagOptions{skip: true}
- }
- var opts tagOptions
- parts := strings.Split(t, ",")
- opts.name = parts[0]
- for _, s := range parts[1:] {
- switch s {
- case "omitempty":
- opts.omitempty = true
- case "omitzero":
- opts.omitzero = true
- }
- }
- return opts
-}
-
-func isZero(rv reflect.Value) bool {
- switch rv.Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return rv.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- return rv.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return rv.Float() == 0.0
- }
- return false
-}
-
-func isEmpty(rv reflect.Value) bool {
- switch rv.Kind() {
- case reflect.Array, reflect.Slice, reflect.Map, reflect.String:
- return rv.Len() == 0
- case reflect.Bool:
- return !rv.Bool()
- }
- return false
-}
-
-func (enc *Encoder) newline() {
- if enc.hasWritten {
- enc.wf("\n")
- }
-}
-
-func (enc *Encoder) keyEqElement(key Key, val reflect.Value) {
- if len(key) == 0 {
- encPanic(errNoKey)
- }
- panicIfInvalidKey(key)
- enc.wf("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1))
- enc.eElement(val)
- enc.newline()
-}
-
-func (enc *Encoder) wf(format string, v ...interface{}) {
- if _, err := fmt.Fprintf(enc.w, format, v...); err != nil {
- encPanic(err)
- }
- enc.hasWritten = true
-}
-
-func (enc *Encoder) indentStr(key Key) string {
- return strings.Repeat(enc.Indent, len(key)-1)
-}
-
-func encPanic(err error) {
- panic(tomlEncodeError{err})
-}
-
-func eindirect(v reflect.Value) reflect.Value {
- switch v.Kind() {
- case reflect.Ptr, reflect.Interface:
- return eindirect(v.Elem())
- default:
- return v
- }
-}
-
-func isNil(rv reflect.Value) bool {
- switch rv.Kind() {
- case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
- return rv.IsNil()
- default:
- return false
- }
-}
-
-func panicIfInvalidKey(key Key) {
- for _, k := range key {
- if len(k) == 0 {
- encPanic(e("Key '%s' is not a valid table name. Key names "+
- "cannot be empty.", key.maybeQuotedAll()))
- }
- }
-}
-
-func isValidKeyName(s string) bool {
- return len(s) != 0
-}
diff --git a/vendor/github.com/BurntSushi/toml/encoding_types.go b/vendor/github.com/BurntSushi/toml/encoding_types.go
deleted file mode 100644
index d36e1dd60..000000000
--- a/vendor/github.com/BurntSushi/toml/encoding_types.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build go1.2
-
-package toml
-
-// In order to support Go 1.1, we define our own TextMarshaler and
-// TextUnmarshaler types. For Go 1.2+, we just alias them with the
-// standard library interfaces.
-
-import (
- "encoding"
-)
-
-// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here
-// so that Go 1.1 can be supported.
-type TextMarshaler encoding.TextMarshaler
-
-// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined
-// here so that Go 1.1 can be supported.
-type TextUnmarshaler encoding.TextUnmarshaler
diff --git a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go b/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go
deleted file mode 100644
index e8d503d04..000000000
--- a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// +build !go1.2
-
-package toml
-
-// These interfaces were introduced in Go 1.2, so we add them manually when
-// compiling for Go 1.1.
-
-// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here
-// so that Go 1.1 can be supported.
-type TextMarshaler interface {
- MarshalText() (text []byte, err error)
-}
-
-// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined
-// here so that Go 1.1 can be supported.
-type TextUnmarshaler interface {
- UnmarshalText(text []byte) error
-}
diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go
deleted file mode 100644
index e0a742a88..000000000
--- a/vendor/github.com/BurntSushi/toml/lex.go
+++ /dev/null
@@ -1,953 +0,0 @@
-package toml
-
-import (
- "fmt"
- "strings"
- "unicode"
- "unicode/utf8"
-)
-
-type itemType int
-
-const (
- itemError itemType = iota
- itemNIL // used in the parser to indicate no type
- itemEOF
- itemText
- itemString
- itemRawString
- itemMultilineString
- itemRawMultilineString
- itemBool
- itemInteger
- itemFloat
- itemDatetime
- itemArray // the start of an array
- itemArrayEnd
- itemTableStart
- itemTableEnd
- itemArrayTableStart
- itemArrayTableEnd
- itemKeyStart
- itemCommentStart
- itemInlineTableStart
- itemInlineTableEnd
-)
-
-const (
- eof = 0
- comma = ','
- tableStart = '['
- tableEnd = ']'
- arrayTableStart = '['
- arrayTableEnd = ']'
- tableSep = '.'
- keySep = '='
- arrayStart = '['
- arrayEnd = ']'
- commentStart = '#'
- stringStart = '"'
- stringEnd = '"'
- rawStringStart = '\''
- rawStringEnd = '\''
- inlineTableStart = '{'
- inlineTableEnd = '}'
-)
-
-type stateFn func(lx *lexer) stateFn
-
-type lexer struct {
- input string
- start int
- pos int
- line int
- state stateFn
- items chan item
-
- // Allow for backing up up to three runes.
- // This is necessary because TOML contains 3-rune tokens (""" and ''').
- prevWidths [3]int
- nprev int // how many of prevWidths are in use
- // If we emit an eof, we can still back up, but it is not OK to call
- // next again.
- atEOF bool
-
- // A stack of state functions used to maintain context.
- // The idea is to reuse parts of the state machine in various places.
- // For example, values can appear at the top level or within arbitrarily
- // nested arrays. The last state on the stack is used after a value has
- // been lexed. Similarly for comments.
- stack []stateFn
-}
-
-type item struct {
- typ itemType
- val string
- line int
-}
-
-func (lx *lexer) nextItem() item {
- for {
- select {
- case item := <-lx.items:
- return item
- default:
- lx.state = lx.state(lx)
- }
- }
-}
-
-func lex(input string) *lexer {
- lx := &lexer{
- input: input,
- state: lexTop,
- line: 1,
- items: make(chan item, 10),
- stack: make([]stateFn, 0, 10),
- }
- return lx
-}
-
-func (lx *lexer) push(state stateFn) {
- lx.stack = append(lx.stack, state)
-}
-
-func (lx *lexer) pop() stateFn {
- if len(lx.stack) == 0 {
- return lx.errorf("BUG in lexer: no states to pop")
- }
- last := lx.stack[len(lx.stack)-1]
- lx.stack = lx.stack[0 : len(lx.stack)-1]
- return last
-}
-
-func (lx *lexer) current() string {
- return lx.input[lx.start:lx.pos]
-}
-
-func (lx *lexer) emit(typ itemType) {
- lx.items <- item{typ, lx.current(), lx.line}
- lx.start = lx.pos
-}
-
-func (lx *lexer) emitTrim(typ itemType) {
- lx.items <- item{typ, strings.TrimSpace(lx.current()), lx.line}
- lx.start = lx.pos
-}
-
-func (lx *lexer) next() (r rune) {
- if lx.atEOF {
- panic("next called after EOF")
- }
- if lx.pos >= len(lx.input) {
- lx.atEOF = true
- return eof
- }
-
- if lx.input[lx.pos] == '\n' {
- lx.line++
- }
- lx.prevWidths[2] = lx.prevWidths[1]
- lx.prevWidths[1] = lx.prevWidths[0]
- if lx.nprev < 3 {
- lx.nprev++
- }
- r, w := utf8.DecodeRuneInString(lx.input[lx.pos:])
- lx.prevWidths[0] = w
- lx.pos += w
- return r
-}
-
-// ignore skips over the pending input before this point.
-func (lx *lexer) ignore() {
- lx.start = lx.pos
-}
-
-// backup steps back one rune. Can be called only twice between calls to next.
-func (lx *lexer) backup() {
- if lx.atEOF {
- lx.atEOF = false
- return
- }
- if lx.nprev < 1 {
- panic("backed up too far")
- }
- w := lx.prevWidths[0]
- lx.prevWidths[0] = lx.prevWidths[1]
- lx.prevWidths[1] = lx.prevWidths[2]
- lx.nprev--
- lx.pos -= w
- if lx.pos < len(lx.input) && lx.input[lx.pos] == '\n' {
- lx.line--
- }
-}
-
-// accept consumes the next rune if it's equal to `valid`.
-func (lx *lexer) accept(valid rune) bool {
- if lx.next() == valid {
- return true
- }
- lx.backup()
- return false
-}
-
-// peek returns but does not consume the next rune in the input.
-func (lx *lexer) peek() rune {
- r := lx.next()
- lx.backup()
- return r
-}
-
-// skip ignores all input that matches the given predicate.
-func (lx *lexer) skip(pred func(rune) bool) {
- for {
- r := lx.next()
- if pred(r) {
- continue
- }
- lx.backup()
- lx.ignore()
- return
- }
-}
-
-// errorf stops all lexing by emitting an error and returning `nil`.
-// Note that any value that is a character is escaped if it's a special
-// character (newlines, tabs, etc.).
-func (lx *lexer) errorf(format string, values ...interface{}) stateFn {
- lx.items <- item{
- itemError,
- fmt.Sprintf(format, values...),
- lx.line,
- }
- return nil
-}
-
-// lexTop consumes elements at the top level of TOML data.
-func lexTop(lx *lexer) stateFn {
- r := lx.next()
- if isWhitespace(r) || isNL(r) {
- return lexSkip(lx, lexTop)
- }
- switch r {
- case commentStart:
- lx.push(lexTop)
- return lexCommentStart
- case tableStart:
- return lexTableStart
- case eof:
- if lx.pos > lx.start {
- return lx.errorf("unexpected EOF")
- }
- lx.emit(itemEOF)
- return nil
- }
-
- // At this point, the only valid item can be a key, so we back up
- // and let the key lexer do the rest.
- lx.backup()
- lx.push(lexTopEnd)
- return lexKeyStart
-}
-
-// lexTopEnd is entered whenever a top-level item has been consumed. (A value
-// or a table.) It must see only whitespace, and will turn back to lexTop
-// upon a newline. If it sees EOF, it will quit the lexer successfully.
-func lexTopEnd(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case r == commentStart:
- // a comment will read to a newline for us.
- lx.push(lexTop)
- return lexCommentStart
- case isWhitespace(r):
- return lexTopEnd
- case isNL(r):
- lx.ignore()
- return lexTop
- case r == eof:
- lx.emit(itemEOF)
- return nil
- }
- return lx.errorf("expected a top-level item to end with a newline, "+
- "comment, or EOF, but got %q instead", r)
-}
-
-// lexTable lexes the beginning of a table. Namely, it makes sure that
-// it starts with a character other than '.' and ']'.
-// It assumes that '[' has already been consumed.
-// It also handles the case that this is an item in an array of tables.
-// e.g., '[[name]]'.
-func lexTableStart(lx *lexer) stateFn {
- if lx.peek() == arrayTableStart {
- lx.next()
- lx.emit(itemArrayTableStart)
- lx.push(lexArrayTableEnd)
- } else {
- lx.emit(itemTableStart)
- lx.push(lexTableEnd)
- }
- return lexTableNameStart
-}
-
-func lexTableEnd(lx *lexer) stateFn {
- lx.emit(itemTableEnd)
- return lexTopEnd
-}
-
-func lexArrayTableEnd(lx *lexer) stateFn {
- if r := lx.next(); r != arrayTableEnd {
- return lx.errorf("expected end of table array name delimiter %q, "+
- "but got %q instead", arrayTableEnd, r)
- }
- lx.emit(itemArrayTableEnd)
- return lexTopEnd
-}
-
-func lexTableNameStart(lx *lexer) stateFn {
- lx.skip(isWhitespace)
- switch r := lx.peek(); {
- case r == tableEnd || r == eof:
- return lx.errorf("unexpected end of table name " +
- "(table names cannot be empty)")
- case r == tableSep:
- return lx.errorf("unexpected table separator " +
- "(table names cannot be empty)")
- case r == stringStart || r == rawStringStart:
- lx.ignore()
- lx.push(lexTableNameEnd)
- return lexValue // reuse string lexing
- default:
- return lexBareTableName
- }
-}
-
-// lexBareTableName lexes the name of a table. It assumes that at least one
-// valid character for the table has already been read.
-func lexBareTableName(lx *lexer) stateFn {
- r := lx.next()
- if isBareKeyChar(r) {
- return lexBareTableName
- }
- lx.backup()
- lx.emit(itemText)
- return lexTableNameEnd
-}
-
-// lexTableNameEnd reads the end of a piece of a table name, optionally
-// consuming whitespace.
-func lexTableNameEnd(lx *lexer) stateFn {
- lx.skip(isWhitespace)
- switch r := lx.next(); {
- case isWhitespace(r):
- return lexTableNameEnd
- case r == tableSep:
- lx.ignore()
- return lexTableNameStart
- case r == tableEnd:
- return lx.pop()
- default:
- return lx.errorf("expected '.' or ']' to end table name, "+
- "but got %q instead", r)
- }
-}
-
-// lexKeyStart consumes a key name up until the first non-whitespace character.
-// lexKeyStart will ignore whitespace.
-func lexKeyStart(lx *lexer) stateFn {
- r := lx.peek()
- switch {
- case r == keySep:
- return lx.errorf("unexpected key separator %q", keySep)
- case isWhitespace(r) || isNL(r):
- lx.next()
- return lexSkip(lx, lexKeyStart)
- case r == stringStart || r == rawStringStart:
- lx.ignore()
- lx.emit(itemKeyStart)
- lx.push(lexKeyEnd)
- return lexValue // reuse string lexing
- default:
- lx.ignore()
- lx.emit(itemKeyStart)
- return lexBareKey
- }
-}
-
-// lexBareKey consumes the text of a bare key. Assumes that the first character
-// (which is not whitespace) has not yet been consumed.
-func lexBareKey(lx *lexer) stateFn {
- switch r := lx.next(); {
- case isBareKeyChar(r):
- return lexBareKey
- case isWhitespace(r):
- lx.backup()
- lx.emit(itemText)
- return lexKeyEnd
- case r == keySep:
- lx.backup()
- lx.emit(itemText)
- return lexKeyEnd
- default:
- return lx.errorf("bare keys cannot contain %q", r)
- }
-}
-
-// lexKeyEnd consumes the end of a key and trims whitespace (up to the key
-// separator).
-func lexKeyEnd(lx *lexer) stateFn {
- switch r := lx.next(); {
- case r == keySep:
- return lexSkip(lx, lexValue)
- case isWhitespace(r):
- return lexSkip(lx, lexKeyEnd)
- default:
- return lx.errorf("expected key separator %q, but got %q instead",
- keySep, r)
- }
-}
-
-// lexValue starts the consumption of a value anywhere a value is expected.
-// lexValue will ignore whitespace.
-// After a value is lexed, the last state on the next is popped and returned.
-func lexValue(lx *lexer) stateFn {
- // We allow whitespace to precede a value, but NOT newlines.
- // In array syntax, the array states are responsible for ignoring newlines.
- r := lx.next()
- switch {
- case isWhitespace(r):
- return lexSkip(lx, lexValue)
- case isDigit(r):
- lx.backup() // avoid an extra state and use the same as above
- return lexNumberOrDateStart
- }
- switch r {
- case arrayStart:
- lx.ignore()
- lx.emit(itemArray)
- return lexArrayValue
- case inlineTableStart:
- lx.ignore()
- lx.emit(itemInlineTableStart)
- return lexInlineTableValue
- case stringStart:
- if lx.accept(stringStart) {
- if lx.accept(stringStart) {
- lx.ignore() // Ignore """
- return lexMultilineString
- }
- lx.backup()
- }
- lx.ignore() // ignore the '"'
- return lexString
- case rawStringStart:
- if lx.accept(rawStringStart) {
- if lx.accept(rawStringStart) {
- lx.ignore() // Ignore """
- return lexMultilineRawString
- }
- lx.backup()
- }
- lx.ignore() // ignore the "'"
- return lexRawString
- case '+', '-':
- return lexNumberStart
- case '.': // special error case, be kind to users
- return lx.errorf("floats must start with a digit, not '.'")
- }
- if unicode.IsLetter(r) {
- // Be permissive here; lexBool will give a nice error if the
- // user wrote something like
- // x = foo
- // (i.e. not 'true' or 'false' but is something else word-like.)
- lx.backup()
- return lexBool
- }
- return lx.errorf("expected value but found %q instead", r)
-}
-
-// lexArrayValue consumes one value in an array. It assumes that '[' or ','
-// have already been consumed. All whitespace and newlines are ignored.
-func lexArrayValue(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case isWhitespace(r) || isNL(r):
- return lexSkip(lx, lexArrayValue)
- case r == commentStart:
- lx.push(lexArrayValue)
- return lexCommentStart
- case r == comma:
- return lx.errorf("unexpected comma")
- case r == arrayEnd:
- // NOTE(caleb): The spec isn't clear about whether you can have
- // a trailing comma or not, so we'll allow it.
- return lexArrayEnd
- }
-
- lx.backup()
- lx.push(lexArrayValueEnd)
- return lexValue
-}
-
-// lexArrayValueEnd consumes everything between the end of an array value and
-// the next value (or the end of the array): it ignores whitespace and newlines
-// and expects either a ',' or a ']'.
-func lexArrayValueEnd(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case isWhitespace(r) || isNL(r):
- return lexSkip(lx, lexArrayValueEnd)
- case r == commentStart:
- lx.push(lexArrayValueEnd)
- return lexCommentStart
- case r == comma:
- lx.ignore()
- return lexArrayValue // move on to the next value
- case r == arrayEnd:
- return lexArrayEnd
- }
- return lx.errorf(
- "expected a comma or array terminator %q, but got %q instead",
- arrayEnd, r,
- )
-}
-
-// lexArrayEnd finishes the lexing of an array.
-// It assumes that a ']' has just been consumed.
-func lexArrayEnd(lx *lexer) stateFn {
- lx.ignore()
- lx.emit(itemArrayEnd)
- return lx.pop()
-}
-
-// lexInlineTableValue consumes one key/value pair in an inline table.
-// It assumes that '{' or ',' have already been consumed. Whitespace is ignored.
-func lexInlineTableValue(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case isWhitespace(r):
- return lexSkip(lx, lexInlineTableValue)
- case isNL(r):
- return lx.errorf("newlines not allowed within inline tables")
- case r == commentStart:
- lx.push(lexInlineTableValue)
- return lexCommentStart
- case r == comma:
- return lx.errorf("unexpected comma")
- case r == inlineTableEnd:
- return lexInlineTableEnd
- }
- lx.backup()
- lx.push(lexInlineTableValueEnd)
- return lexKeyStart
-}
-
-// lexInlineTableValueEnd consumes everything between the end of an inline table
-// key/value pair and the next pair (or the end of the table):
-// it ignores whitespace and expects either a ',' or a '}'.
-func lexInlineTableValueEnd(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case isWhitespace(r):
- return lexSkip(lx, lexInlineTableValueEnd)
- case isNL(r):
- return lx.errorf("newlines not allowed within inline tables")
- case r == commentStart:
- lx.push(lexInlineTableValueEnd)
- return lexCommentStart
- case r == comma:
- lx.ignore()
- return lexInlineTableValue
- case r == inlineTableEnd:
- return lexInlineTableEnd
- }
- return lx.errorf("expected a comma or an inline table terminator %q, "+
- "but got %q instead", inlineTableEnd, r)
-}
-
-// lexInlineTableEnd finishes the lexing of an inline table.
-// It assumes that a '}' has just been consumed.
-func lexInlineTableEnd(lx *lexer) stateFn {
- lx.ignore()
- lx.emit(itemInlineTableEnd)
- return lx.pop()
-}
-
-// lexString consumes the inner contents of a string. It assumes that the
-// beginning '"' has already been consumed and ignored.
-func lexString(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case r == eof:
- return lx.errorf("unexpected EOF")
- case isNL(r):
- return lx.errorf("strings cannot contain newlines")
- case r == '\\':
- lx.push(lexString)
- return lexStringEscape
- case r == stringEnd:
- lx.backup()
- lx.emit(itemString)
- lx.next()
- lx.ignore()
- return lx.pop()
- }
- return lexString
-}
-
-// lexMultilineString consumes the inner contents of a string. It assumes that
-// the beginning '"""' has already been consumed and ignored.
-func lexMultilineString(lx *lexer) stateFn {
- switch lx.next() {
- case eof:
- return lx.errorf("unexpected EOF")
- case '\\':
- return lexMultilineStringEscape
- case stringEnd:
- if lx.accept(stringEnd) {
- if lx.accept(stringEnd) {
- lx.backup()
- lx.backup()
- lx.backup()
- lx.emit(itemMultilineString)
- lx.next()
- lx.next()
- lx.next()
- lx.ignore()
- return lx.pop()
- }
- lx.backup()
- }
- }
- return lexMultilineString
-}
-
-// lexRawString consumes a raw string. Nothing can be escaped in such a string.
-// It assumes that the beginning "'" has already been consumed and ignored.
-func lexRawString(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case r == eof:
- return lx.errorf("unexpected EOF")
- case isNL(r):
- return lx.errorf("strings cannot contain newlines")
- case r == rawStringEnd:
- lx.backup()
- lx.emit(itemRawString)
- lx.next()
- lx.ignore()
- return lx.pop()
- }
- return lexRawString
-}
-
-// lexMultilineRawString consumes a raw string. Nothing can be escaped in such
-// a string. It assumes that the beginning "'''" has already been consumed and
-// ignored.
-func lexMultilineRawString(lx *lexer) stateFn {
- switch lx.next() {
- case eof:
- return lx.errorf("unexpected EOF")
- case rawStringEnd:
- if lx.accept(rawStringEnd) {
- if lx.accept(rawStringEnd) {
- lx.backup()
- lx.backup()
- lx.backup()
- lx.emit(itemRawMultilineString)
- lx.next()
- lx.next()
- lx.next()
- lx.ignore()
- return lx.pop()
- }
- lx.backup()
- }
- }
- return lexMultilineRawString
-}
-
-// lexMultilineStringEscape consumes an escaped character. It assumes that the
-// preceding '\\' has already been consumed.
-func lexMultilineStringEscape(lx *lexer) stateFn {
- // Handle the special case first:
- if isNL(lx.next()) {
- return lexMultilineString
- }
- lx.backup()
- lx.push(lexMultilineString)
- return lexStringEscape(lx)
-}
-
-func lexStringEscape(lx *lexer) stateFn {
- r := lx.next()
- switch r {
- case 'b':
- fallthrough
- case 't':
- fallthrough
- case 'n':
- fallthrough
- case 'f':
- fallthrough
- case 'r':
- fallthrough
- case '"':
- fallthrough
- case '\\':
- return lx.pop()
- case 'u':
- return lexShortUnicodeEscape
- case 'U':
- return lexLongUnicodeEscape
- }
- return lx.errorf("invalid escape character %q; only the following "+
- "escape characters are allowed: "+
- `\b, \t, \n, \f, \r, \", \\, \uXXXX, and \UXXXXXXXX`, r)
-}
-
-func lexShortUnicodeEscape(lx *lexer) stateFn {
- var r rune
- for i := 0; i < 4; i++ {
- r = lx.next()
- if !isHexadecimal(r) {
- return lx.errorf(`expected four hexadecimal digits after '\u', `+
- "but got %q instead", lx.current())
- }
- }
- return lx.pop()
-}
-
-func lexLongUnicodeEscape(lx *lexer) stateFn {
- var r rune
- for i := 0; i < 8; i++ {
- r = lx.next()
- if !isHexadecimal(r) {
- return lx.errorf(`expected eight hexadecimal digits after '\U', `+
- "but got %q instead", lx.current())
- }
- }
- return lx.pop()
-}
-
-// lexNumberOrDateStart consumes either an integer, a float, or datetime.
-func lexNumberOrDateStart(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexNumberOrDate
- }
- switch r {
- case '_':
- return lexNumber
- case 'e', 'E':
- return lexFloat
- case '.':
- return lx.errorf("floats must start with a digit, not '.'")
- }
- return lx.errorf("expected a digit but got %q", r)
-}
-
-// lexNumberOrDate consumes either an integer, float or datetime.
-func lexNumberOrDate(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexNumberOrDate
- }
- switch r {
- case '-':
- return lexDatetime
- case '_':
- return lexNumber
- case '.', 'e', 'E':
- return lexFloat
- }
-
- lx.backup()
- lx.emit(itemInteger)
- return lx.pop()
-}
-
-// lexDatetime consumes a Datetime, to a first approximation.
-// The parser validates that it matches one of the accepted formats.
-func lexDatetime(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexDatetime
- }
- switch r {
- case '-', 'T', ':', '.', 'Z', '+':
- return lexDatetime
- }
-
- lx.backup()
- lx.emit(itemDatetime)
- return lx.pop()
-}
-
-// lexNumberStart consumes either an integer or a float. It assumes that a sign
-// has already been read, but that *no* digits have been consumed.
-// lexNumberStart will move to the appropriate integer or float states.
-func lexNumberStart(lx *lexer) stateFn {
- // We MUST see a digit. Even floats have to start with a digit.
- r := lx.next()
- if !isDigit(r) {
- if r == '.' {
- return lx.errorf("floats must start with a digit, not '.'")
- }
- return lx.errorf("expected a digit but got %q", r)
- }
- return lexNumber
-}
-
-// lexNumber consumes an integer or a float after seeing the first digit.
-func lexNumber(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexNumber
- }
- switch r {
- case '_':
- return lexNumber
- case '.', 'e', 'E':
- return lexFloat
- }
-
- lx.backup()
- lx.emit(itemInteger)
- return lx.pop()
-}
-
-// lexFloat consumes the elements of a float. It allows any sequence of
-// float-like characters, so floats emitted by the lexer are only a first
-// approximation and must be validated by the parser.
-func lexFloat(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexFloat
- }
- switch r {
- case '_', '.', '-', '+', 'e', 'E':
- return lexFloat
- }
-
- lx.backup()
- lx.emit(itemFloat)
- return lx.pop()
-}
-
-// lexBool consumes a bool string: 'true' or 'false.
-func lexBool(lx *lexer) stateFn {
- var rs []rune
- for {
- r := lx.next()
- if !unicode.IsLetter(r) {
- lx.backup()
- break
- }
- rs = append(rs, r)
- }
- s := string(rs)
- switch s {
- case "true", "false":
- lx.emit(itemBool)
- return lx.pop()
- }
- return lx.errorf("expected value but found %q instead", s)
-}
-
-// lexCommentStart begins the lexing of a comment. It will emit
-// itemCommentStart and consume no characters, passing control to lexComment.
-func lexCommentStart(lx *lexer) stateFn {
- lx.ignore()
- lx.emit(itemCommentStart)
- return lexComment
-}
-
-// lexComment lexes an entire comment. It assumes that '#' has been consumed.
-// It will consume *up to* the first newline character, and pass control
-// back to the last state on the stack.
-func lexComment(lx *lexer) stateFn {
- r := lx.peek()
- if isNL(r) || r == eof {
- lx.emit(itemText)
- return lx.pop()
- }
- lx.next()
- return lexComment
-}
-
-// lexSkip ignores all slurped input and moves on to the next state.
-func lexSkip(lx *lexer, nextState stateFn) stateFn {
- return func(lx *lexer) stateFn {
- lx.ignore()
- return nextState
- }
-}
-
-// isWhitespace returns true if `r` is a whitespace character according
-// to the spec.
-func isWhitespace(r rune) bool {
- return r == '\t' || r == ' '
-}
-
-func isNL(r rune) bool {
- return r == '\n' || r == '\r'
-}
-
-func isDigit(r rune) bool {
- return r >= '0' && r <= '9'
-}
-
-func isHexadecimal(r rune) bool {
- return (r >= '0' && r <= '9') ||
- (r >= 'a' && r <= 'f') ||
- (r >= 'A' && r <= 'F')
-}
-
-func isBareKeyChar(r rune) bool {
- return (r >= 'A' && r <= 'Z') ||
- (r >= 'a' && r <= 'z') ||
- (r >= '0' && r <= '9') ||
- r == '_' ||
- r == '-'
-}
-
-func (itype itemType) String() string {
- switch itype {
- case itemError:
- return "Error"
- case itemNIL:
- return "NIL"
- case itemEOF:
- return "EOF"
- case itemText:
- return "Text"
- case itemString, itemRawString, itemMultilineString, itemRawMultilineString:
- return "String"
- case itemBool:
- return "Bool"
- case itemInteger:
- return "Integer"
- case itemFloat:
- return "Float"
- case itemDatetime:
- return "DateTime"
- case itemTableStart:
- return "TableStart"
- case itemTableEnd:
- return "TableEnd"
- case itemKeyStart:
- return "KeyStart"
- case itemArray:
- return "Array"
- case itemArrayEnd:
- return "ArrayEnd"
- case itemCommentStart:
- return "CommentStart"
- }
- panic(fmt.Sprintf("BUG: Unknown type '%d'.", int(itype)))
-}
-
-func (item item) String() string {
- return fmt.Sprintf("(%s, %s)", item.typ.String(), item.val)
-}
diff --git a/vendor/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go
deleted file mode 100644
index 50869ef92..000000000
--- a/vendor/github.com/BurntSushi/toml/parse.go
+++ /dev/null
@@ -1,592 +0,0 @@
-package toml
-
-import (
- "fmt"
- "strconv"
- "strings"
- "time"
- "unicode"
- "unicode/utf8"
-)
-
-type parser struct {
- mapping map[string]interface{}
- types map[string]tomlType
- lx *lexer
-
- // A list of keys in the order that they appear in the TOML data.
- ordered []Key
-
- // the full key for the current hash in scope
- context Key
-
- // the base key name for everything except hashes
- currentKey string
-
- // rough approximation of line number
- approxLine int
-
- // A map of 'key.group.names' to whether they were created implicitly.
- implicits map[string]bool
-}
-
-type parseError string
-
-func (pe parseError) Error() string {
- return string(pe)
-}
-
-func parse(data string) (p *parser, err error) {
- defer func() {
- if r := recover(); r != nil {
- var ok bool
- if err, ok = r.(parseError); ok {
- return
- }
- panic(r)
- }
- }()
-
- p = &parser{
- mapping: make(map[string]interface{}),
- types: make(map[string]tomlType),
- lx: lex(data),
- ordered: make([]Key, 0),
- implicits: make(map[string]bool),
- }
- for {
- item := p.next()
- if item.typ == itemEOF {
- break
- }
- p.topLevel(item)
- }
-
- return p, nil
-}
-
-func (p *parser) panicf(format string, v ...interface{}) {
- msg := fmt.Sprintf("Near line %d (last key parsed '%s'): %s",
- p.approxLine, p.current(), fmt.Sprintf(format, v...))
- panic(parseError(msg))
-}
-
-func (p *parser) next() item {
- it := p.lx.nextItem()
- if it.typ == itemError {
- p.panicf("%s", it.val)
- }
- return it
-}
-
-func (p *parser) bug(format string, v ...interface{}) {
- panic(fmt.Sprintf("BUG: "+format+"\n\n", v...))
-}
-
-func (p *parser) expect(typ itemType) item {
- it := p.next()
- p.assertEqual(typ, it.typ)
- return it
-}
-
-func (p *parser) assertEqual(expected, got itemType) {
- if expected != got {
- p.bug("Expected '%s' but got '%s'.", expected, got)
- }
-}
-
-func (p *parser) topLevel(item item) {
- switch item.typ {
- case itemCommentStart:
- p.approxLine = item.line
- p.expect(itemText)
- case itemTableStart:
- kg := p.next()
- p.approxLine = kg.line
-
- var key Key
- for ; kg.typ != itemTableEnd && kg.typ != itemEOF; kg = p.next() {
- key = append(key, p.keyString(kg))
- }
- p.assertEqual(itemTableEnd, kg.typ)
-
- p.establishContext(key, false)
- p.setType("", tomlHash)
- p.ordered = append(p.ordered, key)
- case itemArrayTableStart:
- kg := p.next()
- p.approxLine = kg.line
-
- var key Key
- for ; kg.typ != itemArrayTableEnd && kg.typ != itemEOF; kg = p.next() {
- key = append(key, p.keyString(kg))
- }
- p.assertEqual(itemArrayTableEnd, kg.typ)
-
- p.establishContext(key, true)
- p.setType("", tomlArrayHash)
- p.ordered = append(p.ordered, key)
- case itemKeyStart:
- kname := p.next()
- p.approxLine = kname.line
- p.currentKey = p.keyString(kname)
-
- val, typ := p.value(p.next())
- p.setValue(p.currentKey, val)
- p.setType(p.currentKey, typ)
- p.ordered = append(p.ordered, p.context.add(p.currentKey))
- p.currentKey = ""
- default:
- p.bug("Unexpected type at top level: %s", item.typ)
- }
-}
-
-// Gets a string for a key (or part of a key in a table name).
-func (p *parser) keyString(it item) string {
- switch it.typ {
- case itemText:
- return it.val
- case itemString, itemMultilineString,
- itemRawString, itemRawMultilineString:
- s, _ := p.value(it)
- return s.(string)
- default:
- p.bug("Unexpected key type: %s", it.typ)
- panic("unreachable")
- }
-}
-
-// value translates an expected value from the lexer into a Go value wrapped
-// as an empty interface.
-func (p *parser) value(it item) (interface{}, tomlType) {
- switch it.typ {
- case itemString:
- return p.replaceEscapes(it.val), p.typeOfPrimitive(it)
- case itemMultilineString:
- trimmed := stripFirstNewline(stripEscapedWhitespace(it.val))
- return p.replaceEscapes(trimmed), p.typeOfPrimitive(it)
- case itemRawString:
- return it.val, p.typeOfPrimitive(it)
- case itemRawMultilineString:
- return stripFirstNewline(it.val), p.typeOfPrimitive(it)
- case itemBool:
- switch it.val {
- case "true":
- return true, p.typeOfPrimitive(it)
- case "false":
- return false, p.typeOfPrimitive(it)
- }
- p.bug("Expected boolean value, but got '%s'.", it.val)
- case itemInteger:
- if !numUnderscoresOK(it.val) {
- p.panicf("Invalid integer %q: underscores must be surrounded by digits",
- it.val)
- }
- val := strings.Replace(it.val, "_", "", -1)
- num, err := strconv.ParseInt(val, 10, 64)
- if err != nil {
- // Distinguish integer values. Normally, it'd be a bug if the lexer
- // provides an invalid integer, but it's possible that the number is
- // out of range of valid values (which the lexer cannot determine).
- // So mark the former as a bug but the latter as a legitimate user
- // error.
- if e, ok := err.(*strconv.NumError); ok &&
- e.Err == strconv.ErrRange {
-
- p.panicf("Integer '%s' is out of the range of 64-bit "+
- "signed integers.", it.val)
- } else {
- p.bug("Expected integer value, but got '%s'.", it.val)
- }
- }
- return num, p.typeOfPrimitive(it)
- case itemFloat:
- parts := strings.FieldsFunc(it.val, func(r rune) bool {
- switch r {
- case '.', 'e', 'E':
- return true
- }
- return false
- })
- for _, part := range parts {
- if !numUnderscoresOK(part) {
- p.panicf("Invalid float %q: underscores must be "+
- "surrounded by digits", it.val)
- }
- }
- if !numPeriodsOK(it.val) {
- // As a special case, numbers like '123.' or '1.e2',
- // which are valid as far as Go/strconv are concerned,
- // must be rejected because TOML says that a fractional
- // part consists of '.' followed by 1+ digits.
- p.panicf("Invalid float %q: '.' must be followed "+
- "by one or more digits", it.val)
- }
- val := strings.Replace(it.val, "_", "", -1)
- num, err := strconv.ParseFloat(val, 64)
- if err != nil {
- if e, ok := err.(*strconv.NumError); ok &&
- e.Err == strconv.ErrRange {
-
- p.panicf("Float '%s' is out of the range of 64-bit "+
- "IEEE-754 floating-point numbers.", it.val)
- } else {
- p.panicf("Invalid float value: %q", it.val)
- }
- }
- return num, p.typeOfPrimitive(it)
- case itemDatetime:
- var t time.Time
- var ok bool
- var err error
- for _, format := range []string{
- "2006-01-02T15:04:05Z07:00",
- "2006-01-02T15:04:05",
- "2006-01-02",
- } {
- t, err = time.ParseInLocation(format, it.val, time.Local)
- if err == nil {
- ok = true
- break
- }
- }
- if !ok {
- p.panicf("Invalid TOML Datetime: %q.", it.val)
- }
- return t, p.typeOfPrimitive(it)
- case itemArray:
- array := make([]interface{}, 0)
- types := make([]tomlType, 0)
-
- for it = p.next(); it.typ != itemArrayEnd; it = p.next() {
- if it.typ == itemCommentStart {
- p.expect(itemText)
- continue
- }
-
- val, typ := p.value(it)
- array = append(array, val)
- types = append(types, typ)
- }
- return array, p.typeOfArray(types)
- case itemInlineTableStart:
- var (
- hash = make(map[string]interface{})
- outerContext = p.context
- outerKey = p.currentKey
- )
-
- p.context = append(p.context, p.currentKey)
- p.currentKey = ""
- for it := p.next(); it.typ != itemInlineTableEnd; it = p.next() {
- if it.typ != itemKeyStart {
- p.bug("Expected key start but instead found %q, around line %d",
- it.val, p.approxLine)
- }
- if it.typ == itemCommentStart {
- p.expect(itemText)
- continue
- }
-
- // retrieve key
- k := p.next()
- p.approxLine = k.line
- kname := p.keyString(k)
-
- // retrieve value
- p.currentKey = kname
- val, typ := p.value(p.next())
- // make sure we keep metadata up to date
- p.setType(kname, typ)
- p.ordered = append(p.ordered, p.context.add(p.currentKey))
- hash[kname] = val
- }
- p.context = outerContext
- p.currentKey = outerKey
- return hash, tomlHash
- }
- p.bug("Unexpected value type: %s", it.typ)
- panic("unreachable")
-}
-
-// numUnderscoresOK checks whether each underscore in s is surrounded by
-// characters that are not underscores.
-func numUnderscoresOK(s string) bool {
- accept := false
- for _, r := range s {
- if r == '_' {
- if !accept {
- return false
- }
- accept = false
- continue
- }
- accept = true
- }
- return accept
-}
-
-// numPeriodsOK checks whether every period in s is followed by a digit.
-func numPeriodsOK(s string) bool {
- period := false
- for _, r := range s {
- if period && !isDigit(r) {
- return false
- }
- period = r == '.'
- }
- return !period
-}
-
-// establishContext sets the current context of the parser,
-// where the context is either a hash or an array of hashes. Which one is
-// set depends on the value of the `array` parameter.
-//
-// Establishing the context also makes sure that the key isn't a duplicate, and
-// will create implicit hashes automatically.
-func (p *parser) establishContext(key Key, array bool) {
- var ok bool
-
- // Always start at the top level and drill down for our context.
- hashContext := p.mapping
- keyContext := make(Key, 0)
-
- // We only need implicit hashes for key[0:-1]
- for _, k := range key[0 : len(key)-1] {
- _, ok = hashContext[k]
- keyContext = append(keyContext, k)
-
- // No key? Make an implicit hash and move on.
- if !ok {
- p.addImplicit(keyContext)
- hashContext[k] = make(map[string]interface{})
- }
-
- // If the hash context is actually an array of tables, then set
- // the hash context to the last element in that array.
- //
- // Otherwise, it better be a table, since this MUST be a key group (by
- // virtue of it not being the last element in a key).
- switch t := hashContext[k].(type) {
- case []map[string]interface{}:
- hashContext = t[len(t)-1]
- case map[string]interface{}:
- hashContext = t
- default:
- p.panicf("Key '%s' was already created as a hash.", keyContext)
- }
- }
-
- p.context = keyContext
- if array {
- // If this is the first element for this array, then allocate a new
- // list of tables for it.
- k := key[len(key)-1]
- if _, ok := hashContext[k]; !ok {
- hashContext[k] = make([]map[string]interface{}, 0, 5)
- }
-
- // Add a new table. But make sure the key hasn't already been used
- // for something else.
- if hash, ok := hashContext[k].([]map[string]interface{}); ok {
- hashContext[k] = append(hash, make(map[string]interface{}))
- } else {
- p.panicf("Key '%s' was already created and cannot be used as "+
- "an array.", keyContext)
- }
- } else {
- p.setValue(key[len(key)-1], make(map[string]interface{}))
- }
- p.context = append(p.context, key[len(key)-1])
-}
-
-// setValue sets the given key to the given value in the current context.
-// It will make sure that the key hasn't already been defined, account for
-// implicit key groups.
-func (p *parser) setValue(key string, value interface{}) {
- var tmpHash interface{}
- var ok bool
-
- hash := p.mapping
- keyContext := make(Key, 0)
- for _, k := range p.context {
- keyContext = append(keyContext, k)
- if tmpHash, ok = hash[k]; !ok {
- p.bug("Context for key '%s' has not been established.", keyContext)
- }
- switch t := tmpHash.(type) {
- case []map[string]interface{}:
- // The context is a table of hashes. Pick the most recent table
- // defined as the current hash.
- hash = t[len(t)-1]
- case map[string]interface{}:
- hash = t
- default:
- p.bug("Expected hash to have type 'map[string]interface{}', but "+
- "it has '%T' instead.", tmpHash)
- }
- }
- keyContext = append(keyContext, key)
-
- if _, ok := hash[key]; ok {
- // Typically, if the given key has already been set, then we have
- // to raise an error since duplicate keys are disallowed. However,
- // it's possible that a key was previously defined implicitly. In this
- // case, it is allowed to be redefined concretely. (See the
- // `tests/valid/implicit-and-explicit-after.toml` test in `toml-test`.)
- //
- // But we have to make sure to stop marking it as an implicit. (So that
- // another redefinition provokes an error.)
- //
- // Note that since it has already been defined (as a hash), we don't
- // want to overwrite it. So our business is done.
- if p.isImplicit(keyContext) {
- p.removeImplicit(keyContext)
- return
- }
-
- // Otherwise, we have a concrete key trying to override a previous
- // key, which is *always* wrong.
- p.panicf("Key '%s' has already been defined.", keyContext)
- }
- hash[key] = value
-}
-
-// setType sets the type of a particular value at a given key.
-// It should be called immediately AFTER setValue.
-//
-// Note that if `key` is empty, then the type given will be applied to the
-// current context (which is either a table or an array of tables).
-func (p *parser) setType(key string, typ tomlType) {
- keyContext := make(Key, 0, len(p.context)+1)
- for _, k := range p.context {
- keyContext = append(keyContext, k)
- }
- if len(key) > 0 { // allow type setting for hashes
- keyContext = append(keyContext, key)
- }
- p.types[keyContext.String()] = typ
-}
-
-// addImplicit sets the given Key as having been created implicitly.
-func (p *parser) addImplicit(key Key) {
- p.implicits[key.String()] = true
-}
-
-// removeImplicit stops tagging the given key as having been implicitly
-// created.
-func (p *parser) removeImplicit(key Key) {
- p.implicits[key.String()] = false
-}
-
-// isImplicit returns true if the key group pointed to by the key was created
-// implicitly.
-func (p *parser) isImplicit(key Key) bool {
- return p.implicits[key.String()]
-}
-
-// current returns the full key name of the current context.
-func (p *parser) current() string {
- if len(p.currentKey) == 0 {
- return p.context.String()
- }
- if len(p.context) == 0 {
- return p.currentKey
- }
- return fmt.Sprintf("%s.%s", p.context, p.currentKey)
-}
-
-func stripFirstNewline(s string) string {
- if len(s) == 0 || s[0] != '\n' {
- return s
- }
- return s[1:]
-}
-
-func stripEscapedWhitespace(s string) string {
- esc := strings.Split(s, "\\\n")
- if len(esc) > 1 {
- for i := 1; i < len(esc); i++ {
- esc[i] = strings.TrimLeftFunc(esc[i], unicode.IsSpace)
- }
- }
- return strings.Join(esc, "")
-}
-
-func (p *parser) replaceEscapes(str string) string {
- var replaced []rune
- s := []byte(str)
- r := 0
- for r < len(s) {
- if s[r] != '\\' {
- c, size := utf8.DecodeRune(s[r:])
- r += size
- replaced = append(replaced, c)
- continue
- }
- r += 1
- if r >= len(s) {
- p.bug("Escape sequence at end of string.")
- return ""
- }
- switch s[r] {
- default:
- p.bug("Expected valid escape code after \\, but got %q.", s[r])
- return ""
- case 'b':
- replaced = append(replaced, rune(0x0008))
- r += 1
- case 't':
- replaced = append(replaced, rune(0x0009))
- r += 1
- case 'n':
- replaced = append(replaced, rune(0x000A))
- r += 1
- case 'f':
- replaced = append(replaced, rune(0x000C))
- r += 1
- case 'r':
- replaced = append(replaced, rune(0x000D))
- r += 1
- case '"':
- replaced = append(replaced, rune(0x0022))
- r += 1
- case '\\':
- replaced = append(replaced, rune(0x005C))
- r += 1
- case 'u':
- // At this point, we know we have a Unicode escape of the form
- // `uXXXX` at [r, r+5). (Because the lexer guarantees this
- // for us.)
- escaped := p.asciiEscapeToUnicode(s[r+1 : r+5])
- replaced = append(replaced, escaped)
- r += 5
- case 'U':
- // At this point, we know we have a Unicode escape of the form
- // `uXXXX` at [r, r+9). (Because the lexer guarantees this
- // for us.)
- escaped := p.asciiEscapeToUnicode(s[r+1 : r+9])
- replaced = append(replaced, escaped)
- r += 9
- }
- }
- return string(replaced)
-}
-
-func (p *parser) asciiEscapeToUnicode(bs []byte) rune {
- s := string(bs)
- hex, err := strconv.ParseUint(strings.ToLower(s), 16, 32)
- if err != nil {
- p.bug("Could not parse '%s' as a hexadecimal number, but the "+
- "lexer claims it's OK: %s", s, err)
- }
- if !utf8.ValidRune(rune(hex)) {
- p.panicf("Escaped character '\\u%s' is not valid UTF-8.", s)
- }
- return rune(hex)
-}
-
-func isStringType(ty itemType) bool {
- return ty == itemString || ty == itemMultilineString ||
- ty == itemRawString || ty == itemRawMultilineString
-}
diff --git a/vendor/github.com/BurntSushi/toml/session.vim b/vendor/github.com/BurntSushi/toml/session.vim
deleted file mode 100644
index 562164be0..000000000
--- a/vendor/github.com/BurntSushi/toml/session.vim
+++ /dev/null
@@ -1 +0,0 @@
-au BufWritePost *.go silent!make tags > /dev/null 2>&1
diff --git a/vendor/github.com/BurntSushi/toml/type_check.go b/vendor/github.com/BurntSushi/toml/type_check.go
deleted file mode 100644
index c73f8afc1..000000000
--- a/vendor/github.com/BurntSushi/toml/type_check.go
+++ /dev/null
@@ -1,91 +0,0 @@
-package toml
-
-// tomlType represents any Go type that corresponds to a TOML type.
-// While the first draft of the TOML spec has a simplistic type system that
-// probably doesn't need this level of sophistication, we seem to be militating
-// toward adding real composite types.
-type tomlType interface {
- typeString() string
-}
-
-// typeEqual accepts any two types and returns true if they are equal.
-func typeEqual(t1, t2 tomlType) bool {
- if t1 == nil || t2 == nil {
- return false
- }
- return t1.typeString() == t2.typeString()
-}
-
-func typeIsHash(t tomlType) bool {
- return typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash)
-}
-
-type tomlBaseType string
-
-func (btype tomlBaseType) typeString() string {
- return string(btype)
-}
-
-func (btype tomlBaseType) String() string {
- return btype.typeString()
-}
-
-var (
- tomlInteger tomlBaseType = "Integer"
- tomlFloat tomlBaseType = "Float"
- tomlDatetime tomlBaseType = "Datetime"
- tomlString tomlBaseType = "String"
- tomlBool tomlBaseType = "Bool"
- tomlArray tomlBaseType = "Array"
- tomlHash tomlBaseType = "Hash"
- tomlArrayHash tomlBaseType = "ArrayHash"
-)
-
-// typeOfPrimitive returns a tomlType of any primitive value in TOML.
-// Primitive values are: Integer, Float, Datetime, String and Bool.
-//
-// Passing a lexer item other than the following will cause a BUG message
-// to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime.
-func (p *parser) typeOfPrimitive(lexItem item) tomlType {
- switch lexItem.typ {
- case itemInteger:
- return tomlInteger
- case itemFloat:
- return tomlFloat
- case itemDatetime:
- return tomlDatetime
- case itemString:
- return tomlString
- case itemMultilineString:
- return tomlString
- case itemRawString:
- return tomlString
- case itemRawMultilineString:
- return tomlString
- case itemBool:
- return tomlBool
- }
- p.bug("Cannot infer primitive type of lex item '%s'.", lexItem)
- panic("unreachable")
-}
-
-// typeOfArray returns a tomlType for an array given a list of types of its
-// values.
-//
-// In the current spec, if an array is homogeneous, then its type is always
-// "Array". If the array is not homogeneous, an error is generated.
-func (p *parser) typeOfArray(types []tomlType) tomlType {
- // Empty arrays are cool.
- if len(types) == 0 {
- return tomlArray
- }
-
- theType := types[0]
- for _, t := range types[1:] {
- if !typeEqual(theType, t) {
- p.panicf("Array contains values of type '%s' and '%s', but "+
- "arrays must be homogeneous.", theType, t)
- }
- }
- return tomlArray
-}
diff --git a/vendor/github.com/BurntSushi/toml/type_fields.go b/vendor/github.com/BurntSushi/toml/type_fields.go
deleted file mode 100644
index 608997c22..000000000
--- a/vendor/github.com/BurntSushi/toml/type_fields.go
+++ /dev/null
@@ -1,242 +0,0 @@
-package toml
-
-// Struct field handling is adapted from code in encoding/json:
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the Go distribution.
-
-import (
- "reflect"
- "sort"
- "sync"
-)
-
-// A field represents a single field found in a struct.
-type field struct {
- name string // the name of the field (`toml` tag included)
- tag bool // whether field has a `toml` tag
- index []int // represents the depth of an anonymous field
- typ reflect.Type // the type of the field
-}
-
-// byName sorts field by name, breaking ties with depth,
-// then breaking ties with "name came from toml tag", then
-// breaking ties with index sequence.
-type byName []field
-
-func (x byName) Len() int { return len(x) }
-
-func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byName) Less(i, j int) bool {
- if x[i].name != x[j].name {
- return x[i].name < x[j].name
- }
- if len(x[i].index) != len(x[j].index) {
- return len(x[i].index) < len(x[j].index)
- }
- if x[i].tag != x[j].tag {
- return x[i].tag
- }
- return byIndex(x).Less(i, j)
-}
-
-// byIndex sorts field by index sequence.
-type byIndex []field
-
-func (x byIndex) Len() int { return len(x) }
-
-func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byIndex) Less(i, j int) bool {
- for k, xik := range x[i].index {
- if k >= len(x[j].index) {
- return false
- }
- if xik != x[j].index[k] {
- return xik < x[j].index[k]
- }
- }
- return len(x[i].index) < len(x[j].index)
-}
-
-// typeFields returns a list of fields that TOML should recognize for the given
-// type. The algorithm is breadth-first search over the set of structs to
-// include - the top struct and then any reachable anonymous structs.
-func typeFields(t reflect.Type) []field {
- // Anonymous fields to explore at the current level and the next.
- current := []field{}
- next := []field{{typ: t}}
-
- // Count of queued names for current level and the next.
- count := map[reflect.Type]int{}
- nextCount := map[reflect.Type]int{}
-
- // Types already visited at an earlier level.
- visited := map[reflect.Type]bool{}
-
- // Fields found.
- var fields []field
-
- for len(next) > 0 {
- current, next = next, current[:0]
- count, nextCount = nextCount, map[reflect.Type]int{}
-
- for _, f := range current {
- if visited[f.typ] {
- continue
- }
- visited[f.typ] = true
-
- // Scan f.typ for fields to include.
- for i := 0; i < f.typ.NumField(); i++ {
- sf := f.typ.Field(i)
- if sf.PkgPath != "" && !sf.Anonymous { // unexported
- continue
- }
- opts := getOptions(sf.Tag)
- if opts.skip {
- continue
- }
- index := make([]int, len(f.index)+1)
- copy(index, f.index)
- index[len(f.index)] = i
-
- ft := sf.Type
- if ft.Name() == "" && ft.Kind() == reflect.Ptr {
- // Follow pointer.
- ft = ft.Elem()
- }
-
- // Record found field and index sequence.
- if opts.name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
- tagged := opts.name != ""
- name := opts.name
- if name == "" {
- name = sf.Name
- }
- fields = append(fields, field{name, tagged, index, ft})
- if count[f.typ] > 1 {
- // If there were multiple instances, add a second,
- // so that the annihilation code will see a duplicate.
- // It only cares about the distinction between 1 or 2,
- // so don't bother generating any more copies.
- fields = append(fields, fields[len(fields)-1])
- }
- continue
- }
-
- // Record new anonymous struct to explore in next round.
- nextCount[ft]++
- if nextCount[ft] == 1 {
- f := field{name: ft.Name(), index: index, typ: ft}
- next = append(next, f)
- }
- }
- }
- }
-
- sort.Sort(byName(fields))
-
- // Delete all fields that are hidden by the Go rules for embedded fields,
- // except that fields with TOML tags are promoted.
-
- // The fields are sorted in primary order of name, secondary order
- // of field index length. Loop over names; for each name, delete
- // hidden fields by choosing the one dominant field that survives.
- out := fields[:0]
- for advance, i := 0, 0; i < len(fields); i += advance {
- // One iteration per name.
- // Find the sequence of fields with the name of this first field.
- fi := fields[i]
- name := fi.name
- for advance = 1; i+advance < len(fields); advance++ {
- fj := fields[i+advance]
- if fj.name != name {
- break
- }
- }
- if advance == 1 { // Only one field with this name
- out = append(out, fi)
- continue
- }
- dominant, ok := dominantField(fields[i : i+advance])
- if ok {
- out = append(out, dominant)
- }
- }
-
- fields = out
- sort.Sort(byIndex(fields))
-
- return fields
-}
-
-// dominantField looks through the fields, all of which are known to
-// have the same name, to find the single field that dominates the
-// others using Go's embedding rules, modified by the presence of
-// TOML tags. If there are multiple top-level fields, the boolean
-// will be false: This condition is an error in Go and we skip all
-// the fields.
-func dominantField(fields []field) (field, bool) {
- // The fields are sorted in increasing index-length order. The winner
- // must therefore be one with the shortest index length. Drop all
- // longer entries, which is easy: just truncate the slice.
- length := len(fields[0].index)
- tagged := -1 // Index of first tagged field.
- for i, f := range fields {
- if len(f.index) > length {
- fields = fields[:i]
- break
- }
- if f.tag {
- if tagged >= 0 {
- // Multiple tagged fields at the same level: conflict.
- // Return no field.
- return field{}, false
- }
- tagged = i
- }
- }
- if tagged >= 0 {
- return fields[tagged], true
- }
- // All remaining fields have the same length. If there's more than one,
- // we have a conflict (two fields named "X" at the same level) and we
- // return no field.
- if len(fields) > 1 {
- return field{}, false
- }
- return fields[0], true
-}
-
-var fieldCache struct {
- sync.RWMutex
- m map[reflect.Type][]field
-}
-
-// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
-func cachedTypeFields(t reflect.Type) []field {
- fieldCache.RLock()
- f := fieldCache.m[t]
- fieldCache.RUnlock()
- if f != nil {
- return f
- }
-
- // Compute fields without lock.
- // Might duplicate effort but won't hold other computations back.
- f = typeFields(t)
- if f == nil {
- f = []field{}
- }
-
- fieldCache.Lock()
- if fieldCache.m == nil {
- fieldCache.m = map[reflect.Type][]field{}
- }
- fieldCache.m[t] = f
- fieldCache.Unlock()
- return f
-}
diff --git a/vendor/github.com/KyleBanks/depth/.gitignore b/vendor/github.com/KyleBanks/depth/.gitignore
deleted file mode 100644
index 8c2e171ea..000000000
--- a/vendor/github.com/KyleBanks/depth/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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
-
-# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
-.glide/
-
-bin/
diff --git a/vendor/github.com/KyleBanks/depth/.travis.yml b/vendor/github.com/KyleBanks/depth/.travis.yml
deleted file mode 100644
index ab506f939..000000000
--- a/vendor/github.com/KyleBanks/depth/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: go
-sudo: false
-go:
- - 1.9.x
-before_install:
- - go get github.com/mattn/goveralls
-script:
- - $HOME/gopath/bin/goveralls -service=travis-ci
-#script: go test $(go list ./... | grep -v vendor/)
diff --git a/vendor/github.com/KyleBanks/depth/LICENSE b/vendor/github.com/KyleBanks/depth/LICENSE
deleted file mode 100644
index 070b426b8..000000000
--- a/vendor/github.com/KyleBanks/depth/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 Kyle Banks
-
-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/KyleBanks/depth/Makefile b/vendor/github.com/KyleBanks/depth/Makefile
deleted file mode 100644
index acd35bb41..000000000
--- a/vendor/github.com/KyleBanks/depth/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-VERSION = 1.2.1
-
-RELEASE_PKG = ./cmd/depth
-INSTALL_PKG = $(RELEASE_PKG)
-
-
-# Remote includes require 'mmake'
-# github.com/tj/mmake
-include github.com/KyleBanks/make/go/install
-include github.com/KyleBanks/make/go/sanity
-include github.com/KyleBanks/make/go/release
-include github.com/KyleBanks/make/go/bench
-include github.com/KyleBanks/make/git/precommit
-
-# Runs a number of depth commands as examples of what's possible.
-example: | install
- depth github.com/KyleBanks/depth/cmd/depth strings ./
-
- depth -internal strings
-
- depth -json github.com/KyleBanks/depth/cmd/depth
-
- depth -test github.com/KyleBanks/depth/cmd/depth
-
- depth -test -internal strings
-
- depth -test -internal -max 3 strings
-
- depth .
-
- depth ./cmd/depth
-.PHONY: example
diff --git a/vendor/github.com/KyleBanks/depth/README.md b/vendor/github.com/KyleBanks/depth/README.md
deleted file mode 100644
index 0de954fd3..000000000
--- a/vendor/github.com/KyleBanks/depth/README.md
+++ /dev/null
@@ -1,232 +0,0 @@
-# depth
-
-[](https://godoc.org/github.com/KyleBanks/depth)
-[](https://travis-ci.org/KyleBanks/depth)
-[](https://goreportcard.com/report/github.com/KyleBanks/depth)
-[](https://coveralls.io/github/KyleBanks/depth?branch=master)
-
-`depth` is tool to retrieve and visualize Go source code dependency trees.
-
-## Install
-
-Download the appropriate binary for your platform from the [Releases](https://github.com/KyleBanks/depth/releases) page, or:
-
-```sh
-go get github.com/KyleBanks/depth/cmd/depth
-```
-
-## Usage
-
-`depth` can be used as a standalone command-line application, or as a package within your own project.
-
-### Command-Line
-
-Simply execute `depth` with one or more package names to visualize. You can use the fully qualified import path of the package, like so:
-
-```sh
-$ depth github.com/KyleBanks/depth/cmd/depth
-github.com/KyleBanks/depth/cmd/depth
- ├ encoding/json
- ├ flag
- ├ fmt
- ├ io
- ├ log
- ├ os
- ├ strings
- └ github.com/KyleBanks/depth
- ├ fmt
- ├ go/build
- ├ path
- ├ sort
- └ strings
-12 dependencies (11 internal, 1 external, 0 testing).
-```
-
-Or you can use a relative path, for example:
-
-```sh
-$ depth .
-$ depth ./cmd/depth
-$ depth ../
-```
-
-You can also use `depth` on the Go standard library:
-
-```sh
-$ depth strings
-strings
- ├ errors
- ├ io
- ├ unicode
- └ unicode/utf8
-5 dependencies (5 internal, 0 external, 0 testing).
-```
-
-Visualizing multiple packages at a time is supported by simply naming the packages you'd like to visualize:
-
-```sh
-$ depth strings github.com/KyleBanks/depth
-strings
- ├ errors
- ├ io
- ├ unicode
- └ unicode/utf8
-5 dependencies (5 internal, 0 external, 0 testing).
-github.com/KyleBanks/depth
- ├ fmt
- ├ go/build
- ├ path
- ├ sort
- └ strings
-7 dependencies (7 internal, 0 external, 0 testing).
-```
-
-#### `-internal`
-
-By default, `depth` only resolves the top level of dependencies for standard library packages, however you can use the `-internal` flag to visualize all internal dependencies:
-
-```sh
-$ depth -internal strings
-strings
- ├ errors
- ├ io
- ├ errors
- └ sync
- ├ internal/race
- └ unsafe
- ├ runtime
- ├ runtime/internal/atomic
- └ unsafe
- ├ runtime/internal/sys
- └ unsafe
- ├ sync/atomic
- └ unsafe
- └ unsafe
- ├ unicode
- └ unicode/utf8
-12 dependencies (12 internal, 0 external, 0 testing).
-```
-
-#### `-max`
-
-The `-max` flag limits the dependency tree to the maximum depth provided. For example, if you supply `-max 1` on the `depth` package, your output would look like so:
-
-```
-$ depth -max 1 github.com/KyleBanks/depth/cmd/depth
-github.com/KyleBanks/depth/cmd/depth
- ├ encoding/json
- ├ flag
- ├ fmt
- ├ io
- ├ log
- ├ os
- ├ strings
- └ github.com/KyleBanks/depth
-7 dependencies (6 internal, 1 external, 0 testing).
-```
-
-The `-max` flag is particularly useful in conjunction with the `-internal` flag which can lead to very deep dependency trees.
-
-#### `-test`
-
-By default, `depth` ignores dependencies that are only required for testing. However, you can view test dependencies using the `-test` flag:
-
-```sh
-$ depth -test strings
-strings
- ├ bytes
- ├ errors
- ├ fmt
- ├ io
- ├ io/ioutil
- ├ math/rand
- ├ reflect
- ├ sync
- ├ testing
- ├ unicode
- ├ unicode/utf8
- └ unsafe
-13 dependencies (13 internal, 0 external, 8 testing).
-```
-
-#### `-explain target-package`
-
-The `-explain` flag instructs `depth` to print import chains in which the
-`target-package` is found:
-
-```sh
-$ depth -explain strings github.com/KyleBanks/depth/cmd/depth
-github.com/KyleBanks/depth/cmd/depth -> strings
-github.com/KyleBanks/depth/cmd/depth -> github.com/KyleBanks/depth -> strings
-```
-
-#### `-json`
-
-The `-json` flag instructs `depth` to output dependencies in JSON format:
-
-```sh
-$ depth -json github.com/KyleBanks/depth/cmd/depth
-{
- "name": "github.com/KyleBanks/depth/cmd/depth",
- "deps": [
- {
- "name": "encoding/json",
- "internal": true,
- "deps": null
- },
- ...
- {
- "name": "github.com/KyleBanks/depth",
- "internal": false,
- "deps": [
- {
- "name": "go/build",
- "internal": true,
- "deps": null
- },
- ...
- ]
- }
- ]
-}
-```
-
-### Integrating With Your Project
-
-The `depth` package can easily be used to retrieve the dependency tree for a particular package in your own project. For example, here's how you would retrieve the dependency tree for the `strings` package:
-
-```go
-import "github.com/KyleBanks/depth"
-
-var t depth.Tree
-err := t.Resolve("strings")
-if err != nil {
- log.Fatal(err)
-}
-
-// Output: "'strings' has 4 dependencies."
-log.Printf("'%v' has %v dependencies.", t.Root.Name, len(t.Root.Deps))
-```
-
-For additional customization, simply set the appropriate flags on the `Tree` before resolving:
-
-```go
-import "github.com/KyleBanks/depth"
-
-t := depth.Tree {
- ResolveInternal: true,
- ResolveTest: true,
- MaxDepth: 10,
-}
-
-
-err := t.Resolve("strings")
-```
-
-## Author
-
-`depth` was developed by [Kyle Banks](https://twitter.com/kylewbanks).
-
-## License
-
-`depth` is available under the [MIT](./LICENSE) license.
diff --git a/vendor/github.com/KyleBanks/depth/depth.go b/vendor/github.com/KyleBanks/depth/depth.go
deleted file mode 100644
index 115c28ac9..000000000
--- a/vendor/github.com/KyleBanks/depth/depth.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Package depth provides the ability to traverse and retrieve Go source code dependencies in the form of
-// internal and external packages.
-//
-// For example, the dependencies of the stdlib `strings` package can be resolved like so:
-//
-// import "github.com/KyleBanks/depth"
-//
-// var t depth.Tree
-// err := t.Resolve("strings")
-// if err != nil {
-// log.Fatal(err)
-// }
-//
-// // Output: "strings has 4 dependencies."
-// log.Printf("%v has %v dependencies.", t.Root.Name, len(t.Root.Deps))
-//
-// For additional customization, simply set the appropriate flags on the `Tree` before resolving:
-//
-// import "github.com/KyleBanks/depth"
-//
-// t := depth.Tree {
-// ResolveInternal: true,
-// ResolveTest: true,
-// MaxDepth: 10,
-// }
-// err := t.Resolve("strings")
-package depth
-
-import (
- "errors"
- "go/build"
- "os"
-)
-
-// ErrRootPkgNotResolved is returned when the root Pkg of the Tree cannot be resolved,
-// typically because it does not exist.
-var ErrRootPkgNotResolved = errors.New("unable to resolve root package")
-
-// Importer defines a type that can import a package and return its details.
-type Importer interface {
- Import(name, srcDir string, im build.ImportMode) (*build.Package, error)
-}
-
-// Tree represents the top level of a Pkg and the configuration used to
-// initialize and represent its contents.
-type Tree struct {
- Root *Pkg
-
- ResolveInternal bool
- ResolveTest bool
- MaxDepth int
-
- Importer Importer
-
- importCache map[string]struct{}
-}
-
-// Resolve recursively finds all dependencies for the root Pkg name provided,
-// and the packages it depends on.
-func (t *Tree) Resolve(name string) error {
- pwd, err := os.Getwd()
- if err != nil {
- return err
- }
-
- t.Root = &Pkg{
- Name: name,
- Tree: t,
- SrcDir: pwd,
- Test: false,
- }
-
- // Reset the import cache each time to ensure a reused Tree doesn't
- // reuse the same cache.
- t.importCache = nil
-
- // Allow custom importers, but use build.Default if none is provided.
- if t.Importer == nil {
- t.Importer = &build.Default
- }
-
- t.Root.Resolve(t.Importer)
- if !t.Root.Resolved {
- return ErrRootPkgNotResolved
- }
-
- return nil
-}
-
-// shouldResolveInternal determines if internal packages should be further resolved beyond the
-// current parent.
-//
-// For example, if the parent Pkg is `github.com/foo/bar` and true is returned, all the
-// internal dependencies it relies on will be resolved. If for example `strings` is one of those
-// dependencies, and it is passed as the parent here, false may be returned and its internal
-// dependencies will not be resolved.
-func (t *Tree) shouldResolveInternal(parent *Pkg) bool {
- if t.ResolveInternal {
- return true
- }
-
- return parent == t.Root
-}
-
-// isAtMaxDepth returns true when the depth of the Pkg provided is at or beyond the maximum
-// depth allowed by the tree.
-//
-// If the Tree has a MaxDepth of zero, true is never returned.
-func (t *Tree) isAtMaxDepth(p *Pkg) bool {
- if t.MaxDepth == 0 {
- return false
- }
-
- return p.depth() >= t.MaxDepth
-}
-
-// hasSeenImport returns true if the import name provided has already been seen within the tree.
-// This function only returns false for a name once.
-func (t *Tree) hasSeenImport(name string) bool {
- if t.importCache == nil {
- t.importCache = make(map[string]struct{})
- }
-
- if _, ok := t.importCache[name]; ok {
- return true
- }
- t.importCache[name] = struct{}{}
- return false
-}
diff --git a/vendor/github.com/KyleBanks/depth/pkg.go b/vendor/github.com/KyleBanks/depth/pkg.go
deleted file mode 100644
index 1d54d717d..000000000
--- a/vendor/github.com/KyleBanks/depth/pkg.go
+++ /dev/null
@@ -1,184 +0,0 @@
-package depth
-
-import (
- "bytes"
- "go/build"
- "path"
- "sort"
- "strings"
-)
-
-// Pkg represents a Go source package, and its dependencies.
-type Pkg struct {
- Name string `json:"name"`
- SrcDir string `json:"-"`
-
- Internal bool `json:"internal"`
- Resolved bool `json:"resolved"`
- Test bool `json:"-"`
-
- Tree *Tree `json:"-"`
- Parent *Pkg `json:"-"`
- Deps []Pkg `json:"deps"`
-
- Raw *build.Package `json:"-"`
-}
-
-// Resolve recursively finds all dependencies for the Pkg and the packages it depends on.
-func (p *Pkg) Resolve(i Importer) {
- // Resolved is always true, regardless of if we skip the import,
- // it is only false if there is an error while importing.
- p.Resolved = true
-
- name := p.cleanName()
- if name == "" {
- return
- }
-
- // Stop resolving imports if we've reached max depth or found a duplicate.
- var importMode build.ImportMode
- if p.Tree.hasSeenImport(name) || p.Tree.isAtMaxDepth(p) {
- importMode = build.FindOnly
- }
-
- pkg, err := i.Import(name, p.SrcDir, importMode)
- if err != nil {
- // TODO: Check the error type?
- p.Resolved = false
- return
- }
- p.Raw = pkg
-
- // Update the name with the fully qualified import path.
- p.Name = pkg.ImportPath
-
- // If this is an internal dependency, we may need to skip it.
- if pkg.Goroot {
- p.Internal = true
- if !p.Tree.shouldResolveInternal(p) {
- return
- }
- }
-
- //first we set the regular dependencies, then we add the test dependencies
- //sharing the same set. This allows us to mark all test-only deps linearly
- unique := make(map[string]struct{})
- p.setDeps(i, pkg.Imports, pkg.Dir, unique, false)
- if p.Tree.ResolveTest {
- p.setDeps(i, append(pkg.TestImports, pkg.XTestImports...), pkg.Dir, unique, true)
- }
-}
-
-// setDeps takes a slice of import paths and the source directory they are relative to,
-// and creates the Deps of the Pkg. Each dependency is also further resolved prior to being added
-// to the Pkg.
-func (p *Pkg) setDeps(i Importer, imports []string, srcDir string, unique map[string]struct{}, isTest bool) {
- for _, imp := range imports {
- // Mostly for testing files where cyclic imports are allowed.
- if imp == p.Name {
- continue
- }
-
- // Skip duplicates.
- if _, ok := unique[imp]; ok {
- continue
- }
- unique[imp] = struct{}{}
-
- p.addDep(i, imp, srcDir, isTest)
- }
-
- sort.Sort(byInternalAndName(p.Deps))
-}
-
-// addDep creates a Pkg and it's dependencies from an imported package name.
-func (p *Pkg) addDep(i Importer, name string, srcDir string, isTest bool) {
- dep := Pkg{
- Name: name,
- SrcDir: srcDir,
- Tree: p.Tree,
- Parent: p,
- Test: isTest,
- }
- dep.Resolve(i)
-
- p.Deps = append(p.Deps, dep)
-}
-
-// isParent goes recursively up the chain of Pkgs to determine if the name provided is ever a
-// parent of the current Pkg.
-func (p *Pkg) isParent(name string) bool {
- if p.Parent == nil {
- return false
- }
-
- if p.Parent.Name == name {
- return true
- }
-
- return p.Parent.isParent(name)
-}
-
-// depth returns the depth of the Pkg within the Tree.
-func (p *Pkg) depth() int {
- if p.Parent == nil {
- return 0
- }
-
- return p.Parent.depth() + 1
-}
-
-// cleanName returns a cleaned version of the Pkg name used for resolving dependencies.
-//
-// If an empty string is returned, dependencies should not be resolved.
-func (p *Pkg) cleanName() string {
- name := p.Name
-
- // C 'package' cannot be resolved.
- if name == "C" {
- return ""
- }
-
- // Internal golang_org/* packages must be prefixed with vendor/
- //
- // Thanks to @davecheney for this:
- // https://github.com/davecheney/graphpkg/blob/master/main.go#L46
- if strings.HasPrefix(name, "golang_org") {
- name = path.Join("vendor", name)
- }
-
- return name
-}
-
-// String returns a string representation of the Pkg containing the Pkg name and status.
-func (p *Pkg) String() string {
- b := bytes.NewBufferString(p.Name)
-
- if !p.Resolved {
- b.Write([]byte(" (unresolved)"))
- }
-
- return b.String()
-}
-
-// byInternalAndName ensures a slice of Pkgs are sorted such that the internal stdlib
-// packages are always above external packages (ie. github.com/whatever).
-type byInternalAndName []Pkg
-
-func (b byInternalAndName) Len() int {
- return len(b)
-}
-
-func (b byInternalAndName) Swap(i, j int) {
- b[i], b[j] = b[j], b[i]
-}
-
-func (b byInternalAndName) Less(i, j int) bool {
- if b[i].Internal && !b[j].Internal {
- return true
- } else if !b[i].Internal && b[j].Internal {
- return false
- }
-
- return b[i].Name < b[j].Name
-}
diff --git a/vendor/github.com/PuerkitoBio/purell/.gitignore b/vendor/github.com/PuerkitoBio/purell/.gitignore
deleted file mode 100644
index 748e4c807..000000000
--- a/vendor/github.com/PuerkitoBio/purell/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-*.sublime-*
-.DS_Store
-*.swp
-*.swo
-tags
diff --git a/vendor/github.com/PuerkitoBio/purell/.travis.yml b/vendor/github.com/PuerkitoBio/purell/.travis.yml
deleted file mode 100644
index cf31e6af6..000000000
--- a/vendor/github.com/PuerkitoBio/purell/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: go
-
-go:
- - 1.4.x
- - 1.5.x
- - 1.6.x
- - 1.7.x
- - 1.8.x
- - 1.9.x
- - "1.10.x"
- - "1.11.x"
- - tip
diff --git a/vendor/github.com/PuerkitoBio/purell/LICENSE b/vendor/github.com/PuerkitoBio/purell/LICENSE
deleted file mode 100644
index 4b9986dea..000000000
--- a/vendor/github.com/PuerkitoBio/purell/LICENSE
+++ /dev/null
@@ -1,12 +0,0 @@
-Copyright (c) 2012, Martin Angers
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/PuerkitoBio/purell/README.md b/vendor/github.com/PuerkitoBio/purell/README.md
deleted file mode 100644
index 07de0c498..000000000
--- a/vendor/github.com/PuerkitoBio/purell/README.md
+++ /dev/null
@@ -1,188 +0,0 @@
-# Purell
-
-Purell is a tiny Go library to normalize URLs. It returns a pure URL. Pure-ell. Sanitizer and all. Yeah, I know...
-
-Based on the [wikipedia paper][wiki] and the [RFC 3986 document][rfc].
-
-[](http://travis-ci.org/PuerkitoBio/purell)
-
-## Install
-
-`go get github.com/PuerkitoBio/purell`
-
-## Changelog
-
-* **v1.1.1** : Fix failing test due to Go1.12 changes (thanks to @ianlancetaylor).
-* **2016-11-14 (v1.1.0)** : IDN: Conform to RFC 5895: Fold character width (thanks to @beeker1121).
-* **2016-07-27 (v1.0.0)** : Normalize IDN to ASCII (thanks to @zenovich).
-* **2015-02-08** : Add fix for relative paths issue ([PR #5][pr5]) and add fix for unnecessary encoding of reserved characters ([see issue #7][iss7]).
-* **v0.2.0** : Add benchmarks, Attempt IDN support.
-* **v0.1.0** : Initial release.
-
-## Examples
-
-From `example_test.go` (note that in your code, you would import "github.com/PuerkitoBio/purell", and would prefix references to its methods and constants with "purell."):
-
-```go
-package purell
-
-import (
- "fmt"
- "net/url"
-)
-
-func ExampleNormalizeURLString() {
- if normalized, err := NormalizeURLString("hTTp://someWEBsite.com:80/Amazing%3f/url/",
- FlagLowercaseScheme|FlagLowercaseHost|FlagUppercaseEscapes); err != nil {
- panic(err)
- } else {
- fmt.Print(normalized)
- }
- // Output: http://somewebsite.com:80/Amazing%3F/url/
-}
-
-func ExampleMustNormalizeURLString() {
- normalized := MustNormalizeURLString("hTTpS://someWEBsite.com:443/Amazing%fa/url/",
- FlagsUnsafeGreedy)
- fmt.Print(normalized)
-
- // Output: http://somewebsite.com/Amazing%FA/url
-}
-
-func ExampleNormalizeURL() {
- if u, err := url.Parse("Http://SomeUrl.com:8080/a/b/.././c///g?c=3&a=1&b=9&c=0#target"); err != nil {
- panic(err)
- } else {
- normalized := NormalizeURL(u, FlagsUsuallySafeGreedy|FlagRemoveDuplicateSlashes|FlagRemoveFragment)
- fmt.Print(normalized)
- }
-
- // Output: http://someurl.com:8080/a/c/g?c=3&a=1&b=9&c=0
-}
-```
-
-## API
-
-As seen in the examples above, purell offers three methods, `NormalizeURLString(string, NormalizationFlags) (string, error)`, `MustNormalizeURLString(string, NormalizationFlags) (string)` and `NormalizeURL(*url.URL, NormalizationFlags) (string)`. They all normalize the provided URL based on the specified flags. Here are the available flags:
-
-```go
-const (
- // Safe normalizations
- FlagLowercaseScheme NormalizationFlags = 1 << iota // HTTP://host -> http://host, applied by default in Go1.1
- FlagLowercaseHost // http://HOST -> http://host
- FlagUppercaseEscapes // http://host/t%ef -> http://host/t%EF
- FlagDecodeUnnecessaryEscapes // http://host/t%41 -> http://host/tA
- FlagEncodeNecessaryEscapes // http://host/!"#$ -> http://host/%21%22#$
- FlagRemoveDefaultPort // http://host:80 -> http://host
- FlagRemoveEmptyQuerySeparator // http://host/path? -> http://host/path
-
- // Usually safe normalizations
- FlagRemoveTrailingSlash // http://host/path/ -> http://host/path
- FlagAddTrailingSlash // http://host/path -> http://host/path/ (should choose only one of these add/remove trailing slash flags)
- FlagRemoveDotSegments // http://host/path/./a/b/../c -> http://host/path/a/c
-
- // Unsafe normalizations
- FlagRemoveDirectoryIndex // http://host/path/index.html -> http://host/path/
- FlagRemoveFragment // http://host/path#fragment -> http://host/path
- FlagForceHTTP // https://host -> http://host
- FlagRemoveDuplicateSlashes // http://host/path//a///b -> http://host/path/a/b
- FlagRemoveWWW // http://www.host/ -> http://host/
- FlagAddWWW // http://host/ -> http://www.host/ (should choose only one of these add/remove WWW flags)
- FlagSortQuery // http://host/path?c=3&b=2&a=1&b=1 -> http://host/path?a=1&b=1&b=2&c=3
-
- // Normalizations not in the wikipedia article, required to cover tests cases
- // submitted by jehiah
- FlagDecodeDWORDHost // http://1113982867 -> http://66.102.7.147
- FlagDecodeOctalHost // http://0102.0146.07.0223 -> http://66.102.7.147
- FlagDecodeHexHost // http://0x42660793 -> http://66.102.7.147
- FlagRemoveUnnecessaryHostDots // http://.host../path -> http://host/path
- FlagRemoveEmptyPortSeparator // http://host:/path -> http://host/path
-
- // Convenience set of safe normalizations
- FlagsSafe NormalizationFlags = FlagLowercaseHost | FlagLowercaseScheme | FlagUppercaseEscapes | FlagDecodeUnnecessaryEscapes | FlagEncodeNecessaryEscapes | FlagRemoveDefaultPort | FlagRemoveEmptyQuerySeparator
-
- // For convenience sets, "greedy" uses the "remove trailing slash" and "remove www. prefix" flags,
- // while "non-greedy" uses the "add (or keep) the trailing slash" and "add www. prefix".
-
- // Convenience set of usually safe normalizations (includes FlagsSafe)
- FlagsUsuallySafeGreedy NormalizationFlags = FlagsSafe | FlagRemoveTrailingSlash | FlagRemoveDotSegments
- FlagsUsuallySafeNonGreedy NormalizationFlags = FlagsSafe | FlagAddTrailingSlash | FlagRemoveDotSegments
-
- // Convenience set of unsafe normalizations (includes FlagsUsuallySafe)
- FlagsUnsafeGreedy NormalizationFlags = FlagsUsuallySafeGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagRemoveWWW | FlagSortQuery
- FlagsUnsafeNonGreedy NormalizationFlags = FlagsUsuallySafeNonGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagAddWWW | FlagSortQuery
-
- // Convenience set of all available flags
- FlagsAllGreedy = FlagsUnsafeGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator
- FlagsAllNonGreedy = FlagsUnsafeNonGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator
-)
-```
-
-For convenience, the set of flags `FlagsSafe`, `FlagsUsuallySafe[Greedy|NonGreedy]`, `FlagsUnsafe[Greedy|NonGreedy]` and `FlagsAll[Greedy|NonGreedy]` are provided for the similarly grouped normalizations on [wikipedia's URL normalization page][wiki]. You can add (using the bitwise OR `|` operator) or remove (using the bitwise AND NOT `&^` operator) individual flags from the sets if required, to build your own custom set.
-
-The [full godoc reference is available on gopkgdoc][godoc].
-
-Some things to note:
-
-* `FlagDecodeUnnecessaryEscapes`, `FlagEncodeNecessaryEscapes`, `FlagUppercaseEscapes` and `FlagRemoveEmptyQuerySeparator` are always implicitly set, because internally, the URL string is parsed as an URL object, which automatically decodes unnecessary escapes, uppercases and encodes necessary ones, and removes empty query separators (an unnecessary `?` at the end of the url). So this operation cannot **not** be done. For this reason, `FlagRemoveEmptyQuerySeparator` (as well as the other three) has been included in the `FlagsSafe` convenience set, instead of `FlagsUnsafe`, where Wikipedia puts it.
-
-* The `FlagDecodeUnnecessaryEscapes` decodes the following escapes (*from -> to*):
- - %24 -> $
- - %26 -> &
- - %2B-%3B -> +,-./0123456789:;
- - %3D -> =
- - %40-%5A -> @ABCDEFGHIJKLMNOPQRSTUVWXYZ
- - %5F -> _
- - %61-%7A -> abcdefghijklmnopqrstuvwxyz
- - %7E -> ~
-
-
-* When the `NormalizeURL` function is used (passing an URL object), this source URL object is modified (that is, after the call, the URL object will be modified to reflect the normalization).
-
-* The *replace IP with domain name* normalization (`http://208.77.188.166/ → http://www.example.com/`) is obviously not possible for a library without making some network requests. This is not implemented in purell.
-
-* The *remove unused query string parameters* and *remove default query parameters* are also not implemented, since this is a very case-specific normalization, and it is quite trivial to do with an URL object.
-
-### Safe vs Usually Safe vs Unsafe
-
-Purell allows you to control the level of risk you take while normalizing an URL. You can aggressively normalize, play it totally safe, or anything in between.
-
-Consider the following URL:
-
-`HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid`
-
-Normalizing with the `FlagsSafe` gives:
-
-`https://www.root.com/toto/tE%1F///a/./b/../c/?z=3&w=2&a=4&w=1#invalid`
-
-With the `FlagsUsuallySafeGreedy`:
-
-`https://www.root.com/toto/tE%1F///a/c?z=3&w=2&a=4&w=1#invalid`
-
-And with `FlagsUnsafeGreedy`:
-
-`http://root.com/toto/tE%1F/a/c?a=4&w=1&w=2&z=3`
-
-## TODOs
-
-* Add a class/default instance to allow specifying custom directory index names? At the moment, removing directory index removes `(^|/)((?:default|index)\.\w{1,4})$`.
-
-## Thanks / Contributions
-
-@rogpeppe
-@jehiah
-@opennota
-@pchristopher1275
-@zenovich
-@beeker1121
-
-## License
-
-The [BSD 3-Clause license][bsd].
-
-[bsd]: http://opensource.org/licenses/BSD-3-Clause
-[wiki]: http://en.wikipedia.org/wiki/URL_normalization
-[rfc]: http://tools.ietf.org/html/rfc3986#section-6
-[godoc]: http://go.pkgdoc.org/github.com/PuerkitoBio/purell
-[pr5]: https://github.com/PuerkitoBio/purell/pull/5
-[iss7]: https://github.com/PuerkitoBio/purell/issues/7
diff --git a/vendor/github.com/PuerkitoBio/purell/purell.go b/vendor/github.com/PuerkitoBio/purell/purell.go
deleted file mode 100644
index 6d0fc190a..000000000
--- a/vendor/github.com/PuerkitoBio/purell/purell.go
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
-Package purell offers URL normalization as described on the wikipedia page:
-http://en.wikipedia.org/wiki/URL_normalization
-*/
-package purell
-
-import (
- "bytes"
- "fmt"
- "net/url"
- "regexp"
- "sort"
- "strconv"
- "strings"
-
- "github.com/PuerkitoBio/urlesc"
- "golang.org/x/net/idna"
- "golang.org/x/text/unicode/norm"
- "golang.org/x/text/width"
-)
-
-// A set of normalization flags determines how a URL will
-// be normalized.
-type NormalizationFlags uint
-
-const (
- // Safe normalizations
- FlagLowercaseScheme NormalizationFlags = 1 << iota // HTTP://host -> http://host, applied by default in Go1.1
- FlagLowercaseHost // http://HOST -> http://host
- FlagUppercaseEscapes // http://host/t%ef -> http://host/t%EF
- FlagDecodeUnnecessaryEscapes // http://host/t%41 -> http://host/tA
- FlagEncodeNecessaryEscapes // http://host/!"#$ -> http://host/%21%22#$
- FlagRemoveDefaultPort // http://host:80 -> http://host
- FlagRemoveEmptyQuerySeparator // http://host/path? -> http://host/path
-
- // Usually safe normalizations
- FlagRemoveTrailingSlash // http://host/path/ -> http://host/path
- FlagAddTrailingSlash // http://host/path -> http://host/path/ (should choose only one of these add/remove trailing slash flags)
- FlagRemoveDotSegments // http://host/path/./a/b/../c -> http://host/path/a/c
-
- // Unsafe normalizations
- FlagRemoveDirectoryIndex // http://host/path/index.html -> http://host/path/
- FlagRemoveFragment // http://host/path#fragment -> http://host/path
- FlagForceHTTP // https://host -> http://host
- FlagRemoveDuplicateSlashes // http://host/path//a///b -> http://host/path/a/b
- FlagRemoveWWW // http://www.host/ -> http://host/
- FlagAddWWW // http://host/ -> http://www.host/ (should choose only one of these add/remove WWW flags)
- FlagSortQuery // http://host/path?c=3&b=2&a=1&b=1 -> http://host/path?a=1&b=1&b=2&c=3
-
- // Normalizations not in the wikipedia article, required to cover tests cases
- // submitted by jehiah
- FlagDecodeDWORDHost // http://1113982867 -> http://66.102.7.147
- FlagDecodeOctalHost // http://0102.0146.07.0223 -> http://66.102.7.147
- FlagDecodeHexHost // http://0x42660793 -> http://66.102.7.147
- FlagRemoveUnnecessaryHostDots // http://.host../path -> http://host/path
- FlagRemoveEmptyPortSeparator // http://host:/path -> http://host/path
-
- // Convenience set of safe normalizations
- FlagsSafe NormalizationFlags = FlagLowercaseHost | FlagLowercaseScheme | FlagUppercaseEscapes | FlagDecodeUnnecessaryEscapes | FlagEncodeNecessaryEscapes | FlagRemoveDefaultPort | FlagRemoveEmptyQuerySeparator
-
- // For convenience sets, "greedy" uses the "remove trailing slash" and "remove www. prefix" flags,
- // while "non-greedy" uses the "add (or keep) the trailing slash" and "add www. prefix".
-
- // Convenience set of usually safe normalizations (includes FlagsSafe)
- FlagsUsuallySafeGreedy NormalizationFlags = FlagsSafe | FlagRemoveTrailingSlash | FlagRemoveDotSegments
- FlagsUsuallySafeNonGreedy NormalizationFlags = FlagsSafe | FlagAddTrailingSlash | FlagRemoveDotSegments
-
- // Convenience set of unsafe normalizations (includes FlagsUsuallySafe)
- FlagsUnsafeGreedy NormalizationFlags = FlagsUsuallySafeGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagRemoveWWW | FlagSortQuery
- FlagsUnsafeNonGreedy NormalizationFlags = FlagsUsuallySafeNonGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagAddWWW | FlagSortQuery
-
- // Convenience set of all available flags
- FlagsAllGreedy = FlagsUnsafeGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator
- FlagsAllNonGreedy = FlagsUnsafeNonGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator
-)
-
-const (
- defaultHttpPort = ":80"
- defaultHttpsPort = ":443"
-)
-
-// Regular expressions used by the normalizations
-var rxPort = regexp.MustCompile(`(:\d+)/?$`)
-var rxDirIndex = regexp.MustCompile(`(^|/)((?:default|index)\.\w{1,4})$`)
-var rxDupSlashes = regexp.MustCompile(`/{2,}`)
-var rxDWORDHost = regexp.MustCompile(`^(\d+)((?:\.+)?(?:\:\d*)?)$`)
-var rxOctalHost = regexp.MustCompile(`^(0\d*)\.(0\d*)\.(0\d*)\.(0\d*)((?:\.+)?(?:\:\d*)?)$`)
-var rxHexHost = regexp.MustCompile(`^0x([0-9A-Fa-f]+)((?:\.+)?(?:\:\d*)?)$`)
-var rxHostDots = regexp.MustCompile(`^(.+?)(:\d+)?$`)
-var rxEmptyPort = regexp.MustCompile(`:+$`)
-
-// Map of flags to implementation function.
-// FlagDecodeUnnecessaryEscapes has no action, since it is done automatically
-// by parsing the string as an URL. Same for FlagUppercaseEscapes and FlagRemoveEmptyQuerySeparator.
-
-// Since maps have undefined traversing order, make a slice of ordered keys
-var flagsOrder = []NormalizationFlags{
- FlagLowercaseScheme,
- FlagLowercaseHost,
- FlagRemoveDefaultPort,
- FlagRemoveDirectoryIndex,
- FlagRemoveDotSegments,
- FlagRemoveFragment,
- FlagForceHTTP, // Must be after remove default port (because https=443/http=80)
- FlagRemoveDuplicateSlashes,
- FlagRemoveWWW,
- FlagAddWWW,
- FlagSortQuery,
- FlagDecodeDWORDHost,
- FlagDecodeOctalHost,
- FlagDecodeHexHost,
- FlagRemoveUnnecessaryHostDots,
- FlagRemoveEmptyPortSeparator,
- FlagRemoveTrailingSlash, // These two (add/remove trailing slash) must be last
- FlagAddTrailingSlash,
-}
-
-// ... and then the map, where order is unimportant
-var flags = map[NormalizationFlags]func(*url.URL){
- FlagLowercaseScheme: lowercaseScheme,
- FlagLowercaseHost: lowercaseHost,
- FlagRemoveDefaultPort: removeDefaultPort,
- FlagRemoveDirectoryIndex: removeDirectoryIndex,
- FlagRemoveDotSegments: removeDotSegments,
- FlagRemoveFragment: removeFragment,
- FlagForceHTTP: forceHTTP,
- FlagRemoveDuplicateSlashes: removeDuplicateSlashes,
- FlagRemoveWWW: removeWWW,
- FlagAddWWW: addWWW,
- FlagSortQuery: sortQuery,
- FlagDecodeDWORDHost: decodeDWORDHost,
- FlagDecodeOctalHost: decodeOctalHost,
- FlagDecodeHexHost: decodeHexHost,
- FlagRemoveUnnecessaryHostDots: removeUnncessaryHostDots,
- FlagRemoveEmptyPortSeparator: removeEmptyPortSeparator,
- FlagRemoveTrailingSlash: removeTrailingSlash,
- FlagAddTrailingSlash: addTrailingSlash,
-}
-
-// MustNormalizeURLString returns the normalized string, and panics if an error occurs.
-// It takes an URL string as input, as well as the normalization flags.
-func MustNormalizeURLString(u string, f NormalizationFlags) string {
- result, e := NormalizeURLString(u, f)
- if e != nil {
- panic(e)
- }
- return result
-}
-
-// NormalizeURLString returns the normalized string, or an error if it can't be parsed into an URL object.
-// It takes an URL string as input, as well as the normalization flags.
-func NormalizeURLString(u string, f NormalizationFlags) (string, error) {
- parsed, err := url.Parse(u)
- if err != nil {
- return "", err
- }
-
- if f&FlagLowercaseHost == FlagLowercaseHost {
- parsed.Host = strings.ToLower(parsed.Host)
- }
-
- // The idna package doesn't fully conform to RFC 5895
- // (https://tools.ietf.org/html/rfc5895), so we do it here.
- // Taken from Go 1.8 cycle source, courtesy of bradfitz.
- // TODO: Remove when (if?) idna package conforms to RFC 5895.
- parsed.Host = width.Fold.String(parsed.Host)
- parsed.Host = norm.NFC.String(parsed.Host)
- if parsed.Host, err = idna.ToASCII(parsed.Host); err != nil {
- return "", err
- }
-
- return NormalizeURL(parsed, f), nil
-}
-
-// NormalizeURL returns the normalized string.
-// It takes a parsed URL object as input, as well as the normalization flags.
-func NormalizeURL(u *url.URL, f NormalizationFlags) string {
- for _, k := range flagsOrder {
- if f&k == k {
- flags[k](u)
- }
- }
- return urlesc.Escape(u)
-}
-
-func lowercaseScheme(u *url.URL) {
- if len(u.Scheme) > 0 {
- u.Scheme = strings.ToLower(u.Scheme)
- }
-}
-
-func lowercaseHost(u *url.URL) {
- if len(u.Host) > 0 {
- u.Host = strings.ToLower(u.Host)
- }
-}
-
-func removeDefaultPort(u *url.URL) {
- if len(u.Host) > 0 {
- scheme := strings.ToLower(u.Scheme)
- u.Host = rxPort.ReplaceAllStringFunc(u.Host, func(val string) string {
- if (scheme == "http" && val == defaultHttpPort) || (scheme == "https" && val == defaultHttpsPort) {
- return ""
- }
- return val
- })
- }
-}
-
-func removeTrailingSlash(u *url.URL) {
- if l := len(u.Path); l > 0 {
- if strings.HasSuffix(u.Path, "/") {
- u.Path = u.Path[:l-1]
- }
- } else if l = len(u.Host); l > 0 {
- if strings.HasSuffix(u.Host, "/") {
- u.Host = u.Host[:l-1]
- }
- }
-}
-
-func addTrailingSlash(u *url.URL) {
- if l := len(u.Path); l > 0 {
- if !strings.HasSuffix(u.Path, "/") {
- u.Path += "/"
- }
- } else if l = len(u.Host); l > 0 {
- if !strings.HasSuffix(u.Host, "/") {
- u.Host += "/"
- }
- }
-}
-
-func removeDotSegments(u *url.URL) {
- if len(u.Path) > 0 {
- var dotFree []string
- var lastIsDot bool
-
- sections := strings.Split(u.Path, "/")
- for _, s := range sections {
- if s == ".." {
- if len(dotFree) > 0 {
- dotFree = dotFree[:len(dotFree)-1]
- }
- } else if s != "." {
- dotFree = append(dotFree, s)
- }
- lastIsDot = (s == "." || s == "..")
- }
- // Special case if host does not end with / and new path does not begin with /
- u.Path = strings.Join(dotFree, "/")
- if u.Host != "" && !strings.HasSuffix(u.Host, "/") && !strings.HasPrefix(u.Path, "/") {
- u.Path = "/" + u.Path
- }
- // Special case if the last segment was a dot, make sure the path ends with a slash
- if lastIsDot && !strings.HasSuffix(u.Path, "/") {
- u.Path += "/"
- }
- }
-}
-
-func removeDirectoryIndex(u *url.URL) {
- if len(u.Path) > 0 {
- u.Path = rxDirIndex.ReplaceAllString(u.Path, "$1")
- }
-}
-
-func removeFragment(u *url.URL) {
- u.Fragment = ""
-}
-
-func forceHTTP(u *url.URL) {
- if strings.ToLower(u.Scheme) == "https" {
- u.Scheme = "http"
- }
-}
-
-func removeDuplicateSlashes(u *url.URL) {
- if len(u.Path) > 0 {
- u.Path = rxDupSlashes.ReplaceAllString(u.Path, "/")
- }
-}
-
-func removeWWW(u *url.URL) {
- if len(u.Host) > 0 && strings.HasPrefix(strings.ToLower(u.Host), "www.") {
- u.Host = u.Host[4:]
- }
-}
-
-func addWWW(u *url.URL) {
- if len(u.Host) > 0 && !strings.HasPrefix(strings.ToLower(u.Host), "www.") {
- u.Host = "www." + u.Host
- }
-}
-
-func sortQuery(u *url.URL) {
- q := u.Query()
-
- if len(q) > 0 {
- arKeys := make([]string, len(q))
- i := 0
- for k := range q {
- arKeys[i] = k
- i++
- }
- sort.Strings(arKeys)
- buf := new(bytes.Buffer)
- for _, k := range arKeys {
- sort.Strings(q[k])
- for _, v := range q[k] {
- if buf.Len() > 0 {
- buf.WriteRune('&')
- }
- buf.WriteString(fmt.Sprintf("%s=%s", k, urlesc.QueryEscape(v)))
- }
- }
-
- // Rebuild the raw query string
- u.RawQuery = buf.String()
- }
-}
-
-func decodeDWORDHost(u *url.URL) {
- if len(u.Host) > 0 {
- if matches := rxDWORDHost.FindStringSubmatch(u.Host); len(matches) > 2 {
- var parts [4]int64
-
- dword, _ := strconv.ParseInt(matches[1], 10, 0)
- for i, shift := range []uint{24, 16, 8, 0} {
- parts[i] = dword >> shift & 0xFF
- }
- u.Host = fmt.Sprintf("%d.%d.%d.%d%s", parts[0], parts[1], parts[2], parts[3], matches[2])
- }
- }
-}
-
-func decodeOctalHost(u *url.URL) {
- if len(u.Host) > 0 {
- if matches := rxOctalHost.FindStringSubmatch(u.Host); len(matches) > 5 {
- var parts [4]int64
-
- for i := 1; i <= 4; i++ {
- parts[i-1], _ = strconv.ParseInt(matches[i], 8, 0)
- }
- u.Host = fmt.Sprintf("%d.%d.%d.%d%s", parts[0], parts[1], parts[2], parts[3], matches[5])
- }
- }
-}
-
-func decodeHexHost(u *url.URL) {
- if len(u.Host) > 0 {
- if matches := rxHexHost.FindStringSubmatch(u.Host); len(matches) > 2 {
- // Conversion is safe because of regex validation
- parsed, _ := strconv.ParseInt(matches[1], 16, 0)
- // Set host as DWORD (base 10) encoded host
- u.Host = fmt.Sprintf("%d%s", parsed, matches[2])
- // The rest is the same as decoding a DWORD host
- decodeDWORDHost(u)
- }
- }
-}
-
-func removeUnncessaryHostDots(u *url.URL) {
- if len(u.Host) > 0 {
- if matches := rxHostDots.FindStringSubmatch(u.Host); len(matches) > 1 {
- // Trim the leading and trailing dots
- u.Host = strings.Trim(matches[1], ".")
- if len(matches) > 2 {
- u.Host += matches[2]
- }
- }
- }
-}
-
-func removeEmptyPortSeparator(u *url.URL) {
- if len(u.Host) > 0 {
- u.Host = rxEmptyPort.ReplaceAllString(u.Host, "")
- }
-}
diff --git a/vendor/github.com/PuerkitoBio/urlesc/.travis.yml b/vendor/github.com/PuerkitoBio/urlesc/.travis.yml
deleted file mode 100644
index ba6b225f9..000000000
--- a/vendor/github.com/PuerkitoBio/urlesc/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: go
-
-go:
- - 1.4.x
- - 1.5.x
- - 1.6.x
- - 1.7.x
- - 1.8.x
- - tip
-
-install:
- - go build .
-
-script:
- - go test -v
diff --git a/vendor/github.com/PuerkitoBio/urlesc/LICENSE b/vendor/github.com/PuerkitoBio/urlesc/LICENSE
deleted file mode 100644
index 744875676..000000000
--- a/vendor/github.com/PuerkitoBio/urlesc/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/PuerkitoBio/urlesc/README.md b/vendor/github.com/PuerkitoBio/urlesc/README.md
deleted file mode 100644
index 57aff0a53..000000000
--- a/vendor/github.com/PuerkitoBio/urlesc/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-urlesc [](https://travis-ci.org/PuerkitoBio/urlesc) [](http://godoc.org/github.com/PuerkitoBio/urlesc)
-======
-
-Package urlesc implements query escaping as per RFC 3986.
-
-It contains some parts of the net/url package, modified so as to allow
-some reserved characters incorrectly escaped by net/url (see [issue 5684](https://github.com/golang/go/issues/5684)).
-
-## Install
-
- go get github.com/PuerkitoBio/urlesc
-
-## License
-
-Go license (BSD-3-Clause)
-
diff --git a/vendor/github.com/PuerkitoBio/urlesc/urlesc.go b/vendor/github.com/PuerkitoBio/urlesc/urlesc.go
deleted file mode 100644
index 1b8462459..000000000
--- a/vendor/github.com/PuerkitoBio/urlesc/urlesc.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// 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.
-
-// Package urlesc implements query escaping as per RFC 3986.
-// It contains some parts of the net/url package, modified so as to allow
-// some reserved characters incorrectly escaped by net/url.
-// See https://github.com/golang/go/issues/5684
-package urlesc
-
-import (
- "bytes"
- "net/url"
- "strings"
-)
-
-type encoding int
-
-const (
- encodePath encoding = 1 + iota
- encodeUserPassword
- encodeQueryComponent
- encodeFragment
-)
-
-// Return true if the specified character should be escaped when
-// appearing in a URL string, according to RFC 3986.
-func shouldEscape(c byte, mode encoding) bool {
- // §2.3 Unreserved characters (alphanum)
- if 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' {
- return false
- }
-
- switch c {
- case '-', '.', '_', '~': // §2.3 Unreserved characters (mark)
- return false
-
- // §2.2 Reserved characters (reserved)
- case ':', '/', '?', '#', '[', ']', '@', // gen-delims
- '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=': // sub-delims
- // Different sections of the URL allow a few of
- // the reserved characters to appear unescaped.
- switch mode {
- case encodePath: // §3.3
- // The RFC allows sub-delims and : @.
- // '/', '[' and ']' can be used to assign meaning to individual path
- // segments. This package only manipulates the path as a whole,
- // so we allow those as well. That leaves only ? and # to escape.
- return c == '?' || c == '#'
-
- case encodeUserPassword: // §3.2.1
- // The RFC allows : and sub-delims in
- // userinfo. The parsing of userinfo treats ':' as special so we must escape
- // all the gen-delims.
- return c == ':' || c == '/' || c == '?' || c == '#' || c == '[' || c == ']' || c == '@'
-
- case encodeQueryComponent: // §3.4
- // The RFC allows / and ?.
- return c != '/' && c != '?'
-
- case encodeFragment: // §4.1
- // The RFC text is silent but the grammar allows
- // everything, so escape nothing but #
- return c == '#'
- }
- }
-
- // Everything else must be escaped.
- return true
-}
-
-// QueryEscape escapes the string so it can be safely placed
-// inside a URL query.
-func QueryEscape(s string) string {
- return escape(s, encodeQueryComponent)
-}
-
-func escape(s string, mode encoding) string {
- spaceCount, hexCount := 0, 0
- for i := 0; i < len(s); i++ {
- c := s[i]
- if shouldEscape(c, mode) {
- if c == ' ' && mode == encodeQueryComponent {
- spaceCount++
- } else {
- hexCount++
- }
- }
- }
-
- if spaceCount == 0 && hexCount == 0 {
- return s
- }
-
- t := make([]byte, len(s)+2*hexCount)
- j := 0
- for i := 0; i < len(s); i++ {
- switch c := s[i]; {
- case c == ' ' && mode == encodeQueryComponent:
- t[j] = '+'
- j++
- case shouldEscape(c, mode):
- t[j] = '%'
- t[j+1] = "0123456789ABCDEF"[c>>4]
- t[j+2] = "0123456789ABCDEF"[c&15]
- j += 3
- default:
- t[j] = s[i]
- j++
- }
- }
- return string(t)
-}
-
-var uiReplacer = strings.NewReplacer(
- "%21", "!",
- "%27", "'",
- "%28", "(",
- "%29", ")",
- "%2A", "*",
-)
-
-// unescapeUserinfo unescapes some characters that need not to be escaped as per RFC3986.
-func unescapeUserinfo(s string) string {
- return uiReplacer.Replace(s)
-}
-
-// Escape reassembles the URL into a valid URL string.
-// The general form of the result is one of:
-//
-// scheme:opaque
-// scheme://userinfo@host/path?query#fragment
-//
-// If u.Opaque is non-empty, String uses the first form;
-// otherwise it uses the second form.
-//
-// In the second form, the following rules apply:
-// - if u.Scheme is empty, scheme: is omitted.
-// - if u.User is nil, userinfo@ is omitted.
-// - if u.Host is empty, host/ is omitted.
-// - if u.Scheme and u.Host are empty and u.User is nil,
-// the entire scheme://userinfo@host/ is omitted.
-// - if u.Host is non-empty and u.Path begins with a /,
-// the form host/path does not add its own /.
-// - if u.RawQuery is empty, ?query is omitted.
-// - if u.Fragment is empty, #fragment is omitted.
-func Escape(u *url.URL) string {
- var buf bytes.Buffer
- if u.Scheme != "" {
- buf.WriteString(u.Scheme)
- buf.WriteByte(':')
- }
- if u.Opaque != "" {
- buf.WriteString(u.Opaque)
- } else {
- if u.Scheme != "" || u.Host != "" || u.User != nil {
- buf.WriteString("//")
- if ui := u.User; ui != nil {
- buf.WriteString(unescapeUserinfo(ui.String()))
- buf.WriteByte('@')
- }
- if h := u.Host; h != "" {
- buf.WriteString(h)
- }
- }
- if u.Path != "" && u.Path[0] != '/' && u.Host != "" {
- buf.WriteByte('/')
- }
- buf.WriteString(escape(u.Path, encodePath))
- }
- if u.RawQuery != "" {
- buf.WriteByte('?')
- buf.WriteString(u.RawQuery)
- }
- if u.Fragment != "" {
- buf.WriteByte('#')
- buf.WriteString(escape(u.Fragment, encodeFragment))
- }
- return buf.String()
-}
diff --git a/vendor/github.com/alecthomas/template/LICENSE b/vendor/github.com/alecthomas/template/LICENSE
deleted file mode 100644
index 744875676..000000000
--- a/vendor/github.com/alecthomas/template/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/alecthomas/template/README.md b/vendor/github.com/alecthomas/template/README.md
deleted file mode 100644
index ef6a8ee30..000000000
--- a/vendor/github.com/alecthomas/template/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Go's `text/template` package with newline elision
-
-This is a fork of Go 1.4's [text/template](http://golang.org/pkg/text/template/) package with one addition: a backslash immediately after a closing delimiter will delete all subsequent newlines until a non-newline.
-
-eg.
-
-```
-{{if true}}\
-hello
-{{end}}\
-```
-
-Will result in:
-
-```
-hello\n
-```
-
-Rather than:
-
-```
-\n
-hello\n
-\n
-```
diff --git a/vendor/github.com/alecthomas/template/doc.go b/vendor/github.com/alecthomas/template/doc.go
deleted file mode 100644
index 223c595c2..000000000
--- a/vendor/github.com/alecthomas/template/doc.go
+++ /dev/null
@@ -1,406 +0,0 @@
-// Copyright 2011 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.
-
-/*
-Package template implements data-driven templates for generating textual output.
-
-To generate HTML output, see package html/template, which has the same interface
-as this package but automatically secures HTML output against certain attacks.
-
-Templates are executed by applying them to a data structure. Annotations in the
-template refer to elements of the data structure (typically a field of a struct
-or a key in a map) to control execution and derive values to be displayed.
-Execution of the template walks the structure and sets the cursor, represented
-by a period '.' and called "dot", to the value at the current location in the
-structure as execution proceeds.
-
-The input text for a template is UTF-8-encoded text in any format.
-"Actions"--data evaluations or control structures--are delimited by
-"{{" and "}}"; all text outside actions is copied to the output unchanged.
-Actions may not span newlines, although comments can.
-
-Once parsed, a template may be executed safely in parallel.
-
-Here is a trivial example that prints "17 items are made of wool".
-
- type Inventory struct {
- Material string
- Count uint
- }
- sweaters := Inventory{"wool", 17}
- tmpl, err := template.New("test").Parse("{{.Count}} items are made of {{.Material}}")
- if err != nil { panic(err) }
- err = tmpl.Execute(os.Stdout, sweaters)
- if err != nil { panic(err) }
-
-More intricate examples appear below.
-
-Actions
-
-Here is the list of actions. "Arguments" and "pipelines" are evaluations of
-data, defined in detail below.
-
-*/
-// {{/* a comment */}}
-// A comment; discarded. May contain newlines.
-// Comments do not nest and must start and end at the
-// delimiters, as shown here.
-/*
-
- {{pipeline}}
- The default textual representation of the value of the pipeline
- is copied to the output.
-
- {{if pipeline}} T1 {{end}}
- If the value of the pipeline is empty, no output is generated;
- otherwise, T1 is executed. The empty values are false, 0, any
- nil pointer or interface value, and any array, slice, map, or
- string of length zero.
- Dot is unaffected.
-
- {{if pipeline}} T1 {{else}} T0 {{end}}
- If the value of the pipeline is empty, T0 is executed;
- otherwise, T1 is executed. Dot is unaffected.
-
- {{if pipeline}} T1 {{else if pipeline}} T0 {{end}}
- To simplify the appearance of if-else chains, the else action
- of an if may include another if directly; the effect is exactly
- the same as writing
- {{if pipeline}} T1 {{else}}{{if pipeline}} T0 {{end}}{{end}}
-
- {{range pipeline}} T1 {{end}}
- The value of the pipeline must be an array, slice, map, or channel.
- If the value of the pipeline has length zero, nothing is output;
- otherwise, dot is set to the successive elements of the array,
- slice, or map and T1 is executed. If the value is a map and the
- keys are of basic type with a defined order ("comparable"), the
- elements will be visited in sorted key order.
-
- {{range pipeline}} T1 {{else}} T0 {{end}}
- The value of the pipeline must be an array, slice, map, or channel.
- If the value of the pipeline has length zero, dot is unaffected and
- T0 is executed; otherwise, dot is set to the successive elements
- of the array, slice, or map and T1 is executed.
-
- {{template "name"}}
- The template with the specified name is executed with nil data.
-
- {{template "name" pipeline}}
- The template with the specified name is executed with dot set
- to the value of the pipeline.
-
- {{with pipeline}} T1 {{end}}
- If the value of the pipeline is empty, no output is generated;
- otherwise, dot is set to the value of the pipeline and T1 is
- executed.
-
- {{with pipeline}} T1 {{else}} T0 {{end}}
- If the value of the pipeline is empty, dot is unaffected and T0
- is executed; otherwise, dot is set to the value of the pipeline
- and T1 is executed.
-
-Arguments
-
-An argument is a simple value, denoted by one of the following.
-
- - A boolean, string, character, integer, floating-point, imaginary
- or complex constant in Go syntax. These behave like Go's untyped
- constants, although raw strings may not span newlines.
- - The keyword nil, representing an untyped Go nil.
- - The character '.' (period):
- .
- The result is the value of dot.
- - A variable name, which is a (possibly empty) alphanumeric string
- preceded by a dollar sign, such as
- $piOver2
- or
- $
- The result is the value of the variable.
- Variables are described below.
- - The name of a field of the data, which must be a struct, preceded
- by a period, such as
- .Field
- The result is the value of the field. Field invocations may be
- chained:
- .Field1.Field2
- Fields can also be evaluated on variables, including chaining:
- $x.Field1.Field2
- - The name of a key of the data, which must be a map, preceded
- by a period, such as
- .Key
- The result is the map element value indexed by the key.
- Key invocations may be chained and combined with fields to any
- depth:
- .Field1.Key1.Field2.Key2
- Although the key must be an alphanumeric identifier, unlike with
- field names they do not need to start with an upper case letter.
- Keys can also be evaluated on variables, including chaining:
- $x.key1.key2
- - The name of a niladic method of the data, preceded by a period,
- such as
- .Method
- The result is the value of invoking the method with dot as the
- receiver, dot.Method(). Such a method must have one return value (of
- any type) or two return values, the second of which is an error.
- If it has two and the returned error is non-nil, execution terminates
- and an error is returned to the caller as the value of Execute.
- Method invocations may be chained and combined with fields and keys
- to any depth:
- .Field1.Key1.Method1.Field2.Key2.Method2
- Methods can also be evaluated on variables, including chaining:
- $x.Method1.Field
- - The name of a niladic function, such as
- fun
- The result is the value of invoking the function, fun(). The return
- types and values behave as in methods. Functions and function
- names are described below.
- - A parenthesized instance of one the above, for grouping. The result
- may be accessed by a field or map key invocation.
- print (.F1 arg1) (.F2 arg2)
- (.StructValuedMethod "arg").Field
-
-Arguments may evaluate to any type; if they are pointers the implementation
-automatically indirects to the base type when required.
-If an evaluation yields a function value, such as a function-valued
-field of a struct, the function is not invoked automatically, but it
-can be used as a truth value for an if action and the like. To invoke
-it, use the call function, defined below.
-
-A pipeline is a possibly chained sequence of "commands". A command is a simple
-value (argument) or a function or method call, possibly with multiple arguments:
-
- Argument
- The result is the value of evaluating the argument.
- .Method [Argument...]
- The method can be alone or the last element of a chain but,
- unlike methods in the middle of a chain, it can take arguments.
- The result is the value of calling the method with the
- arguments:
- dot.Method(Argument1, etc.)
- functionName [Argument...]
- The result is the value of calling the function associated
- with the name:
- function(Argument1, etc.)
- Functions and function names are described below.
-
-Pipelines
-
-A pipeline may be "chained" by separating a sequence of commands with pipeline
-characters '|'. In a chained pipeline, the result of the each command is
-passed as the last argument of the following command. The output of the final
-command in the pipeline is the value of the pipeline.
-
-The output of a command will be either one value or two values, the second of
-which has type error. If that second value is present and evaluates to
-non-nil, execution terminates and the error is returned to the caller of
-Execute.
-
-Variables
-
-A pipeline inside an action may initialize a variable to capture the result.
-The initialization has syntax
-
- $variable := pipeline
-
-where $variable is the name of the variable. An action that declares a
-variable produces no output.
-
-If a "range" action initializes a variable, the variable is set to the
-successive elements of the iteration. Also, a "range" may declare two
-variables, separated by a comma:
-
- range $index, $element := pipeline
-
-in which case $index and $element are set to the successive values of the
-array/slice index or map key and element, respectively. Note that if there is
-only one variable, it is assigned the element; this is opposite to the
-convention in Go range clauses.
-
-A variable's scope extends to the "end" action of the control structure ("if",
-"with", or "range") in which it is declared, or to the end of the template if
-there is no such control structure. A template invocation does not inherit
-variables from the point of its invocation.
-
-When execution begins, $ is set to the data argument passed to Execute, that is,
-to the starting value of dot.
-
-Examples
-
-Here are some example one-line templates demonstrating pipelines and variables.
-All produce the quoted word "output":
-
- {{"\"output\""}}
- A string constant.
- {{`"output"`}}
- A raw string constant.
- {{printf "%q" "output"}}
- A function call.
- {{"output" | printf "%q"}}
- A function call whose final argument comes from the previous
- command.
- {{printf "%q" (print "out" "put")}}
- A parenthesized argument.
- {{"put" | printf "%s%s" "out" | printf "%q"}}
- A more elaborate call.
- {{"output" | printf "%s" | printf "%q"}}
- A longer chain.
- {{with "output"}}{{printf "%q" .}}{{end}}
- A with action using dot.
- {{with $x := "output" | printf "%q"}}{{$x}}{{end}}
- A with action that creates and uses a variable.
- {{with $x := "output"}}{{printf "%q" $x}}{{end}}
- A with action that uses the variable in another action.
- {{with $x := "output"}}{{$x | printf "%q"}}{{end}}
- The same, but pipelined.
-
-Functions
-
-During execution functions are found in two function maps: first in the
-template, then in the global function map. By default, no functions are defined
-in the template but the Funcs method can be used to add them.
-
-Predefined global functions are named as follows.
-
- and
- Returns the boolean AND of its arguments by returning the
- first empty argument or the last argument, that is,
- "and x y" behaves as "if x then y else x". All the
- arguments are evaluated.
- call
- Returns the result of calling the first argument, which
- must be a function, with the remaining arguments as parameters.
- Thus "call .X.Y 1 2" is, in Go notation, dot.X.Y(1, 2) where
- Y is a func-valued field, map entry, or the like.
- The first argument must be the result of an evaluation
- that yields a value of function type (as distinct from
- a predefined function such as print). The function must
- return either one or two result values, the second of which
- is of type error. If the arguments don't match the function
- or the returned error value is non-nil, execution stops.
- html
- Returns the escaped HTML equivalent of the textual
- representation of its arguments.
- index
- Returns the result of indexing its first argument by the
- following arguments. Thus "index x 1 2 3" is, in Go syntax,
- x[1][2][3]. Each indexed item must be a map, slice, or array.
- js
- Returns the escaped JavaScript equivalent of the textual
- representation of its arguments.
- len
- Returns the integer length of its argument.
- not
- Returns the boolean negation of its single argument.
- or
- Returns the boolean OR of its arguments by returning the
- first non-empty argument or the last argument, that is,
- "or x y" behaves as "if x then x else y". All the
- arguments are evaluated.
- print
- An alias for fmt.Sprint
- printf
- An alias for fmt.Sprintf
- println
- An alias for fmt.Sprintln
- urlquery
- Returns the escaped value of the textual representation of
- its arguments in a form suitable for embedding in a URL query.
-
-The boolean functions take any zero value to be false and a non-zero
-value to be true.
-
-There is also a set of binary comparison operators defined as
-functions:
-
- eq
- Returns the boolean truth of arg1 == arg2
- ne
- Returns the boolean truth of arg1 != arg2
- lt
- Returns the boolean truth of arg1 < arg2
- le
- Returns the boolean truth of arg1 <= arg2
- gt
- Returns the boolean truth of arg1 > arg2
- ge
- Returns the boolean truth of arg1 >= arg2
-
-For simpler multi-way equality tests, eq (only) accepts two or more
-arguments and compares the second and subsequent to the first,
-returning in effect
-
- arg1==arg2 || arg1==arg3 || arg1==arg4 ...
-
-(Unlike with || in Go, however, eq is a function call and all the
-arguments will be evaluated.)
-
-The comparison functions work on basic types only (or named basic
-types, such as "type Celsius float32"). They implement the Go rules
-for comparison of values, except that size and exact type are
-ignored, so any integer value, signed or unsigned, may be compared
-with any other integer value. (The arithmetic value is compared,
-not the bit pattern, so all negative integers are less than all
-unsigned integers.) However, as usual, one may not compare an int
-with a float32 and so on.
-
-Associated templates
-
-Each template is named by a string specified when it is created. Also, each
-template is associated with zero or more other templates that it may invoke by
-name; such associations are transitive and form a name space of templates.
-
-A template may use a template invocation to instantiate another associated
-template; see the explanation of the "template" action above. The name must be
-that of a template associated with the template that contains the invocation.
-
-Nested template definitions
-
-When parsing a template, another template may be defined and associated with the
-template being parsed. Template definitions must appear at the top level of the
-template, much like global variables in a Go program.
-
-The syntax of such definitions is to surround each template declaration with a
-"define" and "end" action.
-
-The define action names the template being created by providing a string
-constant. Here is a simple example:
-
- `{{define "T1"}}ONE{{end}}
- {{define "T2"}}TWO{{end}}
- {{define "T3"}}{{template "T1"}} {{template "T2"}}{{end}}
- {{template "T3"}}`
-
-This defines two templates, T1 and T2, and a third T3 that invokes the other two
-when it is executed. Finally it invokes T3. If executed this template will
-produce the text
-
- ONE TWO
-
-By construction, a template may reside in only one association. If it's
-necessary to have a template addressable from multiple associations, the
-template definition must be parsed multiple times to create distinct *Template
-values, or must be copied with the Clone or AddParseTree method.
-
-Parse may be called multiple times to assemble the various associated templates;
-see the ParseFiles and ParseGlob functions and methods for simple ways to parse
-related templates stored in files.
-
-A template may be executed directly or through ExecuteTemplate, which executes
-an associated template identified by name. To invoke our example above, we
-might write,
-
- err := tmpl.Execute(os.Stdout, "no data needed")
- if err != nil {
- log.Fatalf("execution failed: %s", err)
- }
-
-or to invoke a particular template explicitly by name,
-
- err := tmpl.ExecuteTemplate(os.Stdout, "T2", "no data needed")
- if err != nil {
- log.Fatalf("execution failed: %s", err)
- }
-
-*/
-package template
diff --git a/vendor/github.com/alecthomas/template/exec.go b/vendor/github.com/alecthomas/template/exec.go
deleted file mode 100644
index c3078e5d0..000000000
--- a/vendor/github.com/alecthomas/template/exec.go
+++ /dev/null
@@ -1,845 +0,0 @@
-// Copyright 2011 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.
-
-package template
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "runtime"
- "sort"
- "strings"
-
- "github.com/alecthomas/template/parse"
-)
-
-// state represents the state of an execution. It's not part of the
-// template so that multiple executions of the same template
-// can execute in parallel.
-type state struct {
- tmpl *Template
- wr io.Writer
- node parse.Node // current node, for errors
- vars []variable // push-down stack of variable values.
-}
-
-// variable holds the dynamic value of a variable such as $, $x etc.
-type variable struct {
- name string
- value reflect.Value
-}
-
-// push pushes a new variable on the stack.
-func (s *state) push(name string, value reflect.Value) {
- s.vars = append(s.vars, variable{name, value})
-}
-
-// mark returns the length of the variable stack.
-func (s *state) mark() int {
- return len(s.vars)
-}
-
-// pop pops the variable stack up to the mark.
-func (s *state) pop(mark int) {
- s.vars = s.vars[0:mark]
-}
-
-// setVar overwrites the top-nth variable on the stack. Used by range iterations.
-func (s *state) setVar(n int, value reflect.Value) {
- s.vars[len(s.vars)-n].value = value
-}
-
-// varValue returns the value of the named variable.
-func (s *state) varValue(name string) reflect.Value {
- for i := s.mark() - 1; i >= 0; i-- {
- if s.vars[i].name == name {
- return s.vars[i].value
- }
- }
- s.errorf("undefined variable: %s", name)
- return zero
-}
-
-var zero reflect.Value
-
-// at marks the state to be on node n, for error reporting.
-func (s *state) at(node parse.Node) {
- s.node = node
-}
-
-// doublePercent returns the string with %'s replaced by %%, if necessary,
-// so it can be used safely inside a Printf format string.
-func doublePercent(str string) string {
- if strings.Contains(str, "%") {
- str = strings.Replace(str, "%", "%%", -1)
- }
- return str
-}
-
-// errorf formats the error and terminates processing.
-func (s *state) errorf(format string, args ...interface{}) {
- name := doublePercent(s.tmpl.Name())
- if s.node == nil {
- format = fmt.Sprintf("template: %s: %s", name, format)
- } else {
- location, context := s.tmpl.ErrorContext(s.node)
- format = fmt.Sprintf("template: %s: executing %q at <%s>: %s", location, name, doublePercent(context), format)
- }
- panic(fmt.Errorf(format, args...))
-}
-
-// errRecover is the handler that turns panics into returns from the top
-// level of Parse.
-func errRecover(errp *error) {
- e := recover()
- if e != nil {
- switch err := e.(type) {
- case runtime.Error:
- panic(e)
- case error:
- *errp = err
- default:
- panic(e)
- }
- }
-}
-
-// ExecuteTemplate applies the template associated with t that has the given name
-// to the specified data object and writes the output to wr.
-// If an error occurs executing the template or writing its output,
-// execution stops, but partial results may already have been written to
-// the output writer.
-// A template may be executed safely in parallel.
-func (t *Template) ExecuteTemplate(wr io.Writer, name string, data interface{}) error {
- tmpl := t.tmpl[name]
- if tmpl == nil {
- return fmt.Errorf("template: no template %q associated with template %q", name, t.name)
- }
- return tmpl.Execute(wr, data)
-}
-
-// Execute applies a parsed template to the specified data object,
-// and writes the output to wr.
-// If an error occurs executing the template or writing its output,
-// execution stops, but partial results may already have been written to
-// the output writer.
-// A template may be executed safely in parallel.
-func (t *Template) Execute(wr io.Writer, data interface{}) (err error) {
- defer errRecover(&err)
- value := reflect.ValueOf(data)
- state := &state{
- tmpl: t,
- wr: wr,
- vars: []variable{{"$", value}},
- }
- t.init()
- if t.Tree == nil || t.Root == nil {
- var b bytes.Buffer
- for name, tmpl := range t.tmpl {
- if tmpl.Tree == nil || tmpl.Root == nil {
- continue
- }
- if b.Len() > 0 {
- b.WriteString(", ")
- }
- fmt.Fprintf(&b, "%q", name)
- }
- var s string
- if b.Len() > 0 {
- s = "; defined templates are: " + b.String()
- }
- state.errorf("%q is an incomplete or empty template%s", t.Name(), s)
- }
- state.walk(value, t.Root)
- return
-}
-
-// Walk functions step through the major pieces of the template structure,
-// generating output as they go.
-func (s *state) walk(dot reflect.Value, node parse.Node) {
- s.at(node)
- switch node := node.(type) {
- case *parse.ActionNode:
- // Do not pop variables so they persist until next end.
- // Also, if the action declares variables, don't print the result.
- val := s.evalPipeline(dot, node.Pipe)
- if len(node.Pipe.Decl) == 0 {
- s.printValue(node, val)
- }
- case *parse.IfNode:
- s.walkIfOrWith(parse.NodeIf, dot, node.Pipe, node.List, node.ElseList)
- case *parse.ListNode:
- for _, node := range node.Nodes {
- s.walk(dot, node)
- }
- case *parse.RangeNode:
- s.walkRange(dot, node)
- case *parse.TemplateNode:
- s.walkTemplate(dot, node)
- case *parse.TextNode:
- if _, err := s.wr.Write(node.Text); err != nil {
- s.errorf("%s", err)
- }
- case *parse.WithNode:
- s.walkIfOrWith(parse.NodeWith, dot, node.Pipe, node.List, node.ElseList)
- default:
- s.errorf("unknown node: %s", node)
- }
-}
-
-// walkIfOrWith walks an 'if' or 'with' node. The two control structures
-// are identical in behavior except that 'with' sets dot.
-func (s *state) walkIfOrWith(typ parse.NodeType, dot reflect.Value, pipe *parse.PipeNode, list, elseList *parse.ListNode) {
- defer s.pop(s.mark())
- val := s.evalPipeline(dot, pipe)
- truth, ok := isTrue(val)
- if !ok {
- s.errorf("if/with can't use %v", val)
- }
- if truth {
- if typ == parse.NodeWith {
- s.walk(val, list)
- } else {
- s.walk(dot, list)
- }
- } else if elseList != nil {
- s.walk(dot, elseList)
- }
-}
-
-// isTrue reports whether the value is 'true', in the sense of not the zero of its type,
-// and whether the value has a meaningful truth value.
-func isTrue(val reflect.Value) (truth, ok bool) {
- if !val.IsValid() {
- // Something like var x interface{}, never set. It's a form of nil.
- return false, true
- }
- switch val.Kind() {
- case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
- truth = val.Len() > 0
- case reflect.Bool:
- truth = val.Bool()
- case reflect.Complex64, reflect.Complex128:
- truth = val.Complex() != 0
- case reflect.Chan, reflect.Func, reflect.Ptr, reflect.Interface:
- truth = !val.IsNil()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- truth = val.Int() != 0
- case reflect.Float32, reflect.Float64:
- truth = val.Float() != 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- truth = val.Uint() != 0
- case reflect.Struct:
- truth = true // Struct values are always true.
- default:
- return
- }
- return truth, true
-}
-
-func (s *state) walkRange(dot reflect.Value, r *parse.RangeNode) {
- s.at(r)
- defer s.pop(s.mark())
- val, _ := indirect(s.evalPipeline(dot, r.Pipe))
- // mark top of stack before any variables in the body are pushed.
- mark := s.mark()
- oneIteration := func(index, elem reflect.Value) {
- // Set top var (lexically the second if there are two) to the element.
- if len(r.Pipe.Decl) > 0 {
- s.setVar(1, elem)
- }
- // Set next var (lexically the first if there are two) to the index.
- if len(r.Pipe.Decl) > 1 {
- s.setVar(2, index)
- }
- s.walk(elem, r.List)
- s.pop(mark)
- }
- switch val.Kind() {
- case reflect.Array, reflect.Slice:
- if val.Len() == 0 {
- break
- }
- for i := 0; i < val.Len(); i++ {
- oneIteration(reflect.ValueOf(i), val.Index(i))
- }
- return
- case reflect.Map:
- if val.Len() == 0 {
- break
- }
- for _, key := range sortKeys(val.MapKeys()) {
- oneIteration(key, val.MapIndex(key))
- }
- return
- case reflect.Chan:
- if val.IsNil() {
- break
- }
- i := 0
- for ; ; i++ {
- elem, ok := val.Recv()
- if !ok {
- break
- }
- oneIteration(reflect.ValueOf(i), elem)
- }
- if i == 0 {
- break
- }
- return
- case reflect.Invalid:
- break // An invalid value is likely a nil map, etc. and acts like an empty map.
- default:
- s.errorf("range can't iterate over %v", val)
- }
- if r.ElseList != nil {
- s.walk(dot, r.ElseList)
- }
-}
-
-func (s *state) walkTemplate(dot reflect.Value, t *parse.TemplateNode) {
- s.at(t)
- tmpl := s.tmpl.tmpl[t.Name]
- if tmpl == nil {
- s.errorf("template %q not defined", t.Name)
- }
- // Variables declared by the pipeline persist.
- dot = s.evalPipeline(dot, t.Pipe)
- newState := *s
- newState.tmpl = tmpl
- // No dynamic scoping: template invocations inherit no variables.
- newState.vars = []variable{{"$", dot}}
- newState.walk(dot, tmpl.Root)
-}
-
-// Eval functions evaluate pipelines, commands, and their elements and extract
-// values from the data structure by examining fields, calling methods, and so on.
-// The printing of those values happens only through walk functions.
-
-// evalPipeline returns the value acquired by evaluating a pipeline. If the
-// pipeline has a variable declaration, the variable will be pushed on the
-// stack. Callers should therefore pop the stack after they are finished
-// executing commands depending on the pipeline value.
-func (s *state) evalPipeline(dot reflect.Value, pipe *parse.PipeNode) (value reflect.Value) {
- if pipe == nil {
- return
- }
- s.at(pipe)
- for _, cmd := range pipe.Cmds {
- value = s.evalCommand(dot, cmd, value) // previous value is this one's final arg.
- // If the object has type interface{}, dig down one level to the thing inside.
- if value.Kind() == reflect.Interface && value.Type().NumMethod() == 0 {
- value = reflect.ValueOf(value.Interface()) // lovely!
- }
- }
- for _, variable := range pipe.Decl {
- s.push(variable.Ident[0], value)
- }
- return value
-}
-
-func (s *state) notAFunction(args []parse.Node, final reflect.Value) {
- if len(args) > 1 || final.IsValid() {
- s.errorf("can't give argument to non-function %s", args[0])
- }
-}
-
-func (s *state) evalCommand(dot reflect.Value, cmd *parse.CommandNode, final reflect.Value) reflect.Value {
- firstWord := cmd.Args[0]
- switch n := firstWord.(type) {
- case *parse.FieldNode:
- return s.evalFieldNode(dot, n, cmd.Args, final)
- case *parse.ChainNode:
- return s.evalChainNode(dot, n, cmd.Args, final)
- case *parse.IdentifierNode:
- // Must be a function.
- return s.evalFunction(dot, n, cmd, cmd.Args, final)
- case *parse.PipeNode:
- // Parenthesized pipeline. The arguments are all inside the pipeline; final is ignored.
- return s.evalPipeline(dot, n)
- case *parse.VariableNode:
- return s.evalVariableNode(dot, n, cmd.Args, final)
- }
- s.at(firstWord)
- s.notAFunction(cmd.Args, final)
- switch word := firstWord.(type) {
- case *parse.BoolNode:
- return reflect.ValueOf(word.True)
- case *parse.DotNode:
- return dot
- case *parse.NilNode:
- s.errorf("nil is not a command")
- case *parse.NumberNode:
- return s.idealConstant(word)
- case *parse.StringNode:
- return reflect.ValueOf(word.Text)
- }
- s.errorf("can't evaluate command %q", firstWord)
- panic("not reached")
-}
-
-// idealConstant is called to return the value of a number in a context where
-// we don't know the type. In that case, the syntax of the number tells us
-// its type, and we use Go rules to resolve. Note there is no such thing as
-// a uint ideal constant in this situation - the value must be of int type.
-func (s *state) idealConstant(constant *parse.NumberNode) reflect.Value {
- // These are ideal constants but we don't know the type
- // and we have no context. (If it was a method argument,
- // we'd know what we need.) The syntax guides us to some extent.
- s.at(constant)
- switch {
- case constant.IsComplex:
- return reflect.ValueOf(constant.Complex128) // incontrovertible.
- case constant.IsFloat && !isHexConstant(constant.Text) && strings.IndexAny(constant.Text, ".eE") >= 0:
- return reflect.ValueOf(constant.Float64)
- case constant.IsInt:
- n := int(constant.Int64)
- if int64(n) != constant.Int64 {
- s.errorf("%s overflows int", constant.Text)
- }
- return reflect.ValueOf(n)
- case constant.IsUint:
- s.errorf("%s overflows int", constant.Text)
- }
- return zero
-}
-
-func isHexConstant(s string) bool {
- return len(s) > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X')
-}
-
-func (s *state) evalFieldNode(dot reflect.Value, field *parse.FieldNode, args []parse.Node, final reflect.Value) reflect.Value {
- s.at(field)
- return s.evalFieldChain(dot, dot, field, field.Ident, args, final)
-}
-
-func (s *state) evalChainNode(dot reflect.Value, chain *parse.ChainNode, args []parse.Node, final reflect.Value) reflect.Value {
- s.at(chain)
- // (pipe).Field1.Field2 has pipe as .Node, fields as .Field. Eval the pipeline, then the fields.
- pipe := s.evalArg(dot, nil, chain.Node)
- if len(chain.Field) == 0 {
- s.errorf("internal error: no fields in evalChainNode")
- }
- return s.evalFieldChain(dot, pipe, chain, chain.Field, args, final)
-}
-
-func (s *state) evalVariableNode(dot reflect.Value, variable *parse.VariableNode, args []parse.Node, final reflect.Value) reflect.Value {
- // $x.Field has $x as the first ident, Field as the second. Eval the var, then the fields.
- s.at(variable)
- value := s.varValue(variable.Ident[0])
- if len(variable.Ident) == 1 {
- s.notAFunction(args, final)
- return value
- }
- return s.evalFieldChain(dot, value, variable, variable.Ident[1:], args, final)
-}
-
-// evalFieldChain evaluates .X.Y.Z possibly followed by arguments.
-// dot is the environment in which to evaluate arguments, while
-// receiver is the value being walked along the chain.
-func (s *state) evalFieldChain(dot, receiver reflect.Value, node parse.Node, ident []string, args []parse.Node, final reflect.Value) reflect.Value {
- n := len(ident)
- for i := 0; i < n-1; i++ {
- receiver = s.evalField(dot, ident[i], node, nil, zero, receiver)
- }
- // Now if it's a method, it gets the arguments.
- return s.evalField(dot, ident[n-1], node, args, final, receiver)
-}
-
-func (s *state) evalFunction(dot reflect.Value, node *parse.IdentifierNode, cmd parse.Node, args []parse.Node, final reflect.Value) reflect.Value {
- s.at(node)
- name := node.Ident
- function, ok := findFunction(name, s.tmpl)
- if !ok {
- s.errorf("%q is not a defined function", name)
- }
- return s.evalCall(dot, function, cmd, name, args, final)
-}
-
-// evalField evaluates an expression like (.Field) or (.Field arg1 arg2).
-// The 'final' argument represents the return value from the preceding
-// value of the pipeline, if any.
-func (s *state) evalField(dot reflect.Value, fieldName string, node parse.Node, args []parse.Node, final, receiver reflect.Value) reflect.Value {
- if !receiver.IsValid() {
- return zero
- }
- typ := receiver.Type()
- receiver, _ = indirect(receiver)
- // Unless it's an interface, need to get to a value of type *T to guarantee
- // we see all methods of T and *T.
- ptr := receiver
- if ptr.Kind() != reflect.Interface && ptr.CanAddr() {
- ptr = ptr.Addr()
- }
- if method := ptr.MethodByName(fieldName); method.IsValid() {
- return s.evalCall(dot, method, node, fieldName, args, final)
- }
- hasArgs := len(args) > 1 || final.IsValid()
- // It's not a method; must be a field of a struct or an element of a map. The receiver must not be nil.
- receiver, isNil := indirect(receiver)
- if isNil {
- s.errorf("nil pointer evaluating %s.%s", typ, fieldName)
- }
- switch receiver.Kind() {
- case reflect.Struct:
- tField, ok := receiver.Type().FieldByName(fieldName)
- if ok {
- field := receiver.FieldByIndex(tField.Index)
- if tField.PkgPath != "" { // field is unexported
- s.errorf("%s is an unexported field of struct type %s", fieldName, typ)
- }
- // If it's a function, we must call it.
- if hasArgs {
- s.errorf("%s has arguments but cannot be invoked as function", fieldName)
- }
- return field
- }
- s.errorf("%s is not a field of struct type %s", fieldName, typ)
- case reflect.Map:
- // If it's a map, attempt to use the field name as a key.
- nameVal := reflect.ValueOf(fieldName)
- if nameVal.Type().AssignableTo(receiver.Type().Key()) {
- if hasArgs {
- s.errorf("%s is not a method but has arguments", fieldName)
- }
- return receiver.MapIndex(nameVal)
- }
- }
- s.errorf("can't evaluate field %s in type %s", fieldName, typ)
- panic("not reached")
-}
-
-var (
- errorType = reflect.TypeOf((*error)(nil)).Elem()
- fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem()
-)
-
-// evalCall executes a function or method call. If it's a method, fun already has the receiver bound, so
-// it looks just like a function call. The arg list, if non-nil, includes (in the manner of the shell), arg[0]
-// as the function itself.
-func (s *state) evalCall(dot, fun reflect.Value, node parse.Node, name string, args []parse.Node, final reflect.Value) reflect.Value {
- if args != nil {
- args = args[1:] // Zeroth arg is function name/node; not passed to function.
- }
- typ := fun.Type()
- numIn := len(args)
- if final.IsValid() {
- numIn++
- }
- numFixed := len(args)
- if typ.IsVariadic() {
- numFixed = typ.NumIn() - 1 // last arg is the variadic one.
- if numIn < numFixed {
- s.errorf("wrong number of args for %s: want at least %d got %d", name, typ.NumIn()-1, len(args))
- }
- } else if numIn < typ.NumIn()-1 || !typ.IsVariadic() && numIn != typ.NumIn() {
- s.errorf("wrong number of args for %s: want %d got %d", name, typ.NumIn(), len(args))
- }
- if !goodFunc(typ) {
- // TODO: This could still be a confusing error; maybe goodFunc should provide info.
- s.errorf("can't call method/function %q with %d results", name, typ.NumOut())
- }
- // Build the arg list.
- argv := make([]reflect.Value, numIn)
- // Args must be evaluated. Fixed args first.
- i := 0
- for ; i < numFixed && i < len(args); i++ {
- argv[i] = s.evalArg(dot, typ.In(i), args[i])
- }
- // Now the ... args.
- if typ.IsVariadic() {
- argType := typ.In(typ.NumIn() - 1).Elem() // Argument is a slice.
- for ; i < len(args); i++ {
- argv[i] = s.evalArg(dot, argType, args[i])
- }
- }
- // Add final value if necessary.
- if final.IsValid() {
- t := typ.In(typ.NumIn() - 1)
- if typ.IsVariadic() {
- t = t.Elem()
- }
- argv[i] = s.validateType(final, t)
- }
- result := fun.Call(argv)
- // If we have an error that is not nil, stop execution and return that error to the caller.
- if len(result) == 2 && !result[1].IsNil() {
- s.at(node)
- s.errorf("error calling %s: %s", name, result[1].Interface().(error))
- }
- return result[0]
-}
-
-// canBeNil reports whether an untyped nil can be assigned to the type. See reflect.Zero.
-func canBeNil(typ reflect.Type) bool {
- switch typ.Kind() {
- case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
- return true
- }
- return false
-}
-
-// validateType guarantees that the value is valid and assignable to the type.
-func (s *state) validateType(value reflect.Value, typ reflect.Type) reflect.Value {
- if !value.IsValid() {
- if typ == nil || canBeNil(typ) {
- // An untyped nil interface{}. Accept as a proper nil value.
- return reflect.Zero(typ)
- }
- s.errorf("invalid value; expected %s", typ)
- }
- if typ != nil && !value.Type().AssignableTo(typ) {
- if value.Kind() == reflect.Interface && !value.IsNil() {
- value = value.Elem()
- if value.Type().AssignableTo(typ) {
- return value
- }
- // fallthrough
- }
- // Does one dereference or indirection work? We could do more, as we
- // do with method receivers, but that gets messy and method receivers
- // are much more constrained, so it makes more sense there than here.
- // Besides, one is almost always all you need.
- switch {
- case value.Kind() == reflect.Ptr && value.Type().Elem().AssignableTo(typ):
- value = value.Elem()
- if !value.IsValid() {
- s.errorf("dereference of nil pointer of type %s", typ)
- }
- case reflect.PtrTo(value.Type()).AssignableTo(typ) && value.CanAddr():
- value = value.Addr()
- default:
- s.errorf("wrong type for value; expected %s; got %s", typ, value.Type())
- }
- }
- return value
-}
-
-func (s *state) evalArg(dot reflect.Value, typ reflect.Type, n parse.Node) reflect.Value {
- s.at(n)
- switch arg := n.(type) {
- case *parse.DotNode:
- return s.validateType(dot, typ)
- case *parse.NilNode:
- if canBeNil(typ) {
- return reflect.Zero(typ)
- }
- s.errorf("cannot assign nil to %s", typ)
- case *parse.FieldNode:
- return s.validateType(s.evalFieldNode(dot, arg, []parse.Node{n}, zero), typ)
- case *parse.VariableNode:
- return s.validateType(s.evalVariableNode(dot, arg, nil, zero), typ)
- case *parse.PipeNode:
- return s.validateType(s.evalPipeline(dot, arg), typ)
- case *parse.IdentifierNode:
- return s.evalFunction(dot, arg, arg, nil, zero)
- case *parse.ChainNode:
- return s.validateType(s.evalChainNode(dot, arg, nil, zero), typ)
- }
- switch typ.Kind() {
- case reflect.Bool:
- return s.evalBool(typ, n)
- case reflect.Complex64, reflect.Complex128:
- return s.evalComplex(typ, n)
- case reflect.Float32, reflect.Float64:
- return s.evalFloat(typ, n)
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return s.evalInteger(typ, n)
- case reflect.Interface:
- if typ.NumMethod() == 0 {
- return s.evalEmptyInterface(dot, n)
- }
- case reflect.String:
- return s.evalString(typ, n)
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return s.evalUnsignedInteger(typ, n)
- }
- s.errorf("can't handle %s for arg of type %s", n, typ)
- panic("not reached")
-}
-
-func (s *state) evalBool(typ reflect.Type, n parse.Node) reflect.Value {
- s.at(n)
- if n, ok := n.(*parse.BoolNode); ok {
- value := reflect.New(typ).Elem()
- value.SetBool(n.True)
- return value
- }
- s.errorf("expected bool; found %s", n)
- panic("not reached")
-}
-
-func (s *state) evalString(typ reflect.Type, n parse.Node) reflect.Value {
- s.at(n)
- if n, ok := n.(*parse.StringNode); ok {
- value := reflect.New(typ).Elem()
- value.SetString(n.Text)
- return value
- }
- s.errorf("expected string; found %s", n)
- panic("not reached")
-}
-
-func (s *state) evalInteger(typ reflect.Type, n parse.Node) reflect.Value {
- s.at(n)
- if n, ok := n.(*parse.NumberNode); ok && n.IsInt {
- value := reflect.New(typ).Elem()
- value.SetInt(n.Int64)
- return value
- }
- s.errorf("expected integer; found %s", n)
- panic("not reached")
-}
-
-func (s *state) evalUnsignedInteger(typ reflect.Type, n parse.Node) reflect.Value {
- s.at(n)
- if n, ok := n.(*parse.NumberNode); ok && n.IsUint {
- value := reflect.New(typ).Elem()
- value.SetUint(n.Uint64)
- return value
- }
- s.errorf("expected unsigned integer; found %s", n)
- panic("not reached")
-}
-
-func (s *state) evalFloat(typ reflect.Type, n parse.Node) reflect.Value {
- s.at(n)
- if n, ok := n.(*parse.NumberNode); ok && n.IsFloat {
- value := reflect.New(typ).Elem()
- value.SetFloat(n.Float64)
- return value
- }
- s.errorf("expected float; found %s", n)
- panic("not reached")
-}
-
-func (s *state) evalComplex(typ reflect.Type, n parse.Node) reflect.Value {
- if n, ok := n.(*parse.NumberNode); ok && n.IsComplex {
- value := reflect.New(typ).Elem()
- value.SetComplex(n.Complex128)
- return value
- }
- s.errorf("expected complex; found %s", n)
- panic("not reached")
-}
-
-func (s *state) evalEmptyInterface(dot reflect.Value, n parse.Node) reflect.Value {
- s.at(n)
- switch n := n.(type) {
- case *parse.BoolNode:
- return reflect.ValueOf(n.True)
- case *parse.DotNode:
- return dot
- case *parse.FieldNode:
- return s.evalFieldNode(dot, n, nil, zero)
- case *parse.IdentifierNode:
- return s.evalFunction(dot, n, n, nil, zero)
- case *parse.NilNode:
- // NilNode is handled in evalArg, the only place that calls here.
- s.errorf("evalEmptyInterface: nil (can't happen)")
- case *parse.NumberNode:
- return s.idealConstant(n)
- case *parse.StringNode:
- return reflect.ValueOf(n.Text)
- case *parse.VariableNode:
- return s.evalVariableNode(dot, n, nil, zero)
- case *parse.PipeNode:
- return s.evalPipeline(dot, n)
- }
- s.errorf("can't handle assignment of %s to empty interface argument", n)
- panic("not reached")
-}
-
-// indirect returns the item at the end of indirection, and a bool to indicate if it's nil.
-// We indirect through pointers and empty interfaces (only) because
-// non-empty interfaces have methods we might need.
-func indirect(v reflect.Value) (rv reflect.Value, isNil bool) {
- for ; v.Kind() == reflect.Ptr || v.Kind() == reflect.Interface; v = v.Elem() {
- if v.IsNil() {
- return v, true
- }
- if v.Kind() == reflect.Interface && v.NumMethod() > 0 {
- break
- }
- }
- return v, false
-}
-
-// printValue writes the textual representation of the value to the output of
-// the template.
-func (s *state) printValue(n parse.Node, v reflect.Value) {
- s.at(n)
- iface, ok := printableValue(v)
- if !ok {
- s.errorf("can't print %s of type %s", n, v.Type())
- }
- fmt.Fprint(s.wr, iface)
-}
-
-// printableValue returns the, possibly indirected, interface value inside v that
-// is best for a call to formatted printer.
-func printableValue(v reflect.Value) (interface{}, bool) {
- if v.Kind() == reflect.Ptr {
- v, _ = indirect(v) // fmt.Fprint handles nil.
- }
- if !v.IsValid() {
- return "", true
- }
-
- if !v.Type().Implements(errorType) && !v.Type().Implements(fmtStringerType) {
- if v.CanAddr() && (reflect.PtrTo(v.Type()).Implements(errorType) || reflect.PtrTo(v.Type()).Implements(fmtStringerType)) {
- v = v.Addr()
- } else {
- switch v.Kind() {
- case reflect.Chan, reflect.Func:
- return nil, false
- }
- }
- }
- return v.Interface(), true
-}
-
-// Types to help sort the keys in a map for reproducible output.
-
-type rvs []reflect.Value
-
-func (x rvs) Len() int { return len(x) }
-func (x rvs) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-type rvInts struct{ rvs }
-
-func (x rvInts) Less(i, j int) bool { return x.rvs[i].Int() < x.rvs[j].Int() }
-
-type rvUints struct{ rvs }
-
-func (x rvUints) Less(i, j int) bool { return x.rvs[i].Uint() < x.rvs[j].Uint() }
-
-type rvFloats struct{ rvs }
-
-func (x rvFloats) Less(i, j int) bool { return x.rvs[i].Float() < x.rvs[j].Float() }
-
-type rvStrings struct{ rvs }
-
-func (x rvStrings) Less(i, j int) bool { return x.rvs[i].String() < x.rvs[j].String() }
-
-// sortKeys sorts (if it can) the slice of reflect.Values, which is a slice of map keys.
-func sortKeys(v []reflect.Value) []reflect.Value {
- if len(v) <= 1 {
- return v
- }
- switch v[0].Kind() {
- case reflect.Float32, reflect.Float64:
- sort.Sort(rvFloats{v})
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- sort.Sort(rvInts{v})
- case reflect.String:
- sort.Sort(rvStrings{v})
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- sort.Sort(rvUints{v})
- }
- return v
-}
diff --git a/vendor/github.com/alecthomas/template/funcs.go b/vendor/github.com/alecthomas/template/funcs.go
deleted file mode 100644
index 39ee5ed68..000000000
--- a/vendor/github.com/alecthomas/template/funcs.go
+++ /dev/null
@@ -1,598 +0,0 @@
-// Copyright 2011 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.
-
-package template
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "net/url"
- "reflect"
- "strings"
- "unicode"
- "unicode/utf8"
-)
-
-// FuncMap is the type of the map defining the mapping from names to functions.
-// Each function must have either a single return value, or two return values of
-// which the second has type error. In that case, if the second (error)
-// return value evaluates to non-nil during execution, execution terminates and
-// Execute returns that error.
-type FuncMap map[string]interface{}
-
-var builtins = FuncMap{
- "and": and,
- "call": call,
- "html": HTMLEscaper,
- "index": index,
- "js": JSEscaper,
- "len": length,
- "not": not,
- "or": or,
- "print": fmt.Sprint,
- "printf": fmt.Sprintf,
- "println": fmt.Sprintln,
- "urlquery": URLQueryEscaper,
-
- // Comparisons
- "eq": eq, // ==
- "ge": ge, // >=
- "gt": gt, // >
- "le": le, // <=
- "lt": lt, // <
- "ne": ne, // !=
-}
-
-var builtinFuncs = createValueFuncs(builtins)
-
-// createValueFuncs turns a FuncMap into a map[string]reflect.Value
-func createValueFuncs(funcMap FuncMap) map[string]reflect.Value {
- m := make(map[string]reflect.Value)
- addValueFuncs(m, funcMap)
- return m
-}
-
-// addValueFuncs adds to values the functions in funcs, converting them to reflect.Values.
-func addValueFuncs(out map[string]reflect.Value, in FuncMap) {
- for name, fn := range in {
- v := reflect.ValueOf(fn)
- if v.Kind() != reflect.Func {
- panic("value for " + name + " not a function")
- }
- if !goodFunc(v.Type()) {
- panic(fmt.Errorf("can't install method/function %q with %d results", name, v.Type().NumOut()))
- }
- out[name] = v
- }
-}
-
-// addFuncs adds to values the functions in funcs. It does no checking of the input -
-// call addValueFuncs first.
-func addFuncs(out, in FuncMap) {
- for name, fn := range in {
- out[name] = fn
- }
-}
-
-// goodFunc checks that the function or method has the right result signature.
-func goodFunc(typ reflect.Type) bool {
- // We allow functions with 1 result or 2 results where the second is an error.
- switch {
- case typ.NumOut() == 1:
- return true
- case typ.NumOut() == 2 && typ.Out(1) == errorType:
- return true
- }
- return false
-}
-
-// findFunction looks for a function in the template, and global map.
-func findFunction(name string, tmpl *Template) (reflect.Value, bool) {
- if tmpl != nil && tmpl.common != nil {
- if fn := tmpl.execFuncs[name]; fn.IsValid() {
- return fn, true
- }
- }
- if fn := builtinFuncs[name]; fn.IsValid() {
- return fn, true
- }
- return reflect.Value{}, false
-}
-
-// Indexing.
-
-// index returns the result of indexing its first argument by the following
-// arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each
-// indexed item must be a map, slice, or array.
-func index(item interface{}, indices ...interface{}) (interface{}, error) {
- v := reflect.ValueOf(item)
- for _, i := range indices {
- index := reflect.ValueOf(i)
- var isNil bool
- if v, isNil = indirect(v); isNil {
- return nil, fmt.Errorf("index of nil pointer")
- }
- switch v.Kind() {
- case reflect.Array, reflect.Slice, reflect.String:
- var x int64
- switch index.Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- x = index.Int()
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- x = int64(index.Uint())
- default:
- return nil, fmt.Errorf("cannot index slice/array with type %s", index.Type())
- }
- if x < 0 || x >= int64(v.Len()) {
- return nil, fmt.Errorf("index out of range: %d", x)
- }
- v = v.Index(int(x))
- case reflect.Map:
- if !index.IsValid() {
- index = reflect.Zero(v.Type().Key())
- }
- if !index.Type().AssignableTo(v.Type().Key()) {
- return nil, fmt.Errorf("%s is not index type for %s", index.Type(), v.Type())
- }
- if x := v.MapIndex(index); x.IsValid() {
- v = x
- } else {
- v = reflect.Zero(v.Type().Elem())
- }
- default:
- return nil, fmt.Errorf("can't index item of type %s", v.Type())
- }
- }
- return v.Interface(), nil
-}
-
-// Length
-
-// length returns the length of the item, with an error if it has no defined length.
-func length(item interface{}) (int, error) {
- v, isNil := indirect(reflect.ValueOf(item))
- if isNil {
- return 0, fmt.Errorf("len of nil pointer")
- }
- switch v.Kind() {
- case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice, reflect.String:
- return v.Len(), nil
- }
- return 0, fmt.Errorf("len of type %s", v.Type())
-}
-
-// Function invocation
-
-// call returns the result of evaluating the first argument as a function.
-// The function must return 1 result, or 2 results, the second of which is an error.
-func call(fn interface{}, args ...interface{}) (interface{}, error) {
- v := reflect.ValueOf(fn)
- typ := v.Type()
- if typ.Kind() != reflect.Func {
- return nil, fmt.Errorf("non-function of type %s", typ)
- }
- if !goodFunc(typ) {
- return nil, fmt.Errorf("function called with %d args; should be 1 or 2", typ.NumOut())
- }
- numIn := typ.NumIn()
- var dddType reflect.Type
- if typ.IsVariadic() {
- if len(args) < numIn-1 {
- return nil, fmt.Errorf("wrong number of args: got %d want at least %d", len(args), numIn-1)
- }
- dddType = typ.In(numIn - 1).Elem()
- } else {
- if len(args) != numIn {
- return nil, fmt.Errorf("wrong number of args: got %d want %d", len(args), numIn)
- }
- }
- argv := make([]reflect.Value, len(args))
- for i, arg := range args {
- value := reflect.ValueOf(arg)
- // Compute the expected type. Clumsy because of variadics.
- var argType reflect.Type
- if !typ.IsVariadic() || i < numIn-1 {
- argType = typ.In(i)
- } else {
- argType = dddType
- }
- if !value.IsValid() && canBeNil(argType) {
- value = reflect.Zero(argType)
- }
- if !value.Type().AssignableTo(argType) {
- return nil, fmt.Errorf("arg %d has type %s; should be %s", i, value.Type(), argType)
- }
- argv[i] = value
- }
- result := v.Call(argv)
- if len(result) == 2 && !result[1].IsNil() {
- return result[0].Interface(), result[1].Interface().(error)
- }
- return result[0].Interface(), nil
-}
-
-// Boolean logic.
-
-func truth(a interface{}) bool {
- t, _ := isTrue(reflect.ValueOf(a))
- return t
-}
-
-// and computes the Boolean AND of its arguments, returning
-// the first false argument it encounters, or the last argument.
-func and(arg0 interface{}, args ...interface{}) interface{} {
- if !truth(arg0) {
- return arg0
- }
- for i := range args {
- arg0 = args[i]
- if !truth(arg0) {
- break
- }
- }
- return arg0
-}
-
-// or computes the Boolean OR of its arguments, returning
-// the first true argument it encounters, or the last argument.
-func or(arg0 interface{}, args ...interface{}) interface{} {
- if truth(arg0) {
- return arg0
- }
- for i := range args {
- arg0 = args[i]
- if truth(arg0) {
- break
- }
- }
- return arg0
-}
-
-// not returns the Boolean negation of its argument.
-func not(arg interface{}) (truth bool) {
- truth, _ = isTrue(reflect.ValueOf(arg))
- return !truth
-}
-
-// Comparison.
-
-// TODO: Perhaps allow comparison between signed and unsigned integers.
-
-var (
- errBadComparisonType = errors.New("invalid type for comparison")
- errBadComparison = errors.New("incompatible types for comparison")
- errNoComparison = errors.New("missing argument for comparison")
-)
-
-type kind int
-
-const (
- invalidKind kind = iota
- boolKind
- complexKind
- intKind
- floatKind
- integerKind
- stringKind
- uintKind
-)
-
-func basicKind(v reflect.Value) (kind, error) {
- switch v.Kind() {
- case reflect.Bool:
- return boolKind, nil
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return intKind, nil
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return uintKind, nil
- case reflect.Float32, reflect.Float64:
- return floatKind, nil
- case reflect.Complex64, reflect.Complex128:
- return complexKind, nil
- case reflect.String:
- return stringKind, nil
- }
- return invalidKind, errBadComparisonType
-}
-
-// eq evaluates the comparison a == b || a == c || ...
-func eq(arg1 interface{}, arg2 ...interface{}) (bool, error) {
- v1 := reflect.ValueOf(arg1)
- k1, err := basicKind(v1)
- if err != nil {
- return false, err
- }
- if len(arg2) == 0 {
- return false, errNoComparison
- }
- for _, arg := range arg2 {
- v2 := reflect.ValueOf(arg)
- k2, err := basicKind(v2)
- if err != nil {
- return false, err
- }
- truth := false
- if k1 != k2 {
- // Special case: Can compare integer values regardless of type's sign.
- switch {
- case k1 == intKind && k2 == uintKind:
- truth = v1.Int() >= 0 && uint64(v1.Int()) == v2.Uint()
- case k1 == uintKind && k2 == intKind:
- truth = v2.Int() >= 0 && v1.Uint() == uint64(v2.Int())
- default:
- return false, errBadComparison
- }
- } else {
- switch k1 {
- case boolKind:
- truth = v1.Bool() == v2.Bool()
- case complexKind:
- truth = v1.Complex() == v2.Complex()
- case floatKind:
- truth = v1.Float() == v2.Float()
- case intKind:
- truth = v1.Int() == v2.Int()
- case stringKind:
- truth = v1.String() == v2.String()
- case uintKind:
- truth = v1.Uint() == v2.Uint()
- default:
- panic("invalid kind")
- }
- }
- if truth {
- return true, nil
- }
- }
- return false, nil
-}
-
-// ne evaluates the comparison a != b.
-func ne(arg1, arg2 interface{}) (bool, error) {
- // != is the inverse of ==.
- equal, err := eq(arg1, arg2)
- return !equal, err
-}
-
-// lt evaluates the comparison a < b.
-func lt(arg1, arg2 interface{}) (bool, error) {
- v1 := reflect.ValueOf(arg1)
- k1, err := basicKind(v1)
- if err != nil {
- return false, err
- }
- v2 := reflect.ValueOf(arg2)
- k2, err := basicKind(v2)
- if err != nil {
- return false, err
- }
- truth := false
- if k1 != k2 {
- // Special case: Can compare integer values regardless of type's sign.
- switch {
- case k1 == intKind && k2 == uintKind:
- truth = v1.Int() < 0 || uint64(v1.Int()) < v2.Uint()
- case k1 == uintKind && k2 == intKind:
- truth = v2.Int() >= 0 && v1.Uint() < uint64(v2.Int())
- default:
- return false, errBadComparison
- }
- } else {
- switch k1 {
- case boolKind, complexKind:
- return false, errBadComparisonType
- case floatKind:
- truth = v1.Float() < v2.Float()
- case intKind:
- truth = v1.Int() < v2.Int()
- case stringKind:
- truth = v1.String() < v2.String()
- case uintKind:
- truth = v1.Uint() < v2.Uint()
- default:
- panic("invalid kind")
- }
- }
- return truth, nil
-}
-
-// le evaluates the comparison <= b.
-func le(arg1, arg2 interface{}) (bool, error) {
- // <= is < or ==.
- lessThan, err := lt(arg1, arg2)
- if lessThan || err != nil {
- return lessThan, err
- }
- return eq(arg1, arg2)
-}
-
-// gt evaluates the comparison a > b.
-func gt(arg1, arg2 interface{}) (bool, error) {
- // > is the inverse of <=.
- lessOrEqual, err := le(arg1, arg2)
- if err != nil {
- return false, err
- }
- return !lessOrEqual, nil
-}
-
-// ge evaluates the comparison a >= b.
-func ge(arg1, arg2 interface{}) (bool, error) {
- // >= is the inverse of <.
- lessThan, err := lt(arg1, arg2)
- if err != nil {
- return false, err
- }
- return !lessThan, nil
-}
-
-// HTML escaping.
-
-var (
- htmlQuot = []byte(""") // shorter than """
- htmlApos = []byte("'") // shorter than "'" and apos was not in HTML until HTML5
- htmlAmp = []byte("&")
- htmlLt = []byte("<")
- htmlGt = []byte(">")
-)
-
-// HTMLEscape writes to w the escaped HTML equivalent of the plain text data b.
-func HTMLEscape(w io.Writer, b []byte) {
- last := 0
- for i, c := range b {
- var html []byte
- switch c {
- case '"':
- html = htmlQuot
- case '\'':
- html = htmlApos
- case '&':
- html = htmlAmp
- case '<':
- html = htmlLt
- case '>':
- html = htmlGt
- default:
- continue
- }
- w.Write(b[last:i])
- w.Write(html)
- last = i + 1
- }
- w.Write(b[last:])
-}
-
-// HTMLEscapeString returns the escaped HTML equivalent of the plain text data s.
-func HTMLEscapeString(s string) string {
- // Avoid allocation if we can.
- if strings.IndexAny(s, `'"&<>`) < 0 {
- return s
- }
- var b bytes.Buffer
- HTMLEscape(&b, []byte(s))
- return b.String()
-}
-
-// HTMLEscaper returns the escaped HTML equivalent of the textual
-// representation of its arguments.
-func HTMLEscaper(args ...interface{}) string {
- return HTMLEscapeString(evalArgs(args))
-}
-
-// JavaScript escaping.
-
-var (
- jsLowUni = []byte(`\u00`)
- hex = []byte("0123456789ABCDEF")
-
- jsBackslash = []byte(`\\`)
- jsApos = []byte(`\'`)
- jsQuot = []byte(`\"`)
- jsLt = []byte(`\x3C`)
- jsGt = []byte(`\x3E`)
-)
-
-// JSEscape writes to w the escaped JavaScript equivalent of the plain text data b.
-func JSEscape(w io.Writer, b []byte) {
- last := 0
- for i := 0; i < len(b); i++ {
- c := b[i]
-
- if !jsIsSpecial(rune(c)) {
- // fast path: nothing to do
- continue
- }
- w.Write(b[last:i])
-
- if c < utf8.RuneSelf {
- // Quotes, slashes and angle brackets get quoted.
- // Control characters get written as \u00XX.
- switch c {
- case '\\':
- w.Write(jsBackslash)
- case '\'':
- w.Write(jsApos)
- case '"':
- w.Write(jsQuot)
- case '<':
- w.Write(jsLt)
- case '>':
- w.Write(jsGt)
- default:
- w.Write(jsLowUni)
- t, b := c>>4, c&0x0f
- w.Write(hex[t : t+1])
- w.Write(hex[b : b+1])
- }
- } else {
- // Unicode rune.
- r, size := utf8.DecodeRune(b[i:])
- if unicode.IsPrint(r) {
- w.Write(b[i : i+size])
- } else {
- fmt.Fprintf(w, "\\u%04X", r)
- }
- i += size - 1
- }
- last = i + 1
- }
- w.Write(b[last:])
-}
-
-// JSEscapeString returns the escaped JavaScript equivalent of the plain text data s.
-func JSEscapeString(s string) string {
- // Avoid allocation if we can.
- if strings.IndexFunc(s, jsIsSpecial) < 0 {
- return s
- }
- var b bytes.Buffer
- JSEscape(&b, []byte(s))
- return b.String()
-}
-
-func jsIsSpecial(r rune) bool {
- switch r {
- case '\\', '\'', '"', '<', '>':
- return true
- }
- return r < ' ' || utf8.RuneSelf <= r
-}
-
-// JSEscaper returns the escaped JavaScript equivalent of the textual
-// representation of its arguments.
-func JSEscaper(args ...interface{}) string {
- return JSEscapeString(evalArgs(args))
-}
-
-// URLQueryEscaper returns the escaped value of the textual representation of
-// its arguments in a form suitable for embedding in a URL query.
-func URLQueryEscaper(args ...interface{}) string {
- return url.QueryEscape(evalArgs(args))
-}
-
-// evalArgs formats the list of arguments into a string. It is therefore equivalent to
-// fmt.Sprint(args...)
-// except that each argument is indirected (if a pointer), as required,
-// using the same rules as the default string evaluation during template
-// execution.
-func evalArgs(args []interface{}) string {
- ok := false
- var s string
- // Fast path for simple common case.
- if len(args) == 1 {
- s, ok = args[0].(string)
- }
- if !ok {
- for i, arg := range args {
- a, ok := printableValue(reflect.ValueOf(arg))
- if ok {
- args[i] = a
- } // else left fmt do its thing
- }
- s = fmt.Sprint(args...)
- }
- return s
-}
diff --git a/vendor/github.com/alecthomas/template/go.mod b/vendor/github.com/alecthomas/template/go.mod
deleted file mode 100644
index a70670ae2..000000000
--- a/vendor/github.com/alecthomas/template/go.mod
+++ /dev/null
@@ -1 +0,0 @@
-module github.com/alecthomas/template
diff --git a/vendor/github.com/alecthomas/template/helper.go b/vendor/github.com/alecthomas/template/helper.go
deleted file mode 100644
index 3636fb54d..000000000
--- a/vendor/github.com/alecthomas/template/helper.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2011 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.
-
-// Helper functions to make constructing templates easier.
-
-package template
-
-import (
- "fmt"
- "io/ioutil"
- "path/filepath"
-)
-
-// Functions and methods to parse templates.
-
-// Must is a helper that wraps a call to a function returning (*Template, error)
-// and panics if the error is non-nil. It is intended for use in variable
-// initializations such as
-// var t = template.Must(template.New("name").Parse("text"))
-func Must(t *Template, err error) *Template {
- if err != nil {
- panic(err)
- }
- return t
-}
-
-// ParseFiles creates a new Template and parses the template definitions from
-// the named files. The returned template's name will have the (base) name and
-// (parsed) contents of the first file. There must be at least one file.
-// If an error occurs, parsing stops and the returned *Template is nil.
-func ParseFiles(filenames ...string) (*Template, error) {
- return parseFiles(nil, filenames...)
-}
-
-// ParseFiles parses the named files and associates the resulting templates with
-// t. If an error occurs, parsing stops and the returned template is nil;
-// otherwise it is t. There must be at least one file.
-func (t *Template) ParseFiles(filenames ...string) (*Template, error) {
- return parseFiles(t, filenames...)
-}
-
-// parseFiles is the helper for the method and function. If the argument
-// template is nil, it is created from the first file.
-func parseFiles(t *Template, filenames ...string) (*Template, error) {
- if len(filenames) == 0 {
- // Not really a problem, but be consistent.
- return nil, fmt.Errorf("template: no files named in call to ParseFiles")
- }
- for _, filename := range filenames {
- b, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, err
- }
- s := string(b)
- name := filepath.Base(filename)
- // First template becomes return value if not already defined,
- // and we use that one for subsequent New calls to associate
- // all the templates together. Also, if this file has the same name
- // as t, this file becomes the contents of t, so
- // t, err := New(name).Funcs(xxx).ParseFiles(name)
- // works. Otherwise we create a new template associated with t.
- var tmpl *Template
- if t == nil {
- t = New(name)
- }
- if name == t.Name() {
- tmpl = t
- } else {
- tmpl = t.New(name)
- }
- _, err = tmpl.Parse(s)
- if err != nil {
- return nil, err
- }
- }
- return t, nil
-}
-
-// ParseGlob creates a new Template and parses the template definitions from the
-// files identified by the pattern, which must match at least one file. The
-// returned template will have the (base) name and (parsed) contents of the
-// first file matched by the pattern. ParseGlob is equivalent to calling
-// ParseFiles with the list of files matched by the pattern.
-func ParseGlob(pattern string) (*Template, error) {
- return parseGlob(nil, pattern)
-}
-
-// ParseGlob parses the template definitions in the files identified by the
-// pattern and associates the resulting templates with t. The pattern is
-// processed by filepath.Glob and must match at least one file. ParseGlob is
-// equivalent to calling t.ParseFiles with the list of files matched by the
-// pattern.
-func (t *Template) ParseGlob(pattern string) (*Template, error) {
- return parseGlob(t, pattern)
-}
-
-// parseGlob is the implementation of the function and method ParseGlob.
-func parseGlob(t *Template, pattern string) (*Template, error) {
- filenames, err := filepath.Glob(pattern)
- if err != nil {
- return nil, err
- }
- if len(filenames) == 0 {
- return nil, fmt.Errorf("template: pattern matches no files: %#q", pattern)
- }
- return parseFiles(t, filenames...)
-}
diff --git a/vendor/github.com/alecthomas/template/parse/lex.go b/vendor/github.com/alecthomas/template/parse/lex.go
deleted file mode 100644
index 55f1c051e..000000000
--- a/vendor/github.com/alecthomas/template/parse/lex.go
+++ /dev/null
@@ -1,556 +0,0 @@
-// Copyright 2011 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.
-
-package parse
-
-import (
- "fmt"
- "strings"
- "unicode"
- "unicode/utf8"
-)
-
-// item represents a token or text string returned from the scanner.
-type item struct {
- typ itemType // The type of this item.
- pos Pos // The starting position, in bytes, of this item in the input string.
- val string // The value of this item.
-}
-
-func (i item) String() string {
- switch {
- case i.typ == itemEOF:
- return "EOF"
- case i.typ == itemError:
- return i.val
- case i.typ > itemKeyword:
- return fmt.Sprintf("<%s>", i.val)
- case len(i.val) > 10:
- return fmt.Sprintf("%.10q...", i.val)
- }
- return fmt.Sprintf("%q", i.val)
-}
-
-// itemType identifies the type of lex items.
-type itemType int
-
-const (
- itemError itemType = iota // error occurred; value is text of error
- itemBool // boolean constant
- itemChar // printable ASCII character; grab bag for comma etc.
- itemCharConstant // character constant
- itemComplex // complex constant (1+2i); imaginary is just a number
- itemColonEquals // colon-equals (':=') introducing a declaration
- itemEOF
- itemField // alphanumeric identifier starting with '.'
- itemIdentifier // alphanumeric identifier not starting with '.'
- itemLeftDelim // left action delimiter
- itemLeftParen // '(' inside action
- itemNumber // simple number, including imaginary
- itemPipe // pipe symbol
- itemRawString // raw quoted string (includes quotes)
- itemRightDelim // right action delimiter
- itemElideNewline // elide newline after right delim
- itemRightParen // ')' inside action
- itemSpace // run of spaces separating arguments
- itemString // quoted string (includes quotes)
- itemText // plain text
- itemVariable // variable starting with '$', such as '$' or '$1' or '$hello'
- // Keywords appear after all the rest.
- itemKeyword // used only to delimit the keywords
- itemDot // the cursor, spelled '.'
- itemDefine // define keyword
- itemElse // else keyword
- itemEnd // end keyword
- itemIf // if keyword
- itemNil // the untyped nil constant, easiest to treat as a keyword
- itemRange // range keyword
- itemTemplate // template keyword
- itemWith // with keyword
-)
-
-var key = map[string]itemType{
- ".": itemDot,
- "define": itemDefine,
- "else": itemElse,
- "end": itemEnd,
- "if": itemIf,
- "range": itemRange,
- "nil": itemNil,
- "template": itemTemplate,
- "with": itemWith,
-}
-
-const eof = -1
-
-// stateFn represents the state of the scanner as a function that returns the next state.
-type stateFn func(*lexer) stateFn
-
-// lexer holds the state of the scanner.
-type lexer struct {
- name string // the name of the input; used only for error reports
- input string // the string being scanned
- leftDelim string // start of action
- rightDelim string // end of action
- state stateFn // the next lexing function to enter
- pos Pos // current position in the input
- start Pos // start position of this item
- width Pos // width of last rune read from input
- lastPos Pos // position of most recent item returned by nextItem
- items chan item // channel of scanned items
- parenDepth int // nesting depth of ( ) exprs
-}
-
-// next returns the next rune in the input.
-func (l *lexer) next() rune {
- if int(l.pos) >= len(l.input) {
- l.width = 0
- return eof
- }
- r, w := utf8.DecodeRuneInString(l.input[l.pos:])
- l.width = Pos(w)
- l.pos += l.width
- return r
-}
-
-// peek returns but does not consume the next rune in the input.
-func (l *lexer) peek() rune {
- r := l.next()
- l.backup()
- return r
-}
-
-// backup steps back one rune. Can only be called once per call of next.
-func (l *lexer) backup() {
- l.pos -= l.width
-}
-
-// emit passes an item back to the client.
-func (l *lexer) emit(t itemType) {
- l.items <- item{t, l.start, l.input[l.start:l.pos]}
- l.start = l.pos
-}
-
-// ignore skips over the pending input before this point.
-func (l *lexer) ignore() {
- l.start = l.pos
-}
-
-// accept consumes the next rune if it's from the valid set.
-func (l *lexer) accept(valid string) bool {
- if strings.IndexRune(valid, l.next()) >= 0 {
- return true
- }
- l.backup()
- return false
-}
-
-// acceptRun consumes a run of runes from the valid set.
-func (l *lexer) acceptRun(valid string) {
- for strings.IndexRune(valid, l.next()) >= 0 {
- }
- l.backup()
-}
-
-// lineNumber reports which line we're on, based on the position of
-// the previous item returned by nextItem. Doing it this way
-// means we don't have to worry about peek double counting.
-func (l *lexer) lineNumber() int {
- return 1 + strings.Count(l.input[:l.lastPos], "\n")
-}
-
-// errorf returns an error token and terminates the scan by passing
-// back a nil pointer that will be the next state, terminating l.nextItem.
-func (l *lexer) errorf(format string, args ...interface{}) stateFn {
- l.items <- item{itemError, l.start, fmt.Sprintf(format, args...)}
- return nil
-}
-
-// nextItem returns the next item from the input.
-func (l *lexer) nextItem() item {
- item := <-l.items
- l.lastPos = item.pos
- return item
-}
-
-// lex creates a new scanner for the input string.
-func lex(name, input, left, right string) *lexer {
- if left == "" {
- left = leftDelim
- }
- if right == "" {
- right = rightDelim
- }
- l := &lexer{
- name: name,
- input: input,
- leftDelim: left,
- rightDelim: right,
- items: make(chan item),
- }
- go l.run()
- return l
-}
-
-// run runs the state machine for the lexer.
-func (l *lexer) run() {
- for l.state = lexText; l.state != nil; {
- l.state = l.state(l)
- }
-}
-
-// state functions
-
-const (
- leftDelim = "{{"
- rightDelim = "}}"
- leftComment = "/*"
- rightComment = "*/"
-)
-
-// lexText scans until an opening action delimiter, "{{".
-func lexText(l *lexer) stateFn {
- for {
- if strings.HasPrefix(l.input[l.pos:], l.leftDelim) {
- if l.pos > l.start {
- l.emit(itemText)
- }
- return lexLeftDelim
- }
- if l.next() == eof {
- break
- }
- }
- // Correctly reached EOF.
- if l.pos > l.start {
- l.emit(itemText)
- }
- l.emit(itemEOF)
- return nil
-}
-
-// lexLeftDelim scans the left delimiter, which is known to be present.
-func lexLeftDelim(l *lexer) stateFn {
- l.pos += Pos(len(l.leftDelim))
- if strings.HasPrefix(l.input[l.pos:], leftComment) {
- return lexComment
- }
- l.emit(itemLeftDelim)
- l.parenDepth = 0
- return lexInsideAction
-}
-
-// lexComment scans a comment. The left comment marker is known to be present.
-func lexComment(l *lexer) stateFn {
- l.pos += Pos(len(leftComment))
- i := strings.Index(l.input[l.pos:], rightComment)
- if i < 0 {
- return l.errorf("unclosed comment")
- }
- l.pos += Pos(i + len(rightComment))
- if !strings.HasPrefix(l.input[l.pos:], l.rightDelim) {
- return l.errorf("comment ends before closing delimiter")
-
- }
- l.pos += Pos(len(l.rightDelim))
- l.ignore()
- return lexText
-}
-
-// lexRightDelim scans the right delimiter, which is known to be present.
-func lexRightDelim(l *lexer) stateFn {
- l.pos += Pos(len(l.rightDelim))
- l.emit(itemRightDelim)
- if l.peek() == '\\' {
- l.pos++
- l.emit(itemElideNewline)
- }
- return lexText
-}
-
-// lexInsideAction scans the elements inside action delimiters.
-func lexInsideAction(l *lexer) stateFn {
- // Either number, quoted string, or identifier.
- // Spaces separate arguments; runs of spaces turn into itemSpace.
- // Pipe symbols separate and are emitted.
- if strings.HasPrefix(l.input[l.pos:], l.rightDelim+"\\") || strings.HasPrefix(l.input[l.pos:], l.rightDelim) {
- if l.parenDepth == 0 {
- return lexRightDelim
- }
- return l.errorf("unclosed left paren")
- }
- switch r := l.next(); {
- case r == eof || isEndOfLine(r):
- return l.errorf("unclosed action")
- case isSpace(r):
- return lexSpace
- case r == ':':
- if l.next() != '=' {
- return l.errorf("expected :=")
- }
- l.emit(itemColonEquals)
- case r == '|':
- l.emit(itemPipe)
- case r == '"':
- return lexQuote
- case r == '`':
- return lexRawQuote
- case r == '$':
- return lexVariable
- case r == '\'':
- return lexChar
- case r == '.':
- // special look-ahead for ".field" so we don't break l.backup().
- if l.pos < Pos(len(l.input)) {
- r := l.input[l.pos]
- if r < '0' || '9' < r {
- return lexField
- }
- }
- fallthrough // '.' can start a number.
- case r == '+' || r == '-' || ('0' <= r && r <= '9'):
- l.backup()
- return lexNumber
- case isAlphaNumeric(r):
- l.backup()
- return lexIdentifier
- case r == '(':
- l.emit(itemLeftParen)
- l.parenDepth++
- return lexInsideAction
- case r == ')':
- l.emit(itemRightParen)
- l.parenDepth--
- if l.parenDepth < 0 {
- return l.errorf("unexpected right paren %#U", r)
- }
- return lexInsideAction
- case r <= unicode.MaxASCII && unicode.IsPrint(r):
- l.emit(itemChar)
- return lexInsideAction
- default:
- return l.errorf("unrecognized character in action: %#U", r)
- }
- return lexInsideAction
-}
-
-// lexSpace scans a run of space characters.
-// One space has already been seen.
-func lexSpace(l *lexer) stateFn {
- for isSpace(l.peek()) {
- l.next()
- }
- l.emit(itemSpace)
- return lexInsideAction
-}
-
-// lexIdentifier scans an alphanumeric.
-func lexIdentifier(l *lexer) stateFn {
-Loop:
- for {
- switch r := l.next(); {
- case isAlphaNumeric(r):
- // absorb.
- default:
- l.backup()
- word := l.input[l.start:l.pos]
- if !l.atTerminator() {
- return l.errorf("bad character %#U", r)
- }
- switch {
- case key[word] > itemKeyword:
- l.emit(key[word])
- case word[0] == '.':
- l.emit(itemField)
- case word == "true", word == "false":
- l.emit(itemBool)
- default:
- l.emit(itemIdentifier)
- }
- break Loop
- }
- }
- return lexInsideAction
-}
-
-// lexField scans a field: .Alphanumeric.
-// The . has been scanned.
-func lexField(l *lexer) stateFn {
- return lexFieldOrVariable(l, itemField)
-}
-
-// lexVariable scans a Variable: $Alphanumeric.
-// The $ has been scanned.
-func lexVariable(l *lexer) stateFn {
- if l.atTerminator() { // Nothing interesting follows -> "$".
- l.emit(itemVariable)
- return lexInsideAction
- }
- return lexFieldOrVariable(l, itemVariable)
-}
-
-// lexVariable scans a field or variable: [.$]Alphanumeric.
-// The . or $ has been scanned.
-func lexFieldOrVariable(l *lexer, typ itemType) stateFn {
- if l.atTerminator() { // Nothing interesting follows -> "." or "$".
- if typ == itemVariable {
- l.emit(itemVariable)
- } else {
- l.emit(itemDot)
- }
- return lexInsideAction
- }
- var r rune
- for {
- r = l.next()
- if !isAlphaNumeric(r) {
- l.backup()
- break
- }
- }
- if !l.atTerminator() {
- return l.errorf("bad character %#U", r)
- }
- l.emit(typ)
- return lexInsideAction
-}
-
-// atTerminator reports whether the input is at valid termination character to
-// appear after an identifier. Breaks .X.Y into two pieces. Also catches cases
-// like "$x+2" not being acceptable without a space, in case we decide one
-// day to implement arithmetic.
-func (l *lexer) atTerminator() bool {
- r := l.peek()
- if isSpace(r) || isEndOfLine(r) {
- return true
- }
- switch r {
- case eof, '.', ',', '|', ':', ')', '(':
- return true
- }
- // Does r start the delimiter? This can be ambiguous (with delim=="//", $x/2 will
- // succeed but should fail) but only in extremely rare cases caused by willfully
- // bad choice of delimiter.
- if rd, _ := utf8.DecodeRuneInString(l.rightDelim); rd == r {
- return true
- }
- return false
-}
-
-// lexChar scans a character constant. The initial quote is already
-// scanned. Syntax checking is done by the parser.
-func lexChar(l *lexer) stateFn {
-Loop:
- for {
- switch l.next() {
- case '\\':
- if r := l.next(); r != eof && r != '\n' {
- break
- }
- fallthrough
- case eof, '\n':
- return l.errorf("unterminated character constant")
- case '\'':
- break Loop
- }
- }
- l.emit(itemCharConstant)
- return lexInsideAction
-}
-
-// lexNumber scans a number: decimal, octal, hex, float, or imaginary. This
-// isn't a perfect number scanner - for instance it accepts "." and "0x0.2"
-// and "089" - but when it's wrong the input is invalid and the parser (via
-// strconv) will notice.
-func lexNumber(l *lexer) stateFn {
- if !l.scanNumber() {
- return l.errorf("bad number syntax: %q", l.input[l.start:l.pos])
- }
- if sign := l.peek(); sign == '+' || sign == '-' {
- // Complex: 1+2i. No spaces, must end in 'i'.
- if !l.scanNumber() || l.input[l.pos-1] != 'i' {
- return l.errorf("bad number syntax: %q", l.input[l.start:l.pos])
- }
- l.emit(itemComplex)
- } else {
- l.emit(itemNumber)
- }
- return lexInsideAction
-}
-
-func (l *lexer) scanNumber() bool {
- // Optional leading sign.
- l.accept("+-")
- // Is it hex?
- digits := "0123456789"
- if l.accept("0") && l.accept("xX") {
- digits = "0123456789abcdefABCDEF"
- }
- l.acceptRun(digits)
- if l.accept(".") {
- l.acceptRun(digits)
- }
- if l.accept("eE") {
- l.accept("+-")
- l.acceptRun("0123456789")
- }
- // Is it imaginary?
- l.accept("i")
- // Next thing mustn't be alphanumeric.
- if isAlphaNumeric(l.peek()) {
- l.next()
- return false
- }
- return true
-}
-
-// lexQuote scans a quoted string.
-func lexQuote(l *lexer) stateFn {
-Loop:
- for {
- switch l.next() {
- case '\\':
- if r := l.next(); r != eof && r != '\n' {
- break
- }
- fallthrough
- case eof, '\n':
- return l.errorf("unterminated quoted string")
- case '"':
- break Loop
- }
- }
- l.emit(itemString)
- return lexInsideAction
-}
-
-// lexRawQuote scans a raw quoted string.
-func lexRawQuote(l *lexer) stateFn {
-Loop:
- for {
- switch l.next() {
- case eof, '\n':
- return l.errorf("unterminated raw quoted string")
- case '`':
- break Loop
- }
- }
- l.emit(itemRawString)
- return lexInsideAction
-}
-
-// isSpace reports whether r is a space character.
-func isSpace(r rune) bool {
- return r == ' ' || r == '\t'
-}
-
-// isEndOfLine reports whether r is an end-of-line character.
-func isEndOfLine(r rune) bool {
- return r == '\r' || r == '\n'
-}
-
-// isAlphaNumeric reports whether r is an alphabetic, digit, or underscore.
-func isAlphaNumeric(r rune) bool {
- return r == '_' || unicode.IsLetter(r) || unicode.IsDigit(r)
-}
diff --git a/vendor/github.com/alecthomas/template/parse/node.go b/vendor/github.com/alecthomas/template/parse/node.go
deleted file mode 100644
index 55c37f6db..000000000
--- a/vendor/github.com/alecthomas/template/parse/node.go
+++ /dev/null
@@ -1,834 +0,0 @@
-// Copyright 2011 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.
-
-// Parse nodes.
-
-package parse
-
-import (
- "bytes"
- "fmt"
- "strconv"
- "strings"
-)
-
-var textFormat = "%s" // Changed to "%q" in tests for better error messages.
-
-// A Node is an element in the parse tree. The interface is trivial.
-// The interface contains an unexported method so that only
-// types local to this package can satisfy it.
-type Node interface {
- Type() NodeType
- String() string
- // Copy does a deep copy of the Node and all its components.
- // To avoid type assertions, some XxxNodes also have specialized
- // CopyXxx methods that return *XxxNode.
- Copy() Node
- Position() Pos // byte position of start of node in full original input string
- // tree returns the containing *Tree.
- // It is unexported so all implementations of Node are in this package.
- tree() *Tree
-}
-
-// NodeType identifies the type of a parse tree node.
-type NodeType int
-
-// Pos represents a byte position in the original input text from which
-// this template was parsed.
-type Pos int
-
-func (p Pos) Position() Pos {
- return p
-}
-
-// Type returns itself and provides an easy default implementation
-// for embedding in a Node. Embedded in all non-trivial Nodes.
-func (t NodeType) Type() NodeType {
- return t
-}
-
-const (
- NodeText NodeType = iota // Plain text.
- NodeAction // A non-control action such as a field evaluation.
- NodeBool // A boolean constant.
- NodeChain // A sequence of field accesses.
- NodeCommand // An element of a pipeline.
- NodeDot // The cursor, dot.
- nodeElse // An else action. Not added to tree.
- nodeEnd // An end action. Not added to tree.
- NodeField // A field or method name.
- NodeIdentifier // An identifier; always a function name.
- NodeIf // An if action.
- NodeList // A list of Nodes.
- NodeNil // An untyped nil constant.
- NodeNumber // A numerical constant.
- NodePipe // A pipeline of commands.
- NodeRange // A range action.
- NodeString // A string constant.
- NodeTemplate // A template invocation action.
- NodeVariable // A $ variable.
- NodeWith // A with action.
-)
-
-// Nodes.
-
-// ListNode holds a sequence of nodes.
-type ListNode struct {
- NodeType
- Pos
- tr *Tree
- Nodes []Node // The element nodes in lexical order.
-}
-
-func (t *Tree) newList(pos Pos) *ListNode {
- return &ListNode{tr: t, NodeType: NodeList, Pos: pos}
-}
-
-func (l *ListNode) append(n Node) {
- l.Nodes = append(l.Nodes, n)
-}
-
-func (l *ListNode) tree() *Tree {
- return l.tr
-}
-
-func (l *ListNode) String() string {
- b := new(bytes.Buffer)
- for _, n := range l.Nodes {
- fmt.Fprint(b, n)
- }
- return b.String()
-}
-
-func (l *ListNode) CopyList() *ListNode {
- if l == nil {
- return l
- }
- n := l.tr.newList(l.Pos)
- for _, elem := range l.Nodes {
- n.append(elem.Copy())
- }
- return n
-}
-
-func (l *ListNode) Copy() Node {
- return l.CopyList()
-}
-
-// TextNode holds plain text.
-type TextNode struct {
- NodeType
- Pos
- tr *Tree
- Text []byte // The text; may span newlines.
-}
-
-func (t *Tree) newText(pos Pos, text string) *TextNode {
- return &TextNode{tr: t, NodeType: NodeText, Pos: pos, Text: []byte(text)}
-}
-
-func (t *TextNode) String() string {
- return fmt.Sprintf(textFormat, t.Text)
-}
-
-func (t *TextNode) tree() *Tree {
- return t.tr
-}
-
-func (t *TextNode) Copy() Node {
- return &TextNode{tr: t.tr, NodeType: NodeText, Pos: t.Pos, Text: append([]byte{}, t.Text...)}
-}
-
-// PipeNode holds a pipeline with optional declaration
-type PipeNode struct {
- NodeType
- Pos
- tr *Tree
- Line int // The line number in the input (deprecated; kept for compatibility)
- Decl []*VariableNode // Variable declarations in lexical order.
- Cmds []*CommandNode // The commands in lexical order.
-}
-
-func (t *Tree) newPipeline(pos Pos, line int, decl []*VariableNode) *PipeNode {
- return &PipeNode{tr: t, NodeType: NodePipe, Pos: pos, Line: line, Decl: decl}
-}
-
-func (p *PipeNode) append(command *CommandNode) {
- p.Cmds = append(p.Cmds, command)
-}
-
-func (p *PipeNode) String() string {
- s := ""
- if len(p.Decl) > 0 {
- for i, v := range p.Decl {
- if i > 0 {
- s += ", "
- }
- s += v.String()
- }
- s += " := "
- }
- for i, c := range p.Cmds {
- if i > 0 {
- s += " | "
- }
- s += c.String()
- }
- return s
-}
-
-func (p *PipeNode) tree() *Tree {
- return p.tr
-}
-
-func (p *PipeNode) CopyPipe() *PipeNode {
- if p == nil {
- return p
- }
- var decl []*VariableNode
- for _, d := range p.Decl {
- decl = append(decl, d.Copy().(*VariableNode))
- }
- n := p.tr.newPipeline(p.Pos, p.Line, decl)
- for _, c := range p.Cmds {
- n.append(c.Copy().(*CommandNode))
- }
- return n
-}
-
-func (p *PipeNode) Copy() Node {
- return p.CopyPipe()
-}
-
-// ActionNode holds an action (something bounded by delimiters).
-// Control actions have their own nodes; ActionNode represents simple
-// ones such as field evaluations and parenthesized pipelines.
-type ActionNode struct {
- NodeType
- Pos
- tr *Tree
- Line int // The line number in the input (deprecated; kept for compatibility)
- Pipe *PipeNode // The pipeline in the action.
-}
-
-func (t *Tree) newAction(pos Pos, line int, pipe *PipeNode) *ActionNode {
- return &ActionNode{tr: t, NodeType: NodeAction, Pos: pos, Line: line, Pipe: pipe}
-}
-
-func (a *ActionNode) String() string {
- return fmt.Sprintf("{{%s}}", a.Pipe)
-
-}
-
-func (a *ActionNode) tree() *Tree {
- return a.tr
-}
-
-func (a *ActionNode) Copy() Node {
- return a.tr.newAction(a.Pos, a.Line, a.Pipe.CopyPipe())
-
-}
-
-// CommandNode holds a command (a pipeline inside an evaluating action).
-type CommandNode struct {
- NodeType
- Pos
- tr *Tree
- Args []Node // Arguments in lexical order: Identifier, field, or constant.
-}
-
-func (t *Tree) newCommand(pos Pos) *CommandNode {
- return &CommandNode{tr: t, NodeType: NodeCommand, Pos: pos}
-}
-
-func (c *CommandNode) append(arg Node) {
- c.Args = append(c.Args, arg)
-}
-
-func (c *CommandNode) String() string {
- s := ""
- for i, arg := range c.Args {
- if i > 0 {
- s += " "
- }
- if arg, ok := arg.(*PipeNode); ok {
- s += "(" + arg.String() + ")"
- continue
- }
- s += arg.String()
- }
- return s
-}
-
-func (c *CommandNode) tree() *Tree {
- return c.tr
-}
-
-func (c *CommandNode) Copy() Node {
- if c == nil {
- return c
- }
- n := c.tr.newCommand(c.Pos)
- for _, c := range c.Args {
- n.append(c.Copy())
- }
- return n
-}
-
-// IdentifierNode holds an identifier.
-type IdentifierNode struct {
- NodeType
- Pos
- tr *Tree
- Ident string // The identifier's name.
-}
-
-// NewIdentifier returns a new IdentifierNode with the given identifier name.
-func NewIdentifier(ident string) *IdentifierNode {
- return &IdentifierNode{NodeType: NodeIdentifier, Ident: ident}
-}
-
-// SetPos sets the position. NewIdentifier is a public method so we can't modify its signature.
-// Chained for convenience.
-// TODO: fix one day?
-func (i *IdentifierNode) SetPos(pos Pos) *IdentifierNode {
- i.Pos = pos
- return i
-}
-
-// SetTree sets the parent tree for the node. NewIdentifier is a public method so we can't modify its signature.
-// Chained for convenience.
-// TODO: fix one day?
-func (i *IdentifierNode) SetTree(t *Tree) *IdentifierNode {
- i.tr = t
- return i
-}
-
-func (i *IdentifierNode) String() string {
- return i.Ident
-}
-
-func (i *IdentifierNode) tree() *Tree {
- return i.tr
-}
-
-func (i *IdentifierNode) Copy() Node {
- return NewIdentifier(i.Ident).SetTree(i.tr).SetPos(i.Pos)
-}
-
-// VariableNode holds a list of variable names, possibly with chained field
-// accesses. The dollar sign is part of the (first) name.
-type VariableNode struct {
- NodeType
- Pos
- tr *Tree
- Ident []string // Variable name and fields in lexical order.
-}
-
-func (t *Tree) newVariable(pos Pos, ident string) *VariableNode {
- return &VariableNode{tr: t, NodeType: NodeVariable, Pos: pos, Ident: strings.Split(ident, ".")}
-}
-
-func (v *VariableNode) String() string {
- s := ""
- for i, id := range v.Ident {
- if i > 0 {
- s += "."
- }
- s += id
- }
- return s
-}
-
-func (v *VariableNode) tree() *Tree {
- return v.tr
-}
-
-func (v *VariableNode) Copy() Node {
- return &VariableNode{tr: v.tr, NodeType: NodeVariable, Pos: v.Pos, Ident: append([]string{}, v.Ident...)}
-}
-
-// DotNode holds the special identifier '.'.
-type DotNode struct {
- NodeType
- Pos
- tr *Tree
-}
-
-func (t *Tree) newDot(pos Pos) *DotNode {
- return &DotNode{tr: t, NodeType: NodeDot, Pos: pos}
-}
-
-func (d *DotNode) Type() NodeType {
- // Override method on embedded NodeType for API compatibility.
- // TODO: Not really a problem; could change API without effect but
- // api tool complains.
- return NodeDot
-}
-
-func (d *DotNode) String() string {
- return "."
-}
-
-func (d *DotNode) tree() *Tree {
- return d.tr
-}
-
-func (d *DotNode) Copy() Node {
- return d.tr.newDot(d.Pos)
-}
-
-// NilNode holds the special identifier 'nil' representing an untyped nil constant.
-type NilNode struct {
- NodeType
- Pos
- tr *Tree
-}
-
-func (t *Tree) newNil(pos Pos) *NilNode {
- return &NilNode{tr: t, NodeType: NodeNil, Pos: pos}
-}
-
-func (n *NilNode) Type() NodeType {
- // Override method on embedded NodeType for API compatibility.
- // TODO: Not really a problem; could change API without effect but
- // api tool complains.
- return NodeNil
-}
-
-func (n *NilNode) String() string {
- return "nil"
-}
-
-func (n *NilNode) tree() *Tree {
- return n.tr
-}
-
-func (n *NilNode) Copy() Node {
- return n.tr.newNil(n.Pos)
-}
-
-// FieldNode holds a field (identifier starting with '.').
-// The names may be chained ('.x.y').
-// The period is dropped from each ident.
-type FieldNode struct {
- NodeType
- Pos
- tr *Tree
- Ident []string // The identifiers in lexical order.
-}
-
-func (t *Tree) newField(pos Pos, ident string) *FieldNode {
- return &FieldNode{tr: t, NodeType: NodeField, Pos: pos, Ident: strings.Split(ident[1:], ".")} // [1:] to drop leading period
-}
-
-func (f *FieldNode) String() string {
- s := ""
- for _, id := range f.Ident {
- s += "." + id
- }
- return s
-}
-
-func (f *FieldNode) tree() *Tree {
- return f.tr
-}
-
-func (f *FieldNode) Copy() Node {
- return &FieldNode{tr: f.tr, NodeType: NodeField, Pos: f.Pos, Ident: append([]string{}, f.Ident...)}
-}
-
-// ChainNode holds a term followed by a chain of field accesses (identifier starting with '.').
-// The names may be chained ('.x.y').
-// The periods are dropped from each ident.
-type ChainNode struct {
- NodeType
- Pos
- tr *Tree
- Node Node
- Field []string // The identifiers in lexical order.
-}
-
-func (t *Tree) newChain(pos Pos, node Node) *ChainNode {
- return &ChainNode{tr: t, NodeType: NodeChain, Pos: pos, Node: node}
-}
-
-// Add adds the named field (which should start with a period) to the end of the chain.
-func (c *ChainNode) Add(field string) {
- if len(field) == 0 || field[0] != '.' {
- panic("no dot in field")
- }
- field = field[1:] // Remove leading dot.
- if field == "" {
- panic("empty field")
- }
- c.Field = append(c.Field, field)
-}
-
-func (c *ChainNode) String() string {
- s := c.Node.String()
- if _, ok := c.Node.(*PipeNode); ok {
- s = "(" + s + ")"
- }
- for _, field := range c.Field {
- s += "." + field
- }
- return s
-}
-
-func (c *ChainNode) tree() *Tree {
- return c.tr
-}
-
-func (c *ChainNode) Copy() Node {
- return &ChainNode{tr: c.tr, NodeType: NodeChain, Pos: c.Pos, Node: c.Node, Field: append([]string{}, c.Field...)}
-}
-
-// BoolNode holds a boolean constant.
-type BoolNode struct {
- NodeType
- Pos
- tr *Tree
- True bool // The value of the boolean constant.
-}
-
-func (t *Tree) newBool(pos Pos, true bool) *BoolNode {
- return &BoolNode{tr: t, NodeType: NodeBool, Pos: pos, True: true}
-}
-
-func (b *BoolNode) String() string {
- if b.True {
- return "true"
- }
- return "false"
-}
-
-func (b *BoolNode) tree() *Tree {
- return b.tr
-}
-
-func (b *BoolNode) Copy() Node {
- return b.tr.newBool(b.Pos, b.True)
-}
-
-// NumberNode holds a number: signed or unsigned integer, float, or complex.
-// The value is parsed and stored under all the types that can represent the value.
-// This simulates in a small amount of code the behavior of Go's ideal constants.
-type NumberNode struct {
- NodeType
- Pos
- tr *Tree
- IsInt bool // Number has an integral value.
- IsUint bool // Number has an unsigned integral value.
- IsFloat bool // Number has a floating-point value.
- IsComplex bool // Number is complex.
- Int64 int64 // The signed integer value.
- Uint64 uint64 // The unsigned integer value.
- Float64 float64 // The floating-point value.
- Complex128 complex128 // The complex value.
- Text string // The original textual representation from the input.
-}
-
-func (t *Tree) newNumber(pos Pos, text string, typ itemType) (*NumberNode, error) {
- n := &NumberNode{tr: t, NodeType: NodeNumber, Pos: pos, Text: text}
- switch typ {
- case itemCharConstant:
- rune, _, tail, err := strconv.UnquoteChar(text[1:], text[0])
- if err != nil {
- return nil, err
- }
- if tail != "'" {
- return nil, fmt.Errorf("malformed character constant: %s", text)
- }
- n.Int64 = int64(rune)
- n.IsInt = true
- n.Uint64 = uint64(rune)
- n.IsUint = true
- n.Float64 = float64(rune) // odd but those are the rules.
- n.IsFloat = true
- return n, nil
- case itemComplex:
- // fmt.Sscan can parse the pair, so let it do the work.
- if _, err := fmt.Sscan(text, &n.Complex128); err != nil {
- return nil, err
- }
- n.IsComplex = true
- n.simplifyComplex()
- return n, nil
- }
- // Imaginary constants can only be complex unless they are zero.
- if len(text) > 0 && text[len(text)-1] == 'i' {
- f, err := strconv.ParseFloat(text[:len(text)-1], 64)
- if err == nil {
- n.IsComplex = true
- n.Complex128 = complex(0, f)
- n.simplifyComplex()
- return n, nil
- }
- }
- // Do integer test first so we get 0x123 etc.
- u, err := strconv.ParseUint(text, 0, 64) // will fail for -0; fixed below.
- if err == nil {
- n.IsUint = true
- n.Uint64 = u
- }
- i, err := strconv.ParseInt(text, 0, 64)
- if err == nil {
- n.IsInt = true
- n.Int64 = i
- if i == 0 {
- n.IsUint = true // in case of -0.
- n.Uint64 = u
- }
- }
- // If an integer extraction succeeded, promote the float.
- if n.IsInt {
- n.IsFloat = true
- n.Float64 = float64(n.Int64)
- } else if n.IsUint {
- n.IsFloat = true
- n.Float64 = float64(n.Uint64)
- } else {
- f, err := strconv.ParseFloat(text, 64)
- if err == nil {
- n.IsFloat = true
- n.Float64 = f
- // If a floating-point extraction succeeded, extract the int if needed.
- if !n.IsInt && float64(int64(f)) == f {
- n.IsInt = true
- n.Int64 = int64(f)
- }
- if !n.IsUint && float64(uint64(f)) == f {
- n.IsUint = true
- n.Uint64 = uint64(f)
- }
- }
- }
- if !n.IsInt && !n.IsUint && !n.IsFloat {
- return nil, fmt.Errorf("illegal number syntax: %q", text)
- }
- return n, nil
-}
-
-// simplifyComplex pulls out any other types that are represented by the complex number.
-// These all require that the imaginary part be zero.
-func (n *NumberNode) simplifyComplex() {
- n.IsFloat = imag(n.Complex128) == 0
- if n.IsFloat {
- n.Float64 = real(n.Complex128)
- n.IsInt = float64(int64(n.Float64)) == n.Float64
- if n.IsInt {
- n.Int64 = int64(n.Float64)
- }
- n.IsUint = float64(uint64(n.Float64)) == n.Float64
- if n.IsUint {
- n.Uint64 = uint64(n.Float64)
- }
- }
-}
-
-func (n *NumberNode) String() string {
- return n.Text
-}
-
-func (n *NumberNode) tree() *Tree {
- return n.tr
-}
-
-func (n *NumberNode) Copy() Node {
- nn := new(NumberNode)
- *nn = *n // Easy, fast, correct.
- return nn
-}
-
-// StringNode holds a string constant. The value has been "unquoted".
-type StringNode struct {
- NodeType
- Pos
- tr *Tree
- Quoted string // The original text of the string, with quotes.
- Text string // The string, after quote processing.
-}
-
-func (t *Tree) newString(pos Pos, orig, text string) *StringNode {
- return &StringNode{tr: t, NodeType: NodeString, Pos: pos, Quoted: orig, Text: text}
-}
-
-func (s *StringNode) String() string {
- return s.Quoted
-}
-
-func (s *StringNode) tree() *Tree {
- return s.tr
-}
-
-func (s *StringNode) Copy() Node {
- return s.tr.newString(s.Pos, s.Quoted, s.Text)
-}
-
-// endNode represents an {{end}} action.
-// It does not appear in the final parse tree.
-type endNode struct {
- NodeType
- Pos
- tr *Tree
-}
-
-func (t *Tree) newEnd(pos Pos) *endNode {
- return &endNode{tr: t, NodeType: nodeEnd, Pos: pos}
-}
-
-func (e *endNode) String() string {
- return "{{end}}"
-}
-
-func (e *endNode) tree() *Tree {
- return e.tr
-}
-
-func (e *endNode) Copy() Node {
- return e.tr.newEnd(e.Pos)
-}
-
-// elseNode represents an {{else}} action. Does not appear in the final tree.
-type elseNode struct {
- NodeType
- Pos
- tr *Tree
- Line int // The line number in the input (deprecated; kept for compatibility)
-}
-
-func (t *Tree) newElse(pos Pos, line int) *elseNode {
- return &elseNode{tr: t, NodeType: nodeElse, Pos: pos, Line: line}
-}
-
-func (e *elseNode) Type() NodeType {
- return nodeElse
-}
-
-func (e *elseNode) String() string {
- return "{{else}}"
-}
-
-func (e *elseNode) tree() *Tree {
- return e.tr
-}
-
-func (e *elseNode) Copy() Node {
- return e.tr.newElse(e.Pos, e.Line)
-}
-
-// BranchNode is the common representation of if, range, and with.
-type BranchNode struct {
- NodeType
- Pos
- tr *Tree
- Line int // The line number in the input (deprecated; kept for compatibility)
- Pipe *PipeNode // The pipeline to be evaluated.
- List *ListNode // What to execute if the value is non-empty.
- ElseList *ListNode // What to execute if the value is empty (nil if absent).
-}
-
-func (b *BranchNode) String() string {
- name := ""
- switch b.NodeType {
- case NodeIf:
- name = "if"
- case NodeRange:
- name = "range"
- case NodeWith:
- name = "with"
- default:
- panic("unknown branch type")
- }
- if b.ElseList != nil {
- return fmt.Sprintf("{{%s %s}}%s{{else}}%s{{end}}", name, b.Pipe, b.List, b.ElseList)
- }
- return fmt.Sprintf("{{%s %s}}%s{{end}}", name, b.Pipe, b.List)
-}
-
-func (b *BranchNode) tree() *Tree {
- return b.tr
-}
-
-func (b *BranchNode) Copy() Node {
- switch b.NodeType {
- case NodeIf:
- return b.tr.newIf(b.Pos, b.Line, b.Pipe, b.List, b.ElseList)
- case NodeRange:
- return b.tr.newRange(b.Pos, b.Line, b.Pipe, b.List, b.ElseList)
- case NodeWith:
- return b.tr.newWith(b.Pos, b.Line, b.Pipe, b.List, b.ElseList)
- default:
- panic("unknown branch type")
- }
-}
-
-// IfNode represents an {{if}} action and its commands.
-type IfNode struct {
- BranchNode
-}
-
-func (t *Tree) newIf(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *IfNode {
- return &IfNode{BranchNode{tr: t, NodeType: NodeIf, Pos: pos, Line: line, Pipe: pipe, List: list, ElseList: elseList}}
-}
-
-func (i *IfNode) Copy() Node {
- return i.tr.newIf(i.Pos, i.Line, i.Pipe.CopyPipe(), i.List.CopyList(), i.ElseList.CopyList())
-}
-
-// RangeNode represents a {{range}} action and its commands.
-type RangeNode struct {
- BranchNode
-}
-
-func (t *Tree) newRange(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *RangeNode {
- return &RangeNode{BranchNode{tr: t, NodeType: NodeRange, Pos: pos, Line: line, Pipe: pipe, List: list, ElseList: elseList}}
-}
-
-func (r *RangeNode) Copy() Node {
- return r.tr.newRange(r.Pos, r.Line, r.Pipe.CopyPipe(), r.List.CopyList(), r.ElseList.CopyList())
-}
-
-// WithNode represents a {{with}} action and its commands.
-type WithNode struct {
- BranchNode
-}
-
-func (t *Tree) newWith(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *WithNode {
- return &WithNode{BranchNode{tr: t, NodeType: NodeWith, Pos: pos, Line: line, Pipe: pipe, List: list, ElseList: elseList}}
-}
-
-func (w *WithNode) Copy() Node {
- return w.tr.newWith(w.Pos, w.Line, w.Pipe.CopyPipe(), w.List.CopyList(), w.ElseList.CopyList())
-}
-
-// TemplateNode represents a {{template}} action.
-type TemplateNode struct {
- NodeType
- Pos
- tr *Tree
- Line int // The line number in the input (deprecated; kept for compatibility)
- Name string // The name of the template (unquoted).
- Pipe *PipeNode // The command to evaluate as dot for the template.
-}
-
-func (t *Tree) newTemplate(pos Pos, line int, name string, pipe *PipeNode) *TemplateNode {
- return &TemplateNode{tr: t, NodeType: NodeTemplate, Pos: pos, Line: line, Name: name, Pipe: pipe}
-}
-
-func (t *TemplateNode) String() string {
- if t.Pipe == nil {
- return fmt.Sprintf("{{template %q}}", t.Name)
- }
- return fmt.Sprintf("{{template %q %s}}", t.Name, t.Pipe)
-}
-
-func (t *TemplateNode) tree() *Tree {
- return t.tr
-}
-
-func (t *TemplateNode) Copy() Node {
- return t.tr.newTemplate(t.Pos, t.Line, t.Name, t.Pipe.CopyPipe())
-}
diff --git a/vendor/github.com/alecthomas/template/parse/parse.go b/vendor/github.com/alecthomas/template/parse/parse.go
deleted file mode 100644
index 0d77ade87..000000000
--- a/vendor/github.com/alecthomas/template/parse/parse.go
+++ /dev/null
@@ -1,700 +0,0 @@
-// Copyright 2011 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.
-
-// Package parse builds parse trees for templates as defined by text/template
-// and html/template. Clients should use those packages to construct templates
-// rather than this one, which provides shared internal data structures not
-// intended for general use.
-package parse
-
-import (
- "bytes"
- "fmt"
- "runtime"
- "strconv"
- "strings"
-)
-
-// Tree is the representation of a single parsed template.
-type Tree struct {
- Name string // name of the template represented by the tree.
- ParseName string // name of the top-level template during parsing, for error messages.
- Root *ListNode // top-level root of the tree.
- text string // text parsed to create the template (or its parent)
- // Parsing only; cleared after parse.
- funcs []map[string]interface{}
- lex *lexer
- token [3]item // three-token lookahead for parser.
- peekCount int
- vars []string // variables defined at the moment.
-}
-
-// Copy returns a copy of the Tree. Any parsing state is discarded.
-func (t *Tree) Copy() *Tree {
- if t == nil {
- return nil
- }
- return &Tree{
- Name: t.Name,
- ParseName: t.ParseName,
- Root: t.Root.CopyList(),
- text: t.text,
- }
-}
-
-// Parse returns a map from template name to parse.Tree, created by parsing the
-// templates described in the argument string. The top-level template will be
-// given the specified name. If an error is encountered, parsing stops and an
-// empty map is returned with the error.
-func Parse(name, text, leftDelim, rightDelim string, funcs ...map[string]interface{}) (treeSet map[string]*Tree, err error) {
- treeSet = make(map[string]*Tree)
- t := New(name)
- t.text = text
- _, err = t.Parse(text, leftDelim, rightDelim, treeSet, funcs...)
- return
-}
-
-// next returns the next token.
-func (t *Tree) next() item {
- if t.peekCount > 0 {
- t.peekCount--
- } else {
- t.token[0] = t.lex.nextItem()
- }
- return t.token[t.peekCount]
-}
-
-// backup backs the input stream up one token.
-func (t *Tree) backup() {
- t.peekCount++
-}
-
-// backup2 backs the input stream up two tokens.
-// The zeroth token is already there.
-func (t *Tree) backup2(t1 item) {
- t.token[1] = t1
- t.peekCount = 2
-}
-
-// backup3 backs the input stream up three tokens
-// The zeroth token is already there.
-func (t *Tree) backup3(t2, t1 item) { // Reverse order: we're pushing back.
- t.token[1] = t1
- t.token[2] = t2
- t.peekCount = 3
-}
-
-// peek returns but does not consume the next token.
-func (t *Tree) peek() item {
- if t.peekCount > 0 {
- return t.token[t.peekCount-1]
- }
- t.peekCount = 1
- t.token[0] = t.lex.nextItem()
- return t.token[0]
-}
-
-// nextNonSpace returns the next non-space token.
-func (t *Tree) nextNonSpace() (token item) {
- for {
- token = t.next()
- if token.typ != itemSpace {
- break
- }
- }
- return token
-}
-
-// peekNonSpace returns but does not consume the next non-space token.
-func (t *Tree) peekNonSpace() (token item) {
- for {
- token = t.next()
- if token.typ != itemSpace {
- break
- }
- }
- t.backup()
- return token
-}
-
-// Parsing.
-
-// New allocates a new parse tree with the given name.
-func New(name string, funcs ...map[string]interface{}) *Tree {
- return &Tree{
- Name: name,
- funcs: funcs,
- }
-}
-
-// ErrorContext returns a textual representation of the location of the node in the input text.
-// The receiver is only used when the node does not have a pointer to the tree inside,
-// which can occur in old code.
-func (t *Tree) ErrorContext(n Node) (location, context string) {
- pos := int(n.Position())
- tree := n.tree()
- if tree == nil {
- tree = t
- }
- text := tree.text[:pos]
- byteNum := strings.LastIndex(text, "\n")
- if byteNum == -1 {
- byteNum = pos // On first line.
- } else {
- byteNum++ // After the newline.
- byteNum = pos - byteNum
- }
- lineNum := 1 + strings.Count(text, "\n")
- context = n.String()
- if len(context) > 20 {
- context = fmt.Sprintf("%.20s...", context)
- }
- return fmt.Sprintf("%s:%d:%d", tree.ParseName, lineNum, byteNum), context
-}
-
-// errorf formats the error and terminates processing.
-func (t *Tree) errorf(format string, args ...interface{}) {
- t.Root = nil
- format = fmt.Sprintf("template: %s:%d: %s", t.ParseName, t.lex.lineNumber(), format)
- panic(fmt.Errorf(format, args...))
-}
-
-// error terminates processing.
-func (t *Tree) error(err error) {
- t.errorf("%s", err)
-}
-
-// expect consumes the next token and guarantees it has the required type.
-func (t *Tree) expect(expected itemType, context string) item {
- token := t.nextNonSpace()
- if token.typ != expected {
- t.unexpected(token, context)
- }
- return token
-}
-
-// expectOneOf consumes the next token and guarantees it has one of the required types.
-func (t *Tree) expectOneOf(expected1, expected2 itemType, context string) item {
- token := t.nextNonSpace()
- if token.typ != expected1 && token.typ != expected2 {
- t.unexpected(token, context)
- }
- return token
-}
-
-// unexpected complains about the token and terminates processing.
-func (t *Tree) unexpected(token item, context string) {
- t.errorf("unexpected %s in %s", token, context)
-}
-
-// recover is the handler that turns panics into returns from the top level of Parse.
-func (t *Tree) recover(errp *error) {
- e := recover()
- if e != nil {
- if _, ok := e.(runtime.Error); ok {
- panic(e)
- }
- if t != nil {
- t.stopParse()
- }
- *errp = e.(error)
- }
- return
-}
-
-// startParse initializes the parser, using the lexer.
-func (t *Tree) startParse(funcs []map[string]interface{}, lex *lexer) {
- t.Root = nil
- t.lex = lex
- t.vars = []string{"$"}
- t.funcs = funcs
-}
-
-// stopParse terminates parsing.
-func (t *Tree) stopParse() {
- t.lex = nil
- t.vars = nil
- t.funcs = nil
-}
-
-// Parse parses the template definition string to construct a representation of
-// the template for execution. If either action delimiter string is empty, the
-// default ("{{" or "}}") is used. Embedded template definitions are added to
-// the treeSet map.
-func (t *Tree) Parse(text, leftDelim, rightDelim string, treeSet map[string]*Tree, funcs ...map[string]interface{}) (tree *Tree, err error) {
- defer t.recover(&err)
- t.ParseName = t.Name
- t.startParse(funcs, lex(t.Name, text, leftDelim, rightDelim))
- t.text = text
- t.parse(treeSet)
- t.add(treeSet)
- t.stopParse()
- return t, nil
-}
-
-// add adds tree to the treeSet.
-func (t *Tree) add(treeSet map[string]*Tree) {
- tree := treeSet[t.Name]
- if tree == nil || IsEmptyTree(tree.Root) {
- treeSet[t.Name] = t
- return
- }
- if !IsEmptyTree(t.Root) {
- t.errorf("template: multiple definition of template %q", t.Name)
- }
-}
-
-// IsEmptyTree reports whether this tree (node) is empty of everything but space.
-func IsEmptyTree(n Node) bool {
- switch n := n.(type) {
- case nil:
- return true
- case *ActionNode:
- case *IfNode:
- case *ListNode:
- for _, node := range n.Nodes {
- if !IsEmptyTree(node) {
- return false
- }
- }
- return true
- case *RangeNode:
- case *TemplateNode:
- case *TextNode:
- return len(bytes.TrimSpace(n.Text)) == 0
- case *WithNode:
- default:
- panic("unknown node: " + n.String())
- }
- return false
-}
-
-// parse is the top-level parser for a template, essentially the same
-// as itemList except it also parses {{define}} actions.
-// It runs to EOF.
-func (t *Tree) parse(treeSet map[string]*Tree) (next Node) {
- t.Root = t.newList(t.peek().pos)
- for t.peek().typ != itemEOF {
- if t.peek().typ == itemLeftDelim {
- delim := t.next()
- if t.nextNonSpace().typ == itemDefine {
- newT := New("definition") // name will be updated once we know it.
- newT.text = t.text
- newT.ParseName = t.ParseName
- newT.startParse(t.funcs, t.lex)
- newT.parseDefinition(treeSet)
- continue
- }
- t.backup2(delim)
- }
- n := t.textOrAction()
- if n.Type() == nodeEnd {
- t.errorf("unexpected %s", n)
- }
- t.Root.append(n)
- }
- return nil
-}
-
-// parseDefinition parses a {{define}} ... {{end}} template definition and
-// installs the definition in the treeSet map. The "define" keyword has already
-// been scanned.
-func (t *Tree) parseDefinition(treeSet map[string]*Tree) {
- const context = "define clause"
- name := t.expectOneOf(itemString, itemRawString, context)
- var err error
- t.Name, err = strconv.Unquote(name.val)
- if err != nil {
- t.error(err)
- }
- t.expect(itemRightDelim, context)
- var end Node
- t.Root, end = t.itemList()
- if end.Type() != nodeEnd {
- t.errorf("unexpected %s in %s", end, context)
- }
- t.add(treeSet)
- t.stopParse()
-}
-
-// itemList:
-// textOrAction*
-// Terminates at {{end}} or {{else}}, returned separately.
-func (t *Tree) itemList() (list *ListNode, next Node) {
- list = t.newList(t.peekNonSpace().pos)
- for t.peekNonSpace().typ != itemEOF {
- n := t.textOrAction()
- switch n.Type() {
- case nodeEnd, nodeElse:
- return list, n
- }
- list.append(n)
- }
- t.errorf("unexpected EOF")
- return
-}
-
-// textOrAction:
-// text | action
-func (t *Tree) textOrAction() Node {
- switch token := t.nextNonSpace(); token.typ {
- case itemElideNewline:
- return t.elideNewline()
- case itemText:
- return t.newText(token.pos, token.val)
- case itemLeftDelim:
- return t.action()
- default:
- t.unexpected(token, "input")
- }
- return nil
-}
-
-// elideNewline:
-// Remove newlines trailing rightDelim if \\ is present.
-func (t *Tree) elideNewline() Node {
- token := t.peek()
- if token.typ != itemText {
- t.unexpected(token, "input")
- return nil
- }
-
- t.next()
- stripped := strings.TrimLeft(token.val, "\n\r")
- diff := len(token.val) - len(stripped)
- if diff > 0 {
- // This is a bit nasty. We mutate the token in-place to remove
- // preceding newlines.
- token.pos += Pos(diff)
- token.val = stripped
- }
- return t.newText(token.pos, token.val)
-}
-
-// Action:
-// control
-// command ("|" command)*
-// Left delim is past. Now get actions.
-// First word could be a keyword such as range.
-func (t *Tree) action() (n Node) {
- switch token := t.nextNonSpace(); token.typ {
- case itemElse:
- return t.elseControl()
- case itemEnd:
- return t.endControl()
- case itemIf:
- return t.ifControl()
- case itemRange:
- return t.rangeControl()
- case itemTemplate:
- return t.templateControl()
- case itemWith:
- return t.withControl()
- }
- t.backup()
- // Do not pop variables; they persist until "end".
- return t.newAction(t.peek().pos, t.lex.lineNumber(), t.pipeline("command"))
-}
-
-// Pipeline:
-// declarations? command ('|' command)*
-func (t *Tree) pipeline(context string) (pipe *PipeNode) {
- var decl []*VariableNode
- pos := t.peekNonSpace().pos
- // Are there declarations?
- for {
- if v := t.peekNonSpace(); v.typ == itemVariable {
- t.next()
- // Since space is a token, we need 3-token look-ahead here in the worst case:
- // in "$x foo" we need to read "foo" (as opposed to ":=") to know that $x is an
- // argument variable rather than a declaration. So remember the token
- // adjacent to the variable so we can push it back if necessary.
- tokenAfterVariable := t.peek()
- if next := t.peekNonSpace(); next.typ == itemColonEquals || (next.typ == itemChar && next.val == ",") {
- t.nextNonSpace()
- variable := t.newVariable(v.pos, v.val)
- decl = append(decl, variable)
- t.vars = append(t.vars, v.val)
- if next.typ == itemChar && next.val == "," {
- if context == "range" && len(decl) < 2 {
- continue
- }
- t.errorf("too many declarations in %s", context)
- }
- } else if tokenAfterVariable.typ == itemSpace {
- t.backup3(v, tokenAfterVariable)
- } else {
- t.backup2(v)
- }
- }
- break
- }
- pipe = t.newPipeline(pos, t.lex.lineNumber(), decl)
- for {
- switch token := t.nextNonSpace(); token.typ {
- case itemRightDelim, itemRightParen:
- if len(pipe.Cmds) == 0 {
- t.errorf("missing value for %s", context)
- }
- if token.typ == itemRightParen {
- t.backup()
- }
- return
- case itemBool, itemCharConstant, itemComplex, itemDot, itemField, itemIdentifier,
- itemNumber, itemNil, itemRawString, itemString, itemVariable, itemLeftParen:
- t.backup()
- pipe.append(t.command())
- default:
- t.unexpected(token, context)
- }
- }
-}
-
-func (t *Tree) parseControl(allowElseIf bool, context string) (pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) {
- defer t.popVars(len(t.vars))
- line = t.lex.lineNumber()
- pipe = t.pipeline(context)
- var next Node
- list, next = t.itemList()
- switch next.Type() {
- case nodeEnd: //done
- case nodeElse:
- if allowElseIf {
- // Special case for "else if". If the "else" is followed immediately by an "if",
- // the elseControl will have left the "if" token pending. Treat
- // {{if a}}_{{else if b}}_{{end}}
- // as
- // {{if a}}_{{else}}{{if b}}_{{end}}{{end}}.
- // To do this, parse the if as usual and stop at it {{end}}; the subsequent{{end}}
- // is assumed. This technique works even for long if-else-if chains.
- // TODO: Should we allow else-if in with and range?
- if t.peek().typ == itemIf {
- t.next() // Consume the "if" token.
- elseList = t.newList(next.Position())
- elseList.append(t.ifControl())
- // Do not consume the next item - only one {{end}} required.
- break
- }
- }
- elseList, next = t.itemList()
- if next.Type() != nodeEnd {
- t.errorf("expected end; found %s", next)
- }
- }
- return pipe.Position(), line, pipe, list, elseList
-}
-
-// If:
-// {{if pipeline}} itemList {{end}}
-// {{if pipeline}} itemList {{else}} itemList {{end}}
-// If keyword is past.
-func (t *Tree) ifControl() Node {
- return t.newIf(t.parseControl(true, "if"))
-}
-
-// Range:
-// {{range pipeline}} itemList {{end}}
-// {{range pipeline}} itemList {{else}} itemList {{end}}
-// Range keyword is past.
-func (t *Tree) rangeControl() Node {
- return t.newRange(t.parseControl(false, "range"))
-}
-
-// With:
-// {{with pipeline}} itemList {{end}}
-// {{with pipeline}} itemList {{else}} itemList {{end}}
-// If keyword is past.
-func (t *Tree) withControl() Node {
- return t.newWith(t.parseControl(false, "with"))
-}
-
-// End:
-// {{end}}
-// End keyword is past.
-func (t *Tree) endControl() Node {
- return t.newEnd(t.expect(itemRightDelim, "end").pos)
-}
-
-// Else:
-// {{else}}
-// Else keyword is past.
-func (t *Tree) elseControl() Node {
- // Special case for "else if".
- peek := t.peekNonSpace()
- if peek.typ == itemIf {
- // We see "{{else if ... " but in effect rewrite it to {{else}}{{if ... ".
- return t.newElse(peek.pos, t.lex.lineNumber())
- }
- return t.newElse(t.expect(itemRightDelim, "else").pos, t.lex.lineNumber())
-}
-
-// Template:
-// {{template stringValue pipeline}}
-// Template keyword is past. The name must be something that can evaluate
-// to a string.
-func (t *Tree) templateControl() Node {
- var name string
- token := t.nextNonSpace()
- switch token.typ {
- case itemString, itemRawString:
- s, err := strconv.Unquote(token.val)
- if err != nil {
- t.error(err)
- }
- name = s
- default:
- t.unexpected(token, "template invocation")
- }
- var pipe *PipeNode
- if t.nextNonSpace().typ != itemRightDelim {
- t.backup()
- // Do not pop variables; they persist until "end".
- pipe = t.pipeline("template")
- }
- return t.newTemplate(token.pos, t.lex.lineNumber(), name, pipe)
-}
-
-// command:
-// operand (space operand)*
-// space-separated arguments up to a pipeline character or right delimiter.
-// we consume the pipe character but leave the right delim to terminate the action.
-func (t *Tree) command() *CommandNode {
- cmd := t.newCommand(t.peekNonSpace().pos)
- for {
- t.peekNonSpace() // skip leading spaces.
- operand := t.operand()
- if operand != nil {
- cmd.append(operand)
- }
- switch token := t.next(); token.typ {
- case itemSpace:
- continue
- case itemError:
- t.errorf("%s", token.val)
- case itemRightDelim, itemRightParen:
- t.backup()
- case itemPipe:
- default:
- t.errorf("unexpected %s in operand; missing space?", token)
- }
- break
- }
- if len(cmd.Args) == 0 {
- t.errorf("empty command")
- }
- return cmd
-}
-
-// operand:
-// term .Field*
-// An operand is a space-separated component of a command,
-// a term possibly followed by field accesses.
-// A nil return means the next item is not an operand.
-func (t *Tree) operand() Node {
- node := t.term()
- if node == nil {
- return nil
- }
- if t.peek().typ == itemField {
- chain := t.newChain(t.peek().pos, node)
- for t.peek().typ == itemField {
- chain.Add(t.next().val)
- }
- // Compatibility with original API: If the term is of type NodeField
- // or NodeVariable, just put more fields on the original.
- // Otherwise, keep the Chain node.
- // TODO: Switch to Chains always when we can.
- switch node.Type() {
- case NodeField:
- node = t.newField(chain.Position(), chain.String())
- case NodeVariable:
- node = t.newVariable(chain.Position(), chain.String())
- default:
- node = chain
- }
- }
- return node
-}
-
-// term:
-// literal (number, string, nil, boolean)
-// function (identifier)
-// .
-// .Field
-// $
-// '(' pipeline ')'
-// A term is a simple "expression".
-// A nil return means the next item is not a term.
-func (t *Tree) term() Node {
- switch token := t.nextNonSpace(); token.typ {
- case itemError:
- t.errorf("%s", token.val)
- case itemIdentifier:
- if !t.hasFunction(token.val) {
- t.errorf("function %q not defined", token.val)
- }
- return NewIdentifier(token.val).SetTree(t).SetPos(token.pos)
- case itemDot:
- return t.newDot(token.pos)
- case itemNil:
- return t.newNil(token.pos)
- case itemVariable:
- return t.useVar(token.pos, token.val)
- case itemField:
- return t.newField(token.pos, token.val)
- case itemBool:
- return t.newBool(token.pos, token.val == "true")
- case itemCharConstant, itemComplex, itemNumber:
- number, err := t.newNumber(token.pos, token.val, token.typ)
- if err != nil {
- t.error(err)
- }
- return number
- case itemLeftParen:
- pipe := t.pipeline("parenthesized pipeline")
- if token := t.next(); token.typ != itemRightParen {
- t.errorf("unclosed right paren: unexpected %s", token)
- }
- return pipe
- case itemString, itemRawString:
- s, err := strconv.Unquote(token.val)
- if err != nil {
- t.error(err)
- }
- return t.newString(token.pos, token.val, s)
- }
- t.backup()
- return nil
-}
-
-// hasFunction reports if a function name exists in the Tree's maps.
-func (t *Tree) hasFunction(name string) bool {
- for _, funcMap := range t.funcs {
- if funcMap == nil {
- continue
- }
- if funcMap[name] != nil {
- return true
- }
- }
- return false
-}
-
-// popVars trims the variable list to the specified length
-func (t *Tree) popVars(n int) {
- t.vars = t.vars[:n]
-}
-
-// useVar returns a node for a variable reference. It errors if the
-// variable is not defined.
-func (t *Tree) useVar(pos Pos, name string) Node {
- v := t.newVariable(pos, name)
- for _, varName := range t.vars {
- if varName == v.Ident[0] {
- return v
- }
- }
- t.errorf("undefined variable %q", v.Ident[0])
- return nil
-}
diff --git a/vendor/github.com/alecthomas/template/template.go b/vendor/github.com/alecthomas/template/template.go
deleted file mode 100644
index 447ed2aba..000000000
--- a/vendor/github.com/alecthomas/template/template.go
+++ /dev/null
@@ -1,218 +0,0 @@
-// Copyright 2011 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.
-
-package template
-
-import (
- "fmt"
- "reflect"
-
- "github.com/alecthomas/template/parse"
-)
-
-// common holds the information shared by related templates.
-type common struct {
- tmpl map[string]*Template
- // We use two maps, one for parsing and one for execution.
- // This separation makes the API cleaner since it doesn't
- // expose reflection to the client.
- parseFuncs FuncMap
- execFuncs map[string]reflect.Value
-}
-
-// Template is the representation of a parsed template. The *parse.Tree
-// field is exported only for use by html/template and should be treated
-// as unexported by all other clients.
-type Template struct {
- name string
- *parse.Tree
- *common
- leftDelim string
- rightDelim string
-}
-
-// New allocates a new template with the given name.
-func New(name string) *Template {
- return &Template{
- name: name,
- }
-}
-
-// Name returns the name of the template.
-func (t *Template) Name() string {
- return t.name
-}
-
-// New allocates a new template associated with the given one and with the same
-// delimiters. The association, which is transitive, allows one template to
-// invoke another with a {{template}} action.
-func (t *Template) New(name string) *Template {
- t.init()
- return &Template{
- name: name,
- common: t.common,
- leftDelim: t.leftDelim,
- rightDelim: t.rightDelim,
- }
-}
-
-func (t *Template) init() {
- if t.common == nil {
- t.common = new(common)
- t.tmpl = make(map[string]*Template)
- t.parseFuncs = make(FuncMap)
- t.execFuncs = make(map[string]reflect.Value)
- }
-}
-
-// Clone returns a duplicate of the template, including all associated
-// templates. The actual representation is not copied, but the name space of
-// associated templates is, so further calls to Parse in the copy will add
-// templates to the copy but not to the original. Clone can be used to prepare
-// common templates and use them with variant definitions for other templates
-// by adding the variants after the clone is made.
-func (t *Template) Clone() (*Template, error) {
- nt := t.copy(nil)
- nt.init()
- nt.tmpl[t.name] = nt
- for k, v := range t.tmpl {
- if k == t.name { // Already installed.
- continue
- }
- // The associated templates share nt's common structure.
- tmpl := v.copy(nt.common)
- nt.tmpl[k] = tmpl
- }
- for k, v := range t.parseFuncs {
- nt.parseFuncs[k] = v
- }
- for k, v := range t.execFuncs {
- nt.execFuncs[k] = v
- }
- return nt, nil
-}
-
-// copy returns a shallow copy of t, with common set to the argument.
-func (t *Template) copy(c *common) *Template {
- nt := New(t.name)
- nt.Tree = t.Tree
- nt.common = c
- nt.leftDelim = t.leftDelim
- nt.rightDelim = t.rightDelim
- return nt
-}
-
-// AddParseTree creates a new template with the name and parse tree
-// and associates it with t.
-func (t *Template) AddParseTree(name string, tree *parse.Tree) (*Template, error) {
- if t.common != nil && t.tmpl[name] != nil {
- return nil, fmt.Errorf("template: redefinition of template %q", name)
- }
- nt := t.New(name)
- nt.Tree = tree
- t.tmpl[name] = nt
- return nt, nil
-}
-
-// Templates returns a slice of the templates associated with t, including t
-// itself.
-func (t *Template) Templates() []*Template {
- if t.common == nil {
- return nil
- }
- // Return a slice so we don't expose the map.
- m := make([]*Template, 0, len(t.tmpl))
- for _, v := range t.tmpl {
- m = append(m, v)
- }
- return m
-}
-
-// Delims sets the action delimiters to the specified strings, to be used in
-// subsequent calls to Parse, ParseFiles, or ParseGlob. Nested template
-// definitions will inherit the settings. An empty delimiter stands for the
-// corresponding default: {{ or }}.
-// The return value is the template, so calls can be chained.
-func (t *Template) Delims(left, right string) *Template {
- t.leftDelim = left
- t.rightDelim = right
- return t
-}
-
-// Funcs adds the elements of the argument map to the template's function map.
-// It panics if a value in the map is not a function with appropriate return
-// type. However, it is legal to overwrite elements of the map. The return
-// value is the template, so calls can be chained.
-func (t *Template) Funcs(funcMap FuncMap) *Template {
- t.init()
- addValueFuncs(t.execFuncs, funcMap)
- addFuncs(t.parseFuncs, funcMap)
- return t
-}
-
-// Lookup returns the template with the given name that is associated with t,
-// or nil if there is no such template.
-func (t *Template) Lookup(name string) *Template {
- if t.common == nil {
- return nil
- }
- return t.tmpl[name]
-}
-
-// Parse parses a string into a template. Nested template definitions will be
-// associated with the top-level template t. Parse may be called multiple times
-// to parse definitions of templates to associate with t. It is an error if a
-// resulting template is non-empty (contains content other than template
-// definitions) and would replace a non-empty template with the same name.
-// (In multiple calls to Parse with the same receiver template, only one call
-// can contain text other than space, comments, and template definitions.)
-func (t *Template) Parse(text string) (*Template, error) {
- t.init()
- trees, err := parse.Parse(t.name, text, t.leftDelim, t.rightDelim, t.parseFuncs, builtins)
- if err != nil {
- return nil, err
- }
- // Add the newly parsed trees, including the one for t, into our common structure.
- for name, tree := range trees {
- // If the name we parsed is the name of this template, overwrite this template.
- // The associate method checks it's not a redefinition.
- tmpl := t
- if name != t.name {
- tmpl = t.New(name)
- }
- // Even if t == tmpl, we need to install it in the common.tmpl map.
- if replace, err := t.associate(tmpl, tree); err != nil {
- return nil, err
- } else if replace {
- tmpl.Tree = tree
- }
- tmpl.leftDelim = t.leftDelim
- tmpl.rightDelim = t.rightDelim
- }
- return t, nil
-}
-
-// associate installs the new template into the group of templates associated
-// with t. It is an error to reuse a name except to overwrite an empty
-// template. The two are already known to share the common structure.
-// The boolean return value reports wither to store this tree as t.Tree.
-func (t *Template) associate(new *Template, tree *parse.Tree) (bool, error) {
- if new.common != t.common {
- panic("internal error: associate not common")
- }
- name := new.name
- if old := t.tmpl[name]; old != nil {
- oldIsEmpty := parse.IsEmptyTree(old.Root)
- newIsEmpty := parse.IsEmptyTree(tree.Root)
- if newIsEmpty {
- // Whether old is empty or not, new is empty; no reason to replace old.
- return false, nil
- }
- if !oldIsEmpty {
- return false, fmt.Errorf("template: redefinition of template %q", name)
- }
- }
- t.tmpl[name] = new
- return true, nil
-}
diff --git a/vendor/github.com/asaskevich/govalidator/.travis.yml b/vendor/github.com/asaskevich/govalidator/.travis.yml
deleted file mode 100644
index e29f8eef5..000000000
--- a/vendor/github.com/asaskevich/govalidator/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: go
-
-go:
- - 1.1
- - 1.2
- - 1.3
- - 1.4
- - 1.5
- - 1.6
- - tip
-
-notifications:
- email:
- - bwatas@gmail.com
diff --git a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md
deleted file mode 100644
index f0f7e3a8a..000000000
--- a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md
+++ /dev/null
@@ -1,63 +0,0 @@
-#### Support
-If you do have a contribution to the package, feel free to create a Pull Request or an Issue.
-
-#### What to contribute
-If you don't know what to do, there are some features and functions that need to be done
-
-- [ ] Refactor code
-- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check
-- [ ] Create actual list of contributors and projects that currently using this package
-- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues)
-- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions)
-- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new
-- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc
-- [ ] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224)
-- [ ] Implement fuzzing testing
-- [ ] Implement some struct/map/array utilities
-- [ ] Implement map/array validation
-- [ ] Implement benchmarking
-- [ ] Implement batch of examples
-- [ ] Look at forks for new features and fixes
-
-#### Advice
-Feel free to create what you want, but keep in mind when you implement new features:
-- Code must be clear and readable, names of variables/constants clearly describes what they are doing
-- Public functions must be documented and described in source file and added to README.md to the list of available functions
-- There are must be unit-tests for any new functions and improvements
-
-## Financial contributions
-
-We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/govalidator).
-Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
-
-
-## Credits
-
-
-### Contributors
-
-Thank you to all the people who have already contributed to govalidator!
-
-
-
-### Backers
-
-Thank you to all our backers! [[Become a backer](https://opencollective.com/govalidator#backer)]
-
-
-
-
-### Sponsors
-
-Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/govalidator#sponsor))
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vendor/github.com/asaskevich/govalidator/LICENSE b/vendor/github.com/asaskevich/govalidator/LICENSE
deleted file mode 100644
index 2f9a31fad..000000000
--- a/vendor/github.com/asaskevich/govalidator/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Alex Saskevich
-
-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.
\ No newline at end of file
diff --git a/vendor/github.com/asaskevich/govalidator/README.md b/vendor/github.com/asaskevich/govalidator/README.md
deleted file mode 100644
index 40f9a8781..000000000
--- a/vendor/github.com/asaskevich/govalidator/README.md
+++ /dev/null
@@ -1,507 +0,0 @@
-govalidator
-===========
-[](https://gitter.im/asaskevich/govalidator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [](https://godoc.org/github.com/asaskevich/govalidator) [](https://coveralls.io/r/asaskevich/govalidator?branch=master) [](https://app.wercker.com/project/bykey/1ec990b09ea86c910d5f08b0e02c6043)
-[](https://travis-ci.org/asaskevich/govalidator) [](https://goreportcard.com/report/github.com/asaskevich/govalidator) [](http://go-search.org/view?id=github.com%2Fasaskevich%2Fgovalidator) [](#backers) [](#sponsors) [](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_shield)
-
-A package of validators and sanitizers for strings, structs and collections. Based on [validator.js](https://github.com/chriso/validator.js).
-
-#### Installation
-Make sure that Go is installed on your computer.
-Type the following command in your terminal:
-
- go get github.com/asaskevich/govalidator
-
-or you can get specified release of the package with `gopkg.in`:
-
- go get gopkg.in/asaskevich/govalidator.v4
-
-After it the package is ready to use.
-
-
-#### Import package in your project
-Add following line in your `*.go` file:
-```go
-import "github.com/asaskevich/govalidator"
-```
-If you are unhappy to use long `govalidator`, you can do something like this:
-```go
-import (
- valid "github.com/asaskevich/govalidator"
-)
-```
-
-#### Activate behavior to require all fields have a validation tag by default
-`SetFieldsRequiredByDefault` causes validation to fail when struct fields do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). A good place to activate this is a package init function or the main() function.
-
-`SetNilPtrAllowedByRequired` causes validation to pass when struct fields marked by `required` are set to nil. This is disabled by default for consistency, but some packages that need to be able to determine between `nil` and `zero value` state can use this. If disabled, both `nil` and `zero` values cause validation errors.
-
-```go
-import "github.com/asaskevich/govalidator"
-
-func init() {
- govalidator.SetFieldsRequiredByDefault(true)
-}
-```
-
-Here's some code to explain it:
-```go
-// this struct definition will fail govalidator.ValidateStruct() (and the field values do not matter):
-type exampleStruct struct {
- Name string ``
- Email string `valid:"email"`
-}
-
-// this, however, will only fail when Email is empty or an invalid email address:
-type exampleStruct2 struct {
- Name string `valid:"-"`
- Email string `valid:"email"`
-}
-
-// lastly, this will only fail when Email is an invalid email address but not when it's empty:
-type exampleStruct2 struct {
- Name string `valid:"-"`
- Email string `valid:"email,optional"`
-}
-```
-
-#### Recent breaking changes (see [#123](https://github.com/asaskevich/govalidator/pull/123))
-##### Custom validator function signature
-A context was added as the second parameter, for structs this is the object being validated – this makes dependent validation possible.
-```go
-import "github.com/asaskevich/govalidator"
-
-// old signature
-func(i interface{}) bool
-
-// new signature
-func(i interface{}, o interface{}) bool
-```
-
-##### Adding a custom validator
-This was changed to prevent data races when accessing custom validators.
-```go
-import "github.com/asaskevich/govalidator"
-
-// before
-govalidator.CustomTypeTagMap["customByteArrayValidator"] = CustomTypeValidator(func(i interface{}, o interface{}) bool {
- // ...
-})
-
-// after
-govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator(func(i interface{}, o interface{}) bool {
- // ...
-}))
-```
-
-#### List of functions:
-```go
-func Abs(value float64) float64
-func BlackList(str, chars string) string
-func ByteLength(str string, params ...string) bool
-func CamelCaseToUnderscore(str string) string
-func Contains(str, substring string) bool
-func Count(array []interface{}, iterator ConditionIterator) int
-func Each(array []interface{}, iterator Iterator)
-func ErrorByField(e error, field string) string
-func ErrorsByField(e error) map[string]string
-func Filter(array []interface{}, iterator ConditionIterator) []interface{}
-func Find(array []interface{}, iterator ConditionIterator) interface{}
-func GetLine(s string, index int) (string, error)
-func GetLines(s string) []string
-func InRange(value, left, right float64) bool
-func IsASCII(str string) bool
-func IsAlpha(str string) bool
-func IsAlphanumeric(str string) bool
-func IsBase64(str string) bool
-func IsByteLength(str string, min, max int) bool
-func IsCIDR(str string) bool
-func IsCreditCard(str string) bool
-func IsDNSName(str string) bool
-func IsDataURI(str string) bool
-func IsDialString(str string) bool
-func IsDivisibleBy(str, num string) bool
-func IsEmail(str string) bool
-func IsFilePath(str string) (bool, int)
-func IsFloat(str string) bool
-func IsFullWidth(str string) bool
-func IsHalfWidth(str string) bool
-func IsHexadecimal(str string) bool
-func IsHexcolor(str string) bool
-func IsHost(str string) bool
-func IsIP(str string) bool
-func IsIPv4(str string) bool
-func IsIPv6(str string) bool
-func IsISBN(str string, version int) bool
-func IsISBN10(str string) bool
-func IsISBN13(str string) bool
-func IsISO3166Alpha2(str string) bool
-func IsISO3166Alpha3(str string) bool
-func IsISO693Alpha2(str string) bool
-func IsISO693Alpha3b(str string) bool
-func IsISO4217(str string) bool
-func IsIn(str string, params ...string) bool
-func IsInt(str string) bool
-func IsJSON(str string) bool
-func IsLatitude(str string) bool
-func IsLongitude(str string) bool
-func IsLowerCase(str string) bool
-func IsMAC(str string) bool
-func IsMongoID(str string) bool
-func IsMultibyte(str string) bool
-func IsNatural(value float64) bool
-func IsNegative(value float64) bool
-func IsNonNegative(value float64) bool
-func IsNonPositive(value float64) bool
-func IsNull(str string) bool
-func IsNumeric(str string) bool
-func IsPort(str string) bool
-func IsPositive(value float64) bool
-func IsPrintableASCII(str string) bool
-func IsRFC3339(str string) bool
-func IsRFC3339WithoutZone(str string) bool
-func IsRGBcolor(str string) bool
-func IsRequestURI(rawurl string) bool
-func IsRequestURL(rawurl string) bool
-func IsSSN(str string) bool
-func IsSemver(str string) bool
-func IsTime(str string, format string) bool
-func IsURL(str string) bool
-func IsUTFDigit(str string) bool
-func IsUTFLetter(str string) bool
-func IsUTFLetterNumeric(str string) bool
-func IsUTFNumeric(str string) bool
-func IsUUID(str string) bool
-func IsUUIDv3(str string) bool
-func IsUUIDv4(str string) bool
-func IsUUIDv5(str string) bool
-func IsUpperCase(str string) bool
-func IsVariableWidth(str string) bool
-func IsWhole(value float64) bool
-func LeftTrim(str, chars string) string
-func Map(array []interface{}, iterator ResultIterator) []interface{}
-func Matches(str, pattern string) bool
-func NormalizeEmail(str string) (string, error)
-func PadBoth(str string, padStr string, padLen int) string
-func PadLeft(str string, padStr string, padLen int) string
-func PadRight(str string, padStr string, padLen int) string
-func Range(str string, params ...string) bool
-func RemoveTags(s string) string
-func ReplacePattern(str, pattern, replace string) string
-func Reverse(s string) string
-func RightTrim(str, chars string) string
-func RuneLength(str string, params ...string) bool
-func SafeFileName(str string) string
-func SetFieldsRequiredByDefault(value bool)
-func Sign(value float64) float64
-func StringLength(str string, params ...string) bool
-func StringMatches(s string, params ...string) bool
-func StripLow(str string, keepNewLines bool) string
-func ToBoolean(str string) (bool, error)
-func ToFloat(str string) (float64, error)
-func ToInt(str string) (int64, error)
-func ToJSON(obj interface{}) (string, error)
-func ToString(obj interface{}) string
-func Trim(str, chars string) string
-func Truncate(str string, length int, ending string) string
-func UnderscoreToCamelCase(s string) string
-func ValidateStruct(s interface{}) (bool, error)
-func WhiteList(str, chars string) string
-type ConditionIterator
-type CustomTypeValidator
-type Error
-func (e Error) Error() string
-type Errors
-func (es Errors) Error() string
-func (es Errors) Errors() []error
-type ISO3166Entry
-type Iterator
-type ParamValidator
-type ResultIterator
-type UnsupportedTypeError
-func (e *UnsupportedTypeError) Error() string
-type Validator
-```
-
-#### Examples
-###### IsURL
-```go
-println(govalidator.IsURL(`http://user@pass:domain.com/path/page`))
-```
-###### ToString
-```go
-type User struct {
- FirstName string
- LastName string
-}
-
-str := govalidator.ToString(&User{"John", "Juan"})
-println(str)
-```
-###### Each, Map, Filter, Count for slices
-Each iterates over the slice/array and calls Iterator for every item
-```go
-data := []interface{}{1, 2, 3, 4, 5}
-var fn govalidator.Iterator = func(value interface{}, index int) {
- println(value.(int))
-}
-govalidator.Each(data, fn)
-```
-```go
-data := []interface{}{1, 2, 3, 4, 5}
-var fn govalidator.ResultIterator = func(value interface{}, index int) interface{} {
- return value.(int) * 3
-}
-_ = govalidator.Map(data, fn) // result = []interface{}{1, 6, 9, 12, 15}
-```
-```go
-data := []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
-var fn govalidator.ConditionIterator = func(value interface{}, index int) bool {
- return value.(int)%2 == 0
-}
-_ = govalidator.Filter(data, fn) // result = []interface{}{2, 4, 6, 8, 10}
-_ = govalidator.Count(data, fn) // result = 5
-```
-###### ValidateStruct [#2](https://github.com/asaskevich/govalidator/pull/2)
-If you want to validate structs, you can use tag `valid` for any field in your structure. All validators used with this field in one tag are separated by comma. If you want to skip validation, place `-` in your tag. If you need a validator that is not on the list below, you can add it like this:
-```go
-govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool {
- return str == "duck"
-})
-```
-For completely custom validators (interface-based), see below.
-
-Here is a list of available validators for struct fields (validator - used function):
-```go
-"email": IsEmail,
-"url": IsURL,
-"dialstring": IsDialString,
-"requrl": IsRequestURL,
-"requri": IsRequestURI,
-"alpha": IsAlpha,
-"utfletter": IsUTFLetter,
-"alphanum": IsAlphanumeric,
-"utfletternum": IsUTFLetterNumeric,
-"numeric": IsNumeric,
-"utfnumeric": IsUTFNumeric,
-"utfdigit": IsUTFDigit,
-"hexadecimal": IsHexadecimal,
-"hexcolor": IsHexcolor,
-"rgbcolor": IsRGBcolor,
-"lowercase": IsLowerCase,
-"uppercase": IsUpperCase,
-"int": IsInt,
-"float": IsFloat,
-"null": IsNull,
-"uuid": IsUUID,
-"uuidv3": IsUUIDv3,
-"uuidv4": IsUUIDv4,
-"uuidv5": IsUUIDv5,
-"creditcard": IsCreditCard,
-"isbn10": IsISBN10,
-"isbn13": IsISBN13,
-"json": IsJSON,
-"multibyte": IsMultibyte,
-"ascii": IsASCII,
-"printableascii": IsPrintableASCII,
-"fullwidth": IsFullWidth,
-"halfwidth": IsHalfWidth,
-"variablewidth": IsVariableWidth,
-"base64": IsBase64,
-"datauri": IsDataURI,
-"ip": IsIP,
-"port": IsPort,
-"ipv4": IsIPv4,
-"ipv6": IsIPv6,
-"dns": IsDNSName,
-"host": IsHost,
-"mac": IsMAC,
-"latitude": IsLatitude,
-"longitude": IsLongitude,
-"ssn": IsSSN,
-"semver": IsSemver,
-"rfc3339": IsRFC3339,
-"rfc3339WithoutZone": IsRFC3339WithoutZone,
-"ISO3166Alpha2": IsISO3166Alpha2,
-"ISO3166Alpha3": IsISO3166Alpha3,
-```
-Validators with parameters
-
-```go
-"range(min|max)": Range,
-"length(min|max)": ByteLength,
-"runelength(min|max)": RuneLength,
-"stringlength(min|max)": StringLength,
-"matches(pattern)": StringMatches,
-"in(string1|string2|...|stringN)": IsIn,
-"rsapub(keylength)" : IsRsaPub,
-```
-
-And here is small example of usage:
-```go
-type Post struct {
- Title string `valid:"alphanum,required"`
- Message string `valid:"duck,ascii"`
- Message2 string `valid:"animal(dog)"`
- AuthorIP string `valid:"ipv4"`
- Date string `valid:"-"`
-}
-post := &Post{
- Title: "My Example Post",
- Message: "duck",
- Message2: "dog",
- AuthorIP: "123.234.54.3",
-}
-
-// Add your own struct validation tags
-govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool {
- return str == "duck"
-})
-
-// Add your own struct validation tags with parameter
-govalidator.ParamTagMap["animal"] = govalidator.ParamValidator(func(str string, params ...string) bool {
- species := params[0]
- return str == species
-})
-govalidator.ParamTagRegexMap["animal"] = regexp.MustCompile("^animal\\((\\w+)\\)$")
-
-result, err := govalidator.ValidateStruct(post)
-if err != nil {
- println("error: " + err.Error())
-}
-println(result)
-```
-###### WhiteList
-```go
-// Remove all characters from string ignoring characters between "a" and "z"
-println(govalidator.WhiteList("a3a43a5a4a3a2a23a4a5a4a3a4", "a-z") == "aaaaaaaaaaaa")
-```
-
-###### Custom validation functions
-Custom validation using your own domain specific validators is also available - here's an example of how to use it:
-```go
-import "github.com/asaskevich/govalidator"
-
-type CustomByteArray [6]byte // custom types are supported and can be validated
-
-type StructWithCustomByteArray struct {
- ID CustomByteArray `valid:"customByteArrayValidator,customMinLengthValidator"` // multiple custom validators are possible as well and will be evaluated in sequence
- Email string `valid:"email"`
- CustomMinLength int `valid:"-"`
-}
-
-govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator(func(i interface{}, context interface{}) bool {
- switch v := context.(type) { // you can type switch on the context interface being validated
- case StructWithCustomByteArray:
- // you can check and validate against some other field in the context,
- // return early or not validate against the context at all – your choice
- case SomeOtherType:
- // ...
- default:
- // expecting some other type? Throw/panic here or continue
- }
-
- switch v := i.(type) { // type switch on the struct field being validated
- case CustomByteArray:
- for _, e := range v { // this validator checks that the byte array is not empty, i.e. not all zeroes
- if e != 0 {
- return true
- }
- }
- }
- return false
-}))
-govalidator.CustomTypeTagMap.Set("customMinLengthValidator", CustomTypeValidator(func(i interface{}, context interface{}) bool {
- switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation
- case StructWithCustomByteArray:
- return len(v.ID) >= v.CustomMinLength
- }
- return false
-}))
-```
-
-###### Custom error messages
-Custom error messages are supported via annotations by adding the `~` separator - here's an example of how to use it:
-```go
-type Ticket struct {
- Id int64 `json:"id"`
- FirstName string `json:"firstname" valid:"required~First name is blank"`
-}
-```
-
-#### Notes
-Documentation is available here: [godoc.org](https://godoc.org/github.com/asaskevich/govalidator).
-Full information about code coverage is also available here: [govalidator on gocover.io](http://gocover.io/github.com/asaskevich/govalidator).
-
-#### Support
-If you do have a contribution to the package, feel free to create a Pull Request or an Issue.
-
-#### What to contribute
-If you don't know what to do, there are some features and functions that need to be done
-
-- [ ] Refactor code
-- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check
-- [ ] Create actual list of contributors and projects that currently using this package
-- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues)
-- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions)
-- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new
-- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc
-- [ ] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224)
-- [ ] Implement fuzzing testing
-- [ ] Implement some struct/map/array utilities
-- [ ] Implement map/array validation
-- [ ] Implement benchmarking
-- [ ] Implement batch of examples
-- [ ] Look at forks for new features and fixes
-
-#### Advice
-Feel free to create what you want, but keep in mind when you implement new features:
-- Code must be clear and readable, names of variables/constants clearly describes what they are doing
-- Public functions must be documented and described in source file and added to README.md to the list of available functions
-- There are must be unit-tests for any new functions and improvements
-
-## Credits
-### Contributors
-
-This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
-
-#### Special thanks to [contributors](https://github.com/asaskevich/govalidator/graphs/contributors)
-* [Daniel Lohse](https://github.com/annismckenzie)
-* [Attila Oláh](https://github.com/attilaolah)
-* [Daniel Korner](https://github.com/Dadie)
-* [Steven Wilkin](https://github.com/stevenwilkin)
-* [Deiwin Sarjas](https://github.com/deiwin)
-* [Noah Shibley](https://github.com/slugmobile)
-* [Nathan Davies](https://github.com/nathj07)
-* [Matt Sanford](https://github.com/mzsanford)
-* [Simon ccl1115](https://github.com/ccl1115)
-
-
-
-
-### Backers
-
-Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/govalidator#backer)]
-
-
-
-
-### Sponsors
-
-Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/govalidator#sponsor)]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-## License
-[](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large)
\ No newline at end of file
diff --git a/vendor/github.com/asaskevich/govalidator/arrays.go b/vendor/github.com/asaskevich/govalidator/arrays.go
deleted file mode 100644
index 5bace2654..000000000
--- a/vendor/github.com/asaskevich/govalidator/arrays.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package govalidator
-
-// Iterator is the function that accepts element of slice/array and its index
-type Iterator func(interface{}, int)
-
-// ResultIterator is the function that accepts element of slice/array and its index and returns any result
-type ResultIterator func(interface{}, int) interface{}
-
-// ConditionIterator is the function that accepts element of slice/array and its index and returns boolean
-type ConditionIterator func(interface{}, int) bool
-
-// Each iterates over the slice and apply Iterator to every item
-func Each(array []interface{}, iterator Iterator) {
- for index, data := range array {
- iterator(data, index)
- }
-}
-
-// Map iterates over the slice and apply ResultIterator to every item. Returns new slice as a result.
-func Map(array []interface{}, iterator ResultIterator) []interface{} {
- var result = make([]interface{}, len(array))
- for index, data := range array {
- result[index] = iterator(data, index)
- }
- return result
-}
-
-// Find iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise.
-func Find(array []interface{}, iterator ConditionIterator) interface{} {
- for index, data := range array {
- if iterator(data, index) {
- return data
- }
- }
- return nil
-}
-
-// Filter iterates over the slice and apply ConditionIterator to every item. Returns new slice.
-func Filter(array []interface{}, iterator ConditionIterator) []interface{} {
- var result = make([]interface{}, 0)
- for index, data := range array {
- if iterator(data, index) {
- result = append(result, data)
- }
- }
- return result
-}
-
-// Count iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator.
-func Count(array []interface{}, iterator ConditionIterator) int {
- count := 0
- for index, data := range array {
- if iterator(data, index) {
- count = count + 1
- }
- }
- return count
-}
diff --git a/vendor/github.com/asaskevich/govalidator/converter.go b/vendor/github.com/asaskevich/govalidator/converter.go
deleted file mode 100644
index cf1e5d569..000000000
--- a/vendor/github.com/asaskevich/govalidator/converter.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package govalidator
-
-import (
- "encoding/json"
- "fmt"
- "reflect"
- "strconv"
-)
-
-// ToString convert the input to a string.
-func ToString(obj interface{}) string {
- res := fmt.Sprintf("%v", obj)
- return string(res)
-}
-
-// ToJSON convert the input to a valid JSON string
-func ToJSON(obj interface{}) (string, error) {
- res, err := json.Marshal(obj)
- if err != nil {
- res = []byte("")
- }
- return string(res), err
-}
-
-// ToFloat convert the input string to a float, or 0.0 if the input is not a float.
-func ToFloat(str string) (float64, error) {
- res, err := strconv.ParseFloat(str, 64)
- if err != nil {
- res = 0.0
- }
- return res, err
-}
-
-// ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer.
-func ToInt(value interface{}) (res int64, err error) {
- val := reflect.ValueOf(value)
-
- switch value.(type) {
- case int, int8, int16, int32, int64:
- res = val.Int()
- case uint, uint8, uint16, uint32, uint64:
- res = int64(val.Uint())
- case string:
- if IsInt(val.String()) {
- res, err = strconv.ParseInt(val.String(), 0, 64)
- if err != nil {
- res = 0
- }
- } else {
- err = fmt.Errorf("math: square root of negative number %g", value)
- res = 0
- }
- default:
- err = fmt.Errorf("math: square root of negative number %g", value)
- res = 0
- }
-
- return
-}
-
-// ToBoolean convert the input string to a boolean.
-func ToBoolean(str string) (bool, error) {
- return strconv.ParseBool(str)
-}
diff --git a/vendor/github.com/asaskevich/govalidator/error.go b/vendor/github.com/asaskevich/govalidator/error.go
deleted file mode 100644
index 655b750cb..000000000
--- a/vendor/github.com/asaskevich/govalidator/error.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package govalidator
-
-import "strings"
-
-// Errors is an array of multiple errors and conforms to the error interface.
-type Errors []error
-
-// Errors returns itself.
-func (es Errors) Errors() []error {
- return es
-}
-
-func (es Errors) Error() string {
- var errs []string
- for _, e := range es {
- errs = append(errs, e.Error())
- }
- return strings.Join(errs, ";")
-}
-
-// Error encapsulates a name, an error and whether there's a custom error message or not.
-type Error struct {
- Name string
- Err error
- CustomErrorMessageExists bool
-
- // Validator indicates the name of the validator that failed
- Validator string
- Path []string
-}
-
-func (e Error) Error() string {
- if e.CustomErrorMessageExists {
- return e.Err.Error()
- }
-
- errName := e.Name
- if len(e.Path) > 0 {
- errName = strings.Join(append(e.Path, e.Name), ".")
- }
-
- return errName + ": " + e.Err.Error()
-}
diff --git a/vendor/github.com/asaskevich/govalidator/numerics.go b/vendor/github.com/asaskevich/govalidator/numerics.go
deleted file mode 100644
index 7e6c652e1..000000000
--- a/vendor/github.com/asaskevich/govalidator/numerics.go
+++ /dev/null
@@ -1,97 +0,0 @@
-package govalidator
-
-import (
- "math"
- "reflect"
-)
-
-// Abs returns absolute value of number
-func Abs(value float64) float64 {
- return math.Abs(value)
-}
-
-// Sign returns signum of number: 1 in case of value > 0, -1 in case of value < 0, 0 otherwise
-func Sign(value float64) float64 {
- if value > 0 {
- return 1
- } else if value < 0 {
- return -1
- } else {
- return 0
- }
-}
-
-// IsNegative returns true if value < 0
-func IsNegative(value float64) bool {
- return value < 0
-}
-
-// IsPositive returns true if value > 0
-func IsPositive(value float64) bool {
- return value > 0
-}
-
-// IsNonNegative returns true if value >= 0
-func IsNonNegative(value float64) bool {
- return value >= 0
-}
-
-// IsNonPositive returns true if value <= 0
-func IsNonPositive(value float64) bool {
- return value <= 0
-}
-
-// InRange returns true if value lies between left and right border
-func InRangeInt(value, left, right interface{}) bool {
- value64, _ := ToInt(value)
- left64, _ := ToInt(left)
- right64, _ := ToInt(right)
- if left64 > right64 {
- left64, right64 = right64, left64
- }
- return value64 >= left64 && value64 <= right64
-}
-
-// InRange returns true if value lies between left and right border
-func InRangeFloat32(value, left, right float32) bool {
- if left > right {
- left, right = right, left
- }
- return value >= left && value <= right
-}
-
-// InRange returns true if value lies between left and right border
-func InRangeFloat64(value, left, right float64) bool {
- if left > right {
- left, right = right, left
- }
- return value >= left && value <= right
-}
-
-// InRange returns true if value lies between left and right border, generic type to handle int, float32 or float64, all types must the same type
-func InRange(value interface{}, left interface{}, right interface{}) bool {
-
- reflectValue := reflect.TypeOf(value).Kind()
- reflectLeft := reflect.TypeOf(left).Kind()
- reflectRight := reflect.TypeOf(right).Kind()
-
- if reflectValue == reflect.Int && reflectLeft == reflect.Int && reflectRight == reflect.Int {
- return InRangeInt(value.(int), left.(int), right.(int))
- } else if reflectValue == reflect.Float32 && reflectLeft == reflect.Float32 && reflectRight == reflect.Float32 {
- return InRangeFloat32(value.(float32), left.(float32), right.(float32))
- } else if reflectValue == reflect.Float64 && reflectLeft == reflect.Float64 && reflectRight == reflect.Float64 {
- return InRangeFloat64(value.(float64), left.(float64), right.(float64))
- } else {
- return false
- }
-}
-
-// IsWhole returns true if value is whole number
-func IsWhole(value float64) bool {
- return math.Remainder(value, 1) == 0
-}
-
-// IsNatural returns true if value is natural number (positive and whole)
-func IsNatural(value float64) bool {
- return IsWhole(value) && IsPositive(value)
-}
diff --git a/vendor/github.com/asaskevich/govalidator/patterns.go b/vendor/github.com/asaskevich/govalidator/patterns.go
deleted file mode 100644
index 61a05d438..000000000
--- a/vendor/github.com/asaskevich/govalidator/patterns.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package govalidator
-
-import "regexp"
-
-// Basic regular expressions for validating strings
-const (
- Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$"
- CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$"
- ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$"
- ISBN13 string = "^(?:[0-9]{13})$"
- UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$"
- UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
- UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
- UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
- Alpha string = "^[a-zA-Z]+$"
- Alphanumeric string = "^[a-zA-Z0-9]+$"
- Numeric string = "^[0-9]+$"
- Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$"
- Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"
- Hexadecimal string = "^[0-9a-fA-F]+$"
- Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
- RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$"
- ASCII string = "^[\x00-\x7F]+$"
- Multibyte string = "[^\x00-\x7F]"
- FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]"
- HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]"
- Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$"
- PrintableASCII string = "^[\x20-\x7E]+$"
- DataURI string = "^data:.+\\/(.+);base64$"
- Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$"
- Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$"
- DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$`
- IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))`
- URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)`
- URLUsername string = `(\S+(:\S*)?@)`
- URLPath string = `((\/|\?|#)[^\s]*)`
- URLPort string = `(:(\d{1,5}))`
- URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3])(\.(1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-4]))`
- URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))`
- URL string = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$`
- SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$`
- WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$`
- UnixPath string = `^(/[^/\x00]*)+/?$`
- Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"
- tagName string = "valid"
- hasLowerCase string = ".*[[:lower:]]"
- hasUpperCase string = ".*[[:upper:]]"
- hasWhitespace string = ".*[[:space:]]"
- hasWhitespaceOnly string = "^[[:space:]]+$"
-)
-
-// Used by IsFilePath func
-const (
- // Unknown is unresolved OS type
- Unknown = iota
- // Win is Windows type
- Win
- // Unix is *nix OS types
- Unix
-)
-
-var (
- userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$")
- hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$")
- userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})")
- rxEmail = regexp.MustCompile(Email)
- rxCreditCard = regexp.MustCompile(CreditCard)
- rxISBN10 = regexp.MustCompile(ISBN10)
- rxISBN13 = regexp.MustCompile(ISBN13)
- rxUUID3 = regexp.MustCompile(UUID3)
- rxUUID4 = regexp.MustCompile(UUID4)
- rxUUID5 = regexp.MustCompile(UUID5)
- rxUUID = regexp.MustCompile(UUID)
- rxAlpha = regexp.MustCompile(Alpha)
- rxAlphanumeric = regexp.MustCompile(Alphanumeric)
- rxNumeric = regexp.MustCompile(Numeric)
- rxInt = regexp.MustCompile(Int)
- rxFloat = regexp.MustCompile(Float)
- rxHexadecimal = regexp.MustCompile(Hexadecimal)
- rxHexcolor = regexp.MustCompile(Hexcolor)
- rxRGBcolor = regexp.MustCompile(RGBcolor)
- rxASCII = regexp.MustCompile(ASCII)
- rxPrintableASCII = regexp.MustCompile(PrintableASCII)
- rxMultibyte = regexp.MustCompile(Multibyte)
- rxFullWidth = regexp.MustCompile(FullWidth)
- rxHalfWidth = regexp.MustCompile(HalfWidth)
- rxBase64 = regexp.MustCompile(Base64)
- rxDataURI = regexp.MustCompile(DataURI)
- rxLatitude = regexp.MustCompile(Latitude)
- rxLongitude = regexp.MustCompile(Longitude)
- rxDNSName = regexp.MustCompile(DNSName)
- rxURL = regexp.MustCompile(URL)
- rxSSN = regexp.MustCompile(SSN)
- rxWinPath = regexp.MustCompile(WinPath)
- rxUnixPath = regexp.MustCompile(UnixPath)
- rxSemver = regexp.MustCompile(Semver)
- rxHasLowerCase = regexp.MustCompile(hasLowerCase)
- rxHasUpperCase = regexp.MustCompile(hasUpperCase)
- rxHasWhitespace = regexp.MustCompile(hasWhitespace)
- rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly)
-)
diff --git a/vendor/github.com/asaskevich/govalidator/types.go b/vendor/github.com/asaskevich/govalidator/types.go
deleted file mode 100644
index 4f7e9274a..000000000
--- a/vendor/github.com/asaskevich/govalidator/types.go
+++ /dev/null
@@ -1,636 +0,0 @@
-package govalidator
-
-import (
- "reflect"
- "regexp"
- "sort"
- "sync"
-)
-
-// Validator is a wrapper for a validator function that returns bool and accepts string.
-type Validator func(str string) bool
-
-// CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type.
-// The second parameter should be the context (in the case of validating a struct: the whole object being validated).
-type CustomTypeValidator func(i interface{}, o interface{}) bool
-
-// ParamValidator is a wrapper for validator functions that accepts additional parameters.
-type ParamValidator func(str string, params ...string) bool
-type tagOptionsMap map[string]tagOption
-
-func (t tagOptionsMap) orderedKeys() []string {
- var keys []string
- for k := range t {
- keys = append(keys, k)
- }
-
- sort.Slice(keys, func(a, b int) bool {
- return t[keys[a]].order < t[keys[b]].order
- })
-
- return keys
-}
-
-type tagOption struct {
- name string
- customErrorMessage string
- order int
-}
-
-// UnsupportedTypeError is a wrapper for reflect.Type
-type UnsupportedTypeError struct {
- Type reflect.Type
-}
-
-// stringValues is a slice of reflect.Value holding *reflect.StringValue.
-// It implements the methods to sort by string.
-type stringValues []reflect.Value
-
-// ParamTagMap is a map of functions accept variants parameters
-var ParamTagMap = map[string]ParamValidator{
- "length": ByteLength,
- "range": Range,
- "runelength": RuneLength,
- "stringlength": StringLength,
- "matches": StringMatches,
- "in": isInRaw,
- "rsapub": IsRsaPub,
-}
-
-// ParamTagRegexMap maps param tags to their respective regexes.
-var ParamTagRegexMap = map[string]*regexp.Regexp{
- "range": regexp.MustCompile("^range\\((\\d+)\\|(\\d+)\\)$"),
- "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"),
- "runelength": regexp.MustCompile("^runelength\\((\\d+)\\|(\\d+)\\)$"),
- "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"),
- "in": regexp.MustCompile(`^in\((.*)\)`),
- "matches": regexp.MustCompile(`^matches\((.+)\)$`),
- "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"),
-}
-
-type customTypeTagMap struct {
- validators map[string]CustomTypeValidator
-
- sync.RWMutex
-}
-
-func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) {
- tm.RLock()
- defer tm.RUnlock()
- v, ok := tm.validators[name]
- return v, ok
-}
-
-func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) {
- tm.Lock()
- defer tm.Unlock()
- tm.validators[name] = ctv
-}
-
-// CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function.
-// Use this to validate compound or custom types that need to be handled as a whole, e.g.
-// `type UUID [16]byte` (this would be handled as an array of bytes).
-var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)}
-
-// TagMap is a map of functions, that can be used as tags for ValidateStruct function.
-var TagMap = map[string]Validator{
- "email": IsEmail,
- "url": IsURL,
- "dialstring": IsDialString,
- "requrl": IsRequestURL,
- "requri": IsRequestURI,
- "alpha": IsAlpha,
- "utfletter": IsUTFLetter,
- "alphanum": IsAlphanumeric,
- "utfletternum": IsUTFLetterNumeric,
- "numeric": IsNumeric,
- "utfnumeric": IsUTFNumeric,
- "utfdigit": IsUTFDigit,
- "hexadecimal": IsHexadecimal,
- "hexcolor": IsHexcolor,
- "rgbcolor": IsRGBcolor,
- "lowercase": IsLowerCase,
- "uppercase": IsUpperCase,
- "int": IsInt,
- "float": IsFloat,
- "null": IsNull,
- "uuid": IsUUID,
- "uuidv3": IsUUIDv3,
- "uuidv4": IsUUIDv4,
- "uuidv5": IsUUIDv5,
- "creditcard": IsCreditCard,
- "isbn10": IsISBN10,
- "isbn13": IsISBN13,
- "json": IsJSON,
- "multibyte": IsMultibyte,
- "ascii": IsASCII,
- "printableascii": IsPrintableASCII,
- "fullwidth": IsFullWidth,
- "halfwidth": IsHalfWidth,
- "variablewidth": IsVariableWidth,
- "base64": IsBase64,
- "datauri": IsDataURI,
- "ip": IsIP,
- "port": IsPort,
- "ipv4": IsIPv4,
- "ipv6": IsIPv6,
- "dns": IsDNSName,
- "host": IsHost,
- "mac": IsMAC,
- "latitude": IsLatitude,
- "longitude": IsLongitude,
- "ssn": IsSSN,
- "semver": IsSemver,
- "rfc3339": IsRFC3339,
- "rfc3339WithoutZone": IsRFC3339WithoutZone,
- "ISO3166Alpha2": IsISO3166Alpha2,
- "ISO3166Alpha3": IsISO3166Alpha3,
- "ISO4217": IsISO4217,
-}
-
-// ISO3166Entry stores country codes
-type ISO3166Entry struct {
- EnglishShortName string
- FrenchShortName string
- Alpha2Code string
- Alpha3Code string
- Numeric string
-}
-
-//ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes"
-var ISO3166List = []ISO3166Entry{
- {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"},
- {"Albania", "Albanie (l')", "AL", "ALB", "008"},
- {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"},
- {"Algeria", "Algérie (l')", "DZ", "DZA", "012"},
- {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"},
- {"Andorra", "Andorre (l')", "AD", "AND", "020"},
- {"Angola", "Angola (l')", "AO", "AGO", "024"},
- {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"},
- {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"},
- {"Argentina", "Argentine (l')", "AR", "ARG", "032"},
- {"Australia", "Australie (l')", "AU", "AUS", "036"},
- {"Austria", "Autriche (l')", "AT", "AUT", "040"},
- {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"},
- {"Bahrain", "Bahreïn", "BH", "BHR", "048"},
- {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"},
- {"Armenia", "Arménie (l')", "AM", "ARM", "051"},
- {"Barbados", "Barbade (la)", "BB", "BRB", "052"},
- {"Belgium", "Belgique (la)", "BE", "BEL", "056"},
- {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"},
- {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"},
- {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"},
- {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"},
- {"Botswana", "Botswana (le)", "BW", "BWA", "072"},
- {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"},
- {"Brazil", "Brésil (le)", "BR", "BRA", "076"},
- {"Belize", "Belize (le)", "BZ", "BLZ", "084"},
- {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"},
- {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"},
- {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"},
- {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"},
- {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"},
- {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"},
- {"Burundi", "Burundi (le)", "BI", "BDI", "108"},
- {"Belarus", "Bélarus (le)", "BY", "BLR", "112"},
- {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"},
- {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"},
- {"Canada", "Canada (le)", "CA", "CAN", "124"},
- {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"},
- {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"},
- {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"},
- {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"},
- {"Chad", "Tchad (le)", "TD", "TCD", "148"},
- {"Chile", "Chili (le)", "CL", "CHL", "152"},
- {"China", "Chine (la)", "CN", "CHN", "156"},
- {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"},
- {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"},
- {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"},
- {"Colombia", "Colombie (la)", "CO", "COL", "170"},
- {"Comoros (the)", "Comores (les)", "KM", "COM", "174"},
- {"Mayotte", "Mayotte", "YT", "MYT", "175"},
- {"Congo (the)", "Congo (le)", "CG", "COG", "178"},
- {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"},
- {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"},
- {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"},
- {"Croatia", "Croatie (la)", "HR", "HRV", "191"},
- {"Cuba", "Cuba", "CU", "CUB", "192"},
- {"Cyprus", "Chypre", "CY", "CYP", "196"},
- {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"},
- {"Benin", "Bénin (le)", "BJ", "BEN", "204"},
- {"Denmark", "Danemark (le)", "DK", "DNK", "208"},
- {"Dominica", "Dominique (la)", "DM", "DMA", "212"},
- {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"},
- {"Ecuador", "Équateur (l')", "EC", "ECU", "218"},
- {"El Salvador", "El Salvador", "SV", "SLV", "222"},
- {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"},
- {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"},
- {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"},
- {"Estonia", "Estonie (l')", "EE", "EST", "233"},
- {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"},
- {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"},
- {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"},
- {"Fiji", "Fidji (les)", "FJ", "FJI", "242"},
- {"Finland", "Finlande (la)", "FI", "FIN", "246"},
- {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"},
- {"France", "France (la)", "FR", "FRA", "250"},
- {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"},
- {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"},
- {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"},
- {"Djibouti", "Djibouti", "DJ", "DJI", "262"},
- {"Gabon", "Gabon (le)", "GA", "GAB", "266"},
- {"Georgia", "Géorgie (la)", "GE", "GEO", "268"},
- {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"},
- {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"},
- {"Germany", "Allemagne (l')", "DE", "DEU", "276"},
- {"Ghana", "Ghana (le)", "GH", "GHA", "288"},
- {"Gibraltar", "Gibraltar", "GI", "GIB", "292"},
- {"Kiribati", "Kiribati", "KI", "KIR", "296"},
- {"Greece", "Grèce (la)", "GR", "GRC", "300"},
- {"Greenland", "Groenland (le)", "GL", "GRL", "304"},
- {"Grenada", "Grenade (la)", "GD", "GRD", "308"},
- {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"},
- {"Guam", "Guam", "GU", "GUM", "316"},
- {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"},
- {"Guinea", "Guinée (la)", "GN", "GIN", "324"},
- {"Guyana", "Guyana (le)", "GY", "GUY", "328"},
- {"Haiti", "Haïti", "HT", "HTI", "332"},
- {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"},
- {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"},
- {"Honduras", "Honduras (le)", "HN", "HND", "340"},
- {"Hong Kong", "Hong Kong", "HK", "HKG", "344"},
- {"Hungary", "Hongrie (la)", "HU", "HUN", "348"},
- {"Iceland", "Islande (l')", "IS", "ISL", "352"},
- {"India", "Inde (l')", "IN", "IND", "356"},
- {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"},
- {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"},
- {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"},
- {"Ireland", "Irlande (l')", "IE", "IRL", "372"},
- {"Israel", "Israël", "IL", "ISR", "376"},
- {"Italy", "Italie (l')", "IT", "ITA", "380"},
- {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"},
- {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"},
- {"Japan", "Japon (le)", "JP", "JPN", "392"},
- {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"},
- {"Jordan", "Jordanie (la)", "JO", "JOR", "400"},
- {"Kenya", "Kenya (le)", "KE", "KEN", "404"},
- {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"},
- {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"},
- {"Kuwait", "Koweït (le)", "KW", "KWT", "414"},
- {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"},
- {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"},
- {"Lebanon", "Liban (le)", "LB", "LBN", "422"},
- {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"},
- {"Latvia", "Lettonie (la)", "LV", "LVA", "428"},
- {"Liberia", "Libéria (le)", "LR", "LBR", "430"},
- {"Libya", "Libye (la)", "LY", "LBY", "434"},
- {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"},
- {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"},
- {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"},
- {"Macao", "Macao", "MO", "MAC", "446"},
- {"Madagascar", "Madagascar", "MG", "MDG", "450"},
- {"Malawi", "Malawi (le)", "MW", "MWI", "454"},
- {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"},
- {"Maldives", "Maldives (les)", "MV", "MDV", "462"},
- {"Mali", "Mali (le)", "ML", "MLI", "466"},
- {"Malta", "Malte", "MT", "MLT", "470"},
- {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"},
- {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"},
- {"Mauritius", "Maurice", "MU", "MUS", "480"},
- {"Mexico", "Mexique (le)", "MX", "MEX", "484"},
- {"Monaco", "Monaco", "MC", "MCO", "492"},
- {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"},
- {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"},
- {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"},
- {"Montserrat", "Montserrat", "MS", "MSR", "500"},
- {"Morocco", "Maroc (le)", "MA", "MAR", "504"},
- {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"},
- {"Oman", "Oman", "OM", "OMN", "512"},
- {"Namibia", "Namibie (la)", "NA", "NAM", "516"},
- {"Nauru", "Nauru", "NR", "NRU", "520"},
- {"Nepal", "Népal (le)", "NP", "NPL", "524"},
- {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"},
- {"Curaçao", "Curaçao", "CW", "CUW", "531"},
- {"Aruba", "Aruba", "AW", "ABW", "533"},
- {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"},
- {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"},
- {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"},
- {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"},
- {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"},
- {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"},
- {"Niger (the)", "Niger (le)", "NE", "NER", "562"},
- {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"},
- {"Niue", "Niue", "NU", "NIU", "570"},
- {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"},
- {"Norway", "Norvège (la)", "NO", "NOR", "578"},
- {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"},
- {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"},
- {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"},
- {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"},
- {"Palau", "Palaos (les)", "PW", "PLW", "585"},
- {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"},
- {"Panama", "Panama (le)", "PA", "PAN", "591"},
- {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"},
- {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"},
- {"Peru", "Pérou (le)", "PE", "PER", "604"},
- {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"},
- {"Pitcairn", "Pitcairn", "PN", "PCN", "612"},
- {"Poland", "Pologne (la)", "PL", "POL", "616"},
- {"Portugal", "Portugal (le)", "PT", "PRT", "620"},
- {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"},
- {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"},
- {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"},
- {"Qatar", "Qatar (le)", "QA", "QAT", "634"},
- {"Réunion", "Réunion (La)", "RE", "REU", "638"},
- {"Romania", "Roumanie (la)", "RO", "ROU", "642"},
- {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"},
- {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"},
- {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"},
- {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"},
- {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"},
- {"Anguilla", "Anguilla", "AI", "AIA", "660"},
- {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"},
- {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"},
- {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"},
- {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"},
- {"San Marino", "Saint-Marin", "SM", "SMR", "674"},
- {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"},
- {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"},
- {"Senegal", "Sénégal (le)", "SN", "SEN", "686"},
- {"Serbia", "Serbie (la)", "RS", "SRB", "688"},
- {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"},
- {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"},
- {"Singapore", "Singapour", "SG", "SGP", "702"},
- {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"},
- {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"},
- {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"},
- {"Somalia", "Somalie (la)", "SO", "SOM", "706"},
- {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"},
- {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"},
- {"Spain", "Espagne (l')", "ES", "ESP", "724"},
- {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"},
- {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"},
- {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"},
- {"Suriname", "Suriname (le)", "SR", "SUR", "740"},
- {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"},
- {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"},
- {"Sweden", "Suède (la)", "SE", "SWE", "752"},
- {"Switzerland", "Suisse (la)", "CH", "CHE", "756"},
- {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"},
- {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"},
- {"Thailand", "Thaïlande (la)", "TH", "THA", "764"},
- {"Togo", "Togo (le)", "TG", "TGO", "768"},
- {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"},
- {"Tonga", "Tonga (les)", "TO", "TON", "776"},
- {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"},
- {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"},
- {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"},
- {"Turkey", "Turquie (la)", "TR", "TUR", "792"},
- {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"},
- {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"},
- {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"},
- {"Uganda", "Ouganda (l')", "UG", "UGA", "800"},
- {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"},
- {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"},
- {"Egypt", "Égypte (l')", "EG", "EGY", "818"},
- {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"},
- {"Guernsey", "Guernesey", "GG", "GGY", "831"},
- {"Jersey", "Jersey", "JE", "JEY", "832"},
- {"Isle of Man", "Île de Man", "IM", "IMN", "833"},
- {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"},
- {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"},
- {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"},
- {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"},
- {"Uruguay", "Uruguay (l')", "UY", "URY", "858"},
- {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"},
- {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"},
- {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"},
- {"Samoa", "Samoa (le)", "WS", "WSM", "882"},
- {"Yemen", "Yémen (le)", "YE", "YEM", "887"},
- {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"},
-}
-
-// ISO4217List is the list of ISO currency codes
-var ISO4217List = []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", "MRO", "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", "STD", "SVC", "SYP", "SZL",
- "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS",
- "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UZS",
- "VEF", "VND", "VUV",
- "WST",
- "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX",
- "YER",
- "ZAR", "ZMW", "ZWL",
-}
-
-// ISO693Entry stores ISO language codes
-type ISO693Entry struct {
- Alpha3bCode string
- Alpha2Code string
- English string
-}
-
-//ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json
-var ISO693List = []ISO693Entry{
- {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"},
- {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"},
- {Alpha3bCode: "afr", Alpha2Code: "af", English: "Afrikaans"},
- {Alpha3bCode: "aka", Alpha2Code: "ak", English: "Akan"},
- {Alpha3bCode: "alb", Alpha2Code: "sq", English: "Albanian"},
- {Alpha3bCode: "amh", Alpha2Code: "am", English: "Amharic"},
- {Alpha3bCode: "ara", Alpha2Code: "ar", English: "Arabic"},
- {Alpha3bCode: "arg", Alpha2Code: "an", English: "Aragonese"},
- {Alpha3bCode: "arm", Alpha2Code: "hy", English: "Armenian"},
- {Alpha3bCode: "asm", Alpha2Code: "as", English: "Assamese"},
- {Alpha3bCode: "ava", Alpha2Code: "av", English: "Avaric"},
- {Alpha3bCode: "ave", Alpha2Code: "ae", English: "Avestan"},
- {Alpha3bCode: "aym", Alpha2Code: "ay", English: "Aymara"},
- {Alpha3bCode: "aze", Alpha2Code: "az", English: "Azerbaijani"},
- {Alpha3bCode: "bak", Alpha2Code: "ba", English: "Bashkir"},
- {Alpha3bCode: "bam", Alpha2Code: "bm", English: "Bambara"},
- {Alpha3bCode: "baq", Alpha2Code: "eu", English: "Basque"},
- {Alpha3bCode: "bel", Alpha2Code: "be", English: "Belarusian"},
- {Alpha3bCode: "ben", Alpha2Code: "bn", English: "Bengali"},
- {Alpha3bCode: "bih", Alpha2Code: "bh", English: "Bihari languages"},
- {Alpha3bCode: "bis", Alpha2Code: "bi", English: "Bislama"},
- {Alpha3bCode: "bos", Alpha2Code: "bs", English: "Bosnian"},
- {Alpha3bCode: "bre", Alpha2Code: "br", English: "Breton"},
- {Alpha3bCode: "bul", Alpha2Code: "bg", English: "Bulgarian"},
- {Alpha3bCode: "bur", Alpha2Code: "my", English: "Burmese"},
- {Alpha3bCode: "cat", Alpha2Code: "ca", English: "Catalan; Valencian"},
- {Alpha3bCode: "cha", Alpha2Code: "ch", English: "Chamorro"},
- {Alpha3bCode: "che", Alpha2Code: "ce", English: "Chechen"},
- {Alpha3bCode: "chi", Alpha2Code: "zh", English: "Chinese"},
- {Alpha3bCode: "chu", Alpha2Code: "cu", English: "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"},
- {Alpha3bCode: "chv", Alpha2Code: "cv", English: "Chuvash"},
- {Alpha3bCode: "cor", Alpha2Code: "kw", English: "Cornish"},
- {Alpha3bCode: "cos", Alpha2Code: "co", English: "Corsican"},
- {Alpha3bCode: "cre", Alpha2Code: "cr", English: "Cree"},
- {Alpha3bCode: "cze", Alpha2Code: "cs", English: "Czech"},
- {Alpha3bCode: "dan", Alpha2Code: "da", English: "Danish"},
- {Alpha3bCode: "div", Alpha2Code: "dv", English: "Divehi; Dhivehi; Maldivian"},
- {Alpha3bCode: "dut", Alpha2Code: "nl", English: "Dutch; Flemish"},
- {Alpha3bCode: "dzo", Alpha2Code: "dz", English: "Dzongkha"},
- {Alpha3bCode: "eng", Alpha2Code: "en", English: "English"},
- {Alpha3bCode: "epo", Alpha2Code: "eo", English: "Esperanto"},
- {Alpha3bCode: "est", Alpha2Code: "et", English: "Estonian"},
- {Alpha3bCode: "ewe", Alpha2Code: "ee", English: "Ewe"},
- {Alpha3bCode: "fao", Alpha2Code: "fo", English: "Faroese"},
- {Alpha3bCode: "fij", Alpha2Code: "fj", English: "Fijian"},
- {Alpha3bCode: "fin", Alpha2Code: "fi", English: "Finnish"},
- {Alpha3bCode: "fre", Alpha2Code: "fr", English: "French"},
- {Alpha3bCode: "fry", Alpha2Code: "fy", English: "Western Frisian"},
- {Alpha3bCode: "ful", Alpha2Code: "ff", English: "Fulah"},
- {Alpha3bCode: "geo", Alpha2Code: "ka", English: "Georgian"},
- {Alpha3bCode: "ger", Alpha2Code: "de", English: "German"},
- {Alpha3bCode: "gla", Alpha2Code: "gd", English: "Gaelic; Scottish Gaelic"},
- {Alpha3bCode: "gle", Alpha2Code: "ga", English: "Irish"},
- {Alpha3bCode: "glg", Alpha2Code: "gl", English: "Galician"},
- {Alpha3bCode: "glv", Alpha2Code: "gv", English: "Manx"},
- {Alpha3bCode: "gre", Alpha2Code: "el", English: "Greek, Modern (1453-)"},
- {Alpha3bCode: "grn", Alpha2Code: "gn", English: "Guarani"},
- {Alpha3bCode: "guj", Alpha2Code: "gu", English: "Gujarati"},
- {Alpha3bCode: "hat", Alpha2Code: "ht", English: "Haitian; Haitian Creole"},
- {Alpha3bCode: "hau", Alpha2Code: "ha", English: "Hausa"},
- {Alpha3bCode: "heb", Alpha2Code: "he", English: "Hebrew"},
- {Alpha3bCode: "her", Alpha2Code: "hz", English: "Herero"},
- {Alpha3bCode: "hin", Alpha2Code: "hi", English: "Hindi"},
- {Alpha3bCode: "hmo", Alpha2Code: "ho", English: "Hiri Motu"},
- {Alpha3bCode: "hrv", Alpha2Code: "hr", English: "Croatian"},
- {Alpha3bCode: "hun", Alpha2Code: "hu", English: "Hungarian"},
- {Alpha3bCode: "ibo", Alpha2Code: "ig", English: "Igbo"},
- {Alpha3bCode: "ice", Alpha2Code: "is", English: "Icelandic"},
- {Alpha3bCode: "ido", Alpha2Code: "io", English: "Ido"},
- {Alpha3bCode: "iii", Alpha2Code: "ii", English: "Sichuan Yi; Nuosu"},
- {Alpha3bCode: "iku", Alpha2Code: "iu", English: "Inuktitut"},
- {Alpha3bCode: "ile", Alpha2Code: "ie", English: "Interlingue; Occidental"},
- {Alpha3bCode: "ina", Alpha2Code: "ia", English: "Interlingua (International Auxiliary Language Association)"},
- {Alpha3bCode: "ind", Alpha2Code: "id", English: "Indonesian"},
- {Alpha3bCode: "ipk", Alpha2Code: "ik", English: "Inupiaq"},
- {Alpha3bCode: "ita", Alpha2Code: "it", English: "Italian"},
- {Alpha3bCode: "jav", Alpha2Code: "jv", English: "Javanese"},
- {Alpha3bCode: "jpn", Alpha2Code: "ja", English: "Japanese"},
- {Alpha3bCode: "kal", Alpha2Code: "kl", English: "Kalaallisut; Greenlandic"},
- {Alpha3bCode: "kan", Alpha2Code: "kn", English: "Kannada"},
- {Alpha3bCode: "kas", Alpha2Code: "ks", English: "Kashmiri"},
- {Alpha3bCode: "kau", Alpha2Code: "kr", English: "Kanuri"},
- {Alpha3bCode: "kaz", Alpha2Code: "kk", English: "Kazakh"},
- {Alpha3bCode: "khm", Alpha2Code: "km", English: "Central Khmer"},
- {Alpha3bCode: "kik", Alpha2Code: "ki", English: "Kikuyu; Gikuyu"},
- {Alpha3bCode: "kin", Alpha2Code: "rw", English: "Kinyarwanda"},
- {Alpha3bCode: "kir", Alpha2Code: "ky", English: "Kirghiz; Kyrgyz"},
- {Alpha3bCode: "kom", Alpha2Code: "kv", English: "Komi"},
- {Alpha3bCode: "kon", Alpha2Code: "kg", English: "Kongo"},
- {Alpha3bCode: "kor", Alpha2Code: "ko", English: "Korean"},
- {Alpha3bCode: "kua", Alpha2Code: "kj", English: "Kuanyama; Kwanyama"},
- {Alpha3bCode: "kur", Alpha2Code: "ku", English: "Kurdish"},
- {Alpha3bCode: "lao", Alpha2Code: "lo", English: "Lao"},
- {Alpha3bCode: "lat", Alpha2Code: "la", English: "Latin"},
- {Alpha3bCode: "lav", Alpha2Code: "lv", English: "Latvian"},
- {Alpha3bCode: "lim", Alpha2Code: "li", English: "Limburgan; Limburger; Limburgish"},
- {Alpha3bCode: "lin", Alpha2Code: "ln", English: "Lingala"},
- {Alpha3bCode: "lit", Alpha2Code: "lt", English: "Lithuanian"},
- {Alpha3bCode: "ltz", Alpha2Code: "lb", English: "Luxembourgish; Letzeburgesch"},
- {Alpha3bCode: "lub", Alpha2Code: "lu", English: "Luba-Katanga"},
- {Alpha3bCode: "lug", Alpha2Code: "lg", English: "Ganda"},
- {Alpha3bCode: "mac", Alpha2Code: "mk", English: "Macedonian"},
- {Alpha3bCode: "mah", Alpha2Code: "mh", English: "Marshallese"},
- {Alpha3bCode: "mal", Alpha2Code: "ml", English: "Malayalam"},
- {Alpha3bCode: "mao", Alpha2Code: "mi", English: "Maori"},
- {Alpha3bCode: "mar", Alpha2Code: "mr", English: "Marathi"},
- {Alpha3bCode: "may", Alpha2Code: "ms", English: "Malay"},
- {Alpha3bCode: "mlg", Alpha2Code: "mg", English: "Malagasy"},
- {Alpha3bCode: "mlt", Alpha2Code: "mt", English: "Maltese"},
- {Alpha3bCode: "mon", Alpha2Code: "mn", English: "Mongolian"},
- {Alpha3bCode: "nau", Alpha2Code: "na", English: "Nauru"},
- {Alpha3bCode: "nav", Alpha2Code: "nv", English: "Navajo; Navaho"},
- {Alpha3bCode: "nbl", Alpha2Code: "nr", English: "Ndebele, South; South Ndebele"},
- {Alpha3bCode: "nde", Alpha2Code: "nd", English: "Ndebele, North; North Ndebele"},
- {Alpha3bCode: "ndo", Alpha2Code: "ng", English: "Ndonga"},
- {Alpha3bCode: "nep", Alpha2Code: "ne", English: "Nepali"},
- {Alpha3bCode: "nno", Alpha2Code: "nn", English: "Norwegian Nynorsk; Nynorsk, Norwegian"},
- {Alpha3bCode: "nob", Alpha2Code: "nb", English: "Bokmål, Norwegian; Norwegian Bokmål"},
- {Alpha3bCode: "nor", Alpha2Code: "no", English: "Norwegian"},
- {Alpha3bCode: "nya", Alpha2Code: "ny", English: "Chichewa; Chewa; Nyanja"},
- {Alpha3bCode: "oci", Alpha2Code: "oc", English: "Occitan (post 1500); Provençal"},
- {Alpha3bCode: "oji", Alpha2Code: "oj", English: "Ojibwa"},
- {Alpha3bCode: "ori", Alpha2Code: "or", English: "Oriya"},
- {Alpha3bCode: "orm", Alpha2Code: "om", English: "Oromo"},
- {Alpha3bCode: "oss", Alpha2Code: "os", English: "Ossetian; Ossetic"},
- {Alpha3bCode: "pan", Alpha2Code: "pa", English: "Panjabi; Punjabi"},
- {Alpha3bCode: "per", Alpha2Code: "fa", English: "Persian"},
- {Alpha3bCode: "pli", Alpha2Code: "pi", English: "Pali"},
- {Alpha3bCode: "pol", Alpha2Code: "pl", English: "Polish"},
- {Alpha3bCode: "por", Alpha2Code: "pt", English: "Portuguese"},
- {Alpha3bCode: "pus", Alpha2Code: "ps", English: "Pushto; Pashto"},
- {Alpha3bCode: "que", Alpha2Code: "qu", English: "Quechua"},
- {Alpha3bCode: "roh", Alpha2Code: "rm", English: "Romansh"},
- {Alpha3bCode: "rum", Alpha2Code: "ro", English: "Romanian; Moldavian; Moldovan"},
- {Alpha3bCode: "run", Alpha2Code: "rn", English: "Rundi"},
- {Alpha3bCode: "rus", Alpha2Code: "ru", English: "Russian"},
- {Alpha3bCode: "sag", Alpha2Code: "sg", English: "Sango"},
- {Alpha3bCode: "san", Alpha2Code: "sa", English: "Sanskrit"},
- {Alpha3bCode: "sin", Alpha2Code: "si", English: "Sinhala; Sinhalese"},
- {Alpha3bCode: "slo", Alpha2Code: "sk", English: "Slovak"},
- {Alpha3bCode: "slv", Alpha2Code: "sl", English: "Slovenian"},
- {Alpha3bCode: "sme", Alpha2Code: "se", English: "Northern Sami"},
- {Alpha3bCode: "smo", Alpha2Code: "sm", English: "Samoan"},
- {Alpha3bCode: "sna", Alpha2Code: "sn", English: "Shona"},
- {Alpha3bCode: "snd", Alpha2Code: "sd", English: "Sindhi"},
- {Alpha3bCode: "som", Alpha2Code: "so", English: "Somali"},
- {Alpha3bCode: "sot", Alpha2Code: "st", English: "Sotho, Southern"},
- {Alpha3bCode: "spa", Alpha2Code: "es", English: "Spanish; Castilian"},
- {Alpha3bCode: "srd", Alpha2Code: "sc", English: "Sardinian"},
- {Alpha3bCode: "srp", Alpha2Code: "sr", English: "Serbian"},
- {Alpha3bCode: "ssw", Alpha2Code: "ss", English: "Swati"},
- {Alpha3bCode: "sun", Alpha2Code: "su", English: "Sundanese"},
- {Alpha3bCode: "swa", Alpha2Code: "sw", English: "Swahili"},
- {Alpha3bCode: "swe", Alpha2Code: "sv", English: "Swedish"},
- {Alpha3bCode: "tah", Alpha2Code: "ty", English: "Tahitian"},
- {Alpha3bCode: "tam", Alpha2Code: "ta", English: "Tamil"},
- {Alpha3bCode: "tat", Alpha2Code: "tt", English: "Tatar"},
- {Alpha3bCode: "tel", Alpha2Code: "te", English: "Telugu"},
- {Alpha3bCode: "tgk", Alpha2Code: "tg", English: "Tajik"},
- {Alpha3bCode: "tgl", Alpha2Code: "tl", English: "Tagalog"},
- {Alpha3bCode: "tha", Alpha2Code: "th", English: "Thai"},
- {Alpha3bCode: "tib", Alpha2Code: "bo", English: "Tibetan"},
- {Alpha3bCode: "tir", Alpha2Code: "ti", English: "Tigrinya"},
- {Alpha3bCode: "ton", Alpha2Code: "to", English: "Tonga (Tonga Islands)"},
- {Alpha3bCode: "tsn", Alpha2Code: "tn", English: "Tswana"},
- {Alpha3bCode: "tso", Alpha2Code: "ts", English: "Tsonga"},
- {Alpha3bCode: "tuk", Alpha2Code: "tk", English: "Turkmen"},
- {Alpha3bCode: "tur", Alpha2Code: "tr", English: "Turkish"},
- {Alpha3bCode: "twi", Alpha2Code: "tw", English: "Twi"},
- {Alpha3bCode: "uig", Alpha2Code: "ug", English: "Uighur; Uyghur"},
- {Alpha3bCode: "ukr", Alpha2Code: "uk", English: "Ukrainian"},
- {Alpha3bCode: "urd", Alpha2Code: "ur", English: "Urdu"},
- {Alpha3bCode: "uzb", Alpha2Code: "uz", English: "Uzbek"},
- {Alpha3bCode: "ven", Alpha2Code: "ve", English: "Venda"},
- {Alpha3bCode: "vie", Alpha2Code: "vi", English: "Vietnamese"},
- {Alpha3bCode: "vol", Alpha2Code: "vo", English: "Volapük"},
- {Alpha3bCode: "wel", Alpha2Code: "cy", English: "Welsh"},
- {Alpha3bCode: "wln", Alpha2Code: "wa", English: "Walloon"},
- {Alpha3bCode: "wol", Alpha2Code: "wo", English: "Wolof"},
- {Alpha3bCode: "xho", Alpha2Code: "xh", English: "Xhosa"},
- {Alpha3bCode: "yid", Alpha2Code: "yi", English: "Yiddish"},
- {Alpha3bCode: "yor", Alpha2Code: "yo", English: "Yoruba"},
- {Alpha3bCode: "zha", Alpha2Code: "za", English: "Zhuang; Chuang"},
- {Alpha3bCode: "zul", Alpha2Code: "zu", English: "Zulu"},
-}
diff --git a/vendor/github.com/asaskevich/govalidator/utils.go b/vendor/github.com/asaskevich/govalidator/utils.go
deleted file mode 100644
index a0b706a74..000000000
--- a/vendor/github.com/asaskevich/govalidator/utils.go
+++ /dev/null
@@ -1,270 +0,0 @@
-package govalidator
-
-import (
- "errors"
- "fmt"
- "html"
- "math"
- "path"
- "regexp"
- "strings"
- "unicode"
- "unicode/utf8"
-)
-
-// Contains check if the string contains the substring.
-func Contains(str, substring string) bool {
- return strings.Contains(str, substring)
-}
-
-// Matches check if string matches the pattern (pattern is regular expression)
-// In case of error return false
-func Matches(str, pattern string) bool {
- match, _ := regexp.MatchString(pattern, str)
- return match
-}
-
-// LeftTrim trim characters from the left-side of the input.
-// If second argument is empty, it's will be remove leading spaces.
-func LeftTrim(str, chars string) string {
- if chars == "" {
- return strings.TrimLeftFunc(str, unicode.IsSpace)
- }
- r, _ := regexp.Compile("^[" + chars + "]+")
- return r.ReplaceAllString(str, "")
-}
-
-// RightTrim trim characters from the right-side of the input.
-// If second argument is empty, it's will be remove spaces.
-func RightTrim(str, chars string) string {
- if chars == "" {
- return strings.TrimRightFunc(str, unicode.IsSpace)
- }
- r, _ := regexp.Compile("[" + chars + "]+$")
- return r.ReplaceAllString(str, "")
-}
-
-// Trim trim characters from both sides of the input.
-// If second argument is empty, it's will be remove spaces.
-func Trim(str, chars string) string {
- return LeftTrim(RightTrim(str, chars), chars)
-}
-
-// WhiteList remove characters that do not appear in the whitelist.
-func WhiteList(str, chars string) string {
- pattern := "[^" + chars + "]+"
- r, _ := regexp.Compile(pattern)
- return r.ReplaceAllString(str, "")
-}
-
-// BlackList remove characters that appear in the blacklist.
-func BlackList(str, chars string) string {
- pattern := "[" + chars + "]+"
- r, _ := regexp.Compile(pattern)
- return r.ReplaceAllString(str, "")
-}
-
-// StripLow remove characters with a numerical value < 32 and 127, mostly control characters.
-// If keep_new_lines is true, newline characters are preserved (\n and \r, hex 0xA and 0xD).
-func StripLow(str string, keepNewLines bool) string {
- chars := ""
- if keepNewLines {
- chars = "\x00-\x09\x0B\x0C\x0E-\x1F\x7F"
- } else {
- chars = "\x00-\x1F\x7F"
- }
- return BlackList(str, chars)
-}
-
-// ReplacePattern replace regular expression pattern in string
-func ReplacePattern(str, pattern, replace string) string {
- r, _ := regexp.Compile(pattern)
- return r.ReplaceAllString(str, replace)
-}
-
-// Escape replace <, >, & and " with HTML entities.
-var Escape = html.EscapeString
-
-func addSegment(inrune, segment []rune) []rune {
- if len(segment) == 0 {
- return inrune
- }
- if len(inrune) != 0 {
- inrune = append(inrune, '_')
- }
- inrune = append(inrune, segment...)
- return inrune
-}
-
-// UnderscoreToCamelCase converts from underscore separated form to camel case form.
-// Ex.: my_func => MyFunc
-func UnderscoreToCamelCase(s string) string {
- return strings.Replace(strings.Title(strings.Replace(strings.ToLower(s), "_", " ", -1)), " ", "", -1)
-}
-
-// CamelCaseToUnderscore converts from camel case form to underscore separated form.
-// Ex.: MyFunc => my_func
-func CamelCaseToUnderscore(str string) string {
- var output []rune
- var segment []rune
- for _, r := range str {
-
- // not treat number as separate segment
- if !unicode.IsLower(r) && string(r) != "_" && !unicode.IsNumber(r) {
- output = addSegment(output, segment)
- segment = nil
- }
- segment = append(segment, unicode.ToLower(r))
- }
- output = addSegment(output, segment)
- return string(output)
-}
-
-// Reverse return reversed string
-func Reverse(s string) string {
- r := []rune(s)
- for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 {
- r[i], r[j] = r[j], r[i]
- }
- return string(r)
-}
-
-// GetLines split string by "\n" and return array of lines
-func GetLines(s string) []string {
- return strings.Split(s, "\n")
-}
-
-// GetLine return specified line of multiline string
-func GetLine(s string, index int) (string, error) {
- lines := GetLines(s)
- if index < 0 || index >= len(lines) {
- return "", errors.New("line index out of bounds")
- }
- return lines[index], nil
-}
-
-// RemoveTags remove all tags from HTML string
-func RemoveTags(s string) string {
- return ReplacePattern(s, "<[^>]*>", "")
-}
-
-// SafeFileName return safe string that can be used in file names
-func SafeFileName(str string) string {
- name := strings.ToLower(str)
- name = path.Clean(path.Base(name))
- name = strings.Trim(name, " ")
- separators, err := regexp.Compile(`[ &_=+:]`)
- if err == nil {
- name = separators.ReplaceAllString(name, "-")
- }
- legal, err := regexp.Compile(`[^[:alnum:]-.]`)
- if err == nil {
- name = legal.ReplaceAllString(name, "")
- }
- for strings.Contains(name, "--") {
- name = strings.Replace(name, "--", "-", -1)
- }
- return name
-}
-
-// NormalizeEmail canonicalize an email address.
-// The local part of the email address is lowercased for all domains; the hostname is always lowercased and
-// the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail).
-// Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and
-// are stripped of tags (e.g. some.one+tag@gmail.com becomes someone@gmail.com) and all @googlemail.com addresses are
-// normalized to @gmail.com.
-func NormalizeEmail(str string) (string, error) {
- if !IsEmail(str) {
- return "", fmt.Errorf("%s is not an email", str)
- }
- parts := strings.Split(str, "@")
- parts[0] = strings.ToLower(parts[0])
- parts[1] = strings.ToLower(parts[1])
- if parts[1] == "gmail.com" || parts[1] == "googlemail.com" {
- parts[1] = "gmail.com"
- parts[0] = strings.Split(ReplacePattern(parts[0], `\.`, ""), "+")[0]
- }
- return strings.Join(parts, "@"), nil
-}
-
-// Truncate a string to the closest length without breaking words.
-func Truncate(str string, length int, ending string) string {
- var aftstr, befstr string
- if len(str) > length {
- words := strings.Fields(str)
- before, present := 0, 0
- for i := range words {
- befstr = aftstr
- before = present
- aftstr = aftstr + words[i] + " "
- present = len(aftstr)
- if present > length && i != 0 {
- if (length - before) < (present - length) {
- return Trim(befstr, " /\\.,\"'#!?&@+-") + ending
- }
- return Trim(aftstr, " /\\.,\"'#!?&@+-") + ending
- }
- }
- }
-
- return str
-}
-
-// PadLeft pad left side of string if size of string is less then indicated pad length
-func PadLeft(str string, padStr string, padLen int) string {
- return buildPadStr(str, padStr, padLen, true, false)
-}
-
-// PadRight pad right side of string if size of string is less then indicated pad length
-func PadRight(str string, padStr string, padLen int) string {
- return buildPadStr(str, padStr, padLen, false, true)
-}
-
-// PadBoth pad sides of string if size of string is less then indicated pad length
-func PadBoth(str string, padStr string, padLen int) string {
- return buildPadStr(str, padStr, padLen, true, true)
-}
-
-// PadString either left, right or both sides, not the padding string can be unicode and more then one
-// character
-func buildPadStr(str string, padStr string, padLen int, padLeft bool, padRight bool) string {
-
- // When padded length is less then the current string size
- if padLen < utf8.RuneCountInString(str) {
- return str
- }
-
- padLen -= utf8.RuneCountInString(str)
-
- targetLen := padLen
-
- targetLenLeft := targetLen
- targetLenRight := targetLen
- if padLeft && padRight {
- targetLenLeft = padLen / 2
- targetLenRight = padLen - targetLenLeft
- }
-
- strToRepeatLen := utf8.RuneCountInString(padStr)
-
- repeatTimes := int(math.Ceil(float64(targetLen) / float64(strToRepeatLen)))
- repeatedString := strings.Repeat(padStr, repeatTimes)
-
- leftSide := ""
- if padLeft {
- leftSide = repeatedString[0:targetLenLeft]
- }
-
- rightSide := ""
- if padRight {
- rightSide = repeatedString[0:targetLenRight]
- }
-
- return leftSide + str + rightSide
-}
-
-// TruncatingErrorf removes extra args from fmt.Errorf if not formatted in the str object
-func TruncatingErrorf(str string, args ...interface{}) error {
- n := strings.Count(str, "%s")
- return fmt.Errorf(str, args[:n]...)
-}
diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go
deleted file mode 100644
index b18bbcb4c..000000000
--- a/vendor/github.com/asaskevich/govalidator/validator.go
+++ /dev/null
@@ -1,1278 +0,0 @@
-// Package govalidator is package of validators and sanitizers for strings, structs and collections.
-package govalidator
-
-import (
- "bytes"
- "crypto/rsa"
- "crypto/x509"
- "encoding/base64"
- "encoding/json"
- "encoding/pem"
- "fmt"
- "io/ioutil"
- "net"
- "net/url"
- "reflect"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "time"
- "unicode"
- "unicode/utf8"
-)
-
-var (
- fieldsRequiredByDefault bool
- nilPtrAllowedByRequired = false
- notNumberRegexp = regexp.MustCompile("[^0-9]+")
- whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`)
- paramsRegexp = regexp.MustCompile(`\(.*\)$`)
-)
-
-const maxURLRuneCount = 2083
-const minURLRuneCount = 3
-const RF3339WithoutZone = "2006-01-02T15:04:05"
-
-// SetFieldsRequiredByDefault causes validation to fail when struct fields
-// do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`).
-// This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter):
-// type exampleStruct struct {
-// Name string ``
-// Email string `valid:"email"`
-// This, however, will only fail when Email is empty or an invalid email address:
-// type exampleStruct2 struct {
-// Name string `valid:"-"`
-// Email string `valid:"email"`
-// Lastly, this will only fail when Email is an invalid email address but not when it's empty:
-// type exampleStruct2 struct {
-// Name string `valid:"-"`
-// Email string `valid:"email,optional"`
-func SetFieldsRequiredByDefault(value bool) {
- fieldsRequiredByDefault = value
-}
-
-// SetNilPtrAllowedByRequired causes validation to pass for nil ptrs when a field is set to required.
-// The validation will still reject ptr fields in their zero value state. Example with this enabled:
-// type exampleStruct struct {
-// Name *string `valid:"required"`
-// With `Name` set to "", this will be considered invalid input and will cause a validation error.
-// With `Name` set to nil, this will be considered valid by validation.
-// By default this is disabled.
-func SetNilPtrAllowedByRequired(value bool) {
- nilPtrAllowedByRequired = value
-}
-
-// IsEmail check if the string is an email.
-func IsEmail(str string) bool {
- // TODO uppercase letters are not supported
- return rxEmail.MatchString(str)
-}
-
-// IsExistingEmail check if the string is an email of existing domain
-func IsExistingEmail(email string) bool {
-
- if len(email) < 6 || len(email) > 254 {
- return false
- }
- at := strings.LastIndex(email, "@")
- if at <= 0 || at > len(email)-3 {
- return false
- }
- user := email[:at]
- host := email[at+1:]
- if len(user) > 64 {
- return false
- }
- if userDotRegexp.MatchString(user) || !userRegexp.MatchString(user) || !hostRegexp.MatchString(host) {
- return false
- }
- switch host {
- case "localhost", "example.com":
- return true
- }
- if _, err := net.LookupMX(host); err != nil {
- if _, err := net.LookupIP(host); err != nil {
- return false
- }
- }
-
- return true
-}
-
-// IsURL check if the string is an URL.
-func IsURL(str string) bool {
- if str == "" || utf8.RuneCountInString(str) >= maxURLRuneCount || len(str) <= minURLRuneCount || strings.HasPrefix(str, ".") {
- return false
- }
- strTemp := str
- if strings.Contains(str, ":") && !strings.Contains(str, "://") {
- // support no indicated urlscheme but with colon for port number
- // http:// is appended so url.Parse will succeed, strTemp used so it does not impact rxURL.MatchString
- strTemp = "http://" + str
- }
- u, err := url.Parse(strTemp)
- if err != nil {
- return false
- }
- if strings.HasPrefix(u.Host, ".") {
- return false
- }
- if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) {
- return false
- }
- return rxURL.MatchString(str)
-}
-
-// IsRequestURL check if the string rawurl, assuming
-// it was received in an HTTP request, is a valid
-// URL confirm to RFC 3986
-func IsRequestURL(rawurl string) bool {
- url, err := url.ParseRequestURI(rawurl)
- if err != nil {
- return false //Couldn't even parse the rawurl
- }
- if len(url.Scheme) == 0 {
- return false //No Scheme found
- }
- return true
-}
-
-// IsRequestURI check if the string rawurl, assuming
-// it was received in an HTTP request, is an
-// absolute URI or an absolute path.
-func IsRequestURI(rawurl string) bool {
- _, err := url.ParseRequestURI(rawurl)
- return err == nil
-}
-
-// IsAlpha check if the string contains only letters (a-zA-Z). Empty string is valid.
-func IsAlpha(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxAlpha.MatchString(str)
-}
-
-//IsUTFLetter check if the string contains only unicode letter characters.
-//Similar to IsAlpha but for all languages. Empty string is valid.
-func IsUTFLetter(str string) bool {
- if IsNull(str) {
- return true
- }
-
- for _, c := range str {
- if !unicode.IsLetter(c) {
- return false
- }
- }
- return true
-
-}
-
-// IsAlphanumeric check if the string contains only letters and numbers. Empty string is valid.
-func IsAlphanumeric(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxAlphanumeric.MatchString(str)
-}
-
-// IsUTFLetterNumeric check if the string contains only unicode letters and numbers. Empty string is valid.
-func IsUTFLetterNumeric(str string) bool {
- if IsNull(str) {
- return true
- }
- for _, c := range str {
- if !unicode.IsLetter(c) && !unicode.IsNumber(c) { //letters && numbers are ok
- return false
- }
- }
- return true
-
-}
-
-// IsNumeric check if the string contains only numbers. Empty string is valid.
-func IsNumeric(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxNumeric.MatchString(str)
-}
-
-// IsUTFNumeric check if the string contains only unicode numbers of any kind.
-// Numbers can be 0-9 but also Fractions ¾,Roman Ⅸ and Hangzhou 〩. Empty string is valid.
-func IsUTFNumeric(str string) bool {
- if IsNull(str) {
- return true
- }
- if strings.IndexAny(str, "+-") > 0 {
- return false
- }
- if len(str) > 1 {
- str = strings.TrimPrefix(str, "-")
- str = strings.TrimPrefix(str, "+")
- }
- for _, c := range str {
- if !unicode.IsNumber(c) { //numbers && minus sign are ok
- return false
- }
- }
- return true
-
-}
-
-// IsUTFDigit check if the string contains only unicode radix-10 decimal digits. Empty string is valid.
-func IsUTFDigit(str string) bool {
- if IsNull(str) {
- return true
- }
- if strings.IndexAny(str, "+-") > 0 {
- return false
- }
- if len(str) > 1 {
- str = strings.TrimPrefix(str, "-")
- str = strings.TrimPrefix(str, "+")
- }
- for _, c := range str {
- if !unicode.IsDigit(c) { //digits && minus sign are ok
- return false
- }
- }
- return true
-
-}
-
-// IsHexadecimal check if the string is a hexadecimal number.
-func IsHexadecimal(str string) bool {
- return rxHexadecimal.MatchString(str)
-}
-
-// IsHexcolor check if the string is a hexadecimal color.
-func IsHexcolor(str string) bool {
- return rxHexcolor.MatchString(str)
-}
-
-// IsRGBcolor check if the string is a valid RGB color in form rgb(RRR, GGG, BBB).
-func IsRGBcolor(str string) bool {
- return rxRGBcolor.MatchString(str)
-}
-
-// IsLowerCase check if the string is lowercase. Empty string is valid.
-func IsLowerCase(str string) bool {
- if IsNull(str) {
- return true
- }
- return str == strings.ToLower(str)
-}
-
-// IsUpperCase check if the string is uppercase. Empty string is valid.
-func IsUpperCase(str string) bool {
- if IsNull(str) {
- return true
- }
- return str == strings.ToUpper(str)
-}
-
-// HasLowerCase check if the string contains at least 1 lowercase. Empty string is valid.
-func HasLowerCase(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxHasLowerCase.MatchString(str)
-}
-
-// HasUpperCase check if the string contians as least 1 uppercase. Empty string is valid.
-func HasUpperCase(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxHasUpperCase.MatchString(str)
-}
-
-// IsInt check if the string is an integer. Empty string is valid.
-func IsInt(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxInt.MatchString(str)
-}
-
-// IsFloat check if the string is a float.
-func IsFloat(str string) bool {
- return str != "" && rxFloat.MatchString(str)
-}
-
-// IsDivisibleBy check if the string is a number that's divisible by another.
-// If second argument is not valid integer or zero, it's return false.
-// Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero).
-func IsDivisibleBy(str, num string) bool {
- f, _ := ToFloat(str)
- p := int64(f)
- q, _ := ToInt(num)
- if q == 0 {
- return false
- }
- return (p == 0) || (p%q == 0)
-}
-
-// IsNull check if the string is null.
-func IsNull(str string) bool {
- return len(str) == 0
-}
-
-// HasWhitespaceOnly checks the string only contains whitespace
-func HasWhitespaceOnly(str string) bool {
- return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str)
-}
-
-// HasWhitespace checks if the string contains any whitespace
-func HasWhitespace(str string) bool {
- return len(str) > 0 && rxHasWhitespace.MatchString(str)
-}
-
-// IsByteLength check if the string's length (in bytes) falls in a range.
-func IsByteLength(str string, min, max int) bool {
- return len(str) >= min && len(str) <= max
-}
-
-// IsUUIDv3 check if the string is a UUID version 3.
-func IsUUIDv3(str string) bool {
- return rxUUID3.MatchString(str)
-}
-
-// IsUUIDv4 check if the string is a UUID version 4.
-func IsUUIDv4(str string) bool {
- return rxUUID4.MatchString(str)
-}
-
-// IsUUIDv5 check if the string is a UUID version 5.
-func IsUUIDv5(str string) bool {
- return rxUUID5.MatchString(str)
-}
-
-// IsUUID check if the string is a UUID (version 3, 4 or 5).
-func IsUUID(str string) bool {
- return rxUUID.MatchString(str)
-}
-
-// IsCreditCard check if the string is a credit card.
-func IsCreditCard(str string) bool {
- sanitized := notNumberRegexp.ReplaceAllString(str, "")
- if !rxCreditCard.MatchString(sanitized) {
- return false
- }
- var sum int64
- var digit string
- var tmpNum int64
- var shouldDouble bool
- for i := len(sanitized) - 1; i >= 0; i-- {
- digit = sanitized[i:(i + 1)]
- tmpNum, _ = ToInt(digit)
- if shouldDouble {
- tmpNum *= 2
- if tmpNum >= 10 {
- sum += ((tmpNum % 10) + 1)
- } else {
- sum += tmpNum
- }
- } else {
- sum += tmpNum
- }
- shouldDouble = !shouldDouble
- }
-
- return sum%10 == 0
-}
-
-// IsISBN10 check if the string is an ISBN version 10.
-func IsISBN10(str string) bool {
- return IsISBN(str, 10)
-}
-
-// IsISBN13 check if the string is an ISBN version 13.
-func IsISBN13(str string) bool {
- return IsISBN(str, 13)
-}
-
-// IsISBN check if the string is an ISBN (version 10 or 13).
-// If version value is not equal to 10 or 13, it will be check both variants.
-func IsISBN(str string, version int) bool {
- sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "")
- var checksum int32
- var i int32
- if version == 10 {
- if !rxISBN10.MatchString(sanitized) {
- return false
- }
- for i = 0; i < 9; i++ {
- checksum += (i + 1) * int32(sanitized[i]-'0')
- }
- if sanitized[9] == 'X' {
- checksum += 10 * 10
- } else {
- checksum += 10 * int32(sanitized[9]-'0')
- }
- if checksum%11 == 0 {
- return true
- }
- return false
- } else if version == 13 {
- if !rxISBN13.MatchString(sanitized) {
- return false
- }
- factor := []int32{1, 3}
- for i = 0; i < 12; i++ {
- checksum += factor[i%2] * int32(sanitized[i]-'0')
- }
- return (int32(sanitized[12]-'0'))-((10-(checksum%10))%10) == 0
- }
- return IsISBN(str, 10) || IsISBN(str, 13)
-}
-
-// IsJSON check if the string is valid JSON (note: uses json.Unmarshal).
-func IsJSON(str string) bool {
- var js json.RawMessage
- return json.Unmarshal([]byte(str), &js) == nil
-}
-
-// IsMultibyte check if the string contains one or more multibyte chars. Empty string is valid.
-func IsMultibyte(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxMultibyte.MatchString(str)
-}
-
-// IsASCII check if the string contains ASCII chars only. Empty string is valid.
-func IsASCII(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxASCII.MatchString(str)
-}
-
-// IsPrintableASCII check if the string contains printable ASCII chars only. Empty string is valid.
-func IsPrintableASCII(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxPrintableASCII.MatchString(str)
-}
-
-// IsFullWidth check if the string contains any full-width chars. Empty string is valid.
-func IsFullWidth(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxFullWidth.MatchString(str)
-}
-
-// IsHalfWidth check if the string contains any half-width chars. Empty string is valid.
-func IsHalfWidth(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxHalfWidth.MatchString(str)
-}
-
-// IsVariableWidth check if the string contains a mixture of full and half-width chars. Empty string is valid.
-func IsVariableWidth(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxHalfWidth.MatchString(str) && rxFullWidth.MatchString(str)
-}
-
-// IsBase64 check if a string is base64 encoded.
-func IsBase64(str string) bool {
- return rxBase64.MatchString(str)
-}
-
-// IsFilePath check is a string is Win or Unix file path and returns it's type.
-func IsFilePath(str string) (bool, int) {
- if rxWinPath.MatchString(str) {
- //check windows path limit see:
- // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
- if len(str[3:]) > 32767 {
- return false, Win
- }
- return true, Win
- } else if rxUnixPath.MatchString(str) {
- return true, Unix
- }
- return false, Unknown
-}
-
-// IsDataURI checks if a string is base64 encoded data URI such as an image
-func IsDataURI(str string) bool {
- dataURI := strings.Split(str, ",")
- if !rxDataURI.MatchString(dataURI[0]) {
- return false
- }
- return IsBase64(dataURI[1])
-}
-
-// IsISO3166Alpha2 checks if a string is valid two-letter country code
-func IsISO3166Alpha2(str string) bool {
- for _, entry := range ISO3166List {
- if str == entry.Alpha2Code {
- return true
- }
- }
- return false
-}
-
-// IsISO3166Alpha3 checks if a string is valid three-letter country code
-func IsISO3166Alpha3(str string) bool {
- for _, entry := range ISO3166List {
- if str == entry.Alpha3Code {
- return true
- }
- }
- return false
-}
-
-// IsISO693Alpha2 checks if a string is valid two-letter language code
-func IsISO693Alpha2(str string) bool {
- for _, entry := range ISO693List {
- if str == entry.Alpha2Code {
- return true
- }
- }
- return false
-}
-
-// IsISO693Alpha3b checks if a string is valid three-letter language code
-func IsISO693Alpha3b(str string) bool {
- for _, entry := range ISO693List {
- if str == entry.Alpha3bCode {
- return true
- }
- }
- return false
-}
-
-// IsDNSName will validate the given string as a DNS name
-func IsDNSName(str string) bool {
- if str == "" || len(strings.Replace(str, ".", "", -1)) > 255 {
- // constraints already violated
- return false
- }
- return !IsIP(str) && rxDNSName.MatchString(str)
-}
-
-// IsHash checks if a string is a hash of type algorithm.
-// Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b']
-func IsHash(str string, algorithm string) bool {
- len := "0"
- algo := strings.ToLower(algorithm)
-
- if algo == "crc32" || algo == "crc32b" {
- len = "8"
- } else if algo == "md5" || algo == "md4" || algo == "ripemd128" || algo == "tiger128" {
- len = "32"
- } else if algo == "sha1" || algo == "ripemd160" || algo == "tiger160" {
- len = "40"
- } else if algo == "tiger192" {
- len = "48"
- } else if algo == "sha256" {
- len = "64"
- } else if algo == "sha384" {
- len = "96"
- } else if algo == "sha512" {
- len = "128"
- } else {
- return false
- }
-
- return Matches(str, "^[a-f0-9]{"+len+"}$")
-}
-
-// IsDialString validates the given string for usage with the various Dial() functions
-func IsDialString(str string) bool {
-
- if h, p, err := net.SplitHostPort(str); err == nil && h != "" && p != "" && (IsDNSName(h) || IsIP(h)) && IsPort(p) {
- return true
- }
-
- return false
-}
-
-// IsIP checks if a string is either IP version 4 or 6.
-func IsIP(str string) bool {
- return net.ParseIP(str) != nil
-}
-
-// IsPort checks if a string represents a valid port
-func IsPort(str string) bool {
- if i, err := strconv.Atoi(str); err == nil && i > 0 && i < 65536 {
- return true
- }
- return false
-}
-
-// IsIPv4 check if the string is an IP version 4.
-func IsIPv4(str string) bool {
- ip := net.ParseIP(str)
- return ip != nil && strings.Contains(str, ".")
-}
-
-// IsIPv6 check if the string is an IP version 6.
-func IsIPv6(str string) bool {
- ip := net.ParseIP(str)
- return ip != nil && strings.Contains(str, ":")
-}
-
-// IsCIDR check if the string is an valid CIDR notiation (IPV4 & IPV6)
-func IsCIDR(str string) bool {
- _, _, err := net.ParseCIDR(str)
- return err == nil
-}
-
-// IsMAC check if a string is valid MAC address.
-// Possible MAC formats:
-// 01:23:45:67:89:ab
-// 01:23:45:67:89:ab:cd:ef
-// 01-23-45-67-89-ab
-// 01-23-45-67-89-ab-cd-ef
-// 0123.4567.89ab
-// 0123.4567.89ab.cdef
-func IsMAC(str string) bool {
- _, err := net.ParseMAC(str)
- return err == nil
-}
-
-// IsHost checks if the string is a valid IP (both v4 and v6) or a valid DNS name
-func IsHost(str string) bool {
- return IsIP(str) || IsDNSName(str)
-}
-
-// IsMongoID check if the string is a valid hex-encoded representation of a MongoDB ObjectId.
-func IsMongoID(str string) bool {
- return rxHexadecimal.MatchString(str) && (len(str) == 24)
-}
-
-// IsLatitude check if a string is valid latitude.
-func IsLatitude(str string) bool {
- return rxLatitude.MatchString(str)
-}
-
-// IsLongitude check if a string is valid longitude.
-func IsLongitude(str string) bool {
- return rxLongitude.MatchString(str)
-}
-
-// IsRsaPublicKey check if a string is valid public key with provided length
-func IsRsaPublicKey(str string, keylen int) bool {
- bb := bytes.NewBufferString(str)
- pemBytes, err := ioutil.ReadAll(bb)
- if err != nil {
- return false
- }
- block, _ := pem.Decode(pemBytes)
- if block != nil && block.Type != "PUBLIC KEY" {
- return false
- }
- var der []byte
-
- if block != nil {
- der = block.Bytes
- } else {
- der, err = base64.StdEncoding.DecodeString(str)
- if err != nil {
- return false
- }
- }
-
- key, err := x509.ParsePKIXPublicKey(der)
- if err != nil {
- return false
- }
- pubkey, ok := key.(*rsa.PublicKey)
- if !ok {
- return false
- }
- bitlen := len(pubkey.N.Bytes()) * 8
- return bitlen == int(keylen)
-}
-
-func toJSONName(tag string) string {
- if tag == "" {
- return ""
- }
-
- // JSON name always comes first. If there's no options then split[0] is
- // JSON name, if JSON name is not set, then split[0] is an empty string.
- split := strings.SplitN(tag, ",", 2)
-
- name := split[0]
-
- // However it is possible that the field is skipped when
- // (de-)serializing from/to JSON, in which case assume that there is no
- // tag name to use
- if name == "-" {
- return ""
- }
- return name
-}
-
-func PrependPathToErrors(err error, path string) error {
- switch err2 := err.(type) {
- case Error:
- err2.Path = append([]string{path}, err2.Path...)
- return err2
- case Errors:
- errors := err2.Errors()
- for i, err3 := range errors {
- errors[i] = PrependPathToErrors(err3, path)
- }
- return err2
- }
- fmt.Println(err)
- return err
-}
-
-// ValidateStruct use tags for fields.
-// result will be equal to `false` if there are any errors.
-func ValidateStruct(s interface{}) (bool, error) {
- if s == nil {
- return true, nil
- }
- result := true
- var err error
- val := reflect.ValueOf(s)
- if val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr {
- val = val.Elem()
- }
- // we only accept structs
- if val.Kind() != reflect.Struct {
- return false, fmt.Errorf("function only accepts structs; got %s", val.Kind())
- }
- var errs Errors
- for i := 0; i < val.NumField(); i++ {
- valueField := val.Field(i)
- typeField := val.Type().Field(i)
- if typeField.PkgPath != "" {
- continue // Private field
- }
- structResult := true
- if valueField.Kind() == reflect.Interface {
- valueField = valueField.Elem()
- }
- if (valueField.Kind() == reflect.Struct ||
- (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) &&
- typeField.Tag.Get(tagName) != "-" {
- var err error
- structResult, err = ValidateStruct(valueField.Interface())
- if err != nil {
- err = PrependPathToErrors(err, typeField.Name)
- errs = append(errs, err)
- }
- }
- resultField, err2 := typeCheck(valueField, typeField, val, nil)
- if err2 != nil {
-
- // Replace structure name with JSON name if there is a tag on the variable
- jsonTag := toJSONName(typeField.Tag.Get("json"))
- if jsonTag != "" {
- switch jsonError := err2.(type) {
- case Error:
- jsonError.Name = jsonTag
- err2 = jsonError
- case Errors:
- for i2, err3 := range jsonError {
- switch customErr := err3.(type) {
- case Error:
- customErr.Name = jsonTag
- jsonError[i2] = customErr
- }
- }
-
- err2 = jsonError
- }
- }
-
- errs = append(errs, err2)
- }
- result = result && resultField && structResult
- }
- if len(errs) > 0 {
- err = errs
- }
- return result, err
-}
-
-// parseTagIntoMap parses a struct tag `valid:required~Some error message,length(2|3)` into map[string]string{"required": "Some error message", "length(2|3)": ""}
-func parseTagIntoMap(tag string) tagOptionsMap {
- optionsMap := make(tagOptionsMap)
- options := strings.Split(tag, ",")
-
- for i, option := range options {
- option = strings.TrimSpace(option)
-
- validationOptions := strings.Split(option, "~")
- if !isValidTag(validationOptions[0]) {
- continue
- }
- if len(validationOptions) == 2 {
- optionsMap[validationOptions[0]] = tagOption{validationOptions[0], validationOptions[1], i}
- } else {
- optionsMap[validationOptions[0]] = tagOption{validationOptions[0], "", i}
- }
- }
- return optionsMap
-}
-
-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
-}
-
-// IsSSN will validate the given string as a U.S. Social Security Number
-func IsSSN(str string) bool {
- if str == "" || len(str) != 11 {
- return false
- }
- return rxSSN.MatchString(str)
-}
-
-// IsSemver check if string is valid semantic version
-func IsSemver(str string) bool {
- return rxSemver.MatchString(str)
-}
-
-// IsTime check if string is valid according to given format
-func IsTime(str string, format string) bool {
- _, err := time.Parse(format, str)
- return err == nil
-}
-
-// IsRFC3339 check if string is valid timestamp value according to RFC3339
-func IsRFC3339(str string) bool {
- return IsTime(str, time.RFC3339)
-}
-
-// IsRFC3339WithoutZone check if string is valid timestamp value according to RFC3339 which excludes the timezone.
-func IsRFC3339WithoutZone(str string) bool {
- return IsTime(str, RF3339WithoutZone)
-}
-
-// IsISO4217 check if string is valid ISO currency code
-func IsISO4217(str string) bool {
- for _, currency := range ISO4217List {
- if str == currency {
- return true
- }
- }
-
- return false
-}
-
-// ByteLength check string's length
-func ByteLength(str string, params ...string) bool {
- if len(params) == 2 {
- min, _ := ToInt(params[0])
- max, _ := ToInt(params[1])
- return len(str) >= int(min) && len(str) <= int(max)
- }
-
- return false
-}
-
-// RuneLength check string's length
-// Alias for StringLength
-func RuneLength(str string, params ...string) bool {
- return StringLength(str, params...)
-}
-
-// IsRsaPub check whether string is valid RSA key
-// Alias for IsRsaPublicKey
-func IsRsaPub(str string, params ...string) bool {
- if len(params) == 1 {
- len, _ := ToInt(params[0])
- return IsRsaPublicKey(str, int(len))
- }
-
- return false
-}
-
-// StringMatches checks if a string matches a given pattern.
-func StringMatches(s string, params ...string) bool {
- if len(params) == 1 {
- pattern := params[0]
- return Matches(s, pattern)
- }
- return false
-}
-
-// StringLength check string's length (including multi byte strings)
-func StringLength(str string, params ...string) bool {
-
- if len(params) == 2 {
- strLength := utf8.RuneCountInString(str)
- min, _ := ToInt(params[0])
- max, _ := ToInt(params[1])
- return strLength >= int(min) && strLength <= int(max)
- }
-
- return false
-}
-
-// Range check string's length
-func Range(str string, params ...string) bool {
- if len(params) == 2 {
- value, _ := ToFloat(str)
- min, _ := ToFloat(params[0])
- max, _ := ToFloat(params[1])
- return InRange(value, min, max)
- }
-
- return false
-}
-
-func isInRaw(str string, params ...string) bool {
- if len(params) == 1 {
- rawParams := params[0]
-
- parsedParams := strings.Split(rawParams, "|")
-
- return IsIn(str, parsedParams...)
- }
-
- return false
-}
-
-// IsIn check if string str is a member of the set of strings params
-func IsIn(str string, params ...string) bool {
- for _, param := range params {
- if str == param {
- return true
- }
- }
-
- return false
-}
-
-func checkRequired(v reflect.Value, t reflect.StructField, options tagOptionsMap) (bool, error) {
- if nilPtrAllowedByRequired {
- k := v.Kind()
- if (k == reflect.Ptr || k == reflect.Interface) && v.IsNil() {
- return true, nil
- }
- }
-
- if requiredOption, isRequired := options["required"]; isRequired {
- if len(requiredOption.customErrorMessage) > 0 {
- return false, Error{t.Name, fmt.Errorf(requiredOption.customErrorMessage), true, "required", []string{}}
- }
- return false, Error{t.Name, fmt.Errorf("non zero value required"), false, "required", []string{}}
- } else if _, isOptional := options["optional"]; fieldsRequiredByDefault && !isOptional {
- return false, Error{t.Name, fmt.Errorf("Missing required field"), false, "required", []string{}}
- }
- // not required and empty is valid
- return true, nil
-}
-
-func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options tagOptionsMap) (isValid bool, resultErr error) {
- if !v.IsValid() {
- return false, nil
- }
-
- tag := t.Tag.Get(tagName)
-
- // Check if the field should be ignored
- switch tag {
- case "":
- if v.Kind() != reflect.Slice && v.Kind() != reflect.Map {
- if !fieldsRequiredByDefault {
- return true, nil
- }
- return false, Error{t.Name, fmt.Errorf("All fields are required to at least have one validation defined"), false, "required", []string{}}
- }
- case "-":
- return true, nil
- }
-
- isRootType := false
- if options == nil {
- isRootType = true
- options = parseTagIntoMap(tag)
- }
-
- if isEmptyValue(v) {
- // an empty value is not validated, check only required
- isValid, resultErr = checkRequired(v, t, options)
- for key := range options {
- delete(options, key)
- }
- return isValid, resultErr
- }
-
- var customTypeErrors Errors
- optionsOrder := options.orderedKeys()
- for _, validatorName := range optionsOrder {
- validatorStruct := options[validatorName]
- if validatefunc, ok := CustomTypeTagMap.Get(validatorName); ok {
- delete(options, validatorName)
-
- if result := validatefunc(v.Interface(), o.Interface()); !result {
- if len(validatorStruct.customErrorMessage) > 0 {
- customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: TruncatingErrorf(validatorStruct.customErrorMessage, fmt.Sprint(v), validatorName), CustomErrorMessageExists: true, Validator: stripParams(validatorName)})
- continue
- }
- customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: fmt.Errorf("%s does not validate as %s", fmt.Sprint(v), validatorName), CustomErrorMessageExists: false, Validator: stripParams(validatorName)})
- }
- }
- }
-
- if len(customTypeErrors.Errors()) > 0 {
- return false, customTypeErrors
- }
-
- if isRootType {
- // Ensure that we've checked the value by all specified validators before report that the value is valid
- defer func() {
- delete(options, "optional")
- delete(options, "required")
-
- if isValid && resultErr == nil && len(options) != 0 {
- optionsOrder := options.orderedKeys()
- for _, validator := range optionsOrder {
- isValid = false
- resultErr = Error{t.Name, fmt.Errorf(
- "The following validator is invalid or can't be applied to the field: %q", validator), false, stripParams(validator), []string{}}
- return
- }
- }
- }()
- }
-
- switch v.Kind() {
- case reflect.Bool,
- reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr,
- reflect.Float32, reflect.Float64,
- reflect.String:
- // for each tag option check the map of validator functions
- for _, validatorSpec := range optionsOrder {
- validatorStruct := options[validatorSpec]
- var negate bool
- validator := validatorSpec
- customMsgExists := len(validatorStruct.customErrorMessage) > 0
-
- // Check whether the tag looks like '!something' or 'something'
- if validator[0] == '!' {
- validator = validator[1:]
- negate = true
- }
-
- // Check for param validators
- for key, value := range ParamTagRegexMap {
- ps := value.FindStringSubmatch(validator)
- if len(ps) == 0 {
- continue
- }
-
- validatefunc, ok := ParamTagMap[key]
- if !ok {
- continue
- }
-
- delete(options, validatorSpec)
-
- switch v.Kind() {
- case reflect.String,
- reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
- reflect.Float32, reflect.Float64:
-
- field := fmt.Sprint(v) // make value into string, then validate with regex
- if result := validatefunc(field, ps[1:]...); (!result && !negate) || (result && negate) {
- if customMsgExists {
- return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- if negate {
- return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- default:
- // type not yet supported, fail
- return false, Error{t.Name, fmt.Errorf("Validator %s doesn't support kind %s", validator, v.Kind()), false, stripParams(validatorSpec), []string{}}
- }
- }
-
- if validatefunc, ok := TagMap[validator]; ok {
- delete(options, validatorSpec)
-
- switch v.Kind() {
- case reflect.String,
- reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
- reflect.Float32, reflect.Float64:
- field := fmt.Sprint(v) // make value into string, then validate with regex
- if result := validatefunc(field); !result && !negate || result && negate {
- if customMsgExists {
- return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- if negate {
- return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- default:
- //Not Yet Supported Types (Fail here!)
- err := fmt.Errorf("Validator %s doesn't support kind %s for value %v", validator, v.Kind(), v)
- return false, Error{t.Name, err, false, stripParams(validatorSpec), []string{}}
- }
- }
- }
- return true, nil
- case reflect.Map:
- if v.Type().Key().Kind() != reflect.String {
- return false, &UnsupportedTypeError{v.Type()}
- }
- var sv stringValues
- sv = v.MapKeys()
- sort.Sort(sv)
- result := true
- for i, k := range sv {
- var resultItem bool
- var err error
- if v.MapIndex(k).Kind() != reflect.Struct {
- resultItem, err = typeCheck(v.MapIndex(k), t, o, options)
- if err != nil {
- return false, err
- }
- } else {
- resultItem, err = ValidateStruct(v.MapIndex(k).Interface())
- if err != nil {
- err = PrependPathToErrors(err, t.Name+"."+sv[i].Interface().(string))
- return false, err
- }
- }
- result = result && resultItem
- }
- return result, nil
- case reflect.Slice, reflect.Array:
- result := true
- for i := 0; i < v.Len(); i++ {
- var resultItem bool
- var err error
- if v.Index(i).Kind() != reflect.Struct {
- resultItem, err = typeCheck(v.Index(i), t, o, options)
- if err != nil {
- return false, err
- }
- } else {
- resultItem, err = ValidateStruct(v.Index(i).Interface())
- if err != nil {
- err = PrependPathToErrors(err, t.Name+"."+strconv.Itoa(i))
- return false, err
- }
- }
- result = result && resultItem
- }
- return result, nil
- case reflect.Interface:
- // If the value is an interface then encode its element
- if v.IsNil() {
- return true, nil
- }
- return ValidateStruct(v.Interface())
- case reflect.Ptr:
- // If the value is a pointer then check its element
- if v.IsNil() {
- return true, nil
- }
- return typeCheck(v.Elem(), t, o, options)
- case reflect.Struct:
- return ValidateStruct(v.Interface())
- default:
- return false, &UnsupportedTypeError{v.Type()}
- }
-}
-
-func stripParams(validatorString string) string {
- return paramsRegexp.ReplaceAllString(validatorString, "")
-}
-
-func isEmptyValue(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.String, reflect.Array:
- return v.Len() == 0
- case reflect.Map, reflect.Slice:
- return v.Len() == 0 || v.IsNil()
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.Interface, reflect.Ptr:
- return v.IsNil()
- }
-
- return reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface())
-}
-
-// ErrorByField returns error for specified field of the struct
-// validated by ValidateStruct or empty string if there are no errors
-// or this field doesn't exists or doesn't have any errors.
-func ErrorByField(e error, field string) string {
- if e == nil {
- return ""
- }
- return ErrorsByField(e)[field]
-}
-
-// ErrorsByField returns map of errors of the struct validated
-// by ValidateStruct or empty map if there are no errors.
-func ErrorsByField(e error) map[string]string {
- m := make(map[string]string)
- if e == nil {
- return m
- }
- // prototype for ValidateStruct
-
- switch e.(type) {
- case Error:
- m[e.(Error).Name] = e.(Error).Err.Error()
- case Errors:
- for _, item := range e.(Errors).Errors() {
- n := ErrorsByField(item)
- for k, v := range n {
- m[k] = v
- }
- }
- }
-
- return m
-}
-
-// Error returns string equivalent for reflect.Type
-func (e *UnsupportedTypeError) Error() string {
- return "validator: unsupported type: " + e.Type.String()
-}
-
-func (sv stringValues) Len() int { return len(sv) }
-func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] }
-func (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) }
-func (sv stringValues) get(i int) string { return sv[i].String() }
diff --git a/vendor/github.com/asaskevich/govalidator/wercker.yml b/vendor/github.com/asaskevich/govalidator/wercker.yml
deleted file mode 100644
index cac7a5fcf..000000000
--- a/vendor/github.com/asaskevich/govalidator/wercker.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-box: golang
-build:
- steps:
- - setup-go-workspace
-
- - script:
- name: go get
- code: |
- go version
- go get -t ./...
-
- - script:
- name: go test
- code: |
- go test -race ./...
diff --git a/vendor/github.com/beevik/etree/.travis.yml b/vendor/github.com/beevik/etree/.travis.yml
deleted file mode 100644
index f4cb25d47..000000000
--- a/vendor/github.com/beevik/etree/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: go
-sudo: false
-
-go:
- - 1.11.x
- - tip
-
-matrix:
- allow_failures:
- - go: tip
-
-script:
- - go vet ./...
- - go test -v ./...
diff --git a/vendor/github.com/beevik/etree/CONTRIBUTORS b/vendor/github.com/beevik/etree/CONTRIBUTORS
deleted file mode 100644
index 03211a85e..000000000
--- a/vendor/github.com/beevik/etree/CONTRIBUTORS
+++ /dev/null
@@ -1,10 +0,0 @@
-Brett Vickers (beevik)
-Felix Geisendörfer (felixge)
-Kamil Kisiel (kisielk)
-Graham King (grahamking)
-Matt Smith (ma314smith)
-Michal Jemala (michaljemala)
-Nicolas Piganeau (npiganeau)
-Chris Brown (ccbrown)
-Earncef Sequeira (earncef)
-Gabriel de Labachelerie (wuzuf)
diff --git a/vendor/github.com/beevik/etree/LICENSE b/vendor/github.com/beevik/etree/LICENSE
deleted file mode 100644
index 26f1f7751..000000000
--- a/vendor/github.com/beevik/etree/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-Copyright 2015-2019 Brett Vickers. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/beevik/etree/README.md b/vendor/github.com/beevik/etree/README.md
deleted file mode 100644
index 08ec26b0a..000000000
--- a/vendor/github.com/beevik/etree/README.md
+++ /dev/null
@@ -1,205 +0,0 @@
-[](https://travis-ci.org/beevik/etree)
-[](https://godoc.org/github.com/beevik/etree)
-
-etree
-=====
-
-The etree package is a lightweight, pure go package that expresses XML in
-the form of an element tree. Its design was inspired by the Python
-[ElementTree](http://docs.python.org/2/library/xml.etree.elementtree.html)
-module.
-
-Some of the package's capabilities and features:
-
-* Represents XML documents as trees of elements for easy traversal.
-* Imports, serializes, modifies or creates XML documents from scratch.
-* Writes and reads XML to/from files, byte slices, strings and io interfaces.
-* Performs simple or complex searches with lightweight XPath-like query APIs.
-* Auto-indents XML using spaces or tabs for better readability.
-* Implemented in pure go; depends only on standard go libraries.
-* Built on top of the go [encoding/xml](http://golang.org/pkg/encoding/xml)
- package.
-
-### Creating an XML document
-
-The following example creates an XML document from scratch using the etree
-package and outputs its indented contents to stdout.
-```go
-doc := etree.NewDocument()
-doc.CreateProcInst("xml", `version="1.0" encoding="UTF-8"`)
-doc.CreateProcInst("xml-stylesheet", `type="text/xsl" href="style.xsl"`)
-
-people := doc.CreateElement("People")
-people.CreateComment("These are all known people")
-
-jon := people.CreateElement("Person")
-jon.CreateAttr("name", "Jon")
-
-sally := people.CreateElement("Person")
-sally.CreateAttr("name", "Sally")
-
-doc.Indent(2)
-doc.WriteTo(os.Stdout)
-```
-
-Output:
-```xml
-
-
-
-
-
-
-
-```
-
-### Reading an XML file
-
-Suppose you have a file on disk called `bookstore.xml` containing the
-following data:
-
-```xml
-
-
-
- Everyday Italian
- Giada De Laurentiis
- 2005
- 30.00
-
-
-
- Harry Potter
- J K. Rowling
- 2005
- 29.99
-
-
-
- XQuery Kick Start
- James McGovern
- Per Bothner
- Kurt Cagle
- James Linn
- Vaidyanathan Nagarajan
- 2003
- 49.99
-
-
-
- Learning XML
- Erik T. Ray
- 2003
- 39.95
-
-
-
-```
-
-This code reads the file's contents into an etree document.
-```go
-doc := etree.NewDocument()
-if err := doc.ReadFromFile("bookstore.xml"); err != nil {
- panic(err)
-}
-```
-
-You can also read XML from a string, a byte slice, or an `io.Reader`.
-
-### Processing elements and attributes
-
-This example illustrates several ways to access elements and attributes using
-etree selection queries.
-```go
-root := doc.SelectElement("bookstore")
-fmt.Println("ROOT element:", root.Tag)
-
-for _, book := range root.SelectElements("book") {
- fmt.Println("CHILD element:", book.Tag)
- if title := book.SelectElement("title"); title != nil {
- lang := title.SelectAttrValue("lang", "unknown")
- fmt.Printf(" TITLE: %s (%s)\n", title.Text(), lang)
- }
- for _, attr := range book.Attr {
- fmt.Printf(" ATTR: %s=%s\n", attr.Key, attr.Value)
- }
-}
-```
-Output:
-```
-ROOT element: bookstore
-CHILD element: book
- TITLE: Everyday Italian (en)
- ATTR: category=COOKING
-CHILD element: book
- TITLE: Harry Potter (en)
- ATTR: category=CHILDREN
-CHILD element: book
- TITLE: XQuery Kick Start (en)
- ATTR: category=WEB
-CHILD element: book
- TITLE: Learning XML (en)
- ATTR: category=WEB
-```
-
-### Path queries
-
-This example uses etree's path functions to select all book titles that fall
-into the category of 'WEB'. The double-slash prefix in the path causes the
-search for book elements to occur recursively; book elements may appear at any
-level of the XML hierarchy.
-```go
-for _, t := range doc.FindElements("//book[@category='WEB']/title") {
- fmt.Println("Title:", t.Text())
-}
-```
-
-Output:
-```
-Title: XQuery Kick Start
-Title: Learning XML
-```
-
-This example finds the first book element under the root bookstore element and
-outputs the tag and text of each of its child elements.
-```go
-for _, e := range doc.FindElements("./bookstore/book[1]/*") {
- fmt.Printf("%s: %s\n", e.Tag, e.Text())
-}
-```
-
-Output:
-```
-title: Everyday Italian
-author: Giada De Laurentiis
-year: 2005
-price: 30.00
-```
-
-This example finds all books with a price of 49.99 and outputs their titles.
-```go
-path := etree.MustCompilePath("./bookstore/book[p:price='49.99']/title")
-for _, e := range doc.FindElementsPath(path) {
- fmt.Println(e.Text())
-}
-```
-
-Output:
-```
-XQuery Kick Start
-```
-
-Note that this example uses the FindElementsPath function, which takes as an
-argument a pre-compiled path object. Use precompiled paths when you plan to
-search with the same path more than once.
-
-### Other features
-
-These are just a few examples of the things the etree package can do. See the
-[documentation](http://godoc.org/github.com/beevik/etree) for a complete
-description of its capabilities.
-
-### Contributing
-
-This project accepts contributions. Just fork the repo and submit a pull
-request!
diff --git a/vendor/github.com/beevik/etree/RELEASE_NOTES.md b/vendor/github.com/beevik/etree/RELEASE_NOTES.md
deleted file mode 100644
index ee59d7abf..000000000
--- a/vendor/github.com/beevik/etree/RELEASE_NOTES.md
+++ /dev/null
@@ -1,109 +0,0 @@
-Release v1.1.0
-==============
-
-**New Features**
-
-* New attribute helpers.
- * Added the `Element.SortAttrs` method, which lexicographically sorts an
- element's attributes by key.
-* New `ReadSettings` properties.
- * Added `Entity` for the support of custom entity maps.
-* New `WriteSettings` properties.
- * Added `UseCRLF` to allow the output of CR-LF newlines instead of the
- default LF newlines. This is useful on Windows systems.
-* Additional support for text and CDATA sections.
- * The `Element.Text` method now returns the concatenation of all consecutive
- character data tokens immediately following an element's opening tag.
- * Added `Element.SetCData` to replace the character data immediately
- following an element's opening tag with a CDATA section.
- * Added `Element.CreateCData` to create and add a CDATA section child
- `CharData` token to an element.
- * Added `Element.CreateText` to create and add a child text `CharData` token
- to an element.
- * Added `NewCData` to create a parentless CDATA section `CharData` token.
- * Added `NewText` to create a parentless text `CharData`
- token.
- * Added `CharData.IsCData` to detect if the token contains a CDATA section.
- * Added `CharData.IsWhitespace` to detect if the token contains whitespace
- inserted by one of the document Indent functions.
- * Modified `Element.SetText` so that it replaces a run of consecutive
- character data tokens following the element's opening tag (instead of just
- the first one).
-* New "tail text" support.
- * Added the `Element.Tail` method, which returns the text immediately
- following an element's closing tag.
- * Added the `Element.SetTail` method, which modifies the text immediately
- following an element's closing tag.
-* New element child insertion and removal methods.
- * Added the `Element.InsertChildAt` method, which inserts a new child token
- before the specified child token index.
- * Added the `Element.RemoveChildAt` method, which removes the child token at
- the specified child token index.
-* New element and attribute queries.
- * Added the `Element.Index` method, which returns the element's index within
- its parent element's child token list.
- * Added the `Element.NamespaceURI` method to return the namespace URI
- associated with an element.
- * Added the `Attr.NamespaceURI` method to return the namespace URI
- associated with an element.
- * Added the `Attr.Element` method to return the element that an attribute
- belongs to.
-* New Path filter functions.
- * Added `[local-name()='val']` to keep elements whose unprefixed tag matches
- the desired value.
- * Added `[name()='val']` to keep elements whose full tag matches the desired
- value.
- * Added `[namespace-prefix()='val']` to keep elements whose namespace prefix
- matches the desired value.
- * Added `[namespace-uri()='val']` to keep elements whose namespace URI
- matches the desired value.
-
-**Bug Fixes**
-
-* A default XML `CharSetReader` is now used to prevent failed parsing of XML
- documents using certain encodings.
- ([Issue](https://github.com/beevik/etree/issues/53)).
-* All characters are now properly escaped according to XML parsing rules.
- ([Issue](https://github.com/beevik/etree/issues/55)).
-* The `Document.Indent` and `Document.IndentTabs` functions no longer insert
- empty string `CharData` tokens.
-
-**Deprecated**
-
-* `Element`
- * The `InsertChild` method is deprecated. Use `InsertChildAt` instead.
- * The `CreateCharData` method is deprecated. Use `CreateText` instead.
-* `CharData`
- * The `NewCharData` method is deprecated. Use `NewText` instead.
-
-
-Release v1.0.1
-==============
-
-**Changes**
-
-* Added support for absolute etree Path queries. An absolute path begins with
- `/` or `//` and begins its search from the element's document root.
-* Added [`GetPath`](https://godoc.org/github.com/beevik/etree#Element.GetPath)
- and [`GetRelativePath`](https://godoc.org/github.com/beevik/etree#Element.GetRelativePath)
- functions to the [`Element`](https://godoc.org/github.com/beevik/etree#Element)
- type.
-
-**Breaking changes**
-
-* A path starting with `//` is now interpreted as an absolute path.
- Previously, it was interpreted as a relative path starting from the element
- whose
- [`FindElement`](https://godoc.org/github.com/beevik/etree#Element.FindElement)
- method was called. To remain compatible with this release, all paths
- prefixed with `//` should be prefixed with `.//` when called from any
- element other than the document's root.
-* [**edit 2/1/2019**]: Minor releases should not contain breaking changes.
- Even though this breaking change was very minor, it was a mistake to include
- it in this minor release. In the future, all breaking changes will be
- limited to major releases (e.g., version 2.0.0).
-
-Release v1.0.0
-==============
-
-Initial release.
diff --git a/vendor/github.com/beevik/etree/etree.go b/vendor/github.com/beevik/etree/etree.go
deleted file mode 100644
index 9e24f9012..000000000
--- a/vendor/github.com/beevik/etree/etree.go
+++ /dev/null
@@ -1,1453 +0,0 @@
-// Copyright 2015-2019 Brett Vickers.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package etree provides XML services through an Element Tree
-// abstraction.
-package etree
-
-import (
- "bufio"
- "bytes"
- "encoding/xml"
- "errors"
- "io"
- "os"
- "sort"
- "strings"
-)
-
-const (
- // NoIndent is used with Indent to disable all indenting.
- NoIndent = -1
-)
-
-// ErrXML is returned when XML parsing fails due to incorrect formatting.
-var ErrXML = errors.New("etree: invalid XML format")
-
-// ReadSettings allow for changing the default behavior of the ReadFrom*
-// methods.
-type ReadSettings struct {
- // CharsetReader to be passed to standard xml.Decoder. Default: nil.
- CharsetReader func(charset string, input io.Reader) (io.Reader, error)
-
- // Permissive allows input containing common mistakes such as missing tags
- // or attribute values. Default: false.
- Permissive bool
-
- // Entity to be passed to standard xml.Decoder. Default: nil.
- Entity map[string]string
-}
-
-// newReadSettings creates a default ReadSettings record.
-func newReadSettings() ReadSettings {
- return ReadSettings{
- CharsetReader: func(label string, input io.Reader) (io.Reader, error) {
- return input, nil
- },
- Permissive: false,
- }
-}
-
-// WriteSettings allow for changing the serialization behavior of the WriteTo*
-// methods.
-type WriteSettings struct {
- // CanonicalEndTags forces the production of XML end tags, even for
- // elements that have no child elements. Default: false.
- CanonicalEndTags bool
-
- // CanonicalText forces the production of XML character references for
- // text data characters &, <, and >. If false, XML character references
- // are also produced for " and '. Default: false.
- CanonicalText bool
-
- // CanonicalAttrVal forces the production of XML character references for
- // attribute value characters &, < and ". If false, XML character
- // references are also produced for > and '. Default: false.
- CanonicalAttrVal bool
-
- // When outputting indented XML, use a carriage return and linefeed
- // ("\r\n") as a new-line delimiter instead of just a linefeed ("\n").
- // This is useful on Windows-based systems.
- UseCRLF bool
-}
-
-// newWriteSettings creates a default WriteSettings record.
-func newWriteSettings() WriteSettings {
- return WriteSettings{
- CanonicalEndTags: false,
- CanonicalText: false,
- CanonicalAttrVal: false,
- UseCRLF: false,
- }
-}
-
-// A Token is an empty interface that represents an Element, CharData,
-// Comment, Directive, or ProcInst.
-type Token interface {
- Parent() *Element
- Index() int
- dup(parent *Element) Token
- setParent(parent *Element)
- setIndex(index int)
- writeTo(w *bufio.Writer, s *WriteSettings)
-}
-
-// A Document is a container holding a complete XML hierarchy. Its embedded
-// element contains zero or more children, one of which is usually the root
-// element. The embedded element may include other children such as
-// processing instructions or BOM CharData tokens.
-type Document struct {
- Element
- ReadSettings ReadSettings
- WriteSettings WriteSettings
-}
-
-// An Element represents an XML element, its attributes, and its child tokens.
-type Element struct {
- Space, Tag string // namespace prefix and tag
- Attr []Attr // key-value attribute pairs
- Child []Token // child tokens (elements, comments, etc.)
- parent *Element // parent element
- index int // token index in parent's children
-}
-
-// An Attr represents a key-value attribute of an XML element.
-type Attr struct {
- Space, Key string // The attribute's namespace prefix and key
- Value string // The attribute value string
- element *Element // element containing the attribute
-}
-
-// charDataFlags are used with CharData tokens to store additional settings.
-type charDataFlags uint8
-
-const (
- // The CharData was created by an indent function as whitespace.
- whitespaceFlag charDataFlags = 1 << iota
-
- // The CharData contains a CDATA section.
- cdataFlag
-)
-
-// CharData can be used to represent character data or a CDATA section within
-// an XML document.
-type CharData struct {
- Data string
- parent *Element
- index int
- flags charDataFlags
-}
-
-// A Comment represents an XML comment.
-type Comment struct {
- Data string
- parent *Element
- index int
-}
-
-// A Directive represents an XML directive.
-type Directive struct {
- Data string
- parent *Element
- index int
-}
-
-// A ProcInst represents an XML processing instruction.
-type ProcInst struct {
- Target string
- Inst string
- parent *Element
- index int
-}
-
-// NewDocument creates an XML document without a root element.
-func NewDocument() *Document {
- return &Document{
- Element{Child: make([]Token, 0)},
- newReadSettings(),
- newWriteSettings(),
- }
-}
-
-// Copy returns a recursive, deep copy of the document.
-func (d *Document) Copy() *Document {
- return &Document{*(d.dup(nil).(*Element)), d.ReadSettings, d.WriteSettings}
-}
-
-// Root returns the root element of the document, or nil if there is no root
-// element.
-func (d *Document) Root() *Element {
- for _, t := range d.Child {
- if c, ok := t.(*Element); ok {
- return c
- }
- }
- return nil
-}
-
-// SetRoot replaces the document's root element with e. If the document
-// already has a root when this function is called, then the document's
-// original root is unbound first. If the element e is bound to another
-// document (or to another element within a document), then it is unbound
-// first.
-func (d *Document) SetRoot(e *Element) {
- if e.parent != nil {
- e.parent.RemoveChild(e)
- }
-
- p := &d.Element
- e.setParent(p)
-
- // If there is already a root element, replace it.
- for i, t := range p.Child {
- if _, ok := t.(*Element); ok {
- t.setParent(nil)
- t.setIndex(-1)
- p.Child[i] = e
- e.setIndex(i)
- return
- }
- }
-
- // No existing root element, so add it.
- p.addChild(e)
-}
-
-// ReadFrom reads XML from the reader r into the document d. It returns the
-// number of bytes read and any error encountered.
-func (d *Document) ReadFrom(r io.Reader) (n int64, err error) {
- return d.Element.readFrom(r, d.ReadSettings)
-}
-
-// ReadFromFile reads XML from the string s into the document d.
-func (d *Document) ReadFromFile(filename string) error {
- f, err := os.Open(filename)
- if err != nil {
- return err
- }
- defer f.Close()
- _, err = d.ReadFrom(f)
- return err
-}
-
-// ReadFromBytes reads XML from the byte slice b into the document d.
-func (d *Document) ReadFromBytes(b []byte) error {
- _, err := d.ReadFrom(bytes.NewReader(b))
- return err
-}
-
-// ReadFromString reads XML from the string s into the document d.
-func (d *Document) ReadFromString(s string) error {
- _, err := d.ReadFrom(strings.NewReader(s))
- return err
-}
-
-// WriteTo serializes an XML document into the writer w. It
-// returns the number of bytes written and any error encountered.
-func (d *Document) WriteTo(w io.Writer) (n int64, err error) {
- cw := newCountWriter(w)
- b := bufio.NewWriter(cw)
- for _, c := range d.Child {
- c.writeTo(b, &d.WriteSettings)
- }
- err, n = b.Flush(), cw.bytes
- return
-}
-
-// WriteToFile serializes an XML document into the file named
-// filename.
-func (d *Document) WriteToFile(filename string) error {
- f, err := os.Create(filename)
- if err != nil {
- return err
- }
- defer f.Close()
- _, err = d.WriteTo(f)
- return err
-}
-
-// WriteToBytes serializes the XML document into a slice of
-// bytes.
-func (d *Document) WriteToBytes() (b []byte, err error) {
- var buf bytes.Buffer
- if _, err = d.WriteTo(&buf); err != nil {
- return
- }
- return buf.Bytes(), nil
-}
-
-// WriteToString serializes the XML document into a string.
-func (d *Document) WriteToString() (s string, err error) {
- var b []byte
- if b, err = d.WriteToBytes(); err != nil {
- return
- }
- return string(b), nil
-}
-
-type indentFunc func(depth int) string
-
-// Indent modifies the document's element tree by inserting character data
-// tokens containing newlines and indentation. The amount of indentation per
-// depth level is given as spaces. Pass etree.NoIndent for spaces if you want
-// no indentation at all.
-func (d *Document) Indent(spaces int) {
- var indent indentFunc
- switch {
- case spaces < 0:
- indent = func(depth int) string { return "" }
- case d.WriteSettings.UseCRLF == true:
- indent = func(depth int) string { return indentCRLF(depth*spaces, indentSpaces) }
- default:
- indent = func(depth int) string { return indentLF(depth*spaces, indentSpaces) }
- }
- d.Element.indent(0, indent)
-}
-
-// IndentTabs modifies the document's element tree by inserting CharData
-// tokens containing newlines and tabs for indentation. One tab is used per
-// indentation level.
-func (d *Document) IndentTabs() {
- var indent indentFunc
- switch d.WriteSettings.UseCRLF {
- case true:
- indent = func(depth int) string { return indentCRLF(depth, indentTabs) }
- default:
- indent = func(depth int) string { return indentLF(depth, indentTabs) }
- }
- d.Element.indent(0, indent)
-}
-
-// NewElement creates an unparented element with the specified tag. The tag
-// may be prefixed by a namespace prefix and a colon.
-func NewElement(tag string) *Element {
- space, stag := spaceDecompose(tag)
- return newElement(space, stag, nil)
-}
-
-// newElement is a helper function that creates an element and binds it to
-// a parent element if possible.
-func newElement(space, tag string, parent *Element) *Element {
- e := &Element{
- Space: space,
- Tag: tag,
- Attr: make([]Attr, 0),
- Child: make([]Token, 0),
- parent: parent,
- index: -1,
- }
- if parent != nil {
- parent.addChild(e)
- }
- return e
-}
-
-// Copy creates a recursive, deep copy of the element and all its attributes
-// and children. The returned element has no parent but can be parented to a
-// another element using AddElement, or to a document using SetRoot.
-func (e *Element) Copy() *Element {
- return e.dup(nil).(*Element)
-}
-
-// FullTag returns the element e's complete tag, including namespace prefix if
-// present.
-func (e *Element) FullTag() string {
- if e.Space == "" {
- return e.Tag
- }
- return e.Space + ":" + e.Tag
-}
-
-// NamespaceURI returns the XML namespace URI associated with the element. If
-// the element is part of the XML default namespace, NamespaceURI returns the
-// empty string.
-func (e *Element) NamespaceURI() string {
- if e.Space == "" {
- return e.findDefaultNamespaceURI()
- }
- return e.findLocalNamespaceURI(e.Space)
-}
-
-// findLocalNamespaceURI finds the namespace URI corresponding to the
-// requested prefix.
-func (e *Element) findLocalNamespaceURI(prefix string) string {
- for _, a := range e.Attr {
- if a.Space == "xmlns" && a.Key == prefix {
- return a.Value
- }
- }
-
- if e.parent == nil {
- return ""
- }
-
- return e.parent.findLocalNamespaceURI(prefix)
-}
-
-// findDefaultNamespaceURI finds the default namespace URI of the element.
-func (e *Element) findDefaultNamespaceURI() string {
- for _, a := range e.Attr {
- if a.Space == "" && a.Key == "xmlns" {
- return a.Value
- }
- }
-
- if e.parent == nil {
- return ""
- }
-
- return e.parent.findDefaultNamespaceURI()
-}
-
-// hasText returns true if the element has character data immediately
-// folllowing the element's opening tag.
-func (e *Element) hasText() bool {
- if len(e.Child) == 0 {
- return false
- }
- _, ok := e.Child[0].(*CharData)
- return ok
-}
-
-// namespacePrefix returns the namespace prefix associated with the element.
-func (e *Element) namespacePrefix() string {
- return e.Space
-}
-
-// name returns the tag associated with the element.
-func (e *Element) name() string {
- return e.Tag
-}
-
-// Text returns all character data immediately following the element's opening
-// tag.
-func (e *Element) Text() string {
- if len(e.Child) == 0 {
- return ""
- }
-
- text := ""
- for _, ch := range e.Child {
- if cd, ok := ch.(*CharData); ok {
- if text == "" {
- text = cd.Data
- } else {
- text = text + cd.Data
- }
- } else {
- break
- }
- }
- return text
-}
-
-// SetText replaces all character data immediately following an element's
-// opening tag with the requested string.
-func (e *Element) SetText(text string) {
- e.replaceText(0, text, 0)
-}
-
-// SetCData replaces all character data immediately following an element's
-// opening tag with a CDATA section.
-func (e *Element) SetCData(text string) {
- e.replaceText(0, text, cdataFlag)
-}
-
-// Tail returns all character data immediately following the element's end
-// tag.
-func (e *Element) Tail() string {
- if e.Parent() == nil {
- return ""
- }
-
- p := e.Parent()
- i := e.Index()
-
- text := ""
- for _, ch := range p.Child[i+1:] {
- if cd, ok := ch.(*CharData); ok {
- if text == "" {
- text = cd.Data
- } else {
- text = text + cd.Data
- }
- } else {
- break
- }
- }
- return text
-}
-
-// SetTail replaces all character data immediately following the element's end
-// tag with the requested string.
-func (e *Element) SetTail(text string) {
- if e.Parent() == nil {
- return
- }
-
- p := e.Parent()
- p.replaceText(e.Index()+1, text, 0)
-}
-
-// replaceText is a helper function that replaces a series of chardata tokens
-// starting at index i with the requested text.
-func (e *Element) replaceText(i int, text string, flags charDataFlags) {
- end := e.findTermCharDataIndex(i)
-
- switch {
- case end == i:
- if text != "" {
- // insert a new chardata token at index i
- cd := newCharData(text, flags, nil)
- e.InsertChildAt(i, cd)
- }
-
- case end == i+1:
- if text == "" {
- // remove the chardata token at index i
- e.RemoveChildAt(i)
- } else {
- // replace the first and only character token at index i
- cd := e.Child[i].(*CharData)
- cd.Data, cd.flags = text, flags
- }
-
- default:
- if text == "" {
- // remove all chardata tokens starting from index i
- copy(e.Child[i:], e.Child[end:])
- removed := end - i
- e.Child = e.Child[:len(e.Child)-removed]
- for j := i; j < len(e.Child); j++ {
- e.Child[j].setIndex(j)
- }
- } else {
- // replace the first chardata token at index i and remove all
- // subsequent chardata tokens
- cd := e.Child[i].(*CharData)
- cd.Data, cd.flags = text, flags
- copy(e.Child[i+1:], e.Child[end:])
- removed := end - (i + 1)
- e.Child = e.Child[:len(e.Child)-removed]
- for j := i + 1; j < len(e.Child); j++ {
- e.Child[j].setIndex(j)
- }
- }
- }
-}
-
-// findTermCharDataIndex finds the index of the first child token that isn't
-// a CharData token. It starts from the requested start index.
-func (e *Element) findTermCharDataIndex(start int) int {
- for i := start; i < len(e.Child); i++ {
- if _, ok := e.Child[i].(*CharData); !ok {
- return i
- }
- }
- return len(e.Child)
-}
-
-// CreateElement creates an element with the specified tag and adds it as the
-// last child element of the element e. The tag may be prefixed by a namespace
-// prefix and a colon.
-func (e *Element) CreateElement(tag string) *Element {
- space, stag := spaceDecompose(tag)
- return newElement(space, stag, e)
-}
-
-// AddChild adds the token t as the last child of element e. If token t was
-// already the child of another element, it is first removed from its current
-// parent element.
-func (e *Element) AddChild(t Token) {
- if t.Parent() != nil {
- t.Parent().RemoveChild(t)
- }
-
- t.setParent(e)
- e.addChild(t)
-}
-
-// InsertChild inserts the token t before e's existing child token ex. If ex
-// is nil or ex is not a child of e, then t is added to the end of e's child
-// token list. If token t was already the child of another element, it is
-// first removed from its current parent element.
-//
-// Deprecated: InsertChild is deprecated. Use InsertChildAt instead.
-func (e *Element) InsertChild(ex Token, t Token) {
- if ex == nil || ex.Parent() != e {
- e.AddChild(t)
- return
- }
-
- if t.Parent() != nil {
- t.Parent().RemoveChild(t)
- }
-
- t.setParent(e)
-
- i := ex.Index()
- e.Child = append(e.Child, nil)
- copy(e.Child[i+1:], e.Child[i:])
- e.Child[i] = t
-
- for j := i; j < len(e.Child); j++ {
- e.Child[j].setIndex(j)
- }
-}
-
-// InsertChildAt inserts the token t into the element e's list of child tokens
-// just before the requested index. If the index is greater than or equal to
-// the length of the list of child tokens, the token t is added to the end of
-// the list.
-func (e *Element) InsertChildAt(index int, t Token) {
- if index >= len(e.Child) {
- e.AddChild(t)
- return
- }
-
- if t.Parent() != nil {
- if t.Parent() == e && t.Index() > index {
- index--
- }
- t.Parent().RemoveChild(t)
- }
-
- t.setParent(e)
-
- e.Child = append(e.Child, nil)
- copy(e.Child[index+1:], e.Child[index:])
- e.Child[index] = t
-
- for j := index; j < len(e.Child); j++ {
- e.Child[j].setIndex(j)
- }
-}
-
-// RemoveChild attempts to remove the token t from element e's list of
-// children. If the token t is a child of e, then it is returned. Otherwise,
-// nil is returned.
-func (e *Element) RemoveChild(t Token) Token {
- if t.Parent() != e {
- return nil
- }
- return e.RemoveChildAt(t.Index())
-}
-
-// RemoveChildAt removes the index-th child token from the element e. The
-// removed child token is returned. If the index is out of bounds, no child is
-// removed and nil is returned.
-func (e *Element) RemoveChildAt(index int) Token {
- if index >= len(e.Child) {
- return nil
- }
-
- t := e.Child[index]
- for j := index + 1; j < len(e.Child); j++ {
- e.Child[j].setIndex(j - 1)
- }
- e.Child = append(e.Child[:index], e.Child[index+1:]...)
- t.setIndex(-1)
- t.setParent(nil)
- return t
-}
-
-// ReadFrom reads XML from the reader r and stores the result as a new child
-// of element e.
-func (e *Element) readFrom(ri io.Reader, settings ReadSettings) (n int64, err error) {
- r := newCountReader(ri)
- dec := xml.NewDecoder(r)
- dec.CharsetReader = settings.CharsetReader
- dec.Strict = !settings.Permissive
- dec.Entity = settings.Entity
- var stack stack
- stack.push(e)
- for {
- t, err := dec.RawToken()
- switch {
- case err == io.EOF:
- return r.bytes, nil
- case err != nil:
- return r.bytes, err
- case stack.empty():
- return r.bytes, ErrXML
- }
-
- top := stack.peek().(*Element)
-
- switch t := t.(type) {
- case xml.StartElement:
- e := newElement(t.Name.Space, t.Name.Local, top)
- for _, a := range t.Attr {
- e.createAttr(a.Name.Space, a.Name.Local, a.Value, e)
- }
- stack.push(e)
- case xml.EndElement:
- stack.pop()
- case xml.CharData:
- data := string(t)
- var flags charDataFlags
- if isWhitespace(data) {
- flags = whitespaceFlag
- }
- newCharData(data, flags, top)
- case xml.Comment:
- newComment(string(t), top)
- case xml.Directive:
- newDirective(string(t), top)
- case xml.ProcInst:
- newProcInst(t.Target, string(t.Inst), top)
- }
- }
-}
-
-// SelectAttr finds an element attribute matching the requested key and
-// returns it if found. Returns nil if no matching attribute is found. The key
-// may be prefixed by a namespace prefix and a colon.
-func (e *Element) SelectAttr(key string) *Attr {
- space, skey := spaceDecompose(key)
- for i, a := range e.Attr {
- if spaceMatch(space, a.Space) && skey == a.Key {
- return &e.Attr[i]
- }
- }
- return nil
-}
-
-// SelectAttrValue finds an element attribute matching the requested key and
-// returns its value if found. The key may be prefixed by a namespace prefix
-// and a colon. If the key is not found, the dflt value is returned instead.
-func (e *Element) SelectAttrValue(key, dflt string) string {
- space, skey := spaceDecompose(key)
- for _, a := range e.Attr {
- if spaceMatch(space, a.Space) && skey == a.Key {
- return a.Value
- }
- }
- return dflt
-}
-
-// ChildElements returns all elements that are children of element e.
-func (e *Element) ChildElements() []*Element {
- var elements []*Element
- for _, t := range e.Child {
- if c, ok := t.(*Element); ok {
- elements = append(elements, c)
- }
- }
- return elements
-}
-
-// SelectElement returns the first child element with the given tag. The tag
-// may be prefixed by a namespace prefix and a colon. Returns nil if no
-// element with a matching tag was found.
-func (e *Element) SelectElement(tag string) *Element {
- space, stag := spaceDecompose(tag)
- for _, t := range e.Child {
- if c, ok := t.(*Element); ok && spaceMatch(space, c.Space) && stag == c.Tag {
- return c
- }
- }
- return nil
-}
-
-// SelectElements returns a slice of all child elements with the given tag.
-// The tag may be prefixed by a namespace prefix and a colon.
-func (e *Element) SelectElements(tag string) []*Element {
- space, stag := spaceDecompose(tag)
- var elements []*Element
- for _, t := range e.Child {
- if c, ok := t.(*Element); ok && spaceMatch(space, c.Space) && stag == c.Tag {
- elements = append(elements, c)
- }
- }
- return elements
-}
-
-// FindElement returns the first element matched by the XPath-like path
-// string. Returns nil if no element is found using the path. Panics if an
-// invalid path string is supplied.
-func (e *Element) FindElement(path string) *Element {
- return e.FindElementPath(MustCompilePath(path))
-}
-
-// FindElementPath returns the first element matched by the XPath-like path
-// string. Returns nil if no element is found using the path.
-func (e *Element) FindElementPath(path Path) *Element {
- p := newPather()
- elements := p.traverse(e, path)
- switch {
- case len(elements) > 0:
- return elements[0]
- default:
- return nil
- }
-}
-
-// FindElements returns a slice of elements matched by the XPath-like path
-// string. Panics if an invalid path string is supplied.
-func (e *Element) FindElements(path string) []*Element {
- return e.FindElementsPath(MustCompilePath(path))
-}
-
-// FindElementsPath returns a slice of elements matched by the Path object.
-func (e *Element) FindElementsPath(path Path) []*Element {
- p := newPather()
- return p.traverse(e, path)
-}
-
-// GetPath returns the absolute path of the element.
-func (e *Element) GetPath() string {
- path := []string{}
- for seg := e; seg != nil; seg = seg.Parent() {
- if seg.Tag != "" {
- path = append(path, seg.Tag)
- }
- }
-
- // Reverse the path.
- for i, j := 0, len(path)-1; i < j; i, j = i+1, j-1 {
- path[i], path[j] = path[j], path[i]
- }
-
- return "/" + strings.Join(path, "/")
-}
-
-// GetRelativePath returns the path of the element relative to the source
-// element. If the two elements are not part of the same element tree, then
-// GetRelativePath returns the empty string.
-func (e *Element) GetRelativePath(source *Element) string {
- var path []*Element
-
- if source == nil {
- return ""
- }
-
- // Build a reverse path from the element toward the root. Stop if the
- // source element is encountered.
- var seg *Element
- for seg = e; seg != nil && seg != source; seg = seg.Parent() {
- path = append(path, seg)
- }
-
- // If we found the source element, reverse the path and compose the
- // string.
- if seg == source {
- if len(path) == 0 {
- return "."
- }
- parts := []string{}
- for i := len(path) - 1; i >= 0; i-- {
- parts = append(parts, path[i].Tag)
- }
- return "./" + strings.Join(parts, "/")
- }
-
- // The source wasn't encountered, so climb from the source element toward
- // the root of the tree until an element in the reversed path is
- // encountered.
-
- findPathIndex := func(e *Element, path []*Element) int {
- for i, ee := range path {
- if e == ee {
- return i
- }
- }
- return -1
- }
-
- climb := 0
- for seg = source; seg != nil; seg = seg.Parent() {
- i := findPathIndex(seg, path)
- if i >= 0 {
- path = path[:i] // truncate at found segment
- break
- }
- climb++
- }
-
- // No element in the reversed path was encountered, so the two elements
- // must not be part of the same tree.
- if seg == nil {
- return ""
- }
-
- // Reverse the (possibly truncated) path and prepend ".." segments to
- // climb.
- parts := []string{}
- for i := 0; i < climb; i++ {
- parts = append(parts, "..")
- }
- for i := len(path) - 1; i >= 0; i-- {
- parts = append(parts, path[i].Tag)
- }
- return strings.Join(parts, "/")
-}
-
-// indent recursively inserts proper indentation between an
-// XML element's child tokens.
-func (e *Element) indent(depth int, indent indentFunc) {
- e.stripIndent()
- n := len(e.Child)
- if n == 0 {
- return
- }
-
- oldChild := e.Child
- e.Child = make([]Token, 0, n*2+1)
- isCharData, firstNonCharData := false, true
- for _, c := range oldChild {
- // Insert NL+indent before child if it's not character data.
- // Exceptions: when it's the first non-character-data child, or when
- // the child is at root depth.
- _, isCharData = c.(*CharData)
- if !isCharData {
- if !firstNonCharData || depth > 0 {
- s := indent(depth)
- if s != "" {
- newCharData(s, whitespaceFlag, e)
- }
- }
- firstNonCharData = false
- }
-
- e.addChild(c)
-
- // Recursively process child elements.
- if ce, ok := c.(*Element); ok {
- ce.indent(depth+1, indent)
- }
- }
-
- // Insert NL+indent before the last child.
- if !isCharData {
- if !firstNonCharData || depth > 0 {
- s := indent(depth - 1)
- if s != "" {
- newCharData(s, whitespaceFlag, e)
- }
- }
- }
-}
-
-// stripIndent removes any previously inserted indentation.
-func (e *Element) stripIndent() {
- // Count the number of non-indent child tokens
- n := len(e.Child)
- for _, c := range e.Child {
- if cd, ok := c.(*CharData); ok && cd.IsWhitespace() {
- n--
- }
- }
- if n == len(e.Child) {
- return
- }
-
- // Strip out indent CharData
- newChild := make([]Token, n)
- j := 0
- for _, c := range e.Child {
- if cd, ok := c.(*CharData); ok && cd.IsWhitespace() {
- continue
- }
- newChild[j] = c
- newChild[j].setIndex(j)
- j++
- }
- e.Child = newChild
-}
-
-// dup duplicates the element.
-func (e *Element) dup(parent *Element) Token {
- ne := &Element{
- Space: e.Space,
- Tag: e.Tag,
- Attr: make([]Attr, len(e.Attr)),
- Child: make([]Token, len(e.Child)),
- parent: parent,
- index: e.index,
- }
- for i, t := range e.Child {
- ne.Child[i] = t.dup(ne)
- }
- for i, a := range e.Attr {
- ne.Attr[i] = a
- }
- return ne
-}
-
-// Parent returns the element token's parent element, or nil if it has no
-// parent.
-func (e *Element) Parent() *Element {
- return e.parent
-}
-
-// Index returns the index of this element within its parent element's
-// list of child tokens. If this element has no parent element, the index
-// is -1.
-func (e *Element) Index() int {
- return e.index
-}
-
-// setParent replaces the element token's parent.
-func (e *Element) setParent(parent *Element) {
- e.parent = parent
-}
-
-// setIndex sets the element token's index within its parent's Child slice.
-func (e *Element) setIndex(index int) {
- e.index = index
-}
-
-// writeTo serializes the element to the writer w.
-func (e *Element) writeTo(w *bufio.Writer, s *WriteSettings) {
- w.WriteByte('<')
- w.WriteString(e.FullTag())
- for _, a := range e.Attr {
- w.WriteByte(' ')
- a.writeTo(w, s)
- }
- if len(e.Child) > 0 {
- w.WriteString(">")
- for _, c := range e.Child {
- c.writeTo(w, s)
- }
- w.Write([]byte{'<', '/'})
- w.WriteString(e.FullTag())
- w.WriteByte('>')
- } else {
- if s.CanonicalEndTags {
- w.Write([]byte{'>', '<', '/'})
- w.WriteString(e.FullTag())
- w.WriteByte('>')
- } else {
- w.Write([]byte{'/', '>'})
- }
- }
-}
-
-// addChild adds a child token to the element e.
-func (e *Element) addChild(t Token) {
- t.setIndex(len(e.Child))
- e.Child = append(e.Child, t)
-}
-
-// CreateAttr creates an attribute and adds it to element e. The key may be
-// prefixed by a namespace prefix and a colon. If an attribute with the key
-// already exists, its value is replaced.
-func (e *Element) CreateAttr(key, value string) *Attr {
- space, skey := spaceDecompose(key)
- return e.createAttr(space, skey, value, e)
-}
-
-// createAttr is a helper function that creates attributes.
-func (e *Element) createAttr(space, key, value string, parent *Element) *Attr {
- for i, a := range e.Attr {
- if space == a.Space && key == a.Key {
- e.Attr[i].Value = value
- return &e.Attr[i]
- }
- }
- a := Attr{
- Space: space,
- Key: key,
- Value: value,
- element: parent,
- }
- e.Attr = append(e.Attr, a)
- return &e.Attr[len(e.Attr)-1]
-}
-
-// RemoveAttr removes and returns a copy of the first attribute of the element
-// whose key matches the given key. The key may be prefixed by a namespace
-// prefix and a colon. If a matching attribute does not exist, nil is
-// returned.
-func (e *Element) RemoveAttr(key string) *Attr {
- space, skey := spaceDecompose(key)
- for i, a := range e.Attr {
- if space == a.Space && skey == a.Key {
- e.Attr = append(e.Attr[0:i], e.Attr[i+1:]...)
- return &Attr{
- Space: a.Space,
- Key: a.Key,
- Value: a.Value,
- element: nil,
- }
- }
- }
- return nil
-}
-
-// SortAttrs sorts the element's attributes lexicographically by key.
-func (e *Element) SortAttrs() {
- sort.Sort(byAttr(e.Attr))
-}
-
-type byAttr []Attr
-
-func (a byAttr) Len() int {
- return len(a)
-}
-
-func (a byAttr) Swap(i, j int) {
- a[i], a[j] = a[j], a[i]
-}
-
-func (a byAttr) Less(i, j int) bool {
- sp := strings.Compare(a[i].Space, a[j].Space)
- if sp == 0 {
- return strings.Compare(a[i].Key, a[j].Key) < 0
- }
- return sp < 0
-}
-
-// FullKey returns the attribute a's complete key, including namespace prefix
-// if present.
-func (a *Attr) FullKey() string {
- if a.Space == "" {
- return a.Key
- }
- return a.Space + ":" + a.Key
-}
-
-// Element returns the element containing the attribute.
-func (a *Attr) Element() *Element {
- return a.element
-}
-
-// NamespaceURI returns the XML namespace URI associated with the attribute.
-// If the element is part of the XML default namespace, NamespaceURI returns
-// the empty string.
-func (a *Attr) NamespaceURI() string {
- return a.element.NamespaceURI()
-}
-
-// writeTo serializes the attribute to the writer.
-func (a *Attr) writeTo(w *bufio.Writer, s *WriteSettings) {
- w.WriteString(a.FullKey())
- w.WriteString(`="`)
- var m escapeMode
- if s.CanonicalAttrVal {
- m = escapeCanonicalAttr
- } else {
- m = escapeNormal
- }
- escapeString(w, a.Value, m)
- w.WriteByte('"')
-}
-
-// NewText creates a parentless CharData token containing character data.
-func NewText(text string) *CharData {
- return newCharData(text, 0, nil)
-}
-
-// NewCData creates a parentless XML character CDATA section.
-func NewCData(data string) *CharData {
- return newCharData(data, cdataFlag, nil)
-}
-
-// NewCharData creates a parentless CharData token containing character data.
-//
-// Deprecated: NewCharData is deprecated. Instead, use NewText, which does the
-// same thing.
-func NewCharData(data string) *CharData {
- return newCharData(data, 0, nil)
-}
-
-// newCharData creates a character data token and binds it to a parent
-// element. If parent is nil, the CharData token remains unbound.
-func newCharData(data string, flags charDataFlags, parent *Element) *CharData {
- c := &CharData{
- Data: data,
- parent: parent,
- index: -1,
- flags: flags,
- }
- if parent != nil {
- parent.addChild(c)
- }
- return c
-}
-
-// CreateText creates a CharData token containing character data and adds it
-// as a child of element e.
-func (e *Element) CreateText(text string) *CharData {
- return newCharData(text, 0, e)
-}
-
-// CreateCData creates a CharData token containing a CDATA section and adds it
-// as a child of element e.
-func (e *Element) CreateCData(data string) *CharData {
- return newCharData(data, cdataFlag, e)
-}
-
-// CreateCharData creates a CharData token containing character data and adds
-// it as a child of element e.
-//
-// Deprecated: CreateCharData is deprecated. Instead, use CreateText, which
-// does the same thing.
-func (e *Element) CreateCharData(data string) *CharData {
- return newCharData(data, 0, e)
-}
-
-// dup duplicates the character data.
-func (c *CharData) dup(parent *Element) Token {
- return &CharData{
- Data: c.Data,
- flags: c.flags,
- parent: parent,
- index: c.index,
- }
-}
-
-// IsCData returns true if the character data token is to be encoded as a
-// CDATA section.
-func (c *CharData) IsCData() bool {
- return (c.flags & cdataFlag) != 0
-}
-
-// IsWhitespace returns true if the character data token was created by one of
-// the document Indent methods to contain only whitespace.
-func (c *CharData) IsWhitespace() bool {
- return (c.flags & whitespaceFlag) != 0
-}
-
-// Parent returns the character data token's parent element, or nil if it has
-// no parent.
-func (c *CharData) Parent() *Element {
- return c.parent
-}
-
-// Index returns the index of this CharData token within its parent element's
-// list of child tokens. If this CharData token has no parent element, the
-// index is -1.
-func (c *CharData) Index() int {
- return c.index
-}
-
-// setParent replaces the character data token's parent.
-func (c *CharData) setParent(parent *Element) {
- c.parent = parent
-}
-
-// setIndex sets the CharData token's index within its parent element's Child
-// slice.
-func (c *CharData) setIndex(index int) {
- c.index = index
-}
-
-// writeTo serializes character data to the writer.
-func (c *CharData) writeTo(w *bufio.Writer, s *WriteSettings) {
- if c.IsCData() {
- w.WriteString(``)
- } else {
- var m escapeMode
- if s.CanonicalText {
- m = escapeCanonicalText
- } else {
- m = escapeNormal
- }
- escapeString(w, c.Data, m)
- }
-}
-
-// NewComment creates a parentless XML comment.
-func NewComment(comment string) *Comment {
- return newComment(comment, nil)
-}
-
-// NewComment creates an XML comment and binds it to a parent element. If
-// parent is nil, the Comment remains unbound.
-func newComment(comment string, parent *Element) *Comment {
- c := &Comment{
- Data: comment,
- parent: parent,
- index: -1,
- }
- if parent != nil {
- parent.addChild(c)
- }
- return c
-}
-
-// CreateComment creates an XML comment and adds it as a child of element e.
-func (e *Element) CreateComment(comment string) *Comment {
- return newComment(comment, e)
-}
-
-// dup duplicates the comment.
-func (c *Comment) dup(parent *Element) Token {
- return &Comment{
- Data: c.Data,
- parent: parent,
- index: c.index,
- }
-}
-
-// Parent returns comment token's parent element, or nil if it has no parent.
-func (c *Comment) Parent() *Element {
- return c.parent
-}
-
-// Index returns the index of this Comment token within its parent element's
-// list of child tokens. If this Comment token has no parent element, the
-// index is -1.
-func (c *Comment) Index() int {
- return c.index
-}
-
-// setParent replaces the comment token's parent.
-func (c *Comment) setParent(parent *Element) {
- c.parent = parent
-}
-
-// setIndex sets the Comment token's index within its parent element's Child
-// slice.
-func (c *Comment) setIndex(index int) {
- c.index = index
-}
-
-// writeTo serialies the comment to the writer.
-func (c *Comment) writeTo(w *bufio.Writer, s *WriteSettings) {
- w.WriteString("")
-}
-
-// NewDirective creates a parentless XML directive.
-func NewDirective(data string) *Directive {
- return newDirective(data, nil)
-}
-
-// newDirective creates an XML directive and binds it to a parent element. If
-// parent is nil, the Directive remains unbound.
-func newDirective(data string, parent *Element) *Directive {
- d := &Directive{
- Data: data,
- parent: parent,
- index: -1,
- }
- if parent != nil {
- parent.addChild(d)
- }
- return d
-}
-
-// CreateDirective creates an XML directive and adds it as the last child of
-// element e.
-func (e *Element) CreateDirective(data string) *Directive {
- return newDirective(data, e)
-}
-
-// dup duplicates the directive.
-func (d *Directive) dup(parent *Element) Token {
- return &Directive{
- Data: d.Data,
- parent: parent,
- index: d.index,
- }
-}
-
-// Parent returns directive token's parent element, or nil if it has no
-// parent.
-func (d *Directive) Parent() *Element {
- return d.parent
-}
-
-// Index returns the index of this Directive token within its parent element's
-// list of child tokens. If this Directive token has no parent element, the
-// index is -1.
-func (d *Directive) Index() int {
- return d.index
-}
-
-// setParent replaces the directive token's parent.
-func (d *Directive) setParent(parent *Element) {
- d.parent = parent
-}
-
-// setIndex sets the Directive token's index within its parent element's Child
-// slice.
-func (d *Directive) setIndex(index int) {
- d.index = index
-}
-
-// writeTo serializes the XML directive to the writer.
-func (d *Directive) writeTo(w *bufio.Writer, s *WriteSettings) {
- w.WriteString("")
-}
-
-// NewProcInst creates a parentless XML processing instruction.
-func NewProcInst(target, inst string) *ProcInst {
- return newProcInst(target, inst, nil)
-}
-
-// newProcInst creates an XML processing instruction and binds it to a parent
-// element. If parent is nil, the ProcInst remains unbound.
-func newProcInst(target, inst string, parent *Element) *ProcInst {
- p := &ProcInst{
- Target: target,
- Inst: inst,
- parent: parent,
- index: -1,
- }
- if parent != nil {
- parent.addChild(p)
- }
- return p
-}
-
-// CreateProcInst creates a processing instruction and adds it as a child of
-// element e.
-func (e *Element) CreateProcInst(target, inst string) *ProcInst {
- return newProcInst(target, inst, e)
-}
-
-// dup duplicates the procinst.
-func (p *ProcInst) dup(parent *Element) Token {
- return &ProcInst{
- Target: p.Target,
- Inst: p.Inst,
- parent: parent,
- index: p.index,
- }
-}
-
-// Parent returns processing instruction token's parent element, or nil if it
-// has no parent.
-func (p *ProcInst) Parent() *Element {
- return p.parent
-}
-
-// Index returns the index of this ProcInst token within its parent element's
-// list of child tokens. If this ProcInst token has no parent element, the
-// index is -1.
-func (p *ProcInst) Index() int {
- return p.index
-}
-
-// setParent replaces the processing instruction token's parent.
-func (p *ProcInst) setParent(parent *Element) {
- p.parent = parent
-}
-
-// setIndex sets the processing instruction token's index within its parent
-// element's Child slice.
-func (p *ProcInst) setIndex(index int) {
- p.index = index
-}
-
-// writeTo serializes the processing instruction to the writer.
-func (p *ProcInst) writeTo(w *bufio.Writer, s *WriteSettings) {
- w.WriteString("")
- w.WriteString(p.Target)
- if p.Inst != "" {
- w.WriteByte(' ')
- w.WriteString(p.Inst)
- }
- w.WriteString("?>")
-}
diff --git a/vendor/github.com/beevik/etree/helpers.go b/vendor/github.com/beevik/etree/helpers.go
deleted file mode 100644
index 825e14e91..000000000
--- a/vendor/github.com/beevik/etree/helpers.go
+++ /dev/null
@@ -1,276 +0,0 @@
-// Copyright 2015-2019 Brett Vickers.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package etree
-
-import (
- "bufio"
- "io"
- "strings"
- "unicode/utf8"
-)
-
-// A simple stack
-type stack struct {
- data []interface{}
-}
-
-func (s *stack) empty() bool {
- return len(s.data) == 0
-}
-
-func (s *stack) push(value interface{}) {
- s.data = append(s.data, value)
-}
-
-func (s *stack) pop() interface{} {
- value := s.data[len(s.data)-1]
- s.data[len(s.data)-1] = nil
- s.data = s.data[:len(s.data)-1]
- return value
-}
-
-func (s *stack) peek() interface{} {
- return s.data[len(s.data)-1]
-}
-
-// A fifo is a simple first-in-first-out queue.
-type fifo struct {
- data []interface{}
- head, tail int
-}
-
-func (f *fifo) add(value interface{}) {
- if f.len()+1 >= len(f.data) {
- f.grow()
- }
- f.data[f.tail] = value
- if f.tail++; f.tail == len(f.data) {
- f.tail = 0
- }
-}
-
-func (f *fifo) remove() interface{} {
- value := f.data[f.head]
- f.data[f.head] = nil
- if f.head++; f.head == len(f.data) {
- f.head = 0
- }
- return value
-}
-
-func (f *fifo) len() int {
- if f.tail >= f.head {
- return f.tail - f.head
- }
- return len(f.data) - f.head + f.tail
-}
-
-func (f *fifo) grow() {
- c := len(f.data) * 2
- if c == 0 {
- c = 4
- }
- buf, count := make([]interface{}, c), f.len()
- if f.tail >= f.head {
- copy(buf[0:count], f.data[f.head:f.tail])
- } else {
- hindex := len(f.data) - f.head
- copy(buf[0:hindex], f.data[f.head:])
- copy(buf[hindex:count], f.data[:f.tail])
- }
- f.data, f.head, f.tail = buf, 0, count
-}
-
-// countReader implements a proxy reader that counts the number of
-// bytes read from its encapsulated reader.
-type countReader struct {
- r io.Reader
- bytes int64
-}
-
-func newCountReader(r io.Reader) *countReader {
- return &countReader{r: r}
-}
-
-func (cr *countReader) Read(p []byte) (n int, err error) {
- b, err := cr.r.Read(p)
- cr.bytes += int64(b)
- return b, err
-}
-
-// countWriter implements a proxy writer that counts the number of
-// bytes written by its encapsulated writer.
-type countWriter struct {
- w io.Writer
- bytes int64
-}
-
-func newCountWriter(w io.Writer) *countWriter {
- return &countWriter{w: w}
-}
-
-func (cw *countWriter) Write(p []byte) (n int, err error) {
- b, err := cw.w.Write(p)
- cw.bytes += int64(b)
- return b, err
-}
-
-// isWhitespace returns true if the byte slice contains only
-// whitespace characters.
-func isWhitespace(s string) bool {
- for i := 0; i < len(s); i++ {
- if c := s[i]; c != ' ' && c != '\t' && c != '\n' && c != '\r' {
- return false
- }
- }
- return true
-}
-
-// spaceMatch returns true if namespace a is the empty string
-// or if namespace a equals namespace b.
-func spaceMatch(a, b string) bool {
- switch {
- case a == "":
- return true
- default:
- return a == b
- }
-}
-
-// spaceDecompose breaks a namespace:tag identifier at the ':'
-// and returns the two parts.
-func spaceDecompose(str string) (space, key string) {
- colon := strings.IndexByte(str, ':')
- if colon == -1 {
- return "", str
- }
- return str[:colon], str[colon+1:]
-}
-
-// Strings used by indentCRLF and indentLF
-const (
- indentSpaces = "\r\n "
- indentTabs = "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
-)
-
-// indentCRLF returns a CRLF newline followed by n copies of the first
-// non-CRLF character in the source string.
-func indentCRLF(n int, source string) string {
- switch {
- case n < 0:
- return source[:2]
- case n < len(source)-1:
- return source[:n+2]
- default:
- return source + strings.Repeat(source[2:3], n-len(source)+2)
- }
-}
-
-// indentLF returns a LF newline followed by n copies of the first non-LF
-// character in the source string.
-func indentLF(n int, source string) string {
- switch {
- case n < 0:
- return source[1:2]
- case n < len(source)-1:
- return source[1 : n+2]
- default:
- return source[1:] + strings.Repeat(source[2:3], n-len(source)+2)
- }
-}
-
-// nextIndex returns the index of the next occurrence of sep in s,
-// starting from offset. It returns -1 if the sep string is not found.
-func nextIndex(s, sep string, offset int) int {
- switch i := strings.Index(s[offset:], sep); i {
- case -1:
- return -1
- default:
- return offset + i
- }
-}
-
-// isInteger returns true if the string s contains an integer.
-func isInteger(s string) bool {
- for i := 0; i < len(s); i++ {
- if (s[i] < '0' || s[i] > '9') && !(i == 0 && s[i] == '-') {
- return false
- }
- }
- return true
-}
-
-type escapeMode byte
-
-const (
- escapeNormal escapeMode = iota
- escapeCanonicalText
- escapeCanonicalAttr
-)
-
-// escapeString writes an escaped version of a string to the writer.
-func escapeString(w *bufio.Writer, s string, m escapeMode) {
- var esc []byte
- last := 0
- for i := 0; i < len(s); {
- r, width := utf8.DecodeRuneInString(s[i:])
- i += width
- switch r {
- case '&':
- esc = []byte("&")
- case '<':
- esc = []byte("<")
- case '>':
- if m == escapeCanonicalAttr {
- continue
- }
- esc = []byte(">")
- case '\'':
- if m != escapeNormal {
- continue
- }
- esc = []byte("'")
- case '"':
- if m == escapeCanonicalText {
- continue
- }
- esc = []byte(""")
- case '\t':
- if m != escapeCanonicalAttr {
- continue
- }
- esc = []byte(" ")
- case '\n':
- if m != escapeCanonicalAttr {
- continue
- }
- esc = []byte("
")
- case '\r':
- if m == escapeNormal {
- continue
- }
- esc = []byte("
")
- default:
- if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) {
- esc = []byte("\uFFFD")
- break
- }
- continue
- }
- w.WriteString(s[last : i-width])
- w.Write(esc)
- last = i
- }
- w.WriteString(s[last:])
-}
-
-func isInCharacterRange(r rune) bool {
- return r == 0x09 ||
- r == 0x0A ||
- r == 0x0D ||
- r >= 0x20 && r <= 0xD7FF ||
- r >= 0xE000 && r <= 0xFFFD ||
- r >= 0x10000 && r <= 0x10FFFF
-}
diff --git a/vendor/github.com/beevik/etree/path.go b/vendor/github.com/beevik/etree/path.go
deleted file mode 100644
index 82db0ac55..000000000
--- a/vendor/github.com/beevik/etree/path.go
+++ /dev/null
@@ -1,582 +0,0 @@
-// Copyright 2015-2019 Brett Vickers.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package etree
-
-import (
- "strconv"
- "strings"
-)
-
-/*
-A Path is a string that represents a search path through an etree starting
-from the document root or an arbitrary element. Paths are used with the
-Element object's Find* methods to locate and return desired elements.
-
-A Path consists of a series of slash-separated "selectors", each of which may
-be modified by one or more bracket-enclosed "filters". Selectors are used to
-traverse the etree from element to element, while filters are used to narrow
-the list of candidate elements at each node.
-
-Although etree Path strings are similar to XPath strings
-(https://www.w3.org/TR/1999/REC-xpath-19991116/), they have a more limited set
-of selectors and filtering options.
-
-The following selectors are supported by etree Path strings:
-
- . Select the current element.
- .. Select the parent of the current element.
- * Select all child elements of the current element.
- / Select the root element when used at the start of a path.
- // Select all descendants of the current element.
- tag Select all child elements with a name matching the tag.
-
-The following basic filters are supported by etree Path strings:
-
- [@attrib] Keep elements with an attribute named attrib.
- [@attrib='val'] Keep elements with an attribute named attrib and value matching val.
- [tag] Keep elements with a child element named tag.
- [tag='val'] Keep elements with a child element named tag and text matching val.
- [n] Keep the n-th element, where n is a numeric index starting from 1.
-
-The following function filters are also supported:
-
- [text()] Keep elements with non-empty text.
- [text()='val'] Keep elements whose text matches val.
- [local-name()='val'] Keep elements whose un-prefixed tag matches val.
- [name()='val'] Keep elements whose full tag exactly matches val.
- [namespace-prefix()='val'] Keep elements whose namespace prefix matches val.
- [namespace-uri()='val'] Keep elements whose namespace URI matches val.
-
-Here are some examples of Path strings:
-
-- Select the bookstore child element of the root element:
- /bookstore
-
-- Beginning from the root element, select the title elements of all
-descendant book elements having a 'category' attribute of 'WEB':
- //book[@category='WEB']/title
-
-- Beginning from the current element, select the first descendant
-book element with a title child element containing the text 'Great
-Expectations':
- .//book[title='Great Expectations'][1]
-
-- Beginning from the current element, select all child elements of
-book elements with an attribute 'language' set to 'english':
- ./book/*[@language='english']
-
-- Beginning from the current element, select all child elements of
-book elements containing the text 'special':
- ./book/*[text()='special']
-
-- Beginning from the current element, select all descendant book
-elements whose title child element has a 'language' attribute of 'french':
- .//book/title[@language='french']/..
-
-- Beginning from the current element, select all book elements
-belonging to the http://www.w3.org/TR/html4/ namespace:
- .//book[namespace-uri()='http://www.w3.org/TR/html4/']
-
-*/
-type Path struct {
- segments []segment
-}
-
-// ErrPath is returned by path functions when an invalid etree path is provided.
-type ErrPath string
-
-// Error returns the string describing a path error.
-func (err ErrPath) Error() string {
- return "etree: " + string(err)
-}
-
-// CompilePath creates an optimized version of an XPath-like string that
-// can be used to query elements in an element tree.
-func CompilePath(path string) (Path, error) {
- var comp compiler
- segments := comp.parsePath(path)
- if comp.err != ErrPath("") {
- return Path{nil}, comp.err
- }
- return Path{segments}, nil
-}
-
-// MustCompilePath creates an optimized version of an XPath-like string that
-// can be used to query elements in an element tree. Panics if an error
-// occurs. Use this function to create Paths when you know the path is
-// valid (i.e., if it's hard-coded).
-func MustCompilePath(path string) Path {
- p, err := CompilePath(path)
- if err != nil {
- panic(err)
- }
- return p
-}
-
-// A segment is a portion of a path between "/" characters.
-// It contains one selector and zero or more [filters].
-type segment struct {
- sel selector
- filters []filter
-}
-
-func (seg *segment) apply(e *Element, p *pather) {
- seg.sel.apply(e, p)
- for _, f := range seg.filters {
- f.apply(p)
- }
-}
-
-// A selector selects XML elements for consideration by the
-// path traversal.
-type selector interface {
- apply(e *Element, p *pather)
-}
-
-// A filter pares down a list of candidate XML elements based
-// on a path filter in [brackets].
-type filter interface {
- apply(p *pather)
-}
-
-// A pather is helper object that traverses an element tree using
-// a Path object. It collects and deduplicates all elements matching
-// the path query.
-type pather struct {
- queue fifo
- results []*Element
- inResults map[*Element]bool
- candidates []*Element
- scratch []*Element // used by filters
-}
-
-// A node represents an element and the remaining path segments that
-// should be applied against it by the pather.
-type node struct {
- e *Element
- segments []segment
-}
-
-func newPather() *pather {
- return &pather{
- results: make([]*Element, 0),
- inResults: make(map[*Element]bool),
- candidates: make([]*Element, 0),
- scratch: make([]*Element, 0),
- }
-}
-
-// traverse follows the path from the element e, collecting
-// and then returning all elements that match the path's selectors
-// and filters.
-func (p *pather) traverse(e *Element, path Path) []*Element {
- for p.queue.add(node{e, path.segments}); p.queue.len() > 0; {
- p.eval(p.queue.remove().(node))
- }
- return p.results
-}
-
-// eval evalutes the current path node by applying the remaining
-// path's selector rules against the node's element.
-func (p *pather) eval(n node) {
- p.candidates = p.candidates[0:0]
- seg, remain := n.segments[0], n.segments[1:]
- seg.apply(n.e, p)
-
- if len(remain) == 0 {
- for _, c := range p.candidates {
- if in := p.inResults[c]; !in {
- p.inResults[c] = true
- p.results = append(p.results, c)
- }
- }
- } else {
- for _, c := range p.candidates {
- p.queue.add(node{c, remain})
- }
- }
-}
-
-// A compiler generates a compiled path from a path string.
-type compiler struct {
- err ErrPath
-}
-
-// parsePath parses an XPath-like string describing a path
-// through an element tree and returns a slice of segment
-// descriptors.
-func (c *compiler) parsePath(path string) []segment {
- // If path ends with //, fix it
- if strings.HasSuffix(path, "//") {
- path = path + "*"
- }
-
- var segments []segment
-
- // Check for an absolute path
- if strings.HasPrefix(path, "/") {
- segments = append(segments, segment{new(selectRoot), []filter{}})
- path = path[1:]
- }
-
- // Split path into segments
- for _, s := range splitPath(path) {
- segments = append(segments, c.parseSegment(s))
- if c.err != ErrPath("") {
- break
- }
- }
- return segments
-}
-
-func splitPath(path string) []string {
- pieces := make([]string, 0)
- start := 0
- inquote := false
- for i := 0; i+1 <= len(path); i++ {
- if path[i] == '\'' {
- inquote = !inquote
- } else if path[i] == '/' && !inquote {
- pieces = append(pieces, path[start:i])
- start = i + 1
- }
- }
- return append(pieces, path[start:])
-}
-
-// parseSegment parses a path segment between / characters.
-func (c *compiler) parseSegment(path string) segment {
- pieces := strings.Split(path, "[")
- seg := segment{
- sel: c.parseSelector(pieces[0]),
- filters: []filter{},
- }
- for i := 1; i < len(pieces); i++ {
- fpath := pieces[i]
- if fpath[len(fpath)-1] != ']' {
- c.err = ErrPath("path has invalid filter [brackets].")
- break
- }
- seg.filters = append(seg.filters, c.parseFilter(fpath[:len(fpath)-1]))
- }
- return seg
-}
-
-// parseSelector parses a selector at the start of a path segment.
-func (c *compiler) parseSelector(path string) selector {
- switch path {
- case ".":
- return new(selectSelf)
- case "..":
- return new(selectParent)
- case "*":
- return new(selectChildren)
- case "":
- return new(selectDescendants)
- default:
- return newSelectChildrenByTag(path)
- }
-}
-
-var fnTable = map[string]struct {
- hasFn func(e *Element) bool
- getValFn func(e *Element) string
-}{
- "local-name": {nil, (*Element).name},
- "name": {nil, (*Element).FullTag},
- "namespace-prefix": {nil, (*Element).namespacePrefix},
- "namespace-uri": {nil, (*Element).NamespaceURI},
- "text": {(*Element).hasText, (*Element).Text},
-}
-
-// parseFilter parses a path filter contained within [brackets].
-func (c *compiler) parseFilter(path string) filter {
- if len(path) == 0 {
- c.err = ErrPath("path contains an empty filter expression.")
- return nil
- }
-
- // Filter contains [@attr='val'], [fn()='val'], or [tag='val']?
- eqindex := strings.Index(path, "='")
- if eqindex >= 0 {
- rindex := nextIndex(path, "'", eqindex+2)
- if rindex != len(path)-1 {
- c.err = ErrPath("path has mismatched filter quotes.")
- return nil
- }
-
- key := path[:eqindex]
- value := path[eqindex+2 : rindex]
-
- switch {
- case key[0] == '@':
- return newFilterAttrVal(key[1:], value)
- case strings.HasSuffix(key, "()"):
- fn := key[:len(key)-2]
- if t, ok := fnTable[fn]; ok && t.getValFn != nil {
- return newFilterFuncVal(t.getValFn, value)
- }
- c.err = ErrPath("path has unknown function " + fn)
- return nil
- default:
- return newFilterChildText(key, value)
- }
- }
-
- // Filter contains [@attr], [N], [tag] or [fn()]
- switch {
- case path[0] == '@':
- return newFilterAttr(path[1:])
- case strings.HasSuffix(path, "()"):
- fn := path[:len(path)-2]
- if t, ok := fnTable[fn]; ok && t.hasFn != nil {
- return newFilterFunc(t.hasFn)
- }
- c.err = ErrPath("path has unknown function " + fn)
- return nil
- case isInteger(path):
- pos, _ := strconv.Atoi(path)
- switch {
- case pos > 0:
- return newFilterPos(pos - 1)
- default:
- return newFilterPos(pos)
- }
- default:
- return newFilterChild(path)
- }
-}
-
-// selectSelf selects the current element into the candidate list.
-type selectSelf struct{}
-
-func (s *selectSelf) apply(e *Element, p *pather) {
- p.candidates = append(p.candidates, e)
-}
-
-// selectRoot selects the element's root node.
-type selectRoot struct{}
-
-func (s *selectRoot) apply(e *Element, p *pather) {
- root := e
- for root.parent != nil {
- root = root.parent
- }
- p.candidates = append(p.candidates, root)
-}
-
-// selectParent selects the element's parent into the candidate list.
-type selectParent struct{}
-
-func (s *selectParent) apply(e *Element, p *pather) {
- if e.parent != nil {
- p.candidates = append(p.candidates, e.parent)
- }
-}
-
-// selectChildren selects the element's child elements into the
-// candidate list.
-type selectChildren struct{}
-
-func (s *selectChildren) apply(e *Element, p *pather) {
- for _, c := range e.Child {
- if c, ok := c.(*Element); ok {
- p.candidates = append(p.candidates, c)
- }
- }
-}
-
-// selectDescendants selects all descendant child elements
-// of the element into the candidate list.
-type selectDescendants struct{}
-
-func (s *selectDescendants) apply(e *Element, p *pather) {
- var queue fifo
- for queue.add(e); queue.len() > 0; {
- e := queue.remove().(*Element)
- p.candidates = append(p.candidates, e)
- for _, c := range e.Child {
- if c, ok := c.(*Element); ok {
- queue.add(c)
- }
- }
- }
-}
-
-// selectChildrenByTag selects into the candidate list all child
-// elements of the element having the specified tag.
-type selectChildrenByTag struct {
- space, tag string
-}
-
-func newSelectChildrenByTag(path string) *selectChildrenByTag {
- s, l := spaceDecompose(path)
- return &selectChildrenByTag{s, l}
-}
-
-func (s *selectChildrenByTag) apply(e *Element, p *pather) {
- for _, c := range e.Child {
- if c, ok := c.(*Element); ok && spaceMatch(s.space, c.Space) && s.tag == c.Tag {
- p.candidates = append(p.candidates, c)
- }
- }
-}
-
-// filterPos filters the candidate list, keeping only the
-// candidate at the specified index.
-type filterPos struct {
- index int
-}
-
-func newFilterPos(pos int) *filterPos {
- return &filterPos{pos}
-}
-
-func (f *filterPos) apply(p *pather) {
- if f.index >= 0 {
- if f.index < len(p.candidates) {
- p.scratch = append(p.scratch, p.candidates[f.index])
- }
- } else {
- if -f.index <= len(p.candidates) {
- p.scratch = append(p.scratch, p.candidates[len(p.candidates)+f.index])
- }
- }
- p.candidates, p.scratch = p.scratch, p.candidates[0:0]
-}
-
-// filterAttr filters the candidate list for elements having
-// the specified attribute.
-type filterAttr struct {
- space, key string
-}
-
-func newFilterAttr(str string) *filterAttr {
- s, l := spaceDecompose(str)
- return &filterAttr{s, l}
-}
-
-func (f *filterAttr) apply(p *pather) {
- for _, c := range p.candidates {
- for _, a := range c.Attr {
- if spaceMatch(f.space, a.Space) && f.key == a.Key {
- p.scratch = append(p.scratch, c)
- break
- }
- }
- }
- p.candidates, p.scratch = p.scratch, p.candidates[0:0]
-}
-
-// filterAttrVal filters the candidate list for elements having
-// the specified attribute with the specified value.
-type filterAttrVal struct {
- space, key, val string
-}
-
-func newFilterAttrVal(str, value string) *filterAttrVal {
- s, l := spaceDecompose(str)
- return &filterAttrVal{s, l, value}
-}
-
-func (f *filterAttrVal) apply(p *pather) {
- for _, c := range p.candidates {
- for _, a := range c.Attr {
- if spaceMatch(f.space, a.Space) && f.key == a.Key && f.val == a.Value {
- p.scratch = append(p.scratch, c)
- break
- }
- }
- }
- p.candidates, p.scratch = p.scratch, p.candidates[0:0]
-}
-
-// filterFunc filters the candidate list for elements satisfying a custom
-// boolean function.
-type filterFunc struct {
- fn func(e *Element) bool
-}
-
-func newFilterFunc(fn func(e *Element) bool) *filterFunc {
- return &filterFunc{fn}
-}
-
-func (f *filterFunc) apply(p *pather) {
- for _, c := range p.candidates {
- if f.fn(c) {
- p.scratch = append(p.scratch, c)
- }
- }
- p.candidates, p.scratch = p.scratch, p.candidates[0:0]
-}
-
-// filterFuncVal filters the candidate list for elements containing a value
-// matching the result of a custom function.
-type filterFuncVal struct {
- fn func(e *Element) string
- val string
-}
-
-func newFilterFuncVal(fn func(e *Element) string, value string) *filterFuncVal {
- return &filterFuncVal{fn, value}
-}
-
-func (f *filterFuncVal) apply(p *pather) {
- for _, c := range p.candidates {
- if f.fn(c) == f.val {
- p.scratch = append(p.scratch, c)
- }
- }
- p.candidates, p.scratch = p.scratch, p.candidates[0:0]
-}
-
-// filterChild filters the candidate list for elements having
-// a child element with the specified tag.
-type filterChild struct {
- space, tag string
-}
-
-func newFilterChild(str string) *filterChild {
- s, l := spaceDecompose(str)
- return &filterChild{s, l}
-}
-
-func (f *filterChild) apply(p *pather) {
- for _, c := range p.candidates {
- for _, cc := range c.Child {
- if cc, ok := cc.(*Element); ok &&
- spaceMatch(f.space, cc.Space) &&
- f.tag == cc.Tag {
- p.scratch = append(p.scratch, c)
- }
- }
- }
- p.candidates, p.scratch = p.scratch, p.candidates[0:0]
-}
-
-// filterChildText filters the candidate list for elements having
-// a child element with the specified tag and text.
-type filterChildText struct {
- space, tag, text string
-}
-
-func newFilterChildText(str, text string) *filterChildText {
- s, l := spaceDecompose(str)
- return &filterChildText{s, l, text}
-}
-
-func (f *filterChildText) apply(p *pather) {
- for _, c := range p.candidates {
- for _, cc := range c.Child {
- if cc, ok := cc.(*Element); ok &&
- spaceMatch(f.space, cc.Space) &&
- f.tag == cc.Tag &&
- f.text == cc.Text() {
- p.scratch = append(p.scratch, c)
- }
- }
- }
- p.candidates, p.scratch = p.scratch, p.candidates[0:0]
-}
diff --git a/vendor/github.com/beorn7/perks/LICENSE b/vendor/github.com/beorn7/perks/LICENSE
deleted file mode 100644
index 339177be6..000000000
--- a/vendor/github.com/beorn7/perks/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (C) 2013 Blake Mizerany
-
-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/beorn7/perks/quantile/exampledata.txt b/vendor/github.com/beorn7/perks/quantile/exampledata.txt
deleted file mode 100644
index 1602287d7..000000000
--- a/vendor/github.com/beorn7/perks/quantile/exampledata.txt
+++ /dev/null
@@ -1,2388 +0,0 @@
-8
-5
-26
-12
-5
-235
-13
-6
-28
-30
-3
-3
-3
-3
-5
-2
-33
-7
-2
-4
-7
-12
-14
-5
-8
-3
-10
-4
-5
-3
-6
-6
-209
-20
-3
-10
-14
-3
-4
-6
-8
-5
-11
-7
-3
-2
-3
-3
-212
-5
-222
-4
-10
-10
-5
-6
-3
-8
-3
-10
-254
-220
-2
-3
-5
-24
-5
-4
-222
-7
-3
-3
-223
-8
-15
-12
-14
-14
-3
-2
-2
-3
-13
-3
-11
-4
-4
-6
-5
-7
-13
-5
-3
-5
-2
-5
-3
-5
-2
-7
-15
-17
-14
-3
-6
-6
-3
-17
-5
-4
-7
-6
-4
-4
-8
-6
-8
-3
-9
-3
-6
-3
-4
-5
-3
-3
-660
-4
-6
-10
-3
-6
-3
-2
-5
-13
-2
-4
-4
-10
-4
-8
-4
-3
-7
-9
-9
-3
-10
-37
-3
-13
-4
-12
-3
-6
-10
-8
-5
-21
-2
-3
-8
-3
-2
-3
-3
-4
-12
-2
-4
-8
-8
-4
-3
-2
-20
-1
-6
-32
-2
-11
-6
-18
-3
-8
-11
-3
-212
-3
-4
-2
-6
-7
-12
-11
-3
-2
-16
-10
-6
-4
-6
-3
-2
-7
-3
-2
-2
-2
-2
-5
-6
-4
-3
-10
-3
-4
-6
-5
-3
-4
-4
-5
-6
-4
-3
-4
-4
-5
-7
-5
-5
-3
-2
-7
-2
-4
-12
-4
-5
-6
-2
-4
-4
-8
-4
-15
-13
-7
-16
-5
-3
-23
-5
-5
-7
-3
-2
-9
-8
-7
-5
-8
-11
-4
-10
-76
-4
-47
-4
-3
-2
-7
-4
-2
-3
-37
-10
-4
-2
-20
-5
-4
-4
-10
-10
-4
-3
-7
-23
-240
-7
-13
-5
-5
-3
-3
-2
-5
-4
-2
-8
-7
-19
-2
-23
-8
-7
-2
-5
-3
-8
-3
-8
-13
-5
-5
-5
-2
-3
-23
-4
-9
-8
-4
-3
-3
-5
-220
-2
-3
-4
-6
-14
-3
-53
-6
-2
-5
-18
-6
-3
-219
-6
-5
-2
-5
-3
-6
-5
-15
-4
-3
-17
-3
-2
-4
-7
-2
-3
-3
-4
-4
-3
-2
-664
-6
-3
-23
-5
-5
-16
-5
-8
-2
-4
-2
-24
-12
-3
-2
-3
-5
-8
-3
-5
-4
-3
-14
-3
-5
-8
-2
-3
-7
-9
-4
-2
-3
-6
-8
-4
-3
-4
-6
-5
-3
-3
-6
-3
-19
-4
-4
-6
-3
-6
-3
-5
-22
-5
-4
-4
-3
-8
-11
-4
-9
-7
-6
-13
-4
-4
-4
-6
-17
-9
-3
-3
-3
-4
-3
-221
-5
-11
-3
-4
-2
-12
-6
-3
-5
-7
-5
-7
-4
-9
-7
-14
-37
-19
-217
-16
-3
-5
-2
-2
-7
-19
-7
-6
-7
-4
-24
-5
-11
-4
-7
-7
-9
-13
-3
-4
-3
-6
-28
-4
-4
-5
-5
-2
-5
-6
-4
-4
-6
-10
-5
-4
-3
-2
-3
-3
-6
-5
-5
-4
-3
-2
-3
-7
-4
-6
-18
-16
-8
-16
-4
-5
-8
-6
-9
-13
-1545
-6
-215
-6
-5
-6
-3
-45
-31
-5
-2
-2
-4
-3
-3
-2
-5
-4
-3
-5
-7
-7
-4
-5
-8
-5
-4
-749
-2
-31
-9
-11
-2
-11
-5
-4
-4
-7
-9
-11
-4
-5
-4
-7
-3
-4
-6
-2
-15
-3
-4
-3
-4
-3
-5
-2
-13
-5
-5
-3
-3
-23
-4
-4
-5
-7
-4
-13
-2
-4
-3
-4
-2
-6
-2
-7
-3
-5
-5
-3
-29
-5
-4
-4
-3
-10
-2
-3
-79
-16
-6
-6
-7
-7
-3
-5
-5
-7
-4
-3
-7
-9
-5
-6
-5
-9
-6
-3
-6
-4
-17
-2
-10
-9
-3
-6
-2
-3
-21
-22
-5
-11
-4
-2
-17
-2
-224
-2
-14
-3
-4
-4
-2
-4
-4
-4
-4
-5
-3
-4
-4
-10
-2
-6
-3
-3
-5
-7
-2
-7
-5
-6
-3
-218
-2
-2
-5
-2
-6
-3
-5
-222
-14
-6
-33
-3
-2
-5
-3
-3
-3
-9
-5
-3
-3
-2
-7
-4
-3
-4
-3
-5
-6
-5
-26
-4
-13
-9
-7
-3
-221
-3
-3
-4
-4
-4
-4
-2
-18
-5
-3
-7
-9
-6
-8
-3
-10
-3
-11
-9
-5
-4
-17
-5
-5
-6
-6
-3
-2
-4
-12
-17
-6
-7
-218
-4
-2
-4
-10
-3
-5
-15
-3
-9
-4
-3
-3
-6
-29
-3
-3
-4
-5
-5
-3
-8
-5
-6
-6
-7
-5
-3
-5
-3
-29
-2
-31
-5
-15
-24
-16
-5
-207
-4
-3
-3
-2
-15
-4
-4
-13
-5
-5
-4
-6
-10
-2
-7
-8
-4
-6
-20
-5
-3
-4
-3
-12
-12
-5
-17
-7
-3
-3
-3
-6
-10
-3
-5
-25
-80
-4
-9
-3
-2
-11
-3
-3
-2
-3
-8
-7
-5
-5
-19
-5
-3
-3
-12
-11
-2
-6
-5
-5
-5
-3
-3
-3
-4
-209
-14
-3
-2
-5
-19
-4
-4
-3
-4
-14
-5
-6
-4
-13
-9
-7
-4
-7
-10
-2
-9
-5
-7
-2
-8
-4
-6
-5
-5
-222
-8
-7
-12
-5
-216
-3
-4
-4
-6
-3
-14
-8
-7
-13
-4
-3
-3
-3
-3
-17
-5
-4
-3
-33
-6
-6
-33
-7
-5
-3
-8
-7
-5
-2
-9
-4
-2
-233
-24
-7
-4
-8
-10
-3
-4
-15
-2
-16
-3
-3
-13
-12
-7
-5
-4
-207
-4
-2
-4
-27
-15
-2
-5
-2
-25
-6
-5
-5
-6
-13
-6
-18
-6
-4
-12
-225
-10
-7
-5
-2
-2
-11
-4
-14
-21
-8
-10
-3
-5
-4
-232
-2
-5
-5
-3
-7
-17
-11
-6
-6
-23
-4
-6
-3
-5
-4
-2
-17
-3
-6
-5
-8
-3
-2
-2
-14
-9
-4
-4
-2
-5
-5
-3
-7
-6
-12
-6
-10
-3
-6
-2
-2
-19
-5
-4
-4
-9
-2
-4
-13
-3
-5
-6
-3
-6
-5
-4
-9
-6
-3
-5
-7
-3
-6
-6
-4
-3
-10
-6
-3
-221
-3
-5
-3
-6
-4
-8
-5
-3
-6
-4
-4
-2
-54
-5
-6
-11
-3
-3
-4
-4
-4
-3
-7
-3
-11
-11
-7
-10
-6
-13
-223
-213
-15
-231
-7
-3
-7
-228
-2
-3
-4
-4
-5
-6
-7
-4
-13
-3
-4
-5
-3
-6
-4
-6
-7
-2
-4
-3
-4
-3
-3
-6
-3
-7
-3
-5
-18
-5
-6
-8
-10
-3
-3
-3
-2
-4
-2
-4
-4
-5
-6
-6
-4
-10
-13
-3
-12
-5
-12
-16
-8
-4
-19
-11
-2
-4
-5
-6
-8
-5
-6
-4
-18
-10
-4
-2
-216
-6
-6
-6
-2
-4
-12
-8
-3
-11
-5
-6
-14
-5
-3
-13
-4
-5
-4
-5
-3
-28
-6
-3
-7
-219
-3
-9
-7
-3
-10
-6
-3
-4
-19
-5
-7
-11
-6
-15
-19
-4
-13
-11
-3
-7
-5
-10
-2
-8
-11
-2
-6
-4
-6
-24
-6
-3
-3
-3
-3
-6
-18
-4
-11
-4
-2
-5
-10
-8
-3
-9
-5
-3
-4
-5
-6
-2
-5
-7
-4
-4
-14
-6
-4
-4
-5
-5
-7
-2
-4
-3
-7
-3
-3
-6
-4
-5
-4
-4
-4
-3
-3
-3
-3
-8
-14
-2
-3
-5
-3
-2
-4
-5
-3
-7
-3
-3
-18
-3
-4
-4
-5
-7
-3
-3
-3
-13
-5
-4
-8
-211
-5
-5
-3
-5
-2
-5
-4
-2
-655
-6
-3
-5
-11
-2
-5
-3
-12
-9
-15
-11
-5
-12
-217
-2
-6
-17
-3
-3
-207
-5
-5
-4
-5
-9
-3
-2
-8
-5
-4
-3
-2
-5
-12
-4
-14
-5
-4
-2
-13
-5
-8
-4
-225
-4
-3
-4
-5
-4
-3
-3
-6
-23
-9
-2
-6
-7
-233
-4
-4
-6
-18
-3
-4
-6
-3
-4
-4
-2
-3
-7
-4
-13
-227
-4
-3
-5
-4
-2
-12
-9
-17
-3
-7
-14
-6
-4
-5
-21
-4
-8
-9
-2
-9
-25
-16
-3
-6
-4
-7
-8
-5
-2
-3
-5
-4
-3
-3
-5
-3
-3
-3
-2
-3
-19
-2
-4
-3
-4
-2
-3
-4
-4
-2
-4
-3
-3
-3
-2
-6
-3
-17
-5
-6
-4
-3
-13
-5
-3
-3
-3
-4
-9
-4
-2
-14
-12
-4
-5
-24
-4
-3
-37
-12
-11
-21
-3
-4
-3
-13
-4
-2
-3
-15
-4
-11
-4
-4
-3
-8
-3
-4
-4
-12
-8
-5
-3
-3
-4
-2
-220
-3
-5
-223
-3
-3
-3
-10
-3
-15
-4
-241
-9
-7
-3
-6
-6
-23
-4
-13
-7
-3
-4
-7
-4
-9
-3
-3
-4
-10
-5
-5
-1
-5
-24
-2
-4
-5
-5
-6
-14
-3
-8
-2
-3
-5
-13
-13
-3
-5
-2
-3
-15
-3
-4
-2
-10
-4
-4
-4
-5
-5
-3
-5
-3
-4
-7
-4
-27
-3
-6
-4
-15
-3
-5
-6
-6
-5
-4
-8
-3
-9
-2
-6
-3
-4
-3
-7
-4
-18
-3
-11
-3
-3
-8
-9
-7
-24
-3
-219
-7
-10
-4
-5
-9
-12
-2
-5
-4
-4
-4
-3
-3
-19
-5
-8
-16
-8
-6
-22
-3
-23
-3
-242
-9
-4
-3
-3
-5
-7
-3
-3
-5
-8
-3
-7
-5
-14
-8
-10
-3
-4
-3
-7
-4
-6
-7
-4
-10
-4
-3
-11
-3
-7
-10
-3
-13
-6
-8
-12
-10
-5
-7
-9
-3
-4
-7
-7
-10
-8
-30
-9
-19
-4
-3
-19
-15
-4
-13
-3
-215
-223
-4
-7
-4
-8
-17
-16
-3
-7
-6
-5
-5
-4
-12
-3
-7
-4
-4
-13
-4
-5
-2
-5
-6
-5
-6
-6
-7
-10
-18
-23
-9
-3
-3
-6
-5
-2
-4
-2
-7
-3
-3
-2
-5
-5
-14
-10
-224
-6
-3
-4
-3
-7
-5
-9
-3
-6
-4
-2
-5
-11
-4
-3
-3
-2
-8
-4
-7
-4
-10
-7
-3
-3
-18
-18
-17
-3
-3
-3
-4
-5
-3
-3
-4
-12
-7
-3
-11
-13
-5
-4
-7
-13
-5
-4
-11
-3
-12
-3
-6
-4
-4
-21
-4
-6
-9
-5
-3
-10
-8
-4
-6
-4
-4
-6
-5
-4
-8
-6
-4
-6
-4
-4
-5
-9
-6
-3
-4
-2
-9
-3
-18
-2
-4
-3
-13
-3
-6
-6
-8
-7
-9
-3
-2
-16
-3
-4
-6
-3
-2
-33
-22
-14
-4
-9
-12
-4
-5
-6
-3
-23
-9
-4
-3
-5
-5
-3
-4
-5
-3
-5
-3
-10
-4
-5
-5
-8
-4
-4
-6
-8
-5
-4
-3
-4
-6
-3
-3
-3
-5
-9
-12
-6
-5
-9
-3
-5
-3
-2
-2
-2
-18
-3
-2
-21
-2
-5
-4
-6
-4
-5
-10
-3
-9
-3
-2
-10
-7
-3
-6
-6
-4
-4
-8
-12
-7
-3
-7
-3
-3
-9
-3
-4
-5
-4
-4
-5
-5
-10
-15
-4
-4
-14
-6
-227
-3
-14
-5
-216
-22
-5
-4
-2
-2
-6
-3
-4
-2
-9
-9
-4
-3
-28
-13
-11
-4
-5
-3
-3
-2
-3
-3
-5
-3
-4
-3
-5
-23
-26
-3
-4
-5
-6
-4
-6
-3
-5
-5
-3
-4
-3
-2
-2
-2
-7
-14
-3
-6
-7
-17
-2
-2
-15
-14
-16
-4
-6
-7
-13
-6
-4
-5
-6
-16
-3
-3
-28
-3
-6
-15
-3
-9
-2
-4
-6
-3
-3
-22
-4
-12
-6
-7
-2
-5
-4
-10
-3
-16
-6
-9
-2
-5
-12
-7
-5
-5
-5
-5
-2
-11
-9
-17
-4
-3
-11
-7
-3
-5
-15
-4
-3
-4
-211
-8
-7
-5
-4
-7
-6
-7
-6
-3
-6
-5
-6
-5
-3
-4
-4
-26
-4
-6
-10
-4
-4
-3
-2
-3
-3
-4
-5
-9
-3
-9
-4
-4
-5
-5
-8
-2
-4
-2
-3
-8
-4
-11
-19
-5
-8
-6
-3
-5
-6
-12
-3
-2
-4
-16
-12
-3
-4
-4
-8
-6
-5
-6
-6
-219
-8
-222
-6
-16
-3
-13
-19
-5
-4
-3
-11
-6
-10
-4
-7
-7
-12
-5
-3
-3
-5
-6
-10
-3
-8
-2
-5
-4
-7
-2
-4
-4
-2
-12
-9
-6
-4
-2
-40
-2
-4
-10
-4
-223
-4
-2
-20
-6
-7
-24
-5
-4
-5
-2
-20
-16
-6
-5
-13
-2
-3
-3
-19
-3
-2
-4
-5
-6
-7
-11
-12
-5
-6
-7
-7
-3
-5
-3
-5
-3
-14
-3
-4
-4
-2
-11
-1
-7
-3
-9
-6
-11
-12
-5
-8
-6
-221
-4
-2
-12
-4
-3
-15
-4
-5
-226
-7
-218
-7
-5
-4
-5
-18
-4
-5
-9
-4
-4
-2
-9
-18
-18
-9
-5
-6
-6
-3
-3
-7
-3
-5
-4
-4
-4
-12
-3
-6
-31
-5
-4
-7
-3
-6
-5
-6
-5
-11
-2
-2
-11
-11
-6
-7
-5
-8
-7
-10
-5
-23
-7
-4
-3
-5
-34
-2
-5
-23
-7
-3
-6
-8
-4
-4
-4
-2
-5
-3
-8
-5
-4
-8
-25
-2
-3
-17
-8
-3
-4
-8
-7
-3
-15
-6
-5
-7
-21
-9
-5
-6
-6
-5
-3
-2
-3
-10
-3
-6
-3
-14
-7
-4
-4
-8
-7
-8
-2
-6
-12
-4
-213
-6
-5
-21
-8
-2
-5
-23
-3
-11
-2
-3
-6
-25
-2
-3
-6
-7
-6
-6
-4
-4
-6
-3
-17
-9
-7
-6
-4
-3
-10
-7
-2
-3
-3
-3
-11
-8
-3
-7
-6
-4
-14
-36
-3
-4
-3
-3
-22
-13
-21
-4
-2
-7
-4
-4
-17
-15
-3
-7
-11
-2
-4
-7
-6
-209
-6
-3
-2
-2
-24
-4
-9
-4
-3
-3
-3
-29
-2
-2
-4
-3
-3
-5
-4
-6
-3
-3
-2
-4
diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go
deleted file mode 100644
index d7d14f8eb..000000000
--- a/vendor/github.com/beorn7/perks/quantile/stream.go
+++ /dev/null
@@ -1,316 +0,0 @@
-// Package quantile computes approximate quantiles over an unbounded data
-// stream within low memory and CPU bounds.
-//
-// A small amount of accuracy is traded to achieve the above properties.
-//
-// Multiple streams can be merged before calling Query to generate a single set
-// of results. This is meaningful when the streams represent the same type of
-// data. See Merge and Samples.
-//
-// For more detailed information about the algorithm used, see:
-//
-// Effective Computation of Biased Quantiles over Data Streams
-//
-// http://www.cs.rutgers.edu/~muthu/bquant.pdf
-package quantile
-
-import (
- "math"
- "sort"
-)
-
-// Sample holds an observed value and meta information for compression. JSON
-// tags have been added for convenience.
-type Sample struct {
- Value float64 `json:",string"`
- Width float64 `json:",string"`
- Delta float64 `json:",string"`
-}
-
-// Samples represents a slice of samples. It implements sort.Interface.
-type Samples []Sample
-
-func (a Samples) Len() int { return len(a) }
-func (a Samples) Less(i, j int) bool { return a[i].Value < a[j].Value }
-func (a Samples) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-
-type invariant func(s *stream, r float64) float64
-
-// NewLowBiased returns an initialized Stream for low-biased quantiles
-// (e.g. 0.01, 0.1, 0.5) where the needed quantiles are not known a priori, but
-// error guarantees can still be given even for the lower ranks of the data
-// distribution.
-//
-// The provided epsilon is a relative error, i.e. the true quantile of a value
-// returned by a query is guaranteed to be within (1±Epsilon)*Quantile.
-//
-// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error
-// properties.
-func NewLowBiased(epsilon float64) *Stream {
- ƒ := func(s *stream, r float64) float64 {
- return 2 * epsilon * r
- }
- return newStream(ƒ)
-}
-
-// NewHighBiased returns an initialized Stream for high-biased quantiles
-// (e.g. 0.01, 0.1, 0.5) where the needed quantiles are not known a priori, but
-// error guarantees can still be given even for the higher ranks of the data
-// distribution.
-//
-// The provided epsilon is a relative error, i.e. the true quantile of a value
-// returned by a query is guaranteed to be within 1-(1±Epsilon)*(1-Quantile).
-//
-// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error
-// properties.
-func NewHighBiased(epsilon float64) *Stream {
- ƒ := func(s *stream, r float64) float64 {
- return 2 * epsilon * (s.n - r)
- }
- return newStream(ƒ)
-}
-
-// NewTargeted returns an initialized Stream concerned with a particular set of
-// quantile values that are supplied a priori. Knowing these a priori reduces
-// space and computation time. The targets map maps the desired quantiles to
-// their absolute errors, i.e. the true quantile of a value returned by a query
-// is guaranteed to be within (Quantile±Epsilon).
-//
-// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties.
-func NewTargeted(targetMap map[float64]float64) *Stream {
- // Convert map to slice to avoid slow iterations on a map.
- // ƒ is called on the hot path, so converting the map to a slice
- // beforehand results in significant CPU savings.
- targets := targetMapToSlice(targetMap)
-
- ƒ := func(s *stream, r float64) float64 {
- var m = math.MaxFloat64
- var f float64
- for _, t := range targets {
- if t.quantile*s.n <= r {
- f = (2 * t.epsilon * r) / t.quantile
- } else {
- f = (2 * t.epsilon * (s.n - r)) / (1 - t.quantile)
- }
- if f < m {
- m = f
- }
- }
- return m
- }
- return newStream(ƒ)
-}
-
-type target struct {
- quantile float64
- epsilon float64
-}
-
-func targetMapToSlice(targetMap map[float64]float64) []target {
- targets := make([]target, 0, len(targetMap))
-
- for quantile, epsilon := range targetMap {
- t := target{
- quantile: quantile,
- epsilon: epsilon,
- }
- targets = append(targets, t)
- }
-
- return targets
-}
-
-// Stream computes quantiles for a stream of float64s. It is not thread-safe by
-// design. Take care when using across multiple goroutines.
-type Stream struct {
- *stream
- b Samples
- sorted bool
-}
-
-func newStream(ƒ invariant) *Stream {
- x := &stream{ƒ: ƒ}
- return &Stream{x, make(Samples, 0, 500), true}
-}
-
-// Insert inserts v into the stream.
-func (s *Stream) Insert(v float64) {
- s.insert(Sample{Value: v, Width: 1})
-}
-
-func (s *Stream) insert(sample Sample) {
- s.b = append(s.b, sample)
- s.sorted = false
- if len(s.b) == cap(s.b) {
- s.flush()
- }
-}
-
-// Query returns the computed qth percentiles value. If s was created with
-// NewTargeted, and q is not in the set of quantiles provided a priori, Query
-// will return an unspecified result.
-func (s *Stream) Query(q float64) float64 {
- if !s.flushed() {
- // Fast path when there hasn't been enough data for a flush;
- // this also yields better accuracy for small sets of data.
- l := len(s.b)
- if l == 0 {
- return 0
- }
- i := int(math.Ceil(float64(l) * q))
- if i > 0 {
- i -= 1
- }
- s.maybeSort()
- return s.b[i].Value
- }
- s.flush()
- return s.stream.query(q)
-}
-
-// Merge merges samples into the underlying streams samples. This is handy when
-// merging multiple streams from separate threads, database shards, etc.
-//
-// ATTENTION: This method is broken and does not yield correct results. The
-// underlying algorithm is not capable of merging streams correctly.
-func (s *Stream) Merge(samples Samples) {
- sort.Sort(samples)
- s.stream.merge(samples)
-}
-
-// Reset reinitializes and clears the list reusing the samples buffer memory.
-func (s *Stream) Reset() {
- s.stream.reset()
- s.b = s.b[:0]
-}
-
-// Samples returns stream samples held by s.
-func (s *Stream) Samples() Samples {
- if !s.flushed() {
- return s.b
- }
- s.flush()
- return s.stream.samples()
-}
-
-// Count returns the total number of samples observed in the stream
-// since initialization.
-func (s *Stream) Count() int {
- return len(s.b) + s.stream.count()
-}
-
-func (s *Stream) flush() {
- s.maybeSort()
- s.stream.merge(s.b)
- s.b = s.b[:0]
-}
-
-func (s *Stream) maybeSort() {
- if !s.sorted {
- s.sorted = true
- sort.Sort(s.b)
- }
-}
-
-func (s *Stream) flushed() bool {
- return len(s.stream.l) > 0
-}
-
-type stream struct {
- n float64
- l []Sample
- ƒ invariant
-}
-
-func (s *stream) reset() {
- s.l = s.l[:0]
- s.n = 0
-}
-
-func (s *stream) insert(v float64) {
- s.merge(Samples{{v, 1, 0}})
-}
-
-func (s *stream) merge(samples Samples) {
- // TODO(beorn7): This tries to merge not only individual samples, but
- // whole summaries. The paper doesn't mention merging summaries at
- // all. Unittests show that the merging is inaccurate. Find out how to
- // do merges properly.
- var r float64
- i := 0
- for _, sample := range samples {
- for ; i < len(s.l); i++ {
- c := s.l[i]
- if c.Value > sample.Value {
- // Insert at position i.
- s.l = append(s.l, Sample{})
- copy(s.l[i+1:], s.l[i:])
- s.l[i] = Sample{
- sample.Value,
- sample.Width,
- math.Max(sample.Delta, math.Floor(s.ƒ(s, r))-1),
- // TODO(beorn7): How to calculate delta correctly?
- }
- i++
- goto inserted
- }
- r += c.Width
- }
- s.l = append(s.l, Sample{sample.Value, sample.Width, 0})
- i++
- inserted:
- s.n += sample.Width
- r += sample.Width
- }
- s.compress()
-}
-
-func (s *stream) count() int {
- return int(s.n)
-}
-
-func (s *stream) query(q float64) float64 {
- t := math.Ceil(q * s.n)
- t += math.Ceil(s.ƒ(s, t) / 2)
- p := s.l[0]
- var r float64
- for _, c := range s.l[1:] {
- r += p.Width
- if r+c.Width+c.Delta > t {
- return p.Value
- }
- p = c
- }
- return p.Value
-}
-
-func (s *stream) compress() {
- if len(s.l) < 2 {
- return
- }
- x := s.l[len(s.l)-1]
- xi := len(s.l) - 1
- r := s.n - 1 - x.Width
-
- for i := len(s.l) - 2; i >= 0; i-- {
- c := s.l[i]
- if c.Width+x.Width+x.Delta <= s.ƒ(s, r) {
- x.Width += c.Width
- s.l[xi] = x
- // Remove element at i.
- copy(s.l[i:], s.l[i+1:])
- s.l = s.l[:len(s.l)-1]
- xi -= 1
- } else {
- x = c
- xi = i
- }
- r -= c.Width
- }
-}
-
-func (s *stream) samples() Samples {
- samples := make(Samples, len(s.l))
- copy(samples, s.l)
- return samples
-}
diff --git a/vendor/github.com/boombuler/barcode/.gitignore b/vendor/github.com/boombuler/barcode/.gitignore
deleted file mode 100644
index 1d74e2196..000000000
--- a/vendor/github.com/boombuler/barcode/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.vscode/
diff --git a/vendor/github.com/boombuler/barcode/LICENSE b/vendor/github.com/boombuler/barcode/LICENSE
deleted file mode 100644
index 862b0ddcd..000000000
--- a/vendor/github.com/boombuler/barcode/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Florian Sundermann
-
-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/boombuler/barcode/README.md b/vendor/github.com/boombuler/barcode/README.md
deleted file mode 100644
index 2a988db39..000000000
--- a/vendor/github.com/boombuler/barcode/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-[](https://gitter.im/golang-barcode/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-## Introduction ##
-
-This is a package for GO which can be used to create different types of barcodes.
-
-## Supported Barcode Types ##
-* 2 of 5
-* Aztec Code
-* Codabar
-* Code 128
-* Code 39
-* Code 93
-* Datamatrix
-* EAN 13
-* EAN 8
-* PDF 417
-* QR Code
-
-## Example ##
-
-This is a simple example on how to create a QR-Code and write it to a png-file
-```go
-package main
-
-import (
- "image/png"
- "os"
-
- "github.com/boombuler/barcode"
- "github.com/boombuler/barcode/qr"
-)
-
-func main() {
- // Create the barcode
- qrCode, _ := qr.Encode("Hello World", qr.M, qr.Auto)
-
- // Scale the barcode to 200x200 pixels
- qrCode, _ = barcode.Scale(qrCode, 200, 200)
-
- // create the output file
- file, _ := os.Create("qrcode.png")
- defer file.Close()
-
- // encode the barcode as png
- png.Encode(file, qrCode)
-}
-```
-
-## Documentation ##
-See [GoDoc](https://godoc.org/github.com/boombuler/barcode)
-
-To create a barcode use the Encode function from one of the subpackages.
diff --git a/vendor/github.com/boombuler/barcode/barcode.go b/vendor/github.com/boombuler/barcode/barcode.go
deleted file mode 100644
index 25f4a693d..000000000
--- a/vendor/github.com/boombuler/barcode/barcode.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package barcode
-
-import "image"
-
-const (
- TypeAztec = "Aztec"
- TypeCodabar = "Codabar"
- TypeCode128 = "Code 128"
- TypeCode39 = "Code 39"
- TypeCode93 = "Code 93"
- TypeDataMatrix = "DataMatrix"
- TypeEAN8 = "EAN 8"
- TypeEAN13 = "EAN 13"
- TypePDF = "PDF417"
- TypeQR = "QR Code"
- Type2of5 = "2 of 5"
- Type2of5Interleaved = "2 of 5 (interleaved)"
-)
-
-// Contains some meta information about a barcode
-type Metadata struct {
- // the name of the barcode kind
- CodeKind string
- // contains 1 for 1D barcodes or 2 for 2D barcodes
- Dimensions byte
-}
-
-// a rendered and encoded barcode
-type Barcode interface {
- image.Image
- // returns some meta information about the barcode
- Metadata() Metadata
- // the data that was encoded in this barcode
- Content() string
-}
-
-// Additional interface that some barcodes might implement to provide
-// the value of its checksum.
-type BarcodeIntCS interface {
- Barcode
- CheckSum() int
-}
diff --git a/vendor/github.com/boombuler/barcode/go.mod b/vendor/github.com/boombuler/barcode/go.mod
deleted file mode 100644
index ed53593b9..000000000
--- a/vendor/github.com/boombuler/barcode/go.mod
+++ /dev/null
@@ -1 +0,0 @@
-module github.com/boombuler/barcode
diff --git a/vendor/github.com/boombuler/barcode/qr/alphanumeric.go b/vendor/github.com/boombuler/barcode/qr/alphanumeric.go
deleted file mode 100644
index 4ded7c8e0..000000000
--- a/vendor/github.com/boombuler/barcode/qr/alphanumeric.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package qr
-
-import (
- "errors"
- "fmt"
- "strings"
-
- "github.com/boombuler/barcode/utils"
-)
-
-const charSet string = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"
-
-func stringToAlphaIdx(content string) <-chan int {
- result := make(chan int)
- go func() {
- for _, r := range content {
- idx := strings.IndexRune(charSet, r)
- result <- idx
- if idx < 0 {
- break
- }
- }
- close(result)
- }()
-
- return result
-}
-
-func encodeAlphaNumeric(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) {
-
- contentLenIsOdd := len(content)%2 == 1
- contentBitCount := (len(content) / 2) * 11
- if contentLenIsOdd {
- contentBitCount += 6
- }
- vi := findSmallestVersionInfo(ecl, alphaNumericMode, contentBitCount)
- if vi == nil {
- return nil, nil, errors.New("To much data to encode")
- }
-
- res := new(utils.BitList)
- res.AddBits(int(alphaNumericMode), 4)
- res.AddBits(len(content), vi.charCountBits(alphaNumericMode))
-
- encoder := stringToAlphaIdx(content)
-
- for idx := 0; idx < len(content)/2; idx++ {
- c1 := <-encoder
- c2 := <-encoder
- if c1 < 0 || c2 < 0 {
- return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, AlphaNumeric)
- }
- res.AddBits(c1*45+c2, 11)
- }
- if contentLenIsOdd {
- c := <-encoder
- if c < 0 {
- return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, AlphaNumeric)
- }
- res.AddBits(c, 6)
- }
-
- addPaddingAndTerminator(res, vi)
-
- return res, vi, nil
-}
diff --git a/vendor/github.com/boombuler/barcode/qr/automatic.go b/vendor/github.com/boombuler/barcode/qr/automatic.go
deleted file mode 100644
index e7c56013f..000000000
--- a/vendor/github.com/boombuler/barcode/qr/automatic.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package qr
-
-import (
- "fmt"
-
- "github.com/boombuler/barcode/utils"
-)
-
-func encodeAuto(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) {
- bits, vi, _ := Numeric.getEncoder()(content, ecl)
- if bits != nil && vi != nil {
- return bits, vi, nil
- }
- bits, vi, _ = AlphaNumeric.getEncoder()(content, ecl)
- if bits != nil && vi != nil {
- return bits, vi, nil
- }
- bits, vi, _ = Unicode.getEncoder()(content, ecl)
- if bits != nil && vi != nil {
- return bits, vi, nil
- }
- return nil, nil, fmt.Errorf("No encoding found to encode \"%s\"", content)
-}
diff --git a/vendor/github.com/boombuler/barcode/qr/blocks.go b/vendor/github.com/boombuler/barcode/qr/blocks.go
deleted file mode 100644
index d3173787f..000000000
--- a/vendor/github.com/boombuler/barcode/qr/blocks.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package qr
-
-type block struct {
- data []byte
- ecc []byte
-}
-type blockList []*block
-
-func splitToBlocks(data <-chan byte, vi *versionInfo) blockList {
- result := make(blockList, vi.NumberOfBlocksInGroup1+vi.NumberOfBlocksInGroup2)
-
- for b := 0; b < int(vi.NumberOfBlocksInGroup1); b++ {
- blk := new(block)
- blk.data = make([]byte, vi.DataCodeWordsPerBlockInGroup1)
- for cw := 0; cw < int(vi.DataCodeWordsPerBlockInGroup1); cw++ {
- blk.data[cw] = <-data
- }
- blk.ecc = ec.calcECC(blk.data, vi.ErrorCorrectionCodewordsPerBlock)
- result[b] = blk
- }
-
- for b := 0; b < int(vi.NumberOfBlocksInGroup2); b++ {
- blk := new(block)
- blk.data = make([]byte, vi.DataCodeWordsPerBlockInGroup2)
- for cw := 0; cw < int(vi.DataCodeWordsPerBlockInGroup2); cw++ {
- blk.data[cw] = <-data
- }
- blk.ecc = ec.calcECC(blk.data, vi.ErrorCorrectionCodewordsPerBlock)
- result[int(vi.NumberOfBlocksInGroup1)+b] = blk
- }
-
- return result
-}
-
-func (bl blockList) interleave(vi *versionInfo) []byte {
- var maxCodewordCount int
- if vi.DataCodeWordsPerBlockInGroup1 > vi.DataCodeWordsPerBlockInGroup2 {
- maxCodewordCount = int(vi.DataCodeWordsPerBlockInGroup1)
- } else {
- maxCodewordCount = int(vi.DataCodeWordsPerBlockInGroup2)
- }
- resultLen := (vi.DataCodeWordsPerBlockInGroup1+vi.ErrorCorrectionCodewordsPerBlock)*vi.NumberOfBlocksInGroup1 +
- (vi.DataCodeWordsPerBlockInGroup2+vi.ErrorCorrectionCodewordsPerBlock)*vi.NumberOfBlocksInGroup2
-
- result := make([]byte, 0, resultLen)
- for i := 0; i < maxCodewordCount; i++ {
- for b := 0; b < len(bl); b++ {
- if len(bl[b].data) > i {
- result = append(result, bl[b].data[i])
- }
- }
- }
- for i := 0; i < int(vi.ErrorCorrectionCodewordsPerBlock); i++ {
- for b := 0; b < len(bl); b++ {
- result = append(result, bl[b].ecc[i])
- }
- }
- return result
-}
diff --git a/vendor/github.com/boombuler/barcode/qr/encoder.go b/vendor/github.com/boombuler/barcode/qr/encoder.go
deleted file mode 100644
index 2c6ab2111..000000000
--- a/vendor/github.com/boombuler/barcode/qr/encoder.go
+++ /dev/null
@@ -1,416 +0,0 @@
-// Package qr can be used to create QR barcodes.
-package qr
-
-import (
- "image"
-
- "github.com/boombuler/barcode"
- "github.com/boombuler/barcode/utils"
-)
-
-type encodeFn func(content string, eccLevel ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error)
-
-// Encoding mode for QR Codes.
-type Encoding byte
-
-const (
- // Auto will choose ths best matching encoding
- Auto Encoding = iota
- // Numeric encoding only encodes numbers [0-9]
- Numeric
- // AlphaNumeric encoding only encodes uppercase letters, numbers and [Space], $, %, *, +, -, ., /, :
- AlphaNumeric
- // Unicode encoding encodes the string as utf-8
- Unicode
- // only for testing purpose
- unknownEncoding
-)
-
-func (e Encoding) getEncoder() encodeFn {
- switch e {
- case Auto:
- return encodeAuto
- case Numeric:
- return encodeNumeric
- case AlphaNumeric:
- return encodeAlphaNumeric
- case Unicode:
- return encodeUnicode
- }
- return nil
-}
-
-func (e Encoding) String() string {
- switch e {
- case Auto:
- return "Auto"
- case Numeric:
- return "Numeric"
- case AlphaNumeric:
- return "AlphaNumeric"
- case Unicode:
- return "Unicode"
- }
- return ""
-}
-
-// Encode returns a QR barcode with the given content, error correction level and uses the given encoding
-func Encode(content string, level ErrorCorrectionLevel, mode Encoding) (barcode.Barcode, error) {
- bits, vi, err := mode.getEncoder()(content, level)
- if err != nil {
- return nil, err
- }
-
- blocks := splitToBlocks(bits.IterateBytes(), vi)
- data := blocks.interleave(vi)
- result := render(data, vi)
- result.content = content
- return result, nil
-}
-
-func render(data []byte, vi *versionInfo) *qrcode {
- dim := vi.modulWidth()
- results := make([]*qrcode, 8)
- for i := 0; i < 8; i++ {
- results[i] = newBarcode(dim)
- }
-
- occupied := newBarcode(dim)
-
- setAll := func(x int, y int, val bool) {
- occupied.Set(x, y, true)
- for i := 0; i < 8; i++ {
- results[i].Set(x, y, val)
- }
- }
-
- drawFinderPatterns(vi, setAll)
- drawAlignmentPatterns(occupied, vi, setAll)
-
- //Timing Pattern:
- var i int
- for i = 0; i < dim; i++ {
- if !occupied.Get(i, 6) {
- setAll(i, 6, i%2 == 0)
- }
- if !occupied.Get(6, i) {
- setAll(6, i, i%2 == 0)
- }
- }
- // Dark Module
- setAll(8, dim-8, true)
-
- drawVersionInfo(vi, setAll)
- drawFormatInfo(vi, -1, occupied.Set)
- for i := 0; i < 8; i++ {
- drawFormatInfo(vi, i, results[i].Set)
- }
-
- // Write the data
- var curBitNo int
-
- for pos := range iterateModules(occupied) {
- var curBit bool
- if curBitNo < len(data)*8 {
- curBit = ((data[curBitNo/8] >> uint(7-(curBitNo%8))) & 1) == 1
- } else {
- curBit = false
- }
-
- for i := 0; i < 8; i++ {
- setMasked(pos.X, pos.Y, curBit, i, results[i].Set)
- }
- curBitNo++
- }
-
- lowestPenalty := ^uint(0)
- lowestPenaltyIdx := -1
- for i := 0; i < 8; i++ {
- p := results[i].calcPenalty()
- if p < lowestPenalty {
- lowestPenalty = p
- lowestPenaltyIdx = i
- }
- }
- return results[lowestPenaltyIdx]
-}
-
-func setMasked(x, y int, val bool, mask int, set func(int, int, bool)) {
- switch mask {
- case 0:
- val = val != (((y + x) % 2) == 0)
- break
- case 1:
- val = val != ((y % 2) == 0)
- break
- case 2:
- val = val != ((x % 3) == 0)
- break
- case 3:
- val = val != (((y + x) % 3) == 0)
- break
- case 4:
- val = val != (((y/2 + x/3) % 2) == 0)
- break
- case 5:
- val = val != (((y*x)%2)+((y*x)%3) == 0)
- break
- case 6:
- val = val != ((((y*x)%2)+((y*x)%3))%2 == 0)
- break
- case 7:
- val = val != ((((y+x)%2)+((y*x)%3))%2 == 0)
- }
- set(x, y, val)
-}
-
-func iterateModules(occupied *qrcode) <-chan image.Point {
- result := make(chan image.Point)
- allPoints := make(chan image.Point)
- go func() {
- curX := occupied.dimension - 1
- curY := occupied.dimension - 1
- isUpward := true
-
- for true {
- if isUpward {
- allPoints <- image.Pt(curX, curY)
- allPoints <- image.Pt(curX-1, curY)
- curY--
- if curY < 0 {
- curY = 0
- curX -= 2
- if curX == 6 {
- curX--
- }
- if curX < 0 {
- break
- }
- isUpward = false
- }
- } else {
- allPoints <- image.Pt(curX, curY)
- allPoints <- image.Pt(curX-1, curY)
- curY++
- if curY >= occupied.dimension {
- curY = occupied.dimension - 1
- curX -= 2
- if curX == 6 {
- curX--
- }
- isUpward = true
- if curX < 0 {
- break
- }
- }
- }
- }
-
- close(allPoints)
- }()
- go func() {
- for pt := range allPoints {
- if !occupied.Get(pt.X, pt.Y) {
- result <- pt
- }
- }
- close(result)
- }()
- return result
-}
-
-func drawFinderPatterns(vi *versionInfo, set func(int, int, bool)) {
- dim := vi.modulWidth()
- drawPattern := func(xoff int, yoff int) {
- for x := -1; x < 8; x++ {
- for y := -1; y < 8; y++ {
- val := (x == 0 || x == 6 || y == 0 || y == 6 || (x > 1 && x < 5 && y > 1 && y < 5)) && (x <= 6 && y <= 6 && x >= 0 && y >= 0)
-
- if x+xoff >= 0 && x+xoff < dim && y+yoff >= 0 && y+yoff < dim {
- set(x+xoff, y+yoff, val)
- }
- }
- }
- }
- drawPattern(0, 0)
- drawPattern(0, dim-7)
- drawPattern(dim-7, 0)
-}
-
-func drawAlignmentPatterns(occupied *qrcode, vi *versionInfo, set func(int, int, bool)) {
- drawPattern := func(xoff int, yoff int) {
- for x := -2; x <= 2; x++ {
- for y := -2; y <= 2; y++ {
- val := x == -2 || x == 2 || y == -2 || y == 2 || (x == 0 && y == 0)
- set(x+xoff, y+yoff, val)
- }
- }
- }
- positions := vi.alignmentPatternPlacements()
-
- for _, x := range positions {
- for _, y := range positions {
- if occupied.Get(x, y) {
- continue
- }
- drawPattern(x, y)
- }
- }
-}
-
-var formatInfos = map[ErrorCorrectionLevel]map[int][]bool{
- L: {
- 0: []bool{true, true, true, false, true, true, true, true, true, false, false, false, true, false, false},
- 1: []bool{true, true, true, false, false, true, false, true, true, true, true, false, false, true, true},
- 2: []bool{true, true, true, true, true, false, true, true, false, true, false, true, false, true, false},
- 3: []bool{true, true, true, true, false, false, false, true, false, false, true, true, true, false, true},
- 4: []bool{true, true, false, false, true, true, false, false, false, true, false, true, true, true, true},
- 5: []bool{true, true, false, false, false, true, true, false, false, false, true, true, false, false, false},
- 6: []bool{true, true, false, true, true, false, false, false, true, false, false, false, false, false, true},
- 7: []bool{true, true, false, true, false, false, true, false, true, true, true, false, true, true, false},
- },
- M: {
- 0: []bool{true, false, true, false, true, false, false, false, false, false, true, false, false, true, false},
- 1: []bool{true, false, true, false, false, false, true, false, false, true, false, false, true, false, true},
- 2: []bool{true, false, true, true, true, true, false, false, true, true, true, true, true, false, false},
- 3: []bool{true, false, true, true, false, true, true, false, true, false, false, true, false, true, true},
- 4: []bool{true, false, false, false, true, false, true, true, true, true, true, true, false, false, true},
- 5: []bool{true, false, false, false, false, false, false, true, true, false, false, true, true, true, false},
- 6: []bool{true, false, false, true, true, true, true, true, false, false, true, false, true, true, true},
- 7: []bool{true, false, false, true, false, true, false, true, false, true, false, false, false, false, false},
- },
- Q: {
- 0: []bool{false, true, true, false, true, false, true, false, true, false, true, true, true, true, true},
- 1: []bool{false, true, true, false, false, false, false, false, true, true, false, true, false, false, false},
- 2: []bool{false, true, true, true, true, true, true, false, false, true, true, false, false, false, true},
- 3: []bool{false, true, true, true, false, true, false, false, false, false, false, false, true, true, false},
- 4: []bool{false, true, false, false, true, false, false, true, false, true, true, false, true, false, false},
- 5: []bool{false, true, false, false, false, false, true, true, false, false, false, false, false, true, true},
- 6: []bool{false, true, false, true, true, true, false, true, true, false, true, true, false, true, false},
- 7: []bool{false, true, false, true, false, true, true, true, true, true, false, true, true, false, true},
- },
- H: {
- 0: []bool{false, false, true, false, true, true, false, true, false, false, false, true, false, false, true},
- 1: []bool{false, false, true, false, false, true, true, true, false, true, true, true, true, true, false},
- 2: []bool{false, false, true, true, true, false, false, true, true, true, false, false, true, true, true},
- 3: []bool{false, false, true, true, false, false, true, true, true, false, true, false, false, false, false},
- 4: []bool{false, false, false, false, true, true, true, false, true, true, false, false, false, true, false},
- 5: []bool{false, false, false, false, false, true, false, false, true, false, true, false, true, false, true},
- 6: []bool{false, false, false, true, true, false, true, false, false, false, false, true, true, false, false},
- 7: []bool{false, false, false, true, false, false, false, false, false, true, true, true, false, true, true},
- },
-}
-
-func drawFormatInfo(vi *versionInfo, usedMask int, set func(int, int, bool)) {
- var formatInfo []bool
-
- if usedMask == -1 {
- formatInfo = []bool{true, true, true, true, true, true, true, true, true, true, true, true, true, true, true} // Set all to true cause -1 --> occupied mask.
- } else {
- formatInfo = formatInfos[vi.Level][usedMask]
- }
-
- if len(formatInfo) == 15 {
- dim := vi.modulWidth()
- set(0, 8, formatInfo[0])
- set(1, 8, formatInfo[1])
- set(2, 8, formatInfo[2])
- set(3, 8, formatInfo[3])
- set(4, 8, formatInfo[4])
- set(5, 8, formatInfo[5])
- set(7, 8, formatInfo[6])
- set(8, 8, formatInfo[7])
- set(8, 7, formatInfo[8])
- set(8, 5, formatInfo[9])
- set(8, 4, formatInfo[10])
- set(8, 3, formatInfo[11])
- set(8, 2, formatInfo[12])
- set(8, 1, formatInfo[13])
- set(8, 0, formatInfo[14])
-
- set(8, dim-1, formatInfo[0])
- set(8, dim-2, formatInfo[1])
- set(8, dim-3, formatInfo[2])
- set(8, dim-4, formatInfo[3])
- set(8, dim-5, formatInfo[4])
- set(8, dim-6, formatInfo[5])
- set(8, dim-7, formatInfo[6])
- set(dim-8, 8, formatInfo[7])
- set(dim-7, 8, formatInfo[8])
- set(dim-6, 8, formatInfo[9])
- set(dim-5, 8, formatInfo[10])
- set(dim-4, 8, formatInfo[11])
- set(dim-3, 8, formatInfo[12])
- set(dim-2, 8, formatInfo[13])
- set(dim-1, 8, formatInfo[14])
- }
-}
-
-var versionInfoBitsByVersion = map[byte][]bool{
- 7: []bool{false, false, false, true, true, true, true, true, false, false, true, false, false, true, false, true, false, false},
- 8: []bool{false, false, true, false, false, false, false, true, false, true, true, false, true, true, true, true, false, false},
- 9: []bool{false, false, true, false, false, true, true, false, true, false, true, false, false, true, true, false, false, true},
- 10: []bool{false, false, true, false, true, false, false, true, false, false, true, true, false, true, false, false, true, true},
- 11: []bool{false, false, true, false, true, true, true, false, true, true, true, true, true, true, false, true, true, false},
- 12: []bool{false, false, true, true, false, false, false, true, true, true, false, true, true, false, false, false, true, false},
- 13: []bool{false, false, true, true, false, true, true, false, false, false, false, true, false, false, false, true, true, true},
- 14: []bool{false, false, true, true, true, false, false, true, true, false, false, false, false, false, true, true, false, true},
- 15: []bool{false, false, true, true, true, true, true, false, false, true, false, false, true, false, true, false, false, false},
- 16: []bool{false, true, false, false, false, false, true, false, true, true, false, true, true, true, true, false, false, false},
- 17: []bool{false, true, false, false, false, true, false, true, false, false, false, true, false, true, true, true, false, true},
- 18: []bool{false, true, false, false, true, false, true, false, true, false, false, false, false, true, false, true, true, true},
- 19: []bool{false, true, false, false, true, true, false, true, false, true, false, false, true, true, false, false, true, false},
- 20: []bool{false, true, false, true, false, false, true, false, false, true, true, false, true, false, false, true, true, false},
- 21: []bool{false, true, false, true, false, true, false, true, true, false, true, false, false, false, false, false, true, true},
- 22: []bool{false, true, false, true, true, false, true, false, false, false, true, true, false, false, true, false, false, true},
- 23: []bool{false, true, false, true, true, true, false, true, true, true, true, true, true, false, true, true, false, false},
- 24: []bool{false, true, true, false, false, false, true, true, true, false, true, true, false, false, false, true, false, false},
- 25: []bool{false, true, true, false, false, true, false, false, false, true, true, true, true, false, false, false, false, true},
- 26: []bool{false, true, true, false, true, false, true, true, true, true, true, false, true, false, true, false, true, true},
- 27: []bool{false, true, true, false, true, true, false, false, false, false, true, false, false, false, true, true, true, false},
- 28: []bool{false, true, true, true, false, false, true, true, false, false, false, false, false, true, true, false, true, false},
- 29: []bool{false, true, true, true, false, true, false, false, true, true, false, false, true, true, true, true, true, true},
- 30: []bool{false, true, true, true, true, false, true, true, false, true, false, true, true, true, false, true, false, true},
- 31: []bool{false, true, true, true, true, true, false, false, true, false, false, true, false, true, false, false, false, false},
- 32: []bool{true, false, false, false, false, false, true, false, false, true, true, true, false, true, false, true, false, true},
- 33: []bool{true, false, false, false, false, true, false, true, true, false, true, true, true, true, false, false, false, false},
- 34: []bool{true, false, false, false, true, false, true, false, false, false, true, false, true, true, true, false, true, false},
- 35: []bool{true, false, false, false, true, true, false, true, true, true, true, false, false, true, true, true, true, true},
- 36: []bool{true, false, false, true, false, false, true, false, true, true, false, false, false, false, true, false, true, true},
- 37: []bool{true, false, false, true, false, true, false, true, false, false, false, false, true, false, true, true, true, false},
- 38: []bool{true, false, false, true, true, false, true, false, true, false, false, true, true, false, false, true, false, false},
- 39: []bool{true, false, false, true, true, true, false, true, false, true, false, true, false, false, false, false, false, true},
- 40: []bool{true, false, true, false, false, false, true, true, false, false, false, true, true, false, true, false, false, true},
-}
-
-func drawVersionInfo(vi *versionInfo, set func(int, int, bool)) {
- versionInfoBits, ok := versionInfoBitsByVersion[vi.Version]
-
- if ok && len(versionInfoBits) > 0 {
- for i := 0; i < len(versionInfoBits); i++ {
- x := (vi.modulWidth() - 11) + i%3
- y := i / 3
- set(x, y, versionInfoBits[len(versionInfoBits)-i-1])
- set(y, x, versionInfoBits[len(versionInfoBits)-i-1])
- }
- }
-
-}
-
-func addPaddingAndTerminator(bl *utils.BitList, vi *versionInfo) {
- for i := 0; i < 4 && bl.Len() < vi.totalDataBytes()*8; i++ {
- bl.AddBit(false)
- }
-
- for bl.Len()%8 != 0 {
- bl.AddBit(false)
- }
-
- for i := 0; bl.Len() < vi.totalDataBytes()*8; i++ {
- if i%2 == 0 {
- bl.AddByte(236)
- } else {
- bl.AddByte(17)
- }
- }
-}
diff --git a/vendor/github.com/boombuler/barcode/qr/errorcorrection.go b/vendor/github.com/boombuler/barcode/qr/errorcorrection.go
deleted file mode 100644
index 08ebf0ce6..000000000
--- a/vendor/github.com/boombuler/barcode/qr/errorcorrection.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package qr
-
-import (
- "github.com/boombuler/barcode/utils"
-)
-
-type errorCorrection struct {
- rs *utils.ReedSolomonEncoder
-}
-
-var ec = newErrorCorrection()
-
-func newErrorCorrection() *errorCorrection {
- fld := utils.NewGaloisField(285, 256, 0)
- return &errorCorrection{utils.NewReedSolomonEncoder(fld)}
-}
-
-func (ec *errorCorrection) calcECC(data []byte, eccCount byte) []byte {
- dataInts := make([]int, len(data))
- for i := 0; i < len(data); i++ {
- dataInts[i] = int(data[i])
- }
- res := ec.rs.Encode(dataInts, int(eccCount))
- result := make([]byte, len(res))
- for i := 0; i < len(res); i++ {
- result[i] = byte(res[i])
- }
- return result
-}
diff --git a/vendor/github.com/boombuler/barcode/qr/numeric.go b/vendor/github.com/boombuler/barcode/qr/numeric.go
deleted file mode 100644
index 49b44cc45..000000000
--- a/vendor/github.com/boombuler/barcode/qr/numeric.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package qr
-
-import (
- "errors"
- "fmt"
- "strconv"
-
- "github.com/boombuler/barcode/utils"
-)
-
-func encodeNumeric(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) {
- contentBitCount := (len(content) / 3) * 10
- switch len(content) % 3 {
- case 1:
- contentBitCount += 4
- case 2:
- contentBitCount += 7
- }
- vi := findSmallestVersionInfo(ecl, numericMode, contentBitCount)
- if vi == nil {
- return nil, nil, errors.New("To much data to encode")
- }
- res := new(utils.BitList)
- res.AddBits(int(numericMode), 4)
- res.AddBits(len(content), vi.charCountBits(numericMode))
-
- for pos := 0; pos < len(content); pos += 3 {
- var curStr string
- if pos+3 <= len(content) {
- curStr = content[pos : pos+3]
- } else {
- curStr = content[pos:]
- }
-
- i, err := strconv.Atoi(curStr)
- if err != nil || i < 0 {
- return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, Numeric)
- }
- var bitCnt byte
- switch len(curStr) % 3 {
- case 0:
- bitCnt = 10
- case 1:
- bitCnt = 4
- break
- case 2:
- bitCnt = 7
- break
- }
-
- res.AddBits(i, bitCnt)
- }
-
- addPaddingAndTerminator(res, vi)
- return res, vi, nil
-}
diff --git a/vendor/github.com/boombuler/barcode/qr/qrcode.go b/vendor/github.com/boombuler/barcode/qr/qrcode.go
deleted file mode 100644
index 13607604b..000000000
--- a/vendor/github.com/boombuler/barcode/qr/qrcode.go
+++ /dev/null
@@ -1,166 +0,0 @@
-package qr
-
-import (
- "image"
- "image/color"
- "math"
-
- "github.com/boombuler/barcode"
- "github.com/boombuler/barcode/utils"
-)
-
-type qrcode struct {
- dimension int
- data *utils.BitList
- content string
-}
-
-func (qr *qrcode) Content() string {
- return qr.content
-}
-
-func (qr *qrcode) Metadata() barcode.Metadata {
- return barcode.Metadata{barcode.TypeQR, 2}
-}
-
-func (qr *qrcode) ColorModel() color.Model {
- return color.Gray16Model
-}
-
-func (qr *qrcode) Bounds() image.Rectangle {
- return image.Rect(0, 0, qr.dimension, qr.dimension)
-}
-
-func (qr *qrcode) At(x, y int) color.Color {
- if qr.Get(x, y) {
- return color.Black
- }
- return color.White
-}
-
-func (qr *qrcode) Get(x, y int) bool {
- return qr.data.GetBit(x*qr.dimension + y)
-}
-
-func (qr *qrcode) Set(x, y int, val bool) {
- qr.data.SetBit(x*qr.dimension+y, val)
-}
-
-func (qr *qrcode) calcPenalty() uint {
- return qr.calcPenaltyRule1() + qr.calcPenaltyRule2() + qr.calcPenaltyRule3() + qr.calcPenaltyRule4()
-}
-
-func (qr *qrcode) calcPenaltyRule1() uint {
- var result uint
- for x := 0; x < qr.dimension; x++ {
- checkForX := false
- var cntX uint
- checkForY := false
- var cntY uint
-
- for y := 0; y < qr.dimension; y++ {
- if qr.Get(x, y) == checkForX {
- cntX++
- } else {
- checkForX = !checkForX
- if cntX >= 5 {
- result += cntX - 2
- }
- cntX = 1
- }
-
- if qr.Get(y, x) == checkForY {
- cntY++
- } else {
- checkForY = !checkForY
- if cntY >= 5 {
- result += cntY - 2
- }
- cntY = 1
- }
- }
-
- if cntX >= 5 {
- result += cntX - 2
- }
- if cntY >= 5 {
- result += cntY - 2
- }
- }
-
- return result
-}
-
-func (qr *qrcode) calcPenaltyRule2() uint {
- var result uint
- for x := 0; x < qr.dimension-1; x++ {
- for y := 0; y < qr.dimension-1; y++ {
- check := qr.Get(x, y)
- if qr.Get(x, y+1) == check && qr.Get(x+1, y) == check && qr.Get(x+1, y+1) == check {
- result += 3
- }
- }
- }
- return result
-}
-
-func (qr *qrcode) calcPenaltyRule3() uint {
- pattern1 := []bool{true, false, true, true, true, false, true, false, false, false, false}
- pattern2 := []bool{false, false, false, false, true, false, true, true, true, false, true}
-
- var result uint
- for x := 0; x <= qr.dimension-len(pattern1); x++ {
- for y := 0; y < qr.dimension; y++ {
- pattern1XFound := true
- pattern2XFound := true
- pattern1YFound := true
- pattern2YFound := true
-
- for i := 0; i < len(pattern1); i++ {
- iv := qr.Get(x+i, y)
- if iv != pattern1[i] {
- pattern1XFound = false
- }
- if iv != pattern2[i] {
- pattern2XFound = false
- }
- iv = qr.Get(y, x+i)
- if iv != pattern1[i] {
- pattern1YFound = false
- }
- if iv != pattern2[i] {
- pattern2YFound = false
- }
- }
- if pattern1XFound || pattern2XFound {
- result += 40
- }
- if pattern1YFound || pattern2YFound {
- result += 40
- }
- }
- }
-
- return result
-}
-
-func (qr *qrcode) calcPenaltyRule4() uint {
- totalNum := qr.data.Len()
- trueCnt := 0
- for i := 0; i < totalNum; i++ {
- if qr.data.GetBit(i) {
- trueCnt++
- }
- }
- percDark := float64(trueCnt) * 100 / float64(totalNum)
- floor := math.Abs(math.Floor(percDark/5) - 10)
- ceil := math.Abs(math.Ceil(percDark/5) - 10)
- return uint(math.Min(floor, ceil) * 10)
-}
-
-func newBarcode(dim int) *qrcode {
- res := new(qrcode)
- res.dimension = dim
- res.data = utils.NewBitList(dim * dim)
- return res
-}
diff --git a/vendor/github.com/boombuler/barcode/qr/unicode.go b/vendor/github.com/boombuler/barcode/qr/unicode.go
deleted file mode 100644
index a9135ab6d..000000000
--- a/vendor/github.com/boombuler/barcode/qr/unicode.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package qr
-
-import (
- "errors"
-
- "github.com/boombuler/barcode/utils"
-)
-
-func encodeUnicode(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) {
- data := []byte(content)
-
- vi := findSmallestVersionInfo(ecl, byteMode, len(data)*8)
- if vi == nil {
- return nil, nil, errors.New("To much data to encode")
- }
-
- // It's not correct to add the unicode bytes to the result directly but most readers can't handle the
- // required ECI header...
- res := new(utils.BitList)
- res.AddBits(int(byteMode), 4)
- res.AddBits(len(content), vi.charCountBits(byteMode))
- for _, b := range data {
- res.AddByte(b)
- }
- addPaddingAndTerminator(res, vi)
- return res, vi, nil
-}
diff --git a/vendor/github.com/boombuler/barcode/qr/versioninfo.go b/vendor/github.com/boombuler/barcode/qr/versioninfo.go
deleted file mode 100644
index 6852a5766..000000000
--- a/vendor/github.com/boombuler/barcode/qr/versioninfo.go
+++ /dev/null
@@ -1,310 +0,0 @@
-package qr
-
-import "math"
-
-// ErrorCorrectionLevel indicates the amount of "backup data" stored in the QR code
-type ErrorCorrectionLevel byte
-
-const (
- // L recovers 7% of data
- L ErrorCorrectionLevel = iota
- // M recovers 15% of data
- M
- // Q recovers 25% of data
- Q
- // H recovers 30% of data
- H
-)
-
-func (ecl ErrorCorrectionLevel) String() string {
- switch ecl {
- case L:
- return "L"
- case M:
- return "M"
- case Q:
- return "Q"
- case H:
- return "H"
- }
- return "unknown"
-}
-
-type encodingMode byte
-
-const (
- numericMode encodingMode = 1
- alphaNumericMode encodingMode = 2
- byteMode encodingMode = 4
- kanjiMode encodingMode = 8
-)
-
-type versionInfo struct {
- Version byte
- Level ErrorCorrectionLevel
- ErrorCorrectionCodewordsPerBlock byte
- NumberOfBlocksInGroup1 byte
- DataCodeWordsPerBlockInGroup1 byte
- NumberOfBlocksInGroup2 byte
- DataCodeWordsPerBlockInGroup2 byte
-}
-
-var versionInfos = []*versionInfo{
- &versionInfo{1, L, 7, 1, 19, 0, 0},
- &versionInfo{1, M, 10, 1, 16, 0, 0},
- &versionInfo{1, Q, 13, 1, 13, 0, 0},
- &versionInfo{1, H, 17, 1, 9, 0, 0},
- &versionInfo{2, L, 10, 1, 34, 0, 0},
- &versionInfo{2, M, 16, 1, 28, 0, 0},
- &versionInfo{2, Q, 22, 1, 22, 0, 0},
- &versionInfo{2, H, 28, 1, 16, 0, 0},
- &versionInfo{3, L, 15, 1, 55, 0, 0},
- &versionInfo{3, M, 26, 1, 44, 0, 0},
- &versionInfo{3, Q, 18, 2, 17, 0, 0},
- &versionInfo{3, H, 22, 2, 13, 0, 0},
- &versionInfo{4, L, 20, 1, 80, 0, 0},
- &versionInfo{4, M, 18, 2, 32, 0, 0},
- &versionInfo{4, Q, 26, 2, 24, 0, 0},
- &versionInfo{4, H, 16, 4, 9, 0, 0},
- &versionInfo{5, L, 26, 1, 108, 0, 0},
- &versionInfo{5, M, 24, 2, 43, 0, 0},
- &versionInfo{5, Q, 18, 2, 15, 2, 16},
- &versionInfo{5, H, 22, 2, 11, 2, 12},
- &versionInfo{6, L, 18, 2, 68, 0, 0},
- &versionInfo{6, M, 16, 4, 27, 0, 0},
- &versionInfo{6, Q, 24, 4, 19, 0, 0},
- &versionInfo{6, H, 28, 4, 15, 0, 0},
- &versionInfo{7, L, 20, 2, 78, 0, 0},
- &versionInfo{7, M, 18, 4, 31, 0, 0},
- &versionInfo{7, Q, 18, 2, 14, 4, 15},
- &versionInfo{7, H, 26, 4, 13, 1, 14},
- &versionInfo{8, L, 24, 2, 97, 0, 0},
- &versionInfo{8, M, 22, 2, 38, 2, 39},
- &versionInfo{8, Q, 22, 4, 18, 2, 19},
- &versionInfo{8, H, 26, 4, 14, 2, 15},
- &versionInfo{9, L, 30, 2, 116, 0, 0},
- &versionInfo{9, M, 22, 3, 36, 2, 37},
- &versionInfo{9, Q, 20, 4, 16, 4, 17},
- &versionInfo{9, H, 24, 4, 12, 4, 13},
- &versionInfo{10, L, 18, 2, 68, 2, 69},
- &versionInfo{10, M, 26, 4, 43, 1, 44},
- &versionInfo{10, Q, 24, 6, 19, 2, 20},
- &versionInfo{10, H, 28, 6, 15, 2, 16},
- &versionInfo{11, L, 20, 4, 81, 0, 0},
- &versionInfo{11, M, 30, 1, 50, 4, 51},
- &versionInfo{11, Q, 28, 4, 22, 4, 23},
- &versionInfo{11, H, 24, 3, 12, 8, 13},
- &versionInfo{12, L, 24, 2, 92, 2, 93},
- &versionInfo{12, M, 22, 6, 36, 2, 37},
- &versionInfo{12, Q, 26, 4, 20, 6, 21},
- &versionInfo{12, H, 28, 7, 14, 4, 15},
- &versionInfo{13, L, 26, 4, 107, 0, 0},
- &versionInfo{13, M, 22, 8, 37, 1, 38},
- &versionInfo{13, Q, 24, 8, 20, 4, 21},
- &versionInfo{13, H, 22, 12, 11, 4, 12},
- &versionInfo{14, L, 30, 3, 115, 1, 116},
- &versionInfo{14, M, 24, 4, 40, 5, 41},
- &versionInfo{14, Q, 20, 11, 16, 5, 17},
- &versionInfo{14, H, 24, 11, 12, 5, 13},
- &versionInfo{15, L, 22, 5, 87, 1, 88},
- &versionInfo{15, M, 24, 5, 41, 5, 42},
- &versionInfo{15, Q, 30, 5, 24, 7, 25},
- &versionInfo{15, H, 24, 11, 12, 7, 13},
- &versionInfo{16, L, 24, 5, 98, 1, 99},
- &versionInfo{16, M, 28, 7, 45, 3, 46},
- &versionInfo{16, Q, 24, 15, 19, 2, 20},
- &versionInfo{16, H, 30, 3, 15, 13, 16},
- &versionInfo{17, L, 28, 1, 107, 5, 108},
- &versionInfo{17, M, 28, 10, 46, 1, 47},
- &versionInfo{17, Q, 28, 1, 22, 15, 23},
- &versionInfo{17, H, 28, 2, 14, 17, 15},
- &versionInfo{18, L, 30, 5, 120, 1, 121},
- &versionInfo{18, M, 26, 9, 43, 4, 44},
- &versionInfo{18, Q, 28, 17, 22, 1, 23},
- &versionInfo{18, H, 28, 2, 14, 19, 15},
- &versionInfo{19, L, 28, 3, 113, 4, 114},
- &versionInfo{19, M, 26, 3, 44, 11, 45},
- &versionInfo{19, Q, 26, 17, 21, 4, 22},
- &versionInfo{19, H, 26, 9, 13, 16, 14},
- &versionInfo{20, L, 28, 3, 107, 5, 108},
- &versionInfo{20, M, 26, 3, 41, 13, 42},
- &versionInfo{20, Q, 30, 15, 24, 5, 25},
- &versionInfo{20, H, 28, 15, 15, 10, 16},
- &versionInfo{21, L, 28, 4, 116, 4, 117},
- &versionInfo{21, M, 26, 17, 42, 0, 0},
- &versionInfo{21, Q, 28, 17, 22, 6, 23},
- &versionInfo{21, H, 30, 19, 16, 6, 17},
- &versionInfo{22, L, 28, 2, 111, 7, 112},
- &versionInfo{22, M, 28, 17, 46, 0, 0},
- &versionInfo{22, Q, 30, 7, 24, 16, 25},
- &versionInfo{22, H, 24, 34, 13, 0, 0},
- &versionInfo{23, L, 30, 4, 121, 5, 122},
- &versionInfo{23, M, 28, 4, 47, 14, 48},
- &versionInfo{23, Q, 30, 11, 24, 14, 25},
- &versionInfo{23, H, 30, 16, 15, 14, 16},
- &versionInfo{24, L, 30, 6, 117, 4, 118},
- &versionInfo{24, M, 28, 6, 45, 14, 46},
- &versionInfo{24, Q, 30, 11, 24, 16, 25},
- &versionInfo{24, H, 30, 30, 16, 2, 17},
- &versionInfo{25, L, 26, 8, 106, 4, 107},
- &versionInfo{25, M, 28, 8, 47, 13, 48},
- &versionInfo{25, Q, 30, 7, 24, 22, 25},
- &versionInfo{25, H, 30, 22, 15, 13, 16},
- &versionInfo{26, L, 28, 10, 114, 2, 115},
- &versionInfo{26, M, 28, 19, 46, 4, 47},
- &versionInfo{26, Q, 28, 28, 22, 6, 23},
- &versionInfo{26, H, 30, 33, 16, 4, 17},
- &versionInfo{27, L, 30, 8, 122, 4, 123},
- &versionInfo{27, M, 28, 22, 45, 3, 46},
- &versionInfo{27, Q, 30, 8, 23, 26, 24},
- &versionInfo{27, H, 30, 12, 15, 28, 16},
- &versionInfo{28, L, 30, 3, 117, 10, 118},
- &versionInfo{28, M, 28, 3, 45, 23, 46},
- &versionInfo{28, Q, 30, 4, 24, 31, 25},
- &versionInfo{28, H, 30, 11, 15, 31, 16},
- &versionInfo{29, L, 30, 7, 116, 7, 117},
- &versionInfo{29, M, 28, 21, 45, 7, 46},
- &versionInfo{29, Q, 30, 1, 23, 37, 24},
- &versionInfo{29, H, 30, 19, 15, 26, 16},
- &versionInfo{30, L, 30, 5, 115, 10, 116},
- &versionInfo{30, M, 28, 19, 47, 10, 48},
- &versionInfo{30, Q, 30, 15, 24, 25, 25},
- &versionInfo{30, H, 30, 23, 15, 25, 16},
- &versionInfo{31, L, 30, 13, 115, 3, 116},
- &versionInfo{31, M, 28, 2, 46, 29, 47},
- &versionInfo{31, Q, 30, 42, 24, 1, 25},
- &versionInfo{31, H, 30, 23, 15, 28, 16},
- &versionInfo{32, L, 30, 17, 115, 0, 0},
- &versionInfo{32, M, 28, 10, 46, 23, 47},
- &versionInfo{32, Q, 30, 10, 24, 35, 25},
- &versionInfo{32, H, 30, 19, 15, 35, 16},
- &versionInfo{33, L, 30, 17, 115, 1, 116},
- &versionInfo{33, M, 28, 14, 46, 21, 47},
- &versionInfo{33, Q, 30, 29, 24, 19, 25},
- &versionInfo{33, H, 30, 11, 15, 46, 16},
- &versionInfo{34, L, 30, 13, 115, 6, 116},
- &versionInfo{34, M, 28, 14, 46, 23, 47},
- &versionInfo{34, Q, 30, 44, 24, 7, 25},
- &versionInfo{34, H, 30, 59, 16, 1, 17},
- &versionInfo{35, L, 30, 12, 121, 7, 122},
- &versionInfo{35, M, 28, 12, 47, 26, 48},
- &versionInfo{35, Q, 30, 39, 24, 14, 25},
- &versionInfo{35, H, 30, 22, 15, 41, 16},
- &versionInfo{36, L, 30, 6, 121, 14, 122},
- &versionInfo{36, M, 28, 6, 47, 34, 48},
- &versionInfo{36, Q, 30, 46, 24, 10, 25},
- &versionInfo{36, H, 30, 2, 15, 64, 16},
- &versionInfo{37, L, 30, 17, 122, 4, 123},
- &versionInfo{37, M, 28, 29, 46, 14, 47},
- &versionInfo{37, Q, 30, 49, 24, 10, 25},
- &versionInfo{37, H, 30, 24, 15, 46, 16},
- &versionInfo{38, L, 30, 4, 122, 18, 123},
- &versionInfo{38, M, 28, 13, 46, 32, 47},
- &versionInfo{38, Q, 30, 48, 24, 14, 25},
- &versionInfo{38, H, 30, 42, 15, 32, 16},
- &versionInfo{39, L, 30, 20, 117, 4, 118},
- &versionInfo{39, M, 28, 40, 47, 7, 48},
- &versionInfo{39, Q, 30, 43, 24, 22, 25},
- &versionInfo{39, H, 30, 10, 15, 67, 16},
- &versionInfo{40, L, 30, 19, 118, 6, 119},
- &versionInfo{40, M, 28, 18, 47, 31, 48},
- &versionInfo{40, Q, 30, 34, 24, 34, 25},
- &versionInfo{40, H, 30, 20, 15, 61, 16},
-}
-
-func (vi *versionInfo) totalDataBytes() int {
- g1Data := int(vi.NumberOfBlocksInGroup1) * int(vi.DataCodeWordsPerBlockInGroup1)
- g2Data := int(vi.NumberOfBlocksInGroup2) * int(vi.DataCodeWordsPerBlockInGroup2)
- return (g1Data + g2Data)
-}
-
-func (vi *versionInfo) charCountBits(m encodingMode) byte {
- switch m {
- case numericMode:
- if vi.Version < 10 {
- return 10
- } else if vi.Version < 27 {
- return 12
- }
- return 14
-
- case alphaNumericMode:
- if vi.Version < 10 {
- return 9
- } else if vi.Version < 27 {
- return 11
- }
- return 13
-
- case byteMode:
- if vi.Version < 10 {
- return 8
- }
- return 16
-
- case kanjiMode:
- if vi.Version < 10 {
- return 8
- } else if vi.Version < 27 {
- return 10
- }
- return 12
- default:
- return 0
- }
-}
-
-func (vi *versionInfo) modulWidth() int {
- return ((int(vi.Version) - 1) * 4) + 21
-}
-
-func (vi *versionInfo) alignmentPatternPlacements() []int {
- if vi.Version == 1 {
- return make([]int, 0)
- }
-
- first := 6
- last := vi.modulWidth() - 7
- space := float64(last - first)
- count := int(math.Ceil(space/28)) + 1
-
- result := make([]int, count)
- result[0] = first
- result[len(result)-1] = last
- if count > 2 {
- step := int(math.Ceil(float64(last-first) / float64(count-1)))
- if step%2 == 1 {
- frac := float64(last-first) / float64(count-1)
- _, x := math.Modf(frac)
- if x >= 0.5 {
- frac = math.Ceil(frac)
- } else {
- frac = math.Floor(frac)
- }
-
- if int(frac)%2 == 0 {
- step--
- } else {
- step++
- }
- }
-
- for i := 1; i <= count-2; i++ {
- result[i] = last - (step * (count - 1 - i))
- }
- }
-
- return result
-}
-
-func findSmallestVersionInfo(ecl ErrorCorrectionLevel, mode encodingMode, dataBits int) *versionInfo {
- dataBits = dataBits + 4 // mode indicator
- for _, vi := range versionInfos {
- if vi.Level == ecl {
- if (vi.totalDataBytes() * 8) >= (dataBits + int(vi.charCountBits(mode))) {
- return vi
- }
- }
- }
- return nil
-}
diff --git a/vendor/github.com/boombuler/barcode/scaledbarcode.go b/vendor/github.com/boombuler/barcode/scaledbarcode.go
deleted file mode 100644
index 152b18017..000000000
--- a/vendor/github.com/boombuler/barcode/scaledbarcode.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package barcode
-
-import (
- "errors"
- "fmt"
- "image"
- "image/color"
- "math"
-)
-
-type wrapFunc func(x, y int) color.Color
-
-type scaledBarcode struct {
- wrapped Barcode
- wrapperFunc wrapFunc
- rect image.Rectangle
-}
-
-type intCSscaledBC struct {
- scaledBarcode
-}
-
-func (bc *scaledBarcode) Content() string {
- return bc.wrapped.Content()
-}
-
-func (bc *scaledBarcode) Metadata() Metadata {
- return bc.wrapped.Metadata()
-}
-
-func (bc *scaledBarcode) ColorModel() color.Model {
- return bc.wrapped.ColorModel()
-}
-
-func (bc *scaledBarcode) Bounds() image.Rectangle {
- return bc.rect
-}
-
-func (bc *scaledBarcode) At(x, y int) color.Color {
- return bc.wrapperFunc(x, y)
-}
-
-func (bc *intCSscaledBC) CheckSum() int {
- if cs, ok := bc.wrapped.(BarcodeIntCS); ok {
- return cs.CheckSum()
- }
- return 0
-}
-
-// Scale returns a resized barcode with the given width and height.
-func Scale(bc Barcode, width, height int) (Barcode, error) {
- switch bc.Metadata().Dimensions {
- case 1:
- return scale1DCode(bc, width, height)
- case 2:
- return scale2DCode(bc, width, height)
- }
-
- return nil, errors.New("unsupported barcode format")
-}
-
-func newScaledBC(wrapped Barcode, wrapperFunc wrapFunc, rect image.Rectangle) Barcode {
- result := &scaledBarcode{
- wrapped: wrapped,
- wrapperFunc: wrapperFunc,
- rect: rect,
- }
-
- if _, ok := wrapped.(BarcodeIntCS); ok {
- return &intCSscaledBC{*result}
- }
- return result
-}
-
-func scale2DCode(bc Barcode, width, height int) (Barcode, error) {
- orgBounds := bc.Bounds()
- orgWidth := orgBounds.Max.X - orgBounds.Min.X
- orgHeight := orgBounds.Max.Y - orgBounds.Min.Y
-
- factor := int(math.Min(float64(width)/float64(orgWidth), float64(height)/float64(orgHeight)))
- if factor <= 0 {
- return nil, fmt.Errorf("can not scale barcode to an image smaller than %dx%d", orgWidth, orgHeight)
- }
-
- offsetX := (width - (orgWidth * factor)) / 2
- offsetY := (height - (orgHeight * factor)) / 2
-
- wrap := func(x, y int) color.Color {
- if x < offsetX || y < offsetY {
- return color.White
- }
- x = (x - offsetX) / factor
- y = (y - offsetY) / factor
- if x >= orgWidth || y >= orgHeight {
- return color.White
- }
- return bc.At(x, y)
- }
-
- return newScaledBC(
- bc,
- wrap,
- image.Rect(0, 0, width, height),
- ), nil
-}
-
-func scale1DCode(bc Barcode, width, height int) (Barcode, error) {
- orgBounds := bc.Bounds()
- orgWidth := orgBounds.Max.X - orgBounds.Min.X
- factor := int(float64(width) / float64(orgWidth))
-
- if factor <= 0 {
- return nil, fmt.Errorf("can not scale barcode to an image smaller than %dx1", orgWidth)
- }
- offsetX := (width - (orgWidth * factor)) / 2
-
- wrap := func(x, y int) color.Color {
- if x < offsetX {
- return color.White
- }
- x = (x - offsetX) / factor
-
- if x >= orgWidth {
- return color.White
- }
- return bc.At(x, 0)
- }
-
- return newScaledBC(
- bc,
- wrap,
- image.Rect(0, 0, width, height),
- ), nil
-}
diff --git a/vendor/github.com/boombuler/barcode/utils/base1dcode.go b/vendor/github.com/boombuler/barcode/utils/base1dcode.go
deleted file mode 100644
index a335c0c74..000000000
--- a/vendor/github.com/boombuler/barcode/utils/base1dcode.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Package utils contain some utilities which are needed to create barcodes
-package utils
-
-import (
- "image"
- "image/color"
-
- "github.com/boombuler/barcode"
-)
-
-type base1DCode struct {
- *BitList
- kind string
- content string
-}
-
-type base1DCodeIntCS struct {
- base1DCode
- checksum int
-}
-
-func (c *base1DCode) Content() string {
- return c.content
-}
-
-func (c *base1DCode) Metadata() barcode.Metadata {
- return barcode.Metadata{c.kind, 1}
-}
-
-func (c *base1DCode) ColorModel() color.Model {
- return color.Gray16Model
-}
-
-func (c *base1DCode) Bounds() image.Rectangle {
- return image.Rect(0, 0, c.Len(), 1)
-}
-
-func (c *base1DCode) At(x, y int) color.Color {
- if c.GetBit(x) {
- return color.Black
- }
- return color.White
-}
-
-func (c *base1DCodeIntCS) CheckSum() int {
- return c.checksum
-}
-
-// New1DCodeIntCheckSum creates a new 1D barcode where the bars are represented by the bits in the bars BitList
-func New1DCodeIntCheckSum(codeKind, content string, bars *BitList, checksum int) barcode.BarcodeIntCS {
- return &base1DCodeIntCS{base1DCode{bars, codeKind, content}, checksum}
-}
-
-// New1DCode creates a new 1D barcode where the bars are represented by the bits in the bars BitList
-func New1DCode(codeKind, content string, bars *BitList) barcode.Barcode {
- return &base1DCode{bars, codeKind, content}
-}
diff --git a/vendor/github.com/boombuler/barcode/utils/bitlist.go b/vendor/github.com/boombuler/barcode/utils/bitlist.go
deleted file mode 100644
index bb05e53b5..000000000
--- a/vendor/github.com/boombuler/barcode/utils/bitlist.go
+++ /dev/null
@@ -1,119 +0,0 @@
-package utils
-
-// BitList is a list that contains bits
-type BitList struct {
- count int
- data []int32
-}
-
-// NewBitList returns a new BitList with the given length
-// all bits are initialize with false
-func NewBitList(capacity int) *BitList {
- bl := new(BitList)
- bl.count = capacity
- x := 0
- if capacity%32 != 0 {
- x = 1
- }
- bl.data = make([]int32, capacity/32+x)
- return bl
-}
-
-// Len returns the number of contained bits
-func (bl *BitList) Len() int {
- return bl.count
-}
-
-func (bl *BitList) grow() {
- growBy := len(bl.data)
- if growBy < 128 {
- growBy = 128
- } else if growBy >= 1024 {
- growBy = 1024
- }
-
- nd := make([]int32, len(bl.data)+growBy)
- copy(nd, bl.data)
- bl.data = nd
-}
-
-// AddBit appends the given bits to the end of the list
-func (bl *BitList) AddBit(bits ...bool) {
- for _, bit := range bits {
- itmIndex := bl.count / 32
- for itmIndex >= len(bl.data) {
- bl.grow()
- }
- bl.SetBit(bl.count, bit)
- bl.count++
- }
-}
-
-// SetBit sets the bit at the given index to the given value
-func (bl *BitList) SetBit(index int, value bool) {
- itmIndex := index / 32
- itmBitShift := 31 - (index % 32)
- if value {
- bl.data[itmIndex] = bl.data[itmIndex] | 1<> uint(itmBitShift)) & 1) == 1
-}
-
-// AddByte appends all 8 bits of the given byte to the end of the list
-func (bl *BitList) AddByte(b byte) {
- for i := 7; i >= 0; i-- {
- bl.AddBit(((b >> uint(i)) & 1) == 1)
- }
-}
-
-// AddBits appends the last (LSB) 'count' bits of 'b' the the end of the list
-func (bl *BitList) AddBits(b int, count byte) {
- for i := int(count) - 1; i >= 0; i-- {
- bl.AddBit(((b >> uint(i)) & 1) == 1)
- }
-}
-
-// GetBytes returns all bits of the BitList as a []byte
-func (bl *BitList) GetBytes() []byte {
- len := bl.count >> 3
- if (bl.count % 8) != 0 {
- len++
- }
- result := make([]byte, len)
- for i := 0; i < len; i++ {
- shift := (3 - (i % 4)) * 8
- result[i] = (byte)((bl.data[i/4] >> uint(shift)) & 0xFF)
- }
- return result
-}
-
-// IterateBytes iterates through all bytes contained in the BitList
-func (bl *BitList) IterateBytes() <-chan byte {
- res := make(chan byte)
-
- go func() {
- c := bl.count
- shift := 24
- i := 0
- for c > 0 {
- res <- byte((bl.data[i] >> uint(shift)) & 0xFF)
- shift -= 8
- if shift < 0 {
- shift = 24
- i++
- }
- c -= 8
- }
- close(res)
- }()
-
- return res
-}
diff --git a/vendor/github.com/boombuler/barcode/utils/galoisfield.go b/vendor/github.com/boombuler/barcode/utils/galoisfield.go
deleted file mode 100644
index 68726fbfd..000000000
--- a/vendor/github.com/boombuler/barcode/utils/galoisfield.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package utils
-
-// GaloisField encapsulates galois field arithmetics
-type GaloisField struct {
- Size int
- Base int
- ALogTbl []int
- LogTbl []int
-}
-
-// NewGaloisField creates a new galois field
-func NewGaloisField(pp, fieldSize, b int) *GaloisField {
- result := new(GaloisField)
-
- result.Size = fieldSize
- result.Base = b
- result.ALogTbl = make([]int, fieldSize)
- result.LogTbl = make([]int, fieldSize)
-
- x := 1
- for i := 0; i < fieldSize; i++ {
- result.ALogTbl[i] = x
- x = x * 2
- if x >= fieldSize {
- x = (x ^ pp) & (fieldSize - 1)
- }
- }
-
- for i := 0; i < fieldSize; i++ {
- result.LogTbl[result.ALogTbl[i]] = int(i)
- }
-
- return result
-}
-
-func (gf *GaloisField) Zero() *GFPoly {
- return NewGFPoly(gf, []int{0})
-}
-
-// AddOrSub add or substract two numbers
-func (gf *GaloisField) AddOrSub(a, b int) int {
- return a ^ b
-}
-
-// Multiply multiplys two numbers
-func (gf *GaloisField) Multiply(a, b int) int {
- if a == 0 || b == 0 {
- return 0
- }
- return gf.ALogTbl[(gf.LogTbl[a]+gf.LogTbl[b])%(gf.Size-1)]
-}
-
-// Divide divides two numbers
-func (gf *GaloisField) Divide(a, b int) int {
- if b == 0 {
- panic("divide by zero")
- } else if a == 0 {
- return 0
- }
- return gf.ALogTbl[(gf.LogTbl[a]-gf.LogTbl[b])%(gf.Size-1)]
-}
-
-func (gf *GaloisField) Invers(num int) int {
- return gf.ALogTbl[(gf.Size-1)-gf.LogTbl[num]]
-}
diff --git a/vendor/github.com/boombuler/barcode/utils/gfpoly.go b/vendor/github.com/boombuler/barcode/utils/gfpoly.go
deleted file mode 100644
index c56bb40b9..000000000
--- a/vendor/github.com/boombuler/barcode/utils/gfpoly.go
+++ /dev/null
@@ -1,103 +0,0 @@
-package utils
-
-type GFPoly struct {
- gf *GaloisField
- Coefficients []int
-}
-
-func (gp *GFPoly) Degree() int {
- return len(gp.Coefficients) - 1
-}
-
-func (gp *GFPoly) Zero() bool {
- return gp.Coefficients[0] == 0
-}
-
-// GetCoefficient returns the coefficient of x ^ degree
-func (gp *GFPoly) GetCoefficient(degree int) int {
- return gp.Coefficients[gp.Degree()-degree]
-}
-
-func (gp *GFPoly) AddOrSubstract(other *GFPoly) *GFPoly {
- if gp.Zero() {
- return other
- } else if other.Zero() {
- return gp
- }
- smallCoeff := gp.Coefficients
- largeCoeff := other.Coefficients
- if len(smallCoeff) > len(largeCoeff) {
- largeCoeff, smallCoeff = smallCoeff, largeCoeff
- }
- sumDiff := make([]int, len(largeCoeff))
- lenDiff := len(largeCoeff) - len(smallCoeff)
- copy(sumDiff, largeCoeff[:lenDiff])
- for i := lenDiff; i < len(largeCoeff); i++ {
- sumDiff[i] = int(gp.gf.AddOrSub(int(smallCoeff[i-lenDiff]), int(largeCoeff[i])))
- }
- return NewGFPoly(gp.gf, sumDiff)
-}
-
-func (gp *GFPoly) MultByMonominal(degree int, coeff int) *GFPoly {
- if coeff == 0 {
- return gp.gf.Zero()
- }
- size := len(gp.Coefficients)
- result := make([]int, size+degree)
- for i := 0; i < size; i++ {
- result[i] = int(gp.gf.Multiply(int(gp.Coefficients[i]), int(coeff)))
- }
- return NewGFPoly(gp.gf, result)
-}
-
-func (gp *GFPoly) Multiply(other *GFPoly) *GFPoly {
- if gp.Zero() || other.Zero() {
- return gp.gf.Zero()
- }
- aCoeff := gp.Coefficients
- aLen := len(aCoeff)
- bCoeff := other.Coefficients
- bLen := len(bCoeff)
- product := make([]int, aLen+bLen-1)
- for i := 0; i < aLen; i++ {
- ac := int(aCoeff[i])
- for j := 0; j < bLen; j++ {
- bc := int(bCoeff[j])
- product[i+j] = int(gp.gf.AddOrSub(int(product[i+j]), gp.gf.Multiply(ac, bc)))
- }
- }
- return NewGFPoly(gp.gf, product)
-}
-
-func (gp *GFPoly) Divide(other *GFPoly) (quotient *GFPoly, remainder *GFPoly) {
- quotient = gp.gf.Zero()
- remainder = gp
- fld := gp.gf
- denomLeadTerm := other.GetCoefficient(other.Degree())
- inversDenomLeadTerm := fld.Invers(int(denomLeadTerm))
- for remainder.Degree() >= other.Degree() && !remainder.Zero() {
- degreeDiff := remainder.Degree() - other.Degree()
- scale := int(fld.Multiply(int(remainder.GetCoefficient(remainder.Degree())), inversDenomLeadTerm))
- term := other.MultByMonominal(degreeDiff, scale)
- itQuot := NewMonominalPoly(fld, degreeDiff, scale)
- quotient = quotient.AddOrSubstract(itQuot)
- remainder = remainder.AddOrSubstract(term)
- }
- return
-}
-
-func NewMonominalPoly(field *GaloisField, degree int, coeff int) *GFPoly {
- if coeff == 0 {
- return field.Zero()
- }
- result := make([]int, degree+1)
- result[0] = coeff
- return NewGFPoly(field, result)
-}
-
-func NewGFPoly(field *GaloisField, coefficients []int) *GFPoly {
- for len(coefficients) > 1 && coefficients[0] == 0 {
- coefficients = coefficients[1:]
- }
- return &GFPoly{field, coefficients}
-}
diff --git a/vendor/github.com/boombuler/barcode/utils/reedsolomon.go b/vendor/github.com/boombuler/barcode/utils/reedsolomon.go
deleted file mode 100644
index 53af91ad4..000000000
--- a/vendor/github.com/boombuler/barcode/utils/reedsolomon.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package utils
-
-import (
- "sync"
-)
-
-type ReedSolomonEncoder struct {
- gf *GaloisField
- polynomes []*GFPoly
- m *sync.Mutex
-}
-
-func NewReedSolomonEncoder(gf *GaloisField) *ReedSolomonEncoder {
- return &ReedSolomonEncoder{
- gf, []*GFPoly{NewGFPoly(gf, []int{1})}, new(sync.Mutex),
- }
-}
-
-func (rs *ReedSolomonEncoder) getPolynomial(degree int) *GFPoly {
- rs.m.Lock()
- defer rs.m.Unlock()
-
- if degree >= len(rs.polynomes) {
- last := rs.polynomes[len(rs.polynomes)-1]
- for d := len(rs.polynomes); d <= degree; d++ {
- next := last.Multiply(NewGFPoly(rs.gf, []int{1, rs.gf.ALogTbl[d-1+rs.gf.Base]}))
- rs.polynomes = append(rs.polynomes, next)
- last = next
- }
- }
- return rs.polynomes[degree]
-}
-
-func (rs *ReedSolomonEncoder) Encode(data []int, eccCount int) []int {
- generator := rs.getPolynomial(eccCount)
- info := NewGFPoly(rs.gf, data)
- info = info.MultByMonominal(eccCount, 1)
- _, remainder := info.Divide(generator)
-
- result := make([]int, eccCount)
- numZero := int(eccCount) - len(remainder.Coefficients)
- copy(result[numZero:], remainder.Coefficients)
- return result
-}
diff --git a/vendor/github.com/boombuler/barcode/utils/runeint.go b/vendor/github.com/boombuler/barcode/utils/runeint.go
deleted file mode 100644
index d2e5e61e5..000000000
--- a/vendor/github.com/boombuler/barcode/utils/runeint.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package utils
-
-// RuneToInt converts a rune between '0' and '9' to an integer between 0 and 9
-// If the rune is outside of this range -1 is returned.
-func RuneToInt(r rune) int {
- if r >= '0' && r <= '9' {
- return int(r - '0')
- }
- return -1
-}
-
-// IntToRune converts a digit 0 - 9 to the rune '0' - '9'. If the given int is outside
-// of this range 'F' is returned!
-func IntToRune(i int) rune {
- if i >= 0 && i <= 9 {
- return rune(i + '0')
- }
- return 'F'
-}
diff --git a/vendor/github.com/c2h5oh/datasize/.gitignore b/vendor/github.com/c2h5oh/datasize/.gitignore
deleted file mode 100644
index daf913b1b..000000000
--- a/vendor/github.com/c2h5oh/datasize/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
diff --git a/vendor/github.com/c2h5oh/datasize/.travis.yml b/vendor/github.com/c2h5oh/datasize/.travis.yml
deleted file mode 100644
index 204e70089..000000000
--- a/vendor/github.com/c2h5oh/datasize/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-sudo: false
-
-language: go
-go:
- - 1.4
- - 1.5
- - 1.6
- - 1.7
- - 1.8
- - 1.9
- - tip
-
-script:
- - go test -v
diff --git a/vendor/github.com/c2h5oh/datasize/LICENSE b/vendor/github.com/c2h5oh/datasize/LICENSE
deleted file mode 100644
index f2ba916e6..000000000
--- a/vendor/github.com/c2h5oh/datasize/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Maciej Lisiewski
-
-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/c2h5oh/datasize/README.md b/vendor/github.com/c2h5oh/datasize/README.md
deleted file mode 100644
index ac0cf8586..000000000
--- a/vendor/github.com/c2h5oh/datasize/README.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# datasize [](https://travis-ci.org/c2h5oh/datasize)
-
-Golang helpers for data sizes
-
-### Constants
-
-Just like `time` package provides `time.Second`, `time.Day` constants `datasize` provides:
-
-* `datasize.B` 1 byte
-* `datasize.KB` 1 kilobyte
-* `datasize.MB` 1 megabyte
-* `datasize.GB` 1 gigabyte
-* `datasize.TB` 1 terabyte
-* `datasize.PB` 1 petabyte
-* `datasize.EB` 1 exabyte
-
-### Helpers
-
-Just like `time` package provides `duration.Nanoseconds() uint64 `, `duration.Hours() float64` helpers `datasize` has.
-
-* `ByteSize.Bytes() uint64`
-* `ByteSize.Kilobytes() float4`
-* `ByteSize.Megabytes() float64`
-* `ByteSize.Gigabytes() float64`
-* `ByteSize.Terabytes() float64`
-* `ByteSize.Petebytes() float64`
-* `ByteSize.Exabytes() float64`
-
-Warning: see limitations at the end of this document about a possible precission loss
-
-### Parsing strings
-
-`datasize.ByteSize` implements `TextUnmarshaler` interface and will automatically parse human readable strings into correct values where it is used:
-
-* `"10 MB"` -> `10* datasize.MB`
-* `"10240 g"` -> `10 * datasize.TB`
-* `"2000"` -> `2000 * datasize.B`
-* `"1tB"` -> `datasize.TB`
-* `"5 peta"` -> `5 * datasize.PB`
-* `"28 kilobytes"` -> `28 * datasize.KB`
-* `"1 gigabyte"` -> `1 * datasize.GB`
-
-You can also do it manually:
-
-```go
-var v datasize.ByteSize
-err := v.UnmarshalText([]byte("100 mb"))
-```
-
-### Printing
-
-`Bytesize.String()` uses largest unit allowing an integer value:
-
-* `(102400 * datasize.MB).String()` -> `"100GB"`
-* `(datasize.MB + datasize.KB).String()` -> `"1025KB"`
-
-Use `%d` format string to get value in bytes without a unit.
-
-### JSON and other encoding
-
-Both `TextMarshaler` and `TextUnmarshaler` interfaces are implemented - JSON will just work. Other encoders will work provided they use those interfaces.
-
-### Human readable
-
-`ByteSize.HumanReadable()` or `ByteSize.HR()` returns a string with 1-3 digits, followed by 1 decimal place, a space and unit big enough to get 1-3 digits
-
-* `(102400 * datasize.MB).String()` -> `"100.0 GB"`
-* `(datasize.MB + 512 * datasize.KB).String()` -> `"1.5 MB"`
-
-### Limitations
-
-* The underlying data type for `data.ByteSize` is `uint64`, so values outside of 0 to 2^64-1 range will overflow
-* size helper functions (like `ByteSize.Kilobytes()`) return `float64`, which can't represent all possible values of `uint64` accurately:
- * if the returned value is supposed to have no fraction (ie `(10 * datasize.MB).Kilobytes()`) accuracy loss happens when value is more than 2^53 larger than unit: `.Kilobytes()` over 8 petabytes, `.Megabytes()` over 8 exabytes
- * if the returned value is supposed to have a fraction (ie `(datasize.PB + datasize.B).Megabytes()`) in addition to the above note accuracy loss may occur in fractional part too - larger integer part leaves fewer bytes to store fractional part, the smaller the remainder vs unit the move bytes are required to store the fractional part
-* Parsing a string with `Mb`, `Tb`, etc units will return a syntax error, because capital followed by lower case is commonly used for bits, not bytes
-* Parsing a string with value exceeding 2^64-1 bytes will return 2^64-1 and an out of range error
diff --git a/vendor/github.com/c2h5oh/datasize/datasize.go b/vendor/github.com/c2h5oh/datasize/datasize.go
deleted file mode 100644
index 675478816..000000000
--- a/vendor/github.com/c2h5oh/datasize/datasize.go
+++ /dev/null
@@ -1,217 +0,0 @@
-package datasize
-
-import (
- "errors"
- "fmt"
- "strconv"
- "strings"
-)
-
-type ByteSize uint64
-
-const (
- B ByteSize = 1
- KB = B << 10
- MB = KB << 10
- GB = MB << 10
- TB = GB << 10
- PB = TB << 10
- EB = PB << 10
-
- fnUnmarshalText string = "UnmarshalText"
- maxUint64 uint64 = (1 << 64) - 1
- cutoff uint64 = maxUint64 / 10
-)
-
-var ErrBits = errors.New("unit with capital unit prefix and lower case unit (b) - bits, not bytes ")
-
-func (b ByteSize) Bytes() uint64 {
- return uint64(b)
-}
-
-func (b ByteSize) KBytes() float64 {
- v := b / KB
- r := b % KB
- return float64(v) + float64(r)/float64(KB)
-}
-
-func (b ByteSize) MBytes() float64 {
- v := b / MB
- r := b % MB
- return float64(v) + float64(r)/float64(MB)
-}
-
-func (b ByteSize) GBytes() float64 {
- v := b / GB
- r := b % GB
- return float64(v) + float64(r)/float64(GB)
-}
-
-func (b ByteSize) TBytes() float64 {
- v := b / TB
- r := b % TB
- return float64(v) + float64(r)/float64(TB)
-}
-
-func (b ByteSize) PBytes() float64 {
- v := b / PB
- r := b % PB
- return float64(v) + float64(r)/float64(PB)
-}
-
-func (b ByteSize) EBytes() float64 {
- v := b / EB
- r := b % EB
- return float64(v) + float64(r)/float64(EB)
-}
-
-func (b ByteSize) String() string {
- switch {
- case b == 0:
- return fmt.Sprint("0B")
- case b%EB == 0:
- return fmt.Sprintf("%dEB", b/EB)
- case b%PB == 0:
- return fmt.Sprintf("%dPB", b/PB)
- case b%TB == 0:
- return fmt.Sprintf("%dTB", b/TB)
- case b%GB == 0:
- return fmt.Sprintf("%dGB", b/GB)
- case b%MB == 0:
- return fmt.Sprintf("%dMB", b/MB)
- case b%KB == 0:
- return fmt.Sprintf("%dKB", b/KB)
- default:
- return fmt.Sprintf("%dB", b)
- }
-}
-
-func (b ByteSize) HR() string {
- return b.HumanReadable()
-}
-
-func (b ByteSize) HumanReadable() string {
- switch {
- case b > EB:
- return fmt.Sprintf("%.1f EB", b.EBytes())
- case b > PB:
- return fmt.Sprintf("%.1f PB", b.PBytes())
- case b > TB:
- return fmt.Sprintf("%.1f TB", b.TBytes())
- case b > GB:
- return fmt.Sprintf("%.1f GB", b.GBytes())
- case b > MB:
- return fmt.Sprintf("%.1f MB", b.MBytes())
- case b > KB:
- return fmt.Sprintf("%.1f KB", b.KBytes())
- default:
- return fmt.Sprintf("%d B", b)
- }
-}
-
-func (b ByteSize) MarshalText() ([]byte, error) {
- return []byte(b.String()), nil
-}
-
-func (b *ByteSize) UnmarshalText(t []byte) error {
- var val uint64
- var unit string
-
- // copy for error message
- t0 := t
-
- var c byte
- var i int
-
-ParseLoop:
- for i < len(t) {
- c = t[i]
- switch {
- case '0' <= c && c <= '9':
- if val > cutoff {
- goto Overflow
- }
-
- c = c - '0'
- val *= 10
-
- if val > val+uint64(c) {
- // val+v overflows
- goto Overflow
- }
- val += uint64(c)
- i++
-
- default:
- if i == 0 {
- goto SyntaxError
- }
- break ParseLoop
- }
- }
-
- unit = strings.TrimSpace(string(t[i:]))
- switch unit {
- case "Kb", "Mb", "Gb", "Tb", "Pb", "Eb":
- goto BitsError
- }
- unit = strings.ToLower(unit)
- switch unit {
- case "", "b", "byte":
- // do nothing - already in bytes
-
- case "k", "kb", "kilo", "kilobyte", "kilobytes":
- if val > maxUint64/uint64(KB) {
- goto Overflow
- }
- val *= uint64(KB)
-
- case "m", "mb", "mega", "megabyte", "megabytes":
- if val > maxUint64/uint64(MB) {
- goto Overflow
- }
- val *= uint64(MB)
-
- case "g", "gb", "giga", "gigabyte", "gigabytes":
- if val > maxUint64/uint64(GB) {
- goto Overflow
- }
- val *= uint64(GB)
-
- case "t", "tb", "tera", "terabyte", "terabytes":
- if val > maxUint64/uint64(TB) {
- goto Overflow
- }
- val *= uint64(TB)
-
- case "p", "pb", "peta", "petabyte", "petabytes":
- if val > maxUint64/uint64(PB) {
- goto Overflow
- }
- val *= uint64(PB)
-
- case "E", "EB", "e", "eb", "eB":
- if val > maxUint64/uint64(EB) {
- goto Overflow
- }
- val *= uint64(EB)
-
- default:
- goto SyntaxError
- }
-
- *b = ByteSize(val)
- return nil
-
-Overflow:
- *b = ByteSize(maxUint64)
- return &strconv.NumError{fnUnmarshalText, string(t0), strconv.ErrRange}
-
-SyntaxError:
- *b = 0
- return &strconv.NumError{fnUnmarshalText, string(t0), strconv.ErrSyntax}
-
-BitsError:
- *b = 0
- return &strconv.NumError{fnUnmarshalText, string(t0), ErrBits}
-}
diff --git a/vendor/github.com/cespare/xxhash/v2/.travis.yml b/vendor/github.com/cespare/xxhash/v2/.travis.yml
deleted file mode 100644
index c516ea88d..000000000
--- a/vendor/github.com/cespare/xxhash/v2/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: go
-go:
- - "1.x"
- - master
-env:
- - TAGS=""
- - TAGS="-tags purego"
-script: go test $TAGS -v ./...
diff --git a/vendor/github.com/cespare/xxhash/v2/LICENSE.txt b/vendor/github.com/cespare/xxhash/v2/LICENSE.txt
deleted file mode 100644
index 24b53065f..000000000
--- a/vendor/github.com/cespare/xxhash/v2/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2016 Caleb Spare
-
-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/cespare/xxhash/v2/README.md b/vendor/github.com/cespare/xxhash/v2/README.md
deleted file mode 100644
index 2fd8693c2..000000000
--- a/vendor/github.com/cespare/xxhash/v2/README.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# xxhash
-
-[](https://godoc.org/github.com/cespare/xxhash)
-[](https://travis-ci.org/cespare/xxhash)
-
-xxhash is a Go implementation of the 64-bit
-[xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a
-high-quality hashing algorithm that is much faster than anything in the Go
-standard library.
-
-This package provides a straightforward API:
-
-```
-func Sum64(b []byte) uint64
-func Sum64String(s string) uint64
-type Digest struct{ ... }
- func New() *Digest
-```
-
-The `Digest` type implements hash.Hash64. Its key methods are:
-
-```
-func (*Digest) Write([]byte) (int, error)
-func (*Digest) WriteString(string) (int, error)
-func (*Digest) Sum64() uint64
-```
-
-This implementation provides a fast pure-Go implementation and an even faster
-assembly implementation for amd64.
-
-## Compatibility
-
-This package is in a module and the latest code is in version 2 of the module.
-You need a version of Go with at least "minimal module compatibility" to use
-github.com/cespare/xxhash/v2:
-
-* 1.9.7+ for Go 1.9
-* 1.10.3+ for Go 1.10
-* Go 1.11 or later
-
-I recommend using the latest release of Go.
-
-## Benchmarks
-
-Here are some quick benchmarks comparing the pure-Go and assembly
-implementations of Sum64.
-
-| input size | purego | asm |
-| --- | --- | --- |
-| 5 B | 979.66 MB/s | 1291.17 MB/s |
-| 100 B | 7475.26 MB/s | 7973.40 MB/s |
-| 4 KB | 17573.46 MB/s | 17602.65 MB/s |
-| 10 MB | 17131.46 MB/s | 17142.16 MB/s |
-
-These numbers were generated on Ubuntu 18.04 with an Intel i7-8700K CPU using
-the following commands under Go 1.11.2:
-
-```
-$ go test -tags purego -benchtime 10s -bench '/xxhash,direct,bytes'
-$ go test -benchtime 10s -bench '/xxhash,direct,bytes'
-```
-
-## Projects using this package
-
-- [InfluxDB](https://github.com/influxdata/influxdb)
-- [Prometheus](https://github.com/prometheus/prometheus)
-- [FreeCache](https://github.com/coocood/freecache)
diff --git a/vendor/github.com/cespare/xxhash/v2/go.mod b/vendor/github.com/cespare/xxhash/v2/go.mod
deleted file mode 100644
index 49f67608b..000000000
--- a/vendor/github.com/cespare/xxhash/v2/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/cespare/xxhash/v2
-
-go 1.11
diff --git a/vendor/github.com/cespare/xxhash/v2/go.sum b/vendor/github.com/cespare/xxhash/v2/go.sum
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash.go b/vendor/github.com/cespare/xxhash/v2/xxhash.go
deleted file mode 100644
index db0b35fbe..000000000
--- a/vendor/github.com/cespare/xxhash/v2/xxhash.go
+++ /dev/null
@@ -1,236 +0,0 @@
-// Package xxhash implements the 64-bit variant of xxHash (XXH64) as described
-// at http://cyan4973.github.io/xxHash/.
-package xxhash
-
-import (
- "encoding/binary"
- "errors"
- "math/bits"
-)
-
-const (
- prime1 uint64 = 11400714785074694791
- prime2 uint64 = 14029467366897019727
- prime3 uint64 = 1609587929392839161
- prime4 uint64 = 9650029242287828579
- prime5 uint64 = 2870177450012600261
-)
-
-// NOTE(caleb): I'm using both consts and vars of the primes. Using consts where
-// possible in the Go code is worth a small (but measurable) performance boost
-// by avoiding some MOVQs. Vars are needed for the asm and also are useful for
-// convenience in the Go code in a few places where we need to intentionally
-// avoid constant arithmetic (e.g., v1 := prime1 + prime2 fails because the
-// result overflows a uint64).
-var (
- prime1v = prime1
- prime2v = prime2
- prime3v = prime3
- prime4v = prime4
- prime5v = prime5
-)
-
-// Digest implements hash.Hash64.
-type Digest struct {
- v1 uint64
- v2 uint64
- v3 uint64
- v4 uint64
- total uint64
- mem [32]byte
- n int // how much of mem is used
-}
-
-// New creates a new Digest that computes the 64-bit xxHash algorithm.
-func New() *Digest {
- var d Digest
- d.Reset()
- return &d
-}
-
-// Reset clears the Digest's state so that it can be reused.
-func (d *Digest) Reset() {
- d.v1 = prime1v + prime2
- d.v2 = prime2
- d.v3 = 0
- d.v4 = -prime1v
- d.total = 0
- d.n = 0
-}
-
-// Size always returns 8 bytes.
-func (d *Digest) Size() int { return 8 }
-
-// BlockSize always returns 32 bytes.
-func (d *Digest) BlockSize() int { return 32 }
-
-// Write adds more data to d. It always returns len(b), nil.
-func (d *Digest) Write(b []byte) (n int, err error) {
- n = len(b)
- d.total += uint64(n)
-
- if d.n+n < 32 {
- // This new data doesn't even fill the current block.
- copy(d.mem[d.n:], b)
- d.n += n
- return
- }
-
- if d.n > 0 {
- // Finish off the partial block.
- copy(d.mem[d.n:], b)
- d.v1 = round(d.v1, u64(d.mem[0:8]))
- d.v2 = round(d.v2, u64(d.mem[8:16]))
- d.v3 = round(d.v3, u64(d.mem[16:24]))
- d.v4 = round(d.v4, u64(d.mem[24:32]))
- b = b[32-d.n:]
- d.n = 0
- }
-
- if len(b) >= 32 {
- // One or more full blocks left.
- nw := writeBlocks(d, b)
- b = b[nw:]
- }
-
- // Store any remaining partial block.
- copy(d.mem[:], b)
- d.n = len(b)
-
- return
-}
-
-// Sum appends the current hash to b and returns the resulting slice.
-func (d *Digest) Sum(b []byte) []byte {
- s := d.Sum64()
- return append(
- b,
- byte(s>>56),
- byte(s>>48),
- byte(s>>40),
- byte(s>>32),
- byte(s>>24),
- byte(s>>16),
- byte(s>>8),
- byte(s),
- )
-}
-
-// Sum64 returns the current hash.
-func (d *Digest) Sum64() uint64 {
- var h uint64
-
- if d.total >= 32 {
- v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4
- h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)
- h = mergeRound(h, v1)
- h = mergeRound(h, v2)
- h = mergeRound(h, v3)
- h = mergeRound(h, v4)
- } else {
- h = d.v3 + prime5
- }
-
- h += d.total
-
- i, end := 0, d.n
- for ; i+8 <= end; i += 8 {
- k1 := round(0, u64(d.mem[i:i+8]))
- h ^= k1
- h = rol27(h)*prime1 + prime4
- }
- if i+4 <= end {
- h ^= uint64(u32(d.mem[i:i+4])) * prime1
- h = rol23(h)*prime2 + prime3
- i += 4
- }
- for i < end {
- h ^= uint64(d.mem[i]) * prime5
- h = rol11(h) * prime1
- i++
- }
-
- h ^= h >> 33
- h *= prime2
- h ^= h >> 29
- h *= prime3
- h ^= h >> 32
-
- return h
-}
-
-const (
- magic = "xxh\x06"
- marshaledSize = len(magic) + 8*5 + 32
-)
-
-// MarshalBinary implements the encoding.BinaryMarshaler interface.
-func (d *Digest) MarshalBinary() ([]byte, error) {
- b := make([]byte, 0, marshaledSize)
- b = append(b, magic...)
- b = appendUint64(b, d.v1)
- b = appendUint64(b, d.v2)
- b = appendUint64(b, d.v3)
- b = appendUint64(b, d.v4)
- b = appendUint64(b, d.total)
- b = append(b, d.mem[:d.n]...)
- b = b[:len(b)+len(d.mem)-d.n]
- return b, nil
-}
-
-// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
-func (d *Digest) UnmarshalBinary(b []byte) error {
- if len(b) < len(magic) || string(b[:len(magic)]) != magic {
- return errors.New("xxhash: invalid hash state identifier")
- }
- if len(b) != marshaledSize {
- return errors.New("xxhash: invalid hash state size")
- }
- b = b[len(magic):]
- b, d.v1 = consumeUint64(b)
- b, d.v2 = consumeUint64(b)
- b, d.v3 = consumeUint64(b)
- b, d.v4 = consumeUint64(b)
- b, d.total = consumeUint64(b)
- copy(d.mem[:], b)
- b = b[len(d.mem):]
- d.n = int(d.total % uint64(len(d.mem)))
- return nil
-}
-
-func appendUint64(b []byte, x uint64) []byte {
- var a [8]byte
- binary.LittleEndian.PutUint64(a[:], x)
- return append(b, a[:]...)
-}
-
-func consumeUint64(b []byte) ([]byte, uint64) {
- x := u64(b)
- return b[8:], x
-}
-
-func u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) }
-func u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) }
-
-func round(acc, input uint64) uint64 {
- acc += input * prime2
- acc = rol31(acc)
- acc *= prime1
- return acc
-}
-
-func mergeRound(acc, val uint64) uint64 {
- val = round(0, val)
- acc ^= val
- acc = acc*prime1 + prime4
- return acc
-}
-
-func rol1(x uint64) uint64 { return bits.RotateLeft64(x, 1) }
-func rol7(x uint64) uint64 { return bits.RotateLeft64(x, 7) }
-func rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) }
-func rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) }
-func rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) }
-func rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) }
-func rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) }
-func rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) }
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go
deleted file mode 100644
index ad14b807f..000000000
--- a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build !appengine
-// +build gc
-// +build !purego
-
-package xxhash
-
-// Sum64 computes the 64-bit xxHash digest of b.
-//
-//go:noescape
-func Sum64(b []byte) uint64
-
-//go:noescape
-func writeBlocks(d *Digest, b []byte) int
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
deleted file mode 100644
index d580e32ae..000000000
--- a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
+++ /dev/null
@@ -1,215 +0,0 @@
-// +build !appengine
-// +build gc
-// +build !purego
-
-#include "textflag.h"
-
-// Register allocation:
-// AX h
-// CX pointer to advance through b
-// DX n
-// BX loop end
-// R8 v1, k1
-// R9 v2
-// R10 v3
-// R11 v4
-// R12 tmp
-// R13 prime1v
-// R14 prime2v
-// R15 prime4v
-
-// round reads from and advances the buffer pointer in CX.
-// It assumes that R13 has prime1v and R14 has prime2v.
-#define round(r) \
- MOVQ (CX), R12 \
- ADDQ $8, CX \
- IMULQ R14, R12 \
- ADDQ R12, r \
- ROLQ $31, r \
- IMULQ R13, r
-
-// mergeRound applies a merge round on the two registers acc and val.
-// It assumes that R13 has prime1v, R14 has prime2v, and R15 has prime4v.
-#define mergeRound(acc, val) \
- IMULQ R14, val \
- ROLQ $31, val \
- IMULQ R13, val \
- XORQ val, acc \
- IMULQ R13, acc \
- ADDQ R15, acc
-
-// func Sum64(b []byte) uint64
-TEXT ·Sum64(SB), NOSPLIT, $0-32
- // Load fixed primes.
- MOVQ ·prime1v(SB), R13
- MOVQ ·prime2v(SB), R14
- MOVQ ·prime4v(SB), R15
-
- // Load slice.
- MOVQ b_base+0(FP), CX
- MOVQ b_len+8(FP), DX
- LEAQ (CX)(DX*1), BX
-
- // The first loop limit will be len(b)-32.
- SUBQ $32, BX
-
- // Check whether we have at least one block.
- CMPQ DX, $32
- JLT noBlocks
-
- // Set up initial state (v1, v2, v3, v4).
- MOVQ R13, R8
- ADDQ R14, R8
- MOVQ R14, R9
- XORQ R10, R10
- XORQ R11, R11
- SUBQ R13, R11
-
- // Loop until CX > BX.
-blockLoop:
- round(R8)
- round(R9)
- round(R10)
- round(R11)
-
- CMPQ CX, BX
- JLE blockLoop
-
- MOVQ R8, AX
- ROLQ $1, AX
- MOVQ R9, R12
- ROLQ $7, R12
- ADDQ R12, AX
- MOVQ R10, R12
- ROLQ $12, R12
- ADDQ R12, AX
- MOVQ R11, R12
- ROLQ $18, R12
- ADDQ R12, AX
-
- mergeRound(AX, R8)
- mergeRound(AX, R9)
- mergeRound(AX, R10)
- mergeRound(AX, R11)
-
- JMP afterBlocks
-
-noBlocks:
- MOVQ ·prime5v(SB), AX
-
-afterBlocks:
- ADDQ DX, AX
-
- // Right now BX has len(b)-32, and we want to loop until CX > len(b)-8.
- ADDQ $24, BX
-
- CMPQ CX, BX
- JG fourByte
-
-wordLoop:
- // Calculate k1.
- MOVQ (CX), R8
- ADDQ $8, CX
- IMULQ R14, R8
- ROLQ $31, R8
- IMULQ R13, R8
-
- XORQ R8, AX
- ROLQ $27, AX
- IMULQ R13, AX
- ADDQ R15, AX
-
- CMPQ CX, BX
- JLE wordLoop
-
-fourByte:
- ADDQ $4, BX
- CMPQ CX, BX
- JG singles
-
- MOVL (CX), R8
- ADDQ $4, CX
- IMULQ R13, R8
- XORQ R8, AX
-
- ROLQ $23, AX
- IMULQ R14, AX
- ADDQ ·prime3v(SB), AX
-
-singles:
- ADDQ $4, BX
- CMPQ CX, BX
- JGE finalize
-
-singlesLoop:
- MOVBQZX (CX), R12
- ADDQ $1, CX
- IMULQ ·prime5v(SB), R12
- XORQ R12, AX
-
- ROLQ $11, AX
- IMULQ R13, AX
-
- CMPQ CX, BX
- JL singlesLoop
-
-finalize:
- MOVQ AX, R12
- SHRQ $33, R12
- XORQ R12, AX
- IMULQ R14, AX
- MOVQ AX, R12
- SHRQ $29, R12
- XORQ R12, AX
- IMULQ ·prime3v(SB), AX
- MOVQ AX, R12
- SHRQ $32, R12
- XORQ R12, AX
-
- MOVQ AX, ret+24(FP)
- RET
-
-// writeBlocks uses the same registers as above except that it uses AX to store
-// the d pointer.
-
-// func writeBlocks(d *Digest, b []byte) int
-TEXT ·writeBlocks(SB), NOSPLIT, $0-40
- // Load fixed primes needed for round.
- MOVQ ·prime1v(SB), R13
- MOVQ ·prime2v(SB), R14
-
- // Load slice.
- MOVQ b_base+8(FP), CX
- MOVQ b_len+16(FP), DX
- LEAQ (CX)(DX*1), BX
- SUBQ $32, BX
-
- // Load vN from d.
- MOVQ d+0(FP), AX
- MOVQ 0(AX), R8 // v1
- MOVQ 8(AX), R9 // v2
- MOVQ 16(AX), R10 // v3
- MOVQ 24(AX), R11 // v4
-
- // We don't need to check the loop condition here; this function is
- // always called with at least one block of data to process.
-blockLoop:
- round(R8)
- round(R9)
- round(R10)
- round(R11)
-
- CMPQ CX, BX
- JLE blockLoop
-
- // Copy vN back to d.
- MOVQ R8, 0(AX)
- MOVQ R9, 8(AX)
- MOVQ R10, 16(AX)
- MOVQ R11, 24(AX)
-
- // The number of bytes written is CX minus the old base pointer.
- SUBQ b_base+8(FP), CX
- MOVQ CX, ret+32(FP)
-
- RET
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go
deleted file mode 100644
index 4a5a82160..000000000
--- a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// +build !amd64 appengine !gc purego
-
-package xxhash
-
-// Sum64 computes the 64-bit xxHash digest of b.
-func Sum64(b []byte) uint64 {
- // A simpler version would be
- // d := New()
- // d.Write(b)
- // return d.Sum64()
- // but this is faster, particularly for small inputs.
-
- n := len(b)
- var h uint64
-
- if n >= 32 {
- v1 := prime1v + prime2
- v2 := prime2
- v3 := uint64(0)
- v4 := -prime1v
- for len(b) >= 32 {
- v1 = round(v1, u64(b[0:8:len(b)]))
- v2 = round(v2, u64(b[8:16:len(b)]))
- v3 = round(v3, u64(b[16:24:len(b)]))
- v4 = round(v4, u64(b[24:32:len(b)]))
- b = b[32:len(b):len(b)]
- }
- h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)
- h = mergeRound(h, v1)
- h = mergeRound(h, v2)
- h = mergeRound(h, v3)
- h = mergeRound(h, v4)
- } else {
- h = prime5
- }
-
- h += uint64(n)
-
- i, end := 0, len(b)
- for ; i+8 <= end; i += 8 {
- k1 := round(0, u64(b[i:i+8:len(b)]))
- h ^= k1
- h = rol27(h)*prime1 + prime4
- }
- if i+4 <= end {
- h ^= uint64(u32(b[i:i+4:len(b)])) * prime1
- h = rol23(h)*prime2 + prime3
- i += 4
- }
- for ; i < end; i++ {
- h ^= uint64(b[i]) * prime5
- h = rol11(h) * prime1
- }
-
- h ^= h >> 33
- h *= prime2
- h ^= h >> 29
- h *= prime3
- h ^= h >> 32
-
- return h
-}
-
-func writeBlocks(d *Digest, b []byte) int {
- v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4
- n := len(b)
- for len(b) >= 32 {
- v1 = round(v1, u64(b[0:8:len(b)]))
- v2 = round(v2, u64(b[8:16:len(b)]))
- v3 = round(v3, u64(b[16:24:len(b)]))
- v4 = round(v4, u64(b[24:32:len(b)]))
- b = b[32:len(b):len(b)]
- }
- d.v1, d.v2, d.v3, d.v4 = v1, v2, v3, v4
- return n - len(b)
-}
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go
deleted file mode 100644
index fc9bea7a3..000000000
--- a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// +build appengine
-
-// This file contains the safe implementations of otherwise unsafe-using code.
-
-package xxhash
-
-// Sum64String computes the 64-bit xxHash digest of s.
-func Sum64String(s string) uint64 {
- return Sum64([]byte(s))
-}
-
-// WriteString adds more data to d. It always returns len(s), nil.
-func (d *Digest) WriteString(s string) (n int, err error) {
- return d.Write([]byte(s))
-}
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go
deleted file mode 100644
index 53bf76efb..000000000
--- a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build !appengine
-
-// This file encapsulates usage of unsafe.
-// xxhash_safe.go contains the safe implementations.
-
-package xxhash
-
-import (
- "reflect"
- "unsafe"
-)
-
-// Notes:
-//
-// See https://groups.google.com/d/msg/golang-nuts/dcjzJy-bSpw/tcZYBzQqAQAJ
-// for some discussion about these unsafe conversions.
-//
-// In the future it's possible that compiler optimizations will make these
-// unsafe operations unnecessary: https://golang.org/issue/2205.
-//
-// Both of these wrapper functions still incur function call overhead since they
-// will not be inlined. We could write Go/asm copies of Sum64 and Digest.Write
-// for strings to squeeze out a bit more speed. Mid-stack inlining should
-// eventually fix this.
-
-// Sum64String computes the 64-bit xxHash digest of s.
-// It may be faster than Sum64([]byte(s)) by avoiding a copy.
-func Sum64String(s string) uint64 {
- var b []byte
- bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
- bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
- bh.Len = len(s)
- bh.Cap = len(s)
- return Sum64(b)
-}
-
-// WriteString adds more data to d. It always returns len(s), nil.
-// It may be faster than Write([]byte(s)) by avoiding a copy.
-func (d *Digest) WriteString(s string) (n int, err error) {
- var b []byte
- bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
- bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
- bh.Len = len(s)
- bh.Cap = len(s)
- return d.Write(b)
-}
diff --git a/vendor/github.com/client9/misspell/.gitignore b/vendor/github.com/client9/misspell/.gitignore
deleted file mode 100644
index b1b707e32..000000000
--- a/vendor/github.com/client9/misspell/.gitignore
+++ /dev/null
@@ -1,34 +0,0 @@
-dist/
-bin/
-vendor/
-
-# editor turds
-*~
-*.gz
-*.bz2
-*.csv
-
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
diff --git a/vendor/github.com/client9/misspell/.travis.yml b/vendor/github.com/client9/misspell/.travis.yml
deleted file mode 100644
index e63e6c2bd..000000000
--- a/vendor/github.com/client9/misspell/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-sudo: required
-dist: trusty
-group: edge
-language: go
-go:
- - "1.10"
-git:
- depth: 1
-
-script:
- - ./scripts/travis.sh
-
-# calls goreleaser when a new tag is pushed
-deploy:
-- provider: script
- skip_cleanup: true
- script: curl -sL http://git.io/goreleaser | bash
- on:
- tags: true
- condition: $TRAVIS_OS_NAME = linux
diff --git a/vendor/github.com/client9/misspell/Dockerfile b/vendor/github.com/client9/misspell/Dockerfile
deleted file mode 100644
index b8ea37b4c..000000000
--- a/vendor/github.com/client9/misspell/Dockerfile
+++ /dev/null
@@ -1,37 +0,0 @@
-FROM golang:1.10.0-alpine
-
-# cache buster
-RUN echo 4
-
-# git is needed for "go get" below
-RUN apk add --no-cache git make
-
-# these are my standard testing / linting tools
-RUN /bin/true \
- && go get -u github.com/golang/dep/cmd/dep \
- && go get -u github.com/alecthomas/gometalinter \
- && gometalinter --install \
- && rm -rf /go/src /go/pkg
-#
-# * SCOWL word list
-#
-# Downloads
-# http://wordlist.aspell.net/dicts/
-# --> http://app.aspell.net/create
-#
-
-# use en_US large size
-# use regular size for others
-ENV SOURCE_US_BIG http://app.aspell.net/create?max_size=70&spelling=US&max_variant=2&diacritic=both&special=hacker&special=roman-numerals&download=wordlist&encoding=utf-8&format=inline
-
-# should be able tell difference between English variations using this
-ENV SOURCE_US http://app.aspell.net/create?max_size=60&spelling=US&max_variant=1&diacritic=both&download=wordlist&encoding=utf-8&format=inline
-ENV SOURCE_GB_ISE http://app.aspell.net/create?max_size=60&spelling=GBs&max_variant=2&diacritic=both&download=wordlist&encoding=utf-8&format=inline
-ENV SOURCE_GB_IZE http://app.aspell.net/create?max_size=60&spelling=GBz&max_variant=2&diacritic=both&download=wordlist&encoding=utf-8&format=inline
-ENV SOURCE_CA http://app.aspell.net/create?max_size=60&spelling=CA&max_variant=2&diacritic=both&download=wordlist&encoding=utf-8&format=inline
-
-RUN /bin/true \
- && mkdir /scowl-wl \
- && wget -O /scowl-wl/words-US-60.txt ${SOURCE_US} \
- && wget -O /scowl-wl/words-GB-ise-60.txt ${SOURCE_GB_ISE}
-
diff --git a/vendor/github.com/client9/misspell/Gopkg.lock b/vendor/github.com/client9/misspell/Gopkg.lock
deleted file mode 100644
index 90ed45115..000000000
--- a/vendor/github.com/client9/misspell/Gopkg.lock
+++ /dev/null
@@ -1,24 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
- name = "github.com/gobwas/glob"
- packages = [
- ".",
- "compiler",
- "match",
- "syntax",
- "syntax/ast",
- "syntax/lexer",
- "util/runes",
- "util/strings"
- ]
- revision = "5ccd90ef52e1e632236f7326478d4faa74f99438"
- version = "v0.2.3"
-
-[solve-meta]
- analyzer-name = "dep"
- analyzer-version = 1
- inputs-digest = "087ea4c49358ea8258ad9edfe514cd5ce9975c889c258e5ec7b5d2b720aae113"
- solver-name = "gps-cdcl"
- solver-version = 1
diff --git a/vendor/github.com/client9/misspell/Gopkg.toml b/vendor/github.com/client9/misspell/Gopkg.toml
deleted file mode 100644
index e9b8e6a45..000000000
--- a/vendor/github.com/client9/misspell/Gopkg.toml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Gopkg.toml example
-#
-# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
-# for detailed Gopkg.toml documentation.
-#
-# required = ["github.com/user/thing/cmd/thing"]
-# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
-#
-# [[constraint]]
-# name = "github.com/user/project"
-# version = "1.0.0"
-#
-# [[constraint]]
-# name = "github.com/user/project2"
-# branch = "dev"
-# source = "github.com/myfork/project2"
-#
-# [[override]]
-# name = "github.com/x/y"
-# version = "2.4.0"
-#
-# [prune]
-# non-go = false
-# go-tests = true
-# unused-packages = true
-
-
-[[constraint]]
- name = "github.com/gobwas/glob"
- version = "0.2.3"
-
-[prune]
- go-tests = true
- unused-packages = true
diff --git a/vendor/github.com/client9/misspell/LICENSE b/vendor/github.com/client9/misspell/LICENSE
deleted file mode 100644
index 423e1f9e0..000000000
--- a/vendor/github.com/client9/misspell/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015-2017 Nick Galbreath
-
-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/client9/misspell/Makefile b/vendor/github.com/client9/misspell/Makefile
deleted file mode 100644
index 862ab77b0..000000000
--- a/vendor/github.com/client9/misspell/Makefile
+++ /dev/null
@@ -1,74 +0,0 @@
-CONTAINER=nickg/misspell
-
-install: ## install misspell into GOPATH/bin
- go install ./cmd/misspell
-
-build: hooks ## build and lint misspell
- ./scripts/build.sh
-
-test: ## run all tests
- go test .
-
-# real publishing is done only by travis
-publish: ## test goreleaser
- ./scripts/goreleaser-dryrun.sh
-
-# the grep in line 2 is to remove misspellings in the spelling dictionary
-# that trigger false positives!!
-falsepositives: /scowl-wl
- cat /scowl-wl/words-US-60.txt | \
- grep -i -v -E "payed|Tyre|Euclidian|nonoccurence|dependancy|reenforced|accidently|surprize|dependance|idealogy|binominal|causalities|conquerer|withing|casette|analyse|analogue|dialogue|paralyse|catalogue|archaeolog|clarinettist|catalyses|cancell|chisell|ageing|cataloguing" | \
- misspell -debug -error
- cat /scowl-wl/words-GB-ise-60.txt | \
- grep -v -E "payed|nonoccurence|withing" | \
- misspell -locale=UK -debug -error
-# cat /scowl-wl/words-GB-ize-60.txt | \
-# grep -v -E "withing" | \
-# misspell -debug -error
-# cat /scowl-wl/words-CA-60.txt | \
-# grep -v -E "withing" | \
-# misspell -debug -error
-
-bench: ## run benchmarks
- go test -bench '.*'
-
-clean: ## clean up time
- rm -rf dist/ bin/
- go clean ./...
- git gc --aggressive
-
-ci: ## run test like travis-ci does, requires docker
- docker run --rm \
- -v $(PWD):/go/src/github.com/client9/misspell \
- -w /go/src/github.com/client9/misspell \
- ${CONTAINER} \
- make build falsepositives
-
-docker-build: ## build a docker test image
- docker build -t ${CONTAINER} .
-
-docker-pull: ## pull latest test image
- docker pull ${CONTAINER}
-
-docker-console: ## log into the test image
- docker run --rm -it \
- -v $(PWD):/go/src/github.com/client9/misspell \
- -w /go/src/github.com/client9/misspell \
- ${CONTAINER} sh
-
-.git/hooks/pre-commit: scripts/pre-commit.sh
- cp -f scripts/pre-commit.sh .git/hooks/pre-commit
-.git/hooks/commit-msg: scripts/commit-msg.sh
- cp -f scripts/commit-msg.sh .git/hooks/commit-msg
-hooks: .git/hooks/pre-commit .git/hooks/commit-msg ## install git precommit hooks
-
-.PHONY: help ci console docker-build bench
-
-# https://www.client9.com/self-documenting-makefiles/
-help:
- @awk -F ':|##' '/^[^\t].+?:.*?##/ {\
- printf "\033[36m%-30s\033[0m %s\n", $$1, $$NF \
- }' $(MAKEFILE_LIST)
-.DEFAULT_GOAL=help
-.PHONY=help
-
diff --git a/vendor/github.com/client9/misspell/README.md b/vendor/github.com/client9/misspell/README.md
deleted file mode 100644
index 5b68af04d..000000000
--- a/vendor/github.com/client9/misspell/README.md
+++ /dev/null
@@ -1,424 +0,0 @@
-[](https://travis-ci.org/client9/misspell) [](https://goreportcard.com/report/github.com/client9/misspell) [](https://godoc.org/github.com/client9/misspell) [](http://gocover.io/github.com/client9/misspell) [](https://raw.githubusercontent.com/client9/misspell/master/LICENSE)
-
-Correct commonly misspelled English words... quickly.
-
-### Install
-
-
-If you just want a binary and to start using `misspell`:
-
-```
-curl -L -o ./install-misspell.sh https://git.io/misspell
-sh ./install-misspell.sh
-```
-
-
-Both will install as `./bin/misspell`. You can adjust the download location using the `-b` flag. File a ticket if you want another platform supported.
-
-
-If you use [Go](https://golang.org/), the best way to run `misspell` is by using [gometalinter](#gometalinter). Otherwise, install `misspell` the old-fashioned way:
-
-```
-go get -u github.com/client9/misspell/cmd/misspell
-```
-
-and misspell will be in your `GOPATH`
-
-
-Also if you like to live dangerously, one could do
-
-```bash
-curl -L https://git.io/misspell | bash
-```
-
-### Usage
-
-
-```bash
-$ misspell all.html your.txt important.md files.go
-your.txt:42:10 found "langauge" a misspelling of "language"
-
-# ^ file, line, column
-```
-
-```
-$ misspell -help
-Usage of misspell:
- -debug
- Debug matching, very slow
- -error
- Exit with 2 if misspelling found
- -f string
- 'csv', 'sqlite3' or custom Golang template for output
- -i string
- ignore the following corrections, comma separated
- -j int
- Number of workers, 0 = number of CPUs
- -legal
- Show legal information and exit
- -locale string
- Correct spellings using locale perferances for US or UK. Default is to use a neutral variety of English. Setting locale to US will correct the British spelling of 'colour' to 'color'
- -o string
- output file or [stderr|stdout|] (default "stdout")
- -q Do not emit misspelling output
- -source string
- Source mode: auto=guess, go=golang source, text=plain or markdown-like text (default "auto")
- -w Overwrite file with corrections (default is just to display)
-```
-
-## FAQ
-
-* [Automatic Corrections](#correct)
-* [Converting UK spellings to US](#locale)
-* [Using pipes and stdin](#stdin)
-* [Golang special support](#golang)
-* [gometalinter support](#gometalinter)
-* [CSV Output](#csv)
-* [Using SQLite3](#sqlite)
-* [Changing output format](#output)
-* [Checking a folder recursively](#recursive)
-* [Performance](#performance)
-* [Known Issues](#issues)
-* [Debugging](#debug)
-* [False Negatives and missing words](#missing)
-* [Origin of Word Lists](#words)
-* [Software License](#license)
-* [Problem statement](#problem)
-* [Other spelling correctors](#others)
-* [Other ideas](#otherideas)
-
-
-### How can I make the corrections automatically?
-
-Just add the `-w` flag!
-
-```
-$ misspell -w all.html your.txt important.md files.go
-your.txt:9:21:corrected "langauge" to "language"
-
-# ^ File is rewritten only if a misspelling is found
-```
-
-
-### How do I convert British spellings to American (or vice-versa)?
-
-Add the `-locale US` flag!
-
-```bash
-$ misspell -locale US important.txt
-important.txt:10:20 found "colour" a misspelling of "color"
-```
-
-Add the `-locale UK` flag!
-
-```bash
-$ echo "My favorite color is blue" | misspell -locale UK
-stdin:1:3:found "favorite color" a misspelling of "favourite colour"
-```
-
-Help is appreciated as I'm neither British nor an
-expert in the English language.
-
-
-### How do you check an entire folder recursively?
-
-Just list a directory you'd like to check
-
-```bash
-misspell .
-misspell aDirectory anotherDirectory aFile
-```
-
-You can also run misspell recursively using the following shell tricks:
-
-```bash
-misspell directory/**/*
-```
-
-or
-
-```bash
-find . -type f | xargs misspell
-```
-
-You can select a type of file as well. The following examples selects all `.txt` files that are *not* in the `vendor` directory:
-
-```bash
-find . -type f -name '*.txt' | grep -v vendor/ | xargs misspell -error
-```
-
-
-### Can I use pipes or `stdin` for input?
-
-Yes!
-
-Print messages to `stderr` only:
-
-```bash
-$ echo "zeebra" | misspell
-stdin:1:0:found "zeebra" a misspelling of "zebra"
-```
-
-Print messages to `stderr`, and corrected text to `stdout`:
-
-```bash
-$ echo "zeebra" | misspell -w
-stdin:1:0:corrected "zeebra" to "zebra"
-zebra
-```
-
-Only print the corrected text to `stdout`:
-
-```bash
-$ echo "zeebra" | misspell -w -q
-zebra
-```
-
-
-### Are there special rules for golang source files?
-
-Yes! If the file ends in `.go`, then misspell will only check spelling in
-comments.
-
-If you want to force a file to be checked as a golang source, use `-source=go`
-on the command line. Conversely, you can check a golang source as if it were
-pure text by using `-source=text`. You might want to do this since many
-variable names have misspellings in them!
-
-### Can I check only-comments in other other programming languages?
-
-I'm told the using `-source=go` works well for ruby, javascript, java, c and
-c++.
-
-It doesn't work well for python and bash.
-
-
-### Does this work with gometalinter?
-
-[gometalinter](https://github.com/alecthomas/gometalinter) runs
-multiple golang linters. Starting on [2016-06-12](https://github.com/alecthomas/gometalinter/pull/134)
-gometalinter supports `misspell` natively but it is disabled by default.
-
-```bash
-# update your copy of gometalinter
-go get -u github.com/alecthomas/gometalinter
-
-# install updates and misspell
-gometalinter --install --update
-```
-
-To use, just enable `misspell`
-
-```
-gometalinter --enable misspell ./...
-```
-
-Note that gometalinter only checks golang files, and uses the default options
-of `misspell`
-
-You may wish to run this on your plaintext (.txt) and/or markdown files too.
-
-
-
-### How Can I Get CSV Output?
-
-Using `-f csv`, the output is standard comma-seprated values with headers in the first row.
-
-```
-misspell -f csv *
-file,line,column,typo,corrected
-"README.md",9,22,langauge,language
-"README.md",47,25,langauge,language
-```
-
-
-### How can I export to SQLite3?
-
-Using `-f sqlite`, the output is a [sqlite3](https://www.sqlite.org/index.html) dump-file.
-
-```bash
-$ misspell -f sqlite * > /tmp/misspell.sql
-$ cat /tmp/misspell.sql
-
-PRAGMA foreign_keys=OFF;
-BEGIN TRANSACTION;
-CREATE TABLE misspell(
- "file" TEXT,
- "line" INTEGER,i
- "column" INTEGER,i
- "typo" TEXT,
- "corrected" TEXT
-);
-INSERT INTO misspell VALUES("install.txt",202,31,"immediatly","immediately");
-# etc...
-COMMIT;
-```
-
-```bash
-$ sqlite3 -init /tmp/misspell.sql :memory: 'select count(*) from misspell'
-1
-```
-
-With some tricks you can directly pipe output to sqlite3 by using `-init /dev/stdin`:
-
-```
-misspell -f sqlite * | sqlite3 -init /dev/stdin -column -cmd '.width 60 15' ':memory' \
- 'select substr(file,35),typo,count(*) as count from misspell group by file, typo order by count desc;'
-```
-
-
-### How can I ignore rules?
-
-Using the `-i "comma,separated,rules"` flag you can specify corrections to ignore.
-
-For example, if you were to run `misspell -w -error -source=text` against document that contains the string `Guy Finkelshteyn Braswell`, misspell would change the text to `Guy Finkelstheyn Bras well`. You can then
-determine the rules to ignore by reverting the change and running the with the `-debug` flag. You can then see
-that the corrections were `htey -> they` and `aswell -> as well`. To ignore these two rules, you add `-i "htey,aswell"` to
-your command. With debug mode on, you can see it print the corrections, but it will no longer make them.
-
-
-### How can I change the output format?
-
-Using the `-f template` flag you can pass in a
-[golang text template](https://golang.org/pkg/text/template/) to format the output.
-
-One can use `printf "%q" VALUE` to safely quote a value.
-
-The default template is compatible with [gometalinter](https://github.com/alecthomas/gometalinter)
-```
-{{ .Filename }}:{{ .Line }}:{{ .Column }}:corrected {{ printf "%q" .Original }} to "{{ printf "%q" .Corrected }}"
-```
-
-To just print probable misspellings:
-
-```
--f '{{ .Original }}'
-```
-
-
-### What problem does this solve?
-
-This corrects commonly misspelled English words in computer source
-code, and other text-based formats (`.txt`, `.md`, etc).
-
-It is designed to run quickly so it can be
-used as a [pre-commit hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
-with minimal burden on the developer.
-
-It does not work with binary formats (e.g. Word, etc).
-
-It is not a complete spell-checking program nor a grammar checker.
-
-
-### What are other misspelling correctors and what's wrong with them?
-
-Some other misspelling correctors:
-
-* https://github.com/vlajos/misspell_fixer
-* https://github.com/lyda/misspell-check
-* https://github.com/lucasdemarchi/codespell
-
-They all work but had problems that prevented me from using them at scale:
-
-* slow, all of the above check one misspelling at a time (i.e. linear) using regexps
-* not MIT/Apache2 licensed (or equivalent)
-* have dependencies that don't work for me (python3, bash, linux sed, etc)
-* don't understand American vs. British English and sometimes makes unwelcome "corrections"
-
-That said, they might be perfect for you and many have more features
-than this project!
-
-
-### How fast is it?
-
-Misspell is easily 100x to 1000x faster than other spelling correctors. You
-should be able to check and correct 1000 files in under 250ms.
-
-This uses the mighty power of golang's
-[strings.Replacer](https://golang.org/pkg/strings/#Replacer) which is
-a implementation or variation of the
-[Aho–Corasick algorithm](https://en.wikipedia.org/wiki/Aho–Corasick_algorithm).
-This makes multiple substring matches *simultaneously*.
-
-In addition this uses multiple CPU cores to work on multiple files.
-
-
-### What problems does it have?
-
-Unlike the other projects, this doesn't know what a "word" is. There may be
-more false positives and false negatives due to this. On the other hand, it
-sometimes catches things others don't.
-
-Either way, please file bugs and we'll fix them!
-
-Since it operates in parallel to make corrections, it can be non-obvious to
-determine exactly what word was corrected.
-
-
-### It's making mistakes. How can I debug?
-
-Run using `-debug` flag on the file you want. It should then print what word
-it is trying to correct. Then [file a
-bug](https://github.com/client9/misspell/issues) describing the problem.
-Thanks!
-
-
-### Why is it making mistakes or missing items in golang files?
-
-The matching function is *case-sensitive*, so variable names that are multiple
-worlds either in all-upper or all-lower case sometimes can cause false
-positives. For instance a variable named `bodyreader` could trigger a false
-positive since `yrea` is in the middle that could be corrected to `year`.
-Other problems happen if the variable name uses a English contraction that
-should use an apostrophe. The best way of fixing this is to use the
-[Effective Go naming
-conventions](https://golang.org/doc/effective_go.html#mixed-caps) and use
-[camelCase](https://en.wikipedia.org/wiki/CamelCase) for variable names. You
-can check your code using [golint](https://github.com/golang/lint)
-
-
-### What license is this?
-
-The main code is [MIT](https://github.com/client9/misspell/blob/master/LICENSE).
-
-Misspell also makes uses of the Golang standard library and contains a modified version of Golang's [strings.Replacer](https://golang.org/pkg/strings/#Replacer)
-which are covered under a [BSD License](https://github.com/golang/go/blob/master/LICENSE). Type `misspell -legal` for more details or see [legal.go](https://github.com/client9/misspell/blob/master/legal.go)
-
-
-### Where do the word lists come from?
-
-It started with a word list from
-[Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines).
-Unfortunately, this list had to be highly edited as many of the words are
-obsolete or based from mistakes on mechanical typewriters (I'm guessing).
-
-Additional words were added based on actually mistakes seen in
-the wild (meaning self-generated).
-
-Variations of UK and US spellings are based on many sources including:
-
-* http://www.tysto.com/uk-us-spelling-list.html (with heavy editing, many are incorrect)
-* http://www.oxforddictionaries.com/us/words/american-and-british-spelling-american (excellent site but incomplete)
-* Diffing US and UK [scowl dictionaries](http://wordlist.aspell.net)
-
-American English is more accepting of spelling variations than is British
-English, so "what is American or not" is subject to opinion. Corrections and help welcome.
-
-
-### What are some other enhancements that could be done?
-
-Here's some ideas for enhancements:
-
-*Capitalization of proper nouns* could be done (e.g. weekday and month names, country names, language names)
-
-*Opinionated US spellings* US English has a number of words with alternate
-spellings. Think [adviser vs.
-advisor](http://grammarist.com/spelling/adviser-advisor/). While "advisor" is not wrong, the opinionated US
-locale would correct "advisor" to "adviser".
-
-*Versioning* Some type of versioning is needed so reporting mistakes and errors is easier.
-
-*Feedback* Mistakes would be sent to some server for agregation and feedback review.
-
-*Contractions and Apostrophes* This would optionally correct "isnt" to
-"isn't", etc.
diff --git a/vendor/github.com/client9/misspell/RELEASE-HOWTO.md b/vendor/github.com/client9/misspell/RELEASE-HOWTO.md
deleted file mode 100644
index 55b52d962..000000000
--- a/vendor/github.com/client9/misspell/RELEASE-HOWTO.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Release HOWTO
-
-since I forget.
-
-
-1. Review existing tags and pick new release number
-
- ```sh
- git tag
- ```
-
-2. Tag locally
-
- ```sh
- git tag -a v0.1.0 -m "First release"
- ```
-
- If things get screwed up, delete the tag with
-
- ```sh
- git tag -d v0.1.0
- ```
-
-3. Test goreleaser
-
- TODO: how to install goreleaser
-
- ```sh
- ./scripts/goreleaser-dryrun.sh
- ```
-
-4. Push
-
- ```bash
- git push origin v0.1.0
- ```
-
-5. Verify release and edit notes. See https://github.com/client9/misspell/releases
diff --git a/vendor/github.com/client9/misspell/ascii.go b/vendor/github.com/client9/misspell/ascii.go
deleted file mode 100644
index 1430718d6..000000000
--- a/vendor/github.com/client9/misspell/ascii.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package misspell
-
-// ByteToUpper converts an ascii byte to upper cases
-// Uses a branchless algorithm
-func ByteToUpper(x byte) byte {
- b := byte(0x80) | x
- c := b - byte(0x61)
- d := ^(b - byte(0x7b))
- e := (c & d) & (^x & 0x7f)
- return x - (e >> 2)
-}
-
-// ByteToLower converts an ascii byte to lower case
-// uses a branchless algorithm
-func ByteToLower(eax byte) byte {
- ebx := eax&byte(0x7f) + byte(0x25)
- ebx = ebx&byte(0x7f) + byte(0x1a)
- ebx = ((ebx & ^eax) >> 2) & byte(0x20)
- return eax + ebx
-}
-
-// ByteEqualFold does ascii compare, case insensitive
-func ByteEqualFold(a, b byte) bool {
- return a == b || ByteToLower(a) == ByteToLower(b)
-}
-
-// StringEqualFold ASCII case-insensitive comparison
-// golang toUpper/toLower for both bytes and strings
-// appears to be Unicode based which is super slow
-// based from https://codereview.appspot.com/5180044/patch/14007/21002
-func StringEqualFold(s1, s2 string) bool {
- if len(s1) != len(s2) {
- return false
- }
- for i := 0; i < len(s1); i++ {
- c1 := s1[i]
- c2 := s2[i]
- // c1 & c2
- if c1 != c2 {
- c1 |= 'a' - 'A'
- c2 |= 'a' - 'A'
- if c1 != c2 || c1 < 'a' || c1 > 'z' {
- return false
- }
- }
- }
- return true
-}
-
-// StringHasPrefixFold is similar to strings.HasPrefix but comparison
-// is done ignoring ASCII case.
-// /
-func StringHasPrefixFold(s1, s2 string) bool {
- // prefix is bigger than input --> false
- if len(s1) < len(s2) {
- return false
- }
- if len(s1) == len(s2) {
- return StringEqualFold(s1, s2)
- }
- return StringEqualFold(s1[:len(s2)], s2)
-}
diff --git a/vendor/github.com/client9/misspell/case.go b/vendor/github.com/client9/misspell/case.go
deleted file mode 100644
index 2ea3850df..000000000
--- a/vendor/github.com/client9/misspell/case.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package misspell
-
-import (
- "strings"
-)
-
-// WordCase is an enum of various word casing styles
-type WordCase int
-
-// Various WordCase types.. likely to be not correct
-const (
- CaseUnknown WordCase = iota
- CaseLower
- CaseUpper
- CaseTitle
-)
-
-// CaseStyle returns what case style a word is in
-func CaseStyle(word string) WordCase {
- upperCount := 0
- lowerCount := 0
-
- // this iterates over RUNES not BYTES
- for i := 0; i < len(word); i++ {
- ch := word[i]
- switch {
- case ch >= 'a' && ch <= 'z':
- lowerCount++
- case ch >= 'A' && ch <= 'Z':
- upperCount++
- }
- }
-
- switch {
- case upperCount != 0 && lowerCount == 0:
- return CaseUpper
- case upperCount == 0 && lowerCount != 0:
- return CaseLower
- case upperCount == 1 && lowerCount > 0 && word[0] >= 'A' && word[0] <= 'Z':
- return CaseTitle
- }
- return CaseUnknown
-}
-
-// CaseVariations returns
-// If AllUpper or First-Letter-Only is upcased: add the all upper case version
-// If AllLower, add the original, the title and upcase forms
-// If Mixed, return the original, and the all upcase form
-//
-func CaseVariations(word string, style WordCase) []string {
- switch style {
- case CaseLower:
- return []string{word, strings.ToUpper(word[0:1]) + word[1:], strings.ToUpper(word)}
- case CaseUpper:
- return []string{strings.ToUpper(word)}
- default:
- return []string{word, strings.ToUpper(word)}
- }
-}
diff --git a/vendor/github.com/client9/misspell/cmd/misspell/main.go b/vendor/github.com/client9/misspell/cmd/misspell/main.go
deleted file mode 100644
index 174d79d88..000000000
--- a/vendor/github.com/client9/misspell/cmd/misspell/main.go
+++ /dev/null
@@ -1,326 +0,0 @@
-// The misspell command corrects commonly misspelled English words in source files.
-package main
-
-import (
- "bytes"
- "flag"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "os"
- "path/filepath"
- "runtime"
- "strings"
- "text/template"
- "time"
-
- "github.com/client9/misspell"
-)
-
-var (
- defaultWrite *template.Template
- defaultRead *template.Template
-
- stdout *log.Logger
- debug *log.Logger
-
- version = "dev"
-)
-
-const (
- // Note for gometalinter it must be "File:Line:Column: Msg"
- // note space beteen ": Msg"
- defaultWriteTmpl = `{{ .Filename }}:{{ .Line }}:{{ .Column }}: corrected "{{ .Original }}" to "{{ .Corrected }}"`
- defaultReadTmpl = `{{ .Filename }}:{{ .Line }}:{{ .Column }}: "{{ .Original }}" is a misspelling of "{{ .Corrected }}"`
- csvTmpl = `{{ printf "%q" .Filename }},{{ .Line }},{{ .Column }},{{ .Original }},{{ .Corrected }}`
- csvHeader = `file,line,column,typo,corrected`
- sqliteTmpl = `INSERT INTO misspell VALUES({{ printf "%q" .Filename }},{{ .Line }},{{ .Column }},{{ printf "%q" .Original }},{{ printf "%q" .Corrected }});`
- sqliteHeader = `PRAGMA foreign_keys=OFF;
-BEGIN TRANSACTION;
-CREATE TABLE misspell(
- "file" TEXT, "line" INTEGER, "column" INTEGER, "typo" TEXT, "corrected" TEXT
-);`
- sqliteFooter = "COMMIT;"
-)
-
-func worker(writeit bool, r *misspell.Replacer, mode string, files <-chan string, results chan<- int) {
- count := 0
- for filename := range files {
- orig, err := misspell.ReadTextFile(filename)
- if err != nil {
- log.Println(err)
- continue
- }
- if len(orig) == 0 {
- continue
- }
-
- debug.Printf("Processing %s", filename)
-
- var updated string
- var changes []misspell.Diff
-
- if mode == "go" {
- updated, changes = r.ReplaceGo(orig)
- } else {
- updated, changes = r.Replace(orig)
- }
-
- if len(changes) == 0 {
- continue
- }
- count += len(changes)
- for _, diff := range changes {
- // add in filename
- diff.Filename = filename
-
- // output can be done by doing multiple goroutines
- // and can clobber os.Stdout.
- //
- // the log package can be used simultaneously from multiple goroutines
- var output bytes.Buffer
- if writeit {
- defaultWrite.Execute(&output, diff)
- } else {
- defaultRead.Execute(&output, diff)
- }
-
- // goroutine-safe print to os.Stdout
- stdout.Println(output.String())
- }
-
- if writeit {
- ioutil.WriteFile(filename, []byte(updated), 0)
- }
- }
- results <- count
-}
-
-func main() {
- t := time.Now()
- var (
- workers = flag.Int("j", 0, "Number of workers, 0 = number of CPUs")
- writeit = flag.Bool("w", false, "Overwrite file with corrections (default is just to display)")
- quietFlag = flag.Bool("q", false, "Do not emit misspelling output")
- outFlag = flag.String("o", "stdout", "output file or [stderr|stdout|]")
- format = flag.String("f", "", "'csv', 'sqlite3' or custom Golang template for output")
- ignores = flag.String("i", "", "ignore the following corrections, comma separated")
- locale = flag.String("locale", "", "Correct spellings using locale perferances for US or UK. Default is to use a neutral variety of English. Setting locale to US will correct the British spelling of 'colour' to 'color'")
- mode = flag.String("source", "auto", "Source mode: auto=guess, go=golang source, text=plain or markdown-like text")
- debugFlag = flag.Bool("debug", false, "Debug matching, very slow")
- exitError = flag.Bool("error", false, "Exit with 2 if misspelling found")
- showVersion = flag.Bool("v", false, "Show version and exit")
-
- showLegal = flag.Bool("legal", false, "Show legal information and exit")
- )
- flag.Parse()
-
- if *showVersion {
- fmt.Println(version)
- return
- }
- if *showLegal {
- fmt.Println(misspell.Legal)
- return
- }
- if *debugFlag {
- debug = log.New(os.Stderr, "DEBUG ", 0)
- } else {
- debug = log.New(ioutil.Discard, "", 0)
- }
-
- r := misspell.Replacer{
- Replacements: misspell.DictMain,
- Debug: *debugFlag,
- }
- //
- // Figure out regional variations
- //
- switch strings.ToUpper(*locale) {
- case "":
- // nothing
- case "US":
- r.AddRuleList(misspell.DictAmerican)
- case "UK", "GB":
- r.AddRuleList(misspell.DictBritish)
- case "NZ", "AU", "CA":
- log.Fatalf("Help wanted. https://github.com/client9/misspell/issues/6")
- default:
- log.Fatalf("Unknown locale: %q", *locale)
- }
-
- //
- // Stuff to ignore
- //
- if len(*ignores) > 0 {
- r.RemoveRule(strings.Split(*ignores, ","))
- }
-
- //
- // Source input mode
- //
- switch *mode {
- case "auto":
- case "go":
- case "text":
- default:
- log.Fatalf("Mode must be one of auto=guess, go=golang source, text=plain or markdown-like text")
- }
-
- //
- // Custom output
- //
- switch {
- case *format == "csv":
- tmpl := template.Must(template.New("csv").Parse(csvTmpl))
- defaultWrite = tmpl
- defaultRead = tmpl
- stdout.Println(csvHeader)
- case *format == "sqlite" || *format == "sqlite3":
- tmpl := template.Must(template.New("sqlite3").Parse(sqliteTmpl))
- defaultWrite = tmpl
- defaultRead = tmpl
- stdout.Println(sqliteHeader)
- case len(*format) > 0:
- t, err := template.New("custom").Parse(*format)
- if err != nil {
- log.Fatalf("Unable to compile log format: %s", err)
- }
- defaultWrite = t
- defaultRead = t
- default: // format == ""
- defaultWrite = template.Must(template.New("defaultWrite").Parse(defaultWriteTmpl))
- defaultRead = template.Must(template.New("defaultRead").Parse(defaultReadTmpl))
- }
-
- // we cant't just write to os.Stdout directly since we have multiple goroutine
- // all writing at the same time causing broken output. Log is routine safe.
- // we see it so it doesn't use a prefix or include a time stamp.
- switch {
- case *quietFlag || *outFlag == "/dev/null":
- stdout = log.New(ioutil.Discard, "", 0)
- case *outFlag == "/dev/stderr" || *outFlag == "stderr":
- stdout = log.New(os.Stderr, "", 0)
- case *outFlag == "/dev/stdout" || *outFlag == "stdout":
- stdout = log.New(os.Stdout, "", 0)
- case *outFlag == "" || *outFlag == "-":
- stdout = log.New(os.Stdout, "", 0)
- default:
- fo, err := os.Create(*outFlag)
- if err != nil {
- log.Fatalf("unable to create outfile %q: %s", *outFlag, err)
- }
- defer fo.Close()
- stdout = log.New(fo, "", 0)
- }
-
- //
- // Number of Workers / CPU to use
- //
- if *workers < 0 {
- log.Fatalf("-j must >= 0")
- }
- if *workers == 0 {
- *workers = runtime.NumCPU()
- }
- if *debugFlag {
- *workers = 1
- }
-
- //
- // Done with Flags.
- // Compile the Replacer and process files
- //
- r.Compile()
-
- args := flag.Args()
- debug.Printf("initialization complete in %v", time.Since(t))
-
- // stdin/stdout
- if len(args) == 0 {
- // if we are working with pipes/stdin/stdout
- // there is no concurrency, so we can directly
- // send data to the writers
- var fileout io.Writer
- var errout io.Writer
- switch *writeit {
- case true:
- // if we ARE writing the corrected stream
- // the corrected stream goes to stdout
- // and the misspelling errors goes to stderr
- // so we can do something like this:
- // curl something | misspell -w | gzip > afile.gz
- fileout = os.Stdout
- errout = os.Stderr
- case false:
- // if we are not writing out the corrected stream
- // then work just like files. Misspelling errors
- // are sent to stdout
- fileout = ioutil.Discard
- errout = os.Stdout
- }
- count := 0
- next := func(diff misspell.Diff) {
- count++
-
- // don't even evaluate the output templates
- if *quietFlag {
- return
- }
- diff.Filename = "stdin"
- if *writeit {
- defaultWrite.Execute(errout, diff)
- } else {
- defaultRead.Execute(errout, diff)
- }
- errout.Write([]byte{'\n'})
-
- }
- err := r.ReplaceReader(os.Stdin, fileout, next)
- if err != nil {
- os.Exit(1)
- }
- switch *format {
- case "sqlite", "sqlite3":
- fileout.Write([]byte(sqliteFooter))
- }
- if count != 0 && *exitError {
- // error
- os.Exit(2)
- }
- return
- }
-
- c := make(chan string, 64)
- results := make(chan int, *workers)
-
- for i := 0; i < *workers; i++ {
- go worker(*writeit, &r, *mode, c, results)
- }
-
- for _, filename := range args {
- filepath.Walk(filename, func(path string, info os.FileInfo, err error) error {
- if err == nil && !info.IsDir() {
- c <- path
- }
- return nil
- })
- }
- close(c)
-
- count := 0
- for i := 0; i < *workers; i++ {
- changed := <-results
- count += changed
- }
-
- switch *format {
- case "sqlite", "sqlite3":
- stdout.Println(sqliteFooter)
- }
-
- if count != 0 && *exitError {
- os.Exit(2)
- }
-}
diff --git a/vendor/github.com/client9/misspell/goreleaser.yml b/vendor/github.com/client9/misspell/goreleaser.yml
deleted file mode 100644
index 560cb3810..000000000
--- a/vendor/github.com/client9/misspell/goreleaser.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# goreleaser.yml
-# https://github.com/goreleaser/goreleaser
-
-project_name: misspell
-
-builds:
- -
- main: cmd/misspell/main.go
- binary: misspell
- ldflags: -s -w -X main.version={{.Version}}
- goos:
- - darwin
- - linux
- - windows
- goarch:
- - amd64
- env:
- - CGO_ENABLED=0
- ignore:
- - goos: darwin
- goarch: 386
- - goos: windows
- goarch: 386
-
-archive:
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- replacements:
- amd64: 64bit
- 386: 32bit
- darwin: mac
- files:
- - none*
-
-checksum:
- name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
-
-snapshot:
- name_template: "SNAPSHOT-{{.Commit}}"
diff --git a/vendor/github.com/client9/misspell/install-misspell.sh b/vendor/github.com/client9/misspell/install-misspell.sh
deleted file mode 100644
index 8e0ff5d94..000000000
--- a/vendor/github.com/client9/misspell/install-misspell.sh
+++ /dev/null
@@ -1,318 +0,0 @@
-#!/bin/sh
-set -e
-# Code generated by godownloader. DO NOT EDIT.
-#
-
-usage() {
- this=$1
- cat </dev/null
-}
-uname_os() {
- os=$(uname -s | tr '[:upper:]' '[:lower:]')
- echo "$os"
-}
-uname_arch() {
- arch=$(uname -m)
- case $arch in
- x86_64) arch="amd64" ;;
- x86) arch="386" ;;
- i686) arch="386" ;;
- i386) arch="386" ;;
- aarch64) arch="arm64" ;;
- armv5*) arch="arm5" ;;
- armv6*) arch="arm6" ;;
- armv7*) arch="arm7" ;;
- esac
- echo ${arch}
-}
-uname_os_check() {
- os=$(uname_os)
- case "$os" in
- darwin) return 0 ;;
- dragonfly) return 0 ;;
- freebsd) return 0 ;;
- linux) return 0 ;;
- android) return 0 ;;
- nacl) return 0 ;;
- netbsd) return 0 ;;
- openbsd) return 0 ;;
- plan9) return 0 ;;
- solaris) return 0 ;;
- windows) return 0 ;;
- esac
- echo "$0: uname_os_check: internal error '$(uname -s)' got converted to '$os' which is not a GOOS value. Please file bug at https://github.com/client9/shlib"
- return 1
-}
-uname_arch_check() {
- arch=$(uname_arch)
- case "$arch" in
- 386) return 0 ;;
- amd64) return 0 ;;
- arm64) return 0 ;;
- armv5) return 0 ;;
- armv6) return 0 ;;
- armv7) return 0 ;;
- ppc64) return 0 ;;
- ppc64le) return 0 ;;
- mips) return 0 ;;
- mipsle) return 0 ;;
- mips64) return 0 ;;
- mips64le) return 0 ;;
- s390x) return 0 ;;
- amd64p32) return 0 ;;
- esac
- echo "$0: uname_arch_check: internal error '$(uname -m)' got converted to '$arch' which is not a GOARCH value. Please file bug report at https://github.com/client9/shlib"
- return 1
-}
-untar() {
- tarball=$1
- case "${tarball}" in
- *.tar.gz | *.tgz) tar -xzf "${tarball}" ;;
- *.tar) tar -xf "${tarball}" ;;
- *.zip) unzip "${tarball}" ;;
- *)
- echo "Unknown archive format for ${tarball}"
- return 1
- ;;
- esac
-}
-mktmpdir() {
- test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"
- mkdir -p "${TMPDIR}"
- echo "${TMPDIR}"
-}
-http_download() {
- local_file=$1
- source_url=$2
- header=$3
- headerflag=''
- destflag=''
- if is_command curl; then
- cmd='curl --fail -sSL'
- destflag='-o'
- headerflag='-H'
- elif is_command wget; then
- cmd='wget -q'
- destflag='-O'
- headerflag='--header'
- else
- echo "http_download: unable to find wget or curl"
- return 1
- fi
- if [ -z "$header" ]; then
- $cmd $destflag "$local_file" "$source_url"
- else
- $cmd $headerflag "$header" $destflag "$local_file" "$source_url"
- fi
-}
-github_api() {
- local_file=$1
- source_url=$2
- header=""
- case "$source_url" in
- https://api.github.com*)
- test -z "$GITHUB_TOKEN" || header="Authorization: token $GITHUB_TOKEN"
- ;;
- esac
- http_download "$local_file" "$source_url" "$header"
-}
-github_last_release() {
- owner_repo=$1
- giturl="https://api.github.com/repos/${owner_repo}/releases/latest"
- html=$(github_api - "$giturl")
- version=$(echo "$html" | grep -m 1 "\"tag_name\":" | cut -f4 -d'"')
- test -z "$version" && return 1
- echo "$version"
-}
-hash_sha256() {
- TARGET=${1:-/dev/stdin}
- if is_command gsha256sum; then
- hash=$(gsha256sum "$TARGET") || return 1
- echo "$hash" | cut -d ' ' -f 1
- elif is_command sha256sum; then
- hash=$(sha256sum "$TARGET") || return 1
- echo "$hash" | cut -d ' ' -f 1
- elif is_command shasum; then
- hash=$(shasum -a 256 "$TARGET" 2>/dev/null) || return 1
- echo "$hash" | cut -d ' ' -f 1
- elif is_command openssl; then
- hash=$(openssl -dst openssl dgst -sha256 "$TARGET") || return 1
- echo "$hash" | cut -d ' ' -f a
- else
- echo "hash_sha256: unable to find command to compute sha-256 hash"
- return 1
- fi
-}
-hash_sha256_verify() {
- TARGET=$1
- checksums=$2
- if [ -z "$checksums" ]; then
- echo "hash_sha256_verify: checksum file not specified in arg2"
- return 1
- fi
- BASENAME=${TARGET##*/}
- want=$(grep "${BASENAME}" "${checksums}" 2>/dev/null | tr '\t' ' ' | cut -d ' ' -f 1)
- if [ -z "$want" ]; then
- echo "hash_sha256_verify: unable to find checksum for '${TARGET}' in '${checksums}'"
- return 1
- fi
- got=$(hash_sha256 "$TARGET")
- if [ "$want" != "$got" ]; then
- echo "hash_sha256_verify: checksum for '$TARGET' did not verify ${want} vs $got"
- return 1
- fi
-}
-cat /dev/null < 50000 {
- fin, err := os.Open(filename)
- if err != nil {
- return "", fmt.Errorf("Unable to open large file %q: %s", filename, err)
- }
- defer fin.Close()
- buf := make([]byte, 512)
- _, err = io.ReadFull(fin, buf)
- if err != nil {
- return "", fmt.Errorf("Unable to read 512 bytes from %q: %s", filename, err)
- }
- if !isTextFile(buf) {
- return "", nil
- }
-
- // set so we don't double check this file
- isText = true
- }
-
- // read in whole file
- raw, err := ioutil.ReadFile(filename)
- if err != nil {
- return "", fmt.Errorf("Unable to read all %q: %s", filename, err)
- }
-
- if !isText && !isTextFile(raw) {
- return "", nil
- }
- return string(raw), nil
-}
diff --git a/vendor/github.com/client9/misspell/notwords.go b/vendor/github.com/client9/misspell/notwords.go
deleted file mode 100644
index 06d0d5a5a..000000000
--- a/vendor/github.com/client9/misspell/notwords.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package misspell
-
-import (
- "bytes"
- "regexp"
- "strings"
-)
-
-var (
- reEmail = regexp.MustCompile(`[a-zA-Z0-9_.%+-]+@[a-zA-Z0-9-.]+\.[a-zA-Z]{2,6}[^a-zA-Z]`)
- reHost = regexp.MustCompile(`[a-zA-Z0-9-.]+\.[a-zA-Z]+`)
- reBackslash = regexp.MustCompile(`\\[a-z]`)
-)
-
-// RemovePath attempts to strip away embedded file system paths, e.g.
-// /foo/bar or /static/myimg.png
-//
-// TODO: windows style
-//
-func RemovePath(s string) string {
- out := bytes.Buffer{}
- var idx int
- for len(s) > 0 {
- if idx = strings.IndexByte(s, '/'); idx == -1 {
- out.WriteString(s)
- break
- }
-
- if idx > 0 {
- idx--
- }
-
- var chclass string
- switch s[idx] {
- case '/', ' ', '\n', '\t', '\r':
- chclass = " \n\r\t"
- case '[':
- chclass = "]\n"
- case '(':
- chclass = ")\n"
- default:
- out.WriteString(s[:idx+2])
- s = s[idx+2:]
- continue
- }
-
- endx := strings.IndexAny(s[idx+1:], chclass)
- if endx != -1 {
- out.WriteString(s[:idx+1])
- out.Write(bytes.Repeat([]byte{' '}, endx))
- s = s[idx+endx+1:]
- } else {
- out.WriteString(s)
- break
- }
- }
- return out.String()
-}
-
-// replaceWithBlanks returns a string with the same number of spaces as the input
-func replaceWithBlanks(s string) string {
- return strings.Repeat(" ", len(s))
-}
-
-// RemoveEmail remove email-like strings, e.g. "nickg+junk@xfoobar.com", "nickg@xyz.abc123.biz"
-func RemoveEmail(s string) string {
- return reEmail.ReplaceAllStringFunc(s, replaceWithBlanks)
-}
-
-// RemoveHost removes host-like strings "foobar.com" "abc123.fo1231.biz"
-func RemoveHost(s string) string {
- return reHost.ReplaceAllStringFunc(s, replaceWithBlanks)
-}
-
-// RemoveBackslashEscapes removes characters that are preceeded by a backslash
-// commonly found in printf format stringd "\nto"
-func removeBackslashEscapes(s string) string {
- return reBackslash.ReplaceAllStringFunc(s, replaceWithBlanks)
-}
-
-// RemoveNotWords blanks out all the not words
-func RemoveNotWords(s string) string {
- // do most selective/specific first
- return removeBackslashEscapes(RemoveHost(RemoveEmail(RemovePath(StripURL(s)))))
-}
diff --git a/vendor/github.com/client9/misspell/replace.go b/vendor/github.com/client9/misspell/replace.go
deleted file mode 100644
index a99bbcc58..000000000
--- a/vendor/github.com/client9/misspell/replace.go
+++ /dev/null
@@ -1,246 +0,0 @@
-package misspell
-
-import (
- "bufio"
- "bytes"
- "io"
- "regexp"
- "strings"
- "text/scanner"
-)
-
-func max(x, y int) int {
- if x > y {
- return x
- }
- return y
-}
-
-func inArray(haystack []string, needle string) bool {
- for _, word := range haystack {
- if needle == word {
- return true
- }
- }
- return false
-}
-
-var wordRegexp = regexp.MustCompile(`[a-zA-Z0-9']+`)
-
-// Diff is datastructure showing what changed in a single line
-type Diff struct {
- Filename string
- FullLine string
- Line int
- Column int
- Original string
- Corrected string
-}
-
-// Replacer is the main struct for spelling correction
-type Replacer struct {
- Replacements []string
- Debug bool
- engine *StringReplacer
- corrected map[string]string
-}
-
-// New creates a new default Replacer using the main rule list
-func New() *Replacer {
- r := Replacer{
- Replacements: DictMain,
- }
- r.Compile()
- return &r
-}
-
-// RemoveRule deletes existings rules.
-// TODO: make inplace to save memory
-func (r *Replacer) RemoveRule(ignore []string) {
- newwords := make([]string, 0, len(r.Replacements))
- for i := 0; i < len(r.Replacements); i += 2 {
- if inArray(ignore, r.Replacements[i]) {
- continue
- }
- newwords = append(newwords, r.Replacements[i:i+2]...)
- }
- r.engine = nil
- r.Replacements = newwords
-}
-
-// AddRuleList appends new rules.
-// Input is in the same form as Strings.Replacer: [ old1, new1, old2, new2, ....]
-// Note: does not check for duplictes
-func (r *Replacer) AddRuleList(additions []string) {
- r.engine = nil
- r.Replacements = append(r.Replacements, additions...)
-}
-
-// Compile compiles the rules. Required before using the Replace functions
-func (r *Replacer) Compile() {
-
- r.corrected = make(map[string]string, len(r.Replacements)/2)
- for i := 0; i < len(r.Replacements); i += 2 {
- r.corrected[r.Replacements[i]] = r.Replacements[i+1]
- }
- r.engine = NewStringReplacer(r.Replacements...)
-}
-
-/*
-line1 and line2 are different
-extract words from each line1
-
-replace word -> newword
-if word == new-word
- continue
-if new-word in list of replacements
- continue
-new word not original, and not in list of replacements
- some substring got mixed up. UNdo
-*/
-func (r *Replacer) recheckLine(s string, lineNum int, buf io.Writer, next func(Diff)) {
- first := 0
- redacted := RemoveNotWords(s)
-
- idx := wordRegexp.FindAllStringIndex(redacted, -1)
- for _, ab := range idx {
- word := s[ab[0]:ab[1]]
- newword := r.engine.Replace(word)
- if newword == word {
- // no replacement done
- continue
- }
-
- // ignore camelCase words
- // https://github.com/client9/misspell/issues/113
- if CaseStyle(word) == CaseUnknown {
- continue
- }
-
- if StringEqualFold(r.corrected[strings.ToLower(word)], newword) {
- // word got corrected into something we know
- io.WriteString(buf, s[first:ab[0]])
- io.WriteString(buf, newword)
- first = ab[1]
- next(Diff{
- FullLine: s,
- Line: lineNum,
- Original: word,
- Corrected: newword,
- Column: ab[0],
- })
- continue
- }
- // Word got corrected into something unknown. Ignore it
- }
- io.WriteString(buf, s[first:])
-}
-
-// ReplaceGo is a specialized routine for correcting Golang source
-// files. Currently only checks comments, not identifiers for
-// spelling.
-func (r *Replacer) ReplaceGo(input string) (string, []Diff) {
- var s scanner.Scanner
- s.Init(strings.NewReader(input))
- s.Mode = scanner.ScanIdents | scanner.ScanFloats | scanner.ScanChars | scanner.ScanStrings | scanner.ScanRawStrings | scanner.ScanComments
- lastPos := 0
- output := ""
-Loop:
- for {
- switch s.Scan() {
- case scanner.Comment:
- origComment := s.TokenText()
- newComment := r.engine.Replace(origComment)
-
- if origComment != newComment {
- // s.Pos().Offset is the end of the current token
- // subtract len(origComment) to get the start of the token
- offset := s.Pos().Offset
- output = output + input[lastPos:offset-len(origComment)] + newComment
- lastPos = offset
- }
- case scanner.EOF:
- break Loop
- }
- }
-
- if lastPos == 0 {
- // no changes, no copies
- return input, nil
- }
- if lastPos < len(input) {
- output = output + input[lastPos:]
- }
- diffs := make([]Diff, 0, 8)
- buf := bytes.NewBuffer(make([]byte, 0, max(len(input), len(output))+100))
- // faster that making a bytes.Buffer and bufio.ReadString
- outlines := strings.SplitAfter(output, "\n")
- inlines := strings.SplitAfter(input, "\n")
- for i := 0; i < len(inlines); i++ {
- if inlines[i] == outlines[i] {
- buf.WriteString(outlines[i])
- continue
- }
- r.recheckLine(inlines[i], i+1, buf, func(d Diff) {
- diffs = append(diffs, d)
- })
- }
-
- return buf.String(), diffs
-
-}
-
-// Replace is corrects misspellings in input, returning corrected version
-// along with a list of diffs.
-func (r *Replacer) Replace(input string) (string, []Diff) {
- output := r.engine.Replace(input)
- if input == output {
- return input, nil
- }
- diffs := make([]Diff, 0, 8)
- buf := bytes.NewBuffer(make([]byte, 0, max(len(input), len(output))+100))
- // faster that making a bytes.Buffer and bufio.ReadString
- outlines := strings.SplitAfter(output, "\n")
- inlines := strings.SplitAfter(input, "\n")
- for i := 0; i < len(inlines); i++ {
- if inlines[i] == outlines[i] {
- buf.WriteString(outlines[i])
- continue
- }
- r.recheckLine(inlines[i], i+1, buf, func(d Diff) {
- diffs = append(diffs, d)
- })
- }
-
- return buf.String(), diffs
-}
-
-// ReplaceReader applies spelling corrections to a reader stream. Diffs are
-// emitted through a callback.
-func (r *Replacer) ReplaceReader(raw io.Reader, w io.Writer, next func(Diff)) error {
- var (
- err error
- line string
- lineNum int
- )
- reader := bufio.NewReader(raw)
- for err == nil {
- lineNum++
- line, err = reader.ReadString('\n')
-
- // if it's EOF, then line has the last line
- // don't like the check of err here and
- // in for loop
- if err != nil && err != io.EOF {
- return err
- }
- // easily 5x faster than regexp+map
- if line == r.engine.Replace(line) {
- io.WriteString(w, line)
- continue
- }
- // but it can be inaccurate, so we need to double check
- r.recheckLine(line, lineNum, w, next)
- }
- return nil
-}
diff --git a/vendor/github.com/client9/misspell/stringreplacer.go b/vendor/github.com/client9/misspell/stringreplacer.go
deleted file mode 100644
index 3151eceb7..000000000
--- a/vendor/github.com/client9/misspell/stringreplacer.go
+++ /dev/null
@@ -1,336 +0,0 @@
-// Copyright 2011 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.
-
-package misspell
-
-import (
- "io"
- // "log"
- "strings"
-)
-
-// StringReplacer replaces a list of strings with replacements.
-// It is safe for concurrent use by multiple goroutines.
-type StringReplacer struct {
- r replacer
-}
-
-// replacer is the interface that a replacement algorithm needs to implement.
-type replacer interface {
- Replace(s string) string
- WriteString(w io.Writer, s string) (n int, err error)
-}
-
-// NewStringReplacer returns a new Replacer from a list of old, new string pairs.
-// Replacements are performed in order, without overlapping matches.
-func NewStringReplacer(oldnew ...string) *StringReplacer {
- if len(oldnew)%2 == 1 {
- panic("strings.NewReplacer: odd argument count")
- }
-
- return &StringReplacer{r: makeGenericReplacer(oldnew)}
-}
-
-// Replace returns a copy of s with all replacements performed.
-func (r *StringReplacer) Replace(s string) string {
- return r.r.Replace(s)
-}
-
-// WriteString writes s to w with all replacements performed.
-func (r *StringReplacer) WriteString(w io.Writer, s string) (n int, err error) {
- return r.r.WriteString(w, s)
-}
-
-// trieNode is a node in a lookup trie for prioritized key/value pairs. Keys
-// and values may be empty. For example, the trie containing keys "ax", "ay",
-// "bcbc", "x" and "xy" could have eight nodes:
-//
-// n0 -
-// n1 a-
-// n2 .x+
-// n3 .y+
-// n4 b-
-// n5 .cbc+
-// n6 x+
-// n7 .y+
-//
-// n0 is the root node, and its children are n1, n4 and n6; n1's children are
-// n2 and n3; n4's child is n5; n6's child is n7. Nodes n0, n1 and n4 (marked
-// with a trailing "-") are partial keys, and nodes n2, n3, n5, n6 and n7
-// (marked with a trailing "+") are complete keys.
-type trieNode struct {
- // value is the value of the trie node's key/value pair. It is empty if
- // this node is not a complete key.
- value string
- // priority is the priority (higher is more important) of the trie node's
- // key/value pair; keys are not necessarily matched shortest- or longest-
- // first. Priority is positive if this node is a complete key, and zero
- // otherwise. In the example above, positive/zero priorities are marked
- // with a trailing "+" or "-".
- priority int
-
- // A trie node may have zero, one or more child nodes:
- // * if the remaining fields are zero, there are no children.
- // * if prefix and next are non-zero, there is one child in next.
- // * if table is non-zero, it defines all the children.
- //
- // Prefixes are preferred over tables when there is one child, but the
- // root node always uses a table for lookup efficiency.
-
- // prefix is the difference in keys between this trie node and the next.
- // In the example above, node n4 has prefix "cbc" and n4's next node is n5.
- // Node n5 has no children and so has zero prefix, next and table fields.
- prefix string
- next *trieNode
-
- // table is a lookup table indexed by the next byte in the key, after
- // remapping that byte through genericReplacer.mapping to create a dense
- // index. In the example above, the keys only use 'a', 'b', 'c', 'x' and
- // 'y', which remap to 0, 1, 2, 3 and 4. All other bytes remap to 5, and
- // genericReplacer.tableSize will be 5. Node n0's table will be
- // []*trieNode{ 0:n1, 1:n4, 3:n6 }, where the 0, 1 and 3 are the remapped
- // 'a', 'b' and 'x'.
- table []*trieNode
-}
-
-func (t *trieNode) add(key, val string, priority int, r *genericReplacer) {
- if key == "" {
- if t.priority == 0 {
- t.value = val
- t.priority = priority
- }
- return
- }
-
- if t.prefix != "" {
- // Need to split the prefix among multiple nodes.
- var n int // length of the longest common prefix
- for ; n < len(t.prefix) && n < len(key); n++ {
- if t.prefix[n] != key[n] {
- break
- }
- }
- if n == len(t.prefix) {
- t.next.add(key[n:], val, priority, r)
- } else if n == 0 {
- // First byte differs, start a new lookup table here. Looking up
- // what is currently t.prefix[0] will lead to prefixNode, and
- // looking up key[0] will lead to keyNode.
- var prefixNode *trieNode
- if len(t.prefix) == 1 {
- prefixNode = t.next
- } else {
- prefixNode = &trieNode{
- prefix: t.prefix[1:],
- next: t.next,
- }
- }
- keyNode := new(trieNode)
- t.table = make([]*trieNode, r.tableSize)
- t.table[r.mapping[t.prefix[0]]] = prefixNode
- t.table[r.mapping[key[0]]] = keyNode
- t.prefix = ""
- t.next = nil
- keyNode.add(key[1:], val, priority, r)
- } else {
- // Insert new node after the common section of the prefix.
- next := &trieNode{
- prefix: t.prefix[n:],
- next: t.next,
- }
- t.prefix = t.prefix[:n]
- t.next = next
- next.add(key[n:], val, priority, r)
- }
- } else if t.table != nil {
- // Insert into existing table.
- m := r.mapping[key[0]]
- if t.table[m] == nil {
- t.table[m] = new(trieNode)
- }
- t.table[m].add(key[1:], val, priority, r)
- } else {
- t.prefix = key
- t.next = new(trieNode)
- t.next.add("", val, priority, r)
- }
-}
-
-func (r *genericReplacer) lookup(s string, ignoreRoot bool) (val string, keylen int, found bool) {
- // Iterate down the trie to the end, and grab the value and keylen with
- // the highest priority.
- bestPriority := 0
- node := &r.root
- n := 0
- for node != nil {
- if node.priority > bestPriority && !(ignoreRoot && node == &r.root) {
- bestPriority = node.priority
- val = node.value
- keylen = n
- found = true
- }
-
- if s == "" {
- break
- }
- if node.table != nil {
- index := r.mapping[ByteToLower(s[0])]
- if int(index) == r.tableSize {
- break
- }
- node = node.table[index]
- s = s[1:]
- n++
- } else if node.prefix != "" && StringHasPrefixFold(s, node.prefix) {
- n += len(node.prefix)
- s = s[len(node.prefix):]
- node = node.next
- } else {
- break
- }
- }
- return
-}
-
-// genericReplacer is the fully generic algorithm.
-// It's used as a fallback when nothing faster can be used.
-type genericReplacer struct {
- root trieNode
- // tableSize is the size of a trie node's lookup table. It is the number
- // of unique key bytes.
- tableSize int
- // mapping maps from key bytes to a dense index for trieNode.table.
- mapping [256]byte
-}
-
-func makeGenericReplacer(oldnew []string) *genericReplacer {
- r := new(genericReplacer)
- // Find each byte used, then assign them each an index.
- for i := 0; i < len(oldnew); i += 2 {
- key := strings.ToLower(oldnew[i])
- for j := 0; j < len(key); j++ {
- r.mapping[key[j]] = 1
- }
- }
-
- for _, b := range r.mapping {
- r.tableSize += int(b)
- }
-
- var index byte
- for i, b := range r.mapping {
- if b == 0 {
- r.mapping[i] = byte(r.tableSize)
- } else {
- r.mapping[i] = index
- index++
- }
- }
- // Ensure root node uses a lookup table (for performance).
- r.root.table = make([]*trieNode, r.tableSize)
-
- for i := 0; i < len(oldnew); i += 2 {
- r.root.add(strings.ToLower(oldnew[i]), oldnew[i+1], len(oldnew)-i, r)
- }
- return r
-}
-
-type appendSliceWriter []byte
-
-// Write writes to the buffer to satisfy io.Writer.
-func (w *appendSliceWriter) Write(p []byte) (int, error) {
- *w = append(*w, p...)
- return len(p), nil
-}
-
-// WriteString writes to the buffer without string->[]byte->string allocations.
-func (w *appendSliceWriter) WriteString(s string) (int, error) {
- *w = append(*w, s...)
- return len(s), nil
-}
-
-type stringWriterIface interface {
- WriteString(string) (int, error)
-}
-
-type stringWriter struct {
- w io.Writer
-}
-
-func (w stringWriter) WriteString(s string) (int, error) {
- return w.w.Write([]byte(s))
-}
-
-func getStringWriter(w io.Writer) stringWriterIface {
- sw, ok := w.(stringWriterIface)
- if !ok {
- sw = stringWriter{w}
- }
- return sw
-}
-
-func (r *genericReplacer) Replace(s string) string {
- buf := make(appendSliceWriter, 0, len(s))
- r.WriteString(&buf, s)
- return string(buf)
-}
-
-func (r *genericReplacer) WriteString(w io.Writer, s string) (n int, err error) {
- sw := getStringWriter(w)
- var last, wn int
- var prevMatchEmpty bool
- for i := 0; i <= len(s); {
- // Fast path: s[i] is not a prefix of any pattern.
- if i != len(s) && r.root.priority == 0 {
- index := int(r.mapping[ByteToLower(s[i])])
- if index == r.tableSize || r.root.table[index] == nil {
- i++
- continue
- }
- }
-
- // Ignore the empty match iff the previous loop found the empty match.
- val, keylen, match := r.lookup(s[i:], prevMatchEmpty)
- prevMatchEmpty = match && keylen == 0
- if match {
- orig := s[i : i+keylen]
- switch CaseStyle(orig) {
- case CaseUnknown:
- // pretend we didn't match
- // i++
- // continue
- case CaseUpper:
- val = strings.ToUpper(val)
- case CaseLower:
- val = strings.ToLower(val)
- case CaseTitle:
- if len(val) < 2 {
- val = strings.ToUpper(val)
- } else {
- val = strings.ToUpper(val[:1]) + strings.ToLower(val[1:])
- }
- }
- wn, err = sw.WriteString(s[last:i])
- n += wn
- if err != nil {
- return
- }
- //log.Printf("%d: Going to correct %q with %q", i, s[i:i+keylen], val)
- wn, err = sw.WriteString(val)
- n += wn
- if err != nil {
- return
- }
- i += keylen
- last = i
- continue
- }
- i++
- }
- if last != len(s) {
- wn, err = sw.WriteString(s[last:])
- n += wn
- }
- return
-}
diff --git a/vendor/github.com/client9/misspell/stringreplacer_test.gox b/vendor/github.com/client9/misspell/stringreplacer_test.gox
deleted file mode 100644
index 70da997f6..000000000
--- a/vendor/github.com/client9/misspell/stringreplacer_test.gox
+++ /dev/null
@@ -1,421 +0,0 @@
-// 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.
-
-package misspell_test
-
-import (
- "bytes"
- "fmt"
- "strings"
- "testing"
-
- . "github.com/client9/misspell"
-)
-
-var htmlEscaper = NewStringReplacer(
- "&", "&",
- "<", "<",
- ">", ">",
- `"`, """,
- "'", "'",
-)
-
-var htmlUnescaper = NewStringReplacer(
- "&", "&",
- "<", "<",
- ">", ">",
- """, `"`,
- "'", "'",
-)
-
-// The http package's old HTML escaping function.
-func oldHTMLEscape(s string) string {
- s = strings.Replace(s, "&", "&", -1)
- s = strings.Replace(s, "<", "<", -1)
- s = strings.Replace(s, ">", ">", -1)
- s = strings.Replace(s, `"`, """, -1)
- s = strings.Replace(s, "'", "'", -1)
- return s
-}
-
-var capitalLetters = NewStringReplacer("a", "A", "b", "B")
-
-// TestReplacer tests the replacer implementations.
-func TestReplacer(t *testing.T) {
- type testCase struct {
- r *StringReplacer
- in, out string
- }
- var testCases []testCase
-
- // str converts 0xff to "\xff". This isn't just string(b) since that converts to UTF-8.
- str := func(b byte) string {
- return string([]byte{b})
- }
- var s []string
-
- // inc maps "\x00"->"\x01", ..., "a"->"b", "b"->"c", ..., "\xff"->"\x00".
- for i := 0; i < 256; i++ {
- s = append(s, str(byte(i)), str(byte(i+1)))
- }
- inc := NewStringReplacer(s...)
-
- // Test cases with 1-byte old strings, 1-byte new strings.
- testCases = append(testCases,
- testCase{capitalLetters, "brad", "BrAd"},
- testCase{capitalLetters, strings.Repeat("a", (32<<10)+123), strings.Repeat("A", (32<<10)+123)},
- testCase{capitalLetters, "", ""},
-
- testCase{inc, "brad", "csbe"},
- testCase{inc, "\x00\xff", "\x01\x00"},
- testCase{inc, "", ""},
-
- testCase{NewStringReplacer("a", "1", "a", "2"), "brad", "br1d"},
- )
-
- // repeat maps "a"->"a", "b"->"bb", "c"->"ccc", ...
- s = nil
- for i := 0; i < 256; i++ {
- n := i + 1 - 'a'
- if n < 1 {
- n = 1
- }
- s = append(s, str(byte(i)), strings.Repeat(str(byte(i)), n))
- }
- repeat := NewStringReplacer(s...)
-
- // Test cases with 1-byte old strings, variable length new strings.
- testCases = append(testCases,
- testCase{htmlEscaper, "No changes", "No changes"},
- testCase{htmlEscaper, "I <3 escaping & stuff", "I <3 escaping & stuff"},
- testCase{htmlEscaper, "&&&", "&&&"},
- testCase{htmlEscaper, "", ""},
-
- testCase{repeat, "brad", "bbrrrrrrrrrrrrrrrrrradddd"},
- testCase{repeat, "abba", "abbbba"},
- testCase{repeat, "", ""},
-
- testCase{NewStringReplacer("a", "11", "a", "22"), "brad", "br11d"},
- )
-
- // The remaining test cases have variable length old strings.
-
- testCases = append(testCases,
- testCase{htmlUnescaper, "&", "&"},
- testCase{htmlUnescaper, "<b>HTML's neat</b>", "HTML's neat "},
- testCase{htmlUnescaper, "", ""},
-
- testCase{NewStringReplacer("a", "1", "a", "2", "xxx", "xxx"), "brad", "br1d"},
-
- testCase{NewStringReplacer("a", "1", "aa", "2", "aaa", "3"), "aaaa", "1111"},
-
- testCase{NewStringReplacer("aaa", "3", "aa", "2", "a", "1"), "aaaa", "31"},
- )
-
- // gen1 has multiple old strings of variable length. There is no
- // overall non-empty common prefix, but some pairwise common prefixes.
- gen1 := NewStringReplacer(
- "aaa", "3[aaa]",
- "aa", "2[aa]",
- "a", "1[a]",
- "i", "i",
- "longerst", "most long",
- "longer", "medium",
- "long", "short",
- "xx", "xx",
- "x", "X",
- "X", "Y",
- "Y", "Z",
- )
- testCases = append(testCases,
- testCase{gen1, "fooaaabar", "foo3[aaa]b1[a]r"},
- testCase{gen1, "long, longerst, longer", "short, most long, medium"},
- testCase{gen1, "xxxxx", "xxxxX"},
- testCase{gen1, "XiX", "YiY"},
- testCase{gen1, "", ""},
- )
-
- // gen2 has multiple old strings with no pairwise common prefix.
- gen2 := NewStringReplacer(
- "roses", "red",
- "violets", "blue",
- "sugar", "sweet",
- )
- testCases = append(testCases,
- testCase{gen2, "roses are red, violets are blue...", "red are red, blue are blue..."},
- testCase{gen2, "", ""},
- )
-
- // gen3 has multiple old strings with an overall common prefix.
- gen3 := NewStringReplacer(
- "abracadabra", "poof",
- "abracadabrakazam", "splat",
- "abraham", "lincoln",
- "abrasion", "scrape",
- "abraham", "isaac",
- )
- testCases = append(testCases,
- testCase{gen3, "abracadabrakazam abraham", "poofkazam lincoln"},
- testCase{gen3, "abrasion abracad", "scrape abracad"},
- testCase{gen3, "abba abram abrasive", "abba abram abrasive"},
- testCase{gen3, "", ""},
- )
-
- // foo{1,2,3,4} have multiple old strings with an overall common prefix
- // and 1- or 2- byte extensions from the common prefix.
- foo1 := NewStringReplacer(
- "foo1", "A",
- "foo2", "B",
- "foo3", "C",
- )
- foo2 := NewStringReplacer(
- "foo1", "A",
- "foo2", "B",
- "foo31", "C",
- "foo32", "D",
- )
- foo3 := NewStringReplacer(
- "foo11", "A",
- "foo12", "B",
- "foo31", "C",
- "foo32", "D",
- )
- foo4 := NewStringReplacer(
- "foo12", "B",
- "foo32", "D",
- )
- testCases = append(testCases,
- testCase{foo1, "fofoofoo12foo32oo", "fofooA2C2oo"},
- testCase{foo1, "", ""},
-
- testCase{foo2, "fofoofoo12foo32oo", "fofooA2Doo"},
- testCase{foo2, "", ""},
-
- testCase{foo3, "fofoofoo12foo32oo", "fofooBDoo"},
- testCase{foo3, "", ""},
-
- testCase{foo4, "fofoofoo12foo32oo", "fofooBDoo"},
- testCase{foo4, "", ""},
- )
-
- // genAll maps "\x00\x01\x02...\xfe\xff" to "[all]", amongst other things.
- allBytes := make([]byte, 256)
- for i := range allBytes {
- allBytes[i] = byte(i)
- }
- allString := string(allBytes)
- genAll := NewStringReplacer(
- allString, "[all]",
- "\xff", "[ff]",
- "\x00", "[00]",
- )
- testCases = append(testCases,
- testCase{genAll, allString, "[all]"},
- testCase{genAll, "a\xff" + allString + "\x00", "a[ff][all][00]"},
- testCase{genAll, "", ""},
- )
-
- // Test cases with empty old strings.
-
- blankToX1 := NewStringReplacer("", "X")
- blankToX2 := NewStringReplacer("", "X", "", "")
- blankHighPriority := NewStringReplacer("", "X", "o", "O")
- blankLowPriority := NewStringReplacer("o", "O", "", "X")
- blankNoOp1 := NewStringReplacer("", "")
- blankNoOp2 := NewStringReplacer("", "", "", "A")
- blankFoo := NewStringReplacer("", "X", "foobar", "R", "foobaz", "Z")
- testCases = append(testCases,
- testCase{blankToX1, "foo", "XfXoXoX"},
- testCase{blankToX1, "", "X"},
-
- testCase{blankToX2, "foo", "XfXoXoX"},
- testCase{blankToX2, "", "X"},
-
- testCase{blankHighPriority, "oo", "XOXOX"},
- testCase{blankHighPriority, "ii", "XiXiX"},
- testCase{blankHighPriority, "oiio", "XOXiXiXOX"},
- testCase{blankHighPriority, "iooi", "XiXOXOXiX"},
- testCase{blankHighPriority, "", "X"},
-
- testCase{blankLowPriority, "oo", "OOX"},
- testCase{blankLowPriority, "ii", "XiXiX"},
- testCase{blankLowPriority, "oiio", "OXiXiOX"},
- testCase{blankLowPriority, "iooi", "XiOOXiX"},
- testCase{blankLowPriority, "", "X"},
-
- testCase{blankNoOp1, "foo", "foo"},
- testCase{blankNoOp1, "", ""},
-
- testCase{blankNoOp2, "foo", "foo"},
- testCase{blankNoOp2, "", ""},
-
- testCase{blankFoo, "foobarfoobaz", "XRXZX"},
- testCase{blankFoo, "foobar-foobaz", "XRX-XZX"},
- testCase{blankFoo, "", "X"},
- )
-
- // single string replacer
-
- abcMatcher := NewStringReplacer("abc", "[match]")
-
- testCases = append(testCases,
- testCase{abcMatcher, "", ""},
- testCase{abcMatcher, "ab", "ab"},
- testCase{abcMatcher, "abc", "[match]"},
- testCase{abcMatcher, "abcd", "[match]d"},
- testCase{abcMatcher, "cabcabcdabca", "c[match][match]d[match]a"},
- )
-
- // Issue 6659 cases (more single string replacer)
-
- noHello := NewStringReplacer("Hello", "")
- testCases = append(testCases,
- testCase{noHello, "Hello", ""},
- testCase{noHello, "Hellox", "x"},
- testCase{noHello, "xHello", "x"},
- testCase{noHello, "xHellox", "xx"},
- )
-
- // No-arg test cases.
-
- nop := NewStringReplacer()
- testCases = append(testCases,
- testCase{nop, "abc", "abc"},
- testCase{nop, "", ""},
- )
-
- // Run the test cases.
-
- for i, tc := range testCases {
- if s := tc.r.Replace(tc.in); s != tc.out {
- t.Errorf("%d. strings.Replace(%q) = %q, want %q", i, tc.in, s, tc.out)
- }
- var buf bytes.Buffer
- n, err := tc.r.WriteString(&buf, tc.in)
- if err != nil {
- t.Errorf("%d. WriteString: %v", i, err)
- continue
- }
- got := buf.String()
- if got != tc.out {
- t.Errorf("%d. WriteString(%q) wrote %q, want %q", i, tc.in, got, tc.out)
- continue
- }
- if n != len(tc.out) {
- t.Errorf("%d. WriteString(%q) wrote correct string but reported %d bytes; want %d (%q)",
- i, tc.in, n, len(tc.out), tc.out)
- }
- }
-}
-
-type errWriter struct{}
-
-func (errWriter) Write(p []byte) (n int, err error) {
- return 0, fmt.Errorf("unwritable")
-}
-
-func BenchmarkGenericNoMatch(b *testing.B) {
- str := strings.Repeat("A", 100) + strings.Repeat("B", 100)
- generic := NewStringReplacer("a", "A", "b", "B", "12", "123") // varying lengths forces generic
- for i := 0; i < b.N; i++ {
- generic.Replace(str)
- }
-}
-
-func BenchmarkGenericMatch1(b *testing.B) {
- str := strings.Repeat("a", 100) + strings.Repeat("b", 100)
- generic := NewStringReplacer("a", "A", "b", "B", "12", "123")
- for i := 0; i < b.N; i++ {
- generic.Replace(str)
- }
-}
-
-func BenchmarkGenericMatch2(b *testing.B) {
- str := strings.Repeat("It's <b>HTML</b>!", 100)
- for i := 0; i < b.N; i++ {
- htmlUnescaper.Replace(str)
- }
-}
-
-func benchmarkSingleString(b *testing.B, pattern, text string) {
- r := NewStringReplacer(pattern, "[match]")
- b.SetBytes(int64(len(text)))
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- r.Replace(text)
- }
-}
-
-func BenchmarkSingleMaxSkipping(b *testing.B) {
- benchmarkSingleString(b, strings.Repeat("b", 25), strings.Repeat("a", 10000))
-}
-
-func BenchmarkSingleLongSuffixFail(b *testing.B) {
- benchmarkSingleString(b, "b"+strings.Repeat("a", 500), strings.Repeat("a", 1002))
-}
-
-func BenchmarkSingleMatch(b *testing.B) {
- benchmarkSingleString(b, "abcdef", strings.Repeat("abcdefghijklmno", 1000))
-}
-
-func BenchmarkByteByteNoMatch(b *testing.B) {
- str := strings.Repeat("A", 100) + strings.Repeat("B", 100)
- for i := 0; i < b.N; i++ {
- capitalLetters.Replace(str)
- }
-}
-
-func BenchmarkByteByteMatch(b *testing.B) {
- str := strings.Repeat("a", 100) + strings.Repeat("b", 100)
- for i := 0; i < b.N; i++ {
- capitalLetters.Replace(str)
- }
-}
-
-func BenchmarkByteStringMatch(b *testing.B) {
- str := "<" + strings.Repeat("a", 99) + strings.Repeat("b", 99) + ">"
- for i := 0; i < b.N; i++ {
- htmlEscaper.Replace(str)
- }
-}
-
-func BenchmarkHTMLEscapeNew(b *testing.B) {
- str := "I <3 to escape HTML & other text too."
- for i := 0; i < b.N; i++ {
- htmlEscaper.Replace(str)
- }
-}
-
-func BenchmarkHTMLEscapeOld(b *testing.B) {
- str := "I <3 to escape HTML & other text too."
- for i := 0; i < b.N; i++ {
- oldHTMLEscape(str)
- }
-}
-
-func BenchmarkByteStringReplacerWriteString(b *testing.B) {
- str := strings.Repeat("I <3 to escape HTML & other text too.", 100)
- buf := new(bytes.Buffer)
- for i := 0; i < b.N; i++ {
- htmlEscaper.WriteString(buf, str)
- buf.Reset()
- }
-}
-
-func BenchmarkByteReplacerWriteString(b *testing.B) {
- str := strings.Repeat("abcdefghijklmnopqrstuvwxyz", 100)
- buf := new(bytes.Buffer)
- for i := 0; i < b.N; i++ {
- capitalLetters.WriteString(buf, str)
- buf.Reset()
- }
-}
-
-// BenchmarkByteByteReplaces compares byteByteImpl against multiple Replaces.
-func BenchmarkByteByteReplaces(b *testing.B) {
- str := strings.Repeat("a", 100) + strings.Repeat("b", 100)
- for i := 0; i < b.N; i++ {
- strings.Replace(strings.Replace(str, "a", "A", -1), "b", "B", -1)
- }
-}
diff --git a/vendor/github.com/client9/misspell/url.go b/vendor/github.com/client9/misspell/url.go
deleted file mode 100644
index 1a259f5f9..000000000
--- a/vendor/github.com/client9/misspell/url.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package misspell
-
-import (
- "regexp"
-)
-
-// Regexp for URL https://mathiasbynens.be/demo/url-regex
-//
-// original @imme_emosol (54 chars) has trouble with dashes in hostname
-// @(https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?$@iS
-var reURL = regexp.MustCompile(`(?i)(https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s]*)?`)
-
-// StripURL attemps to replace URLs with blank spaces, e.g.
-// "xxx http://foo.com/ yyy -> "xxx yyyy"
-func StripURL(s string) string {
- return reURL.ReplaceAllStringFunc(s, replaceWithBlanks)
-}
diff --git a/vendor/github.com/client9/misspell/words.go b/vendor/github.com/client9/misspell/words.go
deleted file mode 100644
index c92dd19d0..000000000
--- a/vendor/github.com/client9/misspell/words.go
+++ /dev/null
@@ -1,31158 +0,0 @@
-package misspell
-
-// Code generated automatically. DO NOT EDIT.
-
-// DictMain is the main rule set, not including locale-specific spellings
-var DictMain = []string{
- "differentiatiations", "differentiations",
- "disproportionaltely", "disproportionately",
- "oversimplificiation", "oversimplification",
- "transcendentational", "transcendental",
- "anthromorphization", "anthropomorphization",
- "disporportionately", "disproportionately",
- "dispraportionately", "disproportionately",
- "disproportianately", "disproportionately",
- "disproportionatley", "disproportionately",
- "disproprotionately", "disproportionately",
- "fundamentalistisch", "fundamentalists",
- "fundamentalistiska", "fundamentalists",
- "fundamentalistiske", "fundamentalists",
- "fundamentalistiskt", "fundamentalists",
- "histocompatability", "histocompatibility",
- "microtransacations", "microtransactions",
- "microtransacciones", "microtransactions",
- "microtransactional", "microtransactions",
- "microtransactioned", "microtransactions",
- "misunderstandingly", "misunderstandings",
- "oversemplification", "oversimplification",
- "oversimplifacation", "oversimplification",
- "oversimplificaiton", "oversimplification",
- "oversimplificating", "oversimplification",
- "oversimplyfication", "oversimplification",
- "cardiovasculaires", "cardiovascular",
- "certificationkits", "certifications",
- "counterporductive", "counterproductive",
- "coutnerproductive", "counterproductive",
- "disporportionatly", "disproportionately",
- "disproportiantely", "disproportionately",
- "disproportionatly", "disproportionately",
- "disproportionnate", "disproportionate",
- "disrepresentation", "misrepresentation",
- "fundamentalistisk", "fundamentalists",
- "incompatabilities", "incompatibilities",
- "inconsequentional", "inconsequential",
- "indistinguishible", "indistinguishable",
- "indistingusihable", "indistinguishable",
- "indistinquishable", "indistinguishable",
- "indistuingishable", "indistinguishable",
- "instatutionalized", "institutionalized",
- "institucionalized", "institutionalized",
- "institutionilized", "institutionalized",
- "instutitionalized", "institutionalized",
- "instututionalized", "institutionalized",
- "interchangeablely", "interchangeably",
- "interchangeablity", "interchangeably",
- "intercontinential", "intercontinental",
- "micortransactions", "microtransactions",
- "microstansactions", "microtransactions",
- "microtramsactions", "microtransactions",
- "microtranasctions", "microtransactions",
- "microtransacitons", "microtransactions",
- "microtransacrions", "microtransactions",
- "microtransactioms", "microtransactions",
- "microtransactiosn", "microtransactions",
- "microtranscations", "microtransactions",
- "microtrasnactions", "microtransactions",
- "mircotransactions", "microtransactions",
- "misinterpretating", "misinterpreting",
- "misrepresantation", "misrepresentation",
- "misrepresentaiton", "misrepresentation",
- "misrepresentating", "misrepresenting",
- "misunderstantings", "misunderstandings",
- "mocrotransactions", "microtransactions",
- "oversimplifaction", "oversimplification",
- "oversimplificaton", "oversimplification",
- "oversimplifiction", "oversimplification",
- "responsibillities", "responsibilities",
- "unconstitutionnal", "unconstitutional",
- "accomplishements", "accomplishments",
- "admininistrative", "administrative",
- "antidepresssants", "antidepressants",
- "architechturally", "architecturally",
- "cardiovasculaire", "cardiovascular",
- "charactarization", "characterization",
- "characterazation", "characterization",
- "characterisitics", "characteristics",
- "characteristsics", "characteristic",
- "characterizarion", "characterization",
- "charecterization", "characterization",
- "charicterization", "characterization",
- "circumstantional", "circumstantial",
- "conversationable", "conversational",
- "counterprodutive", "counterproductive",
- "demonstrationens", "demonstrations",
- "deterministische", "deterministic",
- "differenciations", "differentiation",
- "differentiantion", "differentiation",
- "differentiatiors", "differentiation",
- "differentitation", "differentiation",
- "disperportionate", "disproportionate",
- "disporportionate", "disproportionate",
- "dispraportionate", "disproportionate",
- "disproportianate", "disproportionate",
- "disproportionaly", "disproportionately",
- "disproprotionate", "disproportionate",
- "electromagnectic", "electromagnetic",
- "enviornmentalist", "environmentalist",
- "environmentality", "environmentally",
- "extraordinairily", "extraordinarily",
- "extraordinarilly", "extraordinary",
- "extraterrestials", "extraterrestrials",
- "fundamentalismos", "fundamentalists",
- "fundamentalismus", "fundamentalists",
- "fundamentalistas", "fundamentalists",
- "fundamentalisten", "fundamentalists",
- "fundamentalister", "fundamentalists",
- "imcomprehensible", "incomprehensible",
- "immunosupressant", "immunosuppressant",
- "imperfectionists", "imperfections",
- "implementaciones", "implementations",
- "implementationen", "implementations",
- "implementationer", "implementations",
- "inappropriatelly", "inappropriately",
- "incompatablities", "incompatibilities",
- "incompatiblities", "incompatibilities",
- "incomprehencible", "incomprehensible",
- "incomprehendible", "incomprehensible",
- "incomprehenisble", "incomprehensible",
- "incomprehensable", "incomprehensible",
- "incomprehinsible", "incomprehensible",
- "incomprihensible", "incomprehensible",
- "inconprehensible", "incomprehensible",
- "inconsistentcies", "inconsistencies",
- "inconstitutional", "unconstitutional",
- "incrompehensible", "incomprehensible",
- "indistinguisable", "indistinguishable",
- "institutionlized", "institutionalized",
- "intellectualiser", "intellectuals",
- "intellectualisme", "intellectuals",
- "interchangeabley", "interchangeably",
- "internationnally", "internationally",
- "interpretaciones", "interpretations",
- "interpretationen", "interpretations",
- "manoeuverability", "maneuverability",
- "massachusettians", "massachusetts",
- "microtransacions", "microtransactions",
- "microtransacting", "microtransactions",
- "microtransactios", "microtransactions",
- "microtransactons", "microtransactions",
- "microtransations", "microtransactions",
- "microtranscation", "microtransactions",
- "mircotransaction", "microtransactions",
- "miscommunciation", "miscommunication",
- "miscommunicaiton", "miscommunication",
- "miscomunnication", "miscommunication",
- "miscummunication", "miscommunication",
- "misinterpretated", "misinterpreted",
- "misinterpretions", "misinterpreting",
- "misinterpretting", "misinterpreting",
- "misproportionate", "disproportionate",
- "misrepresenation", "misrepresentation",
- "misrepresentaion", "misrepresentation",
- "misrepresentated", "misrepresented",
- "misrepresentatie", "misrepresentation",
- "misrepresentativ", "misrepresentation",
- "misubderstanding", "misunderstandings",
- "misudnerstanding", "misunderstandings",
- "misundarstanding", "misunderstandings",
- "misunderatanding", "misunderstandings",
- "misunderdtanding", "misunderstandings",
- "misundersatnding", "misunderstandings",
- "misundersranding", "misunderstandings",
- "misunderstadings", "misunderstandings",
- "misunderstadning", "misunderstandings",
- "misunderstamding", "misunderstandings",
- "misunderstandigs", "misunderstandings",
- "misunderstandimg", "misunderstandings",
- "misunderstandind", "misunderstandings",
- "misunderstanging", "misunderstandings",
- "misunderstanidng", "misunderstandings",
- "misunderstanings", "misunderstandings",
- "misunderstansing", "misunderstandings",
- "misunderstanting", "misunderstandings",
- "misunderstending", "misunderstandings",
- "misunderstnading", "misunderstandings",
- "misunderstsnding", "misunderstandings",
- "misunderstunding", "misunderstandings",
- "misundertsanding", "misunderstandings",
- "misundrestanding", "misunderstandings",
- "misunterstanding", "misunderstandings",
- "nationalistische", "nationalistic",
- "nationalististic", "nationalistic",
- "neconstitutional", "unconstitutional",
- "notwhithstanding", "notwithstanding",
- "objectificiation", "objectification",
- "organisationnels", "organisations",
- "perpendiculaires", "perpendicular",
- "phillosophically", "philosophically",
- "preinitalization", "preinitialization",
- "prescriptionists", "prescriptions",
- "procrastinarting", "procrastinating",
- "procrastinationg", "procrastinating",
- "procrastinazione", "procrastination",
- "professionalisim", "professionalism",
- "professionalisme", "professionals",
- "professionallism", "professionalism",
- "professionnalism", "professionalism",
- "programattically", "programmatically",
- "proportionallity", "proportionally",
- "reaponsibilities", "responsibilities",
- "reinitalizations", "reinitializations",
- "representaciones", "representations",
- "representationen", "representations",
- "representationer", "representations",
- "repsonsibilities", "responsibilities",
- "responcibilities", "responsibilities",
- "responisbilities", "responsibilities",
- "responsabilities", "responsibilities",
- "responsebilities", "responsibilities",
- "straightforeward", "straightforward",
- "surrepetitiously", "surreptitiously",
- "technologicially", "technologically",
- "unconditionnally", "unconditionally",
- "unconfortability", "discomfort",
- "unconstititional", "unconstitutional",
- "uncontrollablely", "uncontrollably",
- "underestimateing", "underestimating",
- "understandablely", "understandably",
- "unintentionnally", "unintentionally",
- "unsubstantianted", "unsubstantiated",
- "unsubstantiative", "unsubstantiated",
- "acclimitization", "acclimatization",
- "accomplishemnts", "accomplishments",
- "accountabillity", "accountability",
- "acknolwedgement", "acknowledgement",
- "acknoweldgement", "acknowledgement",
- "acknowldegement", "acknowledgement",
- "acknowlegdement", "acknowledgement",
- "administratieve", "administrative",
- "administratiors", "administrators",
- "administrativne", "administrative",
- "aforementionned", "aforementioned",
- "anitdepressants", "antidepressants",
- "antidepressents", "antidepressants",
- "archetecturally", "architecturally",
- "associationthis", "associations",
- "authobiographic", "autobiographic",
- "awknowledgement", "acknowledgement",
- "bureaucratische", "bureaucratic",
- "cardiovascualar", "cardiovascular",
- "carnagie-mellon", "carnegie-mellon",
- "carnigie-mellon", "carnegie-mellon",
- "celebrationists", "celebrations",
- "charactaristics", "characteristics",
- "characterisitcs", "characteristics",
- "characterisitic", "characteristic",
- "characterizaton", "characterization",
- "charactersistic", "characteristic",
- "charactersitics", "characteristics",
- "charactoristics", "characteristics",
- "charecteristics", "characteristics",
- "comfrontational", "confrontational",
- "commuinications", "communications",
- "compatabilities", "compatibilities",
- "complimentarity", "complimentary",
- "compositionwise", "compositions",
- "confidenciality", "confidential",
- "confidentuality", "confidential",
- "confrentational", "confrontational",
- "confrontacional", "confrontational",
- "conglaturations", "congratulations",
- "congradulations", "congratulations",
- "congragulations", "congratulations",
- "congratualtions", "congratulations",
- "congraturations", "congratulations",
- "consequentually", "consequently",
- "constitutionnal", "constitutional",
- "deinitalization", "deinitialization",
- "denominationals", "denominations",
- "destinationhash", "destinations",
- "deterministisch", "deterministic",
- "developmentwise", "developments",
- "differantiation", "differentiation",
- "differenciation", "differentiation",
- "differientation", "differentiation",
- "discriminatoire", "discriminate",
- "discriminatorie", "discriminate",
- "disproportiante", "disproportionate",
- "disproportinate", "disproportionate",
- "elecrtomagnetic", "electromagnetic",
- "electormagnetic", "electromagnetic",
- "electromagentic", "electromagnetic",
- "electromagnatic", "electromagnetic",
- "electromangetic", "electromagnetic",
- "electromegnetic", "electromagnetic",
- "electronagnetic", "electromagnetic",
- "enivronmentally", "environmentally",
- "entrepreneurers", "entrepreneurs",
- "enviornmentally", "environmentally",
- "enviromentalist", "environmentalist",
- "environemntally", "environmentally",
- "envrionmentally", "environmentally",
- "evolutionarilly", "evolutionary",
- "experementation", "experimentation",
- "experimantation", "experimentation",
- "experimentacion", "experimentation",
- "experimentating", "experimentation",
- "experimenterade", "experimented",
- "experimintation", "experimentation",
- "expirementation", "experimentation",
- "extraodrinarily", "extraordinarily",
- "extraordinairly", "extraordinarily",
- "extraordinarely", "extraordinarily",
- "extraordinaryly", "extraordinarily",
- "extraterrestial", "extraterrestrial",
- "extroardinarily", "extraordinarily",
- "fondamentalists", "fundamentalists",
- "fundamendalists", "fundamentalists",
- "fundamentalisme", "fundamentals",
- "fundamentalismo", "fundamentals",
- "fundamentalista", "fundamentals",
- "fundamentalisti", "fundamentals",
- "fundamnetalists", "fundamentalists",
- "fundemantalists", "fundamentalists",
- "fundimentalists", "fundamentalists",
- "fundumentalists", "fundamentalists",
- "gongratulations", "congratulations",
- "grammaticallity", "grammatically",
- "gundamentalists", "fundamentalists",
- "idiosynchracies", "idiosyncrasies",
- "implementaitons", "implementations",
- "implimentations", "implementations",
- "inapporpriately", "inappropriately",
- "inappropraitely", "inappropriately",
- "inappropriatley", "inappropriately",
- "incompatability", "incompatibility",
- "incompetentence", "incompetence",
- "incomprehensibe", "incomprehensible",
- "incomprehesible", "incomprehensible",
- "inconcequential", "inconsequential",
- "inconcistencies", "inconsistencies",
- "inconditionally", "unconditionally",
- "inconsecuential", "inconsequential",
- "inconsequantial", "inconsequential",
- "inconsequencial", "inconsequential",
- "inconsequentual", "inconsequential",
- "inconsiquential", "inconsequential",
- "inconsistancies", "inconsistencies",
- "inconsistencias", "inconsistencies",
- "inconsistensies", "inconsistencies",
- "inconsistenties", "inconsistencies",
- "independentisme", "independents",
- "independentiste", "independents",
- "independentness", "independents",
- "inexperiencable", "inexperience",
- "inplementations", "implementations",
- "instantaneoulsy", "instantaneous",
- "institutionella", "institutional",
- "institutionnels", "institutions",
- "instutionalized", "institutionalized",
- "insubstantiated", "unsubstantiated",
- "interchangabley", "interchangeably",
- "interchangebale", "interchangeable",
- "intercontinetal", "intercontinental",
- "interpertations", "interpretations",
- "interpratations", "interpretations",
- "interpritations", "interpretations",
- "intersectionals", "intersections",
- "intrepretations", "interpretations",
- "investigationes", "investigations",
- "journalistische", "journalistic",
- "libertarianisim", "libertarianism",
- "libertarianisme", "libertarians",
- "libertarianismo", "libertarians",
- "libertarianists", "libertarians",
- "libertariansism", "libertarianism",
- "manisfestations", "manifestations",
- "manouverability", "maneuverability",
- "manufacturerers", "manufacturers",
- "marshmallowiest", "marshmallows",
- "marshmallowness", "marshmallows",
- "microtransacton", "microtransactions",
- "mininterpreting", "misinterpreting",
- "miscommuniation", "miscommunication",
- "miscommunicatie", "miscommunication",
- "miscommuniction", "miscommunication",
- "misinterperting", "misinterpreting",
- "misinterprating", "misinterpreting",
- "misinterprented", "misinterpret",
- "misinterprested", "misinterpret",
- "misinterpretion", "misinterpreting",
- "misinterpretted", "misinterpreted",
- "misinterpriting", "misinterpreting",
- "misintrepreting", "misinterpreting",
- "misrepresention", "misrepresenting",
- "misunderstading", "misunderstanding",
- "misunderstandig", "misunderstandings",
- "misunderstandng", "misunderstandings",
- "misunderstaning", "misunderstanding",
- "multicultralism", "multiculturalism",
- "multinationella", "multinational",
- "nationalistisch", "nationalists",
- "nationalistisen", "nationalists",
- "nationalistiska", "nationalists",
- "nationalistiske", "nationalists",
- "nationalistiskt", "nationalists",
- "nationalistista", "nationalists",
- "objectificaiton", "objectification",
- "objectivication", "objectification",
- "organisationens", "organisations",
- "organisationers", "organisations",
- "overestimateing", "overestimating",
- "paychologically", "psychologically",
- "performancetest", "performances",
- "performancewise", "performances",
- "perpendiculaire", "perpendicular",
- "pharamceuticals", "pharmaceutical",
- "pharmacueticals", "pharmaceutical",
- "philoshopically", "philosophically",
- "philosohpically", "philosophically",
- "philosophycally", "philosophically",
- "phsycologically", "psychologically",
- "phychologically", "psychologically",
- "phylosophically", "philosophically",
- "physcologically", "psychologically",
- "precrastination", "procrastination",
- "prefessionalism", "professionalism",
- "premonasterians", "premonstratensians",
- "procastrinating", "procrastinating",
- "procastrination", "procrastination",
- "procrascinating", "procrastinating",
- "procrastenating", "procrastinating",
- "procrastiantion", "procrastination",
- "procrastibating", "procrastinating",
- "procrastibation", "procrastination",
- "procrastonating", "procrastinating",
- "procrestinating", "procrastinating",
- "procrestination", "procrastination",
- "professionalsim", "professionalism",
- "prograstination", "procrastination",
- "progressionists", "progressions",
- "progressionwise", "progressions",
- "prokrastination", "procrastination",
- "proportionallly", "proportionally",
- "proscratination", "procrastination",
- "pscyhologically", "psychologically",
- "pshycologically", "psychologically",
- "psichologically", "psychologically",
- "psychedelicious", "psychedelics",
- "psychedelicness", "psychedelics",
- "psycholigically", "psychologically",
- "psychopathische", "psychopathic",
- "pyschologically", "psychologically",
- "racionalization", "rationalization",
- "rationalizaiton", "rationalization",
- "rationalizating", "rationalization",
- "reccomendations", "recommendations",
- "recommandations", "recommendations",
- "recommondations", "recommendations",
- "reinitalization", "reinitialization",
- "repersentations", "representations",
- "represantations", "representations",
- "represantatives", "representatives",
- "representatieve", "representative",
- "representativas", "representatives",
- "representetives", "representatives",
- "representitives", "representatives",
- "responibilities", "responsibilities",
- "responsibilites", "responsibilities",
- "responsibilitys", "responsibilities",
- "responsibillity", "responsibility",
- "responsibilties", "responsibilities",
- "responsiblities", "responsibilities",
- "ridiculoussness", "ridiculousness",
- "saskatchewinian", "saskatchewan",
- "satisfactorally", "satisfactory",
- "satisfactorilly", "satisfactory",
- "schizophreniiic", "schizophrenic",
- "sensationalisim", "sensationalism",
- "spreadsheeticus", "spreadsheets",
- "starightforward", "straightforward",
- "straigthforward", "straightforward",
- "striaghtforward", "straightforward",
- "sustainabillity", "sustainability",
- "technoligically", "technologically",
- "troubelshooting", "troubleshooting",
- "troublehsooting", "troubleshooting",
- "troubleshotting", "troubleshooting",
- "trustworthyness", "trustworthiness",
- "ubsubstantiated", "unsubstantiated",
- "unappropriately", "inappropriately",
- "uncomfortablely", "uncomfortably",
- "uncomfortablity", "uncomfortably",
- "unconditionable", "unconditional",
- "unconstituional", "unconstitutional",
- "uncontitutional", "unconstitutional",
- "uncontrollabley", "uncontrollably",
- "uncontrollablly", "uncontrollably",
- "unconventionnal", "unconventional",
- "underastimating", "underestimating",
- "underestemating", "underestimating",
- "understandabley", "understandably",
- "unintensionally", "unintentionally",
- "unprofessionnal", "unprofessional",
- "unresponsivness", "unresponsive",
- "unsibstantiated", "unsubstantiated",
- "unsubstanciated", "unsubstantiated",
- "unsubstansiated", "unsubstantiated",
- "unsusbtantiated", "unsubstantiated",
- "untranslateable", "untranslatable",
- "vulernabilities", "vulnerabilities",
- "vulnarabilities", "vulnerabilities",
- "vulnurabilities", "vulnerabilities",
- "vunlerabilities", "vulnerabilities",
- "vurnerabilities", "vulnerabilities",
- "accomplishemnt", "accomplishment",
- "accomplishents", "accomplishes",
- "acconplishment", "accomplishment",
- "acknowledgeing", "acknowledging",
- "acknowledgemnt", "acknowledgement",
- "acomplishments", "accomplishments",
- "administartion", "administration",
- "administartors", "administrators",
- "administraters", "administrators",
- "administratief", "administrative",
- "administratiei", "administrative",
- "administratior", "administrator",
- "administrativo", "administration",
- "adminsitration", "administration",
- "adminsitrative", "administrative",
- "adminsitrators", "administrators",
- "affectionatley", "affectionate",
- "aforememtioned", "aforementioned",
- "aforementioend", "aforementioned",
- "alternativelly", "alternatively",
- "amministrative", "administrative",
- "anitdepressant", "antidepressants",
- "approproximate", "approximate",
- "approximatelly", "approximately",
- "archeaologists", "archeologists",
- "architechtures", "architectures",
- "architectureal", "architectural",
- "architecturial", "architectural",
- "assassintation", "assassination",
- "authenitcation", "authentication",
- "authenticaiton", "authentication",
- "authobiography", "autobiography",
- "breakthroughts", "breakthroughs",
- "bureaucratisch", "bureaucratic",
- "calssification", "classification",
- "capatilization", "capitalization",
- "capitalizacion", "capitalization",
- "capitalizaiton", "capitalization",
- "capitalizating", "capitalization",
- "capitilazation", "capitalization",
- "capitolization", "capitalization",
- "captialization", "capitalization",
- "cardiocascular", "cardiovascular",
- "cardiovascualr", "cardiovascular",
- "cardiovasuclar", "cardiovascular",
- "caridovascular", "cardiovascular",
- "cessationalism", "sensationalism",
- "cessationalist", "sensationalist",
- "charactaristic", "characteristic",
- "characterisics", "characteristics",
- "characterisitc", "characteristics",
- "characteristcs", "characteristics",
- "characteritics", "characteristic",
- "charactersitic", "characteristics",
- "charasteristic", "characteristics",
- "charecteristic", "characteristic",
- "cheeseburguers", "cheeseburgers",
- "cinematagraphy", "cinematography",
- "cinematagrophy", "cinematography",
- "cinematograhpy", "cinematography",
- "cinematogrophy", "cinematography",
- "cinematogrpahy", "cinematography",
- "cinemetography", "cinematography",
- "cinimatography", "cinematography",
- "circumstansial", "circumstantial",
- "circumstantual", "circumstantial",
- "circumstential", "circumstantial",
- "circunstantial", "circumstantial",
- "classificaiton", "classification",
- "coincedentally", "coincidentally",
- "coinsidentally", "coincidentally",
- "commemmorating", "commemorating",
- "communciations", "communications",
- "compatablities", "compatibilities",
- "compatibillity", "compatibility",
- "compatiblities", "compatibilities",
- "competitioners", "competitions",
- "comphrehensive", "comprehensive",
- "computationnal", "computational",
- "conciderations", "considerations",
- "condescenscion", "condescension",
- "condradictions", "contradictions",
- "configuartions", "configurations",
- "confugurations", "configurations",
- "conglaturation", "congratulations",
- "congratulatons", "congratulations",
- "conicidentally", "coincidentally",
- "conifgurations", "configurations",
- "conscioussness", "consciousness",
- "consentrations", "concentrations",
- "consiciousness", "consciousness",
- "considerablely", "considerably",
- "considerstions", "considerations",
- "constititional", "constitutional",
- "constitucional", "constitutional",
- "contamporaries", "contemporaries",
- "contemporaneus", "contemporaneous",
- "contraceptivos", "contraceptives",
- "contradicitons", "contradictions",
- "contradictiong", "contradicting",
- "contriceptives", "contraceptives",
- "controceptives", "contraceptives",
- "controdictions", "contradictions",
- "conversacional", "conversational",
- "converstaional", "conversational",
- "correpsondence", "correspondence",
- "correspondants", "correspondents",
- "correspondense", "correspondence",
- "correspondente", "correspondence",
- "corrispondants", "correspondents",
- "corrispondence", "correspondence",
- "corrospondence", "correspondence",
- "costumizations", "customization",
- "councidentally", "coincidentally",
- "crystalisation", "crystallisation",
- "curcumstantial", "circumstantial",
- "demenstrations", "demonstrations",
- "deminstrations", "demonstrations",
- "demonstartions", "demonstrations",
- "demonstrativno", "demonstrations",
- "demonstrativos", "demonstrations",
- "demosntrations", "demonstrations",
- "desintegration", "disintegration",
- "deterioriating", "deteriorating",
- "determinisitic", "deterministic",
- "differentiaton", "differentiation",
- "disatisfaction", "dissatisfaction",
- "discrimanatory", "discriminatory",
- "discriminacion", "discrimination",
- "discriminitory", "discriminatory",
- "disillusionned", "disillusioned",
- "diskrimination", "discrimination",
- "disproportiate", "disproportionate",
- "distingiushing", "distinguishing",
- "distingquished", "distinguished",
- "distingusihing", "distinguishing",
- "distinquishing", "distinguishing",
- "distuingishing", "distinguishing",
- "dysfunctionnal", "dysfunctional",
- "eldistribution", "redistribution",
- "electromagnetc", "electromagnetic",
- "electromagntic", "electromagnetic",
- "endoctrination", "indoctrination",
- "enthusiastisch", "enthusiastic",
- "entrepreneuers", "entrepreneurs",
- "entrepreneures", "entrepreneurs",
- "enviormentally", "environmentally",
- "enviromentally", "environmentally",
- "environmentals", "environments",
- "environmentaly", "environmentally",
- "experimentaion", "experimentation",
- "experimentella", "experimental",
- "extraordinairy", "extraordinary",
- "extraordinarly", "extraordinary",
- "extrordinarily", "extraordinarily",
- "fondamentalist", "fundamentalist",
- "foreshadowning", "foreshadowing",
- "functionallity", "functionality",
- "fundamendalist", "fundamentalist",
- "fundamentalits", "fundamentalists",
- "fundamnetalist", "fundamentalist",
- "fundemantalist", "fundamentalist",
- "fundimentalist", "fundamentalist",
- "fundumentalist", "fundamentalist",
- "generalizacion", "generalization",
- "generalizating", "generalization",
- "generelization", "generalization",
- "geographacilly", "geographically",
- "geographycally", "geographically",
- "geogrpahically", "geographically",
- "geopraphically", "geographically",
- "goegraphically", "geographically",
- "grandchilderen", "grandchildren",
- "gravitationnal", "gravitational",
- "groubdbreaking", "groundbreaking",
- "groudnbreaking", "groundbreaking",
- "hallcuinations", "hallucination",
- "hallicunations", "hallucinations",
- "hallucenations", "hallucinations",
- "halluciantions", "hallucinations",
- "hallucinaitons", "hallucination",
- "hallunications", "hallucinations",
- "hallusinations", "hallucinations",
- "halluzinations", "hallucinations",
- "hellucinations", "hallucinations",
- "heterosexuella", "heterosexual",
- "hipothetically", "hypothetically",
- "homosexuallity", "homosexuality",
- "hullucinations", "hallucinations",
- "hyopthetically", "hypothetically",
- "hypathetically", "hypothetically",
- "hypethetically", "hypothetically",
- "hypotehtically", "hypothetically",
- "hypotethically", "hypothetically",
- "identificacion", "identification",
- "identificaiton", "identification",
- "identificativo", "identification",
- "identifikation", "identification",
- "imlpementation", "implementations",
- "impelmentation", "implementations",
- "impersonationg", "impersonating",
- "implementacion", "implementation",
- "implementaiton", "implementation",
- "implementating", "implementation",
- "implementatino", "implementations",
- "implemetnation", "implementations",
- "implimentation", "implementation",
- "impossibillity", "impossibility",
- "inadvertantely", "inadvertently",
- "inappropriatly", "inappropriately",
- "inapproprietly", "inappropriately",
- "incompatablity", "incompatibility",
- "incompatiblity", "incompatibility",
- "inconsequental", "inconsequential",
- "inconsistentcy", "inconsistency",
- "incontrollably", "uncontrollably",
- "inconventional", "unconventional",
- "inconvienenced", "inconvenience",
- "indestrictible", "indestructible",
- "indestructuble", "indestructible",
- "indetification", "identification",
- "indistructible", "indestructible",
- "individuallity", "individuality",
- "indocrtination", "indoctrination",
- "indoctrication", "indoctrination",
- "indoktrination", "indoctrination",
- "industiralized", "industrialized",
- "industrailized", "industrialized",
- "industrualized", "industrialized",
- "industructible", "indestructible",
- "inexplicablely", "inexplicably",
- "infrastracture", "infrastructure",
- "infrastructuur", "infrastructure",
- "infrastrucutre", "infrastructure",
- "infrastrukture", "infrastructure",
- "infrastrutture", "infrastructure",
- "infrasturcture", "infrastructure",
- "initalisations", "initialisations",
- "initalizations", "initializations",
- "inplementation", "implementation",
- "inspirationnal", "inspirational",
- "instinctivelly", "instinctively",
- "institutionale", "institutionalized",
- "institutionals", "institutions",
- "institutionnal", "institutional",
- "intellectualis", "intellectuals",
- "intellectualls", "intellectuals",
- "intellecutally", "intellectually",
- "intercepticons", "interceptions",
- "interchangable", "interchangeable",
- "interchangably", "interchangeably",
- "interchangeble", "interchangeable",
- "interchangebly", "interchangeably",
- "interlectually", "intellectually",
- "internationaal", "international",
- "internationaly", "internationally",
- "internationnal", "international",
- "interpersonnal", "interpersonal",
- "interpertation", "interpretation",
- "interpratation", "interpretation",
- "interpretacion", "interpretation",
- "interpretaiton", "interpretations",
- "interpretating", "interpretation",
- "interpritation", "interpretation",
- "interstellaire", "interstellar",
- "intillectually", "intellectually",
- "intrepretation", "interpretation",
- "invesitgations", "investigations",
- "investiagtions", "investigations",
- "investigatiors", "investigations",
- "investigativos", "investigations",
- "investigstions", "investigations",
- "irrationallity", "irrationally",
- "irresponsibile", "irresponsible",
- "journalistisch", "journalistic",
- "justificativos", "justifications",
- "koncentrations", "concentrations",
- "liberatrianism", "libertarianism",
- "libertarainism", "libertarianism",
- "libertariansim", "libertarianism",
- "libertarinaism", "libertarianism",
- "libertaryanism", "libertarianism",
- "libertatianism", "libertarianism",
- "liberterianism", "libertarianism",
- "libretarianism", "libertarianism",
- "manufactureers", "manufactures",
- "manufactureras", "manufactures",
- "manufacturered", "manufactured",
- "manufactureres", "manufacturers",
- "manufactureros", "manufactures",
- "massachusettes", "massachusetts",
- "massachussetts", "massachusetts",
- "mataphorically", "metaphorically",
- "mathameticians", "mathematicians",
- "mathemagically", "mathematically",
- "mathematitians", "mathematicians",
- "mathemetically", "mathematically",
- "mathemeticians", "mathematicians",
- "mathimatically", "mathematically",
- "mediterainnean", "mediterranean",
- "mediterrannean", "mediterranean",
- "metaphotically", "metaphorically",
- "metephorically", "metaphorically",
- "methaporically", "metaphorically",
- "metiphorically", "metaphorically",
- "metophorically", "metaphorically",
- "metropolitaine", "metropolitan",
- "misconseptions", "misconceptions",
- "misinterperted", "misinterpreted",
- "misintrepreted", "misinterpreted",
- "mulitnationals", "multinational",
- "mulitplication", "multiplication",
- "multiplicacion", "multiplication",
- "multiplicaiton", "multiplication",
- "multiplicativo", "multiplication",
- "multiplikation", "multiplication",
- "mutlinationals", "multinational",
- "mutliplication", "multiplication",
- "nationalisitic", "nationalistic",
- "nationalistics", "nationalists",
- "nationalisties", "nationalists",
- "nationalistisk", "nationalists",
- "neighbourhoood", "neighbourhood",
- "nieghbourhoods", "neighbourhood",
- "northereastern", "northeastern",
- "objectificaton", "objectification",
- "opthalmologist", "ophthalmologist",
- "organizacional", "organizational",
- "organizaitonal", "organizational",
- "organziational", "organizational",
- "orginazational", "organizational",
- "overestemating", "overestimating",
- "overextimating", "overestimating",
- "overhwelmingly", "overwhelmingly",
- "overhwlemingly", "overwhelmingly",
- "overpolulation", "overpopulation",
- "overpopluation", "overpopulation",
- "oversetimating", "overestimating",
- "overshadowered", "overshadowed",
- "overwhemlingly", "overwhelmingly",
- "overwhlemingly", "overwhelmingly",
- "paliamentarian", "parliamentarian",
- "parliamentiary", "parliamentary",
- "performancepcs", "performances",
- "personalitites", "personalities",
- "pharamceutical", "pharmaceutical",
- "pharmaceudical", "pharmaceutical",
- "pharmacuetical", "pharmaceutical",
- "pharmaseutical", "pharmaceutical",
- "pharmeceutical", "pharmaceutical",
- "philosophicaly", "philosophically",
- "phramaceutical", "pharmaceutical",
- "playthroughers", "playthroughs",
- "porportionally", "proportionally",
- "practitionners", "practitioners",
- "predeterminded", "predetermined",
- "predominantely", "predominantly",
- "predominantley", "predominantly",
- "preinitalizing", "preinitializing",
- "prerequisities", "prerequisite",
- "procrastinatin", "procrastination",
- "procrastinaton", "procrastination",
- "professionials", "professionalism",
- "professionnals", "professionals",
- "profitabillity", "profitability",
- "progressivelly", "progressively",
- "progressivisme", "progressives",
- "pronounciation", "pronunciation",
- "proportianally", "proportionally",
- "proportionalty", "proportionally",
- "proportionella", "proportionally",
- "proprotionally", "proportionally",
- "protruberances", "protuberances",
- "pseudononymous", "pseudonymous",
- "psychologicaly", "psychologically",
- "qaulifications", "qualification",
- "qualifiactions", "qualification",
- "qualificaitons", "qualifications",
- "quarterbackers", "quarterbacks",
- "rationalizaton", "rationalization",
- "reaponsibility", "responsibility",
- "recommandation", "recommendation",
- "recommedations", "recommendations",
- "recommondation", "recommendation",
- "reconnaissence", "reconnaissance",
- "reconstruccion", "reconstruction",
- "reconsturction", "reconstruction",
- "redistirbution", "redistribution",
- "redistribucion", "redistribution",
- "redistributivo", "redistribution",
- "redistrubition", "redistribution",
- "refridgeration", "refrigeration",
- "rehabilitacion", "rehabilitation",
- "rehabilitaiton", "rehabilitation",
- "reinforcemnets", "reinforcements",
- "rekommendation", "recommendation",
- "rektifications", "certifications",
- "reniforcements", "reinforcements",
- "repersentation", "representation",
- "represantation", "representation",
- "represantative", "representative",
- "representacion", "representation",
- "representaiton", "representations",
- "representatief", "representative",
- "representating", "representation",
- "representativo", "representation",
- "representetive", "representative",
- "representitive", "representative",
- "representstion", "representations",
- "representstive", "representatives",
- "represetnation", "representations",
- "represnetation", "representations",
- "reprezentative", "representative",
- "repsonsibility", "responsibility",
- "resistribution", "redistribution",
- "responcibility", "responsibility",
- "responisbility", "responsibility",
- "responnsibilty", "responsibility",
- "responsability", "responsibility",
- "responsibilies", "responsibilities",
- "responsibities", "responsibilities",
- "restaraunteurs", "restaurateurs",
- "retroactivelly", "retroactively",
- "revolutionairy", "revolutionary",
- "revolutionnary", "revolutionary",
- "ridicilousness", "ridiculousness",
- "ridicoulusness", "ridiculousness",
- "rienforcements", "reinforcements",
- "righteoussness", "righteousness",
- "satisfactoraly", "satisfactory",
- "satisfactority", "satisfactorily",
- "sceintifically", "scientifically",
- "schizophrentic", "schizophrenic",
- "screenwrighter", "screenwriter",
- "sensacionalism", "sensationalism",
- "sensacionalist", "sensationalist",
- "sensasionalism", "sensationalism",
- "sensasionalist", "sensationalist",
- "sensationality", "sensationalist",
- "sensationalizm", "sensationalism",
- "sensationalsim", "sensationalism",
- "sensationilism", "sensationalism",
- "sensationilist", "sensationalist",
- "sensationslism", "sensationalism",
- "sensetionalism", "sensationalism",
- "sensibilisiert", "sensibilities",
- "sentationalism", "sensationalism",
- "sentationalist", "sensationalist",
- "senzationalism", "sensationalism",
- "senzationalist", "sensationalist",
- "sepcifications", "specification",
- "simaltaneously", "simultaneously",
- "simeltaneously", "simultaneously",
- "similtaneously", "simultaneously",
- "simlutaneously", "simultaneously",
- "simplificacion", "simplification",
- "simplificaiton", "simplification",
- "simplificating", "simplification",
- "simulatenously", "simultaneously",
- "simulatneously", "simultaneously",
- "simultaenously", "simultaneously",
- "simultainously", "simultaneously",
- "simultaneoulsy", "simultaneously",
- "simultaniously", "simultaneously",
- "simulteanously", "simultaneously",
- "sistematically", "systematically",
- "slaugterhouses", "slaughterhouses",
- "specailization", "specialization",
- "specialication", "specialization",
- "specializaiton", "specialization",
- "specificaitons", "specification",
- "speciliazation", "specialization",
- "spectacularely", "spectacularly",
- "spectacularily", "spectacularly",
- "spesifications", "specifications",
- "spezialisation", "specialization",
- "sportsmansship", "sportsmanship",
- "spreadsheeters", "spreadsheets",
- "straightforwad", "straightforward",
- "subconcsiously", "subconsciously",
- "subconsicously", "subconsciously",
- "subsconciously", "subconsciously",
- "sunconsciously", "subconsciously",
- "superintendant", "superintendent",
- "suppliementing", "supplementing",
- "surrepetitious", "surreptitious",
- "survivabililty", "survivability",
- "survivabillity", "survivability",
- "sustainabiltiy", "sustainability",
- "syncronization", "synchronization",
- "systemetically", "systematically",
- "systimatically", "systematically",
- "technologicaly", "technologically",
- "thermodinamics", "thermodynamics",
- "thermodyanmics", "thermodynamics",
- "thermodymamics", "thermodynamics",
- "thermodymanics", "thermodynamics",
- "thermodynamcis", "thermodynamics",
- "thermodynanics", "thermodynamics",
- "thermodynmaics", "thermodynamics",
- "thernodynamics", "thermodynamics",
- "theromdynamics", "thermodynamics",
- "transformacion", "transformation",
- "transfromation", "transformation",
- "transitionable", "transitional",
- "transitionning", "transitioning",
- "transofrmation", "transformation",
- "trasnformation", "transformation",
- "trasnportation", "transportation",
- "unbelievablely", "unbelievably",
- "unchallengable", "unchallengeable",
- "uncomfortabley", "uncomfortably",
- "uncomfortablly", "uncomfortably",
- "unconciousness", "unconsciousness",
- "unconditionaly", "unconditionally",
- "unconditionnal", "unconditional",
- "unconsciouslly", "unconsciously",
- "uncontrallable", "uncontrollable",
- "uncontrallably", "uncontrollably",
- "uncontrolablly", "uncontrollably",
- "unconvectional", "unconventional",
- "unconvencional", "unconventional",
- "unconvensional", "unconventional",
- "unconventianal", "unconventional",
- "underastimated", "underestimated",
- "underestamated", "underestimated",
- "underestemated", "underestimated",
- "underestimeted", "underestimated",
- "undersetimated", "underestimated",
- "understandebly", "understandably",
- "understandible", "understandable",
- "understandibly", "understandably",
- "undestructible", "indestructible",
- "unforetunately", "unfortunately",
- "unfortunatelly", "unfortunately",
- "unfourtunately", "unfortunately",
- "uninitalizable", "uninitializable",
- "unintelligient", "unintelligent",
- "unintentionaly", "unintentionally",
- "unintentionnal", "unintentional",
- "unmanouverable", "unmaneuverable",
- "unneccessarily", "unnecessarily",
- "unnecessarilly", "unnecessarily",
- "unprecendented", "unprecedented",
- "unprofessionel", "unprofessional",
- "unreasonablely", "unreasonably",
- "unsubstantiaed", "unsubstantiated",
- "unsurprizingly", "unsurprisingly",
- "vizualisations", "visualization",
- "vulnerabilites", "vulnerabilities",
- "vulnerabillity", "vulnerability",
- "vulnerablility", "vulnerability",
- "wholeheartadly", "wholeheartedly",
- "wholeheartidly", "wholeheartedly",
- "abbrievations", "abbreviation",
- "accelleration", "acceleration",
- "accomadations", "accommodations",
- "accommadating", "accommodating",
- "accommadation", "accommodation",
- "accommidation", "accommodation",
- "accomodations", "accommodations",
- "accomondating", "accommodating",
- "accomondation", "accommodation",
- "accomplishent", "accomplishment",
- "accountabilty", "accountability",
- "accredidation", "accreditation",
- "acknolwedging", "acknowledging",
- "acknowlegding", "acknowledging",
- "acomplishment", "accomplishment",
- "acquaintaince", "acquaintance",
- "acquaintences", "acquaintances",
- "acquaintinces", "acquaintances",
- "acquanitances", "acquaintance",
- "acquantainces", "acquaintances",
- "acquantiances", "acquaintances",
- "acquiantances", "acquaintances",
- "acquiantences", "acquaintances",
- "adminastrator", "administrator",
- "administartor", "administrator",
- "administraion", "administration",
- "administraron", "administrator",
- "administrater", "administrator",
- "administratio", "administrator",
- "administraton", "administration",
- "adminsitrator", "administrator",
- "adminstration", "administration",
- "adminstrative", "administrative",
- "admissability", "admissibility",
- "adnimistrator", "administrators",
- "adverticement", "advertisement",
- "advertisiment", "advertisement",
- "advertisments", "advertisements",
- "advirtisement", "advertisement",
- "aestethically", "aesthetically",
- "aesthatically", "aesthetically",
- "aesthitically", "aesthetically",
- "affectionnate", "affectionate",
- "aforementiond", "aforementioned",
- "agriculturual", "agricultural",
- "agrumentative", "argumentative",
- "alterantively", "alternatively",
- "alternativets", "alternatives",
- "alternativley", "alternatively",
- "alternitavely", "alternatively",
- "alternitively", "alternatively",
- "aninteresting", "uninteresting",
- "annoucnements", "announcements",
- "antagonisitic", "antagonistic",
- "anthropolgist", "anthropologist",
- "apporpriately", "appropriately",
- "apporpriation", "appropriation",
- "apporximately", "approximately",
- "appreciateing", "appreciating",
- "appreciateive", "appreciative",
- "appreciationg", "appreciating",
- "appropirately", "appropriately",
- "appropiration", "appropriation",
- "appropraitely", "appropriately",
- "appropreation", "appropriation",
- "appropriatley", "appropriately",
- "appropropiate", "appropriate",
- "approrpiation", "appropriation",
- "approxamately", "approximately",
- "approxiamtely", "approximately",
- "approximatley", "approximately",
- "approximitely", "approximately",
- "aqcuaintances", "acquaintances",
- "aqquaintances", "acquaintances",
- "archaelogical", "archaeological",
- "archaelogists", "archaeologists",
- "archeaologist", "archeologist",
- "archetectural", "architectural",
- "architechture", "architecture",
- "architechural", "architectural",
- "architectrual", "architectural",
- "architecutral", "architectural",
- "argumentitive", "argumentative",
- "arugmentative", "argumentative",
- "asethetically", "aesthetically",
- "assasinations", "assassinations",
- "audomoderator", "automoderator",
- "australianess", "australians",
- "authenticaion", "authentication",
- "authenticaton", "authentication",
- "autherization", "authorization",
- "authoratitive", "authoritative",
- "authoritatian", "authoritarian",
- "authoritation", "authorization",
- "authorititive", "authoritative",
- "authoritorian", "authoritarian",
- "authorotative", "authoritative",
- "authroization", "authorization",
- "automoderador", "automoderator",
- "automoderater", "automoderator",
- "automodorator", "automoderator",
- "automoterator", "automoderator",
- "autoritharian", "authoritarian",
- "availabillity", "availability",
- "awknowledging", "acknowledging",
- "billingualism", "bilingualism",
- "billionairres", "billionaire",
- "borderlanders", "borderlands",
- "breadtfeeding", "breastfeeding",
- "breastfeading", "breastfeeding",
- "breatsfeeding", "breastfeeding",
- "broadacasting", "broadcasting",
- "bureaucractic", "bureaucratic",
- "bureaucratics", "bureaucrats",
- "bureaucratius", "bureaucrats",
- "californiaman", "californian",
- "calrification", "clarification",
- "capitalizaton", "capitalization",
- "carbohdyrates", "carbohydrates",
- "carbohidrates", "carbohydrates",
- "carbohyrdates", "carbohydrates",
- "carboyhdrates", "carbohydrates",
- "carthographer", "cartographer",
- "catagorically", "categorically",
- "catastrophies", "catastrophe",
- "catastrophize", "catastrophe",
- "catigorically", "categorically",
- "catterpillars", "caterpillars",
- "celebrationis", "celebrations",
- "ceritfication", "certifications",
- "certificaiton", "certification",
- "championchips", "championship",
- "championshiop", "championships",
- "championsship", "championships",
- "chanpionships", "championships",
- "charactarized", "characterized",
- "characterisic", "characteristic",
- "characteristc", "characteristics",
- "characterists", "characteristics",
- "charicterized", "characterized",
- "charismatisch", "charismatic",
- "checkpointusa", "checkpoints",
- "cheeseburgare", "cheeseburger",
- "cheeseburgler", "cheeseburger",
- "cheeseburguer", "cheeseburger",
- "cheezeburgers", "cheeseburgers",
- "chornological", "chronological",
- "chronoligical", "chronological",
- "chronologicly", "chronological",
- "cinematograhy", "cinematography",
- "cinematograpy", "cinematography",
- "circomference", "circumference",
- "circumcission", "circumcision",
- "circumferance", "circumference",
- "circumsicions", "circumcision",
- "circumstanial", "circumstantial",
- "circumstantal", "circumstantial",
- "circumstnaces", "circumstance",
- "circunference", "circumference",
- "circunstances", "circumstances",
- "cirucmference", "circumference",
- "cirucmstances", "circumstances",
- "civilications", "civilizations",
- "civilizaitons", "civilizations",
- "clarificaiton", "clarification",
- "clasification", "clarification",
- "clerification", "clarification",
- "coincidentaly", "coincidentally",
- "coincidential", "coincidental",
- "colaborations", "collaborations",
- "collabaration", "collaboration",
- "collaberation", "collaboration",
- "collaberative", "collaborative",
- "collaboratore", "collaborate",
- "collectioners", "collections",
- "collectivelly", "collectively",
- "collobaration", "collaboration",
- "combatibility", "compatibility",
- "comeptitively", "competitively",
- "comfortablely", "comfortably",
- "comfortablity", "comfortably",
- "comfrontation", "confrontation",
- "commemerative", "commemorative",
- "commericially", "commercially",
- "commerorative", "commemorative",
- "comminication", "communication",
- "comminucation", "communications",
- "commissionees", "commissions",
- "commissionned", "commissioned",
- "commissionner", "commissioner",
- "commmemorated", "commemorated",
- "commuications", "communications",
- "commuincation", "communications",
- "communciation", "communication",
- "communiaction", "communications",
- "communicaiton", "communication",
- "communicatoin", "communications",
- "communicatons", "communications",
- "compadibility", "compatibility",
- "comparativley", "comparatively",
- "comparetively", "comparatively",
- "comparitavely", "comparatively",
- "comparitively", "comparatively",
- "compatability", "compatibility",
- "compatibiltiy", "compatibility",
- "compeditively", "competitively",
- "compensantion", "compensation",
- "compensationg", "compensating",
- "comperatively", "comparatively",
- "comperhension", "comprehension",
- "competatively", "competitively",
- "competitavely", "competitively",
- "competitevely", "competitively",
- "competitivley", "competitively",
- "competiveness", "competitiveness",
- "compilcations", "complication",
- "compitability", "compatibility",
- "complciations", "complication",
- "complecations", "complications",
- "compliactions", "complication",
- "complicaitons", "complication",
- "complilations", "complications",
- "complimentery", "complimentary",
- "complimentoni", "complimenting",
- "complimentory", "complimentary",
- "comprehention", "comprehension",
- "computacional", "computational",
- "comtamination", "contamination",
- "comtemplating", "contemplating",
- "concatination", "contamination",
- "conceivablely", "conceivably",
- "concencration", "concentration",
- "concenrtation", "concentrations",
- "concentartion", "concentrations",
- "concentracion", "concentration",
- "concentraited", "concentrated",
- "concentraiton", "concentrations",
- "concentratons", "concentrations",
- "concervatives", "conservatives",
- "concideration", "consideration",
- "concioussness", "consciousness",
- "concnetration", "concentrations",
- "concsiousness", "consciousness",
- "condascending", "condescending",
- "condescencion", "condescension",
- "condescendion", "condescension",
- "condescensing", "condescension",
- "condiscending", "condescending",
- "conditionning", "conditioning",
- "condradicting", "contradicting",
- "condradiction", "contradiction",
- "condradictory", "contradictory",
- "conecntration", "concentrations",
- "conenctration", "concentrations",
- "confidentally", "confidentially",
- "configruation", "configurations",
- "configuartion", "configuration",
- "configuracion", "configuration",
- "configuraiton", "configuration",
- "configuratoin", "configurations",
- "configureable", "configurable",
- "confrentation", "confrontation",
- "confrontacion", "confrontation",
- "confrontating", "confrontation",
- "confrontativo", "confrontation",
- "congratualted", "congratulate",
- "conifguration", "configurations",
- "conisderation", "considerations",
- "connecticunts", "connecticut",
- "connectivitiy", "connectivity",
- "conpassionate", "compassionate",
- "conplications", "complications",
- "conplimentary", "complimentary",
- "conplimenting", "complimenting",
- "conprehension", "comprehension",
- "consdieration", "considerations",
- "consenquently", "consequently",
- "consentrating", "concentrating",
- "consentration", "concentration",
- "consequencies", "consequence",
- "consequentely", "consequently",
- "consequeseces", "consequences",
- "conservatisim", "conservatism",
- "conservativsm", "conservatism",
- "conservitives", "conservatives",
- "consicousness", "consciousness",
- "considerabely", "considerable",
- "considerabile", "considerable",
- "considerabley", "considerably",
- "considerablly", "considerably",
- "consideracion", "consideration",
- "consideratoin", "considerations",
- "considerstion", "considerations",
- "considertaion", "considerations",
- "consituencies", "constituencies",
- "consitutional", "constitutional",
- "constallation", "constellation",
- "constarnation", "consternation",
- "constillation", "constellation",
- "constituintes", "constituents",
- "constituional", "constitutional",
- "constitutents", "constitutes",
- "constitutinal", "constitutional",
- "constructicon", "construction",
- "constructieve", "constructive",
- "constructiong", "constructing",
- "consttruction", "construction",
- "contaminacion", "contamination",
- "contaminanted", "contaminated",
- "contanimation", "contamination",
- "contenplating", "contemplating",
- "contimplating", "contemplating",
- "contraceptivo", "contraception",
- "contradiccion", "contradiction",
- "contradicitng", "contradicting",
- "contradiciton", "contradiction",
- "contradictary", "contradictory",
- "contradictons", "contradicts",
- "contraticting", "contradicting",
- "contravercial", "controversial",
- "contraversial", "controversial",
- "contreception", "contraception",
- "contreversial", "controversial",
- "contributeurs", "contributes",
- "contributiors", "contributors",
- "contriception", "contraception",
- "contridictory", "contradictory",
- "contritutions", "contributions",
- "contriversial", "controversial",
- "controception", "contraception",
- "controdicting", "contradicting",
- "controdiction", "contradiction",
- "controvercial", "controversial",
- "controverisal", "controversial",
- "controversary", "controversy",
- "controversity", "controversy",
- "controvertial", "controversial",
- "contstruction", "construction",
- "conventionnal", "conventional",
- "converastions", "conservation",
- "conversationa", "conservation",
- "conversationg", "conservation",
- "conversationy", "conservation",
- "conversatiosn", "conservation",
- "conversatives", "conservatives",
- "converstaions", "conversations",
- "convorsations", "conversations",
- "cooresponding", "corresponding",
- "coorperations", "corporations",
- "correctionals", "corrections",
- "correpsonding", "corresponding",
- "correspondant", "correspondent",
- "correspondece", "correspondence",
- "corresponders", "corresponds",
- "corresponsing", "corresponding",
- "corrispondant", "correspondent",
- "corrisponding", "corresponding",
- "corrosponding", "corresponding",
- "costomization", "customization",
- "costumization", "customization",
- "counterfeight", "counterfeit",
- "creationistas", "creationists",
- "cricumference", "circumference",
- "cringeworthey", "cringeworthy",
- "cringeworthly", "cringeworthy",
- "crytopgraphic", "cryptographic",
- "curcumference", "circumference",
- "curcumstances", "circumstances",
- "custumization", "customization",
- "cuztomization", "customization",
- "decentraliced", "decentralized",
- "decentrilized", "decentralized",
- "decomissioned", "decommissioned",
- "decompositing", "decomposing",
- "definitivelly", "definitively",
- "deinitalizing", "deinitializing",
- "demenstration", "demonstration",
- "democraticaly", "democratically",
- "democraticlly", "democratically",
- "demoninations", "denominations",
- "demonstarting", "demonstrating",
- "demonstartion", "demonstration",
- "demonstraiton", "demonstrations",
- "demonstratbly", "demonstrably",
- "demonstraties", "demonstrate",
- "demonstrativo", "demonstration",
- "demosntrating", "demonstrating",
- "demosntration", "demonstrations",
- "denomenations", "denominations",
- "denomonations", "denominations",
- "deomnstration", "demonstrations",
- "dermatalogist", "dermatologist",
- "dermatolagist", "dermatologist",
- "dermatoligist", "dermatologist",
- "dermatologyst", "dermatologist",
- "dermetologist", "dermatologist",
- "dermitologist", "dermatologist",
- "derpatologist", "dermatologist",
- "desentralized", "decentralized",
- "desillusioned", "disillusioned",
- "desintegrated", "disintegrated",
- "desinterested", "disinterested",
- "determenation", "determination",
- "determinacion", "determination",
- "determinining", "determining",
- "determinisitc", "deterministic",
- "determinsitic", "deterministic",
- "detmatologist", "dermatologist",
- "developmently", "developmental",
- "dezentralized", "decentralized",
- "differantiate", "differentiate",
- "differenciate", "differentiate",
- "differintiate", "differentiate",
- "diffirentiate", "differentiate",
- "disadvandages", "disadvantaged",
- "disadvantadge", "disadvantaged",
- "disadvanteged", "disadvantaged",
- "disadvanteges", "disadvantages",
- "disadvatanges", "disadvantages",
- "disadventaged", "disadvantaged",
- "disadventages", "disadvantages",
- "disallusioned", "disillusioned",
- "disappearence", "disappearance",
- "disappearnace", "disappearance",
- "disappearring", "disappearing",
- "disatvantaged", "disadvantaged",
- "disatvantages", "disadvantages",
- "disciplinairy", "disciplinary",
- "disciplinerad", "disciplined",
- "discipliniary", "disciplinary",
- "disconnecters", "disconnects",
- "discontinuted", "discontinued",
- "discrimianted", "discriminated",
- "discriminante", "discriminate",
- "discriminatie", "discriminate",
- "discriminatin", "discrimination",
- "disillisioned", "disillusioned",
- "disillutioned", "disillusioned",
- "disingenuious", "disingenuous",
- "disollusioned", "disillusioned",
- "disrecpectful", "disrespectful",
- "disrecpecting", "disrespecting",
- "disrepsectful", "disrespectful",
- "disrepsecting", "disrespecting",
- "disresepctful", "disrespectful",
- "disresepcting", "disrespecting",
- "disrespection", "disrespecting",
- "disrespekting", "disrespecting",
- "disrispectful", "disrespectful",
- "disrispecting", "disrespecting",
- "dissagreement", "disagreement",
- "dissapearance", "disappearance",
- "dissapointted", "dissapointed",
- "dissappointed", "disappointed",
- "dissobediance", "disobedience",
- "dissobedience", "disobedience",
- "distingishing", "distinguishing",
- "distinguising", "distinguishing",
- "distinquished", "distinguished",
- "distirbutions", "distributions",
- "distiungished", "distinguished",
- "distribustion", "distributions",
- "distributiors", "distributors",
- "distributivos", "distributions",
- "distrobutions", "distributions",
- "distrubitions", "distributions",
- "distuingished", "distinguished",
- "documantaries", "documentaries",
- "documenatries", "documentaries",
- "documentacion", "documentation",
- "documentaires", "documentaries",
- "documentaiton", "documentation",
- "documentarios", "documentaries",
- "documentaties", "documentaries",
- "documentating", "documentation",
- "documenteries", "documentaries",
- "documentories", "documentaries",
- "drammatically", "grammatically",
- "dsyfunctional", "dysfunctional",
- "dumbfoundeads", "dumbfounded",
- "dusfunctional", "dysfunctional",
- "dustification", "justification",
- "dysfonctional", "dysfunctional",
- "dysfucntional", "dysfunctional",
- "dysfuncitonal", "dysfunctional",
- "dysfunktional", "dysfunctional",
- "easthetically", "aesthetically",
- "effectiviness", "effectiveness",
- "effictiveness", "effectiveness",
- "effortlessely", "effortlessly",
- "effortlessley", "effortlessly",
- "embarrasement", "embarrassment",
- "embarrasments", "embarrassment",
- "embarressment", "embarrassment",
- "emberrassment", "embarrassment",
- "encarceration", "incarceration",
- "encorporating", "incorporating",
- "encyclopeadia", "encyclopedia",
- "encyclopeadic", "encyclopedia",
- "encyclopeedia", "encyclopedia",
- "encycolpedias", "encyclopedia",
- "endoctrinated", "indoctrinated",
- "enlightenting", "enlightening",
- "enlightnement", "enlightenment",
- "enligthenment", "enlightenment",
- "enteratinment", "entertainment",
- "enterpreneurs", "entrepreneurs",
- "enterprenuers", "entrepreneurs",
- "enterpreuners", "entrepreneurs",
- "entertianment", "entertainment",
- "enthusiasists", "enthusiasts",
- "enthusiastics", "enthusiasts",
- "entrepraneurs", "entrepreneurs",
- "entreprenaurs", "entrepreneurs",
- "entrepreneuer", "entrepreneurs",
- "entreprenours", "entrepreneurs",
- "entreprenuers", "entrepreneurs",
- "entreprenures", "entrepreneurs",
- "entrepreuners", "entrepreneurs",
- "entretainment", "entertainment",
- "enviornmental", "environmental",
- "environemntal", "environmental",
- "environmently", "environmental",
- "envolutionary", "evolutionary",
- "envrionmental", "environmental",
- "estabilshment", "establishments",
- "establishemnt", "establishments",
- "establishmnet", "establishments",
- "establsihment", "establishments",
- "estbalishment", "establishments",
- "ethnocentricm", "ethnocentrism",
- "evolutionairy", "evolutionary",
- "evolutionarly", "evolutionary",
- "evolutionnary", "evolutionary",
- "exaggeratting", "exaggerating",
- "excpetionally", "exceptionally",
- "executioneers", "executioner",
- "existentiella", "existential",
- "expectionally", "exceptionally",
- "experementing", "experimenting",
- "experienceing", "experiencing",
- "experimentais", "experiments",
- "experimention", "experimenting",
- "experimentors", "experiments",
- "expirementing", "experimenting",
- "expodentially", "exponentially",
- "exponantially", "exponentially",
- "exponencially", "exponentially",
- "exponentiella", "exponential",
- "extraodrinary", "extraordinary",
- "extraordianry", "extraordinary",
- "extraordinair", "extraordinary",
- "extraordinaly", "extraordinary",
- "extraoridnary", "extraordinary",
- "extremeophile", "extremophile",
- "extroardinary", "extraordinary",
- "familiarizate", "familiarize",
- "fantasitcally", "fantastically",
- "fantasmically", "fantastically",
- "fantistically", "fantastically",
- "faptastically", "fantastically",
- "figurativeley", "figuratively",
- "figurativelly", "figuratively",
- "frankenstiens", "frankenstein",
- "frankenstined", "frankenstein",
- "frankenstiner", "frankenstein",
- "frankenstines", "frankenstein",
- "friendzoneado", "friendzoned",
- "fucntionality", "functionality",
- "funcitonality", "functionality",
- "functionailty", "functionality",
- "fundamentalis", "fundamentals",
- "fundamnetally", "fundamentally",
- "fundementally", "fundamentally",
- "fundimentally", "fundamentally",
- "gamifications", "ramifications",
- "generalizaing", "generalizing",
- "generalizaton", "generalization",
- "generationals", "generations",
- "generationens", "generations",
- "generationers", "generations",
- "generationnal", "generational",
- "geographicaly", "geographically",
- "geographicial", "geographical",
- "geometricians", "geometers",
- "goreshadowing", "foreshadowing",
- "governmential", "governmental",
- "gradification", "gratification",
- "grammarically", "grammatically",
- "grandchildern", "grandchildren",
- "gratificacion", "gratification",
- "gratificaiton", "gratification",
- "grativational", "gravitational",
- "gravitacional", "gravitational",
- "gravitaitonal", "gravitational",
- "hallcuination", "hallucination",
- "hallicunation", "hallucination",
- "hallucenation", "hallucination",
- "halluciantion", "hallucinations",
- "hallukination", "hallucination",
- "hallunication", "hallucination",
- "hallusination", "hallucination",
- "halluzination", "hallucination",
- "heiroglyphics", "hieroglyphics",
- "hellucination", "hallucination",
- "highlightning", "highlighting",
- "homesexuality", "homosexuality",
- "homosexualtiy", "homosexuality",
- "homosexulaity", "homosexuality",
- "horizontallly", "horizontally",
- "hullucination", "hallucination",
- "hypocriticial", "hypocritical",
- "hypotheticaly", "hypothetically",
- "hystericallly", "hysterically",
- "identificaton", "identification",
- "ideoligically", "ideologically",
- "ideosyncratic", "idiosyncratic",
- "idiologically", "ideologically",
- "illistrations", "illustrations",
- "illustartions", "illustrations",
- "imperfactions", "imperfections",
- "impersinating", "impersonating",
- "implementaion", "implementation",
- "implementatin", "implementations",
- "implimenation", "implementation",
- "imprefections", "imperfections",
- "impresonating", "impersonating",
- "inaccessibile", "inaccessible",
- "inadventently", "inadvertently",
- "inadverdently", "inadvertently",
- "inadvertantly", "inadvertently",
- "inadvertendly", "inadvertently",
- "inapporpriate", "inappropriate",
- "inappropirate", "inappropriate",
- "inappropraite", "inappropriate",
- "inaproppriate", "inappropriate",
- "incarcaration", "incarceration",
- "incarciration", "incarceration",
- "incarseration", "incarceration",
- "incerceration", "incarceration",
- "incidentially", "incidentally",
- "incomfortable", "uncomfortable",
- "incomfortably", "uncomfortably",
- "incompatabile", "incompatible",
- "incompatiable", "incompatible",
- "incompatibile", "incompatible",
- "inconciderate", "inconsiderate",
- "inconcistency", "inconsistency",
- "inconditional", "unconditional",
- "inconsciously", "unconsciously",
- "inconsiderant", "inconsiderate",
- "inconsistance", "inconsistency",
- "inconsistancy", "inconsistency",
- "inconsistenly", "inconsistency",
- "inconsistensy", "inconsistency",
- "inconsistenty", "inconsistency",
- "inconveinence", "inconvenience",
- "inconveniance", "inconvenience",
- "inconveniente", "inconvenience",
- "inconvienence", "inconvenience",
- "incoroporated", "incorporated",
- "incorparating", "incorporating",
- "incorperating", "incorporating",
- "incorperation", "incorporation",
- "incorruptable", "incorruptible",
- "incramentally", "incrementally",
- "incrementarla", "incremental",
- "incrementarlo", "incremental",
- "indavertently", "inadvertently",
- "indefinitelly", "indefinitely",
- "independantes", "independents",
- "independantly", "independently",
- "independendet", "independent",
- "independendly", "independently",
- "indepentently", "independently",
- "indespensable", "indispensable",
- "indespensible", "indispensable",
- "indestructble", "indestructible",
- "indestructibe", "indestructible",
- "indictrinated", "indoctrinated",
- "indipendently", "independently",
- "indispensible", "indispensable",
- "indivuduality", "individuality",
- "indocrtinated", "indoctrinated",
- "indocternated", "indoctrinated",
- "indoctornated", "indoctrinated",
- "indoctrinatie", "indoctrinated",
- "indoctrinatin", "indoctrination",
- "indoctronated", "indoctrinated",
- "industrialied", "industrialized",
- "industrialzed", "industrialized",
- "inexeprienced", "inexperience",
- "inexpeirenced", "inexperience",
- "inexpereinced", "inexperienced",
- "inexperianced", "inexperienced",
- "inexperiecned", "inexperience",
- "inexperineced", "inexperience",
- "inexpierenced", "inexperienced",
- "inexplicabley", "inexplicably",
- "inexplicablly", "inexplicably",
- "infilitration", "infiltration",
- "infrastructre", "infrastructure",
- "infrastrucure", "infrastructure",
- "inintelligent", "unintelligent",
- "ininteresting", "uninteresting",
- "initalisation", "initialisation",
- "initalization", "initialization",
- "inperfections", "imperfections",
- "inpersonating", "impersonating",
- "inpossibility", "impossibility",
- "inpredictable", "unpredictable",
- "inresponsible", "irresponsible",
- "insectiverous", "insectivorous",
- "insecuritites", "insecurities",
- "insiginficant", "insignificant",
- "insiginifcant", "insignificant",
- "insignificent", "insignificant",
- "insignificunt", "insignificant",
- "insignifigant", "insignificant",
- "insiprational", "inspirational",
- "insperational", "inspirational",
- "inspiritional", "inspirational",
- "inspriational", "inspirational",
- "instantaenous", "instantaneous",
- "instantanious", "instantaneous",
- "instanteneous", "instantaneous",
- "instantenious", "instantaneous",
- "instincitvely", "instinctively",
- "instinctivley", "instinctively",
- "instititional", "institutional",
- "institutionel", "institutional",
- "insturmentals", "instrumental",
- "instutitional", "institutional",
- "insustainable", "unsustainable",
- "intelelctuals", "intellectuals",
- "intellectualy", "intellectually",
- "intellectuels", "intellectuals",
- "intellecutals", "intellectuals",
- "intellegently", "intelligently",
- "intelluctuals", "intellectuals",
- "intepretation", "interpretation",
- "intereactions", "intersections",
- "interesctions", "intersections",
- "interlectuals", "intellectuals",
- "intermittient", "intermittent",
- "intermittment", "intermittent",
- "internacional", "international",
- "interpersonel", "interpersonal",
- "interpresonal", "interpersonal",
- "interpretaion", "interpretation",
- "interpretarea", "interpreter",
- "interpretarem", "interpreter",
- "interpretares", "interpreter",
- "interpretarse", "interpreter",
- "interpretarte", "interpreter",
- "interpretatin", "interpretations",
- "interpreteert", "interpreter",
- "interragation", "interrogation",
- "interregation", "interrogation",
- "interrigation", "interrogation",
- "interrogacion", "interrogation",
- "interrogativo", "interrogation",
- "intertainment", "entertainment",
- "intillectuals", "intellectuals",
- "intraspection", "introspection",
- "intrensically", "intrinsically",
- "intriniscally", "intrinsically",
- "intrinsecally", "intrinsically",
- "intrisincally", "intrinsically",
- "intristically", "intrinsically",
- "introductiory", "introductory",
- "introspeccion", "introspection",
- "introspectivo", "introspection",
- "introspektion", "introspection",
- "invertibrates", "invertebrates",
- "invesitgation", "investigation",
- "invesitgative", "investigative",
- "invesitgators", "investigators",
- "investagators", "investigators",
- "investegating", "investigating",
- "investegators", "investigators",
- "investiagtion", "investigation",
- "investiagtive", "investigative",
- "investigacion", "investigation",
- "investigaiton", "investigations",
- "investigaters", "investigators",
- "investigativo", "investigation",
- "investigatons", "investigations",
- "investigsting", "investigating",
- "investigstion", "investigations",
- "investogators", "investigators",
- "invisibillity", "invisibility",
- "involuntarely", "involuntary",
- "involuntarity", "involuntary",
- "invulnerabile", "invulnerable",
- "irrationallly", "irrationally",
- "irresponcible", "irresponsible",
- "irresponisble", "irresponsible",
- "irresponsable", "irresponsible",
- "irresponsbile", "irresponsible",
- "irreversiable", "irreversible",
- "irreversibelt", "irreversible",
- "irreversibile", "irreversible",
- "irrisponsible", "irresponsible",
- "jacksonvillle", "jacksonville",
- "journalisitic", "journalistic",
- "journalistens", "journalists",
- "journalisters", "journalists",
- "journalistisk", "journalists",
- "jsutification", "justifications",
- "jurisdicitons", "jurisdictions",
- "jurisidctions", "jurisdictions",
- "juristictions", "jurisdictions",
- "jursidictions", "jurisdictions",
- "jusitfication", "justifications",
- "justifiaction", "justifications",
- "justificacion", "justification",
- "justificaiton", "justification",
- "justificativo", "justification",
- "justificatons", "justifications",
- "justificstion", "justifications",
- "justiifcation", "justifications",
- "karbohydrates", "carbohydrates",
- "knoweldgeable", "knowledgeable",
- "knowledegable", "knowledgeable",
- "knowledgebale", "knowledgable",
- "knowlegdeable", "knowledgeable",
- "kollaboration", "collaboration",
- "koncentration", "concentration",
- "konfiguration", "configuration",
- "konfrontation", "confrontation",
- "konservatives", "conservatives",
- "konstellation", "constellation",
- "kontamination", "contamination",
- "legitimatelly", "legitimately",
- "libertariaism", "libertarianism",
- "libertariansm", "libertarianism",
- "libitarianisn", "libertarianism",
- "lighthearthed", "lighthearted",
- "mainfestation", "manifestation",
- "manafacturers", "manufacturers",
- "manafacturing", "manufacturing",
- "manafestation", "manifestation",
- "manefestation", "manifestation",
- "manfuacturers", "manufactures",
- "manifacturers", "manufacturers",
- "manifacturing", "manufacturing",
- "manifastation", "manifestation",
- "manifestacion", "manifestation",
- "manifestating", "manifestation",
- "manifistation", "manifestation",
- "manipulationg", "manipulating",
- "manufacterers", "manufacturers",
- "manufactering", "manufacturing",
- "manufacterurs", "manufactures",
- "manufactorers", "manufacturers",
- "manufactoring", "manufacturing",
- "manufactuered", "manufactured",
- "manufactuerer", "manufacturer",
- "manufactueres", "manufactures",
- "manufacturedd", "manufactured",
- "manufactureds", "manufactures",
- "manufacturerd", "manufactured",
- "manufacturier", "manufacturer",
- "manufacturors", "manufacturers",
- "manufactuters", "manufactures",
- "manufacutrers", "manufactures",
- "manufcaturers", "manufactures",
- "marshmalllows", "marshmallows",
- "massachsuetts", "massachusetts",
- "massachucetts", "massachusetts",
- "massachuestts", "massachusetts",
- "massachusents", "massachusetts",
- "massachusites", "massachusetts",
- "massachussets", "massachusetts",
- "massechusetts", "massachusetts",
- "masturbateing", "masturbating",
- "materialisimo", "materialism",
- "mathamatician", "mathematician",
- "mathametician", "mathematician",
- "mathematicals", "mathematics",
- "mathematicaly", "mathematically",
- "mathematicans", "mathematics",
- "mathematicion", "mathematician",
- "mathematitian", "mathematician",
- "mathemetician", "mathematician",
- "mathmatically", "mathematically",
- "mathmaticians", "mathematicians",
- "mechanicallly", "mechanically",
- "medeterranean", "mediterranean",
- "meditarrenean", "mediterranean",
- "meditereanean", "mediterranean",
- "membranaphone", "membranophone",
- "metamorphysis", "metamorphosis",
- "metaphoricaly", "metaphorically",
- "metaphoricial", "metaphorical",
- "metaphysicals", "metaphysics",
- "metaphysicans", "metaphysics",
- "methamatician", "mathematician",
- "methematician", "mathematician",
- "metropolitain", "metropolitan",
- "metropolitcan", "metropolitan",
- "metropolitian", "metropolitan",
- "millionairres", "millionaire",
- "minneapolites", "minneapolis",
- "misanderstood", "misunderstood",
- "miscellanious", "miscellaneous",
- "misconcpetion", "misconceptions",
- "misconecption", "misconceptions",
- "misinterperet", "misinterpret",
- "misinterprate", "misinterpret",
- "misinterprent", "misinterpret",
- "misinterprted", "misinterpret",
- "misogynisitic", "misogynistic",
- "misrepreseted", "misrepresented",
- "misunterstood", "misunderstood",
- "modificaitons", "modifications",
- "motivationals", "motivations",
- "motivationnal", "motivational",
- "mulitnational", "multinational",
- "multimational", "multinational",
- "multiplicaton", "multiplication",
- "muncipalities", "municipalities",
- "munnicipality", "municipality",
- "mutlinational", "multinational",
- "nacionalistic", "nationalistic",
- "narcissisitic", "narcissistic",
- "narcississtic", "narcissistic",
- "natioanlistic", "nationalistic",
- "nationalisitc", "nationalistic",
- "nationalistes", "nationalists",
- "nationalsitic", "nationalistic",
- "neigbhourhood", "neighbourhood",
- "neighboorhoud", "neighbourhood",
- "neighborehood", "neighbourhood",
- "neighborhoood", "neighborhoods",
- "neighbourbood", "neighbourhood",
- "neighbourgood", "neighbourhood",
- "neighbourhoud", "neighbourhood",
- "neighourhoods", "neighborhoods",
- "nieghborhoods", "neighborhoods",
- "nieghbourhood", "neighbourhood",
- "noncombatents", "noncombatants",
- "noninitalized", "noninitialized",
- "northwestener", "northwestern",
- "notificaitons", "notifications",
- "occassionally", "occasionally",
- "operationable", "operational",
- "oppertunities", "opportunities",
- "opprotunities", "opportunities",
- "oppurtunities", "opportunities",
- "opthamologist", "ophthalmologist",
- "organistaions", "organisations",
- "organizatinal", "organizational",
- "organizativos", "organizations",
- "organsiations", "organisations",
- "organziations", "organizations",
- "orginasations", "organisations",
- "orginazations", "organizations",
- "overpopulaton", "overpopulation",
- "overreactiong", "overreacting",
- "overshaddowed", "overshadowed",
- "overwheliming", "overwhelming",
- "overwhelmigly", "overwhelmingly",
- "overwhelmingy", "overwhelmingly",
- "overwhelminly", "overwhelmingly",
- "palestininans", "palestinians",
- "paraphraseing", "paraphrasing",
- "paraphrashing", "paraphrasing",
- "parilamentary", "parliamentary",
- "parlaimentary", "parliamentary",
- "parliamantary", "parliamentary",
- "parliamentery", "parliamentary",
- "parliamnetary", "parliamentary",
- "parliementary", "parliamentary",
- "particiaption", "participation",
- "participacion", "participation",
- "participantes", "participants",
- "participativo", "participation",
- "particularely", "particularly",
- "particularily", "particularly",
- "particularlly", "particularly",
- "partizipation", "participation",
- "passionatelly", "passionately",
- "paychiatrists", "psychiatrists",
- "paychologists", "psychologists",
- "pennsylvainia", "pennsylvania",
- "pennsylvanica", "pennsylvania",
- "pennsylvannia", "pennsylvania",
- "perdominantly", "predominantly",
- "perpandicular", "perpendicular",
- "perpendicualr", "perpendicular",
- "perpenticular", "perpendicular",
- "perpetuationg", "perpetuating",
- "perpindicular", "perpendicular",
- "personalitits", "personalities",
- "pessimistisch", "pessimistic",
- "pharmaceutial", "pharmaceutical",
- "philisophical", "philosophical",
- "philosiphical", "philosophical",
- "philosohpical", "philosophical",
- "philosophycal", "philosophically",
- "philospohical", "philosophical",
- "phisiological", "physiological",
- "photagraphers", "photographers",
- "photographics", "photographs",
- "photographied", "photographed",
- "photographier", "photographer",
- "photograpphed", "photographed",
- "photogrophers", "photographers",
- "photogrpahers", "photographers",
- "photoshoppade", "photoshopped",
- "photoshoppped", "photoshopped",
- "phsyiological", "physiological",
- "phychiatrists", "psychiatrists",
- "phychological", "psychological",
- "phychologists", "psychologists",
- "phylosophical", "philosophical",
- "physciatrists", "psychiatrists",
- "physcological", "psychological",
- "physcologists", "psychologists",
- "physioligical", "physiological",
- "planeswlakers", "planeswalker",
- "plansewalkers", "planeswalker",
- "playthroughts", "playthroughs",
- "polysaccaride", "polysaccharide",
- "practicallity", "practically",
- "practicioners", "practitioners",
- "practisioners", "practitioners",
- "practitioneer", "practitioners",
- "practitionner", "practitioner",
- "pratictioners", "practitioners",
- "preconceieved", "preconceived",
- "predecessores", "predecessors",
- "predetermiend", "predetermined",
- "predetirmined", "predetermined",
- "preditermined", "predetermined",
- "predomenantly", "predominantly",
- "predominently", "predominantly",
- "pregressively", "progressively",
- "preinitalized", "preinitialized",
- "preinitalizes", "preinitializes",
- "preliferation", "proliferation",
- "prependicular", "perpendicular",
- "preposterious", "preposterous",
- "prerequisties", "prerequisite",
- "prerequistite", "prerequisite",
- "prescribtions", "prescriptions",
- "presumptuious", "presumptuous",
- "pretedermined", "predetermined",
- "problematisch", "problematic",
- "proclaimation", "proclamation",
- "prodominantly", "predominantly",
- "professionnal", "professional",
- "profitiablity", "profitability",
- "profitibality", "profitability",
- "progressivily", "progressively",
- "progressivley", "progressively",
- "prononciation", "pronunciation",
- "pronouciation", "pronunciation",
- "pronunciacion", "pronunciation",
- "pronunciating", "pronunciation",
- "pronuncuation", "pronunciation",
- "pronunication", "pronunciation",
- "pronuntiation", "pronunciation",
- "propabilities", "probabilities",
- "proportionaly", "proportionally",
- "proportionnal", "proportional",
- "proseletyzing", "proselytizing",
- "protagonistas", "protagonists",
- "protagonistes", "protagonists",
- "protestantisk", "protestants",
- "protruberance", "protuberance",
- "provocativley", "provocative",
- "pscyhiatrists", "psychiatrists",
- "pscyhological", "psychological",
- "pscyhologists", "psychologists",
- "pshycological", "psychological",
- "pshycologists", "psychologists",
- "psichological", "psychological",
- "psychaitrists", "psychiatrists",
- "psychedellics", "psychedelics",
- "psychiatrisch", "psychiatric",
- "psycholigical", "psychological",
- "psycholigists", "psychologists",
- "psychologycal", "psychologically",
- "psychologysts", "psychologists",
- "psychyatrists", "psychiatrists",
- "psysiological", "physiological",
- "purpendicular", "perpendicular",
- "pyschiatrists", "psychiatrists",
- "pyschological", "psychological",
- "pyschologists", "psychologists",
- "qaulification", "qualification",
- "qualifiaction", "qualification",
- "qualificaiton", "qualifications",
- "qualificatons", "qualifications",
- "qualifikation", "qualification",
- "questionalble", "questionable",
- "quinessential", "quintessential",
- "ramificaitons", "ramifications",
- "realisitcally", "realistically",
- "realtionships", "relationships",
- "reccommending", "recommending",
- "receptionnist", "receptionist",
- "receptionsist", "receptionist",
- "reconaissance", "reconnaissance",
- "reconcilation", "reconciliation",
- "reconnaisance", "reconnaissance",
- "reconstrucion", "reconstruction",
- "recreationnal", "recreational",
- "rectangulaire", "rectangular",
- "redistribuito", "redistribution",
- "redistributin", "redistribution",
- "reencarnation", "reincarnation",
- "refridgerator", "refrigerator",
- "rehabilitaion", "rehabilitation",
- "rehabilitatin", "rehabilitation",
- "rehabilitaton", "rehabilitation",
- "reincarantion", "reincarnation",
- "reincatnation", "reincarnation",
- "reinforcemens", "reinforcements",
- "reinforcemnts", "reinforcements",
- "reinitalising", "reinitialising",
- "reinitalizing", "reinitializing",
- "reinkarnation", "reincarnation",
- "reinstallling", "reinstalling",
- "reintarnation", "reincarnation",
- "relationshits", "relationships",
- "relationsship", "relationships",
- "relatiopnship", "relationship",
- "relentlessely", "relentlessly",
- "relentlessley", "relentlessly",
- "relinqushment", "relinquishment",
- "remifications", "ramifications",
- "reprehenisble", "reprehensible",
- "reprehensable", "reprehensible",
- "reprehinsible", "reprehensible",
- "represenation", "representation",
- "represensible", "reprehensible",
- "representaion", "representation",
- "representatie", "representatives",
- "representatin", "representations",
- "representerad", "represented",
- "representitve", "representative",
- "representives", "representatives",
- "repricussions", "repercussions",
- "reprihensible", "reprehensible",
- "resolutionary", "revolutionary",
- "respectivelly", "respectively",
- "responsibiliy", "responsibility",
- "responsibilty", "responsibility",
- "responsiblity", "responsibility",
- "respositories", "repositories",
- "resssurecting", "resurrecting",
- "ressurrection", "resurrection",
- "restaraunteur", "restaurateur",
- "retoractively", "retroactively",
- "retroactivily", "retroactively",
- "retroactivley", "retroactively",
- "retrocatively", "retroactively",
- "revelutionary", "revolutionary",
- "revolutionair", "revolutionary",
- "revolutionens", "revolutions",
- "revolutioners", "revolutions",
- "revoultionary", "revolutionary",
- "ridiculouness", "ridiculousness",
- "rienforcement", "reinforcements",
- "righetousness", "righteousness",
- "rightiousness", "righteousness",
- "rigtheousness", "righteousness",
- "rollarcoaster", "rollercoaster",
- "rollercaoster", "rollercoaster",
- "rollercoaters", "rollercoaster",
- "rollercoatser", "rollercoaster",
- "rollerocaster", "rollercoaster",
- "rollertoaster", "rollercoaster",
- "rollorcoaster", "rollercoaster",
- "sacrastically", "sarcastically",
- "sarcasitcally", "sarcastically",
- "satisfactorly", "satisfactory",
- "scandianvians", "scandinavian",
- "scateboarding", "skateboarding",
- "schisophrenic", "schizophrenic",
- "schiziphrenic", "schizophrenic",
- "schizophernia", "schizophrenia",
- "schizophernic", "schizophrenic",
- "schizophrania", "schizophrenia",
- "schizoprhenia", "schizophrenia",
- "schizoprhenic", "schizophrenic",
- "schozophrenia", "schizophrenia",
- "schozophrenic", "schizophrenic",
- "schyzophrenia", "schizophrenia",
- "schyzophrenic", "schizophrenic",
- "schziophrenia", "schizophrenia",
- "schziophrenic", "schizophrenic",
- "scientificaly", "scientifically",
- "scientificlly", "scientifically",
- "segementation", "segmentation",
- "sensationable", "sensational",
- "sensationails", "sensationalism",
- "sensationaism", "sensationalism",
- "sensationalim", "sensationalism",
- "sensationella", "sensational",
- "shcizophrenic", "schizophrenic",
- "significanlty", "significantly",
- "significently", "significantly",
- "signifigantly", "significantly",
- "simultaneosly", "simultaneously",
- "simultaneuous", "simultaneous",
- "simultanously", "simultaneously",
- "singificantly", "significantly",
- "skatebaording", "skateboarding",
- "skateborading", "skateboarding",
- "socioecenomic", "socioeconomic",
- "socioecomonic", "socioeconomic",
- "socioeconimic", "socioeconomic",
- "sohpisticated", "sophisticated",
- "sophisitcated", "sophisticated",
- "sophistacated", "sophisticated",
- "sophistocated", "sophisticated",
- "sophosticated", "sophisticated",
- "spacification", "specification",
- "specializaton", "specialization",
- "specificaiton", "specifications",
- "specificatons", "specifications",
- "specifikation", "specification",
- "spectaculaire", "spectacular",
- "spectaculalry", "spectacularly",
- "spectatularly", "spectacularly",
- "spesification", "specification",
- "spirituallity", "spiritually",
- "sponatenously", "spontaneously",
- "spontaenously", "spontaneously",
- "spontainously", "spontaneously",
- "spontaneoulsy", "spontaneously",
- "spontaneuosly", "spontaneously",
- "spontaniously", "spontaneously",
- "spontanuously", "spontaneously",
- "sponteanously", "spontaneously",
- "sponteneously", "spontaneously",
- "sporstmanship", "sportsmanship",
- "sportmansship", "sportsmanship",
- "sportsmamship", "sportsmanship",
- "sportsmenship", "sportsmanship",
- "sprotsmanship", "sportsmanship",
- "stakeboarding", "skateboarding",
- "startegically", "strategically",
- "statisitcally", "statistically",
- "statistacally", "statistically",
- "stereotipical", "stereotypical",
- "stereotpyical", "stereotypical",
- "stereotypcial", "stereotypical",
- "stereotypeing", "stereotyping",
- "stereotypying", "stereotyping",
- "steriotypical", "stereotypical",
- "steroetypical", "stereotypical",
- "steryotypical", "stereotypical",
- "storytellling", "storytelling",
- "stragegically", "strategically",
- "stragetically", "strategically",
- "straightenend", "straightened",
- "straitforward", "straightforward",
- "stratagically", "strategically",
- "stratigically", "strategically",
- "strawberrries", "strawberries",
- "stregnthening", "strengthening",
- "strenghtening", "strengthening",
- "strengthining", "strengthening",
- "stretegically", "strategically",
- "subcatagories", "subcategories",
- "subconsciosly", "subconsciously",
- "subconsciouly", "subconsciously",
- "subconsiously", "subconsciously",
- "subjectivelly", "subjectively",
- "subscribtions", "subscriptions",
- "substancially", "substantially",
- "substanitally", "substantially",
- "substansially", "substantially",
- "substantiable", "substantial",
- "substantually", "substantially",
- "substitutents", "substitutes",
- "successfullly", "successfully",
- "supermarkedet", "supermarket",
- "supermarkerts", "supermarkets",
- "superpowereds", "superpowers",
- "supersticious", "superstitious",
- "superstisious", "superstitious",
- "superstitiosi", "superstitious",
- "superstitiuos", "superstitious",
- "superstituous", "superstitious",
- "suphisticated", "sophisticated",
- "supscriptions", "subscriptions",
- "surreptiously", "surreptitiously",
- "survavibility", "survivability",
- "survibability", "survivability",
- "survivabiltiy", "survivability",
- "survivalibity", "survivability",
- "survivavility", "survivability",
- "survivebility", "survivability",
- "susbtantially", "substantially",
- "sustainabilty", "sustainability",
- "synchornously", "synchronously",
- "systematicaly", "systematically",
- "systematiclly", "systematically",
- "techmological", "technological",
- "technicallity", "technically",
- "technoligical", "technological",
- "technologicly", "technological",
- "techonlogical", "technological",
- "telaportation", "teleportation",
- "teleportating", "teleportation",
- "teleprotation", "teleportation",
- "teliportation", "teleportation",
- "teloportation", "teleportation",
- "territoriella", "territorial",
- "theoratically", "theoretically",
- "theoritically", "theoretically",
- "therapeutisch", "therapeutic",
- "thereotically", "theoretically",
- "thermodynaics", "thermodynamics",
- "thermodynamcs", "thermodynamics",
- "theroetically", "theoretically",
- "thoeretically", "theoretically",
- "tranistioning", "transitioning",
- "transcendance", "transcendence",
- "transcribtion", "transcription",
- "transcripcion", "transcription",
- "transferrring", "transferring",
- "transformarea", "transformer",
- "transformarem", "transformer",
- "transformarse", "transformers",
- "transformaton", "transformation",
- "transformered", "transformed",
- "transgengered", "transgendered",
- "transisioning", "transitioning",
- "transitionals", "transitions",
- "transitionnal", "transitional",
- "transitionned", "transitioned",
- "transkription", "transcription",
- "translyvanian", "transylvania",
- "transmisisons", "transmissions",
- "transmissable", "transmissible",
- "transmisssion", "transmissions",
- "transparantie", "transparent",
- "transparentcy", "transparency",
- "transplantees", "transplants",
- "transporation", "transportation",
- "transportaion", "transportation",
- "transportarme", "transporter",
- "transportarse", "transporter",
- "transportarte", "transporter",
- "transporteurs", "transporter",
- "transsexuella", "transsexual",
- "transylvannia", "transylvania",
- "trasngendered", "transgendered",
- "troubleshooot", "troubleshoot",
- "udnerestimate", "underestimated",
- "umcomfortable", "uncomfortable",
- "umcomfortably", "uncomfortably",
- "umpredictable", "unpredictable",
- "unappropriate", "inappropriate",
- "unbelievabley", "unbelievably",
- "unbelievablly", "unbelievably",
- "uncertaintity", "uncertainty",
- "uncomfertable", "uncomfortable",
- "uncomfertably", "uncomfortably",
- "uncomfortabel", "uncomfortably",
- "uncomforyable", "uncomfortably",
- "uncomfrotable", "uncomfortable",
- "uncomfrotably", "uncomfortably",
- "uncomftorable", "uncomfortable",
- "uncomftorably", "uncomfortably",
- "unconcsiously", "unconsciously",
- "unconfortable", "uncomfortable",
- "unconfortably", "uncomfortably",
- "unconscioulsy", "unconsciously",
- "unconsicously", "unconsciously",
- "unconsiderate", "inconsiderate",
- "uncontrollabe", "uncontrollable",
- "uncontrollaby", "uncontrollably",
- "unconventinal", "unconventional",
- "uncounciously", "unconsciously",
- "uncousciously", "unconsciously",
- "underastimate", "underestimate",
- "underesitmate", "underestimated",
- "underestamate", "underestimate",
- "underestemate", "underestimate",
- "underestiamte", "underestimated",
- "undergratuate", "undergraduate",
- "underhwelming", "underwhelming",
- "underhwleming", "underwhelming",
- "underminining", "undermining",
- "underpowererd", "underpowered",
- "undersetimate", "underestimate",
- "understandble", "understandable",
- "understandbly", "understandably",
- "underwealming", "underwhelming",
- "underwhemling", "underwhelming",
- "underwhleming", "underwhelming",
- "undoctrinated", "indoctrinated",
- "unexpectadely", "unexpectedly",
- "unfomfortable", "uncomfortable",
- "unforgiveable", "unforgivable",
- "unfortuantely", "unfortunately",
- "unfortunantly", "unfortunately",
- "unfortunatley", "unfortunately",
- "unfortuneatly", "unfortunately",
- "unfortunetely", "unfortunately",
- "unilaterallly", "unilaterally",
- "uninstallling", "uninstalling",
- "unintellegent", "unintelligent",
- "unintelligant", "unintelligent",
- "unintensional", "unintentional",
- "uninteristing", "uninteresting",
- "universitites", "universities",
- "unnecassarily", "unnecessarily",
- "unneccesarily", "unnecessarily",
- "unnecessairly", "unnecessarily",
- "unnecessarely", "unnecessarily",
- "unnecessarity", "unnecessarily",
- "unnecesserily", "unnecessarily",
- "unnecissarily", "unnecessarily",
- "unnessecarily", "unnecessarily",
- "unoperational", "nonoperational",
- "unprecendeted", "unprecedented",
- "unprecidented", "unprecedented",
- "unpredecented", "unprecedented",
- "unpredicatble", "unpredictable",
- "unpredictible", "unpredictable",
- "unpresedented", "unprecedented",
- "unpridictable", "unpredictable",
- "unprofessinal", "unprofessional",
- "unrealistisch", "unrealistic",
- "unreasonabley", "unreasonably",
- "unreasonablly", "unreasonably",
- "unrestrictred", "unrestricted",
- "unsistainable", "unsustainable",
- "unsubscribade", "unsubscribed",
- "unsubscribbed", "unsubscribe",
- "unsuccesfully", "unsuccessfully",
- "unsuccessfull", "unsuccessful",
- "unsucessfully", "unsuccessfully",
- "unsuprisingly", "unsurprisingly",
- "unsuprizingly", "unsurprisingly",
- "unsustainible", "unsustainable",
- "unsustianable", "unsustainable",
- "vertification", "certification",
- "villification", "vilification",
- "virualization", "visualization",
- "visualizacion", "visualization",
- "visualizaiton", "visualization",
- "visualizating", "visualization",
- "vitualization", "visualization",
- "vizualization", "visualization",
- "volounteering", "volunteering",
- "vulberability", "vulnerability",
- "vulernability", "vulnerability",
- "vulnarability", "vulnerability",
- "vulnerabiltiy", "vulnerability",
- "vulnurability", "vulnerability",
- "vunlerability", "vulnerability",
- "vurnerability", "vulnerability",
- "weightlfiting", "weightlifting",
- "weightlifitng", "weightlifting",
- "weightligting", "weightlifting",
- "weigthlifting", "weightlifting",
- "wholeheartdly", "wholeheartedly",
- "wholeheartedy", "wholeheartedly",
- "wholeheartely", "wholeheartedly",
- "wieghtlifting", "weightlifting",
- "abberivation", "abbreviation",
- "abberviation", "abbreviation",
- "abbreivation", "abbreviation",
- "abbreveation", "abbreviation",
- "abbrievation", "abbreviation",
- "abortificant", "abortifacient",
- "abrreviation", "abbreviation",
- "academcially", "academically",
- "accedentally", "accidentally",
- "accelarating", "accelerating",
- "accelaration", "acceleration",
- "acceleartion", "acceleration",
- "acceleraptor", "accelerator",
- "accelorating", "accelerating",
- "accessibilty", "accessibility",
- "accidentlaly", "accidently",
- "accomadating", "accommodating",
- "accomadation", "accommodation",
- "accomodating", "accommodating",
- "accomodation", "accommodation",
- "accrediation", "accreditation",
- "acculumation", "accumulation",
- "accumalation", "accumulation",
- "accumilation", "accumulation",
- "acedemically", "academically",
- "acheivements", "achievements",
- "acknolwedged", "acknowledged",
- "acknolwedges", "acknowledges",
- "acknoweldged", "acknowledged",
- "acknoweldges", "acknowledges",
- "acknowiedged", "acknowledged",
- "acknowladges", "acknowledges",
- "acknowldeged", "acknowledged",
- "acknowledget", "acknowledgement",
- "acknowleding", "acknowledging",
- "acknowlegded", "acknowledged",
- "acknowlegdes", "acknowledges",
- "ackumulation", "accumulation",
- "acquaintaces", "acquaintances",
- "acquaintence", "acquaintance",
- "acquantaince", "acquaintance",
- "acquantiance", "acquaintances",
- "acquiantance", "acquaintances",
- "acquiantence", "acquaintance",
- "adknowledged", "acknowledged",
- "adknowledges", "acknowledges",
- "administored", "administer",
- "adminsitered", "administered",
- "adminstrator", "administrator",
- "advantagious", "advantageous",
- "advantegeous", "advantageous",
- "adventageous", "advantageous",
- "adventureous", "adventures",
- "adventureres", "adventures",
- "adventurious", "adventurous",
- "adventuruous", "adventurous",
- "advertisiers", "advertisers",
- "advertisment", "advertisement",
- "advertisters", "advertisers",
- "advertisting", "advertising",
- "aestheticaly", "aesthetically",
- "aestheticlly", "aesthetically",
- "afficianados", "aficionados",
- "afficionados", "aficionados",
- "afghanisthan", "afghanistan",
- "afterhtought", "afterthought",
- "afterthougth", "afterthought",
- "aggressivley", "aggressively",
- "agircultural", "agricultural",
- "agknowledged", "acknowledged",
- "agnosticisim", "agnosticism",
- "agracultural", "agricultural",
- "agriculteral", "agricultural",
- "agriculteurs", "agriculture",
- "agricultrual", "agricultural",
- "agriculutral", "agricultural",
- "agrigultural", "agricultural",
- "agrocultural", "agricultural",
- "allegiancies", "allegiance",
- "alterantives", "alternatives",
- "alternatevly", "alternately",
- "alternatiely", "alternately",
- "alternatieve", "alternative",
- "alternativly", "alternatively",
- "alternativos", "alternatives",
- "alternatvely", "alternately",
- "alternitives", "alternatives",
- "altruistisch", "altruistic",
- "amendmenters", "amendments",
- "amohetamines", "amphetamines",
- "ampehtamines", "amphetamines",
- "ampethamines", "amphetamines",
- "amphatamines", "amphetamines",
- "amphedamines", "amphetamines",
- "amphetamenes", "amphetamines",
- "amphetemines", "amphetamines",
- "amphetimines", "amphetamines",
- "amphetmaines", "amphetamines",
- "anecdotallly", "anecdotally",
- "annhiliation", "annihilation",
- "annihalition", "annihilation",
- "annihilatron", "annihilation",
- "annihliation", "annihilation",
- "annilihation", "annihilation",
- "anniversairy", "anniversary",
- "anniversarry", "anniversary",
- "anniversiary", "anniversary",
- "annoucenment", "announcements",
- "annoucnement", "announcement",
- "announcemnet", "announcements",
- "announcemnts", "announcements",
- "anphetamines", "amphetamines",
- "ansalisation", "nasalisation",
- "ansalization", "nasalization",
- "antaganistic", "antagonistic",
- "antagonisitc", "antagonistic",
- "antagonostic", "antagonist",
- "antibioticos", "antibiotics",
- "anticiaption", "anticipation",
- "anticipacion", "anticipation",
- "antisipation", "anticipation",
- "antogonistic", "antagonistic",
- "antrhopology", "anthropology",
- "antrophology", "anthropology",
- "apllications", "applications",
- "apocalypitic", "apocalyptic",
- "apologistics", "apologists",
- "apologizeing", "apologizing",
- "apostrophied", "apostrophe",
- "apostrophies", "apostrophe",
- "apperciation", "appreciation",
- "applicaitons", "applications",
- "appoitnments", "appointments",
- "apporachable", "approachable",
- "appraochable", "approachable",
- "appreceating", "appreciating",
- "appreciaters", "appreciates",
- "appreciatied", "appreciative",
- "appreicating", "appreciating",
- "appreication", "appreciation",
- "appretiation", "appreciation",
- "appropriatin", "appropriation",
- "appropriatly", "appropriately",
- "appropriaton", "appropriation",
- "approprietly", "appropriately",
- "approstraphe", "apostrophe",
- "approxiately", "approximately",
- "approximatly", "approximately",
- "approximetly", "approximately",
- "aproximately", "approximately",
- "aqcuaintance", "acquaintance",
- "aqquaintance", "acquaintance",
- "arbitrariliy", "arbitrarily",
- "arbitrarilly", "arbitrarily",
- "archetecture", "architecture",
- "architechure", "architecture",
- "architectual", "architectural",
- "architectuur", "architecture",
- "architecutre", "architecture",
- "architexture", "architecture",
- "arcitechture", "architecture",
- "areodynamics", "aerodynamics",
- "argicultural", "agricultural",
- "argumentatie", "argumentative",
- "arithmetisch", "arithmetic",
- "armageddomon", "armageddon",
- "arrengements", "arrangements",
- "articifially", "artificially",
- "artificailly", "artificially",
- "artificiella", "artificial",
- "artificually", "artificially",
- "artifiically", "artificially",
- "assasination", "assassination",
- "assassinatin", "assassination",
- "assissinated", "assassinated",
- "associationg", "associating",
- "assoications", "associations",
- "assosiations", "associations",
- "assosication", "assassination",
- "assotiations", "associations",
- "assymetrical", "asymmetrical",
- "asthetically", "aesthetically",
- "astranomical", "astronomical",
- "astromonical", "astronomical",
- "astronautlis", "astronauts",
- "astronimical", "astronomical",
- "astronomicly", "astronomical",
- "athleticisim", "athleticism",
- "atmosphereic", "atmospheric",
- "audiobookmrs", "audiobooks",
- "auhtenticate", "authenticate",
- "australianas", "australians",
- "australianos", "australians",
- "authentisity", "authenticity",
- "authorithies", "authorities",
- "authoritiers", "authorities",
- "authorizaton", "authorization",
- "authrorities", "authorities",
- "autochtonous", "autochthonous",
- "autocorrrect", "autocorrect",
- "automobilies", "automobile",
- "automodertor", "automoderator",
- "automonomous", "autonomous",
- "auxilliaries", "auxiliaries",
- "avaliability", "availability",
- "avialability", "availability",
- "awknowledged", "acknowledged",
- "awknowledges", "acknowledges",
- "awkwardsness", "awkwardness",
- "babysittting", "babysitting",
- "beaurocratic", "bureaucratic",
- "beautifullly", "beautifully",
- "belligerante", "belligerent",
- "beuraucratic", "bureaucratic",
- "billionairre", "billionaire",
- "billionaries", "billionaires",
- "billioniares", "billionaires",
- "bioligically", "biologically",
- "birmingharam", "birmingham",
- "bittersweeet", "bittersweet",
- "blamethrower", "flamethrower",
- "blueberrries", "blueberries",
- "blueprintcss", "blueprints",
- "boardcasting", "broadcasting",
- "bobybuilding", "bodybuilding",
- "bodybuidling", "bodybuilding",
- "bodybuilidng", "bodybuilding",
- "bodybuliding", "bodybuilding",
- "bodydbuilder", "bodybuilder",
- "bombardement", "bombardment",
- "boradcasting", "broadcasting",
- "botivational", "motivational",
- "brainwahsing", "brainwashing",
- "brakethrough", "breakthrough",
- "braodcasting", "broadcasting",
- "brazilianese", "brazilians",
- "brazilianess", "brazilians",
- "breakthorugh", "breakthrough",
- "breaktrhough", "breakthrough",
- "breastfeedig", "breastfeeding",
- "breastfeeing", "breastfeeding",
- "breasttaking", "breathtaking",
- "brianwashing", "brainwashing",
- "broadcastors", "broadcasts",
- "brotherhoood", "brotherhood",
- "buearucratic", "bureaucratic",
- "bueraucratic", "bureaucratic",
- "bulletprooof", "bulletproof",
- "bureaocratic", "bureaucratic",
- "bureaucracie", "bureaucratic",
- "bureaucracts", "bureaucrats",
- "bureaucrates", "bureaucrats",
- "bureuacratic", "bureaucratic",
- "businessemen", "businessmen",
- "cababilities", "capabilities",
- "caclulations", "calculations",
- "calcluations", "calculation",
- "calcualtions", "calculations",
- "calculationg", "calculating",
- "calculatoare", "calculator",
- "californains", "californian",
- "californican", "californian",
- "californinan", "californian",
- "caluclations", "calculations",
- "camouflagued", "camouflage",
- "canceltation", "cancellation",
- "cannibalisim", "cannibalism",
- "canniballism", "cannibalism",
- "cannotations", "connotations",
- "capitalistes", "capitalists",
- "caracterized", "characterized",
- "carbohydrats", "carbohydrates",
- "carbohyrdate", "carbohydrates",
- "caricaturale", "caricature",
- "caricaturile", "caricature",
- "caricaturise", "caricature",
- "caricaturize", "caricature",
- "catastraphic", "catastrophic",
- "catastrohpic", "catastrophic",
- "catastrophie", "catastrophe",
- "categoricaly", "categorically",
- "categoriezed", "categorized",
- "catergorized", "categorized",
- "caterpillers", "caterpillars",
- "catestrophic", "catastrophic",
- "catholicisim", "catholicism",
- "catholocisim", "catholicism",
- "catistrophic", "catastrophic",
- "catostraphic", "catastrophic",
- "catostrophic", "catastrophic",
- "catterpilars", "caterpillars",
- "catterpillar", "caterpillar",
- "celebratings", "celebrations",
- "celebritites", "celebrities",
- "celibrations", "celebrations",
- "cententenial", "centennial",
- "cercumstance", "circumstance",
- "cerification", "verification",
- "certificiate", "certificate",
- "challengeing", "challenging",
- "chamiponship", "championships",
- "champinoship", "championships",
- "championchip", "championship",
- "championsihp", "championships",
- "championsips", "championships",
- "champiosnhip", "championships",
- "champoinship", "championship",
- "chanpionship", "championship",
- "charactarize", "characterize",
- "charaterized", "characterized",
- "charismastic", "charismatic",
- "cheerlearder", "cheerleader",
- "cheerleeders", "cheerleaders",
- "cheeseberger", "cheeseburger",
- "cheeseborger", "cheeseburger",
- "cheesebruger", "cheeseburgers",
- "cheeseburges", "cheeseburgers",
- "cheeseburgie", "cheeseburger",
- "cheezeburger", "cheeseburger",
- "chirstianity", "christianity",
- "chocolateers", "chocolates",
- "chrisitanity", "christianity",
- "christainity", "christianity",
- "christiantiy", "christianity",
- "christinaity", "christianity",
- "chromosomers", "chromosomes",
- "chronologial", "chronological",
- "chrsitianity", "christianity",
- "cilivization", "civilizations",
- "circulatiing", "circulating",
- "circulationg", "circulating",
- "circumcisied", "circumcised",
- "circumcition", "circumcision",
- "circumsicion", "circumcision",
- "circumsision", "circumcision",
- "circumsition", "circumcision",
- "circumsizion", "circumcision",
- "circumstanes", "circumstance",
- "circumstanta", "circumstantial",
- "circumstante", "circumstance",
- "circuncision", "circumcision",
- "circunstance", "circumstance",
- "civiliaztion", "civilizations",
- "civilizacion", "civilization",
- "civilizaiton", "civilization",
- "civilizatoin", "civilizations",
- "civilizatons", "civilizations",
- "civilziation", "civilizations",
- "civizilation", "civilizations",
- "claculations", "calculations",
- "classificato", "classification",
- "cockroachers", "cockroaches",
- "coefficienct", "coefficient",
- "coencidental", "coincidental",
- "coincedental", "coincidental",
- "coincidencal", "coincidental",
- "coincidentia", "coincidental",
- "coindidental", "coincidental",
- "coinsidental", "coincidental",
- "cointerpoint", "counterpoint",
- "collaberator", "collaborate",
- "collaboratie", "collaborate",
- "collaboratin", "collaboration",
- "collectivily", "collectively",
- "collectivley", "collectively",
- "colonialisim", "colonialism",
- "colonizacion", "colonization",
- "colonizators", "colonizers",
- "colonozation", "colonization",
- "combanations", "combinations",
- "combonations", "combinations",
- "comdemnation", "condemnation",
- "comemmorates", "commemorates",
- "comemoretion", "commemoration",
- "comeptitions", "competitions",
- "comfirmation", "confirmation",
- "comfortabley", "comfortably",
- "comfortablly", "comfortably",
- "comissioning", "commissioning",
- "commandemnts", "commandment",
- "commandmants", "commandments",
- "commandmends", "commandments",
- "commemmorate", "commemorate",
- "commendments", "commandments",
- "commenteries", "commenters",
- "commenwealth", "commonwealth",
- "commerciales", "commercials",
- "commerically", "commercially",
- "comminicated", "communicated",
- "commishioned", "commissioned",
- "commishioner", "commissioner",
- "commisioning", "commissioning",
- "commissionar", "commissioner",
- "commissionor", "commissioner",
- "committments", "commitments",
- "commoditites", "commodities",
- "commomwealth", "commonwealth",
- "commonhealth", "commonwealth",
- "commonweatlh", "commonwealth",
- "commonwelath", "commonwealth",
- "communciated", "communicated",
- "communiation", "communication",
- "communicatie", "communicate",
- "communicatin", "communications",
- "communicaton", "communication",
- "communitites", "communities",
- "compansating", "compensating",
- "compansation", "compensation",
- "comparativly", "comparatively",
- "comparisions", "comparisons",
- "comparission", "comparisons",
- "comparissons", "comparisons",
- "compatablity", "compatibility",
- "compatibiliy", "compatibility",
- "compatibilty", "compatibility",
- "compatiblity", "compatibility",
- "compensacion", "compensation",
- "compensative", "compensate",
- "compesitions", "compositions",
- "competetions", "competitions",
- "competitevly", "competitively",
- "competitiion", "competition",
- "competitiors", "competitors",
- "competitivly", "competitively",
- "competitivos", "competitions",
- "compinsating", "compensating",
- "compinsation", "compensation",
- "complainging", "complaining",
- "completetion", "completion",
- "compliations", "compilation",
- "complicacion", "complication",
- "complicatied", "complicate",
- "complicaties", "complicate",
- "complicatred", "complicate",
- "complicatted", "complicate",
- "complilation", "complication",
- "complimation", "complication",
- "complimenary", "complimentary",
- "complimentje", "complimented",
- "complimentry", "complimentary",
- "complination", "complication",
- "complitation", "complication",
- "composistion", "compositions",
- "compramising", "compromising",
- "compremising", "compromising",
- "compresssion", "compression",
- "compromissen", "compromise",
- "compromisses", "compromises",
- "compromizing", "compromising",
- "compromosing", "compromising",
- "comptability", "compatibility",
- "compulsivley", "compulsive",
- "compulsorary", "compulsory",
- "computarized", "computerized",
- "comrpomising", "compromising",
- "comtaminated", "contaminated",
- "comtemporary", "contemporary",
- "conbinations", "combinations",
- "concatinated", "contaminated",
- "conceivabley", "conceivably",
- "concellation", "cancellation",
- "concentraded", "concentrated",
- "concentraing", "concentrating",
- "concentraion", "concentration",
- "concentrarte", "concentrate",
- "concentratie", "concentrate",
- "concentratin", "concentration",
- "concequences", "consequences",
- "concequently", "consequently",
- "concersation", "conservation",
- "concervation", "conservation",
- "concervatism", "conservatism",
- "concervative", "conservative",
- "conciderable", "considerable",
- "conciderably", "considerably",
- "conciousness", "consciousness",
- "conclusiones", "conclusions",
- "conclusivley", "conclusive",
- "condamnation", "condemnation",
- "condemantion", "condemnation",
- "condenmation", "condemnation",
- "condescening", "condescending",
- "condescenion", "condescension",
- "conditionnal", "conditional",
- "conditionned", "conditioned",
- "conditionner", "conditioner",
- "condmenation", "condemnation",
- "condolencies", "condolences",
- "condolensces", "condolences",
- "condomnation", "condemnation",
- "condradicted", "contradicted",
- "conenctivity", "connectivity",
- "confedential", "confidential",
- "confederancy", "confederacy",
- "confederatie", "confederate",
- "confermation", "confirmation",
- "confersation", "conservation",
- "confessionis", "confessions",
- "confidencial", "confidential",
- "confidentail", "confidential",
- "confidentaly", "confidently",
- "confidentely", "confidently",
- "confidentiel", "confidential",
- "configuratin", "configurations",
- "configuraton", "configuration",
- "confirmacion", "confirmation",
- "confrimation", "confirmation",
- "confrontaion", "confrontation",
- "congegration", "congregation",
- "congergation", "congregation",
- "congradulate", "congratulate",
- "congragation", "congregation",
- "congragulate", "congratulate",
- "congratualte", "congratulate",
- "congregacion", "congregation",
- "congresional", "congressional",
- "congresssman", "congressman",
- "congresssmen", "congressmen",
- "congretation", "congregation",
- "congrigation", "congregation",
- "conicidental", "coincidental",
- "connatations", "connotations",
- "connecticuit", "connecticut",
- "connectivety", "connectivity",
- "connetations", "connotations",
- "connitations", "connotations",
- "connonations", "connotations",
- "conolization", "colonization",
- "conpensating", "compensating",
- "conpensation", "compensation",
- "conpetitions", "competitions",
- "conplimented", "complimented",
- "conpromising", "compromising",
- "consciouness", "consciousness",
- "consciouslly", "consciously",
- "consectutive", "consecutive",
- "consecuences", "consequences",
- "consecuentes", "consequences",
- "consecuently", "consequently",
- "consensuarlo", "consensual",
- "consentrated", "concentrated",
- "consentrates", "concentrates",
- "conseqeunces", "consequence",
- "consequenses", "consequences",
- "consequental", "consequently",
- "consequneces", "consequence",
- "conservacion", "conservation",
- "conservaties", "conservatives",
- "conservativo", "conservation",
- "conservativs", "conservatism",
- "conservitave", "conservatives",
- "conservitism", "conservatism",
- "conservitive", "conservative",
- "considerarle", "considerable",
- "considerarte", "considerate",
- "consideraste", "considerate",
- "consideratie", "considerate",
- "consideratin", "considerations",
- "consideribly", "considerably",
- "consilidated", "consolidated",
- "consipracies", "conspiracies",
- "consiquently", "consequently",
- "consistantly", "consistently",
- "consistencey", "consistency",
- "consistentcy", "consistently",
- "consitutents", "constituents",
- "consoldiated", "consolidated",
- "consolitated", "consolidate",
- "consolodated", "consolidated",
- "consoltation", "consultation",
- "conspericies", "conspiracies",
- "conspiracize", "conspiracies",
- "conspiriator", "conspirator",
- "conspiricies", "conspiracies",
- "conspriacies", "conspiracies",
- "consqeuences", "consequence",
- "constinually", "continually",
- "constitition", "constitution",
- "constituante", "constituents",
- "constituants", "constituents",
- "constituates", "constitutes",
- "constitucion", "constitution",
- "constituient", "constitute",
- "constituinte", "constituents",
- "constitutiei", "constitute",
- "constitutues", "constitute",
- "constiutents", "constituents",
- "constracting", "constructing",
- "constraction", "construction",
- "constrainsts", "constraints",
- "construccion", "construction",
- "construciton", "construction",
- "constructeds", "constructs",
- "constructief", "constructive",
- "constructies", "constructs",
- "constructifs", "constructs",
- "constructiin", "constructing",
- "constructivo", "construction",
- "consturction", "construction",
- "consultating", "consultation",
- "consumerisim", "consumerism",
- "contaiminate", "contaminate",
- "contaminatie", "contaminated",
- "contaminaton", "contamination",
- "contaminents", "containment",
- "contamporary", "contemporary",
- "contanimated", "contaminated",
- "contaniments", "containment",
- "contemperary", "contemporary",
- "contemporany", "contemporary",
- "continentais", "continents",
- "continential", "continental",
- "contineously", "continuously",
- "continiously", "continuously",
- "continuacion", "continuation",
- "continuating", "continuation",
- "continuativo", "continuation",
- "continuining", "continuing",
- "contirbution", "contribution",
- "contirbutors", "contributors",
- "contiunation", "continuation",
- "contrabution", "contribution",
- "contraceptie", "contraceptives",
- "contradicing", "contradicting",
- "contradicion", "contradiction",
- "contradicory", "contradictory",
- "contradictie", "contradicted",
- "contradictin", "contradiction",
- "contradicton", "contradiction",
- "contraticted", "contradicted",
- "contribucion", "contribution",
- "contribuitor", "contributor",
- "contributers", "contributors",
- "contributivo", "contribution",
- "contributons", "contributors",
- "contrictions", "contractions",
- "contridicted", "contradicted",
- "controlleras", "controllers",
- "controlllers", "controllers",
- "controverial", "controversial",
- "controveries", "controversies",
- "controversal", "controversial",
- "controversey", "controversy",
- "contructions", "contractions",
- "conveinently", "conveniently",
- "convencional", "conventional",
- "conveniantly", "conveniently",
- "converastion", "conversations",
- "converdation", "conservation",
- "conversacion", "conversation",
- "conversaiton", "conversations",
- "conversatino", "conservation",
- "conversatism", "conservatism",
- "conversatoin", "conversations",
- "conversiones", "conversions",
- "converstaion", "conversation",
- "convertables", "convertibles",
- "convertiable", "convertible",
- "convertibile", "convertible",
- "convervation", "conservation",
- "convervatism", "conservatism",
- "converzation", "conservation",
- "convesration", "conservation",
- "convienently", "conveniently",
- "convorsation", "conversation",
- "convseration", "conservation",
- "coordenation", "coordination",
- "coordiantion", "coordination",
- "coordinacion", "coordination",
- "coordinaters", "coordinates",
- "coordinatior", "coordinator",
- "coordinatore", "coordinate",
- "coordonation", "coordination",
- "cooridnation", "coordination",
- "coorperation", "cooperation",
- "coprorations", "corporations",
- "corinthianos", "corinthians",
- "corinthinans", "corinthians",
- "corparations", "corporations",
- "corperations", "corporations",
- "corporativos", "corporations",
- "corproations", "corporations",
- "corrdination", "coordination",
- "correponding", "corresponding",
- "correposding", "corresponding",
- "correspondes", "corresponds",
- "correspondig", "corresponding",
- "corresponing", "corresponding",
- "corrisponded", "corresponded",
- "costomizable", "customizable",
- "costumizable", "customizable",
- "councidental", "coincidental",
- "counsellling", "counselling",
- "counterfiets", "counterfeit",
- "counterfited", "counterfeit",
- "counterracts", "counterparts",
- "countertraps", "counterparts",
- "countrywides", "countryside",
- "coutnerparts", "counterparts",
- "coutnerpoint", "counterpoint",
- "covnersation", "conservation",
- "crankenstein", "frankenstein",
- "creationisim", "creationism",
- "creationnism", "creationism",
- "creationnist", "creationist",
- "creationsism", "creationism",
- "creationsist", "creationist",
- "creationsits", "creationists",
- "credibillity", "credibility",
- "crigneworthy", "cringeworthy",
- "cringewhorty", "cringeworthy",
- "cringeworhty", "cringeworthy",
- "cringewrothy", "cringeworthy",
- "cringyworthy", "cringeworthy",
- "criticallity", "critically",
- "criticiszing", "criticising",
- "croporations", "corporations",
- "crucifiction", "crucifixion",
- "cuestionable", "questionable",
- "culiminating", "culminating",
- "cumulatative", "cumulative",
- "cuntaminated", "contaminated",
- "curcumcision", "circumcision",
- "curcumstance", "circumstance",
- "custamizable", "customizable",
- "custimizable", "customizable",
- "customizaton", "customization",
- "customizeble", "customizable",
- "customizible", "customizable",
- "custumizable", "customizable",
- "cuztomizable", "customizable",
- "dabilitating", "debilitating",
- "dangerousely", "dangerously",
- "decensitized", "desensitized",
- "deceptionist", "receptionist",
- "declareation", "declaration",
- "decomposeion", "decomposition",
- "decomposited", "decomposed",
- "decscription", "description",
- "deffensively", "defensively",
- "deficiancies", "deficiencies",
- "deficiencias", "deficiencies",
- "deficiensies", "deficiencies",
- "definatively", "definitively",
- "defininitely", "definitively",
- "definitavely", "definitively",
- "definitevely", "definitively",
- "definitifely", "definitively",
- "definitinely", "definitively",
- "definititely", "definitively",
- "definitivley", "definitively",
- "deinitalized", "deinitialized",
- "deinitalizes", "deinitializes",
- "delibaretely", "deliberately",
- "deliberatley", "deliberately",
- "delibirately", "deliberately",
- "delibitating", "debilitating",
- "deliverately", "deliberately",
- "delusionally", "delusively",
- "demesticated", "domesticated",
- "democracries", "democracies",
- "democraphics", "demographics",
- "democratisch", "democratic",
- "demograhpics", "demographics",
- "demogrpahics", "demographics",
- "demonination", "denominations",
- "demonstarted", "demonstrated",
- "demonstartes", "demonstrates",
- "demonstrabil", "demonstrably",
- "demonstraion", "demonstration",
- "demonstraits", "demonstrates",
- "demonstrants", "demonstrates",
- "demonstratie", "demonstrate",
- "demonstratin", "demonstration",
- "demonstrerat", "demonstrate",
- "demosntrably", "demonstrably",
- "demosntrated", "demonstrated",
- "demosntrates", "demonstrates",
- "demostration", "demonstration",
- "denomenation", "denomination",
- "denominacion", "denomination",
- "denominatior", "denominator",
- "denominatons", "denominations",
- "denomonation", "denomination",
- "deomgraphics", "demographics",
- "depencencies", "dependencies",
- "dependancies", "dependencies",
- "dependencias", "dependencies",
- "dependenices", "dependencies",
- "dependensies", "dependencies",
- "deperecation", "deprecation",
- "deplacements", "replacements",
- "deregualtion", "deregulation",
- "deregulaiton", "deregulation",
- "derugulation", "deregulation",
- "describtions", "descriptions",
- "descriminant", "discriminant",
- "descriptivos", "descriptions",
- "desctiptions", "descriptions",
- "desctruction", "destruction",
- "desencitized", "desensitized",
- "desensatized", "desensitized",
- "desensitived", "desensitized",
- "desentisized", "desensitized",
- "desentitized", "desensitized",
- "desentizised", "desensitized",
- "desginations", "destinations",
- "desgustingly", "disgustingly",
- "desitnations", "destinations",
- "despectively", "respectively",
- "despensaries", "dispensaries",
- "desperatedly", "desperately",
- "desperatelly", "desperately",
- "desqualified", "disqualified",
- "desregarding", "disregarding",
- "dessertation", "dissertation",
- "destiantions", "destinations",
- "destinctions", "destinations",
- "destractions", "distractions",
- "destributors", "distributors",
- "determinanti", "determination",
- "determinaton", "determination",
- "determinging", "determining",
- "determinisic", "deterministic",
- "determinisim", "determinism",
- "deterministc", "deterministic",
- "determinitic", "deterministic",
- "detrimential", "detrimental",
- "developement", "development",
- "developmenet", "developments",
- "develpoments", "developments",
- "devolopement", "development",
- "devolopments", "developments",
- "diasspointed", "dissapointed",
- "dicitonaries", "dictionaries",
- "dictadorship", "dictatorship",
- "dictarorship", "dictatorship",
- "dictatorshop", "dictatorship",
- "dictionaires", "dictionaries",
- "didsapointed", "dissapointed",
- "differencial", "differential",
- "differencies", "differences",
- "differentate", "differentiate",
- "differnetial", "differential",
- "difficulites", "difficulties",
- "difficutlies", "difficulties",
- "diffuculties", "difficulties",
- "dimensionals", "dimensions",
- "dimensionnal", "dimensional",
- "dimensionsal", "dimensional",
- "diplomatisch", "diplomatic",
- "directionnal", "directional",
- "disaapointed", "dissapointed",
- "disadvandage", "disadvantaged",
- "disadvantged", "disadvantaged",
- "disadvantges", "disadvantages",
- "disadvatange", "disadvantage",
- "disadventage", "disadvantage",
- "disagremeent", "disagreements",
- "disapointing", "disappointing",
- "disappearnce", "disappearance",
- "disappearred", "disappeared",
- "disapperaing", "disappearing",
- "disaspointed", "dissapointed",
- "disastisfied", "dissatisfied",
- "disatissfied", "dissatisfied",
- "disatvantage", "disadvantage",
- "discertation", "dissertation",
- "disciniplary", "disciplinary",
- "disciplanary", "disciplinary",
- "disciplenary", "disciplinary",
- "disciplinare", "discipline",
- "disciplinera", "disciplinary",
- "disciplinery", "disciplinary",
- "disclipinary", "disciplinary",
- "disconencted", "disconnected",
- "disconnectes", "disconnects",
- "disconnectme", "disconnected",
- "disconnectus", "disconnects",
- "discontiuned", "discontinued",
- "discountined", "discontinued",
- "discreditied", "discredited",
- "discreditted", "discredited",
- "discriminare", "discriminate",
- "discriminted", "discriminated",
- "disctinction", "distinction",
- "disctinctive", "distinctive",
- "disctintions", "distinctions",
- "discualified", "disqualified",
- "discustingly", "disgustingly",
- "disemination", "dissemination",
- "disenchanged", "disenchanted",
- "disengenuous", "disingenuous",
- "disenginuous", "disingenuous",
- "disensitized", "desensitized",
- "disgareement", "disagreements",
- "disgruntaled", "disgruntled",
- "disgrunteled", "disgruntled",
- "disguntingly", "disgustingly",
- "disingeneous", "disingenuous",
- "disingenious", "disingenuous",
- "disinteresed", "disinterested",
- "disintereted", "disinterested",
- "dismantleing", "dismantling",
- "disobediance", "disobedience",
- "disobeidence", "disobedience",
- "dispalcement", "displacement",
- "dispapointed", "dissapointed",
- "dispencaries", "dispensaries",
- "dispensaires", "dispensaries",
- "dispensarios", "dispensaries",
- "dispensiries", "dispensaries",
- "dispensories", "dispensaries",
- "disqaulified", "disqualified",
- "disqualifyed", "disqualified",
- "disqustingly", "disgustingly",
- "disrecpected", "disrespected",
- "disrepsected", "disrespected",
- "disresepcted", "disrespected",
- "disrespecful", "disrespectful",
- "disrespecing", "disrespecting",
- "disrespectul", "disrespectful",
- "disrespekted", "disrespected",
- "disrtibution", "distributions",
- "dissapearing", "disappearing",
- "dissapionted", "dissapointed",
- "dissapoimted", "dissapointed",
- "dissapoitned", "dissapointed",
- "dissaponited", "dissapointed",
- "dissapoonted", "dissapointed",
- "dissapounted", "dissapointed",
- "dissappinted", "dissapointed",
- "dissapponted", "dissapointed",
- "dissastified", "dissatisfied",
- "dissatisifed", "dissatisfied",
- "dissatsified", "dissatisfied",
- "dissepointed", "dissapointed",
- "dissipointed", "dissapointed",
- "dissobediant", "disobedient",
- "dissobedient", "disobedient",
- "dissopointed", "dissapointed",
- "disspaointed", "dissapointed",
- "dissppointed", "dissapointed",
- "dissspointed", "dissapointed",
- "distinations", "distinctions",
- "distincitons", "distinctions",
- "distingished", "distinguished",
- "distingishes", "distinguishes",
- "distinguised", "distinguished",
- "distirbuting", "distributing",
- "distirbution", "distribution",
- "distrabution", "distribution",
- "distribitors", "distributors",
- "distribtuion", "distributions",
- "distribucion", "distribution",
- "distribuited", "distributed",
- "distribuiton", "distributions",
- "distribuitor", "distributor",
- "distribusion", "distributions",
- "distributino", "distributions",
- "distributior", "distributor",
- "distributons", "distributors",
- "distributore", "distribute",
- "distriubtion", "distributions",
- "distrobution", "distribution",
- "distrubances", "disturbance",
- "distrubiting", "distributing",
- "distrubition", "distribution",
- "distrubitors", "distributors",
- "distrubution", "distribution",
- "distrubutors", "distributors",
- "distructions", "distractions",
- "distustingly", "disgustingly",
- "ditactorship", "dictatorship",
- "documenation", "documentation",
- "documentaion", "documentation",
- "documentaire", "documentaries",
- "documentarse", "documentaries",
- "documentarsi", "documentaries",
- "domesitcated", "domesticated",
- "domisticated", "domesticated",
- "donesticated", "domesticated",
- "donwloadable", "downloadable",
- "dossapointed", "dissapointed",
- "downlaodable", "downloadable",
- "downloadbale", "downloadable",
- "downloadeble", "downloadable",
- "drankenstein", "frankenstein",
- "dublications", "publications",
- "dusgustingly", "disgustingly",
- "dynamicallly", "dynamically",
- "dyregulation", "deregulation",
- "earthquackes", "earthquakes",
- "earthquakers", "earthquakes",
- "econimically", "economically",
- "economisesti", "economists",
- "educationnal", "educational",
- "effectionate", "affectionate",
- "effectivelly", "effectively",
- "effectivenss", "effectiveness",
- "efficienctly", "efficiency",
- "effordlessly", "effortlessly",
- "ejacualtions", "ejaculation",
- "electorlytes", "electrolytes",
- "electricrain", "electrician",
- "electrictian", "electrician",
- "electrobytes", "electrolytes",
- "electrocytes", "electrolytes",
- "electrolites", "electrolytes",
- "electroltyes", "electrolytes",
- "electronicas", "electronics",
- "electronicos", "electronics",
- "electroyltes", "electrolytes",
- "elektrolytes", "electrolytes",
- "eloctrolytes", "electrolytes",
- "embarassment", "embarrassment",
- "embarasssing", "embarassing",
- "embarrasment", "embarrassment",
- "embarressing", "embarrassing",
- "embarrissing", "embarrassing",
- "emberrassing", "embarrassing",
- "emphetamines", "amphetamines",
- "emprisonment", "imprisonment",
- "encarcerated", "incarcerated",
- "enceclopedia", "encyclopedia",
- "enchancement", "enhancement",
- "enchancments", "enchantments",
- "enchantmants", "enchantments",
- "enchentments", "enchantments",
- "enciclopedia", "encyclopedia",
- "enclycopedia", "encyclopedia",
- "encorporated", "incorporated",
- "encourageing", "encouraging",
- "encyclapedia", "encyclopedia",
- "encyclepedia", "encyclopedia",
- "encyclopadia", "encyclopedia",
- "encyclopeida", "encyclopedia",
- "encyclopidia", "encyclopedia",
- "encycolpedia", "encyclopedia",
- "encyklopedia", "encyclopedia",
- "encylcopedia", "encyclopedia",
- "encyplopedia", "encyclopedia",
- "endoresments", "endorsement",
- "enemployment", "unemployment",
- "enfringement", "infringement",
- "enlightended", "enlightened",
- "enlightenend", "enlightened",
- "enlightented", "enlightened",
- "enlightining", "enlightening",
- "enligthening", "enlightening",
- "entaglements", "entanglements",
- "entartaining", "entertaining",
- "enterpreneur", "entrepreneurs",
- "enterprenuer", "entrepreneur",
- "entertainted", "entertained",
- "enthusiaists", "enthusiasts",
- "enthusuastic", "enthusiastic",
- "entoxication", "intoxication",
- "entrepeneurs", "entrepreneurs",
- "entreperneur", "entrepreneurs",
- "entreprenaur", "entrepreneur",
- "entrepreners", "entrepreneurs",
- "entrepreneus", "entrepreneurs",
- "entreprenour", "entrepreneur",
- "entreprenure", "entrepreneurs",
- "entreprenurs", "entrepreneurs",
- "entrepreuner", "entrepreneurs",
- "entretaining", "entertaining",
- "enviormental", "environmental",
- "enviornments", "environments",
- "enviromental", "environmental",
- "environemnts", "environments",
- "environmentl", "environmentally",
- "environmetal", "environmental",
- "envrionments", "environments",
- "establishmet", "establishments",
- "evelutionary", "evolutionary",
- "exagerrating", "exaggerating",
- "exaggarating", "exaggerating",
- "exaggaration", "exaggeration",
- "exaggeratted", "exaggerated",
- "exaggurating", "exaggerating",
- "exagguration", "exaggeration",
- "exceptionaly", "exceptionally",
- "exceptionnal", "exceptional",
- "exclusiveity", "exclusivity",
- "exclusivelly", "exclusively",
- "exclusivitiy", "exclusivity",
- "excorciating", "excruciating",
- "excrusiating", "excruciating",
- "excurciating", "excruciating",
- "exectuioners", "executioner",
- "executioneer", "executioner",
- "executionees", "executions",
- "executioness", "executions",
- "executionier", "executioner",
- "executionner", "executioner",
- "exeggerating", "exaggerating",
- "exeggeration", "exaggeration",
- "expeditonary", "expeditionary",
- "expendatures", "expenditures",
- "expendetures", "expenditures",
- "expentitures", "expenditures",
- "experamental", "experimental",
- "expereincing", "experiencing",
- "experemental", "experimental",
- "experiancing", "experiencing",
- "experiemntal", "experimental",
- "experiemnted", "experimented",
- "experimantal", "experimental",
- "experimentan", "experimentation",
- "experimentes", "experiments",
- "experimentle", "experimented",
- "experimentos", "experiments",
- "experimentul", "experimental",
- "expidentures", "expenditures",
- "expierencing", "experiencing",
- "expiremental", "experimental",
- "expiremented", "experimented",
- "explaination", "explanation",
- "explenations", "explanations",
- "expliotation", "exploitation",
- "exploitaiton", "exploitation",
- "exploitating", "exploitation",
- "exploititive", "exploitative",
- "explortation", "exploitation",
- "explotiation", "exploitation",
- "explotiative", "exploitative",
- "expolitation", "exploitation",
- "expolitative", "exploitative",
- "exponentialy", "exponentially",
- "expropiation", "expropriation",
- "extensivelly", "extensively",
- "extradiction", "extradition",
- "extraordiary", "extraordinary",
- "extraordinay", "extraordinary",
- "extrapolerat", "extrapolate",
- "extrapoloate", "extrapolate",
- "extremistisk", "extremists",
- "extrordinary", "extraordinary",
- "extruciating", "excruciating",
- "facilitatile", "facilitate",
- "fahrenheight", "fahrenheit",
- "falmethrower", "flamethrower",
- "familiarlize", "familiarize",
- "fanslaughter", "manslaughter",
- "fantasticaly", "fantastically",
- "fantasticlly", "fantastically",
- "fashionalble", "fashionable",
- "fermantation", "fermentation",
- "fermentacion", "fermentation",
- "fermentaiton", "fermentation",
- "fermentating", "fermentation",
- "fermintation", "fermentation",
- "fictionaries", "dictionaries",
- "figuartively", "figuratively",
- "figuratevely", "figuratively",
- "figurativley", "figuratively",
- "figuretively", "figuratively",
- "figuritively", "figuratively",
- "fingerpoints", "fingerprints",
- "firefigthers", "firefighters",
- "flamethorwer", "flamethrower",
- "flametrhower", "flamethrower",
- "flanethrower", "flamethrower",
- "flexibillity", "flexibility",
- "flourishment", "flourishing",
- "fluctiations", "fluctuations",
- "flucutations", "fluctuations",
- "fluxtuations", "fluctuations",
- "forgivenness", "forgiveness",
- "fortunatelly", "fortunately",
- "framethrower", "flamethrower",
- "frankenstain", "frankenstein",
- "frankensteen", "frankenstein",
- "frankenstine", "frankenstein",
- "frankinstein", "frankenstein",
- "frementation", "fermentation",
- "friendzonded", "friendzoned",
- "friendzonned", "friendzoned",
- "friendzowned", "friendzoned",
- "fringeworthy", "cringeworthy",
- "fronkenstein", "frankenstein",
- "fruitsations", "frustrations",
- "frustrastion", "frustrations",
- "fucntionally", "functionally",
- "funcitonally", "functionally",
- "functionable", "functional",
- "functionaliy", "functionally",
- "functionalty", "functionality",
- "functionlity", "functionality",
- "functionning", "functioning",
- "fundamentais", "fundamentals",
- "fundamentalt", "fundamentalist",
- "fundamentaly", "fundamentally",
- "fundemantals", "fundamentals",
- "fundementals", "fundamentals",
- "fundimentals", "fundamentals",
- "furstrations", "frustrations",
- "futuristisch", "futuristic",
- "fwankenstein", "frankenstein",
- "geneological", "genealogical",
- "generacional", "generational",
- "generalizare", "generalize",
- "generalizate", "generalize",
- "generelizing", "generalizing",
- "geograhpical", "geographical",
- "geographicly", "geographical",
- "geographisch", "geographic",
- "geogrpahical", "geographical",
- "goegraphical", "geographical",
- "governemntal", "governmental",
- "governmently", "governmental",
- "grammaticaal", "grammatical",
- "grammaticaly", "grammatically",
- "grandchilden", "grandchildren",
- "grandchilder", "grandchildren",
- "grandchilren", "grandchildren",
- "grassrooters", "grassroots",
- "gringeworthy", "cringeworthy",
- "guantanameow", "guantanamo",
- "guantanamero", "guantanamo",
- "hallucinatin", "hallucinations",
- "hallucinaton", "hallucination",
- "handwritting", "handwriting",
- "harrassments", "harassments",
- "headqaurters", "headquarters",
- "headquatered", "headquartered",
- "healthercare", "healthcare",
- "heavywieghts", "heavyweight",
- "helicopteros", "helicopters",
- "hererosexual", "heterosexual",
- "heretosexual", "heterosexual",
- "heteresexual", "heterosexual",
- "hetreosexual", "heterosexual",
- "highligthing", "highlighting",
- "hipocritical", "hypocritical",
- "hipothetical", "hypothetical",
- "histarically", "historically",
- "histerically", "historically",
- "historicians", "historians",
- "homogeneized", "homogenized",
- "homogenenous", "homogeneous",
- "homosexuales", "homosexuals",
- "homosexualiy", "homosexuality",
- "homosexualls", "homosexuals",
- "homosexualty", "homosexuality",
- "homosexuella", "homosexual",
- "hopsitalized", "hospitalized",
- "horisontally", "horizontally",
- "horizantally", "horizontally",
- "horiztonally", "horizontally",
- "horozontally", "horizontally",
- "hospitallity", "hospitality",
- "hospitilized", "hospitalized",
- "hospitolized", "hospitalized",
- "hosptialized", "hospitalized",
- "humanitarien", "humanitarian",
- "humanitarion", "humanitarian",
- "humanitatian", "humanitarian",
- "humaniterian", "humanitarian",
- "humantiarian", "humanitarian",
- "huminatarian", "humanitarian",
- "hurricanefps", "hurricanes",
- "hyopthetical", "hypothetical",
- "hypathetical", "hypothetical",
- "hypertrophey", "hypertrophy",
- "hypethetical", "hypothetical",
- "hypocrticial", "hypocritical",
- "hypocrytical", "hypocritical",
- "hypotehtical", "hypothetical",
- "hypotethical", "hypothetical",
- "hypotherical", "hypothetical",
- "hypotheticly", "hypothetical",
- "hystarically", "hysterically",
- "hystorically", "hysterically",
- "idealistisch", "idealistic",
- "identificato", "identification",
- "identifierad", "identified",
- "identifieras", "identifies",
- "identifyable", "identifiable",
- "ideologicaly", "ideologically",
- "idiosyncracy", "idiosyncrasy",
- "illegetimate", "illegitimate",
- "illegitamate", "illegitimate",
- "illegitamite", "illegitimate",
- "illegitemate", "illegitimate",
- "illegitimite", "illegitimate",
- "illigetimate", "illegitimate",
- "illigitemate", "illegitimate",
- "illistration", "illustration",
- "illsutration", "illustrations",
- "illustartion", "illustration",
- "illustraitor", "illustrator",
- "illustraties", "illustrate",
- "illustratior", "illustrator",
- "imcompatible", "incompatible",
- "imcompetence", "incompetence",
- "imexperience", "inexperience",
- "immediatelly", "immediately",
- "immortallity", "immortality",
- "imperialfist", "imperialist",
- "imperialisim", "imperialism",
- "imperialstic", "imperialist",
- "implamenting", "implementing",
- "implausibile", "implausible",
- "implecations", "implications",
- "implementase", "implements",
- "implementasi", "implements",
- "implementato", "implementation",
- "implentation", "implementation",
- "implimenting", "implementing",
- "imporvements", "improvements",
- "impossibilty", "impossibility",
- "impossiblely", "impossibly",
- "impossiblity", "impossibly",
- "impovershied", "impoverished",
- "impoversihed", "impoverished",
- "imprefection", "imperfections",
- "improsonment", "imprisonment",
- "improviserad", "improvised",
- "imrpovements", "improvements",
- "imtimidating", "intimidating",
- "imtimidation", "intimidation",
- "inaccesibles", "inaccessible",
- "inaccessable", "inaccessible",
- "inaccessbile", "inaccessible",
- "inaccurasies", "inaccuracies",
- "inaccuraties", "inaccuracies",
- "inaccuricies", "inaccuracies",
- "inacuraccies", "inaccuracies",
- "inadvertenly", "inadvertently",
- "inappropiate", "inappropriate",
- "inapproprate", "inappropriate",
- "inappropriae", "inappropriately",
- "inappropriet", "inappropriately",
- "inattractive", "unattractive",
- "inbelievable", "unbelievable",
- "incarcelated", "incarcerated",
- "incarcirated", "incarcerated",
- "incarserated", "incarcerated",
- "incedentally", "incidentally",
- "incentiveise", "incentives",
- "incestigator", "investigator",
- "incomaptible", "incompatible",
- "incomparible", "incompatible",
- "incompatable", "incompatible",
- "incompatibil", "incompatible",
- "incompetance", "incompetence",
- "incompetente", "incompetence",
- "incompitable", "incompatible",
- "incomptetent", "incompetent",
- "inconcistent", "inconsistent",
- "inconsistant", "inconsistent",
- "inconsistecy", "inconsistency",
- "inconsisteny", "inconsistency",
- "inconveinent", "inconvenient",
- "inconveniant", "inconvenient",
- "inconveniece", "inconvenience",
- "inconvenince", "inconvenience",
- "inconvienent", "inconvenient",
- "incorparated", "incorporated",
- "incorperated", "incorporated",
- "incorportaed", "incorporated",
- "incorportate", "incorporate",
- "incrediblely", "incredibly",
- "incrementers", "increments",
- "incremential", "incremental",
- "indefinately", "indefinitely",
- "indefineable", "undefinable",
- "indefinetely", "indefinitely",
- "indefinitive", "indefinite",
- "indefinitley", "indefinitely",
- "indefintiely", "indefinitely",
- "indepedantly", "independently",
- "indepencence", "independence",
- "independance", "independence",
- "independante", "independents",
- "independenet", "independents",
- "independenly", "independently",
- "independense", "independents",
- "independente", "independence",
- "independetly", "independently",
- "indepentents", "independents",
- "indetifiable", "identifiable",
- "indianaoplis", "indianapolis",
- "indianopolis", "indianapolis",
- "indicentally", "incidentally",
- "indifferance", "indifference",
- "indifferente", "indifference",
- "indiffernece", "indifference",
- "indimidating", "intimidating",
- "indimidation", "intimidation",
- "indipendence", "independence",
- "indisputible", "indisputable",
- "indisputibly", "indisputably",
- "individuales", "individuals",
- "individualty", "individuality",
- "individuella", "individual",
- "indiviudally", "individually",
- "indivudually", "individually",
- "indpendently", "independently",
- "indroduction", "introduction",
- "indroductory", "introductory",
- "industriella", "industrial",
- "industrijske", "industries",
- "inefficienct", "inefficient",
- "inefficienty", "inefficiently",
- "inevitablely", "inevitably",
- "inevitablity", "inevitably",
- "inevititably", "inevitably",
- "inexblicably", "inexplicably",
- "inexpectedly", "unexpectedly",
- "inexpereince", "inexperience",
- "inexperiance", "inexperience",
- "inexperieced", "inexperienced",
- "inexperiened", "inexperienced",
- "inexperiente", "inexperience",
- "inexpierence", "inexperienced",
- "inexplicabil", "inexplicably",
- "inexplicibly", "inexplicably",
- "infalability", "infallibility",
- "infilitrated", "infiltrated",
- "infiltraitor", "infiltrator",
- "infiltratior", "infiltrator",
- "infiltratred", "infiltrate",
- "influenceing", "influencing",
- "infogrpahics", "infographic",
- "inforgivable", "unforgivable",
- "infrantryman", "infantryman",
- "infridgement", "infringement",
- "infrignement", "infringement",
- "ingestigator", "investigator",
- "ingredientes", "ingredients",
- "ingreediants", "ingredients",
- "ininterested", "uninterested",
- "initalizable", "initializable",
- "inkompatible", "incompatible",
- "inkompetence", "incompetence",
- "inkonsistent", "inconsistent",
- "inlightening", "enlightening",
- "innersection", "intersection",
- "innerstellar", "interstellar",
- "inpenetrable", "impenetrable",
- "inplementing", "implementing",
- "inplications", "implications",
- "inpoverished", "impoverished",
- "inprisonment", "imprisonment",
- "inproductive", "unproductive",
- "inprovements", "improvements",
- "inresponsive", "unresponsive",
- "insentivised", "insensitive",
- "insentivises", "insensitive",
- "insignifiant", "insignificant",
- "insignificat", "insignificant",
- "insinuationg", "insinuating",
- "instabillity", "instability",
- "instalaltion", "installations",
- "installatons", "installations",
- "installatron", "installation",
- "instantaneos", "instantaneous",
- "instantaneus", "instantaneous",
- "instantanous", "instantaneous",
- "instinctivly", "instinctively",
- "institutuion", "institution",
- "instramental", "instrumental",
- "instrcutions", "instruction",
- "instrucitons", "instruction",
- "instructiosn", "instruction",
- "instructores", "instructors",
- "instrumentos", "instruments",
- "instrumentul", "instrumental",
- "insturmental", "instrumental",
- "instutitions", "institutions",
- "insuccessful", "unsuccessful",
- "insufficiant", "insufficient",
- "insuffucient", "insufficient",
- "insuspecting", "unsuspecting",
- "intaxication", "intoxication",
- "intelelctual", "intellectuals",
- "intellectals", "intellectuals",
- "intellectaul", "intellectuals",
- "intellectuel", "intellectual",
- "intellecutal", "intellectual",
- "intelligance", "intelligence",
- "intelligenly", "intelligently",
- "intelligente", "intelligence",
- "intelligenty", "intelligently",
- "intelligient", "intelligent",
- "intenational", "international",
- "intentionnal", "intentional",
- "intepretator", "interpretor",
- "interatellar", "interstellar",
- "interational", "international",
- "intercection", "interception",
- "intercepcion", "interception",
- "interceptons", "interceptions",
- "intereaction", "intersection",
- "interections", "interactions",
- "interersting", "interpreting",
- "interesction", "intersection",
- "interestigly", "interestingly",
- "interestinly", "interestingly",
- "interferance", "interference",
- "interfereing", "interfering",
- "interferisce", "interferes",
- "interferisse", "interferes",
- "interferring", "interfering",
- "intergration", "integration",
- "interlectual", "intellectual",
- "intermediare", "intermediate",
- "intermediete", "intermediate",
- "intermettent", "intermittent",
- "intermideate", "intermediate",
- "intermidiate", "intermediate",
- "internatinal", "international",
- "internationl", "international",
- "internations", "interactions",
- "internediate", "intermediate",
- "internelized", "internalized",
- "internilized", "internalized",
- "interperters", "interpreter",
- "interperting", "interpreting",
- "interprating", "interpreting",
- "interpretare", "interpreter",
- "interpretato", "interpretation",
- "interpreteer", "interpreter",
- "interpretier", "interpreter",
- "interpretion", "interpreting",
- "interpretter", "interpreter",
- "interpriting", "interpreting",
- "interraccial", "interracial",
- "interractial", "interracial",
- "interrogatin", "interrogation",
- "interrumping", "interrupting",
- "interrupteds", "interrupts",
- "interruptors", "interrupts",
- "interseccion", "intersection",
- "interseciton", "intersections",
- "interseption", "interception",
- "intersetllar", "interstellar",
- "interstallar", "interstellar",
- "interstaller", "interstellar",
- "intersteller", "interstellar",
- "interstellor", "interstellar",
- "intertaining", "entertaining",
- "intertwinded", "intertwined",
- "intertwinned", "intertwined",
- "interveiwing", "interviewing",
- "intervencion", "intervention",
- "interveneing", "intervening",
- "intervension", "intervention",
- "interviening", "interviewing",
- "intidimation", "intimidation",
- "intillectual", "intellectual",
- "intimidacion", "intimidation",
- "intimidative", "intimidate",
- "intimitading", "intimidating",
- "intimitating", "intimidating",
- "intimitation", "intimidation",
- "intorduction", "introduction",
- "intorductory", "introductory",
- "intoxicacion", "intoxication",
- "intoxination", "intoxication",
- "intrepreting", "interpreting",
- "intrinsicaly", "intrinsically",
- "introdiction", "introduction",
- "introduccion", "introduction",
- "introduceras", "introduces",
- "introduceres", "introduces",
- "introduciton", "introduction",
- "introductary", "introductory",
- "introducting", "introduction",
- "introductury", "introductory",
- "introduktion", "introduction",
- "introspectin", "introspection",
- "intruduction", "introduction",
- "intruductory", "introductory",
- "intsrumental", "instrumental",
- "intuitivelly", "intuitively",
- "inturrupting", "interrupting",
- "invervention", "intervention",
- "investagated", "investigated",
- "investagator", "investigator",
- "investegated", "investigated",
- "investegator", "investigator",
- "investigaron", "investigator",
- "investigater", "investigator",
- "investigatie", "investigative",
- "investigatin", "investigation",
- "investigatio", "investigator",
- "investigaton", "investigation",
- "investingate", "investigate",
- "investogator", "investigator",
- "invicibility", "invisibility",
- "invididually", "individually",
- "invisibiltiy", "invisibility",
- "invisilibity", "invisibility",
- "invisivility", "invisibility",
- "invlunerable", "invulnerable",
- "involnerable", "invulnerable",
- "involuntairy", "involuntary",
- "involuntarly", "involuntary",
- "invonvenient", "inconvenient",
- "invulenrable", "invulnerable",
- "invulernable", "invulnerable",
- "invulnarable", "invulnerable",
- "invulnerbale", "invulnerable",
- "invulnurable", "invulnerable",
- "invulverable", "invulnerable",
- "invunlerable", "invulnerable",
- "invurnerable", "invulnerable",
- "irrationably", "irrationally",
- "irrationatly", "irrationally",
- "irrationella", "irrational",
- "irreplacable", "irreplaceable",
- "irresistable", "irresistible",
- "irresistably", "irresistibly",
- "irrespecitve", "irrespective",
- "irresponsble", "irresponsible",
- "irresponsibe", "irresponsible",
- "irreverisble", "irreversible",
- "irreversebly", "irreversible",
- "irreversibel", "irreversible",
- "irrevirsible", "irreversible",
- "irrispective", "irrespective",
- "irriversible", "irreversible",
- "isdefinitely", "indefinitely",
- "isntallation", "installation",
- "isntrumental", "instrumental",
- "jackonsville", "jacksonville",
- "jounralistic", "journalistic",
- "jouranlistic", "journalistic",
- "journalisitc", "journalistic",
- "journalistes", "journalists",
- "judgementals", "judgements",
- "juggernaunts", "juggernaut",
- "juridisction", "jurisdictions",
- "jurisdiccion", "jurisdiction",
- "jurisdiciton", "jurisdiction",
- "jurisdiktion", "jurisdiction",
- "jurisfiction", "jurisdiction",
- "jurisidction", "jurisdiction",
- "juristiction", "jurisdiction",
- "jursidiction", "jurisdiction",
- "jusridiction", "jurisdiction",
- "justificatin", "justifications",
- "katastrophic", "catastrophic",
- "kidnergarten", "kindergarten",
- "kindergarden", "kindergarten",
- "kingergarten", "kindergarten",
- "kintergarten", "kindergarten",
- "knolwedgable", "knowledgable",
- "knoweldgable", "knowledgable",
- "knowladgable", "knowledgable",
- "knowldegable", "knowledgable",
- "knowldgeable", "knowledgable",
- "knowleagable", "knowledgable",
- "knowledagble", "knowledgable",
- "knowledeable", "knowledgable",
- "knowledgabel", "knowledgable",
- "knowledgeble", "knowledgeable",
- "knowledgebly", "knowledgable",
- "knowledgible", "knowledgable",
- "knowlegdable", "knowledgable",
- "knowlegeable", "knowledgeable",
- "knwoledgable", "knowledgable",
- "kolonization", "colonization",
- "kombinations", "combinations",
- "kommissioner", "commissioner",
- "kompensation", "compensation",
- "konfidential", "confidential",
- "konfirmation", "confirmation",
- "kongregation", "congregation",
- "konservatism", "conservatism",
- "konservative", "conservative",
- "konsultation", "consultation",
- "konversation", "conversation",
- "koordination", "coordination",
- "krankenstein", "frankenstein",
- "leaglization", "legalization",
- "legalizacion", "legalization",
- "legalizaiton", "legalization",
- "legendariske", "legendaries",
- "legimitately", "legitimately",
- "legislatiors", "legislators",
- "legistration", "registration",
- "legitamately", "legitimately",
- "legitamitely", "legitimately",
- "legitemately", "legitimately",
- "legitimatley", "legitimately",
- "legitimitely", "legitimately",
- "liberatrians", "libertarians",
- "libertarains", "libertarians",
- "libertariens", "libertarians",
- "libertaryans", "libertarians",
- "libertatians", "libertarians",
- "liberterians", "libertarians",
- "libretarians", "libertarians",
- "lighthearded", "lighthearted",
- "linguisticas", "linguistics",
- "linguisticos", "linguistics",
- "linguistisch", "linguistics",
- "litllefinger", "littlefinger",
- "littelfinger", "littlefinger",
- "litterfinger", "littlefinger",
- "littiefinger", "littlefinger",
- "littlefigner", "littlefinger",
- "littlefinder", "littlefinger",
- "littlepinger", "littlefinger",
- "lnowledgable", "knowledgable",
- "longitudonal", "longitudinal",
- "madturbating", "masturbating",
- "madturbation", "masturbation",
- "magnificient", "magnificent",
- "maintainance", "maintenance",
- "maintainence", "maintenance",
- "maintenaince", "maintenance",
- "malfucntions", "malfunction",
- "manafactured", "manufactured",
- "manafacturer", "manufacturer",
- "manafactures", "manufactures",
- "manifactured", "manufactured",
- "manifacturer", "manufacturer",
- "manifactures", "manufactures",
- "manifestaion", "manifestation",
- "manifestanti", "manifestation",
- "manipluating", "manipulating",
- "manipluation", "manipulation",
- "manipualting", "manipulating",
- "manipualtion", "manipulation",
- "manipualtive", "manipulative",
- "manipulacion", "manipulation",
- "manipulitive", "manipulative",
- "maniuplating", "manipulating",
- "maniuplation", "manipulation",
- "maniuplative", "manipulative",
- "manouverable", "maneuverable",
- "mansalughter", "manslaughter",
- "manslaugther", "manslaughter",
- "mansluaghter", "manslaughter",
- "manufactered", "manufactured",
- "manufacterer", "manufacturer",
- "manufacteres", "manufactures",
- "manufacteurs", "manufactures",
- "manufactored", "manufactured",
- "manufactorer", "manufacturer",
- "manufactores", "manufactures",
- "manufactuers", "manufacturers",
- "manufactuing", "manufacturing",
- "manufacturas", "manufactures",
- "manufacturor", "manufacturer",
- "manufactuter", "manufacture",
- "manufacuters", "manufactures",
- "manufacutred", "manufacture",
- "manufacutres", "manufactures",
- "manufaturing", "manufacturing",
- "manupilating", "manipulating",
- "manupulating", "manipulating",
- "manupulation", "manipulation",
- "manupulative", "manipulative",
- "marchmallows", "marshmallows",
- "marganilized", "marginalized",
- "margenalized", "marginalized",
- "marginilized", "marginalized",
- "marhsmallows", "marshmallows",
- "marshamllows", "marshmallows",
- "marshmallons", "marshmallows",
- "masoginistic", "misogynistic",
- "masogynistic", "misogynistic",
- "massachusets", "massachusetts",
- "massachustts", "massachusetts",
- "masterbation", "masturbation",
- "masterpeices", "masterpiece",
- "mastrubating", "masturbating",
- "mastrubation", "masturbation",
- "mastubration", "masturbation",
- "masturabting", "masturbating",
- "masturabtion", "masturbation",
- "masturbacion", "masturbation",
- "masturbaited", "masturbated",
- "masturbathon", "masturbation",
- "masturbsting", "masturbating",
- "masturdating", "masturbating",
- "mastutbation", "masturbation",
- "mataphorical", "metaphorical",
- "mataphysical", "metaphysical",
- "matchmakeing", "matchmaking",
- "mathemathics", "mathematics",
- "mathematican", "mathematician",
- "mathematicas", "mathematics",
- "mathematicks", "mathematics",
- "mathematicly", "mathematical",
- "mathematisch", "mathematics",
- "mathemetical", "mathematical",
- "matheticians", "mathematicians",
- "mathimatical", "mathematical",
- "mathmatician", "mathematician",
- "mecahnically", "mechanically",
- "mechancially", "mechanically",
- "meditaciones", "medications",
- "mediteranean", "mediterranean",
- "mediterraean", "mediterranean",
- "mediterranen", "mediterranean",
- "memerization", "memorization",
- "memorizacion", "memorization",
- "memorozation", "memorization",
- "metalurgical", "metallurgical",
- "metaphisical", "metaphysical",
- "metaphoricly", "metaphorical",
- "metaphsyical", "metaphysical",
- "metaphyiscal", "metaphysical",
- "metaphyscial", "metaphysical",
- "metaphysisch", "metaphysics",
- "metephorical", "metaphorical",
- "metephysical", "metaphysical",
- "meterologist", "meteorologist",
- "meterosexual", "heterosexual",
- "methaporical", "metaphorical",
- "methematical", "mathematical",
- "metiphorical", "metaphorical",
- "metophorical", "metaphorical",
- "metorpolitan", "metropolitan",
- "metrololitan", "metropolitan",
- "metropilitan", "metropolitan",
- "metroploitan", "metropolitan",
- "metropolians", "metropolis",
- "metropoliten", "metropolitan",
- "metropolitin", "metropolitan",
- "metropoliton", "metropolitan",
- "microcentres", "microcenter",
- "microphonies", "microphones",
- "microscophic", "microscopic",
- "microscopice", "microscope",
- "microscoptic", "microscopic",
- "midfieldiers", "midfielders",
- "millenialism", "millennialism",
- "millionairre", "millionaire",
- "millionaries", "millionaires",
- "millioniares", "millionaires",
- "minimalisitc", "minimalist",
- "minimalisity", "minimalist",
- "mininterpret", "misinterpret",
- "minipulating", "manipulating",
- "minipulation", "manipulation",
- "minipulative", "manipulative",
- "miracilously", "miraculously",
- "miracurously", "miraculous",
- "miscarraiges", "miscarriage",
- "miscelaneous", "miscellaneous",
- "miscellanous", "miscellaneous",
- "mischievious", "mischievous",
- "misdameanors", "misdemeanors",
- "misdeamenors", "misdemeanor",
- "misfourtunes", "misfortunes",
- "misgoynistic", "misogynistic",
- "misinterpert", "misinterpret",
- "misinterpred", "misinterpreted",
- "misinterprit", "misinterpreting",
- "misinterpted", "misinterpret",
- "misintrepret", "misinterpret",
- "misisonaries", "missionaries",
- "misoganistic", "misogynistic",
- "misogenistic", "misogynistic",
- "misoginystic", "misogynistic",
- "misognyistic", "misogynistic",
- "misogonistic", "misogynistic",
- "misogynisitc", "misogynistic",
- "misogynsitic", "misogynistic",
- "misogynystic", "misogynistic",
- "missionaires", "missionaries",
- "mississipppi", "mississippi",
- "misspellling", "misspelling",
- "misteriously", "mysteriously",
- "misundersood", "misunderstood",
- "misunderstod", "misunderstood",
- "misygonistic", "misogynistic",
- "modificacion", "modification",
- "modificaiton", "modification",
- "modificatons", "modifications",
- "modifikation", "modification",
- "modivational", "motivational",
- "moisterizing", "moisturizing",
- "moistorizing", "moisturizing",
- "moisutrizing", "moisturizing",
- "momentarilly", "momentarily",
- "monolithisch", "monolithic",
- "mositurizing", "moisturizing",
- "motherbaords", "motherboards",
- "motherborads", "motherboards",
- "motivacional", "motivational",
- "motovational", "motivational",
- "mousturizing", "moisturizing",
- "muktitasking", "multitasking",
- "mulittasking", "multitasking",
- "multinatinal", "multinational",
- "multitaksing", "multitasking",
- "munipulative", "manipulative",
- "mutlitasking", "multitasking",
- "mysoganistic", "misogynistic",
- "mysogenistic", "misogynistic",
- "mysogonistic", "misogynistic",
- "mysterioulsy", "mysteriously",
- "nacionalists", "nationalists",
- "narcisisstic", "narcissistic",
- "narcissictic", "narcissistic",
- "narcissisism", "narcissism",
- "narcissisist", "narcissist",
- "narcissisitc", "narcissist",
- "narcississts", "narcissist",
- "narssicistic", "narcissistic",
- "natioanlists", "nationalists",
- "nationalisic", "nationalistic",
- "nationalisim", "nationalism",
- "nationalistc", "nationalistic",
- "nationalites", "nationalist",
- "nationalitic", "nationalistic",
- "nationalitys", "nationalist",
- "nationallity", "nationally",
- "nationalsits", "nationalists",
- "nationalties", "nationalist",
- "nazionalists", "nationalists",
- "neccessarily", "necessarily",
- "neccessities", "necessities",
- "necessarilly", "necessarily",
- "necessitites", "necessities",
- "neckbearders", "neckbeards",
- "neckbeardese", "neckbeards",
- "neckbeardest", "neckbeards",
- "neckbeardies", "neckbeards",
- "neckbeardius", "neckbeards",
- "negociations", "negotiations",
- "negoitations", "negotiations",
- "negotiatians", "negotiations",
- "negotiatiing", "negotiating",
- "negotiationg", "negotiating",
- "negotiatiors", "negotiations",
- "neigbhorhood", "neighborhoods",
- "neigbourhood", "neighbourhood",
- "neighboorhod", "neighbourhood",
- "neighborhing", "neighboring",
- "neighborhods", "neighborhoods",
- "neighbourghs", "neighbours",
- "neighbourhod", "neighbourhood",
- "neighbourood", "neighbourhood",
- "neighbrohood", "neighborhoods",
- "neighourhood", "neighborhood",
- "neoroscience", "neuroscience",
- "neruological", "neurological",
- "neruoscience", "neuroscience",
- "netropolitan", "metropolitan",
- "neuorscience", "neuroscience",
- "neuralogical", "neurological",
- "neuroligical", "neurological",
- "neurosceince", "neuroscience",
- "neuroscienze", "neuroscience",
- "neurosicence", "neuroscience",
- "neverhteless", "nevertheless",
- "nieghborhood", "neighborhood",
- "norhtwestern", "northwestern",
- "nothingsness", "nothingness",
- "noticeablely", "noticeably",
- "notificacion", "notification",
- "notificaiton", "notification",
- "notificatons", "notifications",
- "nuerological", "neurological",
- "nueroscience", "neuroscience",
- "nutritionnal", "nutritional",
- "obersvations", "observations",
- "objectivelly", "objectively",
- "objectiviser", "objectives",
- "objectivitiy", "objectivity",
- "obversations", "observations",
- "ocassionally", "occasionally",
- "occaisonally", "occasionally",
- "occasioanlly", "occasionally",
- "occassionaly", "occasionally",
- "occationally", "occasionally",
- "occurrencies", "occurrences",
- "offensivelly", "offensively",
- "ogranisation", "organisation",
- "omniverously", "omnivorously",
- "operationnal", "operational",
- "opportuniste", "opportunities",
- "opportunites", "opportunities",
- "oppositition", "opposition",
- "opthalmology", "ophthalmology",
- "optimistisch", "optimistic",
- "optimizacion", "optimization",
- "optimizating", "optimization",
- "optimziation", "optimization",
- "optmizations", "optimizations",
- "oragnisation", "organisation",
- "orchastrated", "orchestrated",
- "orchestarted", "orchestrated",
- "orchestraded", "orchestrated",
- "orchistrated", "orchestrated",
- "orgainsation", "organisation",
- "orgainzation", "organizations",
- "organisaiton", "organisation",
- "organisatons", "organisations",
- "organistaion", "organisation",
- "organizacion", "organization",
- "organizaiton", "organization",
- "organizativo", "organization",
- "organizatons", "organizations",
- "organsiation", "organisation",
- "organziation", "organization",
- "orginasation", "organisation",
- "orginazation", "organization",
- "orgnaisation", "organisations",
- "originallity", "originality",
- "outraegously", "outrageously",
- "outrageoulsy", "outrageously",
- "outragesouly", "outrageously",
- "outrageuosly", "outrageously",
- "outragiously", "outrageously",
- "outsourceing", "outsourcing",
- "overbearring", "overbearing",
- "overblocking", "overclocking",
- "overclcoking", "overclocking",
- "overclicking", "overclocking",
- "overcloaking", "overclocking",
- "overclockign", "overclocking",
- "overclokcing", "overclocking",
- "overhearting", "overreacting",
- "overheathing", "overheating",
- "overhtinking", "overthinking",
- "overhwelming", "overwhelming",
- "overlappping", "overlapping",
- "overlcocking", "overclocking",
- "overreaktion", "overreaction",
- "overwealming", "overwhelming",
- "overwhelemed", "overwhelmed",
- "overwhemling", "overwhelming",
- "overwhleming", "overwhelming",
- "owerpowering", "overpowering",
- "painkilllers", "painkillers",
- "palastinians", "palestinians",
- "palesitnians", "palestinians",
- "palestenians", "palestinians",
- "palestinains", "palestinians",
- "palestiniens", "palestinians",
- "palestininan", "palestinian",
- "palestininas", "palestinians",
- "palistinians", "palestinians",
- "palythroughs", "playthroughs",
- "parapharsing", "paraphrasing",
- "paraphenalia", "paraphernalia",
- "paraphrashed", "paraphrase",
- "paraphrazing", "paraphrasing",
- "paraprashing", "paraphrasing",
- "paraprhasing", "paraphrasing",
- "parenthesees", "parentheses",
- "parenthesies", "parenthesis",
- "parliamentry", "parliamentary",
- "partecipants", "participants",
- "partecipated", "participated",
- "parternships", "partnership",
- "particapated", "participated",
- "particiapnts", "participant",
- "particiapted", "participated",
- "participante", "participate",
- "participaste", "participants",
- "participatie", "participated",
- "participatin", "participation",
- "participatns", "participant",
- "participaton", "participant",
- "participents", "participants",
- "particualrly", "particularly",
- "particulalry", "particularly",
- "particullary", "particularly",
- "passionatley", "passionately",
- "pathalogical", "pathological",
- "pathelogical", "pathological",
- "patholigical", "pathological",
- "paychedelics", "psychedelics",
- "paychiatrist", "psychiatrist",
- "paychologist", "psychologist",
- "paychopathic", "psychopathic",
- "penetratiing", "penetrating",
- "penisylvania", "pennsylvania",
- "pennsilvania", "pennsylvania",
- "pennslyvania", "pennsylvania",
- "pennsylvaina", "pennsylvania",
- "pennsyvlania", "pennsylvania",
- "pennyslvania", "pennsylvania",
- "penssylvania", "pennsylvania",
- "pentsylvania", "pennsylvania",
- "percentagens", "percentages",
- "perferential", "preferential",
- "performantes", "performances",
- "performences", "performances",
- "perfromances", "performances",
- "peridoically", "periodically",
- "peripathetic", "peripatetic",
- "periphereals", "peripherals",
- "peripherials", "peripherals",
- "permanantely", "permanently",
- "permanentely", "permanently",
- "permissiable", "permissible",
- "peroidically", "periodically",
- "perpatrators", "perpetrators",
- "perpatuating", "perpetuating",
- "perpertators", "perpetrators",
- "perpertrated", "perpetrated",
- "perpetraitor", "perpetrator",
- "perpetraters", "perpetrators",
- "perpetuaters", "perpetuates",
- "perpitrators", "perpetrators",
- "perposefully", "purposefully",
- "perposterous", "preposterous",
- "perpretators", "perpetrators",
- "perpsectives", "perspectives",
- "perputrators", "perpetrators",
- "perputuating", "perpetuating",
- "persepctives", "perspectives",
- "perservation", "preservation",
- "perseverence", "perseverance",
- "personalites", "personalities",
- "personallity", "personally",
- "personilized", "personalized",
- "perspecitves", "perspectives",
- "perspectivas", "perspectives",
- "persumptuous", "presumptuous",
- "perticularly", "particularly",
- "pertubations", "perturbations",
- "pessimisitic", "pessimistic",
- "pessimisstic", "pessimistic",
- "phenomenonal", "phenomenal",
- "phenomenonly", "phenomenally",
- "phenomonenon", "phenomenon",
- "phialdelphia", "philadelphia",
- "philadalphia", "philadelphia",
- "philadelhpia", "philadelphia",
- "philadeplhia", "philadelphia",
- "philadlephia", "philadelphia",
- "philedalphia", "philadelphia",
- "philedelphia", "philadelphia",
- "philidalphia", "philadelphia",
- "philippinnes", "philippines",
- "philippinoes", "philippines",
- "philisophers", "philosophers",
- "philisophies", "philosophies",
- "phillippines", "philippines",
- "philosiphers", "philosophers",
- "philosiphies", "philosophies",
- "philosohpers", "philosopher",
- "philosohpies", "philosophies",
- "philosophiae", "philosophies",
- "philosophics", "philosophies",
- "philosophios", "philosophies",
- "philospohers", "philosophers",
- "philospohies", "philosophies",
- "photagrapher", "photographer",
- "photochopped", "photoshopped",
- "photograhper", "photographer",
- "photograpers", "photographers",
- "photographes", "photographs",
- "photographyi", "photographic",
- "photogropher", "photographer",
- "photogrpahed", "photographed",
- "photogrpaher", "photographer",
- "photoshipped", "photoshopped",
- "photoshooped", "photoshopped",
- "photoshoppad", "photoshopped",
- "phychedelics", "psychedelics",
- "phychiatrist", "psychiatrist",
- "phychologist", "psychologist",
- "phychopathic", "psychopathic",
- "physcedelics", "psychedelics",
- "physciatrist", "psychiatrist",
- "physcologist", "psychologist",
- "physcopathic", "psychopathic",
- "physicallity", "physically",
- "physiologial", "physiological",
- "pilgrimmages", "pilgrimages",
- "pitchforkers", "pitchforks",
- "pkaythroughs", "playthroughs",
- "plabeswalker", "planeswalker",
- "plaestinians", "palestinians",
- "planeswaller", "planeswalker",
- "planeswlaker", "planeswalker",
- "planetwalker", "planeswalker",
- "plansewalker", "planeswalker",
- "plauthroughs", "playthroughs",
- "playhtroughs", "playthroughs",
- "playtgroughs", "playthroughs",
- "playthorughs", "playthroughs",
- "playthourghs", "playthroughs",
- "playthrougth", "playthroughs",
- "playthrouhgs", "playthroughs",
- "playthtoughs", "playthroughs",
- "playtrhoughs", "playthroughs",
- "populationes", "populations",
- "pornograpghy", "pornography",
- "porportional", "proportional",
- "portabillity", "portability",
- "portagonists", "protagonists",
- "positionning", "positioning",
- "positivitely", "positivity",
- "possessivize", "possessive",
- "possibillity", "possibility",
- "possiblility", "possibility",
- "possiblities", "possibilities",
- "powerfisting", "powerlifting",
- "powerlfiting", "powerlifting",
- "powerlifitng", "powerlifting",
- "powerlisting", "powerlifting",
- "powetlifting", "powerlifting",
- "powrrlifting", "powerlifting",
- "practicioner", "practitioner",
- "practisioner", "practitioner",
- "pratictioner", "practitioners",
- "precedessors", "predecessors",
- "preconveived", "preconceived",
- "predacessors", "predecessors",
- "predeccesors", "predecessor",
- "predecesores", "predecessor",
- "predescesors", "predecessors",
- "predessecors", "predecessors",
- "predetermind", "predetermined",
- "predicessors", "predecessors",
- "predocessors", "predecessors",
- "predomiantly", "predominately",
- "predominanty", "predominantly",
- "predominatly", "predominantly",
- "preferantial", "preferential",
- "preferentail", "preferential",
- "preformances", "performances",
- "preinitalize", "preinitialize",
- "preliminarly", "preliminary",
- "prematurelly", "prematurely",
- "premillenial", "premillennial",
- "preocupation", "preoccupation",
- "preperations", "preparations",
- "prepetrators", "perpetrators",
- "prepetuating", "perpetuating",
- "prepostorous", "preposterous",
- "preposturous", "preposterous",
- "prerequisets", "prerequisite",
- "prescirption", "prescriptions",
- "prescribtion", "prescription",
- "prescripcion", "prescription",
- "prescriptons", "prescriptions",
- "prescritpion", "prescriptions",
- "presedential", "presidential",
- "presentacion", "presentation",
- "presentaiton", "presentations",
- "preservacion", "preservation",
- "preservating", "preservation",
- "preservativo", "preservation",
- "presidencial", "presidential",
- "presidenital", "presidential",
- "presidentail", "presidential",
- "presnetation", "presentations",
- "presonalized", "personalized",
- "prespectives", "perspectives",
- "presrciption", "prescriptions",
- "presumpteous", "presumptuous",
- "presumputous", "presumptuous",
- "prevantative", "preventative",
- "preventation", "presentation",
- "preventetive", "preventative",
- "preventitive", "preventative",
- "prezidential", "presidential",
- "principlaity", "principality",
- "probabiliste", "probabilities",
- "probabilites", "probabilities",
- "probabillity", "probability",
- "probablistic", "probabilistic",
- "proclomation", "proclamation",
- "proconceived", "preconceived",
- "profesisonal", "professionals",
- "professiinal", "professionalism",
- "professioanl", "professionals",
- "professiomal", "professionalism",
- "professionel", "professional",
- "professionsl", "professionalism",
- "professoinal", "professionals",
- "professonial", "professionals",
- "proffesional", "professional",
- "proficientcy", "proficiency",
- "profissional", "professional",
- "profitabiliy", "profitability",
- "profitabilty", "profitability",
- "profressions", "progressions",
- "progatonists", "protagonists",
- "programmeurs", "programmer",
- "progressieve", "progressive",
- "progressioin", "progressions",
- "progressiong", "progressing",
- "progressisme", "progresses",
- "progressiste", "progresses",
- "progressivas", "progressives",
- "progressivey", "progressively",
- "progressivly", "progressively",
- "progressivsm", "progressives",
- "progresssing", "progressing",
- "progresssion", "progressions",
- "progresssive", "progressives",
- "prohibitting", "prohibiting",
- "projecticles", "projectiles",
- "proletariaat", "proletariat",
- "proletariant", "proletariat",
- "proletaricat", "proletariat",
- "prominantely", "prominently",
- "promiscuious", "promiscuous",
- "promisculous", "promiscuous",
- "promotionnal", "promotional",
- "pronounceing", "pronouncing",
- "pronunciaton", "pronunciation",
- "propertional", "proportional",
- "propesterous", "preposterous",
- "proportianal", "proportional",
- "proportionel", "proportional",
- "proposterous", "preposterous",
- "proprotional", "proportional",
- "prostetution", "prostitution",
- "prostitition", "prostitution",
- "prostitucion", "prostitution",
- "prostituiton", "prostitution",
- "prostitutiei", "prostitute",
- "protaganists", "protagonists",
- "protaginists", "protagonists",
- "protagnoists", "protagonists",
- "protestantes", "protestants",
- "protoganists", "protagonists",
- "prouncements", "pronouncements",
- "pruposefully", "purposefully",
- "pscyhologist", "psychologist",
- "pscyhopathic", "psychopathic",
- "pshyciatrist", "psychiatrist",
- "pshycologist", "psychologist",
- "pshycopathic", "psychopathic",
- "psichologist", "psychologist",
- "psychaitrist", "psychiatrist",
- "psychedellic", "psychedelic",
- "psychedilics", "psychedelics",
- "psychemedics", "psychedelics",
- "psychiatirst", "psychiatrists",
- "psychiatrics", "psychiatrist",
- "psychiatrict", "psychiatrist",
- "psychiatrits", "psychiatrists",
- "psychistrist", "psychiatrist",
- "psychodelics", "psychedelics",
- "psycholigist", "psychologist",
- "psychologial", "psychological",
- "psychologits", "psychologists",
- "psychologyst", "psychologist",
- "psychopathes", "psychopaths",
- "psychyatrist", "psychiatrist",
- "puplications", "publications",
- "puritannical", "puritanical",
- "purpetrators", "perpetrators",
- "purpetuating", "perpetuating",
- "purpusefully", "purposefully",
- "pyschedelics", "psychedelics",
- "pyschiatrist", "psychiatrist",
- "pyschologist", "psychologist",
- "pyschopathic", "psychopathic",
- "qualificaton", "qualification",
- "qualifierais", "qualifiers",
- "qualtitative", "quantitative",
- "quantatitive", "quantitative",
- "quantititive", "quantitative",
- "quarterblack", "quarterback",
- "quesitonable", "questionable",
- "questionalbe", "questionable",
- "questionning", "questioning",
- "questionsign", "questioning",
- "radioactieve", "radioactive",
- "rationallity", "rationally",
- "reactionairy", "reactionary",
- "reactionnary", "reactionary",
- "realisticaly", "realistically",
- "realisticlly", "realistically",
- "reasonablely", "reasonably",
- "recallection", "recollection",
- "reccomending", "recommending",
- "reccommended", "recommended",
- "recepcionist", "receptionist",
- "receptionest", "receptionist",
- "recgonizable", "recognizable",
- "reciporcated", "reciprocate",
- "reciprociate", "reciprocate",
- "reciprocrate", "reciprocate",
- "recognizible", "recognizable",
- "recolleciton", "recollection",
- "recommanding", "recommending",
- "recommendeds", "recommends",
- "recommendors", "recommends",
- "recommeneded", "recommended",
- "recommenting", "recommending",
- "recongizable", "recognizable",
- "recontructed", "reconstructed",
- "recpetionist", "receptionist",
- "recreacional", "recreational",
- "recriational", "recreational",
- "referenceing", "referencing",
- "refirgerator", "refrigerator",
- "refriderator", "refrigerator",
- "refrigarator", "refrigerator",
- "refrigerador", "refrigerator",
- "refrigerater", "refrigerator",
- "refrigirator", "refrigerator",
- "regenaration", "regeneration",
- "regeneracion", "regeneration",
- "regestration", "registration",
- "registartion", "registration",
- "registrating", "registration",
- "regrigerator", "refrigerator",
- "regulatorias", "regulators",
- "regulatories", "regulators",
- "regulatorios", "regulators",
- "reicarnation", "reincarnation",
- "reinforcemnt", "reinforcement",
- "reinitalised", "reinitialised",
- "reinitalises", "reinitialises",
- "reinitalized", "reinitialized",
- "reinitalizes", "reinitializes",
- "reinstallled", "reinstalled",
- "reisntalling", "reinstalling",
- "relaitonship", "relationships",
- "relatinoship", "relationships",
- "reliabillity", "reliability",
- "reluctanctly", "reluctantly",
- "remarkablely", "remarkably",
- "rememberance", "remembrance",
- "reminiscient", "reminiscent",
- "renaissaince", "renaissance",
- "renegeration", "regeneration",
- "reorganision", "reorganisation",
- "repalcements", "replacements",
- "repersenting", "representing",
- "reporduction", "reproduction",
- "reporductive", "reproductive",
- "reprecussion", "repercussions",
- "representate", "representative",
- "represention", "representing",
- "representive", "representative",
- "reproducable", "reproducible",
- "reproduccion", "reproduction",
- "reproduciton", "reproduction",
- "reproducting", "reproduction",
- "reproductivo", "reproduction",
- "reproduktion", "reproduction",
- "repsectfully", "respectfully",
- "repsectively", "respectively",
- "republicanas", "republicans",
- "republicanos", "republicans",
- "republicants", "republicans",
- "republicians", "republicans",
- "requerimento", "requirement",
- "requeriments", "requirements",
- "requierments", "requirements",
- "requriements", "requirements",
- "resembelance", "resemblance",
- "reseptionist", "receptionist",
- "reserrection", "resurrection",
- "resintalling", "reinstalling",
- "resistancies", "resistances",
- "resistencias", "resistances",
- "respecitvely", "respectively",
- "respectabile", "respectable",
- "respectivily", "respectively",
- "respectivley", "respectively",
- "respectuflly", "respectfully",
- "respiratiory", "respiratory",
- "responsabile", "responsible",
- "responsaveis", "responsive",
- "responsbilty", "responsibly",
- "responsibile", "responsible",
- "responsibily", "responsibility",
- "responsibley", "responsibly",
- "responsibliy", "responsibly",
- "responsiblty", "responsibly",
- "ressemblance", "resemblance",
- "ressemblence", "resemblance",
- "ressurection", "resurrection",
- "restaurantes", "restaurants",
- "restauration", "restoration",
- "restauraunts", "restaurants",
- "restirctions", "restrictions",
- "restrainting", "restraining",
- "restrcitions", "restriction",
- "restricitons", "restrictions",
- "resurreccion", "resurrection",
- "resurrektion", "resurrection",
- "retalitation", "retaliation",
- "retributioon", "retribution",
- "retroactivly", "retroactively",
- "revolutionay", "revolutionary",
- "revolutionos", "revolutions",
- "rezurrection", "resurrection",
- "rictatorship", "dictatorship",
- "ridicilously", "ridiculously",
- "ridicoulusly", "ridiculously",
- "righteouness", "righteousness",
- "rockerfeller", "rockefeller",
- "rollercoaser", "rollercoaster",
- "rollercoater", "rollercoaster",
- "romanitcally", "romantically",
- "roundabounts", "roundabout",
- "rudimentatry", "rudimentary",
- "rysurrection", "resurrection",
- "sacksonville", "jacksonville",
- "sacreligious", "sacrilegious",
- "sacrificeing", "sacrificing",
- "saksatchewan", "saskatchewan",
- "salughtering", "slaughtering",
- "sanctionning", "sanctioning",
- "sarcasticaly", "sarcastically",
- "sarcasticlly", "sarcastically",
- "sascatchewan", "saskatchewan",
- "saskatcehwan", "saskatchewan",
- "saskatchawan", "saskatchewan",
- "saskatechwan", "saskatchewan",
- "sasketchawan", "saskatchewan",
- "sasketchewan", "saskatchewan",
- "sasktachewan", "saskatchewan",
- "satasfaction", "satisfaction",
- "satasfactory", "satisfactory",
- "satisfaccion", "satisfaction",
- "satisfacting", "satisfaction",
- "satisfcation", "satisfaction",
- "satisfiction", "satisfaction",
- "satistactory", "satisfactory",
- "satsifaction", "satisfaction",
- "satsifactory", "satisfactory",
- "scandanivian", "scandinavian",
- "scandenavian", "scandinavian",
- "scandianvian", "scandinavian",
- "scandinacian", "scandinavian",
- "scandinaivan", "scandinavia",
- "scandinavica", "scandinavian",
- "scandinavien", "scandinavian",
- "scandinavion", "scandinavian",
- "scandivanian", "scandinavian",
- "scandonavian", "scandinavian",
- "schizophrena", "schizophrenia",
- "scholarhsips", "scholarships",
- "scholerships", "scholarships",
- "scholorships", "scholarships",
- "scnadinavian", "scandinavian",
- "screenshoots", "screenshot",
- "sensationail", "sensational",
- "sensationnal", "sensational",
- "sensibilites", "sensibilities",
- "sensitivitiy", "sensitivity",
- "sentimentals", "sentiments",
- "sertificates", "certificates",
- "serveillance", "surveillance",
- "seskatchewan", "saskatchewan",
- "shakesperean", "shakespeare",
- "shamelessely", "shamelessly",
- "shamelessley", "shamelessly",
- "shampionship", "championship",
- "shardholders", "shareholders",
- "shenanigains", "shenanigans",
- "shenanigangs", "shenanigans",
- "shenaniganns", "shenanigans",
- "shenanighans", "shenanigans",
- "shopkeeepers", "shopkeepers",
- "showboarding", "snowboarding",
- "siginificant", "significant",
- "significanly", "significantly",
- "significante", "significance",
- "significanty", "significantly",
- "significatly", "significantly",
- "signleplayer", "singleplayer",
- "simaltaneous", "simultaneous",
- "simeltaneous", "simultaneous",
- "similaraties", "similarities",
- "similiarites", "similarities",
- "similiarties", "similarities",
- "similiraties", "similarities",
- "similtaneous", "simultaneous",
- "simliarities", "similarities",
- "simlutaneous", "simultaneous",
- "simpathizers", "sympathizers",
- "simplistisch", "simplistic",
- "simulatenous", "simultaneous",
- "simulatneous", "simultaneous",
- "simultaenous", "simultaneous",
- "simultaneuos", "simultaneous",
- "simultanious", "simultaneous",
- "simulteneous", "simultaneous",
- "singelplayer", "singleplayer",
- "singlepalyer", "singleplayer",
- "sinlgeplayer", "singleplayer",
- "situationals", "situations",
- "situationnal", "situational",
- "skandinavian", "scandinavian",
- "skateboaring", "skateboarding",
- "skrawberries", "strawberries",
- "slaugthering", "slaughtering",
- "sloughtering", "slaughtering",
- "sluaghtering", "slaughtering",
- "snowballling", "snowballing",
- "snowbaording", "snowboarding",
- "socialistisk", "socialists",
- "socialogical", "sociological",
- "socioeconimc", "socioeconomic",
- "socioeconmic", "socioeconomic",
- "socioligical", "sociological",
- "sociopolical", "sociological",
- "somethingest", "somethings",
- "sophisticaed", "sophisticated",
- "sophisticted", "sophisticated",
- "southamption", "southampton",
- "southernerns", "southerners",
- "sovereighnty", "sovereignty",
- "sovereignety", "sovereignty",
- "sovereignity", "sovereignty",
- "specialistes", "specialists",
- "specializare", "specialize",
- "specializate", "specialize",
- "specializeds", "specializes",
- "specializied", "specialize",
- "speciallized", "specialised",
- "specifcation", "specification",
- "spectacuarly", "spectacular",
- "spectaculair", "spectacular",
- "spectaculary", "spectacularly",
- "spectacullar", "spectacularly",
- "specualtions", "speculation",
- "spermatozoan", "spermatozoon",
- "spesifically", "specifically",
- "spirituallly", "spiritually",
- "spirtiuality", "spirituality",
- "spirutuality", "spirituality",
- "spontaneosly", "spontaneously",
- "spontaneouly", "spontaneously",
- "spreadhseets", "spreadsheets",
- "spreadsheats", "spreadsheets",
- "spreadsheeds", "spreadsheets",
- "spreadsheeet", "spreadsheets",
- "standartized", "standardized",
- "standerdized", "standardized",
- "stardardized", "standardized",
- "starightened", "straightened",
- "starwberries", "strawberries",
- "statisticaly", "statistically",
- "stereotpying", "stereotyping",
- "stereotypers", "stereotypes",
- "stereotypian", "stereotyping",
- "steriotyping", "stereotyping",
- "steroetyping", "stereotyping",
- "steryotyping", "stereotyping",
- "straigntened", "straightened",
- "straigthened", "straightened",
- "strategicaly", "strategically",
- "strategiclly", "strategically",
- "strawburries", "strawberries",
- "streemlining", "streamlining",
- "streightened", "straightened",
- "strenghening", "strengthening",
- "strenghtened", "strengthened",
- "strengtheing", "strengthening",
- "stroytelling", "storytelling",
- "subconcsious", "subconscious",
- "subconsicous", "subconscious",
- "subcouncious", "subconscious",
- "subcsription", "subscriptions",
- "subesquently", "subsequently",
- "subjectivety", "subjectively",
- "subjectivily", "subjectively",
- "subjectivley", "subjectively",
- "subjudgation", "subjugation",
- "subredditors", "subreddits",
- "subscirption", "subscriptions",
- "subsconcious", "subconscious",
- "subscribbers", "subscribers",
- "subscribbing", "subscribing",
- "subscribirse", "subscriber",
- "subscribtion", "subscription",
- "subscriptons", "subscriptions",
- "subscritpion", "subscriptions",
- "subscrpition", "subscriptions",
- "subsiquently", "subsequently",
- "subsrciption", "subscriptions",
- "subsricption", "subscriptions",
- "substantialy", "substantially",
- "substantitve", "substantive",
- "substitition", "substitution",
- "substituters", "substitutes",
- "substitutivo", "substitution",
- "substitutues", "substitutes",
- "substracting", "subtracting",
- "substraction", "subtraction",
- "subterranian", "subterranean",
- "succsessfull", "successful",
- "sunconscious", "subconscious",
- "supermarkeds", "supermarkets",
- "supermarkers", "supermarkets",
- "supermarkert", "supermarkets",
- "supermarkten", "supermarket",
- "supermarktes", "supermarkets",
- "supernarkets", "supermarkets",
- "supernatrual", "supernatural",
- "supersticion", "superstition",
- "superstision", "superstition",
- "superstitios", "superstitious",
- "superstitous", "superstitious",
- "supervisiors", "supervisors",
- "supervisoras", "supervisors",
- "supervisores", "supervisors",
- "supllemental", "supplemental",
- "supplamental", "supplemental",
- "supplamented", "supplemented",
- "supplimental", "supplemental",
- "suppresssion", "suppression",
- "supscription", "subscription",
- "supsiciously", "suspiciously",
- "surprizingly", "surprisingly",
- "surrenderred", "surrendered",
- "surrundering", "surrendering",
- "survaillance", "surveillance",
- "survaillence", "surveillance",
- "survallience", "surveillance",
- "surveillence", "surveillance",
- "survelliance", "surveillance",
- "surviellance", "surveillance",
- "survivabiity", "survivability",
- "survivabiliy", "survivability",
- "survivabilty", "survivability",
- "susceptiable", "susceptible",
- "susceptibile", "susceptible",
- "suspeciously", "suspiciously",
- "suspicioulsy", "suspiciously",
- "suspiciuosly", "suspiciously",
- "suspisiously", "suspiciously",
- "sustainabily", "sustainability",
- "symapthizers", "sympathizers",
- "symetrically", "symmetrically",
- "symmetricaly", "symmetrically",
- "sympathethic", "sympathetic",
- "sympathsizer", "sympathizers",
- "sympathyzers", "sympathizers",
- "sympethizers", "sympathizers",
- "symphatizers", "sympathizers",
- "sympithizers", "sympathizers",
- "syncronously", "synchronously",
- "sysmatically", "systematically",
- "systematisch", "systematic",
- "tablespooons", "tablespoon",
- "tacticallity", "tactically",
- "tangencially", "tangentially",
- "tangenitally", "tangentially",
- "tangientally", "tangentially",
- "teamfighters", "teamfights",
- "teansylvania", "transylvania",
- "techanically", "mechanically",
- "techincality", "technicality",
- "technologial", "technological",
- "telelevision", "television",
- "teleportaion", "teleportation",
- "teleportaton", "teleportation",
- "temepratures", "temperatures",
- "temparatures", "temperatures",
- "temperaturas", "temperatures",
- "temporarilly", "temporarily",
- "tempreatures", "temperatures",
- "tempuratures", "temperatures",
- "tengentially", "tangentially",
- "termendously", "tremendously",
- "territorrial", "territorial",
- "territorries", "territories",
- "testasterone", "testosterone",
- "testestorone", "testosterone",
- "thanskgiving", "thanksgiving",
- "theologicial", "theological",
- "theoreticaly", "theoretically",
- "thermomenter", "thermometer",
- "thermomether", "thermometer",
- "thumbnailers", "thumbnails",
- "thunderboldt", "thunderbolt",
- "tindergarten", "kindergarten",
- "torubleshoot", "troubleshoot",
- "totalitarion", "totalitarian",
- "totalitatian", "totalitarian",
- "touchscreeen", "touchscreen",
- "traditionaly", "traditionally",
- "traditionnal", "traditional",
- "tradtionally", "traditionally",
- "tramendously", "tremendously",
- "tramsformers", "transformers",
- "tramsforming", "transforming",
- "tranditional", "transitional",
- "tranistional", "transitional",
- "tranistioned", "transitioned",
- "tranlsations", "translations",
- "tranmsission", "transmissions",
- "transaltions", "translations",
- "transaprency", "transparency",
- "transational", "transitional",
- "transcations", "transactions",
- "transcendant", "transcendent",
- "transcripton", "transcription",
- "transcriptus", "transcripts",
- "transesxuals", "transsexuals",
- "transfarmers", "transformers",
- "transfarring", "transferring",
- "transferrred", "transferred",
- "transformare", "transformers",
- "transformase", "transforms",
- "transformees", "transforms",
- "transforners", "transformers",
- "transfromers", "transformers",
- "transfroming", "transforming",
- "transgenderd", "transgendered",
- "transgendred", "transgendered",
- "transgenered", "transgender",
- "transicional", "transitional",
- "transilvania", "transylvania",
- "transimssion", "transmissions",
- "transisioned", "transitioned",
- "translastion", "translations",
- "translateing", "translating",
- "translationg", "translating",
- "translucient", "translucent",
- "translyvania", "transylvania",
- "transmisions", "transmission",
- "transmisison", "transmission",
- "transmissons", "transmissions",
- "transmitirte", "transmitter",
- "transmittted", "transmitted",
- "transmorfers", "transformer",
- "transofrmers", "transformers",
- "transofrming", "transforming",
- "transparancy", "transparency",
- "transparenty", "transparency",
- "transparrent", "transparent",
- "transperancy", "transparency",
- "transperency", "transparency",
- "transplantes", "transplants",
- "transporteur", "transporter",
- "transportion", "transporting",
- "transpotting", "transporting",
- "transsmision", "transmissions",
- "transylmania", "transylvania",
- "transylvanai", "transylvania",
- "trasnferring", "transferring",
- "trasnformers", "transformers",
- "trasnforming", "transforming",
- "trasnmission", "transmissions",
- "trasnparency", "transparency",
- "trasnporting", "transporting",
- "trememdously", "tremendously",
- "tremendoulsy", "tremendously",
- "tremondously", "tremendously",
- "troubelshoot", "troubleshoot",
- "troublehsoot", "troubleshoot",
- "trumendously", "tremendously",
- "trustworthly", "trustworthy",
- "ubsubscribed", "unsubscribed",
- "udnerpowered", "underpowered",
- "umbelievable", "unbelievable",
- "umemployment", "unemployment",
- "unaccaptable", "unacceptable",
- "unacceptible", "unacceptable",
- "unaccpetable", "unacceptable",
- "unacompanied", "unaccompanied",
- "unappealling", "unappealing",
- "unattractice", "unattractive",
- "unautherized", "unauthorized",
- "unauthroized", "unauthorized",
- "unbeleivable", "unbelievable",
- "unbeleivably", "unbelievably",
- "unbeliavable", "unbelievable",
- "unbeliavably", "unbelievably",
- "unbeliebable", "unbelievable",
- "unbelieveble", "unbelievable",
- "unbelievibly", "unbelievably",
- "unbeliveable", "unbelievable",
- "unbeliveably", "unbelievably",
- "unbelizeable", "unbelievable",
- "unbolievable", "unbelievable",
- "uncertainity", "uncertainty",
- "uncertaintly", "uncertainty",
- "uncompatible", "incompatible",
- "unconditinal", "unconditional",
- "unconsciosly", "unconsciously",
- "unconsciouly", "unconsciously",
- "unconsistent", "inconsistent",
- "unconvenient", "inconvenient",
- "unconvential", "unconventional",
- "undecideable", "undecidable",
- "undefinitely", "indefinitely",
- "undeniablely", "undeniably",
- "undergradate", "undergraduate",
- "undergradute", "undergraduate",
- "underminding", "undermining",
- "undermineing", "undermining",
- "undermineras", "undermines",
- "undermineres", "undermines",
- "underminging", "undermining",
- "underminning", "undermining",
- "undertakeing", "undertaking",
- "underwhelimg", "underwhelming",
- "underwheling", "underwhelming",
- "undesireable", "undesirable",
- "undoubtedbly", "undoubtedly",
- "unemployemnt", "unemployment",
- "unemplyoment", "unemployment",
- "unempolyment", "unemployment",
- "unenployment", "unemployment",
- "unequalities", "inequalities",
- "unexpectadly", "unexpectedly",
- "unexpectetly", "unexpectedly",
- "unexpectidly", "unexpectedly",
- "unexperience", "inexperience",
- "unexpextedly", "unexpectedly",
- "unexplicably", "inexplicably",
- "unforgetable", "unforgettable",
- "unforgiveble", "unforgivable",
- "unforgivible", "unforgivable",
- "unfortunatly", "unfortunately",
- "unfortunetly", "unfortunately",
- "unilatreally", "unilaterally",
- "uniliterally", "unilaterally",
- "unimpresssed", "unimpressed",
- "uninitalised", "uninitialised",
- "uninitalized", "uninitialized",
- "uninstallimg", "uninstalling",
- "uninstallled", "uninstalled",
- "unintentinal", "unintentional",
- "uninteresing", "uninteresting",
- "uninterneted", "uninterested",
- "uninterruped", "uninterrupted",
- "uninterupted", "uninterrupted",
- "unisntalling", "uninstalling",
- "unitesstates", "unitedstates",
- "univerisites", "universities",
- "univeristies", "universities",
- "universitets", "universities",
- "unliaterally", "unilaterally",
- "unneccessary", "unnecessary",
- "unnecesarily", "unnecessarily",
- "unnecessairy", "unnecessarily",
- "unnecessarly", "unnecessarily",
- "unnistalling", "uninstalling",
- "unpredictabe", "unpredictable",
- "unpreductive", "unproductive",
- "unproduktive", "unproductive",
- "unrealisitic", "unrealistic",
- "unreaponsive", "unresponsive",
- "unreasonalby", "unreasonably",
- "unrepsonsive", "unresponsive",
- "unresponcive", "unresponsive",
- "unresponisve", "unresponsive",
- "unresponsibe", "unresponsive",
- "unrestircted", "unrestricted",
- "unrestrcited", "unrestricted",
- "unristricted", "unrestricted",
- "unseccessful", "unsuccessful",
- "unsespecting", "unsuspecting",
- "unsibscribed", "unsubscribed",
- "unsoliciated", "unsolicited",
- "unsolicitied", "unsolicited",
- "unsubscirbed", "unsubscribed",
- "unsubscrible", "unsubscribed",
- "unsubscrided", "unsubscribed",
- "unsubscriped", "unsubscribed",
- "unsubscrubed", "unsubscribed",
- "unsubsrcibed", "unsubscribed",
- "unsucessfull", "unsuccessful",
- "unsunscribed", "unsubscribed",
- "unsurprizing", "unsurprising",
- "unsusbcribed", "unsubscribed",
- "unsustainble", "unsustainable",
- "unvelievable", "unbelievable",
- "unvelievably", "unbelievably",
- "unviersities", "universities",
- "unvulnerable", "invulnerable",
- "varification", "verification",
- "vegetarianas", "vegetarians",
- "vegetarianos", "vegetarians",
- "verficiation", "verification",
- "verificacion", "verification",
- "verificaiton", "verification",
- "verifikation", "verification",
- "vernaculaire", "vernacular",
- "versatillity", "versatility",
- "verticallity", "vertically",
- "videogamemes", "videogames",
- "visualizaton", "visualization",
- "vocabularily", "vocabulary",
- "vocabularity", "vocabulary",
- "volonteering", "volunteering",
- "volounteered", "volunteered",
- "voluntarilly", "voluntarily",
- "volunterring", "volunteering",
- "vulnerabilty", "vulnerability",
- "weightlifing", "weightlifting",
- "withdrawalls", "withdrawals",
- "withdrawling", "withdrawing",
- "withdrawning", "withdrawing",
- "wonderfullly", "wonderfully",
- "worshippping", "worshipping",
- "xenophobical", "xenophobia",
- "abandenment", "abandonment",
- "abandomnent", "abandonment",
- "abandonding", "abandoning",
- "abandonnent", "abandonment",
- "abandonning", "abandoning",
- "abbreviatin", "abbreviation",
- "abbreviaton", "abbreviation",
- "abdominable", "abdominal",
- "abomanation", "abomination",
- "abominacion", "abomination",
- "abomonation", "abomination",
- "abonimation", "abomination",
- "aboriginial", "aboriginal",
- "aborigional", "aboriginal",
- "abreviation", "abbreviation",
- "abritrarily", "arbitrarily",
- "abritration", "arbitration",
- "absolutelly", "absolutely",
- "absolutelys", "absolutes",
- "absolutisme", "absolutes",
- "absolutiste", "absolutes",
- "abstraccion", "abstraction",
- "abstraktion", "abstraction",
- "abstruction", "abstraction",
- "abundancies", "abundances",
- "academicaly", "academically",
- "academicese", "academics",
- "accelarated", "accelerated",
- "accelarator", "accelerator",
- "accelerater", "accelerator",
- "acceleratie", "accelerate",
- "acceleratio", "accelerator",
- "acceleraton", "acceleration",
- "accelorated", "accelerated",
- "accelorator", "accelerator",
- "acceptabelt", "acceptable",
- "accesseries", "accessories",
- "accessibile", "accessible",
- "accessibily", "accessibility",
- "accessoires", "accessories",
- "accidantely", "accidently",
- "accidentaly", "accidentally",
- "accidentely", "accidently",
- "accidential", "accidental",
- "accidentily", "accidently",
- "accidentlay", "accidently",
- "accidentley", "accidently",
- "accidentlly", "accidently",
- "accomadated", "accommodated",
- "accomadates", "accommodates",
- "accommadate", "accommodate",
- "accommidate", "accommodate",
- "accomodated", "accommodated",
- "accomodates", "accommodates",
- "accomondate", "accommodate",
- "accompained", "accompanied",
- "accompanyed", "accompanied",
- "accompianed", "accompanied",
- "accompinied", "accompanied",
- "accomplises", "accomplishes",
- "accomplishs", "accomplishes",
- "accomponied", "accompanied",
- "accountatns", "accountants",
- "accountents", "accountants",
- "accquainted", "acquainted",
- "accrediated", "accredited",
- "accreditied", "accredited",
- "accreditted", "accredited",
- "acculumated", "accumulated",
- "accumalated", "accumulated",
- "accumelated", "accumulated",
- "accumilated", "accumulated",
- "accumulatin", "accumulation",
- "accumulaton", "accumulation",
- "accuratelly", "accurately",
- "accustommed", "accustomed",
- "acheivement", "achievement",
- "acheivments", "achievements",
- "achievemint", "achievement",
- "achievemnts", "achievements",
- "achievments", "achievements",
- "achivements", "achievements",
- "acknolwedge", "acknowledge",
- "acknoweldge", "acknowledge",
- "acknowleded", "acknowledged",
- "acknowlegde", "acknowledge",
- "acknowleged", "acknowledge",
- "acknowleges", "acknowledges",
- "acknwoledge", "acknowledges",
- "acomplished", "accomplished",
- "acopalyptic", "apocalyptic",
- "acquaintace", "acquaintance",
- "acquisation", "acquisition",
- "activateing", "activating",
- "activationg", "activating",
- "activistion", "activision",
- "additinally", "additionally",
- "additionaly", "additionally",
- "additonally", "additionally",
- "adequatedly", "adequately",
- "adjectiveus", "adjectives",
- "administerd", "administered",
- "administrar", "administrator",
- "administren", "administer",
- "administrer", "administer",
- "administres", "administer",
- "administrez", "administer",
- "adminstered", "administered",
- "adminstrate", "administrate",
- "admittadely", "admittedly",
- "adolencence", "adolescence",
- "adolescance", "adolescence",
- "adolescense", "adolescence",
- "advantadges", "advantages",
- "advantageos", "advantageous",
- "advantageus", "advantageous",
- "advantagous", "advantageous",
- "adventerous", "adventures",
- "adventourus", "adventurous",
- "adversiting", "advertising",
- "advertisors", "advertisers",
- "advertisted", "advertised",
- "aesthethics", "aesthetics",
- "afficionado", "aficionado",
- "affiliction", "affiliation",
- "affirmitave", "affirmative",
- "affirmitive", "affirmative",
- "affixiation", "affiliation",
- "affrimative", "affirmative",
- "afgahnistan", "afghanistan",
- "afganhistan", "afghanistan",
- "afghanastan", "afghanistan",
- "afghansitan", "afghanistan",
- "afhganistan", "afghanistan",
- "afternarket", "aftermarket",
- "afterthougt", "afterthought",
- "aggaravates", "aggravates",
- "aggragating", "aggravating",
- "aggregatore", "aggregate",
- "aggressivly", "aggressively",
- "aggresssion", "aggression",
- "aggrovating", "aggravating",
- "agnostacism", "agnosticism",
- "agnostisicm", "agnosticism",
- "agnostisism", "agnosticism",
- "agnostocism", "agnosticism",
- "agnsoticism", "agnosticism",
- "agonsticism", "agnosticism",
- "agressively", "aggressively",
- "agressivley", "agressive",
- "agressivnes", "agressive",
- "agricolture", "agriculture",
- "agriculteur", "agriculture",
- "agricultral", "agricultural",
- "agricultual", "agricultural",
- "agricutlure", "agriculture",
- "ahtleticism", "athleticism",
- "alcoholicas", "alcoholics",
- "alcoholicos", "alcoholics",
- "alcoholisim", "alcoholism",
- "algorithems", "algorithm",
- "algorithims", "algorithm",
- "algorithmes", "algorithms",
- "algorithmns", "algorithms",
- "algorithmus", "algorithms",
- "algorithyms", "algorithm",
- "algorythims", "algorithms",
- "alientating", "alienating",
- "alleigances", "allegiance",
- "alltogether", "altogether",
- "alterantive", "alternative",
- "alternatley", "alternately",
- "alternitive", "alternative",
- "altheticism", "athleticism",
- "altnerately", "alternately",
- "altruisitic", "altruistic",
- "altruistric", "altruistic",
- "amalgomated", "amalgamated",
- "ambulancier", "ambulance",
- "amerliorate", "ameliorate",
- "ammendments", "amendments",
- "ampehtamine", "amphetamine",
- "ampethamine", "amphetamine",
- "amphetamies", "amphetamines",
- "amphetamins", "amphetamines",
- "amphetemine", "amphetamine",
- "amphetimine", "amphetamine",
- "amphetmaine", "amphetamines",
- "analyticals", "analytics",
- "anarchistes", "anarchists",
- "ancedotally", "anecdotally",
- "androgenous", "androgynous",
- "anecdatally", "anecdotally",
- "anecdotelly", "anecdotally",
- "anecodtally", "anecdotally",
- "anectodally", "anecdotally",
- "anectotally", "anecdotally",
- "anedoctally", "anecdotally",
- "angosticism", "agnosticism",
- "anihilation", "annihilation",
- "anitbiotics", "antibiotics",
- "annihalated", "annihilated",
- "annihilaton", "annihilation",
- "annihilited", "annihilated",
- "annihliated", "annihilated",
- "annilihated", "annihilated",
- "anniversery", "anniversary",
- "annonymouse", "anonymous",
- "announceing", "announcing",
- "announcemet", "announcements",
- "announcemnt", "announcement",
- "announcents", "announces",
- "annoymously", "anonymously",
- "anonamously", "anonymously",
- "anonimously", "anonymously",
- "anonmyously", "anonymously",
- "anonomously", "anonymously",
- "anonymousny", "anonymously",
- "anouncement", "announcement",
- "antagonisic", "antagonistic",
- "antagonistc", "antagonistic",
- "antagonstic", "antagonist",
- "anthropolgy", "anthropology",
- "anthropoloy", "anthropology",
- "antibiodics", "antibiotics",
- "antibioitcs", "antibiotic",
- "antibioitic", "antibiotic",
- "antibitoics", "antibiotics",
- "antiboitics", "antibiotics",
- "anticapated", "anticipated",
- "anticiapted", "anticipated",
- "anticipatin", "anticipation",
- "antiobitics", "antibiotic",
- "antiquaited", "antiquated",
- "antisipated", "anticipated",
- "apacolyptic", "apocalyptic",
- "apocaliptic", "apocalyptic",
- "apocalpytic", "apocalyptic",
- "apocalytpic", "apocalyptic",
- "apolagizing", "apologizing",
- "apolegetics", "apologetics",
- "apologistas", "apologists",
- "apologistes", "apologists",
- "apostrophie", "apostrophe",
- "apparantely", "apparently",
- "appareances", "appearances",
- "apparentely", "apparently",
- "appartments", "apartments",
- "appeareance", "appearance",
- "appearences", "appearances",
- "apperciated", "appreciated",
- "apperciates", "appreciates",
- "appereances", "appearances",
- "applicabile", "applicable",
- "applicaiton", "application",
- "applicatins", "applicants",
- "applicatons", "applications",
- "appoitnment", "appointments",
- "apporaching", "approaching",
- "apporpriate", "appropriate",
- "apporximate", "approximate",
- "appraoching", "approaching",
- "apprearance", "appearance",
- "apprecaited", "appreciated",
- "apprecaites", "appreciates",
- "appreciaite", "appreciative",
- "appreciatie", "appreciative",
- "appreciatin", "appreciation",
- "appreciaton", "appreciation",
- "appreciatve", "appreciative",
- "appreicated", "appreciated",
- "appreicates", "appreciates",
- "apprentince", "apprentice",
- "appriciated", "appreciated",
- "appriciates", "appreciates",
- "apprieciate", "appreciate",
- "appropirate", "appropriate",
- "appropraite", "appropriate",
- "appropriato", "appropriation",
- "approxamate", "approximate",
- "approxiamte", "approximate",
- "approxmiate", "approximate",
- "aprehensive", "apprehensive",
- "apsirations", "aspirations",
- "aqcuisition", "acquisition",
- "aquaintance", "acquaintance",
- "aquiantance", "acquaintance",
- "arbitrairly", "arbitrarily",
- "arbitralily", "arbitrarily",
- "arbitrarely", "arbitrarily",
- "arbitrarion", "arbitration",
- "arbitratily", "arbitrarily",
- "arbritarily", "arbitrarily",
- "arbritation", "arbitration",
- "arcaheology", "archaeology",
- "archaoelogy", "archeology",
- "archeaology", "archaeology",
- "archimedian", "archimedean",
- "architechts", "architect",
- "architectes", "architects",
- "architecure", "architecture",
- "argiculture", "agriculture",
- "argumentate", "argumentative",
- "aribtrarily", "arbitrarily",
- "aribtration", "arbitration",
- "arithmentic", "arithmetic",
- "arithmethic", "arithmetic",
- "arithmetric", "arithmetic",
- "armagedddon", "armageddon",
- "armageddeon", "armageddon",
- "arrangments", "arrangements",
- "arrengement", "arrangement",
- "articluated", "articulated",
- "articualted", "articulated",
- "artifically", "artificially",
- "artificialy", "artificially",
- "aspergerers", "aspergers",
- "asphyxation", "asphyxiation",
- "aspriations", "aspirations",
- "assasinated", "assassinated",
- "assasinates", "assassinates",
- "assassiante", "assassinate",
- "assassinare", "assassinate",
- "assassinatd", "assassinated",
- "assassinato", "assassination",
- "assassinats", "assassins",
- "assassinted", "assassinated",
- "assembleing", "assembling",
- "assemblying", "assembling",
- "assertation", "assertion",
- "assignemnts", "assignments",
- "assimialted", "assimilate",
- "assimilatie", "assimilate",
- "assimilerat", "assimilate",
- "assimiliate", "assimilate",
- "assimliated", "assimilate",
- "assingments", "assignments",
- "assistantes", "assistants",
- "assocaition", "associations",
- "associaiton", "associations",
- "associaties", "associates",
- "associatons", "associations",
- "assoication", "association",
- "assosiating", "associating",
- "assosiation", "association",
- "assoziation", "association",
- "assumptious", "assumptions",
- "astonashing", "astonishing",
- "astonoshing", "astonishing",
- "astronaught", "astronaut",
- "astronaunts", "astronaut",
- "astronautas", "astronauts",
- "astronautes", "astronauts",
- "asychronous", "asynchronous",
- "asyncronous", "asynchronous",
- "atatchments", "attachments",
- "atheistisch", "atheistic",
- "athelticism", "athleticism",
- "athletecism", "athleticism",
- "athleticsim", "athleticism",
- "athletisicm", "athleticism",
- "athletisism", "athleticism",
- "atmopsheric", "atmospheric",
- "atmoshperic", "atmospheric",
- "atmosoheric", "atmospheric",
- "atomspheric", "atmospheric",
- "atrocitites", "atrocities",
- "attachemnts", "attachments",
- "attackerasu", "attackers",
- "attackerats", "attackers",
- "attactments", "attachments",
- "attributred", "attributed",
- "attributted", "attribute",
- "attrocities", "atrocities",
- "audiobookas", "audiobooks",
- "audioboooks", "audiobook",
- "auotcorrect", "autocorrect",
- "austrailans", "australians",
- "austrailian", "australian",
- "australiaan", "australians",
- "australiams", "australians",
- "australiens", "australians",
- "australlian", "australian",
- "authenticiy", "authenticity",
- "authenticor", "authenticator",
- "authenticty", "authenticity",
- "authorative", "authoritative",
- "authoritate", "authoritative",
- "authoroties", "authorities",
- "autoatttack", "autoattack",
- "autocoreect", "autocorrect",
- "autocorrekt", "autocorrect",
- "autocorrent", "autocorrect",
- "autocorrext", "autocorrect",
- "autoctonous", "autochthonous",
- "autokorrect", "autocorrect",
- "automaticly", "automatically",
- "automatonic", "automation",
- "automoblies", "automobile",
- "auxillaries", "auxiliaries",
- "availabiliy", "availability",
- "availabilty", "availability",
- "availablity", "availability",
- "awesoneness", "awesomeness",
- "babysittter", "babysitter",
- "backbacking", "backpacking",
- "backgorunds", "backgrounds",
- "backhacking", "backpacking",
- "backjacking", "backpacking",
- "backtacking", "backpacking",
- "bangaldeshi", "bangladesh",
- "bangladesch", "bangladesh",
- "barceloneta", "barcelona",
- "bargainning", "bargaining",
- "battelfield", "battlefield",
- "battelfront", "battlefront",
- "battelships", "battleship",
- "battlefeild", "battlefield",
- "battlefiend", "battlefield",
- "battlefiled", "battlefield",
- "battlefornt", "battlefront",
- "battlehsips", "battleship",
- "beastiality", "bestiality",
- "beaurocracy", "bureaucracy",
- "beautyfully", "beautifully",
- "behaviorial", "behavioral",
- "belittleing", "belittling",
- "belittlling", "belittling",
- "belligerant", "belligerent",
- "belligirent", "belligerent",
- "bellweather", "bellwether",
- "benefitical", "beneficial",
- "bestiallity", "bestiality",
- "beuatifully", "beautifully",
- "beuraucracy", "bureaucracy",
- "beuraucrats", "bureaucrats",
- "billegerent", "belligerent",
- "billionairs", "billionaires",
- "billionarie", "billionaire",
- "billioniare", "billionaire",
- "biologicaly", "biologically",
- "birthdayers", "birthdays",
- "birthdaymas", "birthdays",
- "bittersweat", "bittersweet",
- "bitterwseet", "bittersweet",
- "blackberrry", "blackberry",
- "blacksmitch", "blacksmith",
- "bloodboorne", "bloodborne",
- "bluebarries", "blueberries",
- "blueburries", "blueberries",
- "blueprients", "blueprints",
- "bodybuildig", "bodybuilding",
- "bodybuildng", "bodybuilding",
- "bodybuiling", "bodybuilding",
- "bombardeada", "bombarded",
- "bombardeado", "bombarded",
- "bombarderad", "bombarded",
- "bordelrands", "borderlands",
- "bordlerands", "borderlands",
- "bortherhood", "brotherhood",
- "bourgeousie", "bourgeois",
- "boycottting", "boycotting",
- "bracelettes", "bracelets",
- "brainwahsed", "brainwashed",
- "brainwasing", "brainwashing",
- "braziliians", "brazilians",
- "breakthough", "breakthrough",
- "breakthrouh", "breakthrough",
- "breathtakng", "breathtaking",
- "brianwashed", "brainwashed",
- "brillaintly", "brilliantly",
- "broadcasing", "broadcasting",
- "broadcastes", "broadcasts",
- "broderlands", "borderlands",
- "brotherwood", "brotherhood",
- "buddhistisk", "buddhists",
- "buearucrats", "bureaucrats",
- "bueraucracy", "bureaucracy",
- "bueraucrats", "bureaucrats",
- "buisnessman", "businessman",
- "buisnessmen", "businessmen",
- "bullerproof", "bulletproof",
- "bulletbroof", "bulletproof",
- "bulletproff", "bulletproof",
- "bulletprrof", "bulletproof",
- "bullitproof", "bulletproof",
- "bureacuracy", "bureaucracy",
- "bureaocracy", "bureaucracy",
- "bureaocrats", "bureaucrats",
- "bureaucraps", "bureaucrats",
- "bureaucrash", "bureaucrats",
- "bureaucrasy", "bureaucrats",
- "bureaucrazy", "bureaucracy",
- "bureuacracy", "bureaucracy",
- "bureuacrats", "bureaucrats",
- "burueacrats", "bureaucrats",
- "businessnes", "businessmen",
- "busniessmen", "businessmen",
- "butterfiles", "butterflies",
- "butterfleye", "butterfly",
- "butterflyes", "butterflies",
- "butterfries", "butterflies",
- "butterlfies", "butterflies",
- "caclulating", "calculating",
- "caclulation", "calculation",
- "caclulators", "calculators",
- "cailbration", "calibration",
- "calbiration", "calibration",
- "calcualting", "calculating",
- "calcualtion", "calculations",
- "calcualtors", "calculators",
- "calculaters", "calculators",
- "calculatios", "calculators",
- "calculatons", "calculations",
- "calibartion", "calibration",
- "calibraiton", "calibration",
- "califorinan", "californian",
- "californain", "californian",
- "californica", "california",
- "californien", "californian",
- "californiia", "californian",
- "californina", "californian",
- "californnia", "californian",
- "califronian", "californian",
- "caluclating", "calculating",
- "caluclation", "calculation",
- "caluclators", "calculators",
- "caluculated", "calculated",
- "caluiflower", "cauliflower",
- "camouflague", "camouflage",
- "camouflauge", "camouflage",
- "campagining", "campaigning",
- "campainging", "campaigning",
- "canadianese", "canadians",
- "cannabilism", "cannibalism",
- "cannabolism", "cannibalism",
- "canniablism", "cannibalism",
- "cannibalizm", "cannibalism",
- "cannibaljim", "cannibalism",
- "cannibalsim", "cannibalism",
- "cannibilism", "cannibalism",
- "cannobalism", "cannibalism",
- "cannotation", "connotation",
- "capabilites", "capabilities",
- "capabilitiy", "capability",
- "capabillity", "capability",
- "capacitaron", "capacitor",
- "capacitores", "capacitors",
- "capatilists", "capitalists",
- "capatilized", "capitalized",
- "caperbility", "capability",
- "capitalisim", "capitalism",
- "capitilists", "capitalists",
- "capitilized", "capitalized",
- "capitolists", "capitalists",
- "capitolized", "capitalized",
- "captialists", "capitalists",
- "captialized", "capitalized",
- "cariactures", "caricature",
- "carniverous", "carnivorous",
- "castatrophe", "catastrophe",
- "catagorized", "categorized",
- "catapillars", "caterpillars",
- "catapillers", "caterpillars",
- "catasthrope", "catastrophe",
- "catastraphe", "catastrophe",
- "catastrohpe", "catastrophe",
- "catastropic", "catastrophic",
- "categroized", "categorized",
- "catepillars", "caterpillars",
- "catergorize", "categorize",
- "caterogized", "categorized",
- "caterpilars", "caterpillars",
- "caterpiller", "caterpillar",
- "catholacism", "catholicism",
- "catholicsim", "catholicism",
- "catholisicm", "catholicism",
- "catholisism", "catholicism",
- "catholizism", "catholicism",
- "catholocism", "catholicism",
- "catogerized", "categorized",
- "catterpilar", "caterpillar",
- "cauilflower", "cauliflower",
- "caulfilower", "cauliflower",
- "celebartion", "celebrations",
- "celebirties", "celebrities",
- "celebracion", "celebration",
- "celebrasion", "celebrations",
- "celebratons", "celebrations",
- "centipeddle", "centipede",
- "cerimonious", "ceremonious",
- "certaintity", "certainty",
- "certificaat", "certificate",
- "certificare", "certificate",
- "certificato", "certification",
- "certificats", "certificates",
- "challanging", "challenging",
- "challeneged", "challenged",
- "challeneger", "challenger",
- "challeneges", "challenges",
- "chameleooon", "chameleon",
- "championshp", "championship",
- "championsip", "championship",
- "chancellour", "chancellor",
- "charachters", "characters",
- "charasmatic", "charismatic",
- "charimastic", "charismatic",
- "charsimatic", "charismatic",
- "cheerleadra", "cheerleader",
- "cheerleards", "cheerleaders",
- "cheerleeder", "cheerleader",
- "cheesebuger", "cheeseburger",
- "cheeseburgs", "cheeseburgers",
- "chihuahuita", "chihuahua",
- "childrenmrs", "childrens",
- "chloesterol", "cholesterol",
- "cholesteral", "cholesterol",
- "cholestoral", "cholesterol",
- "cholestorol", "cholesterol",
- "cholosterol", "cholesterol",
- "chormosomes", "chromosomes",
- "christianty", "christianity",
- "chromasomes", "chromosomes",
- "chromesomes", "chromosomes",
- "chromisomes", "chromosomes",
- "chromosones", "chromosomes",
- "chromossome", "chromosomes",
- "chromozomes", "chromosomes",
- "chronicales", "chronicles",
- "chronichles", "chronicles",
- "cicrulating", "circulating",
- "cincinnasti", "cincinnati",
- "cincinnatti", "cincinnati",
- "cincinnnati", "cincinnati",
- "circimcised", "circumcised",
- "circluating", "circulating",
- "circualtion", "circulation",
- "circulacion", "circulation",
- "circumcison", "circumcision",
- "circumsiced", "circumcised",
- "circumsised", "circumcised",
- "circumstace", "circumstance",
- "circumvrent", "circumvent",
- "circuncised", "circumcised",
- "cirticising", "criticising",
- "ciruclating", "circulating",
- "ciruclation", "circulation",
- "citicenship", "citizenship",
- "citisenship", "citizenship",
- "citizinship", "citizenship",
- "civilizatin", "civilizations",
- "civilizaton", "civilization",
- "claculators", "calculators",
- "classifides", "classified",
- "cleanilness", "cleanliness",
- "cleanleness", "cleanliness",
- "cleanlyness", "cleanliness",
- "cleansiness", "cleanliness",
- "cliffbanger", "cliffhanger",
- "cliffhander", "cliffhanger",
- "cliffhangar", "cliffhanger",
- "clifthanger", "cliffhanger",
- "cockaroches", "cockroaches",
- "cockraoches", "cockroaches",
- "cockroackes", "cockroaches",
- "cocktailers", "cocktails",
- "coefficeint", "coefficient",
- "coefficiant", "coefficient",
- "coincedince", "coincidence",
- "coincidance", "coincidence",
- "coincidense", "coincidence",
- "coincidente", "coincidence",
- "coincidince", "coincidence",
- "coinsidence", "coincidence",
- "collabarate", "collaborate",
- "collaberate", "collaborate",
- "collaborant", "collaborate",
- "collaborare", "collaborate",
- "collaborato", "collaboration",
- "collapseing", "collapsing",
- "collaterial", "collateral",
- "collectieve", "collective",
- "collectivly", "collectively",
- "collectivos", "collections",
- "collobarate", "collaborate",
- "colloborate", "collaborate",
- "colonializm", "colonialism",
- "colonialsim", "colonialism",
- "colonianism", "colonialism",
- "colonizaton", "colonization",
- "comaprisons", "comparisons",
- "combiantion", "combinations",
- "combinacion", "combination",
- "combinaison", "combinations",
- "combinaiton", "combinations",
- "combinatino", "combinations",
- "combinatins", "combinations",
- "combinatios", "combinations",
- "combinining", "combining",
- "combonation", "combination",
- "comediantes", "comedians",
- "comeptition", "competition",
- "comeptitive", "competitive",
- "comeptitors", "competitors",
- "comfertable", "comfortable",
- "comfertably", "comfortably",
- "comfortabel", "comfortably",
- "comfortabil", "comfortably",
- "comfrotable", "comfortable",
- "comftorable", "comfortable",
- "comftorably", "comfortably",
- "comisioning", "commissioning",
- "comissioned", "commissioned",
- "comissioner", "commissioner",
- "commandered", "commanded",
- "commandmant", "commandment",
- "commantator", "commentator",
- "commendment", "commandment",
- "commentarea", "commenter",
- "commentaren", "commenter",
- "commentater", "commentator",
- "commenteers", "commenter",
- "commentries", "commenters",
- "commercialy", "commercially",
- "commericals", "commercials",
- "commericial", "commercial",
- "comminicate", "communicate",
- "comminucate", "communicate",
- "commisioned", "commissioned",
- "commisioner", "commissioner",
- "commisssion", "commissions",
- "committment", "commitment",
- "commodoties", "commodities",
- "commomplace", "commonplace",
- "commonspace", "commonplace",
- "commonweath", "commonwealth",
- "commonwelth", "commonwealth",
- "commuincate", "communicated",
- "communciate", "communicate",
- "communicted", "communicated",
- "communistas", "communists",
- "communistes", "communists",
- "compability", "compatibility",
- "compalation", "compilation",
- "compansated", "compensated",
- "comparabile", "comparable",
- "comparasion", "comparison",
- "comparasons", "comparisons",
- "comparement", "compartment",
- "comparetive", "comparative",
- "comparision", "comparison",
- "comparisson", "comparisons",
- "comparitave", "comparative",
- "comparitive", "comparative",
- "comparsions", "comparisons",
- "compassione", "compassionate",
- "compasssion", "compassion",
- "compatabile", "compatible",
- "compatative", "comparative",
- "compatiable", "compatible",
- "compatibile", "compatible",
- "compatibily", "compatibility",
- "compeditive", "competitive",
- "compeditors", "competitors",
- "compeitions", "competitions",
- "compeittion", "competitions",
- "compelation", "compilation",
- "compensante", "compensate",
- "compensatie", "compensate",
- "compensatin", "compensation",
- "compenstate", "compensate",
- "comperative", "comparative",
- "compesition", "composition",
- "competation", "computation",
- "competative", "competitive",
- "competators", "competitors",
- "competetion", "competition",
- "competetors", "competitors",
- "competiters", "competitors",
- "competiting", "competition",
- "competitior", "competitor",
- "competitivo", "competition",
- "competitoin", "competitions",
- "competitons", "competitors",
- "competution", "computation",
- "compilacion", "compilation",
- "compilcated", "complicate",
- "compination", "compilation",
- "compinsated", "compensated",
- "compitation", "computation",
- "compitetion", "competitions",
- "complacient", "complacent",
- "complciated", "complicate",
- "compleation", "compilation",
- "complecated", "complicated",
- "completaste", "completes",
- "completeing", "completing",
- "completeion", "completion",
- "completelly", "completely",
- "completelyl", "completely",
- "completelys", "completes",
- "completenes", "completes",
- "complexitiy", "complexity",
- "compliacted", "complicate",
- "compliation", "compilation",
- "complicarte", "complicate",
- "complicatie", "complicit",
- "complicatii", "complicit",
- "complicatin", "complicit",
- "complictaed", "complicate",
- "complimente", "complement",
- "complimenty", "complimentary",
- "complusions", "compulsion",
- "compolation", "compilation",
- "componenets", "components",
- "componentes", "components",
- "composicion", "composition",
- "composiiton", "compositions",
- "composision", "compositions",
- "compositied", "composite",
- "composities", "composite",
- "compositoin", "compositions",
- "compositons", "compositions",
- "compositore", "composite",
- "compostiion", "compositions",
- "compotition", "composition",
- "compramised", "compromised",
- "compramises", "compromises",
- "compremised", "compromised",
- "compremises", "compromises",
- "comprension", "compression",
- "compresores", "compressor",
- "compresssed", "compressed",
- "compresssor", "compressor",
- "comprimised", "compromised",
- "comprimises", "compromises",
- "compromessi", "compromises",
- "compromisng", "compromising",
- "compromisse", "compromises",
- "compromisso", "compromises",
- "compromized", "compromised",
- "compulstion", "compulsion",
- "compunation", "computation",
- "computacion", "computation",
- "computating", "computation",
- "computition", "computation",
- "conceivibly", "conceivably",
- "concencrate", "concentrate",
- "concentrace", "concentrate",
- "concentrade", "concentrated",
- "concentrait", "concentrate",
- "concentrant", "concentrate",
- "concentrare", "concentrate",
- "concentrato", "concentration",
- "concertmate", "concentrate",
- "conceviable", "conceivable",
- "conceviably", "conceivably",
- "concidering", "considering",
- "conciveable", "conceivable",
- "conciveably", "conceivably",
- "conclsuions", "concussions",
- "concludendo", "concluded",
- "conclussion", "conclusions",
- "conclussive", "conclusive",
- "conclutions", "conclusions",
- "concsiously", "consciously",
- "conculsions", "conclusions",
- "concusssion", "concussions",
- "condeferacy", "confederacy",
- "condicional", "conditional",
- "condidtions", "conditions",
- "conditionar", "conditioner",
- "conditionel", "conditional",
- "condolances", "condolences",
- "condolenses", "condolences",
- "condolonces", "condolences",
- "conductiong", "conducting",
- "condulences", "condolences",
- "conenctions", "connections",
- "conescutive", "consecutive",
- "confedaracy", "confederacy",
- "confedarate", "confederate",
- "confederecy", "confederacy",
- "conferances", "conferences",
- "conferedate", "confederate",
- "confererate", "confederate",
- "confescated", "confiscated",
- "confesssion", "confessions",
- "confidantly", "confidently",
- "configurare", "configure",
- "configurate", "configure",
- "configurato", "configuration",
- "confilcting", "conflicting",
- "confisgated", "confiscated",
- "conflciting", "conflicting",
- "confortable", "comfortable",
- "confrontato", "confrontation",
- "confussions", "confessions",
- "congrassman", "congressman",
- "congratuate", "congratulate",
- "conicidence", "coincidence",
- "conjonction", "conjunction",
- "conjucntion", "conjunction",
- "conjuncting", "conjunction",
- "conlcusions", "conclusions",
- "connatation", "connotation",
- "connecitcut", "connecticut",
- "connecticon", "connection",
- "connectiong", "connecting",
- "connectivty", "connectivity",
- "connetation", "connotation",
- "connonation", "connotation",
- "connotacion", "connotation",
- "conontation", "connotation",
- "conotations", "connotations",
- "conquerring", "conquering",
- "consdidered", "considered",
- "consectuive", "consecutive",
- "consecuence", "consequence",
- "conseguence", "consequence",
- "conselation", "consolation",
- "consentrate", "concentrate",
- "consequenes", "consequence",
- "consequense", "consequences",
- "consequente", "consequence",
- "consequenty", "consequently",
- "consequtive", "consecutive",
- "conservanti", "conservation",
- "conservatie", "conservatives",
- "conservaton", "conservation",
- "consficated", "confiscated",
- "considerabe", "considerate",
- "considerais", "considers",
- "considerant", "considerate",
- "considerato", "consideration",
- "considerble", "considerable",
- "considerbly", "considerably",
- "considereis", "considers",
- "consilation", "consolation",
- "consilidate", "consolidate",
- "consistance", "consistency",
- "consistenly", "consistently",
- "consistensy", "consistency",
- "consistenty", "consistently",
- "consitution", "constitution",
- "conslutants", "consultant",
- "consolacion", "consolation",
- "consoldiate", "consolidate",
- "consolidare", "consolidate",
- "consolodate", "consolidate",
- "consomation", "consolation",
- "conspiraces", "conspiracies",
- "conspiracys", "conspiracies",
- "conspirancy", "conspiracy",
- "constantins", "constants",
- "constantivs", "constants",
- "constarints", "constraint",
- "constituant", "constituent",
- "constituion", "constitution",
- "constituite", "constitute",
- "constitutie", "constitutes",
- "constrating", "constraint",
- "constriants", "constraints",
- "construcing", "constructing",
- "construcion", "construction",
- "construcive", "constructive",
- "constructie", "constructive",
- "constructos", "constructs",
- "constructur", "constructor",
- "constructus", "constructs",
- "constuction", "construction",
- "consturcted", "constructed",
- "consuelling", "counselling",
- "consulation", "consolation",
- "consultaion", "consultation",
- "consultanti", "consultation",
- "consumation", "consumption",
- "consumbales", "consumables",
- "consumersim", "consumerism",
- "consumibles", "consumables",
- "contagiosum", "contagious",
- "containered", "contained",
- "containmemt", "containment",
- "containters", "containers",
- "containting", "containing",
- "contaminato", "contamination",
- "contaminent", "containment",
- "contaminted", "contaminated",
- "contancting", "contracting",
- "contanimate", "contaminated",
- "contemplare", "contemplate",
- "contempoary", "contemporary",
- "contemporay", "contemporary",
- "contencious", "contentious",
- "contenental", "continental",
- "contengency", "contingency",
- "contenintal", "continental",
- "contenplate", "contemplate",
- "contensious", "contentious",
- "contentants", "contestants",
- "contentuous", "contentious",
- "contestaste", "contestants",
- "contestents", "contestants",
- "contianment", "containment",
- "contientous", "contentious",
- "contimplate", "contemplate",
- "continenets", "continents",
- "continentes", "continents",
- "continentul", "continental",
- "contingancy", "contingency",
- "contingient", "contingent",
- "contingincy", "contingency",
- "continously", "continuously",
- "continuarla", "continual",
- "continuarlo", "continual",
- "continuasse", "continues",
- "continueing", "continuing",
- "continuemos", "continues",
- "continueous", "continuous",
- "continuious", "continuous",
- "continuning", "continuing",
- "continunity", "continuity",
- "continuosly", "continuously",
- "continuting", "continuing",
- "continutity", "continuity",
- "continuuing", "continuing",
- "continuuity", "continuity",
- "contirbuted", "contributed",
- "contiunally", "continually",
- "contraccion", "contraction",
- "contraddice", "contradicted",
- "contradices", "contradicts",
- "contradtion", "contraction",
- "contraversy", "controversy",
- "contreversy", "controversy",
- "contribuent", "contribute",
- "contribuito", "contribution",
- "contributer", "contributor",
- "contributie", "contribute",
- "contributin", "contribution",
- "contributos", "contributors",
- "contribuyes", "contributes",
- "contricting", "contracting",
- "contriction", "contraction",
- "contridicts", "contradicts",
- "contriversy", "controversy",
- "controleurs", "controllers",
- "controllore", "controllers",
- "controvercy", "controversy",
- "controversa", "controversial",
- "contrubutes", "contributes",
- "contructing", "contracting",
- "contruction", "construction",
- "contructors", "contractors",
- "conveinence", "convenience",
- "conveneince", "convenience",
- "conveniance", "convenience",
- "conveniente", "convenience",
- "convenietly", "conveniently",
- "conventinal", "conventional",
- "converitble", "convertible",
- "conversaion", "conversion",
- "conversatin", "conversations",
- "converseley", "conversely",
- "converstion", "conversion",
- "convertirea", "converter",
- "convertirle", "convertible",
- "convertirme", "converter",
- "convertirte", "converter",
- "convicitons", "convictions",
- "convienence", "convenience",
- "convienient", "convenient",
- "convinceing", "convincing",
- "convincente", "convenient",
- "convincersi", "convinces",
- "convirtible", "convertible",
- "cooperacion", "cooperation",
- "cooperativo", "cooperation",
- "cooporation", "cooperation",
- "cooporative", "cooperative",
- "coordenated", "coordinated",
- "coordenates", "coordinates",
- "coordianted", "coordinated",
- "coordiantes", "coordinates",
- "coordiantor", "coordinator",
- "coordinador", "coordinator",
- "coordinants", "coordinates",
- "coordinater", "coordinator",
- "coordinaton", "coordination",
- "coordonated", "coordinated",
- "coordonates", "coordinates",
- "coordonator", "coordinator",
- "cooridnated", "coordinated",
- "cooridnates", "coordinates",
- "cooridnator", "coordinator",
- "copenhaagen", "copenhagen",
- "copenhaegen", "copenhagen",
- "copenhaguen", "copenhagen",
- "copenhangen", "copenhagen",
- "copmetitors", "competitors",
- "coproration", "corporation",
- "copyrigthed", "copyrighted",
- "corinthains", "corinthians",
- "corintheans", "corinthians",
- "corinthiens", "corinthians",
- "corinthinas", "corinthians",
- "cornithians", "corinthians",
- "corparation", "corporation",
- "corperation", "corporation",
- "corporacion", "corporation",
- "corporativo", "corporation",
- "corralation", "correlation",
- "correctings", "corrections",
- "correctivos", "corrections",
- "correktions", "corrections",
- "correktness", "correctness",
- "correlacion", "correlation",
- "correlaties", "correlates",
- "corrilation", "correlation",
- "corrisponds", "corresponds",
- "corrolation", "correlation",
- "corrosponds", "corresponds",
- "costitution", "constitution",
- "councellors", "councillors",
- "counrtyside", "countryside",
- "counsilling", "counselling",
- "countercoat", "counteract",
- "counteredit", "counterfeit",
- "counterfact", "counteract",
- "counterfait", "counterfeit",
- "counterfest", "counterfeit",
- "counterfiet", "counterfeit",
- "counterpaly", "counterplay",
- "counterpary", "counterplay",
- "counterpath", "counterpart",
- "counterpats", "counterparts",
- "counterpont", "counterpoint",
- "counterract", "counterpart",
- "counterside", "countryside",
- "countertrap", "counterpart",
- "countriside", "countryside",
- "countrycide", "countryside",
- "countrywise", "countryside",
- "courthourse", "courthouse",
- "coutnerfeit", "counterfeit",
- "coutnerpart", "counterpart",
- "coutnerplay", "counterplay",
- "creacionism", "creationism",
- "creationkit", "creationist",
- "creationsim", "creationism",
- "creationsit", "creationist",
- "creationsts", "creationists",
- "creativelly", "creatively",
- "credencials", "credentials",
- "credentails", "credentials",
- "credentaisl", "credentials",
- "credientals", "credentials",
- "credintials", "credentials",
- "cricitising", "criticising",
- "criculating", "circulating",
- "cringeworhy", "cringeworthy",
- "cringeworty", "cringeworthy",
- "cringewothy", "cringeworthy",
- "criticicing", "criticising",
- "criticisied", "criticise",
- "criticisims", "criticisms",
- "criticisize", "criticise",
- "criticiszed", "criticise",
- "critisicing", "criticizing",
- "critisising", "criticising",
- "critizicing", "criticizing",
- "critizising", "criticizing",
- "critizizing", "criticizing",
- "crockodiles", "crocodiles",
- "crocodiller", "crocodile",
- "crocodilule", "crocodile",
- "croporation", "corporation",
- "crossfiters", "crossfire",
- "cultivative", "cultivate",
- "curricullum", "curriculum",
- "customizabe", "customizable",
- "customizble", "customizable",
- "dangeroulsy", "dangerously",
- "dardenelles", "dardanelles",
- "deadlifters", "deadlifts",
- "dealershits", "dealerships",
- "deceptivley", "deceptive",
- "declaracion", "declaration",
- "decleration", "declaration",
- "declinining", "declining",
- "decloration", "declaration",
- "decoartions", "decoration",
- "decomposits", "decomposes",
- "decoratieve", "decorative",
- "decorativos", "decorations",
- "decotations", "decorations",
- "decsendants", "descendants",
- "deductiable", "deductible",
- "defenderlas", "defenders",
- "defenderlos", "defenders",
- "defendernos", "defenders",
- "defenesless", "defenseless",
- "defenisvely", "defensively",
- "defensivley", "defensively",
- "deficiencey", "deficiency",
- "deficienies", "deficiencies",
- "deficientcy", "deficiency",
- "definantley", "definately",
- "definatedly", "definately",
- "definateley", "definately",
- "definatelly", "definately",
- "definatelty", "definately",
- "definatetly", "definately",
- "definations", "definitions",
- "definatlely", "definately",
- "definetally", "definately",
- "definetlely", "definetly",
- "definitaley", "definately",
- "definitelly", "definitely",
- "definitevly", "definitively",
- "definitiely", "definitively",
- "definitieve", "definitive",
- "definitiley", "definitively",
- "definitivly", "definitively",
- "definitivno", "definition",
- "definitivos", "definitions",
- "definitlely", "definitly",
- "definitlety", "definitly",
- "deflecticon", "deflection",
- "degenererat", "degenerate",
- "degradacion", "degradation",
- "degradating", "degradation",
- "degragation", "degradation",
- "degridation", "degradation",
- "dehyrdation", "dehydration",
- "deinitalize", "deinitialize",
- "delaerships", "dealerships",
- "delapidated", "dilapidated",
- "delcaration", "declaration",
- "delearships", "dealerships",
- "delevopment", "development",
- "deliberante", "deliberate",
- "deliberatly", "deliberately",
- "deliberetly", "deliberately",
- "delightlful", "delightful",
- "deliverying", "delivering",
- "delusionnal", "delusional",
- "deminsional", "dimensional",
- "democarcies", "democracies",
- "democracize", "democracies",
- "democractic", "democratic",
- "democraphic", "demographic",
- "democrasies", "democracies",
- "democrazies", "democracies",
- "democrocies", "democracies",
- "demograhpic", "demographic",
- "demographis", "demographics",
- "demograpics", "demographics",
- "demogrpahic", "demographic",
- "demoninator", "denominator",
- "demonstarte", "demonstrate",
- "demonstates", "demonstrates",
- "demonstraby", "demonstrably",
- "demonstrant", "demonstrate",
- "demonstrats", "demonstrates",
- "demosntrate", "demonstrate",
- "denegrating", "denigrating",
- "denomenator", "denominator",
- "denominador", "denominator",
- "denominaron", "denominator",
- "denominater", "denominator",
- "denominaton", "denomination",
- "denomitator", "denominator",
- "denomonator", "denominator",
- "denonimator", "denominator",
- "deocrations", "decorations",
- "deomcracies", "democracies",
- "deparmental", "departmental",
- "depedencies", "dependencies",
- "dependancey", "dependency",
- "dependencey", "dependency",
- "dependencie", "dependence",
- "dependenies", "dependencies",
- "deplorabile", "deplorable",
- "depressieve", "depressive",
- "depresssion", "depression",
- "deprevation", "deprivation",
- "deprication", "deprivation",
- "deprivating", "deprivation",
- "deprivition", "deprivation",
- "deprovation", "deprivation",
- "depserately", "desperately",
- "depseration", "desperation",
- "deregulatin", "deregulation",
- "derivativos", "derivatives",
- "derivitaves", "derivatives",
- "derivitives", "derivatives",
- "derpivation", "deprivation",
- "derviatives", "derivatives",
- "descandants", "descendants",
- "descendands", "descendants",
- "descendends", "descended",
- "descendenta", "descendants",
- "descentants", "descendants",
- "descirption", "descriptions",
- "descprition", "descriptions",
- "describiste", "describes",
- "describtion", "description",
- "descripcion", "description",
- "descripiton", "descriptions",
- "descripters", "descriptors",
- "descriptoin", "descriptions",
- "descriptons", "descriptions",
- "descritpion", "descriptions",
- "descrpition", "descriptions",
- "desensitied", "desensitized",
- "desensitzed", "desensitized",
- "desentisize", "desensitized",
- "desgination", "designation",
- "designacion", "designation",
- "designstion", "designation",
- "desinations", "destinations",
- "desingation", "designation",
- "desitnation", "destination",
- "desoriented", "disoriented",
- "desparately", "desperately",
- "desparation", "desperation",
- "desperating", "desperation",
- "desperatley", "desperately",
- "despirately", "desperately",
- "despiration", "desperation",
- "destablized", "destabilized",
- "destiantion", "destinations",
- "destinaiton", "destinations",
- "destinatons", "destinations",
- "destinction", "destination",
- "destraction", "destruction",
- "destruccion", "destruction",
- "destruciton", "destruction",
- "destructivo", "destruction",
- "destruktion", "destruction",
- "destruktive", "destructive",
- "deteoriated", "deteriorated",
- "determanism", "determinism",
- "determening", "determining",
- "determenism", "determinism",
- "determinare", "determine",
- "determinato", "determination",
- "determinded", "determine",
- "determinsim", "determinism",
- "detramental", "detrimental",
- "detremental", "detrimental",
- "detrimentul", "detrimental",
- "detuschland", "deutschland",
- "deustchland", "deutschland",
- "deutchsland", "deutschland",
- "deutcshland", "deutschland",
- "deutschalnd", "deutschland",
- "deutshcland", "deutschland",
- "develepmont", "developments",
- "develompent", "developments",
- "developemnt", "developments",
- "developmant", "developmental",
- "developmetn", "developments",
- "developmnet", "developments",
- "developpers", "developers",
- "develpoment", "developments",
- "deveolpment", "developments",
- "deveploment", "developments",
- "devestating", "devastating",
- "devistating", "devastating",
- "deyhdration", "dehydration",
- "diagnositcs", "diagnostic",
- "diagnositic", "diagnostic",
- "diagonstics", "diagnostic",
- "dictatorhip", "dictatorship",
- "dictionaire", "dictionaries",
- "dictionairy", "dictionary",
- "dictionarys", "dictionaries",
- "dictionnary", "dictionary",
- "differances", "differences",
- "differantly", "differently",
- "differental", "differential",
- "differentes", "differences",
- "differneces", "differences",
- "differnetly", "differently",
- "difficulity", "difficulty",
- "difficultes", "difficulties",
- "dificulties", "difficulties",
- "dimensiones", "dimensions",
- "dimentional", "dimensional",
- "dimesnional", "dimensional",
- "diminisheds", "diminishes",
- "diminsihing", "diminishing",
- "diminuitive", "diminutive",
- "diminushing", "diminishing",
- "dinosaurios", "dinosaurs",
- "direccional", "directional",
- "direcitonal", "directional",
- "directorguy", "directory",
- "directorios", "directors",
- "direktional", "directional",
- "disadvantge", "disadvantage",
- "disagreemet", "disagreements",
- "disagreemtn", "disagreements",
- "disapperead", "disappeared",
- "disapporval", "disapproval",
- "disapprovel", "disapproval",
- "disasterous", "disastrous",
- "disastreous", "disastrous",
- "disastrious", "disastrous",
- "disastruous", "disastrous",
- "disatisfied", "dissatisfied",
- "disciplened", "disciplined",
- "disciplinas", "disciplines",
- "disciplince", "disciplines",
- "disclipined", "disciplined",
- "disclipines", "disciplines",
- "discogrophy", "discography",
- "discogrpahy", "discography",
- "disconencts", "disconnects",
- "disconneted", "disconnected",
- "disconnnect", "disconnect",
- "discontined", "discontinued",
- "discontiued", "discontinued",
- "discrapency", "discrepancy",
- "discretited", "discredited",
- "discrimante", "discriminate",
- "discrimiate", "discriminate",
- "discussiong", "discussing",
- "discusssion", "discussions",
- "disgraseful", "disgraceful",
- "disgrateful", "disgraceful",
- "disgrunteld", "disgruntled",
- "disgustigly", "disgustingly",
- "disgustingy", "disgustingly",
- "disgustinly", "disgustingly",
- "disicplined", "disciplined",
- "disicplines", "disciplines",
- "disingenuos", "disingenuous",
- "dismanlting", "dismantling",
- "dismantaled", "dismantled",
- "dismanteled", "dismantled",
- "disobediant", "disobedient",
- "disocgraphy", "discography",
- "disparingly", "disparagingly",
- "dispensaire", "dispensaries",
- "dispensarie", "dispenser",
- "dispensiary", "dispensary",
- "displacemnt", "displacement",
- "disposicion", "disposition",
- "disputandem", "disputandum",
- "disqualifed", "disqualified",
- "disregaring", "disregarding",
- "dissapeared", "disappeared",
- "dissapoined", "dissapointed",
- "dissapointd", "dissapointed",
- "dissapoited", "dissapointed",
- "dissappears", "disappears",
- "dissatisfed", "dissatisfied",
- "disscusions", "discussions",
- "dissertaion", "dissertation",
- "dissipatore", "dissipate",
- "distatesful", "distasteful",
- "distatseful", "distasteful",
- "disterbance", "disturbance",
- "disticntion", "distinctions",
- "distinciton", "distinction",
- "distincitve", "distinctive",
- "distinctily", "distinctly",
- "distingiush", "distinguish",
- "distinguise", "distinguished",
- "distinktion", "distinction",
- "distinquish", "distinguish",
- "distirbance", "disturbance",
- "distirbuted", "distribute",
- "distirbutor", "distributor",
- "distraccion", "distraction",
- "distractons", "distracts",
- "distraktion", "distraction",
- "distribitor", "distributor",
- "distribuent", "distribute",
- "distribuite", "distribute",
- "distribuito", "distribution",
- "distributie", "distributed",
- "distributin", "distribution",
- "distributio", "distributor",
- "distrobuted", "distributed",
- "distrubance", "disturbance",
- "distrubited", "distributed",
- "distrubitor", "distributor",
- "distrubuted", "distributed",
- "distrubutor", "distributor",
- "distructive", "destructive",
- "distuingish", "distinguish",
- "distunguish", "distinguish",
- "disturbante", "disturbance",
- "disturbence", "disturbance",
- "disucssions", "discussions",
- "divisionals", "divisions",
- "doccumented", "documented",
- "documantary", "documentary",
- "documenatry", "documentary",
- "documentare", "documentaries",
- "documentato", "documentation",
- "documentery", "documentary",
- "documentory", "documentary",
- "domesticted", "domesticated",
- "dominateurs", "dominates",
- "dominationg", "dominating",
- "donwloading", "downloading",
- "doublellift", "doublelift",
- "downlaoding", "downloading",
- "downloadbel", "downloadable",
- "downloadbig", "downloading",
- "downloadble", "downloadable",
- "downvoteers", "downvoters",
- "downvoteing", "downvoting",
- "downvoteres", "downvoters",
- "downvoteros", "downvoters",
- "downvoteurs", "downvoters",
- "downvotters", "downvoters",
- "downvotting", "downvoting",
- "dramaticaly", "dramatically",
- "dramaticlly", "dramatically",
- "drasitcally", "drastically",
- "dsyfunction", "dysfunction",
- "duetschland", "deutschland",
- "durabillity", "durability",
- "dyanmically", "dynamically",
- "dymanically", "dynamically",
- "dysfonction", "dysfunction",
- "dysfucntion", "dysfunction",
- "dysfunciton", "dysfunction",
- "dysfunktion", "dysfunction",
- "earhtquakes", "earthquakes",
- "earthqaukes", "earthquakes",
- "earthquacks", "earthquakes",
- "economicaly", "economically",
- "economiclly", "economically",
- "economisiti", "economist",
- "economistes", "economists",
- "educacional", "educational",
- "effeciently", "efficiently",
- "effecitvely", "effectively",
- "effectivley", "effectively",
- "efficeintly", "efficiently",
- "efficiantly", "efficiently",
- "efficientcy", "efficiently",
- "effortlesly", "effortlessly",
- "effortlessy", "effortlessly",
- "egaletarian", "egalitarian",
- "egalitatian", "egalitarian",
- "egaliterian", "egalitarian",
- "egostitical", "egotistical",
- "egotastical", "egotistical",
- "egotestical", "egotistical",
- "egotisitcal", "egotistical",
- "egotisticle", "egotistical",
- "egotystical", "egotistical",
- "ehtnicities", "ethnicities",
- "ejacluation", "ejaculation",
- "ejacualtion", "ejaculation",
- "electoratul", "electoral",
- "electornics", "electronics",
- "electricain", "electrician",
- "electricial", "electrical",
- "electricien", "electrician",
- "electricion", "electrician",
- "electricman", "electrician",
- "electrisity", "electricity",
- "electritian", "electrician",
- "electrocity", "electricity",
- "electrolyes", "electrolytes",
- "electrolyts", "electrolytes",
- "electroncis", "electrons",
- "electroylte", "electrolytes",
- "elementrary", "elementary",
- "eleminating", "eliminating",
- "elimanation", "elimination",
- "eliminacion", "elimination",
- "elimintates", "eliminates",
- "ellipitcals", "elliptical",
- "eloquentely", "eloquently",
- "emabrassing", "embarassing",
- "embaraasing", "embarassing",
- "embarasaing", "embarassing",
- "embarassign", "embarassing",
- "embarassimg", "embarassing",
- "embarassing", "embarrassing",
- "embarissing", "embarassing",
- "embarrasing", "embarrassing",
- "embarressed", "embarrassed",
- "embarrssing", "embarassing",
- "emergancies", "emergencies",
- "emergencias", "emergencies",
- "emergenices", "emergencies",
- "emmediately", "immediately",
- "emmisarries", "emissaries",
- "emotionella", "emotionally",
- "empahsizing", "emphasizing",
- "empathethic", "empathetic",
- "emphacizing", "emphasizing",
- "emphatising", "emphasizing",
- "emphatizing", "emphasizing",
- "emphazising", "emphasizing",
- "emphesizing", "emphasizing",
- "empiracally", "empirically",
- "empirialism", "imperialism",
- "empirialist", "imperialist",
- "enchamtment", "enchantment",
- "enchancment", "enchantment",
- "enchanement", "enchantment",
- "enchanthing", "enchanting",
- "enchantmant", "enchantment",
- "enchantmens", "enchantments",
- "enchantmets", "enchantments",
- "encomapsses", "encompasses",
- "encompasess", "encompasses",
- "encompesses", "encompasses",
- "encounteres", "encounters",
- "encoutnered", "encountered",
- "encryptiion", "encryption",
- "encyclopdia", "encyclopedia",
- "encylopedia", "encyclopedia",
- "endagnering", "endangering",
- "endandering", "endangering",
- "endorcement", "endorsement",
- "endoresment", "endorsement",
- "engagaments", "engagements",
- "engeneering", "engineering",
- "enginerring", "engineering",
- "enginnering", "engineering",
- "enlargments", "enlargements",
- "enligthened", "enlightened",
- "enourmously", "enormously",
- "enterpirses", "enterprises",
- "enterprices", "enterprises",
- "enterprishe", "enterprises",
- "entertainig", "entertaining",
- "entertwined", "entertained",
- "enthicities", "ethnicities",
- "enthisiasts", "enthusiasts",
- "enthuasists", "enthusiasts",
- "enthuisasts", "enthusiasts",
- "enthusaists", "enthusiasts",
- "enthusiants", "enthusiast",
- "enthusiasic", "enthusiastic",
- "enthusiasim", "enthusiasm",
- "enthusiasum", "enthusiasm",
- "enthusiatic", "enthusiastic",
- "enthusiests", "enthusiasts",
- "enthusigasm", "enthusiasm",
- "enthusisast", "enthusiasts",
- "entrepeneur", "entrepreneur",
- "entreperure", "entrepreneur",
- "entrepeuner", "entrepreneur",
- "entreprener", "entrepreneurs",
- "entreprenur", "entrepreneur",
- "entretained", "entertained",
- "envinroment", "environments",
- "enviorments", "environments",
- "enviornment", "environment",
- "envirnoment", "environment",
- "enviroments", "environments",
- "enviromnent", "environments",
- "environemnt", "environment",
- "environmnet", "environments",
- "envrionment", "environment",
- "equilavents", "equivalents",
- "equilbirium", "equilibrium",
- "equilevants", "equivalents",
- "equilibirum", "equilibrium",
- "equilibriam", "equilibrium",
- "equilibruim", "equilibrium",
- "equivalance", "equivalence",
- "equivalants", "equivalents",
- "equivalenet", "equivalents",
- "equivallent", "equivalent",
- "equivelance", "equivalence",
- "equivelants", "equivalents",
- "equivelents", "equivalents",
- "equivilants", "equivalents",
- "equivilence", "equivalence",
- "equivilents", "equivalents",
- "equivlalent", "equivalent",
- "equivlanets", "equivalents",
- "equivolence", "equivalence",
- "equivolents", "equivalents",
- "essencially", "essentially",
- "essentailly", "essentially",
- "essentialls", "essentials",
- "essentually", "essentially",
- "establising", "establishing",
- "ethicallity", "ethically",
- "ethincities", "ethnicities",
- "ethniticies", "ethnicities",
- "europeaners", "europeans",
- "europeaness", "europeans",
- "evaluatiing", "evaluating",
- "evaluationg", "evaluating",
- "evangalical", "evangelical",
- "evangelikal", "evangelical",
- "evengalical", "evangelical",
- "evenhtually", "eventually",
- "everyonehas", "everyones",
- "everyonelse", "everyones",
- "evidentally", "evidently",
- "exacarbated", "exacerbated",
- "exacberated", "exacerbated",
- "exagerating", "exaggerating",
- "exagerrated", "exaggerated",
- "exagerrates", "exaggerates",
- "exaggarated", "exaggerated",
- "exaggareted", "exaggerate",
- "exaggeratin", "exaggeration",
- "exaggerrate", "exaggerate",
- "exaggurated", "exaggerated",
- "exarcebated", "exacerbated",
- "excalmation", "exclamation",
- "excepcional", "exceptional",
- "exceptionel", "exceptional",
- "excessivley", "excessively",
- "exceutioner", "executioner",
- "exchanching", "exchanging",
- "exclamacion", "exclamation",
- "exclamating", "exclamation",
- "exclamativo", "exclamation",
- "exclemation", "exclamation",
- "exclimation", "exclamation",
- "exclucivity", "exclusivity",
- "exclusivety", "exclusivity",
- "exclusivily", "exclusivity",
- "exclusivley", "exclusively",
- "excpetional", "exceptional",
- "exculsively", "exclusively",
- "exculsivity", "exclusivity",
- "execitioner", "executioner",
- "execptional", "exceptional",
- "exectuables", "executable",
- "exectuioner", "executioner",
- "executionar", "executioner",
- "executionor", "executioner",
- "exerciseing", "exercising",
- "exeuctioner", "executioner",
- "existantial", "existential",
- "existencial", "existential",
- "existensial", "existential",
- "existentiel", "existential",
- "exlcamation", "exclamation",
- "exlcusively", "exclusively",
- "exlcusivity", "exclusivity",
- "exoskelaton", "exoskeleton",
- "expansiones", "expansions",
- "expectantcy", "expectancy",
- "expectating", "expectation",
- "expectional", "exceptional",
- "expendature", "expenditure",
- "expendeture", "expenditure",
- "expentiture", "expenditure",
- "expereinced", "experienced",
- "expereinces", "experiences",
- "experements", "experiments",
- "experianced", "experienced",
- "experiances", "experiences",
- "experiemnts", "experiments",
- "experiening", "experiencing",
- "experimetal", "experimental",
- "experimeted", "experimented",
- "experssions", "expressions",
- "expiditions", "expeditions",
- "expierenced", "experienced",
- "expierences", "experiences",
- "expirements", "experiments",
- "explainging", "explaining",
- "explaintory", "explanatory",
- "explanaiton", "explanations",
- "explanetary", "explanatory",
- "explanetory", "explanatory",
- "explanitary", "explanatory",
- "explanotory", "explanatory",
- "explenation", "explanation",
- "explenatory", "explanatory",
- "explicitely", "explicitly",
- "explicitily", "explicitly",
- "explination", "explanation",
- "explinatory", "explanatory",
- "exploitaion", "exploitation",
- "exploitatie", "exploitative",
- "explonation", "exploration",
- "exploracion", "exploration",
- "explorating", "exploration",
- "explorerers", "explorers",
- "explosiones", "explosions",
- "explotacion", "exploration",
- "expodential", "exponential",
- "exponantial", "exponential",
- "exponencial", "exponential",
- "exponentiel", "exponential",
- "expresscoin", "expression",
- "expressivos", "expressions",
- "expresssive", "expressive",
- "expressview", "expressive",
- "exprimental", "experimental",
- "expropiated", "expropriated",
- "extensiones", "extensions",
- "extensivley", "extensively",
- "extragavant", "extravagant",
- "extrapalate", "extrapolate",
- "extraploate", "extrapolate",
- "extrapolant", "extrapolate",
- "extrapolare", "extrapolate",
- "extrapolite", "extrapolate",
- "extrapulate", "extrapolate",
- "extravagent", "extravagant",
- "extravagina", "extravagant",
- "extravegant", "extravagant",
- "extravigant", "extravagant",
- "extravogant", "extravagant",
- "extremistas", "extremists",
- "extremistes", "extremists",
- "extropolate", "extrapolate",
- "fabircation", "fabrication",
- "fabricacion", "fabrication",
- "fabrikation", "fabrication",
- "facilitarte", "facilitate",
- "facilitiate", "facilitate",
- "facillitate", "facilitate",
- "facisnation", "fascination",
- "facsination", "fascination",
- "factuallity", "factually",
- "familairity", "familiarity",
- "familairize", "familiarize",
- "familiaries", "familiarize",
- "familierize", "familiarize",
- "fanatsizing", "fantasizing",
- "fanficitons", "fanfiction",
- "fantacising", "fantasizing",
- "fantacizing", "fantasizing",
- "fantasazing", "fantasizing",
- "fantasiaing", "fantasizing",
- "fantasyzing", "fantasizing",
- "fantazising", "fantasizing",
- "fascinacion", "fascination",
- "fascinatinf", "fascination",
- "fascisation", "fascination",
- "fascization", "fascination",
- "fashionalbe", "fashionable",
- "fashoinable", "fashionable",
- "fatalitites", "fatalities",
- "favoritisme", "favorites",
- "favoutrable", "favourable",
- "felxibility", "flexibility",
- "feministers", "feminists",
- "feministisk", "feminists",
- "fermentaion", "fermentation",
- "fermenterad", "fermented",
- "fertilizier", "fertilizer",
- "fertizilers", "fertilizer",
- "festivalens", "festivals",
- "fignernails", "fingernails",
- "fignerprint", "fingerprint",
- "figurativly", "figuratively",
- "finanically", "financially",
- "finantially", "financially",
- "fingerpints", "fingertips",
- "fingerpoint", "fingerprint",
- "fingertrips", "fingertips",
- "firefighers", "firefighters",
- "firefigther", "firefighters",
- "firendzoned", "friendzoned",
- "firghtening", "frightening",
- "flatterende", "flattered",
- "flawlessely", "flawlessly",
- "flawlessley", "flawlessly",
- "flexibiltiy", "flexibility",
- "flourescent", "fluorescent",
- "fluctuaties", "fluctuate",
- "fluctuative", "fluctuate",
- "flutteryshy", "fluttershy",
- "forcefullly", "forcefully",
- "foreseaable", "foreseeable",
- "foresseable", "foreseeable",
- "forgettting", "forgetting",
- "forgiviness", "forgiveness",
- "formallized", "formalized",
- "formattting", "formatting",
- "formidabble", "formidable",
- "formidabelt", "formidable",
- "formidabile", "formidable",
- "fortitudine", "fortitude",
- "fortuantely", "fortunately",
- "fortunantly", "fortunately",
- "fortunatley", "fortunately",
- "fortunetely", "fortunately",
- "franchieses", "franchises",
- "frankensite", "frankenstein",
- "frankensten", "frankenstein",
- "fransiscans", "franciscans",
- "freindships", "friendships",
- "freindzoned", "friendzoned",
- "frequenices", "frequencies",
- "frequensies", "frequencies",
- "frequenties", "frequencies",
- "frequentily", "frequently",
- "frequenzies", "frequencies",
- "friendboned", "friendzoned",
- "friendlines", "friendlies",
- "friendzonie", "friendzoned",
- "frientships", "friendships",
- "frientzoned", "friendzoned",
- "frightenend", "frightened",
- "frightining", "frightening",
- "frigthening", "frightening",
- "frinedzoned", "friendzoned",
- "frontlinies", "frontline",
- "frontlinjen", "frontline",
- "frustartion", "frustrations",
- "frustracion", "frustration",
- "frustraited", "frustrated",
- "frustrantes", "frustrates",
- "frustrasion", "frustrations",
- "frustrasted", "frustrates",
- "frustraties", "frustrates",
- "fucntioning", "functioning",
- "fulfillling", "fulfilling",
- "fulfullment", "fulfillment",
- "fullfilment", "fulfillment",
- "fullscreeen", "fullscreen",
- "funcitoning", "functioning",
- "functionaly", "functionally",
- "functionnal", "functional",
- "fundamentas", "fundamentals",
- "fundamently", "fundamental",
- "fundametals", "fundamentals",
- "fundamnetal", "fundamentals",
- "fundemantal", "fundamental",
- "fundemental", "fundamental",
- "fundimental", "fundamental",
- "furhtermore", "furthermore",
- "furstration", "frustration",
- "furthremore", "furthermore",
- "furthurmore", "furthermore",
- "futurisitic", "futuristic",
- "gangsterest", "gangsters",
- "gangsterous", "gangsters",
- "gauntlettes", "gauntlets",
- "geneologies", "genealogies",
- "generalizng", "generalizing",
- "generatting", "generating",
- "genitaliban", "genitalia",
- "gentlemanne", "gentlemen",
- "girlfirends", "girlfriends",
- "girlfreinds", "girlfriends",
- "girlfrients", "girlfriends",
- "glorifierad", "glorified",
- "glorifindel", "glorified",
- "goosebumbps", "goosebumps",
- "govenrments", "governments",
- "govermental", "governmental",
- "governemnts", "governments",
- "governmanet", "governmental",
- "governmeant", "governmental",
- "govormental", "governmental",
- "gracefullly", "gracefully",
- "grahpically", "graphically",
- "grammarical", "grammatical",
- "grammaticly", "grammatical",
- "grammitical", "grammatical",
- "graphcially", "graphically",
- "grassrooots", "grassroots",
- "gratuitious", "gratuitous",
- "gratuituous", "gratuitous",
- "gravitatiei", "gravitate",
- "grilfriends", "girlfriends",
- "grpahically", "graphically",
- "guaranteeds", "guarantees",
- "guerrillera", "guerrilla",
- "gunslingner", "gunslinger",
- "hamburgaren", "hamburger",
- "hamburgeres", "hamburgers",
- "hamburglers", "hamburgers",
- "hamburguers", "hamburgers",
- "handlebards", "handlebars",
- "handrwiting", "handwriting",
- "handycapped", "handicapped",
- "hanidcapped", "handicapped",
- "harassement", "harassment",
- "harrasments", "harassments",
- "harrassment", "harassment",
- "harvestgain", "harvesting",
- "headquartes", "headquarters",
- "headquaters", "headquarters",
- "hearhtstone", "hearthstone",
- "heartborken", "heartbroken",
- "heartbraker", "heartbreak",
- "heartbrakes", "heartbreak",
- "heartsthone", "hearthstone",
- "heaviweight", "heavyweight",
- "heavyweigth", "heavyweight",
- "heavywieght", "heavyweight",
- "helicoptors", "helicopters",
- "helicotpers", "helicopters",
- "helicpoters", "helicopters",
- "helictopers", "helicopters",
- "helikopters", "helicopters",
- "hemipsheres", "hemisphere",
- "hemishperes", "hemisphere",
- "herathstone", "hearthstone",
- "heterosexal", "heterosexual",
- "hexidecimal", "hexadecimal",
- "hierachical", "hierarchical",
- "hierarcical", "hierarchical",
- "highlighing", "highlighting",
- "highschoool", "highschool",
- "hipopotamus", "hippopotamus",
- "historicaly", "historically",
- "historicans", "historians",
- "historietas", "histories",
- "historinhas", "historians",
- "homecomeing", "homecoming",
- "homecomming", "homecoming",
- "homelesness", "homelessness",
- "homelessess", "homelessness",
- "homeowneris", "homeowners",
- "homoegenous", "homogeneous",
- "homogeneize", "homogenize",
- "homogenious", "homogeneous",
- "homogenuous", "homogeneous",
- "homophoboes", "homophobe",
- "homosexuais", "homosexuals",
- "homosexuels", "homosexuals",
- "hopelessely", "hopelessly",
- "hopelessley", "hopelessly",
- "hopsitality", "hospitality",
- "horizonatal", "horizontal",
- "horizontaal", "horizontal",
- "horizontaly", "horizontally",
- "horrendeous", "horrendous",
- "horrendious", "horrendous",
- "horrenduous", "horrendous",
- "hospitalzed", "hospitalized",
- "hospotality", "hospitality",
- "househoulds", "households",
- "humanitarna", "humanitarian",
- "humanitites", "humanities",
- "humilitaing", "humiliating",
- "humilitaion", "humiliation",
- "humillating", "humiliating",
- "humillation", "humiliation",
- "hurricaines", "hurricanes",
- "hurricances", "hurricanes",
- "hurricanger", "hurricane",
- "hyperbollic", "hyperbolic",
- "hyperbrophy", "hypertrophy",
- "hyperthropy", "hypertrophy",
- "hypertorphy", "hypertrophy",
- "hypertrohpy", "hypertrophy",
- "hypocritcal", "hypocritical",
- "hypocritial", "hypocritical",
- "hypocrities", "hypocrite",
- "hypothesees", "hypotheses",
- "hypothesies", "hypothesis",
- "hystericaly", "hysterically",
- "hystericlly", "hysterically",
- "iconclastic", "iconoclastic",
- "idealisitic", "idealistic",
- "identifible", "identifiable",
- "identitites", "identities",
- "identitties", "identities",
- "ideologiers", "ideologies",
- "ideologisen", "ideologies",
- "ideologiset", "ideologies",
- "ideologiske", "ideologies",
- "illegallity", "illegally",
- "illegitamte", "illegitimate",
- "illegitmate", "illegitimate",
- "illsutrator", "illustrator",
- "illuminanti", "illuminati",
- "illuminarti", "illuminati",
- "illuminatti", "illuminati",
- "illuminauti", "illuminati",
- "illuminiati", "illuminati",
- "illuminista", "illuminati",
- "illumintati", "illuminati",
- "illustarted", "illustrated",
- "illustartor", "illustrator",
- "illustraded", "illustrated",
- "illustraion", "illustration",
- "illustrater", "illustrator",
- "illustratie", "illustrate",
- "illustratin", "illustrations",
- "illustraton", "illustration",
- "imaganative", "imaginative",
- "imaganitive", "imaginative",
- "imaginacion", "imagination",
- "imaginatiei", "imaginative",
- "imaginating", "imagination",
- "imaginativo", "imagination",
- "imaginitave", "imaginative",
- "imbalanaced", "imbalanced",
- "imbalanaces", "imbalances",
- "imbalancers", "imbalances",
- "immatureity", "immaturity",
- "immedeately", "immediately",
- "immediantly", "immediately",
- "immediatley", "immediately",
- "immedietely", "immediately",
- "immideately", "immediately",
- "immidiately", "immediately",
- "immigraiton", "immigration",
- "immigrantes", "immigrants",
- "immoratlity", "immortality",
- "immortailty", "immortality",
- "immortalisy", "immortals",
- "impeccabile", "impeccable",
- "imperailist", "imperialist",
- "imperealist", "imperialist",
- "imperialims", "imperialism",
- "imperialsim", "imperialism",
- "imperiarist", "imperialist",
- "imperically", "empirically",
- "imperislist", "imperialist",
- "implausable", "implausible",
- "implausbile", "implausible",
- "implementas", "implements",
- "implementes", "implements",
- "implementig", "implementing",
- "implementos", "implements",
- "implicacion", "implication",
- "implicatons", "implications",
- "implicitely", "implicitly",
- "implicitily", "implicitly",
- "implikation", "implication",
- "implimented", "implemented",
- "importantce", "importance",
- "importently", "importantly",
- "imporvement", "improvement",
- "impossibile", "impossible",
- "impossibily", "impossibly",
- "impossibley", "impossibly",
- "impossiblly", "impossibly",
- "impoverised", "impoverished",
- "impracticle", "impractical",
- "impressario", "impresario",
- "impresssion", "impressions",
- "imprisonent", "imprisonment",
- "imprisonned", "imprisoned",
- "improbabile", "improbable",
- "improtantly", "importantly",
- "improvemnts", "improvements",
- "improvished", "improvised",
- "improvision", "improvisation",
- "improvments", "improvements",
- "impulsivley", "impulsive",
- "imrpovement", "improvement",
- "inaccessble", "inaccessible",
- "inaccuraces", "inaccuracies",
- "inaccurrate", "inaccurate",
- "inadvertant", "inadvertent",
- "inaguration", "inauguration",
- "inahbitants", "inhabitants",
- "incarantion", "incarnation",
- "incarcerato", "incarceration",
- "incarnacion", "incarnation",
- "incentivare", "incentive",
- "incentivate", "incentive",
- "incentivice", "incentive",
- "incentivies", "incentives",
- "incidencies", "incidence",
- "incidentaly", "incidentally",
- "incidential", "incidental",
- "inclanation", "inclination",
- "inclenation", "inclination",
- "inclinacion", "inclination",
- "inclinaison", "inclination",
- "incognition", "incognito",
- "incoherrent", "incoherent",
- "incompatble", "incompatible",
- "incompatent", "incompetent",
- "incompetant", "incompetent",
- "incompitent", "incompetent",
- "incompotent", "incompetent",
- "incomptable", "incompatible",
- "inconsisent", "inconsistent",
- "inconveniet", "inconvenient",
- "incoroprate", "incorporate",
- "incorparate", "incorporate",
- "incorperate", "incorporate",
- "incorporare", "incorporate",
- "incorported", "incorporated",
- "incorprates", "incorporates",
- "incorproate", "incorporated",
- "incramental", "incremental",
- "increadible", "incredible",
- "incrediable", "incredible",
- "incrediably", "incredibly",
- "incredibile", "incredible",
- "incredibily", "incredibly",
- "incredibley", "incredibly",
- "incrememnts", "increments",
- "incremenets", "increments",
- "incrementas", "increments",
- "incremently", "incremental",
- "incrementos", "increments",
- "incrimental", "incremental",
- "inctroduced", "introduced",
- "indefinetly", "indefinitely",
- "indefininte", "indefinite",
- "indefinitly", "indefinitely",
- "indepdenent", "independents",
- "indepedence", "independence",
- "indepednent", "independents",
- "independant", "independent",
- "independece", "independence",
- "independens", "independents",
- "independetn", "independents",
- "independets", "independents",
- "independnet", "independents",
- "indepentend", "independents",
- "indepentent", "independent",
- "indianapols", "indianapolis",
- "indicateurs", "indicates",
- "indicatiors", "indicators",
- "indictement", "indictment",
- "indifferant", "indifferent",
- "indiffernce", "indifference",
- "indigeneous", "indigenous",
- "indigenious", "indigenous",
- "indigenuous", "indigenous",
- "indigineous", "indigenous",
- "indipendent", "independent",
- "indirectely", "indirectly",
- "individiual", "individual",
- "individuais", "individuals",
- "individualy", "individually",
- "individuati", "individuality",
- "individuels", "individuals",
- "indivuduals", "individuals",
- "industriels", "industries",
- "ineffecitve", "ineffective",
- "ineffektive", "ineffective",
- "inefficeint", "inefficient",
- "inefficiant", "inefficient",
- "ineffictive", "ineffective",
- "ineffizient", "inefficient",
- "inequallity", "inequality",
- "inevitabile", "inevitable",
- "inevitabily", "inevitably",
- "inevitabley", "inevitably",
- "inevitablly", "inevitably",
- "inexpencive", "inexpensive",
- "inexpenisve", "inexpensive",
- "inexperiece", "inexperience",
- "inexperince", "inexperience",
- "inexplicaby", "inexplicably",
- "infallibale", "infallible",
- "infallibile", "infallible",
- "infectation", "infestation",
- "inferioirty", "inferiority",
- "infestating", "infestation",
- "infilitrate", "infiltrate",
- "infiltartor", "infiltrator",
- "infiltraron", "infiltrator",
- "infiltrarte", "infiltrate",
- "infiltrater", "infiltrator",
- "infiltratie", "infiltrate",
- "infiltrerat", "infiltrate",
- "infinitelly", "infinitely",
- "infintrator", "infiltrator",
- "inflamation", "inflammation",
- "inflatabale", "inflatable",
- "inflitrator", "infiltrator",
- "influancing", "influencing",
- "influencial", "influential",
- "influencian", "influencing",
- "influenting", "influencing",
- "influentual", "influential",
- "influincing", "influencing",
- "infograhpic", "infographic",
- "infograpgic", "infographic",
- "infogrpahic", "infographic",
- "informacion", "information",
- "informatice", "informative",
- "informatief", "informative",
- "informatiei", "informative",
- "informatike", "informative",
- "informativo", "information",
- "informitive", "informative",
- "infrigement", "infringement",
- "infringeing", "infringing",
- "infromation", "information",
- "infromative", "informative",
- "infulential", "influential",
- "ingerdients", "ingredients",
- "ingrediants", "ingredients",
- "ingreidents", "ingredient",
- "ingriedents", "ingredient",
- "inhabitents", "inhabitants",
- "inheirtance", "inheritance",
- "inheratance", "inheritance",
- "inheretance", "inheritance",
- "inheritence", "inheritance",
- "inhertiance", "inheritance",
- "initaitives", "initiatives",
- "initalisers", "initialisers",
- "initalising", "initialising",
- "initalizers", "initializers",
- "initalizing", "initializing",
- "initiaitive", "initiative",
- "inititiaves", "initiatives",
- "innocenters", "innocents",
- "innocentius", "innocents",
- "innoculated", "inoculated",
- "inpsiration", "inspiration",
- "inquisicion", "inquisition",
- "inquisistor", "inquisitor",
- "inquisiting", "inquisition",
- "inquisitior", "inquisitor",
- "inquisitivo", "inquisition",
- "inquizition", "inquisition",
- "insecurites", "insecurities",
- "insensative", "insensitive",
- "insensetive", "insensitive",
- "insentitive", "insensitive",
- "insepctions", "inspections",
- "inseperable", "inseparable",
- "insipration", "inspiration",
- "insitutions", "institutions",
- "insparation", "inspiration",
- "inspecticon", "inspection",
- "inspectoras", "inspectors",
- "insperation", "inspiration",
- "inspiracion", "inspiration",
- "inspirating", "inspiration",
- "inspriation", "inspiration",
- "instalation", "installation",
- "instalement", "installment",
- "installatin", "installations",
- "installeert", "installer",
- "installemnt", "installment",
- "installling", "installing",
- "installmant", "installment",
- "instanciate", "instantiate",
- "instantaneu", "instantaneous",
- "institucion", "institution",
- "institutiei", "institute",
- "instituttet", "institute",
- "instraments", "instruments",
- "instruccion", "instruction",
- "instruciton", "instruction",
- "instructers", "instructors",
- "instructior", "instructor",
- "instructios", "instructors",
- "instructivo", "instruction",
- "instructons", "instructors",
- "instruktion", "instruction",
- "instrumenal", "instrumental",
- "instrumetal", "instrumental",
- "insturction", "instruction",
- "insturctors", "instructors",
- "insturments", "instruments",
- "instutition", "institution",
- "instutution", "institution",
- "insufficent", "insufficient",
- "insuinating", "insinuating",
- "insuniating", "insinuating",
- "insurgencey", "insurgency",
- "intangiable", "intangible",
- "intangibile", "intangible",
- "inteferring", "interfering",
- "integracion", "integration",
- "integratron", "integration",
- "integrering", "interfering",
- "intelectual", "intellectual",
- "inteligence", "intelligence",
- "intellectul", "intellectuals",
- "intellectus", "intellectuals",
- "intellecual", "intellectual",
- "intellegent", "intelligent",
- "intelligant", "intelligent",
- "intencional", "intentional",
- "intentionly", "intentional",
- "interaccion", "interaction",
- "interactice", "interactive",
- "interacties", "interacts",
- "interactifs", "interacts",
- "interactins", "interacts",
- "interactios", "interacts",
- "interactivo", "interaction",
- "interactons", "interacts",
- "interaktion", "interaction",
- "interaktive", "interactive",
- "interasting", "interacting",
- "intercation", "integration",
- "interceptin", "interception",
- "intercoarse", "intercourse",
- "intercource", "intercourse",
- "interecting", "interacting",
- "interection", "interaction",
- "interelated", "interrelated",
- "interersted", "interpreted",
- "interesring", "interfering",
- "interessted", "interested",
- "interferece", "interference",
- "interferens", "interferes",
- "interferire", "interfere",
- "interfernce", "interference",
- "interferred", "interfere",
- "interferres", "interferes",
- "intergation", "integration",
- "intergrated", "integrated",
- "intermedate", "intermediate",
- "intermedite", "intermediate",
- "intermitent", "intermittent",
- "internation", "international",
- "interneters", "internets",
- "internetese", "internets",
- "internetest", "internets",
- "interneting", "interesting",
- "internetors", "internets",
- "internettes", "internets",
- "interperted", "interpreted",
- "interperter", "interpreter",
- "interprered", "interpreter",
- "interpretor", "interpreter",
- "interratial", "interracial",
- "interresing", "interfering",
- "interrogato", "interrogation",
- "interrputed", "interrupted",
- "interruping", "interrupting",
- "interruptes", "interrupts",
- "interruptis", "interrupts",
- "intersecton", "intersection",
- "interstelar", "interstellar",
- "intertained", "intertwined",
- "intertvined", "intertwined",
- "intertwyned", "intertwined",
- "intervalles", "intervals",
- "intervation", "integration",
- "interveiwed", "interviewed",
- "interveiwer", "interviewer",
- "intervenion", "intervening",
- "intervenire", "intervene",
- "interventie", "intervene",
- "intervewing", "intervening",
- "interviened", "interviewed",
- "interviewes", "interviews",
- "interviewie", "interviewer",
- "intervining", "intervening",
- "interwebers", "interwebs",
- "interwiever", "interviewer",
- "intestinces", "intestines",
- "inticracies", "intricacies",
- "intimadated", "intimidated",
- "intimidades", "intimidated",
- "intimidante", "intimidate",
- "intimidatie", "intimidated",
- "intimidatin", "intimidation",
- "intimidaton", "intimidation",
- "intimidiate", "intimidate",
- "intiminated", "intimidated",
- "intimitaded", "intimidated",
- "intimitated", "intimidated",
- "intiutively", "intuitively",
- "intoleranse", "intolerance",
- "intolerante", "intolerance",
- "intolerence", "intolerance",
- "intolernace", "intolerance",
- "intolorance", "intolerance",
- "intolorence", "intolerance",
- "intorducing", "introducing",
- "intorverted", "introverted",
- "intoxicatin", "intoxication",
- "intoxicaton", "intoxication",
- "intoxinated", "intoxicated",
- "intoxocated", "intoxicated",
- "intracacies", "intricacies",
- "intracicies", "intricacies",
- "intraverted", "introverted",
- "intrecacies", "intricacies",
- "intrepreted", "interpreted",
- "intrepreter", "interpreter",
- "intrerupted", "interrupted",
- "intricasies", "intricacies",
- "intricicies", "intricacies",
- "intrigueing", "intriguing",
- "intrinsisch", "intrinsic",
- "introducion", "introduction",
- "introducted", "introduced",
- "introductie", "introduce",
- "introvertie", "introverted",
- "introvertis", "introverts",
- "intruducing", "introducing",
- "intrumental", "instrumental",
- "intuatively", "intuitively",
- "intuitevely", "intuitively",
- "intuitivley", "intuitively",
- "intuituvely", "intuitively",
- "inutitively", "intuitively",
- "invaldiates", "invalidates",
- "invalidades", "invalidates",
- "invalidante", "invalidate",
- "invariabley", "invariably",
- "invariablly", "invariably",
- "inventiones", "inventions",
- "invesitgate", "investigate",
- "investagate", "investigate",
- "investiagte", "investigate",
- "investigare", "investigate",
- "invincibile", "invincible",
- "invincinble", "invincible",
- "invisibiity", "invisibility",
- "invisibiliy", "invisibility",
- "involantary", "involuntary",
- "involentary", "involuntary",
- "involintary", "involuntary",
- "involontary", "involuntary",
- "involunatry", "involuntary",
- "invulnerabe", "invulnerable",
- "invulnerble", "invulnerable",
- "iresistable", "irresistible",
- "iresistably", "irresistibly",
- "iresistible", "irresistible",
- "iresistibly", "irresistibly",
- "irrationaly", "irrationally",
- "irrationnal", "irrational",
- "islamisists", "islamists",
- "islamisters", "islamists",
- "islamistisk", "islamists",
- "isntruments", "instruments",
- "jacksonvile", "jacksonville",
- "jailbroaken", "jailbroken",
- "jailbrocken", "jailbroken",
- "jounralists", "journalists",
- "jouranlists", "journalists",
- "journalisim", "journalism",
- "journalistc", "journalistic",
- "journolists", "journalists",
- "judegmental", "judgemental",
- "judgamental", "judgemental",
- "judgementle", "judgemental",
- "judgementsl", "judgemental",
- "judgenental", "judgemental",
- "jugdemental", "judgemental",
- "juggernaugt", "juggernaut",
- "juggernault", "juggernaut",
- "juggernaunt", "juggernaut",
- "justifyable", "justifiable",
- "kidnappning", "kidnapping",
- "kidnappping", "kidnapping",
- "kilometeres", "kilometers",
- "kindergaten", "kindergarten",
- "knowledgabe", "knowledgable",
- "knowledgble", "knowledgable",
- "kryptoninte", "kryptonite",
- "lacklusture", "lackluster",
- "laughablely", "laughably",
- "legalizaing", "legalizing",
- "legalizaton", "legalization",
- "legalizeing", "legalizing",
- "legenadries", "legendaries",
- "legendaires", "legendaries",
- "legendarios", "legendaries",
- "legendarisk", "legendaries",
- "legendaryes", "legendaries",
- "legenderies", "legendaries",
- "legilsation", "legislation",
- "legislacion", "legislation",
- "legislativo", "legislation",
- "legistation", "legislation",
- "legistative", "legislative",
- "legistators", "legislators",
- "legitematly", "legitimately",
- "legitimancy", "legitimacy",
- "legitimatcy", "legitimacy",
- "legitimatly", "legitimately",
- "legitimetly", "legitimately",
- "legnedaries", "legendaries",
- "lengedaries", "legendaries",
- "liberalisim", "liberalism",
- "liberatrian", "libertarians",
- "libertairan", "libertarians",
- "libertarain", "libertarian",
- "libertarias", "libertarians",
- "libertarien", "libertarian",
- "libertaryan", "libertarian",
- "libertatian", "libertarian",
- "liberterian", "libertarian",
- "libguistics", "linguistics",
- "libretarian", "libertarian",
- "lieutennant", "lieutenant",
- "lieutentant", "lieutenant",
- "lightenning", "lightening",
- "lightenting", "lightening",
- "lightheared", "lighthearted",
- "lightheated", "lighthearted",
- "lightweigth", "lightweight",
- "lightwieght", "lightweight",
- "lightwright", "lightweight",
- "ligthweight", "lightweight",
- "limitaitons", "limitation",
- "linguisitcs", "linguistics",
- "linguisitic", "linguistic",
- "lingusitics", "linguistics",
- "lithuaninan", "lithuania",
- "littlefiger", "littlefinger",
- "littlefiner", "littlefinger",
- "lockscreeen", "lockscreen",
- "longevitity", "longevity",
- "lotharingen", "lothringen",
- "louisvillle", "louisville",
- "maginficent", "magnificent",
- "magneficent", "magnificent",
- "magnicifent", "magnificent",
- "magnifacent", "magnificent",
- "magnifecent", "magnificent",
- "magnificant", "magnificent",
- "magnitudine", "magnitude",
- "maintainted", "maintained",
- "maintanance", "maintenance",
- "maintanence", "maintenance",
- "maintenence", "maintenance",
- "maintianing", "maintaining",
- "maintinaing", "maintaining",
- "maintinance", "maintenance",
- "maintinence", "maintenance",
- "malfonction", "malfunction",
- "malfucntion", "malfunction",
- "malfunciton", "malfunction",
- "malfuncting", "malfunction",
- "malfunktion", "malfunction",
- "malpractise", "malpractice",
- "malpractive", "malpractice",
- "maneouvring", "manoeuvring",
- "manifestado", "manifesto",
- "manifestano", "manifesto",
- "manifestato", "manifesto",
- "manifestion", "manifesto",
- "manifestior", "manifesto",
- "manifestons", "manifests",
- "manifestors", "manifests",
- "manipluated", "manipulated",
- "manipualted", "manipulated",
- "manipulatie", "manipulative",
- "manipulatin", "manipulation",
- "manipulaton", "manipulation",
- "maniuplated", "manipulated",
- "mannerisims", "mannerisms",
- "manslaugher", "manslaughter",
- "manslaugter", "manslaughter",
- "manufacters", "manufactures",
- "manufacteur", "manufactures",
- "manufactued", "manufactured",
- "manufactuer", "manufacture",
- "manufacturs", "manufactures",
- "manufacuter", "manufacture",
- "manufacutre", "manufactures",
- "manufatured", "manufactured",
- "manupilated", "manipulated",
- "marganilize", "marginalized",
- "marhsmallow", "marshmallow",
- "marijuannas", "marijuana",
- "markerplace", "marketplace",
- "marketpalce", "marketplace",
- "marshamllow", "marshmallow",
- "marshmalows", "marshmallows",
- "masculanity", "masculinity",
- "masculenity", "masculinity",
- "masrhmallow", "marshmallow",
- "mastermined", "mastermind",
- "masterpeace", "masterpiece",
- "masterpeice", "masterpiece",
- "mastrubated", "masturbated",
- "mastrubates", "masturbate",
- "masturabted", "masturbated",
- "masturbaing", "masturbating",
- "masturbarte", "masturbate",
- "masturbathe", "masturbated",
- "masturbatie", "masturbated",
- "masturbatin", "masturbation",
- "masturbaton", "masturbation",
- "masturbsted", "masturbated",
- "masturpiece", "masterpiece",
- "masuclinity", "masculinity",
- "matchamking", "matchmaking",
- "materalists", "materialist",
- "materialsim", "materialism",
- "mathamatics", "mathematics",
- "mathcmaking", "matchmaking",
- "mathemagics", "mathematics",
- "mathemetics", "mathematics",
- "mathimatics", "mathematics",
- "matieralism", "materialism",
- "maybelleine", "maybelline",
- "maybelliene", "maybelline",
- "maybellinne", "maybelline",
- "maybellline", "maybelline",
- "mdifielders", "midfielders",
- "meatballers", "meatballs",
- "mecernaries", "mercenaries",
- "mechanicaly", "mechanically",
- "mechanichal", "mechanical",
- "mechaniclly", "mechanically",
- "mechanicsms", "mechanisms",
- "mechanisims", "mechanism",
- "mechanismus", "mechanisms",
- "medicaitons", "medications",
- "medicineras", "medicines",
- "meditatiing", "meditating",
- "meditationg", "meditating",
- "mentionning", "mentioning",
- "mercanaries", "mercenaries",
- "mercaneries", "mercenaries",
- "mercenaires", "mercenaries",
- "mercenarias", "mercenaries",
- "mercenarios", "mercenaries",
- "merceneries", "mercenaries",
- "merchandice", "merchandise",
- "merchandies", "merchandise",
- "merchanidse", "merchandise",
- "merchanters", "merchants",
- "merchendise", "merchandise",
- "merchindise", "merchandise",
- "mercinaries", "mercenaries",
- "mercineries", "mercenaries",
- "metabolisim", "metabolism",
- "metabolitic", "metabolic",
- "metaphisics", "metaphysics",
- "metaphorial", "metaphorical",
- "metaphorics", "metaphors",
- "metaphsyics", "metaphysics",
- "metaphyiscs", "metaphysics",
- "methodoligy", "methodology",
- "metholodogy", "methodology",
- "metropolian", "metropolitan",
- "metropolies", "metropolis",
- "metropollis", "metropolis",
- "metropolois", "metropolis",
- "micorcenter", "microcenter",
- "micorphones", "microphones",
- "microcender", "microcenter",
- "microcentre", "microcenter",
- "microcentro", "microcenter",
- "microhpones", "microphones",
- "microscrope", "microscope",
- "microwavees", "microwaves",
- "microwavers", "microwaves",
- "midfeilders", "midfielders",
- "midfiedlers", "midfielders",
- "midfileders", "midfielders",
- "midifelders", "midfielders",
- "millienaire", "millionaire",
- "millionairs", "millionaires",
- "millionarie", "millionaire",
- "millioniare", "millionaire",
- "mindlessely", "mindlessly",
- "mindlessley", "mindlessly",
- "minimalstic", "minimalist",
- "ministerens", "ministers",
- "ministerios", "ministers",
- "minneaoplis", "minneapolis",
- "minneaplois", "minneapolis",
- "minniapolis", "minneapolis",
- "miraculaous", "miraculous",
- "miraculosly", "miraculously",
- "miraculousy", "miraculously",
- "mircocenter", "microcenter",
- "mircophones", "microphones",
- "mircoscopic", "microscopic",
- "miscairrage", "miscarriage",
- "miscarraige", "miscarriage",
- "miscarridge", "miscarriage",
- "miscarriege", "miscarriage",
- "mischeivous", "mischievous",
- "mischevious", "mischievous",
- "misdameanor", "misdemeanor",
- "misdeamenor", "misdemeanor",
- "misdemeaner", "misdemeanor",
- "misdemenaor", "misdemeanor",
- "misdemenors", "misdemeanors",
- "misdimeanor", "misdemeanor",
- "misdomeanor", "misdemeanor",
- "miserablely", "miserably",
- "misfortunte", "misfortune",
- "misimformed", "misinformed",
- "misinterept", "misinterpret",
- "misinterpet", "misinterpret",
- "misoginysts", "misogynist",
- "misognyists", "misogynist",
- "misogyinsts", "misogynist",
- "misogynisic", "misogynistic",
- "misogynistc", "misogynistic",
- "misogynstic", "misogynist",
- "missionaire", "missionaries",
- "missionairy", "missionary",
- "missionares", "missionaries",
- "missionaris", "missionaries",
- "missionarry", "missionary",
- "missionnary", "missionary",
- "mississipis", "mississippi",
- "misspeeling", "misspelling",
- "misspellled", "misspelled",
- "mistakengly", "mistakenly",
- "mistakently", "mistakenly",
- "moderatedly", "moderately",
- "moderateurs", "moderates",
- "moderatorin", "moderation",
- "modificaton", "modification",
- "moisterizer", "moisturizer",
- "moistruizer", "moisturizer",
- "moisturizng", "moisturizing",
- "moisturizor", "moisturizer",
- "moistutizer", "moisturizer",
- "moisutrizer", "moisturizer",
- "moleculaire", "molecular",
- "molestating", "molestation",
- "moleststion", "molestation",
- "momemtarily", "momentarily",
- "momentairly", "momentarily",
- "momentaraly", "momentarily",
- "momentarely", "momentarily",
- "momenterily", "momentarily",
- "monestaries", "monasteries",
- "monitoreada", "monitored",
- "monitoreado", "monitored",
- "monogameous", "monogamous",
- "monolitihic", "monolithic",
- "monopollies", "monopolies",
- "monstorsity", "monstrosity",
- "monstrasity", "monstrosity",
- "monstrisity", "monstrosity",
- "monstrocity", "monstrosity",
- "monstrosoty", "monstrosity",
- "monstrostiy", "monstrosity",
- "monumentaal", "monumental",
- "monumentais", "monuments",
- "monumentals", "monuments",
- "monumentous", "monuments",
- "mositurizer", "moisturizer",
- "mosntrosity", "monstrosity",
- "motehrboard", "motherboard",
- "mothebroard", "motherboards",
- "motherbaord", "motherboard",
- "motherboads", "motherboards",
- "motherboars", "motherboards",
- "motherborad", "motherboard",
- "motherbords", "motherboards",
- "motherobard", "motherboards",
- "mothreboard", "motherboards",
- "motivatinal", "motivational",
- "motorcicles", "motorcycles",
- "motorcylces", "motorcycles",
- "mouthpeices", "mouthpiece",
- "mulitplayer", "multiplayer",
- "mulitplying", "multiplying",
- "multipalyer", "multiplayer",
- "multiplater", "multiplayer",
- "multiplebgs", "multiples",
- "multipleies", "multiples",
- "multitaskng", "multitasking",
- "multitudine", "multitude",
- "multiverese", "multiverse",
- "multyplayer", "multiplayer",
- "multyplying", "multiplying",
- "muncipality", "municipality",
- "murdererous", "murderers",
- "musicallity", "musically",
- "mutliplayer", "multiplayer",
- "mutliplying", "multiplying",
- "mysterieuse", "mysteries",
- "mysteriosly", "mysteriously",
- "mysteriouly", "mysteriously",
- "mysteriousy", "mysteriously",
- "napoleonian", "napoleonic",
- "narcisissim", "narcissism",
- "narcisissts", "narcissist",
- "narcisscism", "narcissism",
- "narcisscist", "narcissist",
- "narcissisim", "narcissism",
- "narcississm", "narcissism",
- "narcississt", "narcissist",
- "narcissistc", "narcissistic",
- "narcissitic", "narcissistic",
- "narcisssism", "narcissism",
- "narcisssist", "narcissist",
- "narcissstic", "narcissist",
- "natioanlist", "nationalist",
- "nationailty", "nationality",
- "nationalesl", "nationals",
- "nationalisn", "nationals",
- "nationalite", "nationalist",
- "nationalits", "nationalist",
- "nationalizm", "nationalism",
- "nationalsim", "nationalism",
- "neccesarily", "necessarily",
- "necessairly", "necessarily",
- "necessaties", "necessities",
- "necesseraly", "necessarily",
- "necesserily", "necessarily",
- "necessiates", "necessities",
- "necessitive", "necessities",
- "neckbeardos", "neckbeards",
- "neckbeardus", "neckbeards",
- "necormancer", "necromancer",
- "necromamcer", "necromancer",
- "necromanser", "necromancer",
- "necromencer", "necromancer",
- "needlessley", "needlessly",
- "negativeity", "negativity",
- "negativelly", "negatively",
- "negativitiy", "negativity",
- "negiotating", "negotiating",
- "negligiable", "negligible",
- "negociating", "negotiating",
- "negociation", "negotiation",
- "negoitating", "negotiating",
- "negoitation", "negotiation",
- "negotiatied", "negotiate",
- "negotiative", "negotiate",
- "negotiatons", "negotiations",
- "neigborhood", "neighborhood",
- "neigbouring", "neighbouring",
- "neighborhod", "neighborhood",
- "neighbourgs", "neighbours",
- "neighouring", "neighboring",
- "nercomancer", "necromancer",
- "nessasarily", "necessarily",
- "neurologial", "neurological",
- "neurosciene", "neuroscience",
- "neutrallity", "neutrality",
- "neverthelss", "nevertheless",
- "neverthless", "nevertheless",
- "newspapaers", "newspapers",
- "newspappers", "newspapers",
- "nieghboring", "neighboring",
- "nightmarket", "nightmare",
- "nonsencical", "nonsensical",
- "nonsenscial", "nonsensical",
- "nonsensicle", "nonsensical",
- "normallized", "normalized",
- "northwesten", "northwestern",
- "nostalgisch", "nostalgic",
- "noteworthly", "noteworthy",
- "noticeabley", "noticeably",
- "notificaton", "notification",
- "notoriuosly", "notoriously",
- "numericable", "numerical",
- "nurtitional", "nutritional",
- "nutricional", "nutritional",
- "nutrutional", "nutritional",
- "obamination", "abomination",
- "obersvation", "observation",
- "obilterated", "obliterated",
- "objectivety", "objectivity",
- "objectivify", "objectivity",
- "objectivily", "objectivity",
- "objectivley", "objectively",
- "obliberated", "obliterated",
- "obliderated", "obliterated",
- "obligerated", "obliterated",
- "oblitarated", "obliterated",
- "obliteraded", "obliterated",
- "obliterared", "obliterated",
- "oblitirated", "obliterated",
- "oblitorated", "obliterated",
- "obliverated", "obliterated",
- "observacion", "observation",
- "observaiton", "observant",
- "observasion", "observations",
- "observating", "observation",
- "observerats", "observers",
- "obsessivley", "obsessive",
- "obstruccion", "obstruction",
- "obstruktion", "obstruction",
- "obsturction", "obstruction",
- "obversation", "observation",
- "ocasionally", "occasionally",
- "ocassionaly", "occasionally",
- "occasionals", "occasions",
- "occasionaly", "occasionally",
- "occasionnal", "occasional",
- "occassional", "occasional",
- "occassioned", "occasioned",
- "occurrances", "occurrences",
- "offensivley", "offensively",
- "offesnively", "offensively",
- "officiallly", "officially",
- "olbiterated", "obliterated",
- "omniscienct", "omniscient",
- "operacional", "operational",
- "operasional", "operational",
- "operationel", "operational",
- "oppresssing", "oppressing",
- "oppresssion", "oppression",
- "opprotunity", "opportunity",
- "optimisitic", "optimistic",
- "optimizaton", "optimization",
- "orchestraed", "orchestrated",
- "orchestrial", "orchestra",
- "oreintation", "orientation",
- "organisaton", "organisation",
- "organiserad", "organised",
- "organistion", "organisation",
- "organizarea", "organizer",
- "organizarem", "organizer",
- "organizarme", "organizer",
- "organizarte", "organizer",
- "organiztion", "organization",
- "oridinarily", "ordinarily",
- "orientacion", "orientation",
- "originially", "originally",
- "originnally", "originally",
- "origniality", "originality",
- "ostensiably", "ostensibly",
- "ostensibily", "ostensibly",
- "outclasssed", "outclassed",
- "outnunbered", "outnumbered",
- "outperfroms", "outperform",
- "outpreforms", "outperform",
- "outrageosly", "outrageously",
- "outrageouly", "outrageously",
- "outragerous", "outrageous",
- "outskirters", "outskirts",
- "outsorucing", "outsourcing",
- "outsourcade", "outsourced",
- "outsoursing", "outsourcing",
- "overbraking", "overbearing",
- "overcapping", "overlapping",
- "overcharing", "overarching",
- "overclcoked", "overclocked",
- "overclicked", "overclocked",
- "overcloaked", "overclocked",
- "overclocing", "overclocking",
- "overclockig", "overclocking",
- "overclocled", "overclocked",
- "overcomeing", "overcoming",
- "overcomming", "overcoming",
- "overeaching", "overarching",
- "overfapping", "overlapping",
- "overheading", "overheating",
- "overhooking", "overlooking",
- "overhwelmed", "overwhelmed",
- "overkapping", "overlapping",
- "overklocked", "overclocked",
- "overlapsing", "overlapping",
- "overlcocked", "overclocked",
- "overlcoking", "overlooking",
- "overlooming", "overlooking",
- "overloooked", "overlooked",
- "overlordess", "overlords",
- "overmapping", "overlapping",
- "overpooling", "overlooking",
- "overpovered", "overpowered",
- "overpoweing", "overpowering",
- "overreacing", "overreacting",
- "overreactin", "overreaction",
- "overreacton", "overreaction",
- "overshaddow", "overshadowed",
- "overshadowd", "overshadowed",
- "overtapping", "overlapping",
- "overthining", "overthinking",
- "overthinkig", "overthinking",
- "overvlocked", "overclocked",
- "overwealmed", "overwhelmed",
- "overwelming", "overwhelming",
- "overwhelemd", "overwhelmed",
- "overwhelimg", "overwhelm",
- "overwheling", "overwhelming",
- "overwhemled", "overwhelmed",
- "overwhlemed", "overwhelmed",
- "overwritted", "overwrite",
- "pakistanais", "pakistani",
- "pakistanezi", "pakistani",
- "palceholder", "placeholder",
- "palesitnian", "palestinians",
- "palestenian", "palestinian",
- "palestinain", "palestinians",
- "palestinans", "palestinians",
- "palestinier", "palestine",
- "palistinian", "palestinian",
- "palythrough", "playthrough",
- "papanicalou", "papanicolaou",
- "parachutage", "parachute",
- "paragraphes", "paragraphs",
- "paramedicks", "paramedics",
- "paramedicos", "paramedics",
- "parameteres", "parameters",
- "paranthesis", "parenthesis",
- "parapharsed", "paraphrase",
- "paraprhased", "paraphrase",
- "parasitisme", "parasites",
- "parenthasis", "parenthesis",
- "parenthesys", "parentheses",
- "parenthises", "parenthesis",
- "parenthisis", "parenthesis",
- "parliamenty", "parliamentary",
- "parntership", "partnership",
- "parrallelly", "parallelly",
- "partecipant", "participant",
- "partecipate", "participate",
- "parternship", "partnership",
- "partiarchal", "patriarchal",
- "particapate", "participate",
- "particiapte", "participate",
- "participait", "participant",
- "participans", "participants",
- "participare", "participate",
- "participatd", "participant",
- "participati", "participant",
- "participats", "participant",
- "participent", "participant",
- "particpiate", "participated",
- "particually", "particularly",
- "particulaly", "particularly",
- "particulary", "particularly",
- "partnetship", "partnership",
- "partonizing", "patronizing",
- "passionatly", "passionately",
- "passionetly", "passionately",
- "passionnate", "passionate",
- "passporters", "passports",
- "pathologial", "pathological",
- "patriarchia", "patriarchal",
- "patriarcial", "patriarchal",
- "patriarical", "patriarchal",
- "patriotisch", "patriotic",
- "patriotisim", "patriotism",
- "patriottism", "patriotism",
- "patronozing", "patronizing",
- "peacefullly", "peacefully",
- "pedestirans", "pedestrians",
- "pedestrains", "pedestrians",
- "pedophilies", "pedophile",
- "pedophilles", "pedophile",
- "penetracion", "penetration",
- "penetrading", "penetrating",
- "penetrarion", "penetration",
- "penninsular", "peninsular",
- "pennsylvnia", "pennsylvania",
- "pepperocini", "pepperoni",
- "percantages", "percentages",
- "percautions", "precautions",
- "percentille", "percentile",
- "percpetions", "perceptions",
- "percusssion", "percussion",
- "perdicament", "predicament",
- "perdictable", "predictable",
- "perdictions", "predictions",
- "perephirals", "peripherals",
- "pereptually", "perpetually",
- "perferences", "preferences",
- "perfomrance", "performances",
- "perforamnce", "performances",
- "performaces", "performances",
- "performacne", "performances",
- "performanes", "performances",
- "performanse", "performances",
- "performence", "performance",
- "performnace", "performances",
- "perfromance", "performance",
- "perhiperals", "peripherals",
- "perihperals", "peripherals",
- "periodicaly", "periodically",
- "periperhals", "peripherals",
- "periphereal", "peripheral",
- "peripherial", "peripheral",
- "periphirals", "peripherals",
- "periphreals", "peripherals",
- "periphrials", "peripherals",
- "perjorative", "pejorative",
- "perliminary", "preliminary",
- "permamently", "permanently",
- "permanantly", "permanently",
- "permaturely", "prematurely",
- "permenantly", "permanently",
- "permenently", "permanently",
- "perminantly", "permanently",
- "perminently", "permanently",
- "permisisons", "permissions",
- "permissable", "permissible",
- "permisssion", "permissions",
- "pernamently", "permanently",
- "perosnality", "personality",
- "perparation", "preparation",
- "perpatrated", "perpetrated",
- "perpatrator", "perpetrator",
- "perpatuated", "perpetuated",
- "perpatuates", "perpetuates",
- "perpertated", "perpetuated",
- "perpertator", "perpetrators",
- "perpetraded", "perpetrated",
- "perpetrador", "perpetrator",
- "perpetraron", "perpetrator",
- "perpetrater", "perpetrator",
- "perpetuaded", "perpetuated",
- "perpetutate", "perpetuate",
- "perpetuties", "perpetuates",
- "perpitrated", "perpetrated",
- "perpitrator", "perpetrator",
- "perpretated", "perpetrated",
- "perpretator", "perpetrators",
- "perpsective", "perspective",
- "perputrator", "perpetrator",
- "perputually", "perpetually",
- "perputuated", "perpetuated",
- "perputuates", "perpetuates",
- "perrogative", "prerogative",
- "persceptive", "perspectives",
- "persectuion", "persecution",
- "persecucion", "persecution",
- "persecusion", "persecution",
- "persecutted", "persecuted",
- "persepctive", "perspective",
- "persicution", "persecution",
- "persistance", "persistence",
- "persistante", "persistent",
- "persistense", "persistence",
- "persistente", "persistence",
- "personhoood", "personhood",
- "perspecitve", "perspective",
- "perspectief", "perspective",
- "perspektive", "perspective",
- "persuassion", "persuasion",
- "persuassive", "persuasive",
- "persucution", "persecution",
- "persumption", "presumption",
- "pertubation", "perturbation",
- "pessimestic", "pessimistic",
- "pharamcists", "pharmacist",
- "phenomenona", "phenomena",
- "philadelpha", "philadelphia",
- "philadelpia", "philadelphia",
- "philiphines", "philippines",
- "philippenes", "philippines",
- "philippenis", "philippines",
- "philippides", "philippines",
- "philippinas", "philippines",
- "philippinos", "philippines",
- "philisopher", "philosopher",
- "phillipines", "philippines",
- "philosipher", "philosopher",
- "philosopers", "philosophers",
- "philosophae", "philosopher",
- "philosophia", "philosophical",
- "philosopies", "philosophies",
- "philosphies", "philosophies",
- "philospoher", "philosopher",
- "photograhed", "photographed",
- "photograher", "photographer",
- "photograhic", "photographic",
- "photograhpy", "photography",
- "photograped", "photographed",
- "photograper", "photographer",
- "photograpgh", "photographs",
- "photograpic", "photographic",
- "photogrpahs", "photographs",
- "photogrpahy", "photography",
- "physcedelic", "psychedelic",
- "physciatric", "psychiatric",
- "physcopaths", "psychopaths",
- "piankillers", "painkillers",
- "pilgrimmage", "pilgrimage",
- "pitchforcks", "pitchforks",
- "pitchforkes", "pitchforks",
- "plaestinian", "palestinian",
- "plagiariasm", "plagiarism",
- "planeswaker", "planeswalker",
- "planeswaler", "planeswalker",
- "planeswalkr", "planeswalker",
- "platfromers", "platformer",
- "playhtrough", "playthrough",
- "playthorugh", "playthrough",
- "playthourgh", "playthrough",
- "playthroguh", "playthroughs",
- "playthrougs", "playthroughs",
- "playthrouhg", "playthroughs",
- "playthtough", "playthrough",
- "playtrhough", "playthrough",
- "ploretariat", "proletariat",
- "policitally", "politically",
- "policitians", "politicians",
- "politicains", "politicians",
- "politicanti", "politician",
- "politiciens", "politicians",
- "politiicans", "politician",
- "polititians", "politicians",
- "polyphonyic", "polyphonic",
- "pomegranite", "pomegranate",
- "popluations", "populations",
- "poportional", "proportional",
- "popoulation", "population",
- "porjectiles", "projectiles",
- "porletariat", "proletariat",
- "pornagraphy", "pornography",
- "pornograghy", "pornography",
- "pornograhpy", "pornography",
- "pornograpgy", "pornography",
- "pornogrophy", "pornography",
- "pornogrpahy", "pornography",
- "porportions", "proportions",
- "portestants", "protestants",
- "portuguease", "portuguese",
- "portuguesse", "portuguese",
- "positionial", "positional",
- "positionnal", "positional",
- "positionned", "positioned",
- "positiveity", "positivity",
- "positiviely", "positively",
- "positivisme", "positives",
- "positivisty", "positivity",
- "positivitey", "positivity",
- "positivitiy", "positivity",
- "possesseurs", "possesses",
- "possesssion", "possessions",
- "possestions", "possessions",
- "possiblilty", "possibility",
- "potencially", "potentially",
- "potentailly", "potentially",
- "powerhourse", "powerhouse",
- "powerlifing", "powerlifting",
- "powerliftng", "powerlifting",
- "pracitcally", "practically",
- "practicarlo", "practical",
- "practioners", "practitioners",
- "practitions", "practitioners",
- "pragmatisch", "pragmatic",
- "precausions", "precautions",
- "precedessor", "predecessor",
- "precendence", "precedence",
- "precentages", "percentages",
- "preconceved", "preconceived",
- "preconcieve", "preconceived",
- "precuations", "precautions",
- "predacessor", "predecessor",
- "predecesser", "predecessor",
- "predections", "predictions",
- "predescesor", "predecessors",
- "predesessor", "predecessors",
- "predesposed", "predisposed",
- "predessecor", "predecessor",
- "predicatble", "predictable",
- "predicement", "predicament",
- "predicessor", "predecessor",
- "prediciment", "predicament",
- "predicitons", "predictions",
- "predictible", "predictable",
- "predictious", "predictions",
- "predictment", "predicament",
- "predisposte", "predisposed",
- "predocessor", "predecessor",
- "preferabbly", "preferably",
- "preferabely", "preferable",
- "preferabley", "preferably",
- "preferablly", "preferably",
- "preferances", "preferences",
- "preferenser", "preferences",
- "preferental", "preferential",
- "preferentes", "preferences",
- "preferrably", "preferably",
- "preferrring", "preferring",
- "preformance", "performance",
- "pregnanices", "pregnancies",
- "pregnencies", "pregnancies",
- "pregorative", "prerogative",
- "preipherals", "peripherals",
- "prejudicies", "prejudice",
- "preleminary", "preliminary",
- "prelimanary", "preliminary",
- "prelimenary", "preliminary",
- "premanently", "permanently",
- "prematuraly", "prematurely",
- "prematurily", "prematurely",
- "prematurley", "prematurely",
- "premilinary", "preliminary",
- "premissible", "permissible",
- "premissions", "permissions",
- "preorderded", "preordered",
- "preorderers", "preorders",
- "preparacion", "preparation",
- "preperation", "preparation",
- "prepetrated", "perpetrated",
- "prepetrator", "perpetrator",
- "prepetually", "perpetually",
- "prepetuated", "perpetuated",
- "prepetuates", "perpetuates",
- "preporation", "preparation",
- "preposterus", "preposterous",
- "prerequesit", "prerequisite",
- "prerequiste", "prerequisite",
- "prerequites", "prerequisite",
- "prerogitive", "prerogative",
- "prerogotive", "prerogative",
- "prescripton", "prescription",
- "presecution", "persecution",
- "presedintia", "presidential",
- "presentaion", "presentation",
- "presentatin", "presentations",
- "preservaton", "preservation",
- "preservered", "preserved",
- "presidencey", "presidency",
- "presidental", "presidential",
- "presidentcy", "presidency",
- "presistence", "persistence",
- "presitgious", "prestigious",
- "presitigous", "prestigious",
- "presomption", "presumption",
- "prespective", "perspective",
- "pressureing", "pressuring",
- "prestegious", "prestigious",
- "prestigeous", "prestigious",
- "prestigieus", "prestigious",
- "prestigiosa", "prestigious",
- "prestigiose", "prestigious",
- "prestigiosi", "prestigious",
- "prestigioso", "prestigious",
- "prestiguous", "prestigious",
- "presumabely", "presumably",
- "presumabley", "presumably",
- "presumptous", "presumptuous",
- "presumptuos", "presumptuous",
- "pretencious", "pretentious",
- "pretendendo", "pretended",
- "pretensious", "pretentious",
- "pretentieus", "pretentious",
- "prevailaing", "prevailing",
- "prevailling", "prevailing",
- "preventitve", "preventative",
- "preventivno", "prevention",
- "primatively", "primitively",
- "princessses", "princesses",
- "principales", "principles",
- "principalis", "principals",
- "principielt", "principle",
- "privatizied", "privatized",
- "priveledges", "privileges",
- "privelleges", "privileges",
- "privilegeds", "privileges",
- "privilegied", "privileged",
- "privilegien", "privilege",
- "privilegier", "privilege",
- "privilegies", "privilege",
- "proactivley", "proactive",
- "probabilaty", "probability",
- "probabilite", "probabilities",
- "probalibity", "probability",
- "probelmatic", "problematic",
- "problamatic", "problematic",
- "problimatic", "problematic",
- "problomatic", "problematic",
- "proccedings", "proceedings",
- "proccessing", "processing",
- "proceddings", "proceedings",
- "procedureal", "procedural",
- "procedurial", "procedural",
- "procedurile", "procedure",
- "processesor", "processors",
- "processeurs", "processes",
- "processsors", "processors",
- "procrastion", "procreation",
- "procriation", "procreation",
- "prodcutions", "productions",
- "prodictions", "productions",
- "producerats", "producers",
- "producitons", "productions",
- "productioin", "productions",
- "productivos", "productions",
- "productivty", "productivity",
- "produktions", "productions",
- "professinal", "professional",
- "professionl", "professionals",
- "professoras", "professors",
- "professores", "professors",
- "professorin", "profession",
- "professsion", "professions",
- "proficiancy", "proficiency",
- "proficienct", "proficient",
- "proficienty", "proficiency",
- "proficinecy", "proficiency",
- "profitabile", "profitable",
- "progerssion", "progressions",
- "progerssive", "progressives",
- "programable", "programmable",
- "programmare", "programmer",
- "programmars", "programmers",
- "programmate", "programme",
- "programmets", "programmers",
- "programmeur", "programmer",
- "programmier", "programmer",
- "programmmed", "programme",
- "programmmer", "programme",
- "progresison", "progressions",
- "progressers", "progresses",
- "progressief", "progressive",
- "progressino", "progressions",
- "progressivo", "progression",
- "progressoin", "progressions",
- "progressvie", "progressives",
- "prohabition", "prohibition",
- "prohibation", "prohibition",
- "prohibicion", "prohibition",
- "prohibiteds", "prohibits",
- "prohibitied", "prohibited",
- "prohibitifs", "prohibits",
- "prohibitivo", "prohibition",
- "prohibitons", "prohibits",
- "prohibitted", "prohibited",
- "projecticle", "projectile",
- "projectives", "projectiles",
- "projectlies", "projectiles",
- "prolateriat", "proletariat",
- "proletariet", "proletariat",
- "proletariot", "proletariat",
- "proletaryat", "proletariat",
- "proleteriat", "proletariat",
- "prolitariat", "proletariat",
- "prologomena", "prolegomena",
- "promenantly", "prominently",
- "promenently", "prominently",
- "prometheius", "prometheus",
- "prometheous", "prometheus",
- "promethesus", "prometheus",
- "prometheyus", "prometheus",
- "promimently", "prominently",
- "prominantly", "prominently",
- "prominately", "prominently",
- "promiscious", "promiscuous",
- "promocional", "promotional",
- "promsicuous", "promiscuous",
- "pronography", "pornography",
- "pronoucning", "pronouncing",
- "pronounched", "pronounced",
- "pronunciato", "pronunciation",
- "propaganada", "propaganda",
- "properitary", "proprietary",
- "propertiary", "proprietary",
- "propertions", "proportions",
- "prophechies", "prophecies",
- "propiertary", "proprietary",
- "propogation", "propagation",
- "proponenets", "proponents",
- "proponentes", "proponents",
- "proporition", "proposition",
- "proportians", "proportions",
- "proportinal", "proportional",
- "proposicion", "proposition",
- "propositivo", "proposition",
- "propostions", "proportions",
- "propreitary", "proprietary",
- "propriatary", "proprietary",
- "propriatery", "proprietary",
- "propriatory", "proprietary",
- "proprietery", "proprietary",
- "proprietory", "proprietary",
- "propriotary", "proprietary",
- "proprotions", "proportions",
- "propsective", "prospective",
- "propulstion", "propulsion",
- "prosectuion", "prosecution",
- "prosectuors", "prosecutors",
- "prosecuters", "prosecutors",
- "prosicution", "prosecution",
- "prosocution", "prosecution",
- "prosperious", "prosperous",
- "prospertity", "prosperity",
- "prospettive", "prospective",
- "prostethics", "prosthetic",
- "prosthethic", "prosthetic",
- "prostitites", "prostitutes",
- "prostitiute", "prostitute",
- "prostituate", "prostitute",
- "prostitudes", "prostitutes",
- "prostituees", "prostitutes",
- "prostituion", "prostitution",
- "prostitures", "prostitutes",
- "prostitutas", "prostitutes",
- "prostitutie", "prostitute",
- "prostitutin", "prostitution",
- "prostitutke", "prostitutes",
- "prostituton", "prostitution",
- "prostitutos", "prostitutes",
- "protability", "portability",
- "protaganist", "protagonist",
- "protaginist", "protagonist",
- "protagnoist", "protagonist",
- "protagoinst", "protagonists",
- "protagonits", "protagonists",
- "protagonsit", "protagonists",
- "protectings", "protections",
- "protectoras", "protectors",
- "protectores", "protectors",
- "protectrons", "protections",
- "protelariat", "proletariat",
- "protestents", "protestants",
- "protistants", "protestants",
- "protoganist", "protagonist",
- "protogonist", "protagonist",
- "protostants", "protestants",
- "protototype", "prototype",
- "provacative", "provocative",
- "provacotive", "provocative",
- "provicative", "provocative",
- "providencie", "providence",
- "provinciaal", "provincial",
- "provinicial", "provincial",
- "provisiones", "provisions",
- "provoactive", "provocative",
- "provocatief", "provocative",
- "provocitive", "provocative",
- "provocotive", "provocative",
- "provokative", "provocative",
- "pscyhedelic", "psychedelic",
- "pscyhiatric", "psychiatric",
- "pscyhopaths", "psychopaths",
- "pshyciatric", "psychiatric",
- "pshycopaths", "psychopaths",
- "psychaitric", "psychiatric",
- "psychedilic", "psychedelic",
- "psychedleic", "psychedelics",
- "psychiatist", "psychiatrist",
- "psychidelic", "psychedelic",
- "psychodelic", "psychedelic",
- "psychopants", "psychopaths",
- "psychopatch", "psychopath",
- "psychopatic", "psychopathic",
- "psychotisch", "psychotic",
- "psychriatic", "psychiatric",
- "publikation", "publication",
- "punctiation", "punctuation",
- "puncutation", "punctuation",
- "punshiments", "punishments",
- "punsihments", "punishments",
- "purchaseing", "purchasing",
- "purchashing", "purchasing",
- "purposefuly", "purposefully",
- "pyschedelic", "psychedelic",
- "pyschiatric", "psychiatric",
- "pyschopaths", "psychopaths",
- "qaurterback", "quarterback",
- "qualificato", "qualification",
- "qualifieres", "qualifiers",
- "quantitaive", "quantitative",
- "quantitatve", "quantitative",
- "quantitites", "quantities",
- "quantitties", "quantities",
- "quarantaine", "quarantine",
- "quarantenni", "quarantine",
- "quartercask", "quarterbacks",
- "quesitoning", "questioning",
- "questionned", "questioned",
- "questonable", "questionable",
- "radiaoctive", "radioactive",
- "radioactice", "radioactive",
- "radioactief", "radioactive",
- "radioaktive", "radioactive",
- "radiocative", "radioactive",
- "raidoactive", "radioactive",
- "reaccurring", "recurring",
- "reactionair", "reactionary",
- "realibility", "reliability",
- "realistisch", "realistic",
- "reaserchers", "researchers",
- "reaserching", "researching",
- "reasonabley", "reasonably",
- "reasonablly", "reasonably",
- "reassureing", "reassuring",
- "reassurring", "reassuring",
- "rebuildling", "rebuilding",
- "rebuplicans", "republicans",
- "reccomended", "recommended",
- "receptionst", "receptionist",
- "recgonition", "recognition",
- "recgonizing", "recognizing",
- "rechargable", "rechargeable",
- "recipientes", "recipients",
- "reciporcate", "reciprocate",
- "recipricate", "reciprocate",
- "reciprocant", "reciprocate",
- "reciprocite", "reciprocate",
- "recivership", "receivership",
- "reclutantly", "reluctantly",
- "recognicing", "recognizing",
- "recognision", "recognition",
- "recomending", "recommending",
- "recommandes", "recommends",
- "recommendes", "recommends",
- "recommented", "recommended",
- "reconcilled", "reconcile",
- "recongition", "recognition",
- "recongizing", "recognizing",
- "reconsidder", "reconsider",
- "recrational", "recreational",
- "recrutiment", "recruitment",
- "rectangluar", "rectangular",
- "rectangualr", "rectangular",
- "rectengular", "rectangular",
- "recuritment", "recruitment",
- "redundantcy", "redundancy",
- "reevalulate", "reevaluate",
- "reevalutate", "reevaluate",
- "reevaulated", "reevaluate",
- "refelctions", "reflections",
- "referancing", "referencing",
- "refereneced", "referenced",
- "refereneces", "references",
- "referincing", "referencing",
- "referrences", "references",
- "reflectivos", "reflections",
- "refreshener", "refresher",
- "refrubished", "refurbished",
- "refubrished", "refurbished",
- "refurbushed", "refurbished",
- "regeneratin", "regeneration",
- "regeneraton", "regeneration",
- "registerdns", "registers",
- "registeries", "registers",
- "registerred", "registered",
- "registraion", "registration",
- "regocnition", "recognition",
- "regresssion", "regression",
- "regresssive", "regressive",
- "regualtions", "regulations",
- "regulationg", "regulating",
- "regulatiors", "regulators",
- "reinassance", "renaissance",
- "reinforcemt", "reinforcement",
- "reinfornced", "reinforced",
- "reinitalise", "reinitialise",
- "reinitalize", "reinitialize",
- "reinstaling", "reinstalling",
- "reinstallng", "reinstalling",
- "reisntalled", "reinstalled",
- "relaibility", "reliability",
- "relatiation", "retaliation",
- "relationshp", "relationships",
- "relativiser", "relatives",
- "relativisme", "relatives",
- "relativitiy", "relativity",
- "relativitly", "relativity",
- "relcutantly", "reluctantly",
- "relentlesly", "relentlessly",
- "relentlessy", "relentlessly",
- "relevations", "revelations",
- "relfections", "reflections",
- "religeously", "religiously",
- "religionens", "religions",
- "religioners", "religions",
- "relpacement", "replacement",
- "reluctently", "reluctantly",
- "remarkabley", "remarkably",
- "remarkablly", "remarkably",
- "remasterred", "remastered",
- "remembrence", "remembrance",
- "reminescent", "reminiscent",
- "reminicient", "reminiscent",
- "reminiscant", "reminiscent",
- "reminiscint", "reminiscent",
- "reminscient", "reminiscent",
- "reminsicent", "reminiscent",
- "renaiisance", "renaissance",
- "renaiscance", "renaissance",
- "renaissanse", "renaissance",
- "renaissence", "renaissance",
- "renassaince", "renaissance",
- "renassiance", "renaissance",
- "reniassance", "renaissance",
- "rennovating", "renovating",
- "rennovation", "renovation",
- "repalcement", "replacement",
- "repbulicans", "republicans",
- "repeateadly", "repeatedly",
- "repectively", "respectively",
- "repersented", "represented",
- "replacemnet", "replacements",
- "replacemnts", "replacements",
- "repleacable", "replaceable",
- "repositiory", "repository",
- "representas", "represents",
- "representes", "represents",
- "represssion", "repression",
- "reproducion", "reproduction",
- "reproducive", "reproductive",
- "repsectable", "respectable",
- "repsonsible", "responsible",
- "repsonsibly", "responsibly",
- "republcians", "republicans",
- "republician", "republican",
- "republicons", "republicans",
- "repuglicans", "republicans",
- "requeriment", "requirement",
- "requierment", "requirements",
- "resemblence", "resemblance",
- "resemblense", "resembles",
- "reserachers", "researchers",
- "reseraching", "researching",
- "resgination", "resignation",
- "residencial", "residential",
- "residentail", "residential",
- "residentual", "residential",
- "resignacion", "resignation",
- "resignating", "resignation",
- "resignement", "resignment",
- "resignition", "resignation",
- "resintalled", "reinstalled",
- "resistansen", "resistances",
- "resistanses", "resistances",
- "resistences", "resistances",
- "resistnaces", "resistances",
- "resoltuions", "resolutions",
- "resotration", "restoration",
- "resoultions", "resolutions",
- "respecatble", "respectable",
- "respectabil", "respectable",
- "respectfuly", "respectfully",
- "respectible", "respectable",
- "respectivly", "respectively",
- "respectuful", "respectful",
- "respektable", "respectable",
- "resperatory", "respiratory",
- "resperitory", "respiratory",
- "respiritory", "respiratory",
- "respitatory", "respiratory",
- "responcible", "responsible",
- "responcibly", "responsibly",
- "respondendo", "responded",
- "responisble", "responsible",
- "responisbly", "responsibly",
- "responsable", "responsible",
- "responsably", "responsibly",
- "responsbile", "responsible",
- "responsbily", "responsibly",
- "responsibel", "responsibly",
- "responsibil", "responsibly",
- "responsivle", "responsive",
- "resporatory", "respiratory",
- "respository", "repository",
- "respriatory", "respiratory",
- "ressembling", "resembling",
- "ressurected", "resurrected",
- "restaraunts", "restaurants",
- "restaruants", "restaurants",
- "restauraunt", "restaurant",
- "restaurents", "restaurants",
- "resteraunts", "restaurants",
- "restirction", "restriction",
- "restorarion", "restoration",
- "restorating", "restoration",
- "restrainted", "restrained",
- "restrective", "restrictive",
- "restriccion", "restriction",
- "restricitng", "restricting",
- "restriciton", "restrictions",
- "restricitve", "restrictive",
- "restricteds", "restricts",
- "restricters", "restricts",
- "restrictied", "restrictive",
- "restrictifs", "restricts",
- "restrictins", "restricts",
- "restrictios", "restricts",
- "restrictivo", "restriction",
- "restrictons", "restricts",
- "restriktion", "restriction",
- "restriktive", "restrictive",
- "restrittive", "restrictive",
- "restructing", "restricting",
- "restruction", "restriction",
- "restuarants", "restaurants",
- "resturaunts", "restaurants",
- "resurecting", "resurrecting",
- "resurrecion", "resurrection",
- "retailation", "retaliation",
- "retalitated", "retaliated",
- "retardathon", "retardation",
- "retardating", "retardation",
- "retardatron", "retardation",
- "retartation", "retardation",
- "retirbution", "retribution",
- "retrebution", "retribution",
- "retribucion", "retribution",
- "retribuiton", "retribution",
- "retributivo", "retribution",
- "retribvtion", "retribution",
- "retrobution", "retribution",
- "retrubution", "retribution",
- "revealtions", "revelations",
- "revelaitons", "revelations",
- "revolations", "revolutions",
- "revoultions", "revolutions",
- "ridiculious", "ridiculous",
- "ridiculosly", "ridiculously",
- "ridiculouly", "ridiculously",
- "ridiculousy", "ridiculously",
- "rightfullly", "rightfully",
- "rolepalying", "roleplaying",
- "romanticaly", "romantically",
- "roundabaout", "roundabout",
- "roundabount", "roundabout",
- "rudimentery", "rudimentary",
- "rudimentory", "rudimentary",
- "ruidmentary", "rudimentary",
- "sacrifacing", "sacrificing",
- "sacrificare", "sacrifice",
- "sacrificied", "sacrifice",
- "sacrificies", "sacrifice",
- "sacrifieced", "sacrificed",
- "sacrifising", "sacrificing",
- "sacrifizing", "sacrificing",
- "salughtered", "slaughtered",
- "sanctionned", "sanctioned",
- "sarcastisch", "sarcastic",
- "saskatchewn", "saskatchewan",
- "saskatchwan", "saskatchewan",
- "satisfacion", "satisfaction",
- "satisfacory", "satisfactory",
- "scandanavia", "scandinavia",
- "scandanivia", "scandinavian",
- "scandenavia", "scandinavia",
- "scandianvia", "scandinavian",
- "scandimania", "scandinavia",
- "scandinaiva", "scandinavian",
- "scandinavan", "scandinavian",
- "scandivania", "scandinavian",
- "scandonavia", "scandinavia",
- "scarificing", "sacrificing",
- "scheduleing", "scheduling",
- "schedulling", "scheduling",
- "schoalrship", "scholarships",
- "scholarhips", "scholarship",
- "scholarstic", "scholastic",
- "scholership", "scholarship",
- "scholorship", "scholarship",
- "scientiests", "scientists",
- "scnadinavia", "scandinavia",
- "scrambleing", "scrambling",
- "screenshoot", "screenshot",
- "seamlessley", "seamlessly",
- "sedentarity", "sedentary",
- "seflishness", "selfishness",
- "segergation", "segregation",
- "segragation", "segregation",
- "segregacion", "segregation",
- "segretation", "segregation",
- "segrigation", "segregation",
- "selectivley", "selectively",
- "selfeshness", "selfishness",
- "senitmental", "sentimental",
- "sensacional", "sensational",
- "sensasional", "sensational",
- "sensationel", "sensational",
- "sensetional", "sensational",
- "sensitivety", "sensitivity",
- "sentamental", "sentimental",
- "sentemental", "sentimental",
- "sentenceing", "sentencing",
- "sentimentos", "sentiments",
- "sentimentul", "sentimental",
- "separatedly", "separately",
- "separatelly", "separately",
- "separatisme", "separates",
- "separatiste", "separates",
- "sepculating", "speculating",
- "serivceable", "serviceable",
- "serviciable", "serviceable",
- "settelement", "settlement",
- "settelments", "settlements",
- "settlemetns", "settlements",
- "sexualizied", "sexualized",
- "shakeapeare", "shakespeare",
- "shakepseare", "shakespeare",
- "shakesphere", "shakespeare",
- "shanenigans", "shenanigans",
- "shareholdes", "shareholders",
- "sharpeneing", "sharpening",
- "sharpenning", "sharpening",
- "shatterling", "shattering",
- "shatterring", "shattering",
- "sheakspeare", "shakespeare",
- "shenadigans", "shenanigans",
- "shenanagans", "shenanigans",
- "shenanagins", "shenanigans",
- "shenanegans", "shenanigans",
- "shenanegins", "shenanigans",
- "shenangians", "shenanigans",
- "shenanigens", "shenanigans",
- "shenanigins", "shenanigans",
- "shenenigans", "shenanigans",
- "sheninigans", "shenanigans",
- "shennaigans", "shenanigans",
- "shortenning", "shortening",
- "shortenting", "shortening",
- "signficiant", "significant",
- "signifantly", "significantly",
- "significane", "significance",
- "significato", "significant",
- "signifigant", "significant",
- "signifikant", "significant",
- "signitories", "signatories",
- "signularity", "singularity",
- "similarites", "similarities",
- "similarlity", "similarity",
- "similiarity", "similarity",
- "simluations", "simulations",
- "simplefying", "simplifying",
- "simplicitly", "simplicity",
- "simplifiing", "simplifying",
- "simplisitic", "simplistic",
- "simplyifing", "simplifying",
- "simualtions", "simulations",
- "simulatious", "simulations",
- "simultaneos", "simultaneous",
- "simultaneus", "simultaneous",
- "simultanous", "simultaneous",
- "singluarity", "singularity",
- "singualrity", "singularity",
- "singulairty", "singularity",
- "singularily", "singularity",
- "sitautional", "situational",
- "situacional", "situational",
- "situationly", "situational",
- "siutational", "situational",
- "skatebaords", "skateboard",
- "skateboader", "skateboard",
- "skepticisim", "skepticism",
- "skillshoots", "skillshots",
- "skillshosts", "skillshots",
- "slaugthered", "slaughtered",
- "slefishness", "selfishness",
- "sluaghtered", "slaughtered",
- "smarthpones", "smartphones",
- "snowboaring", "snowboarding",
- "snowbolling", "snowballing",
- "snowfalling", "snowballing",
- "socailizing", "socializing",
- "socialicing", "socializing",
- "socialistes", "socialists",
- "socialistos", "socialists",
- "socializare", "socialize",
- "sociapathic", "sociopathic",
- "sociologial", "sociological",
- "sociopathes", "sociopaths",
- "sociopathis", "sociopaths",
- "sociophatic", "sociopathic",
- "solidariety", "solidarity",
- "somethingis", "somethings",
- "sorrounding", "surrounding",
- "soundtrakcs", "soundtracks",
- "southamtpon", "southampton",
- "southanpton", "southampton",
- "southapmton", "southampton",
- "southernese", "southerners",
- "southerness", "southerners",
- "southernest", "southerners",
- "southernors", "southerners",
- "southmapton", "southampton",
- "southtampon", "southampton",
- "soveregnity", "sovereignty",
- "sovereighty", "sovereignty",
- "sovereingty", "sovereignty",
- "sovereinity", "sovereignty",
- "soveriegnty", "sovereignty",
- "soveriengty", "sovereignty",
- "soverignity", "sovereignty",
- "specailists", "specialists",
- "specailized", "specialized",
- "specailizes", "specializes",
- "specatcular", "spectacular",
- "specialiced", "specialized",
- "specialices", "specializes",
- "specialites", "specializes",
- "speciallist", "specialist",
- "speciallity", "specially",
- "speciallize", "specialize",
- "specialzied", "specialized",
- "specifcally", "specifically",
- "specificaly", "specifically",
- "specificato", "specification",
- "specificies", "specifics",
- "specifiying", "specifying",
- "specilaized", "specialize",
- "speciliazed", "specialize",
- "spectatores", "spectators",
- "spectatular", "spectacular",
- "spectauclar", "spectacular",
- "spectaulars", "spectaculars",
- "spectecular", "spectacular",
- "specualting", "speculating",
- "specualtion", "speculation",
- "specualtive", "speculative",
- "specularite", "speculative",
- "speculaties", "speculative",
- "spiritualiy", "spiritually",
- "spiritualty", "spirituality",
- "spirituella", "spiritually",
- "spirtiually", "spiritually",
- "spirutually", "spiritually",
- "spitirually", "spiritually",
- "sponatenous", "spontaneous",
- "sponatneous", "spontaneous",
- "sponsership", "sponsorship",
- "sponsorhips", "sponsorship",
- "sponsorhsip", "sponsorship",
- "sponsorshop", "sponsorship",
- "spontaenous", "spontaneous",
- "spontainous", "spontaneous",
- "spontaneuos", "spontaneous",
- "spontanious", "spontaneous",
- "sponteanous", "spontaneous",
- "sponteneous", "spontaneous",
- "spreadhseet", "spreadsheet",
- "spreadsheat", "spreadsheet",
- "spreadshets", "spreadsheets",
- "spreedsheet", "spreadsheet",
- "springfeild", "springfield",
- "springfiled", "springfield",
- "sprinklered", "sprinkled",
- "squirrelies", "squirrels",
- "squirrelius", "squirrels",
- "stabilizare", "stabilize",
- "stabilizied", "stabilize",
- "stabilizier", "stabilize",
- "stabilizies", "stabilize",
- "staggerring", "staggering",
- "staggerwing", "staggering",
- "stationairy", "stationary",
- "stationerad", "stationed",
- "stationnary", "stationary",
- "statisitcal", "statistical",
- "statisticly", "statistical",
- "statistisch", "statistics",
- "statsitical", "statistical",
- "stereotpyes", "stereotypes",
- "stereotying", "stereotyping",
- "steriotypes", "stereotypes",
- "steroetypes", "stereotypes",
- "steryotypes", "stereotypes",
- "stimluating", "stimulating",
- "stimualting", "stimulating",
- "stimualtion", "stimulation",
- "stimulantes", "stimulants",
- "stockpilled", "stockpile",
- "stormfrount", "stormfront",
- "storyteling", "storytelling",
- "straightden", "straightened",
- "straightend", "straightened",
- "straightmen", "straighten",
- "straightned", "straightened",
- "straightner", "straighten",
- "strangeshit", "strangest",
- "strategisch", "strategic",
- "strategiske", "strategies",
- "strawberies", "strawberries",
- "strawberrry", "strawberry",
- "strawbrerry", "strawberry",
- "strenghened", "strengthened",
- "strenghtend", "strengthen",
- "strenghtens", "strengthen",
- "strengtened", "strengthened",
- "structurels", "structures",
- "strugglebus", "struggles",
- "struggleing", "struggling",
- "stubborness", "stubbornness",
- "stutterring", "stuttering",
- "subcatagory", "subcategory",
- "subconscius", "subconscious",
- "subconscous", "subconscious",
- "subisdizing", "subsidizing",
- "subjectivly", "subjectively",
- "submergered", "submerged",
- "submisisons", "submissions",
- "subredddits", "subreddits",
- "subscirbers", "subscribers",
- "subscribbed", "subscribe",
- "subscribber", "subscriber",
- "subscriping", "subscribing",
- "subscriptin", "subscriptions",
- "subscripton", "subscription",
- "subsequenty", "subsequently",
- "subsidiezed", "subsidized",
- "subsidizied", "subsidized",
- "subsidizies", "subsidize",
- "subsiziding", "subsidizing",
- "subsquently", "subsequently",
- "subsrcibers", "subscribers",
- "substancial", "substantial",
- "substansial", "substantial",
- "substansive", "substantive",
- "substantied", "substantive",
- "substanties", "substantive",
- "substential", "substantial",
- "substitiute", "substitute",
- "substituded", "substituted",
- "substitudes", "substitutes",
- "substituion", "substitution",
- "substitures", "substitutes",
- "substitutie", "substitutes",
- "substitutos", "substitutes",
- "substitutue", "substitutes",
- "substracted", "subtracted",
- "suburburban", "suburban",
- "succesfully", "successfully",
- "successeurs", "successes",
- "successfull", "successful",
- "successfuly", "successfully",
- "successsion", "succession",
- "successully", "successfully",
- "succsesfull", "successfully",
- "sucessfully", "successfully",
- "sucseptible", "susceptible",
- "sufficently", "sufficiently",
- "suggestieve", "suggestive",
- "sumbissions", "submissions",
- "sunglassses", "sunglasses",
- "superceeded", "superseded",
- "superficiel", "superficial",
- "superfulous", "superfluous",
- "superhereos", "superhero",
- "superifical", "superficial",
- "superiorest", "superiors",
- "supermacist", "supremacist",
- "supermakert", "supermarkets",
- "supermakret", "supermarkets",
- "supermakter", "supermarkets",
- "supermarkts", "supermarkets",
- "supermaster", "supermarkets",
- "supernatual", "supernatural",
- "supersition", "supervision",
- "superstiton", "superstition",
- "supervisers", "supervisors",
- "supervisior", "supervisor",
- "suplimented", "supplemented",
- "supplaments", "supplements",
- "supplemetal", "supplemental",
- "supporteurs", "supporters",
- "supposedely", "supposedly",
- "supposidely", "supposedly",
- "supposingly", "supposedly",
- "suppresions", "suppression",
- "suppresssor", "suppressor",
- "supramacist", "supremacist",
- "supremacits", "supremacist",
- "supremasist", "supremacist",
- "supremicist", "supremacist",
- "suprimacist", "supremacist",
- "suprisingly", "surprisingly",
- "suprizingly", "surprisingly",
- "suroundings", "surroundings",
- "surpemacist", "supremacist",
- "surprisinly", "surprisingly",
- "surreptious", "surreptitious",
- "surroundign", "surroundings",
- "surroundigs", "surrounds",
- "surroundins", "surrounds",
- "surroundngs", "surrounds",
- "surveilence", "surveillance",
- "survivabily", "survivability",
- "susbtantial", "substantial",
- "susbtantive", "substantive",
- "suscepitble", "susceptible",
- "susceptable", "susceptible",
- "suscpetible", "susceptible",
- "susecptible", "susceptible",
- "suspectible", "susceptible",
- "suspiciosly", "suspiciously",
- "suspiciouly", "suspiciously",
- "suspiciouns", "suspicion",
- "suspicision", "suspicions",
- "suspicisons", "suspicions",
- "sustainible", "sustainable",
- "switerzland", "switzerland",
- "switserland", "switzerland",
- "switzlerand", "switzerland",
- "swizterland", "switzerland",
- "swtizerland", "switzerland",
- "symapthetic", "sympathetic",
- "symmertical", "symmetrical",
- "sympathatic", "sympathetic",
- "sympathiers", "sympathizers",
- "sympathsize", "sympathize",
- "sympethetic", "sympathetic",
- "symphatetic", "sympathetic",
- "symphatized", "sympathize",
- "symphatizer", "sympathizers",
- "symphatizes", "sympathize",
- "sympothetic", "sympathetic",
- "synthesasia", "synthesis",
- "synthesesia", "synthesis",
- "sypmathetic", "sympathetic",
- "tabelspoons", "tablespoons",
- "tablepsoons", "tablespoons",
- "tablespooon", "tablespoon",
- "tablesppons", "tablespoons",
- "tailgateing", "tailgating",
- "tailgatting", "tailgating",
- "tangentialy", "tangentially",
- "techincally", "technically",
- "techincians", "technicians",
- "techiniques", "techniques",
- "techncially", "technically",
- "technicalty", "technicality",
- "technichian", "technician",
- "technicials", "technicians",
- "techniciens", "technicians",
- "technitians", "technicians",
- "technnology", "technology",
- "technologia", "technological",
- "techticians", "technicians",
- "teleportato", "teleportation",
- "teleportion", "teleporting",
- "teleproting", "teleporting",
- "temeprature", "temperature",
- "temparament", "temperament",
- "temparature", "temperature",
- "temparement", "temperament",
- "tempearture", "temperatures",
- "temperamant", "temperament",
- "temperarily", "temporarily",
- "temperatues", "temperatures",
- "temperaturs", "temperatures",
- "temperatuur", "temperature",
- "temperement", "temperament",
- "tempermeant", "temperament",
- "tempertaure", "temperature",
- "temporairly", "temporarily",
- "temporaraly", "temporarily",
- "temporarity", "temporarily",
- "tempreature", "temperature",
- "temproarily", "temporarily",
- "tempurature", "temperature",
- "tepmorarily", "temporarily",
- "termanology", "terminology",
- "terminacion", "termination",
- "terminaison", "termination",
- "terminalogy", "terminology",
- "terminatior", "terminator",
- "terminatorn", "termination",
- "terminilogy", "terminology",
- "terminoligy", "terminology",
- "terratorial", "territorial",
- "terratories", "territories",
- "terretorial", "territorial",
- "terretories", "territories",
- "terrirorial", "territorial",
- "terrirories", "territories",
- "terriroties", "territories",
- "terristrial", "territorial",
- "territoires", "territories",
- "territorist", "terrorist",
- "territority", "territory",
- "terroristas", "terrorists",
- "terroristes", "terrorists",
- "terrorities", "territories",
- "terrotorial", "territorial",
- "terrotories", "territories",
- "testiclular", "testicular",
- "thankfullly", "thankfully",
- "thanksgivng", "thanksgiving",
- "theoligical", "theological",
- "theoratical", "theoretical",
- "theoreticly", "theoretical",
- "theoritical", "theoretical",
- "therapautic", "therapeutic",
- "therapeudic", "therapeutic",
- "therapeutuc", "therapeutic",
- "therapuetic", "therapeutic",
- "theraupetic", "therapeutic",
- "thereaputic", "therapeutic",
- "thereotical", "theoretical",
- "therepeutic", "therapeutic",
- "thermometor", "thermometer",
- "thermometre", "thermometer",
- "thermomiter", "thermometer",
- "thermomoter", "thermometer",
- "thermoneter", "thermometer",
- "thermostaat", "thermostat",
- "theroetical", "theoretical",
- "thoeretical", "theoretical",
- "threataning", "threatening",
- "threatended", "threatened",
- "threatining", "threatening",
- "throttleing", "throttling",
- "throughoput", "throughput",
- "throughtout", "throughout",
- "throughtput", "throughput",
- "thudnerbolt", "thunderbolt",
- "thunberbolt", "thunderbolt",
- "thunderblot", "thunderbolt",
- "thunderboat", "thunderbolt",
- "thunderbots", "thunderbolt",
- "thunderbowl", "thunderbolt",
- "thunderjolt", "thunderbolt",
- "thundervolt", "thunderbolt",
- "tightenting", "tightening",
- "tocuhscreen", "touchscreen",
- "torrentking", "torrenting",
- "torrentting", "torrenting",
- "torublesome", "troublesome",
- "torunaments", "tournaments",
- "totalitaran", "totalitarian",
- "totalitarni", "totalitarian",
- "touranments", "tournaments",
- "tournamnets", "tournaments",
- "tournemants", "tournaments",
- "tournements", "tournaments",
- "tournmanets", "tournaments",
- "tradicional", "traditional",
- "tradionally", "traditionally",
- "tradisional", "traditional",
- "traditionel", "traditional",
- "traditition", "tradition",
- "tragicallly", "tragically",
- "tramautized", "traumatized",
- "tramuatized", "traumatized",
- "trancendent", "transcendent",
- "trancending", "transcending",
- "tranclucent", "translucent",
- "trandgender", "transgender",
- "tranditions", "transitions",
- "tranistions", "transitions",
- "tranlastion", "translations",
- "tranlsating", "translating",
- "tranlsation", "translation",
- "tranluscent", "translucent",
- "trannsexual", "transsexual",
- "tranpshobic", "transphobic",
- "transaccion", "transaction",
- "transaciton", "transactions",
- "transalting", "translating",
- "transaltion", "translation",
- "transations", "transitions",
- "transcluent", "translucent",
- "transcripto", "transcription",
- "transctions", "transitions",
- "transculent", "translucent",
- "transending", "transcending",
- "transfender", "transgender",
- "transferers", "transfers",
- "transfering", "transferring",
- "transfersom", "transforms",
- "transfomers", "transforms",
- "transformas", "transforms",
- "transformes", "transformers",
- "transformis", "transforms",
- "transformus", "transforms",
- "transforums", "transforms",
- "transfromed", "transformed",
- "transfromer", "transformers",
- "transgemder", "transgender",
- "transgended", "transgendered",
- "transgenger", "transgender",
- "transgenres", "transgender",
- "transhpobic", "transphobic",
- "transisions", "transitions",
- "transisitor", "transistor",
- "transistion", "transition",
- "transistior", "transistor",
- "transitiond", "transitioned",
- "transitiong", "transitioning",
- "translatron", "translation",
- "translusent", "translucent",
- "transmatter", "transmitter",
- "transmision", "transmission",
- "transmissin", "transmissions",
- "transmisson", "transmission",
- "transmittor", "transmitter",
- "transmorged", "transformed",
- "transmutter", "transmitter",
- "transofrmed", "transformed",
- "transohobic", "transphobic",
- "transparant", "transparent",
- "transparecy", "transparency",
- "transpareny", "transparency",
- "transperant", "transparent",
- "transperent", "transparent",
- "transphonic", "transphobic",
- "transphopic", "transphobic",
- "transplanet", "transplant",
- "transporder", "transporter",
- "transporing", "transporting",
- "transportar", "transporter",
- "transportng", "transporting",
- "transportor", "transporter",
- "transseuxal", "transsexual",
- "transsexaul", "transsexual",
- "transsexuel", "transsexual",
- "transulcent", "translucent",
- "transylvnia", "transylvania",
- "tranzformer", "transformer",
- "tranzitions", "transitions",
- "tranzporter", "transporter",
- "trasncripts", "transcripts",
- "trasnferred", "transferred",
- "trasnformed", "transformed",
- "trasnformer", "transformer",
- "trasngender", "transgender",
- "trasnmitted", "transmitted",
- "trasnmitter", "transmitter",
- "trasnparent", "transparent",
- "trasnphobic", "transphobic",
- "trasnported", "transported",
- "trasnporter", "transporter",
- "traumatisch", "traumatic",
- "traumetized", "traumatized",
- "traumitized", "traumatized",
- "travellerhd", "travelled",
- "travellodge", "travelled",
- "tremendeous", "tremendous",
- "tremendious", "tremendous",
- "tremenduous", "tremendous",
- "trespessing", "trespassing",
- "tresspasing", "trespassing",
- "triggereing", "triggering",
- "triggerring", "triggering",
- "troubelsome", "troublesome",
- "truamatized", "traumatized",
- "trushworthy", "trustworthy",
- "trustowrthy", "trustworthy",
- "trustwhorty", "trustworthy",
- "trustworhty", "trustworthy",
- "truthfullly", "truthfully",
- "tupperwears", "tupperware",
- "turstworthy", "trustworthy",
- "ubiquitious", "ubiquitous",
- "ubiquituous", "ubiquitous",
- "ukraininans", "ukrainians",
- "ultimatelly", "ultimately",
- "unanimoulsy", "unanimous",
- "unappeasing", "unappealing",
- "unappeeling", "unappealing",
- "unathorised", "unauthorised",
- "unattendend", "unattended",
- "unatteneded", "unattended",
- "unattracive", "unattractive",
- "unauthoried", "unauthorized",
- "unavailible", "unavailable",
- "unavaliable", "unavailable",
- "unaviodable", "unavoidable",
- "unbalanaced", "unbalanced",
- "unbraikable", "unbreakable",
- "unbrakeable", "unbreakable",
- "unbreakabie", "unbreakable",
- "unbreakabke", "unbreakable",
- "unbreakbale", "unbreakable",
- "unbreakeble", "unbreakable",
- "unbrearable", "unbreakable",
- "uncensorred", "uncensored",
- "uncertaincy", "uncertainty",
- "uncertanity", "uncertainty",
- "uncertianty", "uncertainty",
- "unchangable", "unchangeable",
- "uncompetive", "uncompetitive",
- "unconcsious", "unconscious",
- "unconsicous", "unconscious",
- "uncouncious", "unconscious",
- "undeniabely", "undeniably",
- "undeniabley", "undeniably",
- "undeniablly", "undeniably",
- "undenialbly", "undeniably",
- "underestime", "underestimate",
- "undergating", "undertaking",
- "undergorund", "underground",
- "underheight", "underweight",
- "undermiming", "undermining",
- "undermindes", "undermines",
- "undernearth", "underneath",
- "underneight", "underweight",
- "underpining", "undermining",
- "underpowerd", "underpowered",
- "underpowred", "underpowered",
- "underratted", "underrated",
- "understannd", "understands",
- "understsand", "understands",
- "undertacker", "undertaker",
- "underwarter", "underwater",
- "underwieght", "underweight",
- "underwright", "underweight",
- "undesireble", "undesirable",
- "undesriable", "undesirable",
- "undetecable", "undetectable",
- "undiserable", "undesirable",
- "undoubedtly", "undoubtedly",
- "undoubetdly", "undoubtedly",
- "undoubtadly", "undoubtedly",
- "undoubtebly", "undoubtedly",
- "undoubtetly", "undoubtedly",
- "undreground", "underground",
- "unemployeed", "unemployed",
- "unemployent", "unemployment",
- "unemploymed", "unemployed",
- "unexpectdly", "unexpectedly",
- "unexpectely", "unexpectedly",
- "unfamilliar", "unfamiliar",
- "unfortuante", "unfortunate",
- "ungreatfull", "ungrateful",
- "unilateraly", "unilaterally",
- "unilaterlly", "unilaterally",
- "unimportent", "unimportant",
- "uninspiried", "uninspired",
- "uninstaling", "uninstalling",
- "uninstallng", "uninstalling",
- "uninteresed", "uninterested",
- "uniquesness", "uniqueness",
- "unisntalled", "uninstalled",
- "universella", "universally",
- "universites", "universities",
- "univesities", "universities",
- "unjustifyed", "unjustified",
- "unknowinlgy", "unknowingly",
- "unkowningly", "unknowingly",
- "unnecassary", "unnecessary",
- "unneccesary", "unnecessary",
- "unnecessery", "unnecessary",
- "unnecissary", "unnecessary",
- "unnessecary", "unnecessary",
- "unnistalled", "uninstalled",
- "unoriginial", "unoriginal",
- "unorigional", "unoriginal",
- "unoticeable", "unnoticeable",
- "unpleaseant", "unpleasant",
- "unportected", "unprotected",
- "unprepaired", "unprepared",
- "unpreparred", "unprepared",
- "unproducive", "unproductive",
- "unprotexted", "unprotected",
- "unqaulified", "unqualified",
- "unrealisitc", "unrealistic",
- "unrealsitic", "unrealistic",
- "unreasonbly", "unreasonably",
- "unregluated", "unregulated",
- "unregualted", "unregulated",
- "unregulared", "unregulated",
- "unrepentent", "unrepentant",
- "unresponive", "unresponsive",
- "unrestriced", "unrestricted",
- "unsettleing", "unsettling",
- "unsintalled", "uninstalled",
- "unsolicated", "unsolicited",
- "unsoliticed", "unsolicited",
- "unsolocited", "unsolicited",
- "unsubscirbe", "unsubscribe",
- "unsubscrbed", "unsubscribed",
- "unsubscried", "unsubscribed",
- "unsubscripe", "unsubscribe",
- "unsubscrive", "unsubscribe",
- "unsubscrube", "unsubscribe",
- "unsubsrcibe", "unsubscribe",
- "unsuccesful", "unsuccessful",
- "unsuccessul", "unsuccessful",
- "unsucesfuly", "unsuccessfully",
- "unsucessful", "unsuccessful",
- "unsunscribe", "unsubscribe",
- "unsuprising", "unsurprising",
- "unsuprizing", "unsurprising",
- "unsurprized", "unsurprised",
- "unsusbcribe", "unsubscribe",
- "unviersally", "universally",
- "unwarrented", "unwarranted",
- "utiliatrian", "utilitarian",
- "utilitatian", "utilitarian",
- "utiliterian", "utilitarian",
- "utilizacion", "utilization",
- "utilizaiton", "utilization",
- "utilizating", "utilization",
- "utiltiarian", "utilitarian",
- "vacciantion", "vaccination",
- "vaccinaties", "vaccinate",
- "vegaterians", "vegetarians",
- "vegetariens", "vegetarians",
- "vegetatians", "vegetarians",
- "vegeterians", "vegetarians",
- "vehementely", "vehemently",
- "venezuelean", "venezuela",
- "venezuelian", "venezuela",
- "ventalation", "ventilation",
- "ventelation", "ventilation",
- "ventialtion", "ventilation",
- "ventilacion", "ventilation",
- "verastility", "versatility",
- "verfication", "verification",
- "versatality", "versatility",
- "versitality", "versatility",
- "versitilaty", "versatility",
- "victorieuse", "victories",
- "victoriuous", "victorious",
- "vietnameese", "vietnamese",
- "vietnamesse", "vietnamese",
- "vietnamiese", "vietnamese",
- "vietnamnese", "vietnamese",
- "vigilanties", "vigilante",
- "visibillity", "visibility",
- "vocabularly", "vocabulary",
- "volatillity", "volatility",
- "volonteered", "volunteered",
- "volounteers", "volunteers",
- "volunatrily", "voluntarily",
- "voluntairly", "voluntarily",
- "volunteeers", "volunteers",
- "volunteraly", "voluntarily",
- "voluntereed", "volunteered",
- "volunterily", "voluntarily",
- "vulnerabile", "vulnerable",
- "wallpapaers", "wallpapers",
- "wallpappers", "wallpapers",
- "washingtion", "washington",
- "watermeleon", "watermelon",
- "waterprooof", "waterproof",
- "wavelegnths", "wavelength",
- "wavelenghth", "wavelength",
- "wavelenghts", "wavelength",
- "weaknessses", "weaknesses",
- "wellingston", "wellington",
- "wellingtion", "wellington",
- "westernerns", "westerners",
- "westmisnter", "westminster",
- "westmnister", "westminster",
- "westmonster", "westminster",
- "whisperered", "whispered",
- "whitholding", "withholding",
- "wikileakers", "wikileaks",
- "willingless", "willingness",
- "wincheseter", "winchester",
- "windsheilds", "windshield",
- "withdrawels", "withdrawals",
- "withdrawles", "withdrawals",
- "withhelding", "withholding",
- "withrdawing", "withdrawing",
- "witnesssing", "witnessing",
- "woodowrking", "woodworking",
- "woodworkign", "woodworking",
- "worhsipping", "worshipping",
- "workstaiton", "workstation",
- "workststion", "workstation",
- "worshopping", "worshipping",
- "xenophoblic", "xenophobic",
- "abandining", "abandoning",
- "abandonned", "abandoned",
- "abbreviato", "abbreviation",
- "abnoramlly", "abnormally",
- "abnormalty", "abnormally",
- "abnornally", "abnormally",
- "abominaton", "abomination",
- "abondoning", "abandoning",
- "aborginial", "aboriginal",
- "aboriganal", "aboriginal",
- "aborigenal", "aboriginal",
- "aborignial", "aboriginal",
- "aborigonal", "aboriginal",
- "aboroginal", "aboriginal",
- "aboslutely", "absolutely",
- "abosrption", "absorption",
- "abreviated", "abbreviated",
- "absintence", "abstinence",
- "absitnence", "abstinence",
- "absolument", "absolute",
- "absolutley", "absolutely",
- "absoprtion", "absorption",
- "absorbsion", "absorption",
- "absorbtion", "absorption",
- "absorpsion", "absorption",
- "absoultely", "absolutely",
- "abstanence", "abstinence",
- "abstenance", "abstinence",
- "abstenince", "abstinence",
- "abstinense", "abstinence",
- "abstinince", "abstinence",
- "absurditiy", "absurdity",
- "abundacies", "abundances",
- "academicas", "academics",
- "academicos", "academics",
- "academicus", "academics",
- "accdiently", "accidently",
- "accelarate", "accelerate",
- "accelerade", "accelerated",
- "accelerare", "accelerate",
- "accelerato", "acceleration",
- "acceleread", "accelerated",
- "accelertor", "accelerator",
- "accelorate", "accelerate",
- "acceptabel", "acceptable",
- "acceptabil", "acceptable",
- "acceptence", "acceptance",
- "accepterad", "accepted",
- "acceptible", "acceptable",
- "accerelate", "accelerated",
- "accesories", "accessories",
- "accessable", "accessible",
- "accessbile", "accessible",
- "accessoire", "accessories",
- "accessoirs", "accessories",
- "accicently", "accidently",
- "accidantly", "accidently",
- "accidebtly", "accidently",
- "accidenlty", "accidently",
- "accidentes", "accidents",
- "accidentky", "accidently",
- "accidently", "accidentally",
- "accidnetly", "accidently",
- "accomadate", "accommodate",
- "accomodate", "accommodate",
- "accompined", "accompanied",
- "accomplise", "accomplishes",
- "accompliss", "accomplishes",
- "accostumed", "accustomed",
- "accountent", "accountant",
- "accpetable", "acceptable",
- "accpetance", "acceptance",
- "accuastion", "accusation",
- "acculumate", "accumulate",
- "accumalate", "accumulate",
- "accumelate", "accumulate",
- "accumilate", "accumulate",
- "accumulare", "accumulate",
- "accumulato", "accumulation",
- "accumulted", "accumulated",
- "accuratley", "accurately",
- "accusating", "accusation",
- "accusition", "accusation",
- "accustumed", "accustomed",
- "acheivable", "achievable",
- "acheivment", "achievement",
- "acheviable", "achievable",
- "achiavable", "achievable",
- "achieveble", "achievable",
- "achievemnt", "achievement",
- "achievemts", "achieves",
- "achievents", "achieves",
- "achievment", "achievement",
- "achilleous", "achilles",
- "achiveable", "achievable",
- "achivement", "achievement",
- "acitvating", "activating",
- "acitvision", "activision",
- "acknowldge", "acknowledge",
- "acknowlede", "acknowledge",
- "acknowlege", "acknowledge",
- "acommodate", "accommodate",
- "acopalypse", "apocalypse",
- "acordingly", "accordingly",
- "acqauinted", "acquainted",
- "acquanited", "acquainted",
- "acquianted", "acquainted",
- "acquinated", "acquainted",
- "acquisiton", "acquisition",
- "acticating", "activating",
- "actication", "activation",
- "activacion", "activation",
- "activaters", "activates",
- "activiates", "activist",
- "activiites", "activist",
- "activisiom", "activism",
- "activisits", "activist",
- "activistas", "activists",
- "activistes", "activists",
- "activiting", "activating",
- "activizion", "activision",
- "acustommed", "accustomed",
- "adaptacion", "adaptation",
- "adaptating", "adaptation",
- "adaquetely", "adequately",
- "addicitons", "addictions",
- "addionally", "additionally",
- "additivies", "additive",
- "additivley", "additive",
- "addittions", "addictions",
- "addmission", "admission",
- "addresable", "addressable",
- "addressess", "addresses",
- "adequatley", "adequately",
- "adequetely", "adequately",
- "adequitely", "adequately",
- "adernaline", "adrenaline",
- "adjectivos", "adjectives",
- "adjustible", "adjustable",
- "admendment", "amendment",
- "administed", "administered",
- "administor", "administer",
- "administre", "administer",
- "administro", "administer",
- "adminsiter", "administer",
- "admissable", "admissible",
- "admittadly", "admittedly",
- "admittetly", "admittedly",
- "admittidly", "admittedly",
- "adolencent", "adolescent",
- "adolescant", "adolescent",
- "adolescene", "adolescence",
- "adoloscent", "adolescent",
- "adolsecent", "adolescent",
- "adpatation", "adaptation",
- "adreanline", "adrenaline",
- "adrelanine", "adrenaline",
- "adreneline", "adrenaline",
- "adreniline", "adrenaline",
- "adressable", "addressable",
- "advanteges", "advantages",
- "advatanges", "advantages",
- "adventrous", "adventurous",
- "adventrues", "adventures",
- "adventuers", "adventures",
- "adventuous", "adventurous",
- "adventuros", "adventurous",
- "adventurus", "adventurous",
- "adverticed", "advertised",
- "aestethics", "aesthetics",
- "aesthatics", "aesthetics",
- "aesthestic", "aesthetics",
- "affiliaton", "affiliation",
- "affilliate", "affiliate",
- "affirmitve", "affirmative",
- "afflcition", "affliction",
- "afflection", "affliction",
- "affliation", "affliction",
- "affliciton", "affliction",
- "afforadble", "affordable",
- "affordible", "affordable",
- "affortable", "affordable",
- "africaners", "africans",
- "africaness", "africans",
- "aftermaket", "aftermarket",
- "afternooon", "afternoon",
- "aggravanti", "aggravating",
- "aggraveted", "aggravated",
- "aggreement", "agreement",
- "aggregious", "egregious",
- "aggresions", "aggression",
- "aggressivo", "aggression",
- "aggrovated", "aggravated",
- "agnosticim", "agnosticism",
- "agnosticsm", "agnosticism",
- "agnostisch", "agnostic",
- "agnostiscm", "agnosticism",
- "agnostisim", "agnosticism",
- "agreeement", "agreement",
- "agricultre", "agriculture",
- "agricultue", "agriculture",
- "agriculure", "agriculture",
- "agricuture", "agriculture",
- "ailenating", "alienating",
- "ajdectives", "adjectives",
- "alchoholic", "alcoholic",
- "alchoolism", "alcoholism",
- "alcohalics", "alcoholics",
- "alcohalism", "alcoholism",
- "alcoholsim", "alcoholism",
- "aleinating", "alienating",
- "algorhitms", "algorithms",
- "algorithem", "algorithm",
- "algorithim", "algorithm",
- "algorithsm", "algorithms",
- "algorithum", "algorithm",
- "algorithym", "algorithm",
- "algoritmes", "algorithms",
- "algoritmos", "algorithms",
- "algorthims", "algorithms",
- "algortihms", "algorithms",
- "algorythms", "algorithms",
- "alievating", "alienating",
- "alledgedly", "allegedly",
- "allegeance", "allegiance",
- "allegedely", "allegedly",
- "allegedley", "allegedly",
- "allegience", "allegiance",
- "alleigance", "allegiance",
- "allergisch", "allergic",
- "alliegance", "allegiance",
- "alligeance", "allegiance",
- "alocholics", "alcoholics",
- "alocholism", "alcoholism",
- "alogrithms", "algorithms",
- "alphabeast", "alphabet",
- "alteracion", "alteration",
- "alterarion", "alteration",
- "alterating", "alteration",
- "alternador", "alternator",
- "alternater", "alternator",
- "alternatie", "alternatives",
- "alternatly", "alternately",
- "alternatve", "alternate",
- "alternetly", "alternately",
- "altogehter", "altogether",
- "altogheter", "altogether",
- "altriustic", "altruistic",
- "altruisitc", "altruistic",
- "altrusitic", "altruistic",
- "alturistic", "altruistic",
- "aluminimum", "aluminum",
- "amargeddon", "armageddon",
- "amateurest", "amateurs",
- "ambassabor", "ambassador",
- "ambassader", "ambassador",
- "ambassator", "ambassador",
- "ambassedor", "ambassador",
- "ambassidor", "ambassador",
- "ambassodor", "ambassador",
- "ambiguitiy", "ambiguity",
- "amendmants", "amendments",
- "amendmends", "amendments",
- "americains", "americas",
- "americanas", "americans",
- "americanis", "americas",
- "americanss", "americas",
- "americants", "americas",
- "americanus", "americans",
- "americares", "americas",
- "ammendment", "amendment",
- "amrageddon", "armageddon",
- "analitical", "analytical",
- "analitycal", "analytical",
- "analogeous", "analogous",
- "analyitcal", "analytical",
- "analyseles", "analyses",
- "analyseras", "analyses",
- "analyseres", "analyses",
- "analysised", "analyses",
- "analysises", "analyses",
- "analysisto", "analysts",
- "analystics", "analysts",
- "anarchisim", "anarchism",
- "anarchistm", "anarchism",
- "anarchiszm", "anarchism",
- "anarchsits", "anarchists",
- "anayltical", "analytical",
- "ancilliary", "ancillary",
- "androiders", "androids",
- "androidtvs", "androids",
- "anecdotale", "anecdote",
- "anecdotice", "anecdote",
- "anestheisa", "anesthesia",
- "anesthetia", "anesthesia",
- "anesthisia", "anesthesia",
- "anitbiotic", "antibiotic",
- "anitquated", "antiquated",
- "anitsocial", "antisocial",
- "aniversary", "anniversary",
- "annilihate", "annihilated",
- "anniverary", "anniversary",
- "anniversay", "anniversary",
- "anniversry", "anniversary",
- "annointing", "anointing",
- "annonceurs", "announcers",
- "annoucners", "announcers",
- "annoucning", "announcing",
- "announched", "announce",
- "annyoingly", "annoyingly",
- "anonymosly", "anonymously",
- "anonymousy", "anonymously",
- "antaganist", "antagonist",
- "antagnoist", "antagonist",
- "antarcitca", "antarctica",
- "antarctida", "antarctica",
- "anthropoly", "anthropology",
- "antibiodic", "antibiotic",
- "antibiotcs", "antibiotics",
- "antibitoic", "antibiotic",
- "antiboitic", "antibiotics",
- "anticapate", "anticipate",
- "anticiapte", "anticipate",
- "anticipare", "anticipate",
- "anticipato", "anticipation",
- "anticuated", "antiquated",
- "antiquited", "antiquated",
- "antiqvated", "antiquated",
- "antisipate", "anticipate",
- "antisocail", "antisocial",
- "antisosial", "antisocial",
- "antoganist", "antagonist",
- "antractica", "antarctica",
- "apacolypse", "apocalypse",
- "apartheied", "apartheid",
- "aplication", "application",
- "apocalipse", "apocalypse",
- "apocalpyse", "apocalypse",
- "apocalypes", "apocalypse",
- "apocalypic", "apocalyptic",
- "apocalyspe", "apocalypse",
- "apocalytic", "apocalyptic",
- "apocaplyse", "apocalypse",
- "apocolapse", "apocalypse",
- "apolagetic", "apologetic",
- "apolagized", "apologized",
- "apolegetic", "apologetic",
- "apoligetic", "apologetic",
- "apoligists", "apologists",
- "apoligized", "apologized",
- "apologisms", "apologists",
- "apologiste", "apologise",
- "apologitic", "apologetic",
- "apostraphe", "apostrophe",
- "apostrephe", "apostrophe",
- "apostrohpe", "apostrophe",
- "apostropes", "apostrophe",
- "apparantly", "apparently",
- "appareance", "appearance",
- "apparenlty", "apparently",
- "appartment", "apartment",
- "appealling", "appealing",
- "appearence", "appearance",
- "appearnace", "appearances",
- "apperances", "appearances",
- "apperantly", "apparently",
- "apperciate", "appreciate",
- "appereance", "appearance",
- "appetities", "appetite",
- "appetitite", "appetite",
- "appication", "application",
- "applainces", "appliances",
- "applicaple", "applicable",
- "applicates", "applicants",
- "applicaton", "application",
- "applicible", "applicable",
- "appliences", "appliances",
- "appointmet", "appointments",
- "appologies", "apologies",
- "apporached", "approached",
- "apporaches", "approaches",
- "appraoched", "approached",
- "appraoches", "approaches",
- "apprecaite", "appreciate",
- "appreciato", "appreciation",
- "appreciste", "appreciates",
- "apprecitae", "appreciates",
- "apprecited", "appreciated",
- "apprectice", "apprentice",
- "appreicate", "appreciate",
- "apprendice", "apprentice",
- "apprentace", "apprentice",
- "apprentise", "apprentice",
- "appretiate", "appreciate",
- "appretince", "apprentice",
- "appriceate", "appreciates",
- "appriciate", "appreciate",
- "appriecate", "appreciates",
- "approacing", "approaching",
- "appropiate", "appropriate",
- "approprate", "appropriate",
- "apropriate", "appropriate",
- "aproximate", "approximate",
- "apsotrophe", "apostrophe",
- "aptitudine", "aptitude",
- "aqcuainted", "acquainted",
- "aquisition", "acquisition",
- "aramgeddon", "armageddon",
- "arangement", "arrangement",
- "arbitarily", "arbitrarily",
- "arbitraily", "arbitrarily",
- "arbitraion", "arbitration",
- "arbitrairy", "arbitrarily",
- "arbitrarly", "arbitrary",
- "arbitraton", "arbitration",
- "arcehtypes", "archetypes",
- "archaelogy", "archaeology",
- "archaeolgy", "archaeology",
- "archaology", "archeology",
- "archatypes", "archetypes",
- "archetects", "architects",
- "archetipes", "archetypes",
- "archetpyes", "archetypes",
- "archetypus", "archetypes",
- "archeytpes", "archetypes",
- "archictect", "architect",
- "architechs", "architects",
- "architecht", "architect",
- "architecte", "architecture",
- "architexts", "architects",
- "architypes", "archetypes",
- "archtiects", "architects",
- "archytypes", "archetypes",
- "argentinia", "argentina",
- "arguements", "arguments",
- "argumentas", "arguments",
- "argumentos", "arguments",
- "arithemtic", "arithmetic",
- "arithmitic", "arithmetic",
- "aritmethic", "arithmetic",
- "armagaddon", "armageddon",
- "armageddan", "armageddon",
- "armagedden", "armageddon",
- "armageddin", "armageddon",
- "armagedeon", "armageddon",
- "armageedon", "armageddon",
- "armagideon", "armageddon",
- "armegaddon", "armageddon",
- "arrangerad", "arranged",
- "arrangment", "arrangement",
- "arthimetic", "arithmetic",
- "articifial", "artificial",
- "articluate", "articulate",
- "articualte", "articulate",
- "articulted", "articulated",
- "artifactos", "artifacts",
- "artificiel", "artificial",
- "artihmetic", "arithmetic",
- "artillerly", "artillery",
- "asbestoast", "asbestos",
- "asethetics", "aesthetics",
- "asisstants", "assistants",
- "aspiratons", "aspirations",
- "assasinate", "assassinate",
- "assassians", "assassin",
- "assassinas", "assassins",
- "assassines", "assassins",
- "assassinos", "assassins",
- "assemblare", "assemble",
- "assempling", "assembling",
- "assersions", "assertions",
- "assesement", "assessment",
- "assestment", "assessment",
- "assignemnt", "assignment",
- "assimalate", "assimilate",
- "assimilant", "assimilate",
- "assimilare", "assimilate",
- "assimliate", "assimilate",
- "assimulate", "assimilate",
- "assingment", "assignment",
- "assistanat", "assistants",
- "assistanse", "assistants",
- "assistante", "assistance",
- "assistence", "assistance",
- "assistendo", "assisted",
- "assistents", "assistants",
- "assmebling", "assembling",
- "assocaited", "associated",
- "assocaites", "associates",
- "assocation", "association",
- "associatie", "associated",
- "associatin", "associations",
- "associaton", "association",
- "associsted", "associates",
- "assoicated", "associated",
- "assoicates", "associates",
- "assosiated", "associated",
- "assosiates", "associates",
- "asssassans", "assassins",
- "assupmtion", "assumptions",
- "assymetric", "asymmetric",
- "asteroides", "asteroids",
- "asthetical", "aesthetical",
- "astonising", "astonishing",
- "astornauts", "astronauts",
- "astranauts", "astronauts",
- "astronatus", "astronauts",
- "astronaunt", "astronaut",
- "astronomia", "astronomical",
- "astronouts", "astronauts",
- "astronuats", "astronauts",
- "asutralian", "australian",
- "atatchment", "attachment",
- "athleticos", "athletics",
- "athleticsm", "athleticism",
- "athletiscm", "athleticism",
- "athletisim", "athleticism",
- "atmopshere", "atmosphere",
- "atmoshpere", "atmosphere",
- "atomsphere", "atmosphere",
- "atriculate", "articulate",
- "atrocoties", "atrocities",
- "atrosities", "atrocities",
- "attachemnt", "attachment",
- "attackeras", "attackers",
- "attactment", "attachment",
- "attemtping", "attempting",
- "attendence", "attendance",
- "attendents", "attendants",
- "attirbutes", "attributes",
- "attmepting", "attempting",
- "attracters", "attracts",
- "attractice", "attractive",
- "attracties", "attracts",
- "attractifs", "attracts",
- "attraktion", "attraction",
- "attraktive", "attractive",
- "attribuito", "attribution",
- "attritubes", "attributes",
- "auctioners", "auctions",
- "audioboook", "audiobook",
- "audioboost", "audiobooks",
- "auidobooks", "audiobooks",
- "auotattack", "autoattack",
- "austrailan", "australian",
- "austrailia", "australia",
- "australain", "australians",
- "australien", "australian",
- "australina", "australians",
- "austrlaian", "australians",
- "authenticy", "authenticity",
- "autherized", "authorized",
- "authoritay", "authority",
- "authorites", "authorities",
- "authorithy", "authority",
- "authroized", "authorized",
- "autistisch", "autistic",
- "autoattaks", "autoattack",
- "autocorect", "autocorrect",
- "autocorrct", "autocorrect",
- "autocorret", "autocorrect",
- "autograpgh", "autograph",
- "automatice", "automate",
- "automatico", "automation",
- "automatied", "automate",
- "automatiek", "automate",
- "automatron", "automation",
- "automatted", "automate",
- "automibile", "automobile",
- "automitive", "automotive",
- "automoblie", "automobile",
- "automomous", "autonomous",
- "automonous", "autonomous",
- "automotice", "automotive",
- "automotion", "automation",
- "automotize", "automotive",
- "automotove", "automotive",
- "autonamous", "autonomous",
- "autonation", "automation",
- "autonimous", "autonomous",
- "autonomity", "autonomy",
- "autononous", "autonomous",
- "auttoatack", "autoattack",
- "auxilliary", "auxiliary",
- "availabale", "available",
- "availaible", "available",
- "availiable", "available",
- "averageadi", "averaged",
- "averageifs", "averages",
- "awesomeley", "awesomely",
- "awesomelly", "awesomely",
- "awesomenss", "awesomeness",
- "awkwardess", "awkwardness",
- "babysister", "babysitter",
- "babysiting", "babysitting",
- "babysittng", "babysitting",
- "bachelores", "bachelors",
- "backgorund", "background",
- "backgroudn", "backgrounds",
- "backgrouds", "backgrounds",
- "backgrouns", "backgrounds",
- "backgruond", "backgrounds",
- "backpacing", "backpacking",
- "backpackng", "backpacking",
- "backrgound", "backgrounds",
- "backrounds", "backgrounds",
- "baksetball", "basketball",
- "balanceada", "balanced",
- "balanceado", "balanced",
- "balckberry", "blackberry",
- "balckhawks", "blackhawks",
- "balcksmith", "blacksmith",
- "bandwagoon", "bandwagon",
- "bangaldesh", "bangladesh",
- "bangladash", "bangladesh",
- "bangledash", "bangladesh",
- "bangledesh", "bangladesh",
- "banglidesh", "bangladesh",
- "bankrupcty", "bankruptcy",
- "bankruptsy", "bankruptcy",
- "bankrutpcy", "bankruptcy",
- "barabrians", "barbarians",
- "barbariens", "barbarians",
- "barbarions", "barbarians",
- "barbarisch", "barbaric",
- "barberians", "barbarians",
- "bargianing", "bargaining",
- "bartendars", "bartenders",
- "basektball", "basketball",
- "baskteball", "basketball",
- "bastardous", "bastards",
- "battelship", "battleship",
- "battelstar", "battlestar",
- "battlearts", "battlestar",
- "battlechip", "battleship",
- "battlefied", "battlefield",
- "battlefont", "battlefront",
- "battlehips", "battleship",
- "battlesaur", "battlestar",
- "battlescar", "battlestar",
- "battleshop", "battleship",
- "battlestsr", "battlestar",
- "beahviours", "behaviours",
- "beautifuly", "beautifully",
- "beautilful", "beautifully",
- "beautyfull", "beautiful",
- "becnhmarks", "benchmarks",
- "beethoveen", "beethoven",
- "begginings", "beginnings",
- "begininngs", "beginnings",
- "beginninng", "beginnings",
- "behaivours", "behaviours",
- "behaviorly", "behavioral",
- "behavoiral", "behavioral",
- "behavoiurs", "behaviours",
- "behavorial", "behavioral",
- "behavoural", "behavioral",
- "behvaiours", "behaviours",
- "beleagured", "beleaguered",
- "beleivable", "believable",
- "beliavable", "believable",
- "beliebable", "believable",
- "believeble", "believable",
- "beliveable", "believable",
- "benchamrks", "benchmarks",
- "benchmakrs", "benchmarks",
- "benckmarks", "benchmarks",
- "benefecial", "beneficial",
- "beneficary", "beneficiary",
- "beneficiul", "beneficial",
- "benefitial", "beneficial",
- "beneifical", "beneficial",
- "benelovent", "benevolent",
- "benevalent", "benevolent",
- "benevelant", "benevolent",
- "benevelent", "benevolent",
- "benevelont", "benevolent",
- "benevloent", "benevolent",
- "benevolant", "benevolent",
- "benificial", "beneficial",
- "benovelent", "benevolent",
- "bernouilli", "bernoulli",
- "besitality", "bestiality",
- "bestaility", "bestiality",
- "besteality", "bestiality",
- "betrayeado", "betrayed",
- "bilateraly", "bilaterally",
- "billborads", "billboards",
- "bioligical", "biological",
- "biologiset", "biologist",
- "biologiskt", "biologist",
- "birghtness", "brightness",
- "birmignham", "birmingham",
- "birmimgham", "birmingham",
- "bisexuella", "bisexual",
- "bitterseet", "bittersweet",
- "bitterswet", "bittersweet",
- "blackahwks", "blackhawks",
- "blackbarry", "blackberry",
- "blackbeary", "blackberry",
- "blackbeery", "blackberry",
- "blackcawks", "blackhawks",
- "blackhakws", "blackhawks",
- "blackhwaks", "blackhawks",
- "blackmsith", "blacksmith",
- "blackshits", "blacksmith",
- "blasphemey", "blasphemy",
- "blitzkreig", "blitzkrieg",
- "blochchain", "blockchain",
- "blockcahin", "blockchain",
- "blockchian", "blockchain",
- "bloodboner", "bloodborne",
- "bloodbonre", "bloodborne",
- "bloodborbe", "bloodborne",
- "bloodbrone", "bloodborne",
- "bloodporne", "bloodborne",
- "bloorborne", "bloodborne",
- "blueberies", "blueberries",
- "blueberris", "blueberries",
- "blueberrry", "blueberry",
- "bluebrints", "blueprints",
- "boardcasts", "broadcasts",
- "bodyheight", "bodyweight",
- "bodyweigth", "bodyweight",
- "bodywieght", "bodyweight",
- "bombarment", "bombardment",
- "bookmakred", "bookmarked",
- "bootlaoder", "bootloader",
- "bootleader", "bootloader",
- "boradcasts", "broadcasts",
- "borderlads", "borderlands",
- "borderlans", "borderlands",
- "bottelneck", "bottleneck",
- "bottlebeck", "bottleneck",
- "boundaires", "boundaries",
- "bounderies", "boundaries",
- "bourgeoius", "bourgeois",
- "boycutting", "boycotting",
- "boyfirends", "boyfriends",
- "boyfreinds", "boyfriends",
- "boyfrients", "boyfriends",
- "braceletes", "bracelets",
- "braceletts", "bracelets",
- "brainwased", "brainwashed",
- "brakedowns", "breakdowns",
- "braodcasts", "broadcasts",
- "brasillian", "brazilian",
- "bratenders", "bartenders",
- "brazilains", "brazilians",
- "brazileans", "brazilians",
- "braziliaan", "brazilians",
- "brazilions", "brazilians",
- "brazillans", "brazilians",
- "brightoner", "brighten",
- "brigthness", "brightness",
- "brillaince", "brilliance",
- "brilliante", "brilliance",
- "brillianty", "brilliantly",
- "brimestone", "brimstone",
- "brimingham", "birmingham",
- "broacasted", "broadcast",
- "brotherhod", "brotherhood",
- "brotherood", "brotherhood",
- "brusselers", "brussels",
- "brutallity", "brutally",
- "buisnesses", "businesses",
- "bulgariska", "bulgaria",
- "bulletpoof", "bulletproof",
- "bulletprof", "bulletproof",
- "bureaucats", "bureaucrats",
- "businesman", "businessman",
- "businesmen", "businessmen",
- "businessen", "businessmen",
- "butterfies", "butterflies",
- "cabinettas", "cabinets",
- "caclulated", "calculated",
- "caclulator", "calculator",
- "cahracters", "characters",
- "calcluator", "calculators",
- "calcualted", "calculated",
- "calcualtor", "calculator",
- "calculador", "calculator",
- "calcularon", "calculator",
- "calculater", "calculator",
- "calculatin", "calculations",
- "calibratin", "calibration",
- "calibraton", "calibration",
- "califnoria", "californian",
- "califonria", "californian",
- "califorian", "californian",
- "califorina", "california",
- "californai", "californian",
- "califronia", "california",
- "caligraphy", "calligraphy",
- "caliofrnia", "californian",
- "calrifying", "clarifying",
- "calssified", "classified",
- "caluclated", "calculated",
- "caluclator", "calculator",
- "caluculate", "calculate",
- "cambodican", "cambodia",
- "camofluage", "camouflage",
- "camoufalge", "camouflage",
- "camouglage", "camouflage",
- "campaiging", "campaigning",
- "campaignes", "campaigns",
- "cancellato", "cancellation",
- "candidatas", "candidates",
- "candidatxs", "candidates",
- "candidiate", "candidate",
- "canditates", "candidates",
- "cannibalsm", "cannibalism",
- "cannisters", "canisters",
- "cannonical", "canonical",
- "capabality", "capability",
- "capabiltiy", "capability",
- "capacators", "capacitors",
- "capaciters", "capacitors",
- "capactiors", "capacitors",
- "capasitors", "capacitors",
- "capatilism", "capitalism",
- "capatilist", "capitalist",
- "capatilize", "capitalize",
- "capialized", "capitalized",
- "capicators", "capacitors",
- "capitalisn", "capitals",
- "capitalits", "capitalists",
- "capitalsim", "capitalism",
- "capitalsit", "capitalists",
- "capitarist", "capitalist",
- "capitilism", "capitalism",
- "capitilist", "capitalist",
- "capitilize", "capitalize",
- "capitlaism", "capitalism",
- "capitlaist", "capitalist",
- "capitlaize", "capitalized",
- "capitolism", "capitalism",
- "capitolist", "capitalist",
- "capitolize", "capitalize",
- "captainers", "captains",
- "captialism", "capitalism",
- "captialist", "capitalist",
- "captialize", "capitalize",
- "captivitiy", "captivity",
- "caraciture", "caricature",
- "carciature", "caricature",
- "cardinales", "cardinals",
- "cardinalis", "cardinals",
- "carefullly", "carefully",
- "cariacture", "caricature",
- "caricatore", "caricature",
- "cariciture", "caricature",
- "caricuture", "caricature",
- "carismatic", "charismatic",
- "carribbean", "caribbean",
- "cartdridge", "cartridge",
- "cartdriges", "cartridges",
- "carthagian", "carthaginian",
- "cartilidge", "cartilage",
- "cartirdges", "cartridges",
- "cartrdiges", "cartridges",
- "cartriages", "cartridges",
- "cartrigdes", "cartridges",
- "casaulties", "casualties",
- "cassowarry", "cassowary",
- "casualites", "casualties",
- "casualries", "casualties",
- "casulaties", "casualties",
- "cataclysim", "cataclysm",
- "cataclysym", "cataclysm",
- "catagories", "categories",
- "catapillar", "caterpillar",
- "catapiller", "caterpillar",
- "catastrope", "catastrophe",
- "catastrphe", "catastrophe",
- "categorice", "categorize",
- "categoried", "categorized",
- "categoriei", "categorize",
- "cateogrize", "categorized",
- "catepillar", "caterpillar",
- "caterpilar", "caterpillar",
- "catholicsm", "catholicism",
- "catholicus", "catholics",
- "catholisim", "catholicism",
- "cativating", "activating",
- "cattleship", "battleship",
- "causalties", "casualties",
- "cautionsly", "cautiously",
- "celebratin", "celebration",
- "celebrites", "celebrities",
- "celebritiy", "celebrity",
- "cellpading", "cellpadding",
- "cellulaire", "cellular",
- "cemetaries", "cemeteries",
- "censorhsip", "censorship",
- "censurship", "censorship",
- "centipedle", "centipede",
- "ceremonias", "ceremonies",
- "ceremoniis", "ceremonies",
- "ceremonije", "ceremonies",
- "cerimonial", "ceremonial",
- "cerimonies", "ceremonies",
- "certainity", "certainty",
- "certainlyt", "certainty",
- "chairtable", "charitable",
- "chalenging", "challenging",
- "challanged", "challenged",
- "challanges", "challenges",
- "challegner", "challenger",
- "challender", "challenger",
- "challengue", "challenger",
- "challengur", "challenger",
- "challening", "challenging",
- "challneger", "challenger",
- "chanceller", "chancellor",
- "chancillor", "chancellor",
- "chansellor", "chancellor",
- "charachter", "character",
- "charactere", "characterize",
- "characterz", "characterize",
- "charactors", "characters",
- "charakters", "characters",
- "charatable", "charitable",
- "charecters", "characters",
- "charistics", "characteristics",
- "charitible", "charitable",
- "chartiable", "charitable",
- "chechpoint", "checkpoint",
- "checkpiont", "checkpoint",
- "checkpoins", "checkpoints",
- "checkponts", "checkpoints",
- "cheesecase", "cheesecake",
- "cheesecave", "cheesecake",
- "cheeseface", "cheesecake",
- "cheezecake", "cheesecake",
- "chemcially", "chemically",
- "chidlbirth", "childbirth",
- "chihuahuha", "chihuahua",
- "childbrith", "childbirth",
- "childrends", "childrens",
- "childrenis", "childrens",
- "childrents", "childrens",
- "chirstians", "christians",
- "chocalates", "chocolates",
- "chocloates", "chocolates",
- "chocoaltes", "chocolates",
- "chocolatie", "chocolates",
- "chocolatos", "chocolates",
- "chocolatte", "chocolates",
- "chocolotes", "chocolates",
- "cholestrol", "cholesterol",
- "chormosome", "chromosome",
- "chornicles", "chronicles",
- "chrisitans", "christians",
- "christains", "christians",
- "christiaan", "christian",
- "christimas", "christians",
- "christinas", "christians",
- "christines", "christians",
- "christmans", "christians",
- "chromasome", "chromosome",
- "chromesome", "chromosome",
- "chromisome", "chromosome",
- "chromosmes", "chromosomes",
- "chromosoms", "chromosomes",
- "chromosone", "chromosome",
- "chromosoom", "chromosome",
- "chromozome", "chromosome",
- "chronciles", "chronicles",
- "chronicals", "chronicles",
- "chronicels", "chronicles",
- "chronocles", "chronicles",
- "chronosome", "chromosome",
- "chrsitians", "christians",
- "cigarattes", "cigarettes",
- "cigerattes", "cigarettes",
- "cincinatti", "cincinnati",
- "cinncinati", "cincinnati",
- "circulaire", "circular",
- "circulaton", "circulation",
- "circumsice", "circumcised",
- "circumsied", "circumcised",
- "circumwent", "circumvent",
- "circunvent", "circumvent",
- "cirruculum", "curriculum",
- "claculator", "calculator",
- "clairfying", "clarifying",
- "clasically", "classically",
- "classicals", "classics",
- "classrooom", "classroom",
- "cleanliess", "cleanliness",
- "cleareance", "clearance",
- "cleverleys", "cleverly",
- "cliffhager", "cliffhanger",
- "climateers", "climates",
- "climatiser", "climates",
- "clincially", "clinically",
- "clitoridis", "clitoris",
- "clitorious", "clitoris",
- "co-incided", "coincided",
- "cockroachs", "cockroaches",
- "cockroahes", "cockroaches",
- "coefficent", "coefficient",
- "cognatious", "contagious",
- "cognitivie", "cognitive",
- "coincidnce", "coincide",
- "colelctive", "collective",
- "colelctors", "collectors",
- "collapsers", "collapses",
- "collaquial", "colloquial",
- "collasping", "collapsing",
- "collataral", "collateral",
- "collaterol", "collateral",
- "collatoral", "collateral",
- "collcetion", "collections",
- "colleauges", "colleagues",
- "colleciton", "collection",
- "collectems", "collects",
- "collectief", "collective",
- "collecties", "collects",
- "collectifs", "collects",
- "collectivo", "collection",
- "collectoin", "collections",
- "collectons", "collections",
- "collectros", "collects",
- "collegaues", "colleagues",
- "collequial", "colloquial",
- "colleteral", "collateral",
- "colliquial", "colloquial",
- "collission", "collisions",
- "collitions", "collisions",
- "colloqiual", "colloquial",
- "colloquail", "colloquial",
- "colloqueal", "colloquial",
- "collpasing", "collapsing",
- "colonialsm", "colonialism",
- "colorblend", "colorblind",
- "coloublind", "colorblind",
- "columbidae", "columbia",
- "comapnions", "companions",
- "comaprable", "comparable",
- "comaprison", "comparison",
- "comaptible", "compatible",
- "combatabts", "combatants",
- "combatents", "combatants",
- "combinatin", "combinations",
- "combinaton", "combination",
- "comediants", "comedians",
- "comepndium", "compendium",
- "comferting", "comforting",
- "comforming", "comforting",
- "comfortbly", "comfortably",
- "comisioned", "commissioned",
- "comisioner", "commissioner",
- "comissions", "commissions",
- "commandbox", "commando",
- "commandent", "commandment",
- "commandeur", "commanders",
- "commandore", "commanders",
- "commandpod", "commando",
- "commanists", "communists",
- "commemters", "commenters",
- "commencera", "commerce",
- "commenciez", "commence",
- "commentaar", "commentary",
- "commentare", "commenter",
- "commentars", "commenters",
- "commentart", "commentator",
- "commentery", "commentary",
- "commentsry", "commenters",
- "commercail", "commercials",
- "commercent", "commence",
- "commerical", "commercial",
- "comminists", "communists",
- "commisison", "commissions",
- "commissons", "commissions",
- "commiteted", "commited",
- "commodites", "commodities",
- "commtiment", "commitments",
- "communicae", "communicated",
- "communisim", "communism",
- "communiste", "communities",
- "communites", "communities",
- "communters", "commenters",
- "compadible", "compatible",
- "compagnons", "companions",
- "compainons", "companions",
- "compairson", "comparison",
- "compalined", "complained",
- "compandium", "compendium",
- "companians", "companions",
- "companines", "companions",
- "compansate", "compensate",
- "comparabil", "comparable",
- "comparason", "comparison",
- "comparaste", "compares",
- "comparatie", "comparative",
- "compareble", "comparable",
- "comparemos", "compares",
- "comparions", "comparison",
- "compariosn", "comparisons",
- "comparisen", "compares",
- "comparitve", "comparative",
- "comparsion", "comparison",
- "compartent", "compartment",
- "compartmet", "compartment",
- "compatibel", "compatible",
- "compatibil", "compatible",
- "compeating", "completing",
- "compeditor", "competitor",
- "compednium", "compendium",
- "compeeting", "completing",
- "compeltely", "completely",
- "compelting", "completing",
- "compeltion", "completion",
- "compemdium", "compendium",
- "compenduim", "compendium",
- "compenents", "components",
- "compenidum", "compendium",
- "compensare", "compensate",
- "comperable", "comparable",
- "comperhend", "comprehend",
- "compession", "compassion",
- "competance", "competence",
- "competator", "competitor",
- "competenet", "competence",
- "competense", "competence",
- "competenze", "competence",
- "competeted", "competed",
- "competetor", "competitor",
- "competidor", "competitor",
- "competiors", "competitors",
- "competitie", "competitive",
- "competitin", "competitions",
- "competitio", "competitor",
- "competiton", "competition",
- "competitve", "competitive",
- "compilance", "compliance",
- "compilaton", "compilation",
- "compinsate", "compensate",
- "compitable", "compatible",
- "compitance", "compliance",
- "complacant", "complacent",
- "complaince", "compliance",
- "complaines", "complaints",
- "complainig", "complaining",
- "complainte", "complained",
- "complation", "completion",
- "compleatly", "completely",
- "complecate", "complicate",
- "completeds", "completes",
- "completent", "complement",
- "completily", "complexity",
- "completito", "completion",
- "completley", "completely",
- "complexers", "complexes",
- "complexety", "complexity",
- "complianed", "compliance",
- "compliants", "complaints",
- "complicaed", "complicate",
- "complicare", "complicate",
- "complicati", "complicit",
- "complicato", "complication",
- "complicite", "complicate",
- "complicted", "complicated",
- "complience", "compliance",
- "complimate", "complicate",
- "complition", "completion",
- "complusion", "compulsion",
- "complusive", "compulsive",
- "complusory", "compulsory",
- "compolsive", "compulsive",
- "compolsory", "compulsory",
- "compolsury", "compulsory",
- "componants", "components",
- "componenet", "components",
- "componsate", "compensate",
- "comporable", "comparable",
- "compositae", "composite",
- "compositie", "composite",
- "compositon", "composition",
- "compraison", "comparisons",
- "compramise", "compromise",
- "comprassem", "compress",
- "comprehand", "comprehend",
- "compresion", "compression",
- "compresors", "compressor",
- "compresser", "compressor",
- "compressio", "compressor",
- "compresson", "compression",
- "comprihend", "comprehend",
- "comprimise", "compromise",
- "compromiss", "compromises",
- "compromize", "compromise",
- "compromsie", "compromises",
- "comprossor", "compressor",
- "compteting", "completing",
- "comptetion", "completion",
- "compulisve", "compulsive",
- "compulosry", "compulsory",
- "compulsary", "compulsory",
- "compulsery", "compulsory",
- "compulsing", "compulsion",
- "compulsivo", "compulsion",
- "compulsury", "compulsory",
- "compuslion", "compulsion",
- "compuslive", "compulsive",
- "compuslory", "compulsory",
- "compustion", "compulsion",
- "computanti", "computation",
- "conatiners", "containers",
- "concedendo", "conceded",
- "concedered", "conceded",
- "conceitual", "conceptual",
- "concentate", "concentrate",
- "concenting", "connecting",
- "conceptial", "conceptual",
- "conceptuel", "conceptual",
- "concersion", "concession",
- "concesions", "concession",
- "concidered", "considered",
- "conciously", "consciously",
- "concission", "concession",
- "conclsuion", "concussion",
- "conclusies", "conclusive",
- "conclution", "conclusion",
- "concorrent", "concurrent",
- "concsience", "conscience",
- "conculsion", "conclusion",
- "conculsive", "conclusive",
- "concurment", "concurrent",
- "concurrant", "concurrent",
- "concurrect", "concurrent",
- "concusions", "concussion",
- "concusison", "concussions",
- "condamning", "condemning",
- "condemming", "condemning",
- "condencing", "condemning",
- "condenming", "condemning",
- "condensend", "condensed",
- "condidtion", "condition",
- "conditinal", "conditional",
- "conditiner", "conditioner",
- "conditiond", "conditioned",
- "conditiong", "conditioning",
- "condmening", "condemning",
- "conduiting", "conducting",
- "conencting", "connecting",
- "conenction", "connection",
- "conenctors", "connectors",
- "conesencus", "consensus",
- "confedarcy", "confederacy",
- "confedence", "conference",
- "confedercy", "confederacy",
- "conferance", "conference",
- "conferenze", "conference",
- "conferming", "confirming",
- "confernece", "conferences",
- "confessino", "confessions",
- "confidance", "confidence",
- "confidenly", "confidently",
- "confidense", "confidence",
- "confidenty", "confidently",
- "conflcting", "conflating",
- "conflicing", "conflicting",
- "conflictos", "conflicts",
- "confliting", "conflating",
- "confriming", "confirming",
- "confussion", "confession",
- "congratule", "congratulate",
- "congresman", "congressman",
- "congresmen", "congressmen",
- "congressen", "congressmen",
- "conjecutre", "conjecture",
- "conjuction", "conjunction",
- "conjuncion", "conjunction",
- "conlcusion", "conclusion",
- "conncetion", "connections",
- "conneciton", "connection",
- "connecties", "connects",
- "connectins", "connects",
- "connectivy", "connectivity",
- "connectpro", "connector",
- "conneticut", "connecticut",
- "connotaion", "connotation",
- "conpsiracy", "conspiracy",
- "conqeuring", "conquering",
- "conqouring", "conquering",
- "conquerers", "conquerors",
- "conquoring", "conquering",
- "consciense", "conscience",
- "consciouly", "consciously",
- "consdiered", "considered",
- "consending", "consenting",
- "consensuel", "consensual",
- "consenusal", "consensual",
- "consequece", "consequence",
- "consequnce", "consequence",
- "conservare", "conserve",
- "conservato", "conservation",
- "conservice", "conserve",
- "conservies", "conserve",
- "conservite", "conserve",
- "consicence", "conscience",
- "consideras", "considers",
- "consideret", "considerate",
- "consipracy", "conspiracy",
- "consistant", "consistent",
- "consistens", "consists",
- "consisteny", "consistency",
- "consitency", "consistency",
- "consituted", "constituted",
- "conslutant", "consultant",
- "consluting", "consulting",
- "consolidad", "consolidated",
- "consonents", "consonants",
- "consorcium", "consortium",
- "conspirace", "conspiracies",
- "conspiricy", "conspiracy",
- "conspriacy", "conspiracy",
- "constaints", "constraints",
- "constatnly", "constantly",
- "constently", "constantly",
- "constitude", "constitute",
- "constitued", "constitute",
- "constituem", "constitute",
- "constituer", "constitute",
- "constitues", "constitutes",
- "constituie", "constitute",
- "constituit", "constitute",
- "constitutn", "constituents",
- "constituye", "constitute",
- "constnatly", "constantly",
- "constracts", "constructs",
- "constraits", "constraints",
- "constransi", "constraints",
- "constrants", "constraints",
- "construced", "constructed",
- "constructo", "construction",
- "construint", "constraint",
- "construits", "constructs",
- "construted", "constructed",
- "consueling", "consulting",
- "consultata", "consultant",
- "consultate", "consultant",
- "consultati", "consultant",
- "consultato", "consultation",
- "consultent", "consultant",
- "consumated", "consummated",
- "consumbale", "consumables",
- "consuments", "consumes",
- "consumirem", "consumerism",
- "consumires", "consumerism",
- "consumirse", "consumerism",
- "consumiste", "consumes",
- "consumpion", "consumption",
- "contaction", "contacting",
- "contageous", "contagious",
- "contagiosa", "contagious",
- "contagioso", "contagious",
- "contaigous", "contagious",
- "containors", "containers",
- "contaminen", "containment",
- "contanting", "contacting",
- "contection", "contention",
- "contectual", "contextual",
- "conteiners", "contenders",
- "contempate", "contemplate",
- "contemplat", "contempt",
- "contempory", "contemporary",
- "contenants", "continents",
- "contencion", "contention",
- "contendors", "contenders",
- "contenents", "continents",
- "conteneurs", "contenders",
- "contengent", "contingent",
- "contension", "contention",
- "contentino", "contention",
- "contentios", "contentious",
- "contentous", "contentious",
- "contestais", "contests",
- "contestans", "contests",
- "contestase", "contests",
- "contestion", "contention",
- "contestors", "contests",
- "contextful", "contextual",
- "contextuel", "contextual",
- "contextura", "contextual",
- "contianers", "containers",
- "contianing", "containing",
- "contibuted", "contributed",
- "contibutes", "contributes",
- "contigents", "continents",
- "contigious", "contagious",
- "contignent", "contingent",
- "continants", "continents",
- "continenal", "continental",
- "continenet", "continents",
- "contineous", "continuous",
- "continetal", "continental",
- "contingecy", "contingency",
- "contingeny", "contingency",
- "continient", "contingent",
- "continious", "continuous",
- "continiuty", "continuity",
- "contintent", "contingent",
- "continualy", "continually",
- "continuare", "continue",
- "continuati", "continuity",
- "continuato", "continuation",
- "continuent", "contingent",
- "continuety", "continuity",
- "continunes", "continents",
- "continuons", "continuous",
- "continutiy", "continuity",
- "continuuum", "continuum",
- "contitnent", "contingent",
- "contiuning", "containing",
- "contiunity", "continuity",
- "contorller", "controllers",
- "contracing", "contracting",
- "contractar", "contractor",
- "contracter", "contractor",
- "contractin", "contraction",
- "contractos", "contracts",
- "contradice", "contradicted",
- "contradics", "contradicts",
- "contredict", "contradict",
- "contribued", "contributed",
- "contribuem", "contribute",
- "contribuer", "contribute",
- "contribues", "contributes",
- "contribuie", "contribute",
- "contribuit", "contribute",
- "contributo", "contribution",
- "contributs", "contributes",
- "contribuye", "contribute",
- "contricted", "contracted",
- "contridict", "contradict",
- "contriubte", "contributes",
- "controlelr", "controllers",
- "controlers", "controls",
- "controling", "controlling",
- "controlles", "controls",
- "controvery", "controversy",
- "controvesy", "controversy",
- "contrubite", "contributes",
- "contrubute", "contribute",
- "contuining", "continuing",
- "contuinity", "continuity",
- "convaluted", "convoluted",
- "convcition", "convictions",
- "conveinent", "convenient",
- "conveluted", "convoluted",
- "convencion", "convention",
- "conveniant", "convenient",
- "conveniece", "convenience",
- "convenince", "convenience",
- "convential", "conventional",
- "converesly", "conversely",
- "convergens", "converse",
- "converison", "conversions",
- "converning", "converting",
- "conversare", "converse",
- "conversino", "conversions",
- "conversley", "conversely",
- "conversoin", "conversions",
- "conversons", "conversions",
- "convertion", "conversion",
- "convertire", "converter",
- "converying", "converting",
- "conveyered", "conveyed",
- "conviccion", "conviction",
- "conviciton", "conviction",
- "convienent", "convenient",
- "conviluted", "convoluted",
- "convincted", "convince",
- "convinsing", "convincing",
- "convinving", "convincing",
- "convoluded", "convoluted",
- "convoulted", "convoluted",
- "convulated", "convoluted",
- "convuluted", "convoluted",
- "cooperatve", "cooperative",
- "coordenate", "coordinate",
- "coordiante", "coordinate",
- "coordinare", "coordinate",
- "coordinato", "coordination",
- "coordinats", "coordinates",
- "coordonate", "coordinate",
- "cooridnate", "coordinate",
- "copehnagen", "copenhagen",
- "copenaghen", "copenhagen",
- "copenahgen", "copenhagen",
- "copengagen", "copenhagen",
- "copengahen", "copenhagen",
- "copenhagan", "copenhagen",
- "copenhague", "copenhagen",
- "copenhagun", "copenhagen",
- "copenhaven", "copenhagen",
- "copenhegan", "copenhagen",
- "copyrighed", "copyrighted",
- "copyrigted", "copyrighted",
- "corinthans", "corinthians",
- "corinthias", "corinthians",
- "corinthins", "corinthians",
- "cornmitted", "committed",
- "corporatie", "corporate",
- "corralated", "correlated",
- "corralates", "correlates",
- "correccion", "correction",
- "correciton", "corrections",
- "correcters", "correctors",
- "correctess", "correctness",
- "correctivo", "correction",
- "correctons", "corrections",
- "corregated", "correlated",
- "correkting", "correcting",
- "correlatas", "correlates",
- "correlatie", "correlated",
- "correlatos", "correlates",
- "correspend", "correspond",
- "corrilated", "correlated",
- "corrilates", "correlates",
- "corrispond", "correspond",
- "corrolated", "correlated",
- "corrolates", "correlates",
- "corrospond", "correspond",
- "corrpution", "corruption",
- "corrulates", "correlates",
- "corrupcion", "corruption",
- "cosmeticas", "cosmetics",
- "cosmeticos", "cosmetics",
- "costumized", "customized",
- "counceling", "counseling",
- "councellor", "councillor",
- "councelors", "counselors",
- "councilers", "councils",
- "counselers", "counselors",
- "counsellng", "counselling",
- "counsilers", "counselors",
- "counsiling", "counseling",
- "counsilors", "counselors",
- "counsolers", "counselors",
- "counsoling", "counseling",
- "countepart", "counteract",
- "counteratk", "counteract",
- "counterbat", "counteract",
- "countercat", "counteract",
- "countercut", "counteract",
- "counteries", "counters",
- "countoring", "countering",
- "countryies", "countryside",
- "countrying", "countering",
- "courcework", "coursework",
- "coursefork", "coursework",
- "courthosue", "courthouse",
- "courtrooom", "courtroom",
- "cousnelors", "counselors",
- "coutneract", "counteract",
- "coutnering", "countering",
- "covenental", "covenant",
- "cranberrry", "cranberry",
- "creationis", "creations",
- "creationsm", "creationism",
- "creationst", "creationist",
- "creativily", "creatively",
- "creativley", "creatively",
- "credibilty", "credibility",
- "creeperest", "creepers",
- "crimanally", "criminally",
- "criminalty", "criminally",
- "criminalul", "criminally",
- "criticable", "critical",
- "criticarlo", "critical",
- "criticiing", "criticising",
- "criticisim", "criticism",
- "criticisme", "criticise",
- "criticisng", "criticising",
- "criticists", "critics",
- "criticisze", "criticise",
- "criticizms", "criticisms",
- "criticizng", "criticizing",
- "critisiced", "criticized",
- "critisicms", "criticisms",
- "critisicsm", "criticisms",
- "critisiscm", "criticisms",
- "critisisms", "criticisms",
- "critisizes", "criticises",
- "critisizms", "criticisms",
- "critiziced", "criticized",
- "critizised", "criticized",
- "critizisms", "criticisms",
- "critizized", "criticized",
- "crocodille", "crocodile",
- "crossfiter", "crossfire",
- "crutchetts", "crutches",
- "crystalens", "crystals",
- "crystalisk", "crystals",
- "crystallis", "crystals",
- "cuatiously", "cautiously",
- "culterally", "culturally",
- "cultrually", "culturally",
- "culumative", "cumulative",
- "culutrally", "culturally",
- "cumbersone", "cumbersome",
- "cumbursome", "cumbersome",
- "cumpolsory", "compulsory",
- "cumulitive", "cumulative",
- "currancies", "currencies",
- "currenctly", "currency",
- "currenices", "currencies",
- "currentfps", "currents",
- "currentlys", "currents",
- "currentpos", "currents",
- "currentusa", "currents",
- "curriculem", "curriculum",
- "curriculim", "curriculum",
- "curriences", "currencies",
- "curroption", "corruption",
- "custimized", "customized",
- "customzied", "customized",
- "custumized", "customized",
- "cutscences", "cutscene",
- "cutscenses", "cutscene",
- "dangerouly", "dangerously",
- "dealerhsip", "dealerships",
- "deathamtch", "deathmatch",
- "deathmacth", "deathmatch",
- "debateable", "debatable",
- "decembeard", "december",
- "decendants", "descendants",
- "decendents", "descendants",
- "decideable", "decidable",
- "deciptions", "depictions",
- "decisiones", "decisions",
- "declarasen", "declares",
- "declaraste", "declares",
- "declaremos", "declares",
- "decomposit", "decompose",
- "decoracion", "decoration",
- "decorativo", "decoration",
- "decoritive", "decorative",
- "decroative", "decorative",
- "decsending", "descending",
- "dedicacion", "dedication",
- "dedikation", "dedication",
- "deducatble", "deductible",
- "deducitble", "deductible",
- "defacation", "defamation",
- "defamating", "defamation",
- "defanitely", "definately",
- "defelction", "deflection",
- "defendeers", "defender",
- "defendents", "defendants",
- "defenderes", "defenders",
- "defenesman", "defenseman",
- "defenselss", "defenseless",
- "defensivly", "defensively",
- "defianetly", "definately",
- "defiantely", "definately",
- "defiantley", "definately",
- "defibately", "definately",
- "deficately", "definately",
- "deficiancy", "deficiency",
- "deficience", "deficiencies",
- "deficienct", "deficient",
- "deficienty", "deficiency",
- "defiintely", "definately",
- "definaetly", "definately",
- "definaitly", "definately",
- "definaltey", "definately",
- "definataly", "definately",
- "definateky", "definately",
- "definately", "definitely",
- "definatily", "definately",
- "defination", "definition",
- "definative", "definitive",
- "definatlly", "definately",
- "definatrly", "definately",
- "definayely", "definately",
- "defineatly", "definately",
- "definetaly", "definately",
- "definetely", "definitely",
- "definetily", "definately",
- "definetlly", "definetly",
- "definettly", "definately",
- "definicion", "definition",
- "definietly", "definitely",
- "definining", "defining",
- "definitaly", "definately",
- "definiteyl", "definitly",
- "definitivo", "definition",
- "definitley", "definitely",
- "definitlly", "definitly",
- "definitlry", "definitly",
- "definitlty", "definitly",
- "definjtely", "definately",
- "definltely", "definately",
- "definotely", "definately",
- "definstely", "definately",
- "defintaley", "definately",
- "defintiely", "definitely",
- "defintiion", "definitions",
- "definutely", "definately",
- "deflaction", "deflection",
- "defleciton", "deflection",
- "deflektion", "deflection",
- "defniately", "definately",
- "degenarate", "degenerate",
- "degenerare", "degenerate",
- "degenerite", "degenerate",
- "degoratory", "derogatory",
- "degraderad", "degraded",
- "dehydraded", "dehydrated",
- "dehyrdated", "dehydrated",
- "deifnately", "definately",
- "deisgnated", "designated",
- "delaership", "dealership",
- "delearship", "dealership",
- "delegaties", "delegate",
- "delegative", "delegate",
- "delfection", "deflection",
- "delibarate", "deliberate",
- "deliberant", "deliberate",
- "delibirate", "deliberate",
- "deligthful", "delightful",
- "deliverate", "deliberate",
- "deliverees", "deliveries",
- "deliviered", "delivered",
- "deliviring", "delivering",
- "delporable", "deplorable",
- "delpoyment", "deployment",
- "delutional", "delusional",
- "dementieva", "dementia",
- "deminsions", "dimensions",
- "democracis", "democracies",
- "democracts", "democrat",
- "democratas", "democrats",
- "democrates", "democrats",
- "demograhic", "demographic",
- "demographs", "demographics",
- "demograpic", "demographic",
- "demolation", "demolition",
- "demolicion", "demolition",
- "demolision", "demolition",
- "demolitian", "demolition",
- "demoliting", "demolition",
- "demoloshed", "demolished",
- "demolution", "demolition",
- "demonished", "demolished",
- "demonstate", "demonstrate",
- "demonstras", "demonstrates",
- "demorcracy", "democracy",
- "denegerate", "degenerate",
- "denominato", "denomination",
- "denomintor", "denominator",
- "deocrative", "decorative",
- "deomcratic", "democratic",
- "deparments", "departments",
- "departmens", "departments",
- "departmnet", "departments",
- "depcitions", "depictions",
- "depdending", "depending",
- "depencency", "dependency",
- "dependance", "dependence",
- "dependancy", "dependency",
- "dependandt", "dependant",
- "dependends", "depended",
- "dependened", "depended",
- "dependenta", "dependant",
- "dependente", "dependence",
- "depicitons", "depictions",
- "deplorabel", "deplorable",
- "deplorabil", "deplorable",
- "deplorible", "deplorable",
- "deplyoment", "deployment",
- "depolyment", "deployment",
- "depositers", "deposits",
- "depressief", "depressive",
- "depressies", "depressive",
- "deprivaton", "deprivation",
- "deragotory", "derogatory",
- "derivaties", "derivatives",
- "deriviated", "derived",
- "derivitave", "derivative",
- "derivitive", "derivative",
- "derogatary", "derogatory",
- "derogatery", "derogatory",
- "derogetory", "derogatory",
- "derogitory", "derogatory",
- "derogotary", "derogatory",
- "derogotory", "derogatory",
- "derviative", "derivative",
- "descendats", "descendants",
- "descendend", "descended",
- "descenting", "descending",
- "descerning", "descending",
- "descipable", "despicable",
- "descisions", "decisions",
- "descriibes", "describes",
- "descripton", "description",
- "desginated", "designated",
- "desigining", "designing",
- "desireable", "desirable",
- "desktopbsd", "desktops",
- "despciable", "despicable",
- "desperatly", "desperately",
- "desperetly", "desperately",
- "despicaple", "despicable",
- "despicible", "despicable",
- "dessicated", "desiccated",
- "destinatin", "destinations",
- "destinaton", "destination",
- "destoryers", "destroyers",
- "destorying", "destroying",
- "destroyeds", "destroyers",
- "destroyeer", "destroyers",
- "destrucion", "destruction",
- "destrucive", "destructive",
- "destryoing", "destroying",
- "detectarlo", "detector",
- "detectaron", "detector",
- "detectoare", "detector",
- "determinas", "determines",
- "determinig", "determining",
- "determinsm", "determinism",
- "deutschand", "deutschland",
- "devastaded", "devastated",
- "devastaing", "devastating",
- "devastanti", "devastating",
- "devasteted", "devastated",
- "develepors", "developers",
- "develoeprs", "developers",
- "developmet", "developments",
- "developors", "develops",
- "developped", "developed",
- "developres", "develops",
- "develpment", "development",
- "devestated", "devastated",
- "devolvendo", "devolved",
- "deyhdrated", "dehydrated",
- "diagnosied", "diagnose",
- "diagnosies", "diagnosis",
- "diagnositc", "diagnostic",
- "diagnossed", "diagnose",
- "diagnosted", "diagnose",
- "diagnotics", "diagnostic",
- "diagonstic", "diagnostic",
- "dichotomoy", "dichotomy",
- "dicitonary", "dictionary",
- "diconnects", "disconnects",
- "dicovering", "discovering",
- "dictateurs", "dictates",
- "dictionare", "dictionaries",
- "differance", "difference",
- "differenly", "differently",
- "differense", "differences",
- "differente", "difference",
- "differentl", "differential",
- "differenty", "differently",
- "differnece", "difference",
- "difficulte", "difficulties",
- "difficults", "difficulties",
- "difficutly", "difficulty",
- "diffuculty", "difficulty",
- "diganostic", "diagnostic",
- "dimensinal", "dimensional",
- "dimentions", "dimensions",
- "dimesnions", "dimensions",
- "dimineshes", "diminishes",
- "diminising", "diminishing",
- "dimunitive", "diminutive",
- "dinosaures", "dinosaurs",
- "dinosaurus", "dinosaurs",
- "dipections", "depictions",
- "diplimatic", "diplomatic",
- "diplomacia", "diplomatic",
- "diplomancy", "diplomacy",
- "dipolmatic", "diplomatic",
- "directinla", "directional",
- "directionl", "directional",
- "directivos", "directions",
- "directores", "directors",
- "directorys", "directors",
- "directsong", "directions",
- "disaapoint", "disappoint",
- "disagreeed", "disagreed",
- "disapeared", "disappeared",
- "disappeard", "disappeared",
- "disappered", "disappeared",
- "disappiont", "disappoint",
- "disaproval", "disapproval",
- "disastorus", "disastrous",
- "disastrosa", "disastrous",
- "disastrose", "disastrous",
- "disastrosi", "disastrous",
- "disastroso", "disastrous",
- "disaterous", "disastrous",
- "discalimer", "disclaimer",
- "discapline", "discipline",
- "discepline", "discipline",
- "disception", "discretion",
- "discharded", "discharged",
- "disciplers", "disciples",
- "disciplies", "disciplines",
- "disciplins", "disciplines",
- "disciprine", "discipline",
- "disclamier", "disclaimer",
- "discliamer", "disclaimer",
- "disclipine", "discipline",
- "disclousre", "disclosure",
- "disclsoure", "disclosure",
- "discograhy", "discography",
- "discograpy", "discography",
- "discolsure", "disclosure",
- "disconenct", "disconnect",
- "disconncet", "disconnects",
- "disconnets", "disconnects",
- "discontued", "discounted",
- "discoruage", "discourages",
- "discources", "discourse",
- "discourgae", "discourages",
- "discourges", "discourages",
- "discoveres", "discovers",
- "discoveryd", "discovered",
- "discoverys", "discovers",
- "discrecion", "discretion",
- "discreddit", "discredited",
- "discrepany", "discrepancy",
- "discresion", "discretion",
- "discreting", "discretion",
- "discribing", "describing",
- "discrimine", "discriminate",
- "discrouage", "discourages",
- "discrption", "discretion",
- "discusison", "discussions",
- "discusting", "discussing",
- "disgracful", "disgraceful",
- "disgrunted", "disgruntled",
- "disgruntld", "disgruntled",
- "disguisted", "disguise",
- "disgustiny", "disgustingly",
- "disgustosa", "disgusts",
- "disgustose", "disgusts",
- "disgustosi", "disgusts",
- "disgustoso", "disgusts",
- "dishcarged", "discharged",
- "dishinored", "dishonored",
- "disicpline", "discipline",
- "disiplined", "disciplined",
- "dislcaimer", "disclaimer",
- "dismanteld", "dismantled",
- "dismanting", "dismantling",
- "dismentled", "dismantled",
- "dispecable", "despicable",
- "dispencary", "dispensary",
- "dispencers", "dispenser",
- "dispencing", "dispensing",
- "dispensare", "dispenser",
- "dispensory", "dispensary",
- "dispesnary", "dispensary",
- "dispicable", "despicable",
- "displayfps", "displays",
- "dispositon", "disposition",
- "dispostion", "disposition",
- "disputerad", "disputed",
- "disrecpect", "disrespect",
- "disrection", "discretion",
- "disrepsect", "disrespect",
- "disresepct", "disrespect",
- "disrespekt", "disrespect",
- "disription", "disruption",
- "disrispect", "disrespect",
- "disrputing", "disrupting",
- "disruptivo", "disruption",
- "disruptron", "disruption",
- "dissapears", "disappears",
- "dissappear", "disappear",
- "disscusion", "discussion",
- "dissmisive", "dismissive",
- "dissodance", "dissonance",
- "dissonante", "dissonance",
- "dissonence", "dissonance",
- "distastful", "distasteful",
- "disticntly", "distinctly",
- "distiction", "distinction",
- "distincion", "distinction",
- "distincive", "distinctive",
- "distinclty", "distinctly",
- "distinctie", "distinctive",
- "distinctin", "distinctions",
- "distingish", "distinguish",
- "distingush", "distinguish",
- "distintcly", "distinctly",
- "distoriton", "distortion",
- "distorsion", "distortion",
- "distortian", "distortion",
- "distortron", "distortion",
- "distractes", "distracts",
- "distractia", "district",
- "distractin", "district",
- "distractiv", "district",
- "distration", "distortion",
- "distribuem", "distribute",
- "distribuer", "distribute",
- "distribuie", "distribute",
- "distribuit", "distribute",
- "distributs", "distributors",
- "distribuye", "distribute",
- "distrotion", "distortion",
- "distrubing", "disturbing",
- "distrubtes", "distrust",
- "distrubute", "distribute",
- "distubring", "disturbing",
- "disturbace", "disturbance",
- "disturping", "disrupting",
- "disucssing", "discussing",
- "disucssion", "discussion",
- "disurption", "disruption",
- "ditributed", "distributed",
- "diversifiy", "diversify",
- "dividendes", "dividends",
- "dividendos", "dividends",
- "divideneds", "dividend",
- "divinition", "divination",
- "divinitory", "divinity",
- "divisiones", "divisions",
- "dobulelift", "doublelift",
- "doccuments", "documents",
- "documentry", "documentary",
- "dogmatisch", "dogmatic",
- "dolphinese", "dolphins",
- "domianting", "dominating",
- "domimation", "domination",
- "dominacion", "domination",
- "dominaters", "dominates",
- "donwgraded", "downgraded",
- "donwloaded", "downloaded",
- "donwvoters", "downvoters",
- "donwvoting", "downvoting",
- "doomsdaily", "doomsday",
- "doubellift", "doublelift",
- "doubleiift", "doublelift",
- "doubleleft", "doublelift",
- "doublelfit", "doublelift",
- "doublerift", "doublelift",
- "doulbelift", "doublelift",
- "downgarded", "downgraded",
- "downgrated", "downgrade",
- "downlaoded", "downloaded",
- "downloadas", "downloads",
- "downloades", "downloads",
- "downovting", "downvoting",
- "downroaded", "downgraded",
- "downsiders", "downsides",
- "downstaris", "downstairs",
- "downstiars", "downstairs",
- "downtokers", "downvoters",
- "downtoking", "downvoting",
- "downtraded", "downgraded",
- "downviting", "downvoting",
- "downvotear", "downvoters",
- "downvoteas", "downvoters",
- "downvoteds", "downvoters",
- "downvotees", "downvoters",
- "downvotesd", "downvoters",
- "downvotess", "downvoters",
- "downvotest", "downvoters",
- "downvoteur", "downvoters",
- "downvoties", "downvoters",
- "downvotres", "downvoters",
- "downvotted", "downvote",
- "downvottes", "downvoters",
- "downwoters", "downvoters",
- "downwoting", "downvoting",
- "drasticaly", "drastically",
- "drasticlly", "drastically",
- "draughtman", "draughtsman",
- "dumbbellls", "dumbbells",
- "dumbfouded", "dumbfounded",
- "dumbfouned", "dumbfounded",
- "dungeoness", "dungeons",
- "dupilcates", "duplicates",
- "duplicants", "duplicates",
- "duplicatas", "duplicates",
- "duplicitas", "duplicates",
- "duplifaces", "duplicates",
- "durabiltiy", "durability",
- "dyamically", "dynamically",
- "dynamicaly", "dynamically",
- "dynamicdns", "dynamics",
- "dynamiclly", "dynamically",
- "dynamicpsf", "dynamics",
- "dynamitage", "dynamite",
- "dysfuncion", "dysfunction",
- "earhtbound", "earthbound",
- "earthqauke", "earthquake",
- "earthquack", "earthquake",
- "earthquaks", "earthquakes",
- "earthquate", "earthquake",
- "earthqukes", "earthquakes",
- "easthetics", "aesthetics",
- "ecoligical", "ecological",
- "ecomonical", "economical",
- "econimical", "economical",
- "econimists", "economists",
- "economicas", "economics",
- "economicos", "economics",
- "economicus", "economics",
- "economisch", "economic",
- "economisit", "economists",
- "effeciency", "efficiency",
- "effectivly", "effectively",
- "efficeincy", "efficiency",
- "efficently", "efficiently",
- "efficiancy", "efficiency",
- "efficienct", "efficient",
- "efficienty", "efficiently",
- "egotistcal", "egotistical",
- "ehtnically", "ethnically",
- "ejaculaion", "ejaculation",
- "ejaculatie", "ejaculate",
- "ejaculatin", "ejaculation",
- "ejaculaton", "ejaculation",
- "ejaculatte", "ejaculate",
- "electircal", "electrical",
- "electivite", "elective",
- "electoraat", "electorate",
- "electorale", "electorate",
- "electorite", "electorate",
- "electornic", "electronic",
- "electrican", "electrician",
- "electriciy", "electricity",
- "electricty", "electricity",
- "electrinic", "electrician",
- "electroate", "electorate",
- "electrodan", "electron",
- "electroinc", "electron",
- "electrolye", "electrolytes",
- "electroman", "electron",
- "electroncs", "electrons",
- "electrones", "electrons",
- "electronik", "election",
- "electronis", "electronics",
- "electronix", "election",
- "elemantary", "elementary",
- "elementery", "elementary",
- "elementray", "elementary",
- "eleminated", "eliminated",
- "elephantes", "elephants",
- "elephantis", "elephants",
- "elephantos", "elephants",
- "elephantus", "elephants",
- "eletricity", "electricity",
- "elimanates", "eliminates",
- "elimenates", "eliminates",
- "elimentary", "elementary",
- "elimimates", "eliminates",
- "eliminaste", "eliminates",
- "eliminatin", "elimination",
- "eliminaton", "elimination",
- "eliminster", "eliminates",
- "ellipitcal", "elliptical",
- "ellipsical", "elliptical",
- "ellipticle", "elliptical",
- "ellitpical", "elliptical",
- "ellpitical", "elliptical",
- "eloquantly", "eloquently",
- "eloquintly", "eloquently",
- "emapthetic", "empathetic",
- "embarassed", "embarrassed",
- "embarassig", "embarassing",
- "embarrased", "embarrassed",
- "embarrases", "embarrassed",
- "embezelled", "embezzled",
- "emblamatic", "emblematic",
- "embodyment", "embodiment",
- "emergenies", "emergencies",
- "emmigrated", "emigrated",
- "emminently", "eminently",
- "emmisaries", "emissaries",
- "emobdiment", "embodiment",
- "emotionaly", "emotionally",
- "empahsized", "emphasized",
- "empahsizes", "emphasizes",
- "empathatic", "empathetic",
- "emphacized", "emphasized",
- "emphatetic", "empathetic",
- "emphatised", "emphasized",
- "emphatized", "emphasized",
- "emphatizes", "emphasizes",
- "emphazised", "emphasized",
- "emphazises", "emphasizes",
- "emphesized", "emphasized",
- "emphesizes", "emphasizes",
- "emphisized", "emphasized",
- "emphisizes", "emphasizes",
- "empiricaly", "empirically",
- "employeers", "employees",
- "employeurs", "employer",
- "emprisoned", "imprisoned",
- "encahnting", "enchanting",
- "enchancing", "enchanting",
- "enchanging", "enchanting",
- "enchantent", "enchantment",
- "enchantmet", "enchantments",
- "encompases", "encompasses",
- "encounterd", "encountered",
- "encountred", "encountered",
- "encouraing", "encouraging",
- "encoutners", "encounters",
- "encription", "encryption",
- "encrpytion", "encryption",
- "encyrption", "encryption",
- "endlessley", "endlessly",
- "endolithes", "endoliths",
- "enforceing", "enforcing",
- "engagemnet", "engagements",
- "engagemnts", "engagements",
- "engieneers", "engineers",
- "enginereed", "engineered",
- "enivitable", "inevitable",
- "enlargment", "enlargement",
- "enlighment", "enlighten",
- "enlightend", "enlightened",
- "enlightned", "enlightened",
- "enrolement", "enrollment",
- "enrollemnt", "enrollment",
- "enterpirse", "enterprise",
- "enterprice", "enterprise",
- "enterpries", "enterprises",
- "enterprize", "enterprise",
- "enterprsie", "enterprises",
- "enterrpise", "enterprises",
- "entertaing", "entertaining",
- "enthically", "ethnically",
- "enthisiast", "enthusiast",
- "enthuiasts", "enthusiast",
- "enthuisast", "enthusiasts",
- "enthusiams", "enthusiasm",
- "enthusiant", "enthusiast",
- "enthusiats", "enthusiast",
- "enthusiest", "enthusiast",
- "enthusists", "enthusiasts",
- "envelopped", "envelope",
- "enveloppen", "envelope",
- "enveloppes", "envelope",
- "enviorment", "environment",
- "enviroment", "environment",
- "environmet", "environments",
- "equiavlent", "equivalents",
- "equilavent", "equivalent",
- "equilibium", "equilibrium",
- "equilibrim", "equilibrium",
- "equilibrum", "equilibrium",
- "equippment", "equipment",
- "equitorial", "equatorial",
- "equivalant", "equivalent",
- "equivalnce", "equivalence",
- "equivalnet", "equivalents",
- "equivelant", "equivalent",
- "equivelent", "equivalent",
- "equivilant", "equivalent",
- "equivilent", "equivalent",
- "equivlaent", "equivalents",
- "equivolent", "equivalent",
- "eratically", "erratically",
- "escalative", "escalate",
- "escavation", "escalation",
- "esitmation", "estimation",
- "esoterisch", "esoteric",
- "especailly", "especially",
- "espeically", "especially",
- "espressino", "espresso",
- "espression", "espresso",
- "essencials", "essentials",
- "essensials", "essentials",
- "essentails", "essentials",
- "essentialy", "essentially",
- "essentiels", "essentials",
- "essentuals", "essentials",
- "estabishes", "establishes",
- "estimacion", "estimation",
- "estimativo", "estimation",
- "estination", "estimation",
- "ethicallly", "ethically",
- "ethincally", "ethnically",
- "ethnicites", "ethnicities",
- "ethnicitiy", "ethnicity",
- "euphorical", "euphoria",
- "euphorisch", "euphoric",
- "euthanaisa", "euthanasia",
- "euthanazia", "euthanasia",
- "euthanesia", "euthanasia",
- "evaluacion", "evaluation",
- "evalutaion", "evaluation",
- "evaulating", "evaluating",
- "evaulation", "evaluation",
- "eventaully", "eventually",
- "eventially", "eventually",
- "everyoneis", "everyones",
- "exacberate", "exacerbated",
- "exagerated", "exaggerated",
- "exagerates", "exaggerates",
- "exagerrate", "exaggerate",
- "exaggarate", "exaggerate",
- "exaggurate", "exaggerate",
- "exahusting", "exhausting",
- "exahustion", "exhaustion",
- "examinated", "examined",
- "examinerad", "examined",
- "exapansion", "expansion",
- "exapnsions", "expansions",
- "exauhsting", "exhausting",
- "exauhstion", "exhaustion",
- "excecuting", "executing",
- "excecution", "execution",
- "exceedigly", "exceedingly",
- "exceedinly", "exceedingly",
- "excellance", "excellence",
- "excellenet", "excellence",
- "excellenze", "excellence",
- "excerising", "exercising",
- "excessivly", "excessively",
- "exchangees", "exchanges",
- "excitiment", "excitement",
- "exclsuives", "exclusives",
- "exclusivas", "exclusives",
- "exclusivly", "exclusively",
- "exclusivos", "exclusives",
- "exclusivty", "exclusivity",
- "exclussive", "exclusives",
- "exclusvies", "exclusives",
- "excpetions", "exceptions",
- "exculsives", "exclusives",
- "exculsivly", "exclusively",
- "execptions", "exceptions",
- "exectuable", "executable",
- "exectuions", "executions",
- "exectuives", "executives",
- "execusions", "executions",
- "executabil", "executable",
- "executible", "executable",
- "executiner", "executioner",
- "executings", "executions",
- "executivas", "executives",
- "exeedingly", "exceedingly",
- "exepmtions", "exemptions",
- "exeptional", "exceptional",
- "exercicing", "exercising",
- "exercizing", "exercising",
- "exersicing", "exercising",
- "exersising", "exercising",
- "exersizing", "exercising",
- "exerternal", "external",
- "exeuctions", "executions",
- "exhasuting", "exhausting",
- "exhasution", "exhaustion",
- "exhaustivo", "exhaustion",
- "exhibicion", "exhibition",
- "exhibitons", "exhibits",
- "exhuasting", "exhausting",
- "exhuastion", "exhaustion",
- "exibitions", "exhibitions",
- "exictement", "excitement",
- "exipration", "expiration",
- "existantes", "existent",
- "existenial", "existential",
- "existental", "existential",
- "exlcusives", "exclusives",
- "exorbatant", "exorbitant",
- "exorbatent", "exorbitant",
- "exorbidant", "exorbitant",
- "exorbirant", "exorbitant",
- "exorbitent", "exorbitant",
- "expalining", "explaining",
- "expanisons", "expansions",
- "expansivos", "expansions",
- "expanssion", "expansions",
- "expantions", "expansions",
- "expecially", "especially",
- "expectaion", "expectation",
- "expectansy", "expectancy",
- "expectency", "expectancy",
- "expections", "exceptions",
- "expedetion", "expedition",
- "expedicion", "expedition",
- "expeditivo", "expedition",
- "expeiments", "experiments",
- "expemtions", "exemptions",
- "expendeble", "expendable",
- "expendible", "expendable",
- "expensable", "expendable",
- "expentancy", "expectancy",
- "expereince", "experience",
- "experement", "experiment",
- "experiance", "experience",
- "experieced", "experienced",
- "experieces", "experiences",
- "experiemnt", "experiment",
- "experiened", "experienced",
- "experiense", "experiences",
- "expermient", "experiments",
- "experssion", "expression",
- "expextancy", "expectancy",
- "expidetion", "expedition",
- "expierence", "experience",
- "expination", "expiration",
- "expirement", "experiment",
- "explanatin", "explanations",
- "explicatia", "explicit",
- "explicatie", "explicit",
- "explicatif", "explicit",
- "explicatii", "explicit",
- "explicetly", "explicitly",
- "explicilty", "explicitly",
- "explioting", "exploiting",
- "exploiding", "exploiting",
- "exploition", "exploiting",
- "explorarea", "explorer",
- "exploreres", "explorers",
- "explosivas", "explosives",
- "explossion", "explosions",
- "explossive", "explosives",
- "explosvies", "explosives",
- "explotions", "explosions",
- "explusions", "explosions",
- "expodition", "exposition",
- "expoliting", "exploiting",
- "expolsions", "explosions",
- "expolsives", "explosives",
- "exponental", "exponential",
- "exposicion", "exposition",
- "expositivo", "exposition",
- "expotition", "exposition",
- "exprensive", "expressive",
- "expresions", "expression",
- "expresison", "expressions",
- "expressens", "expresses",
- "expressief", "expressive",
- "expressley", "expressly",
- "expriation", "expiration",
- "extensivly", "extensively",
- "extentions", "extensions",
- "exterioara", "exterior",
- "exterioare", "exterior",
- "extermally", "externally",
- "extermists", "extremists",
- "extraccion", "extraction",
- "extractivo", "extraction",
- "extractnow", "extraction",
- "extradtion", "extraction",
- "extremaste", "extremes",
- "extremeley", "extremely",
- "extremelly", "extremely",
- "extrememly", "extremely",
- "extremests", "extremists",
- "extremised", "extremes",
- "extremisim", "extremism",
- "extremisme", "extremes",
- "extremiste", "extremes",
- "extrenally", "externally",
- "extrimists", "extremists",
- "eyeballers", "eyeballs",
- "fabriacted", "fabricated",
- "fabricatie", "fabricated",
- "faciliated", "facilitated",
- "facilitait", "facilitate",
- "facilitant", "facilitate",
- "facilitare", "facilitate",
- "facisnated", "fascinated",
- "facitilies", "facilities",
- "facsinated", "fascinated",
- "fahernheit", "fahrenheit",
- "fahrenhiet", "fahrenheit",
- "fallatious", "fallacious",
- "fallicious", "fallacious",
- "falshbacks", "flashbacks",
- "familiarty", "familiarity",
- "familiarze", "familiarize",
- "fanaticals", "fanatics",
- "fanfaction", "fanfiction",
- "fanfcition", "fanfiction",
- "fanficiton", "fanfiction",
- "fanserivce", "fanservice",
- "fanservise", "fanservice",
- "fanservive", "fanservice",
- "fantasiose", "fantasies",
- "farehnheit", "fahrenheit",
- "farhenheit", "fahrenheit",
- "fascianted", "fascinated",
- "fascinatie", "fascinated",
- "fascinatin", "fascination",
- "fascistisk", "fascists",
- "fatalaties", "fatalities",
- "favoruites", "favourites",
- "favourates", "favourites",
- "favouritsm", "favourites",
- "favourties", "favourites",
- "federacion", "federation",
- "federativo", "federation",
- "fellowhsip", "fellowship",
- "fellowshop", "fellowship",
- "feminimity", "femininity",
- "feministas", "feminists",
- "feminitity", "femininity",
- "fermentato", "fermentation",
- "fertalizer", "fertilizer",
- "fertelizer", "fertilizer",
- "fertilizar", "fertilizer",
- "fertilzier", "fertilizer",
- "fertiziler", "fertilizer",
- "festivales", "festivals",
- "fetishiste", "fetishes",
- "ficticious", "fictitious",
- "filessytem", "filesystem",
- "filesytems", "filesystem",
- "filmamkers", "filmmakers",
- "filmmakare", "filmmakers",
- "finallizes", "finalizes",
- "financialy", "financially",
- "fingernals", "fingernails",
- "fingerpies", "fingertips",
- "fingerpint", "fingerprint",
- "fingertaps", "fingertips",
- "fingertits", "fingertips",
- "fingertops", "fingertips",
- "fireballls", "fireballs",
- "firefigher", "firefighter",
- "firefigter", "firefighter",
- "firendlies", "friendlies",
- "firghtened", "frightened",
- "fisionable", "fissionable",
- "flashligth", "flashlight",
- "flaskbacks", "flashbacks",
- "flawleslly", "flawlessly",
- "flexibiliy", "flexibility",
- "flexibilty", "flexibility",
- "flimmakers", "filmmakers",
- "fluctuatie", "fluctuate",
- "fluctuatin", "fluctuations",
- "flutterhsy", "fluttershy",
- "fluttersky", "fluttershy",
- "flutterspy", "fluttershy",
- "forcifully", "forcefully",
- "forecfully", "forcefully",
- "foreginers", "foreigners",
- "foregorund", "foreground",
- "foreignese", "foreigners",
- "foreigness", "foreigners",
- "foreignors", "foreigners",
- "foreingers", "foreigners",
- "forensisch", "forensic",
- "foreseeble", "foreseeable",
- "forgeiners", "foreigners",
- "forgieners", "foreigners",
- "forgivance", "forgiven",
- "forgivenss", "forgiveness",
- "forgotting", "forgetting",
- "foriegners", "foreigners",
- "formadible", "formidable",
- "formalhaut", "fomalhaut",
- "formallity", "formally",
- "formallize", "formalize",
- "formatiing", "formatting",
- "formatings", "formations",
- "formativos", "formations",
- "formidabel", "formidable",
- "formidabil", "formidable",
- "formidible", "formidable",
- "forminable", "formidable",
- "formitable", "formidable",
- "formuladas", "formulas",
- "formulados", "formulas",
- "forseeable", "foreseeable",
- "fortelling", "foretelling",
- "fortunatly", "fortunately",
- "fortunetly", "fortunately",
- "foundaiton", "foundations",
- "foundaries", "foundries",
- "foundatoin", "foundations",
- "fractalers", "fractals",
- "fractalius", "fractals",
- "fractalpus", "fractals",
- "fracturare", "fracture",
- "fragmanted", "fragment",
- "francaises", "franchises",
- "franchices", "franchises",
- "franchines", "franchises",
- "franchizes", "franchises",
- "franchsies", "franchises",
- "fransiscan", "franciscan",
- "franticaly", "frantically",
- "franticlly", "frantically",
- "fraternaty", "fraternity",
- "fraternety", "fraternity",
- "fraterntiy", "fraternity",
- "fraturnity", "fraternity",
- "fraudalent", "fraudulent",
- "fraudelant", "fraudulent",
- "fraudelent", "fraudulent",
- "fraudolent", "fraudulent",
- "fraudulant", "fraudulent",
- "freedomers", "freedoms",
- "freedomest", "freedoms",
- "freindlies", "friendlies",
- "freindship", "friendship",
- "frequencey", "frequency",
- "friednship", "friendships",
- "friednzone", "friendzoned",
- "friendhsip", "friendship",
- "friendsies", "friendlies",
- "friendzies", "friendlies",
- "friendzond", "friendzoned",
- "frientship", "friendship",
- "frigthened", "frightened",
- "fromatting", "formatting",
- "fromidable", "formidable",
- "frontlinie", "frontline",
- "fruadulent", "fraudulent",
- "frustraded", "frustrated",
- "frustradet", "frustrates",
- "frustraits", "frustrates",
- "frustrants", "frustrates",
- "frustratin", "frustration",
- "frustrsted", "frustrates",
- "fucntional", "functional",
- "fulfulling", "fulfilling",
- "fullfiling", "fulfilling",
- "fullfilled", "fulfilled",
- "fullscrean", "fullscreen",
- "fulttershy", "fluttershy",
- "funcitonal", "functional",
- "fundametal", "fundamental",
- "furstrated", "frustrated",
- "furstrates", "frustrates",
- "furutistic", "futuristic",
- "futhermore", "furthermore",
- "futurestic", "futuristic",
- "futurisitc", "futuristic",
- "futurustic", "futuristic",
- "galvinized", "galvanized",
- "garuanteed", "guaranteed",
- "garuantees", "guarantees",
- "gauntanamo", "guantanamo",
- "gauntlents", "gauntlet",
- "gauranteed", "guaranteed",
- "gaurantees", "guarantees",
- "gaurenteed", "guaranteed",
- "gaurentees", "guarantees",
- "generalice", "generalize",
- "generalife", "generalize",
- "generalnie", "generalize",
- "generaters", "generates",
- "generaties", "generate",
- "generatios", "generators",
- "generatons", "generators",
- "generatore", "generate",
- "generelize", "generalize",
- "generocity", "generosity",
- "generoisty", "generosity",
- "generostiy", "generosity",
- "geneticaly", "genetically",
- "geneticlly", "genetically",
- "genitalias", "genitals",
- "genuinelly", "genuinely",
- "geographia", "geographical",
- "geogrpahic", "geographic",
- "germanisch", "germanic",
- "gigantisch", "gigantic",
- "gimmickers", "gimmicks",
- "girlfirend", "girlfriend",
- "girlfreind", "girlfriend",
- "girlfriens", "girlfriends",
- "girlfrinds", "girlfriends",
- "girlfrined", "girlfriends",
- "goalkeaper", "goalkeeper",
- "goalkeeprs", "goalkeeper",
- "goalkepeer", "goalkeeper",
- "goegraphic", "geographic",
- "golakeeper", "goalkeeper",
- "goldburger", "goldberg",
- "goosebumbs", "goosebumps",
- "goosegumps", "goosebumps",
- "goosepumps", "goosebumps",
- "gothenberg", "gothenburg",
- "govenrment", "government",
- "govermenet", "goverment",
- "govermnent", "governments",
- "governemnt", "government",
- "governened", "governed",
- "governered", "governed",
- "governmant", "governmental",
- "governmetn", "governments",
- "governmnet", "government",
- "govnerment", "government",
- "govornment", "government",
- "gradiating", "graduating",
- "gradiation", "graduation",
- "graduacion", "graduation",
- "grapefriut", "grapefruit",
- "grapefrukt", "grapefruit",
- "graphicaly", "graphically",
- "graphiclly", "graphically",
- "gratituous", "gratuitous",
- "gratiutous", "gratuitous",
- "gratuidous", "gratuitous",
- "gratuituos", "gratuitous",
- "gratutious", "gratuitous",
- "graudating", "graduating",
- "graudation", "graduation",
- "gravitatie", "gravitate",
- "greatfully", "gratefully",
- "greenhosue", "greenhouse",
- "greviances", "grievances",
- "grievences", "grievances",
- "grilfriend", "girlfriend",
- "guaduloupe", "guadalupe",
- "guanatanmo", "guantanamo",
- "guantamamo", "guantanamo",
- "guantamano", "guantanamo",
- "guantanano", "guantanamo",
- "guantanemo", "guantanamo",
- "guantanoma", "guantanamo",
- "guantanomo", "guantanamo",
- "guantonamo", "guantanamo",
- "guarantess", "guarantees",
- "guardiands", "guardians",
- "guardianes", "guardians",
- "guardianis", "guardians",
- "guarenteed", "guaranteed",
- "guarentees", "guarantees",
- "guarnateed", "guaranteed",
- "guarnatees", "guarantees",
- "guarunteed", "guaranteed",
- "guaruntees", "guarantees",
- "guatamalan", "guatemalan",
- "gunatanamo", "guantanamo",
- "gunlsinger", "gunslinger",
- "gunsiinger", "gunslinger",
- "gunslanger", "gunslinger",
- "gunsligner", "gunslinger",
- "gunstinger", "gunslinger",
- "gymanstics", "gymnastics",
- "gymnasitcs", "gymnastics",
- "gynmastics", "gymnastics",
- "haemorrage", "haemorrhage",
- "halloweeen", "halloween",
- "hambergers", "hamburgers",
- "hamburgare", "hamburger",
- "hamburgesa", "hamburgers",
- "hamburgles", "hamburgers",
- "hamburgurs", "hamburgers",
- "handcuffes", "handcuffs",
- "handelbars", "handlebars",
- "handicaped", "handicapped",
- "handwritng", "handwriting",
- "harasments", "harassments",
- "hardlinked", "hardline",
- "harmoniacs", "harmonic",
- "harmonisch", "harmonic",
- "harrasment", "harassment",
- "harrassing", "harassing",
- "harvasting", "harvesting",
- "haversting", "harvesting",
- "headhpones", "headphones",
- "headphoens", "headphones",
- "headquarer", "headquarter",
- "headquater", "headquarter",
- "headshoots", "headshot",
- "healtchare", "healthcare",
- "healtheast", "healthiest",
- "healthyest", "healthiest",
- "heapdhones", "headphones",
- "heartbeart", "heartbeat",
- "heartbeast", "heartbeat",
- "heartborne", "heartbroken",
- "heartbrake", "heartbreak",
- "hearthsone", "hearthstone",
- "heatlhcare", "healthcare",
- "heavyweght", "heavyweight",
- "heavyweigt", "heavyweight",
- "hedgehodge", "hedgehog",
- "heidelburg", "heidelberg",
- "heigthened", "heightened",
- "heistation", "hesitation",
- "helathcare", "healthcare",
- "helicopers", "helicopters",
- "helicoptor", "helicopter",
- "helicotper", "helicopters",
- "helicpoter", "helicopter",
- "helictoper", "helicopters",
- "helikopter", "helicopter",
- "hemingwary", "hemingway",
- "hemingwavy", "hemingway",
- "hemipshere", "hemisphere",
- "hemishpere", "hemisphere",
- "hemmorhage", "hemorrhage",
- "hempishere", "hemisphere",
- "herculeans", "hercules",
- "herculeasy", "hercules",
- "herculeees", "hercules",
- "hesitstion", "hesitation",
- "hestiation", "hesitation",
- "hieghtened", "heightened",
- "hierachies", "hierarchies",
- "hieroglphs", "hieroglyphs",
- "highalnder", "highlander",
- "highlighed", "highlighted",
- "highligted", "highlighted",
- "highloader", "highlander",
- "highpander", "highlander",
- "highscholl", "highschool",
- "highshcool", "highschool",
- "hillarious", "hilarious",
- "hinderance", "hindrance",
- "hinderence", "hindrance",
- "hipsterest", "hipsters",
- "hispanicos", "hispanics",
- "hispanicus", "hispanics",
- "histarical", "historical",
- "histerical", "historical",
- "historiaan", "historians",
- "historicas", "historians",
- "historicly", "historical",
- "historiens", "histories",
- "historisch", "historic",
- "hoemopathy", "homeopathy",
- "hollywoood", "hollywood",
- "homecuming", "homecoming",
- "homeoapthy", "homeopathy",
- "homeonwers", "homeowners",
- "homeopahty", "homeopathy",
- "homeophaty", "homeopathy",
- "homeopothy", "homeopathy",
- "homeothapy", "homeopathy",
- "homepoathy", "homeopathy",
- "homewoners", "homeowners",
- "homoepathy", "homeopathy",
- "homogeneos", "homogeneous",
- "homogeneus", "homogeneous",
- "homophibia", "homophobia",
- "homophibic", "homophobic",
- "homophobie", "homophobe",
- "homophonia", "homophobia",
- "homophopia", "homophobia",
- "homophopic", "homophobic",
- "homosexaul", "homosexual",
- "homosexuel", "homosexual",
- "honeymooon", "honeymoon",
- "hopefullly", "hopefully",
- "hopeleslly", "hopelessly",
- "horisontal", "horizontal",
- "horizantal", "horizontal",
- "horizontes", "horizons",
- "horiztonal", "horizontal",
- "horrendeus", "horrendous",
- "horriblely", "horribly",
- "hospitales", "hospitals",
- "hospitalty", "hospitality",
- "hospitible", "hospitable",
- "hsitorians", "historians",
- "humanaties", "humanities",
- "humanitary", "humanity",
- "humiliatin", "humiliation",
- "humiliaton", "humiliation",
- "humilitied", "humiliated",
- "humillated", "humiliated",
- "hurricance", "hurricane",
- "hurriganes", "hurricanes",
- "hurrikanes", "hurricanes",
- "hurrycanes", "hurricanes",
- "hydropilic", "hydrophilic",
- "hydropobic", "hydrophobic",
- "hyperbolie", "hyperbole",
- "hyperlobic", "hyperbolic",
- "hyperlogic", "hyperbolic",
- "hypertrohy", "hypertrophy",
- "hypertropy", "hypertrophy",
- "hyphotesis", "hypothesis",
- "hypocrates", "hypocrites",
- "hypocriscy", "hypocrisy",
- "hypocrises", "hypocrites",
- "hypocritus", "hypocrites",
- "hypocrties", "hypocrites",
- "hypocrytes", "hypocrites",
- "hypokrites", "hypocrites",
- "hypothecis", "hypothesis",
- "hypotheiss", "hypotheses",
- "hypothesus", "hypotheses",
- "hypothises", "hypotheses",
- "hypothisis", "hypothesis",
- "hypothosis", "hypothesis",
- "hyprocites", "hypocrites",
- "hystarical", "hysterical",
- "hystericly", "hysterical",
- "hysteriska", "hysteria",
- "ibuprofein", "ibuprofen",
- "ibuprofine", "ibuprofen",
- "icelandinc", "icelandic",
- "idealisitc", "idealistic",
- "idealogies", "ideologies",
- "identicial", "identical",
- "identifyed", "identified",
- "identitets", "identities",
- "ideolagies", "ideologies",
- "ideoligies", "ideologies",
- "ideologias", "ideologies",
- "ideologice", "ideologies",
- "ideologije", "ideologies",
- "ideologins", "ideologies",
- "ideologisk", "ideologies",
- "ideolouges", "ideologies",
- "illegalest", "illegals",
- "illegallly", "illegally",
- "illegimacy", "illegitimacy",
- "illegitime", "illegitimate",
- "illegitimt", "illegitimate",
- "illimunati", "illuminati",
- "illinoians", "illinois",
- "illistrate", "illiterate",
- "illitarate", "illiterate",
- "illitirate", "illiterate",
- "illumanati", "illuminati",
- "illumaniti", "illuminati",
- "illumianti", "illuminati",
- "illumimati", "illuminati",
- "illuminaci", "illuminati",
- "illuminadi", "illuminati",
- "illuminami", "illuminati",
- "illuminazi", "illuminati",
- "illuminite", "illuminati",
- "illuminiti", "illuminati",
- "illuminoti", "illuminati",
- "illuminuti", "illuminati",
- "illumniati", "illuminati",
- "illumunati", "illuminati",
- "illuninati", "illuminati",
- "illusiones", "illusions",
- "illustrant", "illustrate",
- "illustrare", "illustrate",
- "illustrato", "illustration",
- "imablanced", "imbalanced",
- "imablances", "imbalances",
- "imaginatie", "imaginative",
- "imaginaton", "imagination",
- "imaginitve", "imaginative",
- "imbalenced", "imbalanced",
- "imbalences", "imbalances",
- "imcomplete", "incomplete",
- "imediately", "immediately",
- "imigration", "emigration",
- "immaturaty", "immaturity",
- "immaturety", "immaturity",
- "immedeatly", "immediately",
- "immediatly", "immediately",
- "immedietly", "immediately",
- "immenseley", "immensely",
- "immidately", "immediately",
- "immigranti", "immigration",
- "immigrents", "immigrants",
- "immitating", "imitating",
- "immobilien", "immobile",
- "immobilier", "immobile",
- "immobilzed", "immobile",
- "immobilzer", "immobile",
- "immobilzes", "immobile",
- "immortales", "immortals",
- "immortalis", "immortals",
- "immortaliy", "immortality",
- "immortalls", "immortals",
- "immortalty", "immortality",
- "impartirla", "impartial",
- "impecabbly", "impeccably",
- "impeccible", "impeccable",
- "impeckable", "impeccable",
- "impelments", "implements",
- "imperetive", "imperative",
- "imperialsm", "imperialism",
- "imperialst", "imperialist",
- "imperitave", "imperative",
- "imperitive", "imperative",
- "implaments", "implements",
- "implantase", "implants",
- "implausble", "implausible",
- "implausibe", "implausible",
- "implemenet", "implements",
- "implicatia", "implicit",
- "implicatie", "implicit",
- "implicatii", "implicit",
- "implicetly", "implicitly",
- "impliciete", "implicit",
- "implicilty", "implicitly",
- "impliments", "implements",
- "imporbable", "improbable",
- "importanly", "importantly",
- "importanty", "importantly",
- "importence", "importance",
- "importerad", "imported",
- "imporvised", "improvised",
- "impossable", "impossible",
- "impossbily", "impossibly",
- "impossibal", "impossibly",
- "impossibel", "impossibly",
- "impossibry", "impossibly",
- "impossibul", "impossibly",
- "impractial", "impractical",
- "impreative", "imperative",
- "impresison", "impressions",
- "impressoin", "impressions",
- "impressons", "impressions",
- "improbabil", "improbable",
- "improbible", "improbable",
- "impropable", "improbable",
- "improsined", "imprisoned",
- "improsoned", "imprisoned",
- "improvemnt", "improvement",
- "improvents", "improves",
- "improvized", "improvised",
- "imprsioned", "imprisoned",
- "impulsemos", "impulses",
- "imrpovised", "improvised",
- "inablility", "inability",
- "inaccruate", "inaccurate",
- "inadaquate", "inadequate",
- "inadaquete", "inadequate",
- "inadecuate", "inadequate",
- "inadeguate", "inadequate",
- "inadeqaute", "inadequate",
- "inadequete", "inadequate",
- "inadequite", "inadequate",
- "inadiquate", "inadequate",
- "inagurated", "inaugurated",
- "inbalanced", "imbalanced",
- "inbetweeen", "inbetween",
- "incarnaton", "incarnation",
- "incentivos", "incentives",
- "inchoerent", "incoherent",
- "incidentes", "incidents",
- "incidently", "incidentally",
- "incidentul", "incidental",
- "inclreased", "increased",
- "incognitio", "incognito",
- "incoherant", "incoherent",
- "incohorent", "incoherent",
- "incorectly", "incorrectly",
- "incorrecly", "incorrectly",
- "incorrecty", "incorrectly",
- "incorretly", "incorrectly",
- "incraments", "increments",
- "incredable", "incredible",
- "incredably", "incredibly",
- "incremetal", "incremental",
- "incriments", "increments",
- "inctroduce", "introduce",
- "indefenite", "indefinite",
- "indefinate", "indefinite",
- "indefinete", "indefinite",
- "indefinity", "indefinitely",
- "indeginous", "indigenous",
- "indentical", "identical",
- "independet", "independent",
- "indepenent", "independent",
- "inderictly", "indirectly",
- "indicaters", "indicates",
- "indicativo", "indication",
- "indicatore", "indicate",
- "indicitave", "indicative",
- "indicitive", "indicative",
- "indiffernt", "indifferent",
- "indigenius", "indigenous",
- "indiginous", "indigenous",
- "indigneous", "indigenous",
- "indikation", "indication",
- "indireclty", "indirectly",
- "indirektly", "indirectly",
- "individuel", "individual",
- "indiviudal", "individuals",
- "indivudual", "individual",
- "indoensian", "indonesian",
- "indonasian", "indonesian",
- "indoneisan", "indonesian",
- "indonesean", "indonesian",
- "indonesien", "indonesian",
- "indonesion", "indonesian",
- "indonisian", "indonesian",
- "indonistan", "indonesian",
- "indpendent", "independent",
- "industiral", "industrial",
- "industires", "industries",
- "industrail", "industrial",
- "industrees", "industries",
- "industrias", "industries",
- "industriel", "industrial",
- "industrija", "industrial",
- "industrije", "industries",
- "indviduals", "individuals",
- "inefficent", "inefficient",
- "ineqaulity", "inequality",
- "inequailty", "inequality",
- "inevatible", "inevitable",
- "inevetable", "inevitable",
- "inevetably", "inevitably",
- "inevetible", "inevitable",
- "inevidable", "inevitable",
- "inevidably", "inevitably",
- "inevitible", "inevitable",
- "inevitibly", "inevitably",
- "inevtiable", "inevitable",
- "inevtiably", "inevitably",
- "infallable", "infallible",
- "infaltable", "inflatable",
- "infeccious", "infectious",
- "infecteous", "infectious",
- "infectuous", "infectious",
- "infedility", "infidelity",
- "infektious", "infectious",
- "inferioara", "inferior",
- "inferioare", "inferior",
- "inferiorty", "inferiority",
- "inferrence", "inference",
- "infestaion", "infestation",
- "infestaton", "infestation",
- "infestions", "infections",
- "infideltiy", "infidelity",
- "infidility", "infidelity",
- "infiltrade", "infiltrate",
- "infiltrait", "infiltrate",
- "infiltrare", "infiltrate",
- "infiltrase", "infiltrate",
- "infinately", "infinitely",
- "infinetely", "infinitely",
- "infiniment", "infinite",
- "infinitley", "infinitely",
- "infintiely", "infinitely",
- "inflamable", "inflatable",
- "inflateble", "inflatable",
- "inflatible", "inflatable",
- "infleunced", "influenced",
- "inflitrate", "infiltrate",
- "influanced", "influenced",
- "influances", "influences",
- "influencie", "influences",
- "influening", "influencing",
- "influensed", "influences",
- "influenser", "influences",
- "influenses", "influences",
- "influental", "influential",
- "influented", "influenced",
- "influentes", "influences",
- "influneced", "influenced",
- "infograhic", "infographic",
- "infograpic", "infographic",
- "infomation", "information",
- "informable", "informal",
- "informarla", "informal",
- "informarle", "informal",
- "informarlo", "informal",
- "informatie", "informative",
- "informella", "informal",
- "informerad", "informed",
- "informtion", "information",
- "infridging", "infringing",
- "infrigning", "infringing",
- "infulenced", "influenced",
- "infulences", "influences",
- "ingenuitiy", "ingenuity",
- "ingrediant", "ingredient",
- "ingrediens", "ingredients",
- "ingrediets", "ingredient",
- "inhabitans", "inhabitants",
- "inhabitats", "inhabitants",
- "inherantly", "inherently",
- "inherintly", "inherently",
- "inheritage", "heritage",
- "inhernetly", "inherently",
- "inifnitely", "infinitely",
- "initaition", "initiation",
- "initalised", "initialised",
- "initaliser", "initialiser",
- "initalises", "initialises",
- "initalisms", "initialisms",
- "initalized", "initialized",
- "initalizer", "initializer",
- "initalizes", "initializes",
- "initalling", "initialling",
- "initalness", "initialness",
- "initiaitve", "initiatives",
- "initiaties", "initiatives",
- "initiativs", "initiatives",
- "initiatves", "initiatives",
- "initiavite", "initiatives",
- "inititaive", "initiatives",
- "inititiave", "initiatives",
- "initmately", "intimately",
- "initmidate", "intimidate",
- "inituition", "initiation",
- "injustaces", "injustices",
- "injusticas", "injustices",
- "inmigrants", "immigrants",
- "innoavtion", "innovations",
- "innocentes", "innocents",
- "innotation", "innovation",
- "innovacion", "innovation",
- "innovaiton", "innovations",
- "innovatief", "innovate",
- "innovaties", "innovate",
- "innovativo", "innovation",
- "innvoation", "innovation",
- "inofficial", "unofficial",
- "inpsection", "inspection",
- "inquisator", "inquisitor",
- "inquisidor", "inquisitor",
- "inquisiter", "inquisitor",
- "inquisitio", "inquisitor",
- "inquisitir", "inquisitor",
- "inquisiton", "inquisition",
- "inquistior", "inquisitor",
- "inquizitor", "inquisitor",
- "inqusitior", "inquisitor",
- "insensitve", "insensitive",
- "insepction", "inspection",
- "insistance", "insistence",
- "insistente", "insistence",
- "insistenze", "insistence",
- "insistince", "insistence",
- "insitution", "institution",
- "inspeccion", "inspection",
- "inspeciton", "inspections",
- "inspectons", "inspections",
- "inspectres", "inspectors",
- "inspektion", "inspection",
- "inspektors", "inspectors",
- "inspiraste", "inspires",
- "inspiraton", "inspiration",
- "inspirerad", "inspired",
- "inspireras", "inspires",
- "insrugency", "insurgency",
- "instabiliy", "instability",
- "instabilty", "instability",
- "installeer", "installer",
- "installent", "installment",
- "installesd", "installs",
- "installion", "installing",
- "instatance", "instance",
- "instelling", "installing",
- "instituded", "instituted",
- "instituion", "institution",
- "institutie", "institute",
- "institutue", "instituted",
- "instrament", "instrument",
- "instrcutor", "instructors",
- "instrucion", "instruction",
- "instructer", "instructor",
- "instructie", "instructed",
- "instruktor", "instructor",
- "instuction", "instruction",
- "instuments", "instruments",
- "insturcted", "instructed",
- "insturctor", "instructor",
- "insturment", "instrument",
- "instutions", "intuitions",
- "instututed", "instituted",
- "insurgance", "insurgency",
- "insurgancy", "insurgency",
- "intangable", "intangible",
- "intangeble", "intangible",
- "intangibil", "intangible",
- "intanjible", "intangible",
- "integraded", "integrated",
- "integrarla", "integral",
- "integrarlo", "integral",
- "integratie", "integrated",
- "integreres", "interferes",
- "integreted", "integrated",
- "inteligent", "intelligent",
- "intenseley", "intensely",
- "intensitiy", "intensity",
- "intentinal", "intentional",
- "intentines", "intestines",
- "interacive", "interactive",
- "interactes", "interacts",
- "interactie", "interactive",
- "interactue", "interacted",
- "interasted", "interacted",
- "interbread", "interbreed",
- "intercepto", "interception",
- "intercorse", "intercourse",
- "intercouse", "intercourse",
- "intereacts", "interfaces",
- "interected", "interacted",
- "interefers", "interferes",
- "interesant", "interest",
- "interesing", "interesting",
- "interestes", "interests",
- "interfacce", "interfaces",
- "interfears", "interferes",
- "interfeers", "interferes",
- "interferce", "interferes",
- "interferre", "interfere",
- "intergated", "integrated",
- "interioara", "interior",
- "interioare", "interior",
- "intermedie", "intermediate",
- "internetbs", "internets",
- "internetes", "internets",
- "internetis", "internets",
- "internetts", "internets",
- "internetus", "internets",
- "interprate", "interpret",
- "interrugum", "interregnum",
- "interruped", "interrupted",
- "interstela", "interstellar",
- "intervalls", "intervals",
- "intervalos", "intervals",
- "interveign", "intervening",
- "interveing", "intervening",
- "interveiws", "interviews",
- "intervento", "intervention",
- "intervenue", "intervene",
- "interveres", "interferes",
- "intervieni", "interviewing",
- "intervieuw", "interviews",
- "interviewd", "interviewed",
- "interviewr", "interviewer",
- "intervines", "intervenes",
- "interviwed", "interviewed",
- "interviwer", "interviewer",
- "interwebbs", "interwebs",
- "intestents", "intestines",
- "intestinas", "intestines",
- "intestinos", "intestines",
- "intestions", "intestines",
- "intidimate", "intimidate",
- "intimadate", "intimidate",
- "intimatley", "intimately",
- "intimiated", "intimidate",
- "intimidade", "intimidated",
- "intimidant", "intimidate",
- "intimidare", "intimidate",
- "intimitade", "intimidated",
- "intimitaly", "intimately",
- "intimitate", "intimidate",
- "intimitely", "intimately",
- "intolarant", "intolerant",
- "intolerace", "intolerance",
- "intolerate", "intolerant",
- "intolerent", "intolerant",
- "intolorant", "intolerant",
- "intolorent", "intolerant",
- "intorduced", "introduced",
- "intorduces", "introduces",
- "intorverts", "introverts",
- "intoxicted", "intoxicated",
- "intraverts", "introverts",
- "intreguing", "intriguing",
- "intricaces", "intricacies",
- "intriguied", "intrigue",
- "intrigured", "intrigue",
- "intrinseci", "intrinsic",
- "intrinsinc", "intrinsic",
- "intriquing", "intriguing",
- "intriuging", "intriguing",
- "introdecks", "introduces",
- "introdused", "introduces",
- "introvents", "introverts",
- "introvered", "introverted",
- "introversa", "introverts",
- "introverse", "introverts",
- "introversi", "introverts",
- "introverso", "introverts",
- "introversy", "introverts",
- "introveted", "introverted",
- "intruduced", "introduced",
- "intruduces", "introduces",
- "intruiging", "intriguing",
- "intruments", "instruments",
- "intuitevly", "intuitively",
- "intuitivly", "intuitively",
- "intuitivno", "intuition",
- "intutively", "intuitively",
- "inumerable", "enumerable",
- "inusrgency", "insurgency",
- "invaderats", "invaders",
- "invaildate", "invalidates",
- "invairably", "invariably",
- "invaldiate", "invalidates",
- "invalidade", "invalidate",
- "invalidare", "invalidate",
- "invalubale", "invaluable",
- "invalueble", "invaluable",
- "invaraibly", "invariably",
- "invariabil", "invariably",
- "invaribaly", "invariably",
- "invaulable", "invaluable",
- "inveitable", "inevitable",
- "inveitably", "inevitably",
- "invensions", "inventions",
- "inventario", "inventor",
- "inventarlo", "inventor",
- "inventaron", "inventor",
- "inventings", "inventions",
- "inventivos", "inventions",
- "invertendo", "inverted",
- "inverterad", "inverted",
- "invertions", "inventions",
- "investemnt", "investments",
- "investiage", "investigate",
- "investions", "inventions",
- "investirat", "investigator",
- "investmens", "investments",
- "invicinble", "invincible",
- "invididual", "individual",
- "invincable", "invincible",
- "invinceble", "invincible",
- "invinicble", "invincible",
- "invinsible", "invincible",
- "invinvible", "invincible",
- "invisibily", "invisibility",
- "invitacion", "invitation",
- "invitating", "invitation",
- "involunary", "involuntary",
- "involvment", "involvement",
- "ironcially", "ironically",
- "irracional", "irrational",
- "irrationel", "irrational",
- "irrelavant", "irrelevant",
- "irrelavent", "irrelevant",
- "irrelevent", "irrelevant",
- "irrelivant", "irrelevant",
- "irrelivent", "irrelevant",
- "irrevelant", "irrelevant",
- "irreverant", "irrelevant",
- "irridation", "irritation",
- "irriration", "irritation",
- "irritacion", "irritation",
- "irritaties", "irritate",
- "islamisist", "islamist",
- "islamistas", "islamists",
- "isntalling", "installing",
- "isntructed", "instructed",
- "isntrument", "instrument",
- "israeliens", "israelis",
- "israelitas", "israelis",
- "italianess", "italians",
- "itnroduced", "introduced",
- "jailborken", "jailbroken",
- "jalibroken", "jailbroken",
- "jamaicains", "jamaican",
- "jamaicaman", "jamaican",
- "jerusaleum", "jerusalem",
- "jounralism", "journalism",
- "jounralist", "journalist",
- "jouranlism", "journalism",
- "jouranlist", "journalist",
- "journalims", "journals",
- "journalits", "journals",
- "journalizm", "journalism",
- "journalsim", "journalism",
- "journolist", "journalist",
- "judegments", "judgements",
- "judgemenal", "judgemental",
- "judgemetal", "judgemental",
- "jugdements", "judgements",
- "juggarnaut", "juggernaut",
- "juggeranut", "juggernaut",
- "juggernath", "juggernaut",
- "juggernout", "juggernaut",
- "juggernuat", "juggernaut",
- "juggetnaut", "juggernaut",
- "jugglenaut", "juggernaut",
- "juggurnaut", "juggernaut",
- "justifible", "justifiable",
- "juvenilles", "juvenile",
- "kickstarer", "kickstarter",
- "kickstartr", "kickstarter",
- "kickstater", "kickstarter",
- "kidnapning", "kidnapping",
- "kidnappade", "kidnapped",
- "killingest", "killings",
- "kilometros", "kilometers",
- "kilomiters", "kilometers",
- "kilomoters", "kilometers",
- "kilomteres", "kilometers",
- "kindapping", "kidnapping",
- "kingdomers", "kingdoms",
- "krpytonite", "kryptonite",
- "krypotnite", "kryptonite",
- "krypronite", "kryptonite",
- "kryptinite", "kryptonite",
- "kryptolite", "kryptonite",
- "kryptonyte", "kryptonite",
- "krypyonite", "kryptonite",
- "krytponite", "kryptonite",
- "kyrptonite", "kryptonite",
- "labarotory", "laboratory",
- "laboratroy", "laboratory",
- "laborerers", "laborers",
- "laboritory", "laboratory",
- "laborotory", "laboratory",
- "lackbuster", "lackluster",
- "lacklaster", "lackluster",
- "landacapes", "landscapes",
- "landingers", "landings",
- "landshapes", "landscapes",
- "landspaces", "landscapes",
- "lannasters", "lannisters",
- "lannesters", "lannisters",
- "lannistars", "lannisters",
- "lannsiters", "lannisters",
- "lateration", "alteration",
- "latitudine", "latitude",
- "laughabley", "laughably",
- "laughablly", "laughably",
- "launchered", "launched",
- "leaglizing", "legalizing",
- "lectureres", "lectures",
- "legalazing", "legalizing",
- "legalizare", "legalize",
- "legalizate", "legalize",
- "legendaies", "legendaries",
- "legendaris", "legendaries",
- "legimitacy", "legitimacy",
- "legimitate", "legitimate",
- "legislatie", "legislative",
- "legitamacy", "legitimacy",
- "legitamate", "legitimate",
- "legitamicy", "legitimacy",
- "legitamite", "legitimate",
- "legitemacy", "legitimacy",
- "legitemate", "legitimate",
- "legitimaly", "legitimacy",
- "legitimicy", "legitimacy",
- "legitimite", "legitimate",
- "leiutenant", "lieutenant",
- "lesbianese", "lesbians",
- "lesbianest", "lesbians",
- "leuitenant", "lieutenant",
- "levetating", "levitating",
- "liberacion", "liberation",
- "liberalest", "liberate",
- "liberalizm", "liberalism",
- "liberalnim", "liberalism",
- "liberalsim", "liberalism",
- "liberarion", "liberation",
- "liberaties", "liberate",
- "liberatore", "liberate",
- "libertania", "libertarians",
- "libguistic", "linguistic",
- "lietuenant", "lieutenant",
- "lieutanant", "lieutenant",
- "lieutanent", "lieutenant",
- "lieutenent", "lieutenant",
- "lifestiles", "lifestyles",
- "lifestlyes", "lifestyles",
- "lifesystem", "filesystem",
- "lifesytles", "lifestyles",
- "lifetimers", "lifetimes",
- "lifetsyles", "lifestyles",
- "lighhtning", "lightening",
- "lightergas", "lighters",
- "lighthning", "lightening",
- "lighthorse", "lighthouse",
- "lighthosue", "lighthouse",
- "lighthours", "lighthouse",
- "lightining", "lighting",
- "lightneing", "lightening",
- "lightnting", "lightening",
- "lightrooom", "lightroom",
- "lightweigt", "lightweight",
- "ligitation", "litigation",
- "ligthening", "lightening",
- "ligthhouse", "lighthouse",
- "likelyhood", "likelihood",
- "limination", "limitation",
- "limitacion", "limitation",
- "limitaiton", "limitation",
- "limitating", "limitation",
- "limitativo", "limitation",
- "linguisics", "linguistics",
- "linguisitc", "linguistics",
- "linguistcs", "linguistics",
- "linguistis", "linguistics",
- "linguitics", "linguistic",
- "lingusitic", "linguistics",
- "lingvistic", "linguistic",
- "liousville", "louisville",
- "listeneres", "listeners",
- "literallly", "literally",
- "literarely", "literary",
- "literarlly", "literary",
- "literatire", "literate",
- "literative", "literate",
- "literatute", "literate",
- "lithuanina", "lithuania",
- "litterally", "literally",
- "liuetenant", "lieutenant",
- "liveatream", "livestream",
- "livelehood", "livelihood",
- "liverpoool", "liverpool",
- "livescream", "livestream",
- "livestreem", "livestream",
- "livestrems", "livestream",
- "livilehood", "livelihood",
- "livliehood", "livelihood",
- "lobbyistes", "lobbyists",
- "lockacreen", "lockscreen",
- "logictical", "logistical",
- "logisitcal", "logistical",
- "logisticas", "logistics",
- "logisticly", "logistical",
- "loiusville", "louisville",
- "lollipoopy", "lollipop",
- "lonelyness", "loneliness",
- "longevitiy", "longevity",
- "lonileness", "loneliness",
- "lonlieness", "loneliness",
- "louieville", "louisville",
- "louisiania", "louisiana",
- "louisianna", "louisiana",
- "louisivlle", "louisville",
- "louisviile", "louisville",
- "lousiville", "louisville",
- "luietenant", "lieutenant",
- "mabyelline", "maybelline",
- "magnifient", "magnificent",
- "mainpulate", "manipulate",
- "mainstreem", "mainstream",
- "maintaince", "maintained",
- "maintaines", "maintains",
- "maintainig", "maintaining",
- "maintenace", "maintenance",
- "maintianed", "maintained",
- "maintioned", "mentioned",
- "malfuncion", "malfunction",
- "malpractce", "malpractice",
- "managebale", "manageable",
- "maneagable", "manageable",
- "maneouvred", "manoeuvred",
- "maneouvres", "manoeuvres",
- "maneuveres", "maneuvers",
- "maneuveurs", "maneuver",
- "manifestas", "manifests",
- "manifestes", "manifests",
- "manifestus", "manifests",
- "manipluate", "manipulate",
- "manipualte", "manipulate",
- "manipulant", "manipulate",
- "manipulare", "manipulate",
- "manipulted", "manipulated",
- "maniuplate", "manipulate",
- "mannarisms", "mannerisms",
- "mannersims", "mannerisms",
- "mannorisms", "mannerisms",
- "manufacter", "manufacture",
- "manufacure", "manufacture",
- "manufature", "manufacture",
- "maraudeurs", "marauder",
- "margaritte", "margaret",
- "margianlly", "marginally",
- "marginaali", "marginal",
- "marginable", "marginal",
- "marignally", "marginally",
- "marijuanna", "marijuana",
- "marketting", "marketing",
- "marshmalow", "marshmallow",
- "masculinty", "masculinity",
- "massacrare", "massacre",
- "massivelly", "massively",
- "masteriers", "masteries",
- "masternind", "mastermind",
- "masterpice", "masterpiece",
- "mastrubate", "masturbate",
- "mastubrate", "masturbated",
- "masturabte", "masturbate",
- "masturbait", "masturbate",
- "masturbare", "masturbate",
- "masturbeta", "masturbated",
- "masturdate", "masturbate",
- "materiales", "materials",
- "materialsm", "materialism",
- "maximazing", "maximizing",
- "maximixing", "maximizing",
- "mayballine", "maybelline",
- "maybellene", "maybelline",
- "maybellibe", "maybelline",
- "maybilline", "maybelline",
- "mccarthyst", "mccarthyist",
- "mdifielder", "midfielder",
- "meagthread", "megathread",
- "meaningess", "meanings",
- "meaningles", "meanings",
- "meatballls", "meatballs",
- "mecahnical", "mechanical",
- "mecahnisms", "mechanisms",
- "mechancial", "mechanical",
- "mechandise", "merchandise",
- "mechanichs", "mechanics",
- "mechanicle", "mechanical",
- "mechanicly", "mechanical",
- "mechanicus", "mechanics",
- "mechanincs", "mechanic",
- "mechanisim", "mechanism",
- "mechansims", "mechanisms",
- "mechinical", "mechanical",
- "mechinisms", "mechanisms",
- "mediaction", "medications",
- "medicacion", "medication",
- "medicaiton", "medication",
- "medicalert", "medicare",
- "medicallly", "medically",
- "medicatons", "medications",
- "medicinens", "medicines",
- "medicinske", "medicine",
- "medicority", "mediocrity",
- "medidating", "meditating",
- "mediocirty", "mediocrity",
- "mediocraty", "mediocrity",
- "mediocrety", "mediocrity",
- "mediocricy", "mediocrity",
- "mediocrily", "mediocrity",
- "mediocrisy", "mediocrity",
- "meditacion", "medications",
- "meditaiton", "meditation",
- "melatonian", "melatonin",
- "melatonion", "melatonin",
- "mellinnium", "millennium",
- "melodieuse", "melodies",
- "membrances", "membrane",
- "mentallity", "mentally",
- "mentionnes", "mentions",
- "mercenaire", "mercenaries",
- "mercenares", "mercenaries",
- "mercentile", "mercantile",
- "merchanise", "merchandise",
- "merchantos", "merchants",
- "messagease", "messages",
- "messagepad", "messaged",
- "messenging", "messaging",
- "metabalism", "metabolism",
- "metabilism", "metabolism",
- "metabloism", "metabolism",
- "metablosim", "metabolism",
- "metabolics", "metabolism",
- "metabolizm", "metabolism",
- "metabolsim", "metabolism",
- "metalurgic", "metallurgic",
- "metaphoras", "metaphors",
- "metaphores", "metaphors",
- "metaphyics", "metaphysics",
- "meterology", "meteorology",
- "methaphors", "metaphors",
- "methodolgy", "methodology",
- "methodoloy", "methodology",
- "metrapolis", "metropolis",
- "metrolopis", "metropolis",
- "metropilis", "metropolis",
- "metroplois", "metropolis",
- "metropolin", "metropolitan",
- "metropolos", "metropolis",
- "metropolys", "metropolis",
- "mexicanese", "mexicans",
- "mexicaness", "mexicans",
- "michelline", "michelle",
- "micorwaves", "microwaves",
- "microhpone", "microphone",
- "microscoop", "microscope",
- "microvaves", "microwaves",
- "microvaxes", "microwaves",
- "micrpohone", "microphones",
- "midfeilder", "midfielder",
- "midfiedler", "midfielder",
- "midfieldes", "midfielders",
- "midfielers", "midfielders",
- "midfileder", "midfielder",
- "midifelder", "midfielder",
- "midnlessly", "mindlessly",
- "migitation", "mitigation",
- "migrainers", "migraines",
- "miletsones", "milestones",
- "milisecond", "millisecond",
- "militiades", "militias",
- "militiants", "militias",
- "millinnium", "millennium",
- "miminalist", "minimalist",
- "minamilist", "minimalist",
- "mindleslly", "mindlessly",
- "minimazing", "minimizing",
- "minimilast", "minimalist",
- "minimilist", "minimalist",
- "mininalist", "minimalist",
- "ministeres", "ministers",
- "ministerns", "ministers",
- "minneaplis", "minneapolis",
- "minneapols", "minneapolis",
- "minnesotta", "minnesota",
- "minoritets", "minorities",
- "minoroties", "minorities",
- "miracalous", "miraculous",
- "miracluous", "miraculous",
- "miracoulus", "miraculous",
- "mircophone", "microphone",
- "mircoscope", "microscope",
- "mircowaves", "microwaves",
- "misandrony", "misandry",
- "miscarrage", "miscarriage",
- "miscarrige", "miscarriage",
- "misdemenor", "misdemeanor",
- "miserabley", "miserably",
- "miserablly", "miserably",
- "misforture", "misfortune",
- "misgoynist", "misogynist",
- "misinfomed", "misinformed",
- "misinterpt", "misinterpret",
- "misisonary", "missionary",
- "misoganist", "misogynist",
- "misogenist", "misogynist",
- "misoginist", "misogynist",
- "misoginyst", "misogynist",
- "misognyist", "misogynist",
- "misogonist", "misogynist",
- "misogonyst", "misogynist",
- "misogyinst", "misogynist",
- "misogynyst", "misogynist",
- "misoygnist", "misogynist",
- "mispelling", "misspelling",
- "missionare", "missionaries",
- "missionera", "missionary",
- "missisippi", "mississippi",
- "mississipi", "mississippi",
- "mississppi", "mississippi",
- "misspeling", "misspelling",
- "misspellng", "misspelling",
- "mistakedly", "mistakenly",
- "mistakinly", "mistakenly",
- "mistankely", "mistakenly",
- "misterious", "mysterious",
- "misteryous", "mysterious",
- "mistreaded", "mistreated",
- "misygonist", "misogynist",
- "mitigaiton", "mitigation",
- "moderacion", "moderation",
- "moderaters", "moderates",
- "moderatley", "moderately",
- "moderatore", "moderate",
- "moderatorn", "moderation",
- "modificato", "modification",
- "modifieras", "modifiers",
- "modifieres", "modifiers",
- "moisturier", "moisturizer",
- "moleculair", "molecular",
- "molestaion", "molestation",
- "molestarle", "molester",
- "molestarme", "molester",
- "molestarse", "molester",
- "molestarte", "molester",
- "molestered", "molested",
- "momentarly", "momentarily",
- "monagomous", "monogamous",
- "monetizare", "monetize",
- "monitering", "monitoring",
- "monogymous", "monogamous",
- "monolistic", "monolithic",
- "monolitich", "monolithic",
- "monolopies", "monopolies",
- "monolothic", "monolithic",
- "monolythic", "monolithic",
- "monopilies", "monopolies",
- "monoploies", "monopolies",
- "monopolets", "monopolies",
- "monopolice", "monopolies",
- "monopolios", "monopolies",
- "monothilic", "monolithic",
- "monsterous", "monsters",
- "montioring", "monitoring",
- "monumentos", "monuments",
- "monumentul", "monumental",
- "monumentus", "monuments",
- "mormonisim", "mormonism",
- "morphinate", "morphine",
- "morrisette", "morissette",
- "morrisound", "morrison",
- "mosquitero", "mosquito",
- "mosquiters", "mosquitoes",
- "motherbard", "motherboard",
- "motherboad", "motherboard",
- "motherbord", "motherboard",
- "motivaiton", "motivations",
- "motiviated", "motivated",
- "motorcicle", "motorcycle",
- "motorcylce", "motorcycle",
- "motorcyles", "motorcycles",
- "motorollas", "motorola",
- "mouthpeace", "mouthpiece",
- "mouthpeice", "mouthpiece",
- "movespeeed", "movespeed",
- "mozzaralla", "mozzarella",
- "mozzeralla", "mozzarella",
- "mozzorella", "mozzarella",
- "mulitation", "mutilation",
- "mulitplied", "multiplied",
- "mulitplier", "multiplier",
- "mulitverse", "multiverse",
- "multilpier", "multiplier",
- "multiplaer", "multiplier",
- "multiplaye", "multiply",
- "multiplayr", "multiply",
- "multiplays", "multiply",
- "multipleye", "multiply",
- "multipling", "multiplying",
- "multiplyed", "multiplied",
- "multiplyer", "multiple",
- "multiplyng", "multiplying",
- "murderered", "murdered",
- "murdereres", "murderers",
- "muscicians", "musicians",
- "musculaire", "muscular",
- "mushroooms", "mushroom",
- "mutialtion", "mutilation",
- "mutiliated", "mutilated",
- "mutliation", "mutilation",
- "mutliplied", "multiplied",
- "mutliplier", "multiplier",
- "mutliverse", "multiverse",
- "mysogynist", "misogynist",
- "mysterieus", "mysteries",
- "nagivating", "navigating",
- "nagivation", "navigation",
- "narcassism", "narcissism",
- "narcassist", "narcissist",
- "narcessist", "narcissist",
- "narciscism", "narcissism",
- "narciscist", "narcissist",
- "narcisissm", "narcissism",
- "narcisisst", "narcissist",
- "narcisists", "narcissist",
- "narcissicm", "narcissism",
- "narcissict", "narcissist",
- "narcissitc", "narcissist",
- "narcissits", "narcissist",
- "narcoticos", "narcotics",
- "narrativas", "narratives",
- "narrativos", "narratives",
- "narritives", "narratives",
- "nashvillle", "nashville",
- "nationales", "nationals",
- "nationalis", "nationals",
- "nationalit", "nationalist",
- "nationaliy", "nationality",
- "nationalty", "nationality",
- "nationella", "national",
- "naturually", "naturally",
- "naviagting", "navigating",
- "naviagtion", "navigation",
- "navigatore", "navigate",
- "neccessary", "necessary",
- "necesarily", "necessarily",
- "necessairy", "necessarily",
- "necessarly", "necessary",
- "necessarry", "necessary",
- "necessiate", "necessitate",
- "necessites", "necessities",
- "neckbeared", "neckbeard",
- "neckboards", "neckbeards",
- "neckbreads", "neckbeards",
- "neckneards", "neckbeards",
- "necromacer", "necromancer",
- "necromaner", "necromancer",
- "needleslly", "needlessly",
- "negativaty", "negativity",
- "negativley", "negatively",
- "negelcting", "neglecting",
- "negilgence", "negligence",
- "negiotated", "negotiated",
- "neglacting", "neglecting",
- "neglagence", "negligence",
- "neglegance", "negligence",
- "neglegible", "negligible",
- "neglegting", "neglecting",
- "neglibible", "negligible",
- "neglicence", "negligence",
- "neglicible", "negligible",
- "neglicting", "neglecting",
- "negligable", "negligible",
- "negligance", "negligence",
- "negligeble", "negligible",
- "negligente", "negligence",
- "negociated", "negotiated",
- "negogiated", "negotiated",
- "negoitated", "negotiated",
- "negotaited", "negotiated",
- "negotation", "negotiation",
- "negotiaion", "negotiation",
- "negotiatie", "negotiated",
- "negotiatin", "negotiations",
- "negotiaton", "negotiation",
- "neigbhours", "neighbours",
- "neighbhors", "neighbours",
- "neighbords", "neighbours",
- "neighbores", "neighbours",
- "netowrking", "networking",
- "netruality", "neutrality",
- "neturality", "neutrality",
- "netwroking", "networking",
- "neurologia", "neurological",
- "neutrailty", "neutrality",
- "newletters", "newsletters",
- "newlsetter", "newsletter",
- "newsettler", "newsletter",
- "newslatter", "newsletter",
- "nieghbours", "neighbours",
- "nightmates", "nightmares",
- "nightmears", "nightmares",
- "nightmeres", "nightmares",
- "nigthmares", "nightmares",
- "nipticking", "nitpicking",
- "nitpciking", "nitpicking",
- "nominacion", "nomination",
- "nominatino", "nominations",
- "nominativo", "nomination",
- "nominatons", "nominations",
- "nonsencial", "nonsensical",
- "nontheless", "nonetheless",
- "northerend", "northern",
- "nostalgica", "nostalgia",
- "nostalgija", "nostalgia",
- "noteworhty", "noteworthy",
- "nothingess", "nothingness",
- "noticabely", "noticeably",
- "noticabley", "noticeably",
- "noticiably", "noticeably",
- "notoriosly", "notoriously",
- "novembeard", "november",
- "nuetrality", "neutrality",
- "nutricious", "nutritious",
- "nutrientes", "nutrients",
- "nutritents", "nutrients",
- "nutritinal", "nutritional",
- "nutritiuos", "nutritious",
- "nutritivos", "nutritious",
- "nutrituous", "nutritious",
- "nutrutious", "nutritious",
- "obatinable", "obtainable",
- "obejctives", "objectives",
- "obilgatory", "obligatory",
- "objecitves", "objectives",
- "objectivas", "objectives",
- "objectivly", "objectively",
- "objectivst", "objectives",
- "objectivty", "objectivity",
- "objektives", "objectives",
- "obligitary", "obligatory",
- "obligitory", "obligatory",
- "observabil", "observable",
- "observarse", "observers",
- "observaton", "observation",
- "observeras", "observers",
- "observered", "observed",
- "observeres", "observers",
- "observible", "observable",
- "obstancles", "obstacles",
- "obstrucion", "obstruction",
- "obstructin", "obstruction",
- "obtainabie", "obtainable",
- "obtaineble", "obtainable",
- "obtainible", "obtainable",
- "obtianable", "obtainable",
- "ocasionaly", "occasionally",
- "ocassional", "occasional",
- "ocassioned", "occasioned",
- "occaisonal", "occasional",
- "occasionly", "occasional",
- "occassions", "occasions",
- "occational", "occasional",
- "occulation", "occupation",
- "occupaiton", "occupation",
- "occurances", "occurrences",
- "occurences", "occurrences",
- "occurrance", "occurrence",
- "octohedral", "octahedral",
- "octohedron", "octahedron",
- "offensivly", "offensively",
- "offereings", "offerings",
- "officailly", "officially",
- "olbigatory", "obligatory",
- "ominpotent", "omnipotent",
- "ominscient", "omniscient",
- "omnipetent", "omnipotent",
- "omnipitent", "omnipotent",
- "omnipotant", "omnipotent",
- "omnisicent", "omniscient",
- "omniverous", "omnivorous",
- "omnsicient", "omniscient",
- "onmipotent", "omnipotent",
- "onmiscient", "omniscient",
- "operatings", "operations",
- "operativne", "operative",
- "operativos", "operations",
- "oportunity", "opportunity",
- "opponenets", "opponent",
- "oppononent", "opponent",
- "oppressiun", "oppressing",
- "optimisitc", "optimistic",
- "optimizare", "optimize",
- "optimizate", "optimize",
- "optimizied", "optimize",
- "organicaly", "organically",
- "organiclly", "organically",
- "organisate", "organise",
- "organische", "organise",
- "organisera", "organizers",
- "organisere", "organizers",
- "organisert", "organizers",
- "organisier", "organise",
- "organisims", "organism",
- "organismed", "organise",
- "organismen", "organise",
- "organismer", "organise",
- "organismes", "organisms",
- "organismus", "organisms",
- "organisten", "organise",
- "organiszed", "organise",
- "organizaed", "organize",
- "organizare", "organizer",
- "organizate", "organize",
- "organizors", "organizers",
- "organizuje", "organize",
- "organziers", "organizers",
- "orientaion", "orientation",
- "orientarla", "oriental",
- "orientarlo", "oriental",
- "origianlly", "originally",
- "originales", "originals",
- "originalet", "originated",
- "originalis", "originals",
- "originalty", "originality",
- "orignially", "originally",
- "origniated", "originated",
- "origonally", "originally",
- "origonated", "originated",
- "ostencibly", "ostensibly",
- "ostenisbly", "ostensibly",
- "ostensably", "ostensibly",
- "ostentibly", "ostensibly",
- "ostrasiced", "ostracized",
- "ostrasized", "ostracized",
- "ostraziced", "ostracized",
- "ostrazised", "ostracized",
- "ostrecized", "ostracized",
- "ostricized", "ostracized",
- "ostrocized", "ostracized",
- "oustanding", "outstanding",
- "outcalssed", "outclassed",
- "outlcassed", "outclassed",
- "outnumberd", "outnumbered",
- "outnumbred", "outnumbered",
- "outperfoms", "outperform",
- "outperfrom", "outperform",
- "outpreform", "outperform",
- "outrageuos", "outrageous",
- "outragious", "outrageous",
- "outragoues", "outrageous",
- "outreagous", "outrageous",
- "outsourcad", "outsourced",
- "outsouring", "outsourcing",
- "outsoursed", "outsourced",
- "outweighes", "outweighs",
- "overarcing", "overarching",
- "overclockd", "overclocked",
- "overcloked", "overclocked",
- "overcoding", "overcoming",
- "overheards", "overhead",
- "overheared", "overhead",
- "overhooked", "overlooked",
- "overlanded", "overloaded",
- "overlaoded", "overloaded",
- "overlaping", "overlapping",
- "overlauded", "overloaded",
- "overloards", "overload",
- "overlorded", "overloaded",
- "overlordes", "overlords",
- "overnurfed", "overturned",
- "overpirced", "overpriced",
- "overpowerd", "overpowered",
- "overpowred", "overpowered",
- "overprised", "overpriced",
- "overtunned", "overturned",
- "overtunred", "overturned",
- "overturing", "overturn",
- "overweigth", "overweight",
- "overwhemed", "overwhelmed",
- "overwieght", "overweight",
- "overwritte", "overwrite",
- "pahtfinder", "pathfinder",
- "painfullly", "painfully",
- "painkilers", "painkillers",
- "pairlament", "parliament",
- "pakistanti", "pakistani",
- "paladinlst", "paladins",
- "palcements", "placements",
- "paleolitic", "paleolithic",
- "palestinan", "palestinian",
- "paltformer", "platformer",
- "palyerbase", "playerbase",
- "parachutte", "parachute",
- "parademics", "paramedics",
- "paradiggum", "paradigm",
- "paragraghs", "paragraphs",
- "paragrahps", "paragraphs",
- "paragrapgh", "paragraphs",
- "paragrpahs", "paragraphs",
- "parahprase", "paraphrase",
- "paralleles", "parallels",
- "parallells", "parallels",
- "paramadics", "paramedics",
- "paramaters", "parameters",
- "paramecias", "paramedics",
- "parametics", "paramedics",
- "parametros", "parameters",
- "paramiters", "parameters",
- "paramormal", "paranormal",
- "paranoicas", "paranoia",
- "paranomral", "paranormal",
- "paranornal", "paranormal",
- "parapharse", "paraphrase",
- "paraphraze", "paraphrase",
- "paraprhase", "paraphrase",
- "parasitter", "parasite",
- "parilament", "parliament",
- "parituclar", "particular",
- "parlaiment", "parliament",
- "parliamant", "parliament",
- "parliamone", "parliament",
- "parliement", "parliament",
- "parrallell", "parallel",
- "parrallely", "parallelly",
- "partiarchy", "patriarchy",
- "participas", "participants",
- "participat", "participants",
- "participte", "participate",
- "particualr", "particular",
- "partiotism", "patriotism",
- "passionais", "passions",
- "passionale", "passionately",
- "passionant", "passionate",
- "passionite", "passionate",
- "passivedns", "passives",
- "passivelly", "passively",
- "patenterad", "patented",
- "pathfidner", "pathfinder",
- "pathfindir", "pathfinder",
- "pathifnder", "pathfinder",
- "patientens", "patients",
- "patrairchy", "patriarchy",
- "patriachry", "patriarchy",
- "patriarcal", "patriarchal",
- "patriarhal", "patriarchal",
- "patriatchy", "patriarchy",
- "patriatism", "patriotism",
- "patrionism", "patriotism",
- "patriotics", "patriotism",
- "patriotisk", "patriots",
- "patroitism", "patriotism",
- "patryarchy", "patriarchy",
- "pedantisch", "pedantic",
- "pedestiran", "pedestrian",
- "pedestrain", "pedestrian",
- "pedictions", "depictions",
- "pedohpiles", "pedophiles",
- "pedohpilia", "pedophilia",
- "pedophilac", "pedophilia",
- "pedophilea", "pedophilia",
- "pedophilie", "pedophile",
- "pedophilla", "pedophilia",
- "pedophille", "pedophile",
- "pedopholia", "pedophilia",
- "penetraion", "penetration",
- "penetratin", "penetration",
- "penetraton", "penetration",
- "penguinese", "penguins",
- "penguiness", "penguins",
- "peninsulla", "peninsula",
- "penninsula", "peninsula",
- "peodphiles", "pedophiles",
- "peodphilia", "pedophilia",
- "pepperment", "peppermint",
- "pepperonni", "pepperoni",
- "percantage", "percentage",
- "percantile", "percentile",
- "percaution", "precaution",
- "percenatge", "percentages",
- "percential", "percentile",
- "percentige", "percentile",
- "perceptoin", "perceptions",
- "percession", "percussion",
- "percetange", "percentages",
- "percetnage", "percentages",
- "percintile", "percentile",
- "percission", "percussion",
- "percpetion", "perceptions",
- "percusions", "percussion",
- "perdicting", "predicting",
- "perdiction", "prediction",
- "perdictive", "predictive",
- "perenially", "perennially",
- "perfeccion", "perfection",
- "perfecxion", "perfection",
- "perfektion", "perfection",
- "perferable", "preferable",
- "perferably", "preferably",
- "perference", "preference",
- "perferring", "preferring",
- "perfexcion", "perfection",
- "perfomance", "performance",
- "performace", "performance",
- "performane", "performances",
- "performans", "performances",
- "performens", "performers",
- "performous", "performs",
- "perfromers", "performers",
- "perhiperal", "peripheral",
- "peridinkle", "periwinkle",
- "perihperal", "peripheral",
- "periodisch", "periodic",
- "periperhal", "peripheral",
- "peripheals", "peripherals",
- "peripheria", "peripheral",
- "periphiral", "peripheral",
- "periphreal", "peripheral",
- "periphrial", "peripheral",
- "peritinkle", "periwinkle",
- "periwankle", "periwinkle",
- "periwinkel", "periwinkle",
- "periwinkie", "periwinkle",
- "periwinlke", "periwinkle",
- "permanenty", "permanently",
- "permanetly", "permanently",
- "permisions", "permission",
- "permisison", "permissions",
- "permissble", "permissible",
- "permissibe", "permissible",
- "permissons", "permissions",
- "perogative", "prerogative",
- "perordered", "preordered",
- "perpatuate", "perpetuate",
- "perpetualy", "perpetually",
- "perpetuare", "perpetuate",
- "persausion", "persuasion",
- "persausive", "persuasive",
- "persective", "respective",
- "persectued", "persecuted",
- "persecutie", "persecuted",
- "persecutin", "persecution",
- "perserving", "preserving",
- "persicuted", "persecuted",
- "persistant", "persistent",
- "persistens", "persists",
- "persoanlly", "personally",
- "persocuted", "persecuted",
- "personalie", "personalized",
- "personalis", "personas",
- "personarse", "personas",
- "personatus", "personas",
- "personnell", "personnel",
- "perspecive", "perspective",
- "perspectie", "perspectives",
- "persuasian", "persuasion",
- "persuasing", "persuasion",
- "persuasivo", "persuasion",
- "persuation", "persuasion",
- "persucuted", "persecuted",
- "persumably", "presumably",
- "persussion", "persuasion",
- "persvasive", "persuasive",
- "perswasion", "persuasion",
- "pertinante", "pertinent",
- "pervailing", "prevailing",
- "pervalence", "prevalence",
- "pervention", "prevention",
- "perversley", "perverse",
- "pesitcides", "pesticides",
- "pessimistc", "pessimistic",
- "pessimitic", "pessimistic",
- "pestacides", "pesticides",
- "pestecides", "pesticides",
- "pesticedes", "pesticides",
- "pesticidas", "pesticides",
- "pestisides", "pesticides",
- "pestizides", "pesticides",
- "pharamcist", "pharmacist",
- "pharmacias", "pharmacist",
- "pharmacyst", "pharmacist",
- "pharmasist", "pharmacist",
- "pharmicist", "pharmacist",
- "phemonenon", "phenomenon",
- "phenemenon", "phenomenon",
- "phenemonal", "phenomenal",
- "phenomanal", "phenomenal",
- "phenomanon", "phenomenon",
- "phenomemon", "phenomenon",
- "phenomenen", "phenomenon",
- "phenomenol", "phenomenal",
- "phenomenom", "phenomenon",
- "phenominon", "phenomenon",
- "phenomonal", "phenomenal",
- "phenomonen", "phenomenon",
- "phenomonon", "phenomenon",
- "phenonemal", "phenomenal",
- "phenonemon", "phenomenon",
- "phenonmena", "phenomena",
- "philipines", "philippines",
- "philippins", "philippines",
- "philisophy", "philosophy",
- "phillipine", "philippine",
- "phillipses", "phillies",
- "philosiphy", "philosophy",
- "philosohpy", "philosophy",
- "philosoper", "philosopher",
- "philospher", "philosopher",
- "philospohy", "philosophy",
- "photogragh", "photograph",
- "photograhs", "photographs",
- "photograhy", "photography",
- "photograps", "photographs",
- "photograpy", "photography",
- "photogrpah", "photographs",
- "photoshopd", "photoshopped",
- "photoshope", "photoshopped",
- "phramacist", "pharmacist",
- "phsyically", "physically",
- "phsyicians", "physicians",
- "phsyicists", "physicists",
- "phsyiology", "physiology",
- "phycisians", "physicians",
- "phycisists", "physicists",
- "phyiscally", "physically",
- "phyisology", "physiology",
- "physcially", "physically",
- "physcology", "psychology",
- "physcopath", "psychopath",
- "physicials", "physicians",
- "physiciens", "physicians",
- "physioligy", "physiology",
- "picthforks", "pitchforks",
- "pinoneered", "pioneered",
- "pitchferks", "pitchforks",
- "pitchfolks", "pitchforks",
- "pitchfords", "pitchforks",
- "pitchworks", "pitchforks",
- "pitckforks", "pitchforks",
- "pittaburgh", "pittsburgh",
- "pittsbrugh", "pittsburgh",
- "placehoder", "placeholder",
- "placeholdr", "placeholder",
- "placeholer", "placeholder",
- "placemenet", "placements",
- "plagairism", "plagiarism",
- "plagarisim", "plagiarism",
- "plagiariam", "plagiarism",
- "plagiarios", "plagiarism",
- "plagiarius", "plagiarism",
- "plagiarizm", "plagiarism",
- "plagierism", "plagiarism",
- "plaguarism", "plagiarism",
- "plaigarism", "plagiarism",
- "plasticosa", "plastics",
- "platfarmer", "platformer",
- "platformar", "platformer",
- "platformie", "platformer",
- "platfotmer", "platformer",
- "platfromer", "platformer",
- "platofrmer", "platformer",
- "playaround", "playground",
- "playersare", "playerbase",
- "playgorund", "playground",
- "playthrogh", "playthrough",
- "playthrouh", "playthrough",
- "playwrites", "playwrights",
- "plethorian", "plethora",
- "policitian", "politician",
- "polinators", "pollinators",
- "polishuset", "polishes",
- "politessen", "politeness",
- "politicain", "politician",
- "politicaly", "politically",
- "politicien", "politician",
- "politicing", "politician",
- "politicion", "politician",
- "politickin", "politician",
- "politiikan", "politician",
- "politiness", "politeness",
- "polititian", "politician",
- "popualtion", "populations",
- "populairty", "popularity",
- "populaiton", "populations",
- "popularaty", "popularity",
- "popularest", "populate",
- "popularily", "popularity",
- "populaties", "populate",
- "populatiry", "popularity",
- "populative", "populate",
- "populatoin", "populations",
- "popultaion", "populations",
- "pormetheus", "prometheus",
- "pornograhy", "pornography",
- "pornograpy", "pornography",
- "pornogrphy", "pornography",
- "porportion", "proportion",
- "portabilty", "portability",
- "portarying", "portraying",
- "portoguese", "portuguese",
- "portraiing", "portraying",
- "portrating", "portraying",
- "portrayels", "portrays",
- "portugeuse", "portuguese",
- "portuguise", "portuguese",
- "posessions", "possessions",
- "posicional", "positional",
- "positevely", "positively",
- "positioing", "positioning",
- "positionly", "positional",
- "positionne", "positioned",
- "positivley", "positively",
- "possesives", "possessive",
- "possessers", "possesses",
- "possessess", "possesses",
- "possibiliy", "possibility",
- "possibilty", "possibility",
- "possissive", "possessive",
- "posthomous", "posthumous",
- "potentialy", "potentially",
- "poulations", "populations",
- "powerhorse", "powerhouse",
- "powerhosue", "powerhouse",
- "powerhours", "powerhouse",
- "powerhsell", "powershell",
- "powerprint", "powerpoint",
- "powersehll", "powershell",
- "ppublisher", "publisher",
- "practially", "practically",
- "practicaly", "practically",
- "practicess", "practise",
- "practiclly", "practically",
- "practioner", "practitioner",
- "precaucion", "precaution",
- "precausion", "precaution",
- "precautios", "precautions",
- "precedance", "precedence",
- "precedense", "precedence",
- "preceeding", "preceding",
- "precendece", "precedence",
- "precentage", "percentage",
- "precentile", "percentile",
- "preciselly", "precisely",
- "precuation", "precautions",
- "precussion", "percussion",
- "predecated", "predicated",
- "predecence", "precedence",
- "predecesor", "predecessor",
- "predection", "prediction",
- "predective", "predictive",
- "prediccion", "prediction",
- "prediceted", "predicated",
- "predicited", "predicated",
- "predicitng", "predicting",
- "prediciton", "prediction",
- "predicitve", "predictive",
- "predickted", "predicated",
- "predictave", "predictive",
- "predictivo", "prediction",
- "predictons", "predictions",
- "predjuiced", "prejudiced",
- "predjuices", "prejudices",
- "preduction", "prediction",
- "preductive", "predictive",
- "predujiced", "prejudiced",
- "predujices", "prejudices",
- "prefarable", "preferable",
- "prefarably", "preferably",
- "prefection", "perfection",
- "preferance", "preference",
- "prefereble", "preferable",
- "preferente", "preference",
- "preferenze", "preference",
- "preferible", "preferable",
- "preferibly", "preferably",
- "prefernece", "preferences",
- "preformers", "performers",
- "pregancies", "pregnancies",
- "pregnanies", "pregnancies",
- "preipheral", "peripheral",
- "preisdents", "presidents",
- "preisthood", "priesthood",
- "prejeduced", "prejudiced",
- "prejeduces", "prejudices",
- "prejiduced", "prejudiced",
- "prejiduces", "prejudices",
- "prejucided", "prejudiced",
- "prejucides", "prejudices",
- "prejuduced", "prejudiced",
- "prejuduces", "prejudices",
- "prelimiary", "preliminary",
- "prematurly", "prematurely",
- "preminence", "preeminence",
- "premission", "permission",
- "preorderes", "preorders",
- "prepartion", "preparation",
- "prepetuate", "perpetuate",
- "preposters", "preposterous",
- "prescients", "presidents",
- "prescirbed", "prescribed",
- "prescriped", "prescribed",
- "presearing", "preserving",
- "presecuted", "persecuted",
- "presedency", "presidency",
- "presedents", "presidents",
- "presenning", "presenting",
- "presentase", "presents",
- "presentato", "presentation",
- "presention", "presenting",
- "presentors", "presents",
- "preservare", "preserve",
- "preservato", "preservation",
- "preserverd", "preserved",
- "presidancy", "presidency",
- "presidante", "presidents",
- "presidenta", "presidential",
- "presidenty", "presidency",
- "presidunce", "presidency",
- "presistent", "persistent",
- "presonally", "personally",
- "presonhood", "personhood",
- "pressuming", "pressuring",
- "prestigios", "prestigious",
- "prestigous", "prestigious",
- "presuambly", "presumably",
- "presuasion", "persuasion",
- "presuasive", "persuasive",
- "presumebly", "presumably",
- "presumendo", "presumed",
- "presumibly", "presumably",
- "presumpton", "presumption",
- "pretaining", "pertaining",
- "pretection", "protection",
- "pretendias", "pretends",
- "pretensive", "pretense",
- "pretentios", "pretentious",
- "pretentous", "pretentious",
- "prevalecen", "prevalence",
- "prevalente", "prevalence",
- "prevencion", "prevention",
- "preventivo", "prevention",
- "preventors", "prevents",
- "previaling", "prevailing",
- "previosuly", "previously",
- "previoulsy", "previously",
- "prevolence", "prevalence",
- "pricinpals", "principals",
- "primarilly", "primarily",
- "primatives", "primitives",
- "princepals", "principals",
- "princesess", "princesses",
- "princibles", "principles",
- "principaly", "principality",
- "principels", "principals",
- "principial", "principal",
- "principias", "principals",
- "principlas", "principals",
- "prinicipal", "principal",
- "prinicpals", "principals",
- "prinicples", "principles",
- "printerest", "printers",
- "prioratize", "prioritize",
- "prioretize", "prioritize",
- "prioritice", "prioritize",
- "prioritied", "prioritize",
- "prioroties", "priorities",
- "priorotize", "prioritize",
- "priotities", "priorities",
- "priotitize", "prioritize",
- "privaleged", "privileged",
- "privaleges", "privileges",
- "privaticed", "privatized",
- "privelaged", "privileged",
- "privelages", "privileges",
- "priveldges", "privileges",
- "priveleged", "privileged",
- "priveleges", "privileges",
- "privelidge", "privileged",
- "priveliged", "privileged",
- "priveliges", "privileges",
- "privetized", "privatized",
- "privilaged", "privileged",
- "privilages", "privileges",
- "priviledge", "privilege",
- "privilegde", "privileges",
- "privilegie", "privilege",
- "priviliged", "privileged",
- "priviliges", "privileges",
- "privitazed", "privatized",
- "privitized", "privatized",
- "probabiliy", "probability",
- "probabilty", "probability",
- "probablies", "probable",
- "probablybe", "probable",
- "problemita", "problematic",
- "procalimed", "proclaimed",
- "procceding", "proceeding",
- "procedding", "proceeding",
- "procederal", "procedural",
- "procedings", "proceedings",
- "procedrual", "procedural",
- "proceededs", "proceeds",
- "proceedure", "procedure",
- "proceesing", "proceeding",
- "processsor", "processors",
- "proclamied", "proclaimed",
- "proclaming", "proclaiming",
- "procliamed", "proclaimed",
- "procreatin", "procreation",
- "procudures", "procedures",
- "prodcution", "production",
- "prodecural", "procedural",
- "prodecures", "procedures",
- "produccion", "production",
- "produceras", "produces",
- "produceres", "produces",
- "producirse", "producers",
- "produciton", "production",
- "producting", "production",
- "productino", "productions",
- "productivo", "production",
- "productivy", "productivity",
- "productoin", "productions",
- "produktion", "production",
- "produktive", "productive",
- "produtcion", "productions",
- "profesions", "profession",
- "professers", "professors",
- "professorn", "profession",
- "professsor", "professors",
- "proffesion", "profession",
- "proficeint", "proficient",
- "proficiant", "proficient",
- "proficieny", "proficiency",
- "proficincy", "proficiency",
- "profitabel", "profitable",
- "profitabil", "profitable",
- "profitible", "profitable",
- "proftiable", "profitable",
- "programmar", "programmer",
- "programmme", "programme",
- "progresing", "progressing",
- "progresion", "progression",
- "progresive", "progressive",
- "progressie", "progressives",
- "progressin", "progression",
- "progresson", "progression",
- "progressos", "progresses",
- "progressus", "progresses",
- "prohibirte", "prohibit",
- "prohibites", "prohibits",
- "prohibitng", "prohibiting",
- "prohibiton", "prohibition",
- "prohibitus", "prohibits",
- "prohibitve", "prohibited",
- "prohobited", "prohibited",
- "prohpecies", "prophecies",
- "projecitle", "projectiles",
- "projectiel", "projectiles",
- "projecties", "projectiles",
- "projectils", "projectiles",
- "projectles", "projectiles",
- "projectlie", "projectiles",
- "projectyle", "projectile",
- "projektile", "projectile",
- "projektion", "projection",
- "prometheas", "prometheus",
- "promethese", "prometheus",
- "promethius", "prometheus",
- "promethous", "prometheus",
- "promethues", "prometheus",
- "prominance", "prominence",
- "prominenty", "prominently",
- "prominetly", "prominently",
- "promiscous", "promiscuous",
- "promiscuos", "promiscuous",
- "promoteurs", "promotes",
- "promotheus", "prometheus",
- "promotinal", "promotional",
- "pronoucned", "pronounced",
- "pronouning", "pronouncing",
- "propechies", "prophecies",
- "propencity", "propensity",
- "propenents", "proponents",
- "properites", "properties",
- "propersity", "propensity",
- "propertion", "proportion",
- "propertius", "properties",
- "prophacies", "prophecies",
- "prophocies", "prophecies",
- "propietary", "proprietary",
- "proplusion", "propulsion",
- "propoganda", "propaganda",
- "propogates", "propagates",
- "propolsion", "propulsion",
- "proponants", "proponents",
- "proponenet", "proponent",
- "proporcion", "proportion",
- "proporties", "properties",
- "proporting", "proportion",
- "propositon", "proposition",
- "propotions", "proportions",
- "proprietry", "proprietary",
- "proprotion", "proportion",
- "propserity", "prosperity",
- "propserous", "prosperous",
- "propulaios", "propulsion",
- "propulsing", "propulsion",
- "propultion", "propulsion",
- "propuslion", "propulsion",
- "prosectued", "prosecuted",
- "prosectuor", "prosecutor",
- "prosecuter", "prosecutor",
- "prosecutie", "prosecuted",
- "prosicuted", "prosecuted",
- "prosicutor", "prosecutor",
- "prosocuted", "prosecuted",
- "prosparity", "prosperity",
- "prospectos", "prospects",
- "prosperety", "prosperity",
- "prospertiy", "prosperity",
- "prosphetic", "prosthetic",
- "prosporous", "prosperous",
- "prostehtic", "prosthetic",
- "prosterity", "prosperity",
- "prostethic", "prosthetic",
- "prostitite", "prostitute",
- "prostitude", "prostitute",
- "prostituee", "prostitute",
- "prostituer", "prostitute",
- "prostitues", "prostitutes",
- "prostiture", "prostitute",
- "prostituto", "prostitution",
- "prostituye", "prostitute",
- "protaginst", "protagonist",
- "protastant", "protestant",
- "proteccion", "protection",
- "proteciton", "protections",
- "protectice", "protective",
- "protectiei", "protective",
- "protectoin", "protections",
- "protectons", "protectors",
- "protectron", "protection",
- "protestans", "protests",
- "protestare", "protesters",
- "protestato", "protestant",
- "protestent", "protestant",
- "protestina", "protestant",
- "prothsetic", "prosthetic",
- "protistant", "protestant",
- "protocoles", "protocols",
- "protocolls", "protocols",
- "protocolos", "protocols",
- "protohypes", "prototypes",
- "protostant", "protestant",
- "prototipes", "prototypes",
- "prototpyes", "prototypes",
- "protraying", "portraying",
- "protuguese", "portuguese",
- "provencial", "provincial",
- "proveribal", "proverbial",
- "provervial", "proverbial",
- "providance", "providence",
- "providince", "providence",
- "provinciae", "province",
- "provincies", "province",
- "provincija", "provincial",
- "provinence", "providence",
- "provinical", "provincial",
- "provintial", "provincial",
- "provinvial", "provincial",
- "provisiosn", "provision",
- "provisonal", "provisional",
- "provocatie", "provocative",
- "pscyhology", "psychology",
- "pscyhopath", "psychopath",
- "pshycology", "psychology",
- "pshycopath", "psychopath",
- "psychedlic", "psychedelic",
- "psychiatic", "psychiatric",
- "psycholoog", "psychology",
- "psychopaat", "psychopath",
- "psychopats", "psychopaths",
- "ptichforks", "pitchforks",
- "publicitan", "publication",
- "publisheed", "published",
- "publisherr", "publisher",
- "publishher", "publisher",
- "publissher", "publisher",
- "publlisher", "publisher",
- "punihsment", "punishments",
- "punishemnt", "punishments",
- "punishible", "punishable",
- "punishmnet", "punishments",
- "punissable", "punishable",
- "punsihable", "punishable",
- "purchacing", "purchasing",
- "purpolsion", "propulsion",
- "purposedly", "purposely",
- "purposelly", "purposely",
- "purpotedly", "purportedly",
- "pususading", "persuading",
- "pyschology", "psychology",
- "pyschopath", "psychopath",
- "qaulifiers", "qualifiers",
- "quailfiers", "qualifiers",
- "qualfiiers", "qualifiers",
- "qualifieds", "qualifies",
- "qualifiies", "qualifiers",
- "qualifiing", "qualifying",
- "qualifires", "qualifiers",
- "qualifyers", "qualifiers",
- "qualitying", "qualifying",
- "quanitites", "quantities",
- "quantaties", "quantities",
- "quantitize", "quantities",
- "quarantena", "quarantine",
- "quarantene", "quarantine",
- "quarantied", "quarantine",
- "quarintine", "quarantine",
- "quaruntine", "quarantine",
- "quesitoned", "questioned",
- "questional", "questionable",
- "questionne", "questioned",
- "rabinnical", "rabbinical",
- "radiactive", "radioactive",
- "radioacive", "radioactive",
- "rainbowers", "rainbows",
- "randmoness", "randomness",
- "randomzied", "randomized",
- "randonmess", "randomness",
- "randumness", "randomness",
- "raspberrry", "raspberry",
- "rationalle", "rationale",
- "readmition", "readmission",
- "realitvely", "relatively",
- "realtively", "relatively",
- "realtivity", "relativity",
- "reaserched", "researched",
- "reasercher", "researcher",
- "rebiulding", "rebuilding",
- "reboudning", "rebounding",
- "rebouncing", "rebounding",
- "rebuidling", "rebuilding",
- "rebuliding", "rebuilding",
- "rebuplican", "republican",
- "reccommend", "recommend",
- "recepients", "recipients",
- "receptoras", "receptors",
- "receptores", "receptors",
- "recgonised", "recognised",
- "recgonized", "recognized",
- "recgonizes", "recognizes",
- "reciepents", "recipients",
- "recipeints", "recipients",
- "recipiants", "recipients",
- "recocnised", "recognised",
- "recoginsed", "recognised",
- "recoginzed", "recognized",
- "recognices", "recognizes",
- "recogniton", "recognition",
- "recognzied", "recognised",
- "recomended", "recommended",
- "recommande", "recommend",
- "recommands", "recommends",
- "recommeded", "recommended",
- "recommened", "recommend",
- "recommennd", "recommends",
- "recomments", "recommends",
- "recompence", "recompense",
- "reconcider", "reconsider",
- "reconcille", "reconcile",
- "recongised", "recognised",
- "recongized", "recognized",
- "recongizes", "recognizes",
- "reconisder", "reconsider",
- "reconsiled", "reconsider",
- "recordarle", "recorder",
- "recordarme", "recorder",
- "recordarse", "recorder",
- "recordarte", "recorder",
- "recreacion", "recreation",
- "recreatief", "recreate",
- "recreativo", "recreation",
- "recrutiers", "recruiters",
- "rectanglar", "rectangular",
- "rectangual", "rectangular",
- "rectanguar", "rectangular",
- "recuriters", "recruiters",
- "recurrance", "recurrence",
- "recursivly", "recursively",
- "redefinied", "redefine",
- "redefinine", "redefine",
- "redemtpion", "redemption",
- "redepmtion", "redemption",
- "redesiging", "redesign",
- "rediculous", "ridiculous",
- "redmeption", "redemption",
- "redneckers", "rednecks",
- "redneckese", "rednecks",
- "redneckest", "rednecks",
- "reduncancy", "redundancy",
- "redundency", "redundancy",
- "redundnacy", "redundancy",
- "redunduncy", "redundancy",
- "reenforced", "reinforced",
- "reevaulate", "reevaluate",
- "refedendum", "referendum",
- "refelcting", "reflecting",
- "refelction", "reflection",
- "refelctive", "reflective",
- "referances", "references",
- "referandum", "referendum",
- "referemces", "references",
- "referemdum", "referendum",
- "referendim", "referendum",
- "referendom", "referendum",
- "referenece", "reference",
- "referening", "referencing",
- "referenses", "referees",
- "referentes", "references",
- "referneces", "references",
- "referrence", "reference",
- "referundum", "referendum",
- "refference", "reference",
- "refleciton", "reflections",
- "reflecters", "reflects",
- "reflektion", "reflection",
- "reflextion", "reflection",
- "reformerad", "reformed",
- "refrigerar", "refrigerator",
- "refurbised", "refurbished",
- "regenarate", "regenerate",
- "registeres", "registers",
- "registrato", "registration",
- "regresives", "regressive",
- "regressivo", "regression",
- "regualting", "regulating",
- "regualtion", "regulations",
- "regualtors", "regulators",
- "regulacion", "regulation",
- "regulament", "regulate",
- "regulaotrs", "regulators",
- "regularily", "regularly",
- "regularing", "regulating",
- "regularlas", "regulars",
- "regularlos", "regulars",
- "regulaters", "regulators",
- "regulatios", "regulators",
- "regulatons", "regulations",
- "rehtorical", "rhetorical",
- "reinstaled", "reinstalled",
- "reitrement", "retirement",
- "relagation", "relaxation",
- "relatation", "relaxation",
- "relativety", "relativity",
- "relativily", "relativity",
- "relativley", "relatively",
- "relavation", "relaxation",
- "relaxating", "relaxation",
- "relazation", "relaxation",
- "releagtion", "relegation",
- "relegetion", "relegation",
- "relentness", "relentless",
- "reletnless", "relentless",
- "relevation", "revelation",
- "relexation", "relegation",
- "relfecting", "reflecting",
- "relfection", "reflection",
- "relfective", "reflective",
- "reliabilty", "reliability",
- "reliablely", "reliably",
- "religiones", "religions",
- "religiosly", "religiously",
- "religiousy", "religiously",
- "religously", "religiously",
- "relitavely", "relatively",
- "reluctanct", "reluctant",
- "reluctanly", "reluctantly",
- "reluctanty", "reluctantly",
- "remarcably", "remarkably",
- "remarkibly", "remarkably",
- "rememberes", "remembers",
- "remenicent", "reminiscent",
- "reminisent", "reminiscent",
- "reminscent", "reminiscent",
- "remmebered", "remembered",
- "renaissace", "renaissance",
- "renderered", "rendered",
- "renegerate", "regenerate",
- "renewabels", "renewables",
- "renewebles", "renewables",
- "rennovated", "renovated",
- "renweables", "renewables",
- "repatition", "repetition",
- "repblicans", "republicans",
- "repbulican", "republican",
- "repeadedly", "repeatedly",
- "repeadetly", "repeatedly",
- "repearable", "repeatable",
- "repearedly", "repealed",
- "repeatadly", "repeatedly",
- "repeatedlt", "repealed",
- "repeatetly", "repeatedly",
- "repeatible", "repeatable",
- "repeatidly", "repeatedly",
- "repectable", "repeatable",
- "repentable", "repeatable",
- "repentence", "repentance",
- "repersents", "represents",
- "repetation", "repetition",
- "repeteadly", "repeatedly",
- "repetetion", "repetition",
- "repeticion", "repetition",
- "repetitivo", "repetition",
- "replacated", "replicated",
- "replaceble", "replaceable",
- "replacemet", "replacements",
- "replacemnt", "replacement",
- "replacemtn", "replacements",
- "replecated", "replicated",
- "repoistory", "repository",
- "reponsible", "responsible",
- "reportadly", "reportedly",
- "reporteros", "reporters",
- "reportidly", "reportedly",
- "repositary", "repository",
- "reposotory", "repository",
- "repostiory", "repository",
- "representn", "representing",
- "repressent", "represents",
- "repressivo", "repression",
- "repsectful", "respectful",
- "repsecting", "respecting",
- "repsective", "respective",
- "repsonding", "responding",
- "repsonsive", "responsive",
- "reptuation", "reputation",
- "repubicans", "republicans",
- "republcian", "republican",
- "republians", "republicans",
- "republicon", "republican",
- "repuglican", "republican",
- "repulicans", "republicans",
- "reputacion", "reputation",
- "requirment", "requirement",
- "requrement", "requirement",
- "resemblace", "resemble",
- "reserached", "researched",
- "reseracher", "researchers",
- "reserverad", "reserved",
- "reservered", "reserved",
- "residental", "residential",
- "resistable", "resistible",
- "resistanes", "resistances",
- "resistanse", "resistances",
- "resistence", "resistance",
- "resistendo", "resisted",
- "resistered", "resisted",
- "resistnace", "resistances",
- "resitsance", "resistances",
- "resoltuion", "resolutions",
- "resolucion", "resolution",
- "resolutino", "resolutions",
- "resolutoin", "resolutions",
- "resolutons", "resolutions",
- "resolvemos", "resolves",
- "resolvendo", "resolved",
- "resolveres", "resolves",
- "resolverse", "resolves",
- "resolviste", "resolves",
- "resonabelt", "resonate",
- "resoultion", "resolution",
- "respecitve", "respective",
- "respectifs", "respects",
- "respection", "respecting",
- "respectons", "respects",
- "respectuos", "respects",
- "respektive", "respective",
- "respiratoy", "respiratory",
- "responcive", "responsive",
- "responisve", "responsive",
- "responsibe", "responsive",
- "responsiby", "responsibly",
- "responsile", "responsive",
- "responsing", "responding",
- "ressembled", "resembled",
- "restarants", "restaurants",
- "restaraunt", "restaurant",
- "restaruant", "restaurant",
- "restatting", "restarting",
- "restaurent", "restaurant",
- "restauring", "restarting",
- "resteraunt", "restaurant",
- "restircted", "restricted",
- "restorting", "restarting",
- "restrainig", "restraining",
- "restrcited", "restricted",
- "restrcting", "restarting",
- "restricing", "restricting",
- "restricion", "restriction",
- "restricive", "restrictive",
- "restrictes", "restricts",
- "restrictie", "restrictive",
- "restricton", "restriction",
- "restructed", "restricted",
- "restuarant", "restaurant",
- "resturants", "restaurants",
- "resturaunt", "restaurant",
- "retaliaton", "retaliation",
- "rethorical", "rhetorical",
- "retierment", "retirement",
- "retribuito", "retribution",
- "retrosepct", "retrospect",
- "retrospekt", "retrospect",
- "revaluated", "reevaluated",
- "revealtion", "revelations",
- "revelaiton", "revelations",
- "revelatons", "revelations",
- "revelution", "revelation",
- "reversable", "reversible",
- "reversably", "reversal",
- "reviewtrue", "reviewer",
- "revisiones", "revisions",
- "revisionis", "revisions",
- "revoltuion", "revolution",
- "revoluiton", "revolutions",
- "revolutoin", "revolutions",
- "revoultion", "revolution",
- "rewarching", "rewatching",
- "rewatchibg", "rewatching",
- "rewatchign", "rewatching",
- "rewatchimg", "rewatching",
- "rhapsodomy", "rhapsody",
- "rhetorisch", "rhetoric",
- "ridicilous", "ridiculous",
- "ridicoulus", "ridiculous",
- "ridiculise", "ridicule",
- "ridiculize", "ridicule",
- "ridiculled", "ridicule",
- "ridiculose", "ridicule",
- "ridiculued", "ridicule",
- "rienforced", "reinforced",
- "rigthfully", "rightfully",
- "roleplaing", "roleplaying",
- "romanmania", "romanian",
- "roundaboot", "roundabout",
- "rucuperate", "recuperate",
- "rudimentry", "rudimentary",
- "sacarmento", "sacramento",
- "sacntioned", "sanctioned",
- "sacraficed", "sacrificed",
- "sacrafices", "sacrifices",
- "sacramenno", "sacramento",
- "sacreficed", "sacrificed",
- "sacrefices", "sacrifices",
- "sacremento", "sacramento",
- "sacrifaced", "sacrificed",
- "sacrifaces", "sacrifices",
- "sacrifical", "sacrificial",
- "sacrificas", "sacrifices",
- "sacrificie", "sacrificed",
- "sacrificng", "sacrificing",
- "sacrifises", "sacrifices",
- "sacrifized", "sacrificed",
- "sacrifizes", "sacrifices",
- "sacromento", "sacramento",
- "sadistisch", "sadistic",
- "sanctionne", "sanctioned",
- "sandiwches", "sandwiches",
- "sandviches", "sandwiches",
- "sandwishes", "sandwiches",
- "sanitazion", "sanitation",
- "santiation", "sanitation",
- "sastifying", "satisfying",
- "satellitte", "satellites",
- "satifsying", "satisfying",
- "satrically", "satirically",
- "satsifying", "satisfying",
- "sattelites", "satellites",
- "saturacion", "saturation",
- "scandalosa", "scandals",
- "scandalose", "scandals",
- "scandalosi", "scandals",
- "scandaloso", "scandals",
- "scandaniva", "scandinavia",
- "scandinava", "scandinavian",
- "scandinvia", "scandinavia",
- "scaramento", "sacramento",
- "scarificed", "sacrificed",
- "scarifices", "sacrifices",
- "scarmbling", "scrambling",
- "scartching", "scratching",
- "sceintific", "scientific",
- "sceintists", "scientists",
- "scenarioes", "scenarios",
- "scenarions", "scenarios",
- "scenarious", "scenarios",
- "scheudling", "scheduling",
- "scholarhip", "scholarship",
- "scholarley", "scholarly",
- "sciencists", "scientists",
- "scientests", "scientists",
- "scirptures", "scriptures",
- "scooterers", "scooters",
- "scorebaord", "scoreboard",
- "scoreborad", "scoreboard",
- "scorebored", "scoreboard",
- "scorpiomon", "scorpion",
- "scracthing", "scratching",
- "scramblies", "scramble",
- "screenshat", "screenshot",
- "screenshit", "screenshot",
- "scriptores", "scriptures",
- "scripturae", "scriptures",
- "scriputres", "scriptures",
- "scritpures", "scriptures",
- "scrutinity", "scrutiny",
- "seahawkers", "seahawks",
- "sebastiaan", "sebastian",
- "segegrated", "segregated",
- "segragated", "segregated",
- "segregaded", "segregated",
- "segregatie", "segregated",
- "segretated", "segregated",
- "segrigated", "segregated",
- "selectiose", "selections",
- "selectivly", "selectively",
- "selectivos", "selections",
- "selfishess", "selfishness",
- "senitments", "sentiments",
- "sensitiviy", "sensitivity",
- "sensitivty", "sensitivity",
- "sentaments", "sentiments",
- "sentancing", "sentencing",
- "sentements", "sentiments",
- "sentencian", "sentencing",
- "sentensing", "sentencing",
- "sentimenal", "sentimental",
- "sentimetal", "sentimental",
- "sentincing", "sentencing",
- "sentinents", "sentiments",
- "separacion", "separation",
- "separaters", "separates",
- "separatley", "separately",
- "separatron", "separation",
- "separetely", "separately",
- "seperately", "separately",
- "seperating", "separating",
- "seperation", "separation",
- "seperatism", "separatism",
- "seperatist", "separatist",
- "seperatley", "seperate",
- "sepulchure", "sepulchre",
- "serenitary", "serenity",
- "serviceble", "serviceable",
- "settelment", "settlement",
- "settlemens", "settlements",
- "settlemets", "settlements",
- "settlemnts", "settlements",
- "seuxalized", "sexualized",
- "seventeeen", "seventeen",
- "sexaulized", "sexualized",
- "sexualixed", "sexualized",
- "sexuallity", "sexually",
- "sexualzied", "sexualized",
- "sexulaized", "sexualized",
- "shakespare", "shakespeare",
- "shakespeer", "shakespeare",
- "shakespere", "shakespeare",
- "shamelesly", "shamelessly",
- "shamelessy", "shamelessly",
- "shaprening", "sharpening",
- "shareholds", "shareholders",
- "sharkening", "sharpening",
- "sharpining", "sharpening",
- "shartening", "sharpening",
- "shatnering", "shattering",
- "shattening", "shattering",
- "shepharded", "shepherd",
- "shilouette", "silhouette",
- "shitlasses", "shitless",
- "shortenend", "shortened",
- "shortining", "shortening",
- "sidelinien", "sideline",
- "sidelinjen", "sideline",
- "sidelinked", "sideline",
- "sigantures", "signatures",
- "sightstine", "sightstone",
- "signficant", "significant",
- "signifiant", "significant",
- "significat", "significant",
- "signitures", "signatures",
- "sigthstone", "sightstone",
- "sihlouette", "silhouette",
- "silohuette", "silhouette",
- "silouhette", "silhouette",
- "similairty", "similarity",
- "similarily", "similarly",
- "similarlly", "similarly",
- "similiarly", "similarly",
- "similiarty", "similarity",
- "simliarity", "similarity",
- "simluation", "simulation",
- "simplictic", "simplistic",
- "simplifing", "simplifying",
- "simplifyed", "simplified",
- "simplifyng", "simplifying",
- "simplisitc", "simplistic",
- "simplisity", "simplicity",
- "simplistes", "simplest",
- "simplivity", "simplicity",
- "simplyfied", "simplified",
- "simualtion", "simulation",
- "simulacion", "simulation",
- "simulaiton", "simulations",
- "simulaties", "simulate",
- "simulative", "simulate",
- "simulatons", "simulations",
- "simulatore", "simulate",
- "sincereley", "sincerely",
- "sincerelly", "sincerely",
- "singatures", "signatures",
- "singulaire", "singular",
- "singulariy", "singularity",
- "singularty", "singularity",
- "singulator", "singular",
- "sitautions", "situations",
- "situatinal", "situational",
- "skatebaord", "skateboard",
- "skateborad", "skateboard",
- "skatebored", "skateboard",
- "skatebrand", "skateboard",
- "skeletones", "skeletons",
- "skeptecism", "skepticism",
- "skepticals", "skeptics",
- "skepticles", "skeptics",
- "skepticons", "skeptics",
- "skeptisicm", "skepticism",
- "skeptisism", "skepticism",
- "sketchysex", "sketches",
- "sketpicism", "skepticism",
- "skillhosts", "skillshots",
- "skillshits", "skillshots",
- "skillshoot", "skillshots",
- "skillslots", "skillshots",
- "skillsofts", "skillshots",
- "skillsshot", "skillshots",
- "skirmiches", "skirmish",
- "skpeticism", "skepticism",
- "slaughterd", "slaughtered",
- "slipperies", "slippers",
- "smarpthone", "smartphones",
- "smarthpone", "smartphone",
- "snadwiches", "sandwiches",
- "snowbaling", "snowballing",
- "snowballes", "snowballs",
- "snowballls", "snowballs",
- "socailists", "socialists",
- "socailized", "socialized",
- "socialisim", "socialism",
- "socializng", "socializing",
- "socialsits", "socialists",
- "sociapaths", "sociopaths",
- "socilaists", "socialists",
- "socilaized", "socialized",
- "sociologia", "sociological",
- "sociopatas", "sociopaths",
- "sociopatch", "sociopaths",
- "sociopatic", "sociopathic",
- "socratease", "socrates",
- "socreboard", "scoreboard",
- "soemthings", "somethings",
- "soldiarity", "solidarity",
- "solidairty", "solidarity",
- "soliditary", "solidarity",
- "solitudine", "solitude",
- "somehtings", "somethings",
- "someonelse", "someones",
- "somethibng", "somethin",
- "somethigng", "somethin",
- "somethigns", "somethings",
- "somethihng", "somethin",
- "somethiing", "somethin",
- "somethijng", "somethin",
- "somethikng", "somethin",
- "somethimng", "somethin",
- "somethinbg", "somethings",
- "somethines", "somethings",
- "somethinfg", "somethings",
- "somethinhg", "somethings",
- "somethinig", "somethings",
- "somethinkg", "somethings",
- "somethinks", "somethings",
- "somethinmg", "somethings",
- "somethinng", "somethings",
- "somethintg", "somethings",
- "somethiong", "somethin",
- "somethiung", "somethin",
- "sophicated", "sophisticated",
- "sotrmfront", "stormfront",
- "sotrylines", "storylines",
- "soudntrack", "soundtrack",
- "soundrtack", "soundtracks",
- "soundtracs", "soundtracks",
- "soundtrakc", "soundtracks",
- "soundtrakk", "soundtrack",
- "soundtraks", "soundtracks",
- "southampon", "southampton",
- "southamton", "southampton",
- "southerers", "southerners",
- "southernes", "southerners",
- "southerton", "southern",
- "souveniers", "souvenirs",
- "sovereigny", "sovereignty",
- "sovereinty", "sovereignty",
- "soverignty", "sovereignty",
- "spartaniis", "spartans",
- "spartanops", "spartans",
- "specailist", "specialist",
- "specailize", "specializes",
- "specialice", "specialize",
- "specialied", "specialized",
- "specialies", "specializes",
- "specialits", "specials",
- "speciallly", "specially",
- "speciallty", "specially",
- "specialops", "specials",
- "specialsts", "specialists",
- "specialtys", "specials",
- "specialzed", "specialized",
- "specialzes", "specializes",
- "specifices", "specifics",
- "specifiing", "specifying",
- "specifiyng", "specifying",
- "speciliast", "specialists",
- "specimines", "specimen",
- "spectarors", "spectators",
- "spectaters", "spectators",
- "spectracal", "spectral",
- "spectraply", "spectral",
- "spectrolab", "spectral",
- "speculatie", "speculative",
- "speculatin", "speculation",
- "speecheasy", "speeches",
- "speicalist", "specialist",
- "spiritualy", "spiritually",
- "sponsorees", "sponsors",
- "sponsorhip", "sponsorship",
- "sponsorise", "sponsors",
- "spontaneos", "spontaneous",
- "spontaneus", "spontaneous",
- "spontanous", "spontaneous",
- "spoonfulls", "spoonfuls",
- "spreadshet", "spreadsheet",
- "springfeld", "springfield",
- "springfied", "springfield",
- "spriritual", "spiritual",
- "squirrells", "squirrels",
- "squirrelus", "squirrels",
- "stabelized", "stabilized",
- "stabilzied", "stabilized",
- "stablility", "stability",
- "stablizied", "stabilized",
- "staggaring", "staggering",
- "stakeboard", "skateboard",
- "starighten", "straighten",
- "starnation", "starvation",
- "startegies", "strategies",
- "startupbus", "startups",
- "starwberry", "strawberry",
- "statememts", "statements",
- "statictics", "statistics",
- "stationair", "stationary",
- "statisitcs", "statistics",
- "statistcal", "statistical",
- "statistisk", "statistics",
- "stauration", "saturation",
- "stealthboy", "stealthy",
- "stealthely", "stealthy",
- "stealthify", "stealthy",
- "stealthray", "stealthy",
- "steeleries", "steelers",
- "stereotipe", "stereotype",
- "stereotpye", "stereotypes",
- "steriotype", "stereotype",
- "steroetype", "stereotype",
- "sterotypes", "stereotypes",
- "steryotype", "stereotype",
- "stimilants", "stimulants",
- "stimilated", "stimulated",
- "stimualted", "stimulated",
- "stimulatie", "stimulated",
- "stimulatin", "stimulation",
- "stimulaton", "stimulation",
- "stimulents", "stimulants",
- "stomrfront", "stormfront",
- "storelines", "storylines",
- "stormfornt", "stormfront",
- "stormfromt", "stormfront",
- "stornfront", "stormfront",
- "stornghold", "stronghold",
- "stradegies", "strategies",
- "strageties", "strategies",
- "straighted", "straightened",
- "straightie", "straighten",
- "straightin", "straighten",
- "straigthen", "straighten",
- "stranglove", "strangle",
- "strangreal", "strangle",
- "stratagies", "strategies",
- "strategems", "strategies",
- "strategice", "strategies",
- "strategisk", "strategies",
- "stravation", "starvation",
- "strawbarry", "strawberry",
- "strawbeary", "strawberry",
- "strawbeery", "strawberry",
- "strawbrary", "strawberry",
- "strawburry", "strawberry",
- "streaching", "stretching",
- "streamtrue", "streamer",
- "strechting", "stretching",
- "strecthing", "stretching",
- "stregnthen", "strengthen",
- "streichung", "stretching",
- "strenghten", "strengthen",
- "strengsten", "strengthen",
- "strengthes", "strengths",
- "strengthin", "strengthen",
- "stressende", "stressed",
- "striaghten", "straighten",
- "stromfront", "stormfront",
- "stronkhold", "stronghold",
- "stroylines", "storylines",
- "structered", "structured",
- "structrual", "structural",
- "structurel", "structural",
- "strucutral", "structural",
- "strucutred", "structured",
- "strucutres", "structures",
- "strugglign", "struggling",
- "strwaberry", "strawberry",
- "sttutering", "stuttering",
- "stupidfree", "stupider",
- "stupiditiy", "stupidity",
- "sturctural", "structural",
- "sturctures", "structures",
- "sturggling", "struggling",
- "subarmines", "submarines",
- "subcultuur", "subculture",
- "subesquent", "subsequent",
- "subisdized", "subsidized",
- "subjectief", "subjective",
- "subjectifs", "subjects",
- "subjectivy", "subjectively",
- "subjektive", "subjective",
- "submariens", "submarines",
- "submarinas", "submarines",
- "submergerd", "submerged",
- "submerines", "submarines",
- "submisison", "submissions",
- "submissies", "submissive",
- "submissons", "submissions",
- "submittion", "submitting",
- "subsadized", "subsidized",
- "subscirbed", "subscribed",
- "subscirber", "subscribers",
- "subscribar", "subscriber",
- "subscribir", "subscriber",
- "subscrible", "subscriber",
- "subscriped", "subscribed",
- "subscrubed", "subscribed",
- "subscryber", "subscriber",
- "subsedized", "subsidized",
- "subsequant", "subsequent",
- "subsidezed", "subsidized",
- "subsidiced", "subsidized",
- "subsidizng", "subsidizing",
- "subsiduary", "subsidiary",
- "subsiquent", "subsequent",
- "subsittute", "substitutes",
- "subsizided", "subsidized",
- "subsrcibed", "subscribed",
- "substanial", "substantial",
- "substansen", "substances",
- "substanser", "substances",
- "substanses", "substances",
- "substantie", "substantive",
- "substatial", "substantial",
- "substences", "substances",
- "substitite", "substitute",
- "substittue", "substitutes",
- "substitude", "substitute",
- "substitued", "substitute",
- "substituer", "substitute",
- "substitues", "substitutes",
- "substiture", "substitute",
- "substituto", "substitution",
- "substituts", "substitutes",
- "substracts", "subtracts",
- "substutite", "substitutes",
- "subsudized", "subsidized",
- "subtitltes", "subtitle",
- "succceeded", "succeeded",
- "succcesses", "successes",
- "succesfuly", "successfully",
- "succesions", "succession",
- "successing", "succession",
- "successivo", "succession",
- "sucesfully", "successfully",
- "sucessfull", "successful",
- "sucessfuly", "successfully",
- "sudnerland", "sunderland",
- "sufferered", "suffered",
- "sufferring", "suffering",
- "sufficiant", "sufficient",
- "suggestied", "suggestive",
- "suggestief", "suggestive",
- "suggestons", "suggests",
- "sumbarines", "submarines",
- "sumbissive", "submissive",
- "sumbitting", "submitting",
- "summerized", "summarized",
- "summorized", "summarized",
- "summurized", "summarized",
- "sunderlona", "sunderland",
- "sunderlund", "sunderland",
- "sungalsses", "sunglasses",
- "sunglesses", "sunglasses",
- "sunglinger", "gunslinger",
- "sunscreeen", "sunscreen",
- "superfical", "superficial",
- "superfluos", "superfluous",
- "superioara", "superior",
- "superioare", "superior",
- "superioris", "superiors",
- "superivsor", "supervisors",
- "supermaket", "supermarket",
- "supermarkt", "supermarket",
- "superouman", "superhuman",
- "superposer", "superpowers",
- "superviors", "supervisors",
- "superviosr", "supervisors",
- "supervisar", "supervisor",
- "superviser", "supervisor",
- "supervisin", "supervision",
- "supervison", "supervision",
- "supervsior", "supervisors",
- "supperssor", "suppressor",
- "supplament", "supplement",
- "supplemant", "supplemental",
- "supplemets", "supplements",
- "supportare", "supporters",
- "supporteur", "supporter",
- "supportied", "supported",
- "supportors", "supporters",
- "supposdely", "supposedly",
- "supposebly", "supposedly",
- "supposidly", "supposedly",
- "suppresion", "suppression",
- "suppresors", "suppressor",
- "suppressin", "suppression",
- "suppressio", "suppressor",
- "suppresson", "suppression",
- "suprassing", "surpassing",
- "supressing", "suppressing",
- "supression", "suppression",
- "supsension", "suspension",
- "supsicions", "suspicions",
- "supsicious", "suspicious",
- "surounding", "surrounding",
- "surplanted", "supplanted",
- "surpressed", "suppressed",
- "surprizing", "surprising",
- "surrenderd", "surrendered",
- "surrouding", "surrounding",
- "surroundes", "surrounds",
- "surroundig", "surroundings",
- "survivours", "survivor",
- "suseptable", "susceptible",
- "suseptible", "susceptible",
- "suspecions", "suspicions",
- "suspecious", "suspicious",
- "suspencion", "suspension",
- "suspendeds", "suspense",
- "suspention", "suspension",
- "suspicians", "suspicions",
- "suspiciois", "suspicions",
- "suspicioso", "suspicions",
- "suspicioun", "suspicion",
- "suspicison", "suspicions",
- "suspiciuos", "suspicions",
- "suspicsion", "suspicions",
- "suspisions", "suspicions",
- "suspisious", "suspicious",
- "suspitions", "suspicions",
- "sustainble", "sustainable",
- "swaetshirt", "sweatshirt",
- "swearengin", "swearing",
- "swearshirt", "sweatshirt",
- "sweathsirt", "sweatshirt",
- "sweatshits", "sweatshirt",
- "sweatshort", "sweatshirt",
- "sweatshrit", "sweatshirt",
- "sweerheart", "sweetheart",
- "sweetshart", "sweetheart",
- "switcheasy", "switches",
- "switzerand", "switzerland",
- "symapthize", "sympathize",
- "symbolisch", "symbolic",
- "symbolisim", "symbolism",
- "symetrical", "symmetrical",
- "sympatheic", "sympathetic",
- "sympathiek", "sympathize",
- "sympathien", "sympathize",
- "sympathtic", "sympathetic",
- "sympathyze", "sympathize",
- "sympethize", "sympathize",
- "symphatize", "sympathize",
- "symphonity", "symphony",
- "sympothize", "sympathize",
- "syncronous", "synchronous",
- "synomymous", "synonymous",
- "synomynous", "synonymous",
- "synonamous", "synonymous",
- "synonimous", "synonymous",
- "synonmyous", "synonymous",
- "synonomous", "synonymous",
- "synonumous", "synonymous",
- "synonynous", "synonymous",
- "sypmathize", "sympathize",
- "systamatic", "systematic",
- "systemetic", "systematic",
- "systemisch", "systemic",
- "systimatic", "systematic",
- "tabelspoon", "tablespoon",
- "tablespons", "tablespoons",
- "tablesppon", "tablespoon",
- "tacitcally", "tactically",
- "taiwanesse", "taiwanese",
- "taligating", "tailgating",
- "tantrumers", "tantrums",
- "targetting", "targeting",
- "teamfigths", "teamfights",
- "teamifghts", "teamfights",
- "teamspeack", "teamspeak",
- "techicians", "technicians",
- "techincian", "technician",
- "techinican", "technician",
- "techinques", "techniques",
- "technicain", "technician",
- "technicaly", "technically",
- "technicans", "technicians",
- "technichan", "technician",
- "technicien", "technician",
- "technicion", "technician",
- "technitian", "technician",
- "technqiues", "techniques",
- "techtician", "technician",
- "tehnically", "ethnically",
- "telegrapgh", "telegraph",
- "teleporing", "teleporting",
- "televesion", "television",
- "televisivo", "television",
- "temafights", "teamfights",
- "temerature", "temperature",
- "temperatue", "temperature",
- "temperment", "temperament",
- "temperture", "temperature",
- "templarios", "templars",
- "templarius", "templars",
- "temporaily", "temporarily",
- "temporarly", "temporary",
- "temptating", "temptation",
- "temptetion", "temptation",
- "tendancies", "tendencies",
- "tendencias", "tendencies",
- "tendencije", "tendencies",
- "tendensies", "tendencies",
- "tendincies", "tendencies",
- "tensionors", "tensions",
- "tentacreul", "tentacle",
- "termanator", "terminator",
- "termendous", "tremendous",
- "termiantor", "terminator",
- "termigator", "terminator",
- "terminales", "terminals",
- "terminalis", "terminals",
- "terminarla", "terminal",
- "terminarlo", "terminal",
- "terminaron", "terminator",
- "terminater", "terminator",
- "terminolgy", "terminology",
- "terorrists", "terrorists",
- "terrerists", "terrorists",
- "terrestial", "terrestrial",
- "terriblely", "terribly",
- "terriories", "territories",
- "territoral", "territorial",
- "territores", "territories",
- "territoris", "territories",
- "territorry", "territory",
- "terrorisim", "terrorism",
- "terrorsits", "terrorists",
- "terrurists", "terrorists",
- "testiclees", "testicles",
- "testiclies", "testicle",
- "testimoney", "testimony",
- "thankyooou", "thankyou",
- "themselfes", "themselves",
- "themsevles", "themselves",
- "themsleves", "themselves",
- "theocracry", "theocracy",
- "theologial", "theological",
- "therapetic", "therapeutic",
- "therepists", "therapists",
- "theripists", "therapists",
- "thermastat", "thermostat",
- "thermistat", "thermostat",
- "thermomter", "thermometer",
- "theromstat", "thermostat",
- "thorttling", "throttling",
- "thorughout", "throughout",
- "thouroghly", "thoroughly",
- "threadened", "threaded",
- "threatenes", "threatens",
- "threatning", "threatening",
- "threshhold", "threshold",
- "throthling", "throttling",
- "throtlling", "throttling",
- "throughiut", "throughput",
- "thubmnails", "thumbnails",
- "thumbmails", "thumbnails",
- "thunderbot", "thunderbolt",
- "thunderolt", "thunderbolt",
- "tighetning", "tightening",
- "tightining", "tightening",
- "tigthening", "tightening",
- "tjpanishad", "upanishad",
- "toothbruch", "toothbrush",
- "toothbruth", "toothbrush",
- "toothbursh", "toothbrush",
- "toothrbush", "toothbrush",
- "toppingest", "toppings",
- "torchilght", "torchlight",
- "torchlgiht", "torchlight",
- "torchligth", "torchlight",
- "torhclight", "torchlight",
- "torrentbig", "torrenting",
- "torrenters", "torrents",
- "torrentors", "torrents",
- "tortillera", "tortilla",
- "tortillias", "tortilla",
- "tortillita", "tortilla",
- "tortilllas", "tortilla",
- "torunament", "tournament",
- "totalitara", "totalitarian",
- "touchsceen", "touchscreen",
- "touchscren", "touchscreen",
- "touranment", "tournaments",
- "tourmanent", "tournaments",
- "tournamets", "tournaments",
- "tournamnet", "tournament",
- "tournemant", "tournament",
- "tournement", "tournament",
- "toxicitity", "toxicity",
- "trafficing", "trafficking",
- "trainwreak", "trainwreck",
- "traitorise", "traitors",
- "tramboline", "trampoline",
- "tramploine", "trampoline",
- "trampolene", "trampoline",
- "tranformed", "transformed",
- "tranistion", "transition",
- "tranlsated", "translated",
- "transalted", "translated",
- "transaltes", "translates",
- "transaltor", "translator",
- "transation", "transition",
- "transciprt", "transcripts",
- "transcirpt", "transcripts",
- "transcrips", "transcripts",
- "transcrito", "transcript",
- "transcrits", "transcripts",
- "transcrpit", "transcript",
- "transfered", "transferred",
- "transferer", "transferred",
- "transferes", "transfers",
- "transferrs", "transfers",
- "transferts", "transfers",
- "transfomed", "transformed",
- "transfored", "transformed",
- "transforme", "transfer",
- "transfroms", "transforms",
- "transgeder", "transgender",
- "transgener", "transgender",
- "transicion", "transition",
- "transision", "transition",
- "transister", "transistor",
- "transitons", "transitions",
- "transitors", "transistor",
- "transkript", "transcript",
- "translater", "translator",
- "translatin", "translations",
- "translatio", "translator",
- "translpant", "transplants",
- "transluent", "translucent",
- "transmited", "transmitted",
- "transmiter", "transmitter",
- "transmitor", "transistor",
- "transmorgs", "transforms",
- "transpalnt", "transplants",
- "transphoic", "transphobic",
- "transplain", "transplant",
- "transplate", "transplant",
- "transplats", "transplants",
- "transpoder", "transported",
- "transportr", "transporter",
- "transsexal", "transsexual",
- "transtator", "translator",
- "tranzistor", "transistor",
- "trasncript", "transcript",
- "trasnforms", "transforms",
- "trasnlated", "translated",
- "trasnlator", "translator",
- "trasnplant", "transplant",
- "traveleres", "travelers",
- "travelodge", "traveled",
- "traverlers", "traverse",
- "traversare", "traverse",
- "traversier", "traverse",
- "treasurery", "treasury",
- "trememdous", "tremendous",
- "tremondous", "tremendous",
- "trespasing", "trespassing",
- "trianwreck", "trainwreck",
- "trochlight", "torchlight",
- "trustworhy", "trustworthy",
- "trustworty", "trustworthy",
- "trustwothy", "trustworthy",
- "tryannical", "tyrannical",
- "tunraround", "turnaround",
- "tupparware", "tupperware",
- "turnapound", "turnaround",
- "turthfully", "truthfully",
- "tutoriales", "tutorials",
- "tyrantical", "tyrannical",
- "ubiqituous", "ubiquitous",
- "ubiquotous", "ubiquitous",
- "ubiqutious", "ubiquitous",
- "ukrainains", "ukrainians",
- "ukraineans", "ukrainians",
- "ukrainiens", "ukrainians",
- "ukraininas", "ukrainians",
- "ukrianians", "ukrainians",
- "ulitmately", "ultimately",
- "ulterioara", "ulterior",
- "ulterioare", "ulterior",
- "ultimative", "ultimate",
- "ultimatley", "ultimately",
- "ultimatuum", "ultimatum",
- "unanwsered", "unanswered",
- "unasnwered", "unanswered",
- "unattanded", "unattended",
- "unattented", "unattended",
- "unavailabe", "unavailable",
- "unavailble", "unavailable",
- "unavoidble", "unavoidable",
- "unawnsered", "unanswered",
- "unbalenced", "unbalanced",
- "unballance", "unbalance",
- "unbalnaced", "unbalanced",
- "unbareable", "unbearable",
- "unbeakable", "unbeatable",
- "unbeareble", "unbearable",
- "unbeatbale", "unbeatable",
- "unbeateble", "unbeatable",
- "unbeerable", "unbearable",
- "unbeetable", "unbeatable",
- "unbeknowst", "unbeknownst",
- "unbreakble", "unbreakable",
- "uncencored", "uncensored",
- "uncensered", "uncensored",
- "uncersored", "uncensored",
- "uncertainy", "uncertainty",
- "uncertanty", "uncertainty",
- "uncesnored", "uncensored",
- "uncomitted", "uncommitted",
- "uncommited", "uncommitted",
- "unconcious", "unconscious",
- "unconscous", "unconscious",
- "undebiably", "undeniably",
- "undeinable", "undeniable",
- "undeinably", "undeniably",
- "undenaible", "undeniable",
- "undenaibly", "undeniably",
- "undenyable", "undeniable",
- "undenyably", "undeniably",
- "underbaker", "undertaker",
- "undercling", "underlying",
- "underfaker", "undertaker",
- "undergated", "underrated",
- "undergrand", "undergrad",
- "undergroud", "underground",
- "undergrund", "underground",
- "undermimes", "undermines",
- "underminde", "undermines",
- "underminig", "undermining",
- "underneeth", "underneath",
- "underneith", "underneath",
- "undernieth", "underneath",
- "underpowed", "underpowered",
- "underraged", "underrated",
- "underraker", "undertaker",
- "underrater", "undertaker",
- "undersatnd", "understands",
- "understadn", "understands",
- "understans", "understands",
- "understnad", "understands",
- "understoon", "understood",
- "understsnd", "understands",
- "undertoker", "undertaker",
- "undertsand", "understands",
- "undertunes", "undertones",
- "underwager", "underwater",
- "underwares", "underwater",
- "underwolrd", "underworld",
- "underwoord", "underworld",
- "underwrold", "underworld",
- "underyling", "underlying",
- "undesrtand", "understands",
- "undoubtedy", "undoubtedly",
- "undoubtely", "undoubtedly",
- "undoubtley", "undoubtedly",
- "uneccesary", "unnecessary",
- "unecessary", "unnecessary",
- "unedcuated", "uneducated",
- "unedicated", "uneducated",
- "unempolyed", "unemployed",
- "unexplaind", "unexplained",
- "unexplaned", "unexplained",
- "unfamilair", "unfamiliar",
- "unfamilier", "unfamiliar",
- "unfinsihed", "unfinished",
- "unfirendly", "unfriendly",
- "unfortuate", "unfortunate",
- "unfreindly", "unfriendly",
- "unfriednly", "unfriendly",
- "unfriently", "unfriendly",
- "ungrapeful", "ungrateful",
- "ungreatful", "ungrateful",
- "unhealthly", "unhealthy",
- "unicornios", "unicorns",
- "unifnished", "unfinished",
- "unihabited", "uninhabited",
- "unilatreal", "unilateral",
- "unimporant", "unimportant",
- "unimpresed", "unimpressed",
- "unimpressd", "unimpressed",
- "uninsipred", "uninspired",
- "uninspried", "uninspired",
- "uninstaled", "uninstalled",
- "uniquiness", "uniqueness",
- "univercity", "university",
- "univeristy", "university",
- "universale", "universe",
- "universaly", "universally",
- "universels", "universes",
- "universets", "universes",
- "universite", "universities",
- "universtiy", "university",
- "unjustifed", "unjustified",
- "unknowingy", "unknowingly",
- "unknowinly", "unknowingly",
- "unnecesary", "unnecessary",
- "unofficail", "unofficial",
- "unoffocial", "unofficial",
- "unorginial", "unoriginal",
- "unorignial", "unoriginal",
- "unorigonal", "unoriginal",
- "unplacable", "unplayable",
- "unplaybale", "unplayable",
- "unplayeble", "unplayable",
- "unpleasent", "unpleasant",
- "unpopulair", "unpopular",
- "unproteced", "unprotected",
- "unqiueness", "uniqueness",
- "unqualifed", "unqualified",
- "unrealesed", "unreleased",
- "unrealible", "unreliable",
- "unrealistc", "unrealistic",
- "unrealitic", "unrealistic",
- "unreasonal", "unreasonably",
- "unrelaible", "unreliable",
- "unreleated", "unreleased",
- "unrelyable", "unreliable",
- "unrepetant", "unrepentant",
- "unrepetent", "unrepentant",
- "unresponse", "unresponsive",
- "unsencored", "uncensored",
- "unsetlling", "unsettling",
- "unsolicted", "unsolicited",
- "unsubscibe", "unsubscribe",
- "unsubscrbe", "unsubscribe",
- "unsucesful", "unsuccessful",
- "unsuprised", "unsurprised",
- "unsuprized", "unsurprised",
- "unviersity", "university",
- "unwrittern", "unwritten",
- "urkainians", "ukrainians",
- "utlimately", "ultimately",
- "utlrasound", "ultrasound",
- "vaccinatie", "vaccinated",
- "vaccineras", "vaccines",
- "valentians", "valentines",
- "valentiens", "valentines",
- "valentimes", "valentines",
- "valentinas", "valentines",
- "valentinos", "valentines",
- "valentones", "valentines",
- "validitity", "validity",
- "valnetines", "valentines",
- "vandalisim", "vandalism",
- "vasectomey", "vasectomy",
- "vegatarian", "vegetarian",
- "vegaterian", "vegetarian",
- "vegeratian", "vegetarians",
- "vegetairan", "vegetarians",
- "vegetarain", "vegetarians",
- "vegetarien", "vegetarian",
- "vegetarion", "vegetarian",
- "vegetatian", "vegetarian",
- "vegeterian", "vegetarian",
- "vegitables", "vegetables",
- "vehemantly", "vehemently",
- "vehemontly", "vehemently",
- "veitnamese", "vietnamese",
- "veiwership", "viewership",
- "veiwpoints", "viewpoints",
- "venezuella", "venezuela",
- "verificato", "verification",
- "verifyable", "verifiable",
- "veritcally", "vertically",
- "veritiable", "verifiable",
- "vernecular", "vernacular",
- "vernicular", "vernacular",
- "versatiliy", "versatility",
- "versatille", "versatile",
- "versatilty", "versatility",
- "versitlity", "versatility",
- "vewiership", "viewership",
- "vibratoare", "vibrator",
- "vicitmized", "victimized",
- "vicotrious", "victorious",
- "victemized", "victimized",
- "victomized", "victimized",
- "victorinos", "victorious",
- "victorinus", "victorious",
- "victoriosa", "victorious",
- "victorioso", "victorious",
- "victoriuos", "victorious",
- "victumized", "victimized",
- "videogaems", "videogames",
- "videojames", "videogames",
- "vidoegames", "videogames",
- "vientamese", "vietnamese",
- "vietmanese", "vietnamese",
- "vietnamees", "vietnamese",
- "vietnamise", "vietnamese",
- "viewpionts", "viewpoints",
- "vigilantie", "vigilante",
- "vigoruosly", "vigorously",
- "vigourosly", "vigorously",
- "villageois", "villages",
- "vindicitve", "vindictive",
- "vindictave", "vindictive",
- "visibiltiy", "visibility",
- "vitenamese", "vietnamese",
- "vocabluary", "vocabulary",
- "volatiltiy", "volatility",
- "volativity", "volatility",
- "volitality", "volatility",
- "volleyboll", "volleyball",
- "vollyeball", "volleyball",
- "volonteers", "volunteers",
- "volounteer", "volunteer",
- "voluntairy", "voluntarily",
- "voluntarly", "voluntary",
- "voluntears", "volunteers",
- "volunteeer", "volunteers",
- "volunteerd", "volunteered",
- "voluntered", "volunteered",
- "vulernable", "vulnerable",
- "vulnarable", "vulnerable",
- "vulnerabil", "vulnerable",
- "vulnurable", "vulnerable",
- "vunlerable", "vulnerable",
- "warrandyte", "warranty",
- "warrantles", "warranties",
- "warrenties", "warranties",
- "washignton", "washington",
- "waterlemon", "watermelon",
- "watermalon", "watermelon",
- "waterproff", "waterproof",
- "wavelegnth", "wavelength",
- "wavelenghs", "wavelength",
- "wavelenght", "wavelength",
- "weakensses", "weaknesses",
- "weaknesess", "weaknesses",
- "weathliest", "wealthiest",
- "wedensdays", "wednesdays",
- "wednesdsay", "wednesdays",
- "wednessday", "wednesdays",
- "wednsedays", "wednesdays",
- "weightened", "weighted",
- "welathiest", "wealthiest",
- "wellignton", "wellington",
- "wellingotn", "wellington",
- "wendesdays", "wednesdays",
- "wereabouts", "whereabouts",
- "westbroook", "westbrook",
- "westernese", "westerners",
- "westerness", "westerners",
- "westminser", "westminster",
- "westminter", "westminster",
- "whatosever", "whatsoever",
- "whatseover", "whatsoever",
- "whipsering", "whispering",
- "whsipering", "whispering",
- "widepsread", "widespread",
- "wikileakes", "wikileaks",
- "wilderniss", "wilderness",
- "wildreness", "wilderness",
- "willfullly", "willfully",
- "winchestor", "winchester",
- "windhsield", "windshield",
- "windsheild", "windshield",
- "windshiled", "windshield",
- "wisconsion", "wisconsin",
- "wishpering", "whispering",
- "withdrawan", "withdrawn",
- "withdrawel", "withdrawal",
- "withdrawin", "withdrawn",
- "withholdng", "withholding",
- "withrdawal", "withdrawals",
- "witnissing", "witnessing",
- "wonderfull", "wonderful",
- "wonderfuly", "wonderfully",
- "wonderwand", "wonderland",
- "worhsiping", "worshiping",
- "workingest", "workings",
- "workstaion", "workstation",
- "workstaton", "workstation",
- "worshippig", "worshipping",
- "worshoping", "worshiping",
- "wrestlewar", "wrestler",
- "xenohpobic", "xenophobic",
- "xenophibia", "xenophobia",
- "xenophibic", "xenophobic",
- "xenophonic", "xenophobic",
- "xenophopia", "xenophobia",
- "xenophopic", "xenophobic",
- "xeonphobia", "xenophobia",
- "xeonphobic", "xenophobic",
- "yourselfes", "yourselves",
- "yoursleves", "yourselves",
- "zimbabwaen", "zimbabwe",
- "zionistisk", "zionists",
- "abandonig", "abandoning",
- "abandonne", "abandonment",
- "abanonded", "abandoned",
- "abdomnial", "abdominal",
- "abdonimal", "abdominal",
- "aberation", "aberration",
- "abnormaly", "abnormally",
- "abodminal", "abdominal",
- "abondoned", "abandoned",
- "aborigene", "aborigine",
- "aboslutes", "absolutes",
- "abosrbing", "absorbing",
- "abreviate", "abbreviate",
- "abritrary", "arbitrary",
- "abruptley", "abruptly",
- "absailing", "abseiling",
- "absloutes", "absolutes",
- "absolutey", "absolutely",
- "absolutly", "absolutely",
- "absoultes", "absolutes",
- "abstracto", "abstraction",
- "absurdley", "absurdly",
- "absuridty", "absurdity",
- "abusrdity", "absurdity",
- "academica", "academia",
- "accademic", "academic",
- "accalimed", "acclaimed",
- "accelerar", "accelerator",
- "accending", "ascending",
- "accension", "accession",
- "accidenty", "accidently",
- "acclamied", "acclaimed",
- "accliamed", "acclaimed",
- "accomdate", "accommodate",
- "accordeon", "accordion",
- "accordian", "accordion",
- "accoridng", "according",
- "accountas", "accountants",
- "accountat", "accountants",
- "accoustic", "acoustic",
- "accroding", "according",
- "accuraccy", "accuracy",
- "acftually", "factually",
- "acheiving", "achieving",
- "achieveds", "achieves",
- "achillees", "achilles",
- "achilleos", "achilles",
- "achilleus", "achilles",
- "achiveing", "achieving",
- "acitvates", "activates",
- "aclhemist", "alchemist",
- "acomplish", "accomplish",
- "acquisito", "acquisition",
- "acronymes", "acronyms",
- "acronymns", "acronyms",
- "acsending", "ascending",
- "acsension", "ascension",
- "activaste", "activates",
- "activatin", "activation",
- "activelly", "actively",
- "activisim", "activism",
- "activisit", "activist",
- "activites", "activities",
- "actresess", "actresses",
- "acusation", "causation",
- "acutality", "actuality",
- "adavanced", "advanced",
- "adbominal", "abdominal",
- "additonal", "additional",
- "addoptive", "adoptive",
- "addresing", "addressing",
- "addtional", "additional",
- "adhearing", "adhering",
- "adherance", "adherence",
- "adjectivs", "adjectives",
- "adjustabe", "adjustable",
- "administr", "administer",
- "admitedly", "admittedly",
- "adolecent", "adolescent",
- "adovcated", "advocated",
- "adovcates", "advocates",
- "adquiring", "acquiring",
- "adresable", "addressable",
- "adressing", "addressing",
- "aduiobook", "audiobook",
- "advatange", "advantage",
- "adventurs", "adventures",
- "adveristy", "adversity",
- "advertisy", "adversity",
- "advisorys", "advisors",
- "aeorspace", "aerospace",
- "aeropsace", "aerospace",
- "aerosapce", "aerospace",
- "aersopace", "aerospace",
- "aestethic", "aesthetic",
- "aethistic", "atheistic",
- "affiliato", "affiliation",
- "affinitiy", "affinity",
- "affirmate", "affirmative",
- "affliated", "affiliated",
- "africanas", "africans",
- "africanos", "africans",
- "aggegrate", "aggregate",
- "aggresive", "aggressive",
- "agnosticm", "agnosticism",
- "agregates", "aggregates",
- "agreggate", "aggregate",
- "agrentina", "argentina",
- "agression", "aggression",
- "agressive", "aggressive",
- "agressvie", "agressive",
- "agruement", "arguement",
- "agruments", "arguments",
- "agurement", "arguement",
- "ailenated", "alienated",
- "airbourne", "airborne",
- "aircrafts", "aircraft",
- "airplance", "airplane",
- "airrcraft", "aircraft",
- "aksreddit", "askreddit",
- "alcehmist", "alchemist",
- "alchemsit", "alchemist",
- "alchimest", "alchemist",
- "alchmeist", "alchemist",
- "alchoolic", "alcoholic",
- "alcoholis", "alcoholics",
- "alechmist", "alchemist",
- "alegience", "allegiance",
- "aleinated", "alienated",
- "algoriths", "algorithms",
- "algoritms", "algorithms",
- "algorthim", "algorithm",
- "algortihm", "algorithm",
- "alignemnt", "alignment",
- "alimunium", "aluminium",
- "alingment", "alignment",
- "allainces", "alliances",
- "alledgely", "allegedly",
- "allegence", "allegiance",
- "alleivate", "alleviate",
- "allievate", "alleviate",
- "alliviate", "alleviate",
- "allopones", "allophones",
- "allthough", "although",
- "almightly", "almighty",
- "alocholic", "alcoholic",
- "alogrithm", "algorithm",
- "alphabeat", "alphabet",
- "alrightey", "alrighty",
- "alrightly", "alrighty",
- "alrightty", "alrighty",
- "alrington", "arlington",
- "alrorythm", "algorithm",
- "alterante", "alternate",
- "alternatr", "alternator",
- "althetics", "athletics",
- "althought", "although",
- "altruisim", "altruism",
- "amateures", "amateurs",
- "ambluance", "ambulance",
- "ambuigity", "ambiguity",
- "amendmant", "amendment",
- "amercians", "americans",
- "americain", "american",
- "americams", "americas",
- "americaps", "americas",
- "americats", "americas",
- "amibguity", "ambiguity",
- "aminosity", "animosity",
- "amrstrong", "armstrong",
- "amublance", "ambulance",
- "amunition", "ammunition",
- "anachrist", "anarchist",
- "analagous", "analogous",
- "analitycs", "analytics",
- "analtyics", "analytics",
- "analyitcs", "analytics",
- "analyseas", "analyses",
- "analysees", "analyses",
- "analysens", "analyses",
- "analysise", "analyses",
- "analystes", "analysts",
- "analzying", "analyzing",
- "anarchsim", "anarchism",
- "anayltics", "analytics",
- "anaylzing", "analyzing",
- "ancedotal", "anecdotal",
- "ancedotes", "anecdotes",
- "ancestory", "ancestry",
- "androgeny", "androgyny",
- "androides", "androids",
- "androidos", "androids",
- "anecdotle", "anecdote",
- "anecodtal", "anecdotal",
- "anecodtes", "anecdotes",
- "anectodal", "anecdotal",
- "anectodes", "anecdotes",
- "anedoctal", "anecdotal",
- "anedoctes", "anecdotes",
- "animostiy", "animosity",
- "anitvirus", "antivirus",
- "anlaytics", "analytics",
- "anniversy", "anniversary",
- "annointed", "anointed",
- "annoucnes", "announces",
- "annoyingy", "annoyingly",
- "annoymous", "anonymous",
- "annoynace", "annoyance",
- "annyoance", "annoyance",
- "anomisity", "animosity",
- "anomolies", "anomalies",
- "anomolous", "anomalous",
- "anomynity", "anonymity",
- "anomynous", "anonymous",
- "anonimity", "anonymity",
- "anonmyous", "anonymous",
- "anonymoys", "anonymously",
- "anorexiac", "anorexic",
- "anorexica", "anorexia",
- "anrachist", "anarchist",
- "ansestors", "ancestors",
- "antarctia", "antarctica",
- "antennaes", "antennas",
- "antiviurs", "antivirus",
- "antivrius", "antivirus",
- "antivuris", "antivirus",
- "anwsering", "answering",
- "anynomity", "anonymity",
- "anynomous", "anonymous",
- "aparthide", "apartheid",
- "aparthied", "apartheid",
- "apartmens", "apartments",
- "apocalype", "apocalypse",
- "apostrope", "apostrophe",
- "apparenty", "apparently",
- "appearane", "appearances",
- "appenines", "apennines",
- "apperance", "appearance",
- "appetitie", "appetite",
- "applaudes", "applause",
- "applicato", "application",
- "appreciae", "appreciates",
- "apprentie", "apprentice",
- "approachs", "approaches",
- "apratheid", "apartheid",
- "apsaragus", "asparagus",
- "apsergers", "aspergers",
- "aquainted", "acquainted",
- "arbirtary", "arbitrary",
- "arbritary", "arbitrary",
- "arcehtype", "archetype",
- "archetect", "architect",
- "archetpye", "archetype",
- "archetyps", "archetypes",
- "architecs", "architects",
- "archtypes", "archetypes",
- "aregument", "arguement",
- "areospace", "aerospace",
- "argessive", "agressive",
- "argeument", "arguement",
- "arguabley", "arguably",
- "arguablly", "arguably",
- "arguement", "argument",
- "arguemnet", "arguement",
- "arguemnts", "arguments",
- "argumeent", "arguement",
- "arhtritis", "arthritis",
- "aribtrary", "arbitrary",
- "ariplanes", "airplanes",
- "aristolte", "aristotle",
- "aristotel", "aristotle",
- "aritfacts", "artifacts",
- "arlignton", "arlington",
- "arlingotn", "arlington",
- "armistace", "armistice",
- "armstorng", "armstrong",
- "arpatheid", "apartheid",
- "arthirtis", "arthritis",
- "artifcats", "artifacts",
- "artifical", "artificial",
- "artillary", "artillery",
- "arugement", "arguement",
- "arugments", "arguments",
- "asapragus", "asparagus",
- "asbestoes", "asbestos",
- "asborbing", "absorbing",
- "asburdity", "absurdity",
- "ascendend", "ascended",
- "ascneding", "ascending",
- "ascnesion", "ascension",
- "asethetic", "aesthetic",
- "asnwering", "answering",
- "asociated", "associated",
- "assasined", "assassinated",
- "assassian", "assassin",
- "assassine", "assassinate",
- "assasssin", "assassins",
- "assaultes", "assaults",
- "assembeld", "assembled",
- "assembley", "assembly",
- "assemblie", "assemble",
- "assisnate", "assassinate",
- "assistans", "assistants",
- "assistsnt", "assistants",
- "assmebled", "assembled",
- "associato", "association",
- "assoicate", "associate",
- "asssasins", "assassins",
- "assualted", "assaulted",
- "assulated", "assaulted",
- "asteorids", "asteroids",
- "astericks", "asterisk",
- "asteriods", "asteroids",
- "astroanut", "astronaut",
- "astronuat", "astronaut",
- "astrounat", "astronaut",
- "asuterity", "austerity",
- "atempting", "attempting",
- "atheltics", "athletics",
- "atheneans", "athenians",
- "athesitic", "atheistic",
- "athetlics", "athletics",
- "athiestic", "atheistic",
- "athleticm", "athleticism",
- "atmosphir", "atmospheric",
- "atributed", "attributed",
- "atributes", "attributes",
- "atrifacts", "artifacts",
- "atrillery", "artillery",
- "atrittion", "attrition",
- "attachmet", "attachments",
- "attaindre", "attainder",
- "attemting", "attempting",
- "attemtped", "attempted",
- "attendent", "attendant",
- "attension", "attention",
- "attirbute", "attribute",
- "attirtion", "attrition",
- "attmepted", "attempted",
- "attractes", "attracts",
- "attractin", "attraction",
- "attributo", "attribution",
- "attributs", "attributes",
- "attritube", "attribute",
- "auctionrs", "auctions",
- "auidobook", "audiobook",
- "auromated", "automated",
- "australin", "australians",
- "authroity", "authority",
- "autoattak", "autoattack",
- "autogrpah", "autograph",
- "autonomos", "autonomous",
- "auxillary", "auxiliary",
- "avaialble", "available",
- "availible", "available",
- "avalaible", "available",
- "avaliable", "available",
- "averageed", "averaged",
- "avialable", "available",
- "awakenend", "awakened",
- "awesomley", "awesomely",
- "awkawrdly", "awkwardly",
- "awnsering", "answering",
- "bacehlors", "bachelors",
- "bachelour", "bachelor",
- "bachleors", "bachelors",
- "bacholers", "bachelors",
- "backdooor", "backdoor",
- "backfeild", "backfield",
- "backfiled", "backfield",
- "backgroud", "background",
- "backpakcs", "backpacks",
- "badnwagon", "bandwagon",
- "badnwidth", "bandwidth",
- "balckjack", "blackjack",
- "balcklist", "blacklist",
- "balitmore", "baltimore",
- "ballisitc", "ballistic",
- "ballsitic", "ballistic",
- "balsphemy", "blasphemy",
- "bandiwdth", "bandwidth",
- "bandwdith", "bandwidth",
- "bandwidht", "bandwidth",
- "bandwitdh", "bandwidth",
- "bankrupcy", "bankruptcy",
- "bankrupty", "bankruptcy",
- "banruptcy", "bankruptcy",
- "baordwalk", "boardwalk",
- "barabrian", "barbarian",
- "barbarain", "barbarian",
- "barbarina", "barbarian",
- "barcelets", "bracelets",
- "barcleona", "barcelona",
- "bareclona", "barcelona",
- "barrackus", "barracks",
- "bascially", "basically",
- "bastardes", "bastards",
- "bastardos", "bastards",
- "bastardus", "bastards",
- "bathrooom", "bathroom",
- "batlimore", "baltimore",
- "battailon", "battalion",
- "battlaion", "battalion",
- "beahviour", "behaviour",
- "beauitful", "beautiful",
- "beautifyl", "beautifully",
- "becnhmark", "benchmark",
- "becomeing", "becoming",
- "becomming", "becoming",
- "beehtoven", "beethoven",
- "begginers", "beginners",
- "beggining", "beginning",
- "begininng", "beginning",
- "beginnins", "beginnings",
- "behaivors", "behaviors",
- "behaivour", "behaviour",
- "behavoirs", "behaviors",
- "behavoiur", "behaviour",
- "behvaiour", "behaviour",
- "beleiving", "believing",
- "beliveing", "believing",
- "belssings", "blessings",
- "bemusemnt", "bemusement",
- "benchamrk", "benchmark",
- "benchmars", "benchmarks",
- "benedicat", "benedict",
- "benedickt", "benedict",
- "benghazhi", "benghazi",
- "benghazzi", "benghazi",
- "bergamont", "bergamot",
- "berkelely", "berkeley",
- "bersekrer", "berserker",
- "berskerer", "berserker",
- "beseiging", "besieging",
- "bestialiy", "bestiality",
- "beuatiful", "beautiful",
- "biginning", "beginning",
- "bigrading", "brigading",
- "billbaord", "billboard",
- "billboars", "billboards",
- "binominal", "binomial",
- "birgading", "brigading",
- "birghtest", "brightest",
- "birhtdays", "birthdays",
- "bitcoints", "bitcoins",
- "blackbery", "blackberry",
- "blackhaws", "blackhawks",
- "blackshit", "blacksmith",
- "blanketts", "blankets",
- "blapshemy", "blasphemy",
- "blashpemy", "blasphemy",
- "blaspehmy", "blasphemy",
- "blasphmey", "blasphemy",
- "blatanlty", "blatantly",
- "blatimore", "baltimore",
- "bleuberry", "blueberry",
- "bleutooth", "bluetooth",
- "blisteres", "blisters",
- "blizzcoin", "blizzcon",
- "blockchan", "blockchain",
- "blockeras", "blockers",
- "bloodbore", "bloodborne",
- "boardband", "broadband",
- "boardcast", "broadcast",
- "bodyweigt", "bodyweight",
- "bookamrks", "bookmarks",
- "bookmakrs", "bookmarks",
- "bookmarkd", "bookmarked",
- "boradband", "broadband",
- "boradcast", "broadcast",
- "boradwalk", "boardwalk",
- "bouregois", "bourgeois",
- "bourgeios", "bourgeois",
- "bourgoeis", "bourgeois",
- "boyfirend", "boyfriend",
- "boyfreind", "boyfriend",
- "boyfriens", "boyfriends",
- "brabarian", "barbarian",
- "bracelona", "barcelona",
- "braodband", "broadband",
- "braodcast", "broadcast",
- "brazilias", "brazilians",
- "breakdows", "breakdowns",
- "breserker", "berserker",
- "bretheren", "brethren",
- "bridaging", "brigading",
- "brightern", "brighten",
- "brigthest", "brightest",
- "brilliany", "brilliantly",
- "brithdays", "birthdays",
- "broadwalk", "boardwalk",
- "bruiseres", "bruisers",
- "brunettte", "brunette",
- "brusseles", "brussels",
- "brussells", "brussels",
- "brutailty", "brutality",
- "brutallly", "brutally",
- "buddhisim", "buddhism",
- "buddihsts", "buddhists",
- "buddishts", "buddhists",
- "buhddists", "buddhists",
- "buidlings", "buildings",
- "bulidings", "buildings",
- "burgunday", "burgundy",
- "burgundry", "burgundy",
- "burritoes", "burritos",
- "burtality", "brutality",
- "busineses", "business",
- "businessa", "businessman",
- "businesse", "businessmen",
- "businesss", "businesses",
- "bussiness", "business",
- "buthcered", "butchered",
- "butterlfy", "butterfly",
- "cacausian", "caucasian",
- "caclulate", "calculate",
- "cacuasian", "caucasian",
- "caculater", "calculator",
- "cafeteira", "cafeteria",
- "cafetiera", "cafeteria",
- "caffeinne", "caffeine",
- "calcualte", "calculate",
- "californa", "california",
- "caluclate", "calculate",
- "calulated", "calculated",
- "calulater", "calculator",
- "cambirdge", "cambridge",
- "cambrdige", "cambridge",
- "cambrigde", "cambridge",
- "camoflage", "camouflage",
- "campagins", "campaigns",
- "campaings", "campaigns",
- "campiagns", "campaigns",
- "campusers", "campuses",
- "camrbidge", "cambridge",
- "canadains", "canadians",
- "candadate", "candidate",
- "candidats", "candidates",
- "cannister", "canister",
- "cannoical", "canonical",
- "canoncial", "canonical",
- "capactior", "capacitor",
- "capicator", "capacitor",
- "capitalis", "capitals",
- "caprenter", "carpenter",
- "capsulers", "capsules",
- "capsulets", "capsules",
- "carachter", "character",
- "cardbaord", "cardboard",
- "cardborad", "cardboard",
- "cardianls", "cardinals",
- "cardnials", "cardinals",
- "caridnals", "cardinals",
- "carmalite", "carmelite",
- "carnberry", "cranberry",
- "carolinia", "carolina",
- "carpetner", "carpenter",
- "carptener", "carpenter",
- "carribean", "caribbean",
- "cartdrige", "cartridge",
- "cartilege", "cartilage",
- "cartirdge", "cartridge",
- "cartrdige", "cartridge",
- "cartrigde", "cartridge",
- "casaulity", "causality",
- "cashieres", "cashiers",
- "cassawory", "cassowary",
- "cassettte", "cassette",
- "casuation", "causation",
- "cataclsym", "cataclysm",
- "cataclyms", "cataclysm",
- "catacylsm", "cataclysm",
- "catacyslm", "cataclysm",
- "catalcysm", "cataclysm",
- "catalgoue", "catalogue",
- "cathderal", "cathedral",
- "catherdal", "cathedral",
- "cathloics", "catholics",
- "cathredal", "cathedral",
- "caucaisan", "caucasian",
- "caucasain", "caucasian",
- "causacian", "caucasian",
- "causailty", "causality",
- "celebirty", "celebrity",
- "celebrato", "celebration",
- "celebrite", "celebrities",
- "celesital", "celestial",
- "celestail", "celestial",
- "cementary", "cemetery",
- "cemetarey", "cemetery",
- "cenitpede", "centipede",
- "centepide", "centipede",
- "centipeed", "centipede",
- "centruies", "centuries",
- "centuties", "centuries",
- "cerebrawl", "cerebral",
- "certanity", "certainty",
- "certianty", "certainty",
- "cesspoool", "cesspool",
- "chairmain", "chairman",
- "challange", "challenge",
- "challengr", "challenger",
- "challengs", "challenges",
- "chameloen", "chameleon",
- "champagen", "champagne",
- "champange", "champagne",
- "chandlure", "chandler",
- "changable", "changeable",
- "charactor", "character",
- "chatedral", "cathedral",
- "chatolics", "catholics",
- "checkmeat", "checkmate",
- "checkpoit", "checkpoints",
- "chekcmate", "checkmate",
- "chemestry", "chemistry",
- "chemicaly", "chemically",
- "chemsitry", "chemistry",
- "chernboyl", "chernobyl",
- "chernobly", "chernobyl",
- "chernoybl", "chernobyl",
- "chernyobl", "chernobyl",
- "cheronbyl", "chernobyl",
- "chidlfree", "childfree",
- "chidlrens", "childrens",
- "chihauhua", "chihuahua",
- "chihuahau", "chihuahua",
- "childbird", "childbirth",
- "childerns", "childrens",
- "childisch", "childish",
- "childresn", "childrens",
- "chirstian", "christian",
- "chirstmas", "christmas",
- "chiuhahua", "chihuahua",
- "chlidfree", "childfree",
- "chlidrens", "childrens",
- "chocloate", "chocolate",
- "chocoalte", "chocolate",
- "chocolats", "chocolates",
- "chocolste", "chocolates",
- "cholocate", "chocolate",
- "chrenobyl", "chernobyl",
- "chrisitan", "christian",
- "christain", "christian",
- "christams", "christmas",
- "chrsitian", "christian",
- "chrsitmas", "christmas",
- "churchers", "churches",
- "cigaretts", "cigarettes",
- "cigeratte", "cigarette",
- "cilivians", "civilians",
- "cilpboard", "clipboard",
- "cilynders", "cylinders",
- "circuitos", "circuits",
- "ciriculum", "curriculum",
- "cirticise", "criticise",
- "civilains", "civilians",
- "civillian", "civilian",
- "classicos", "classics",
- "classicus", "classics",
- "classifiy", "classify",
- "cleanisng", "cleansing",
- "cleasning", "cleansing",
- "clikcbait", "clickbait",
- "clinicaly", "clinically",
- "clipbaord", "clipboard",
- "clitories", "clitoris",
- "clitorios", "clitoris",
- "clitorius", "clitoris",
- "clucthing", "clutching",
- "clutchign", "clutching",
- "cluthcing", "clutching",
- "coca cola", "coca-cola",
- "cockatils", "cocktails",
- "cocktials", "cocktails",
- "cognizent", "cognizant",
- "colateral", "collateral",
- "collabore", "collaborate",
- "collasped", "collapsed",
- "collaspes", "collapses",
- "colleauge", "colleague",
- "collectes", "collects",
- "collectie", "collective",
- "collecton", "collection",
- "collectos", "collectors",
- "collegaue", "colleague",
- "collegues", "colleagues",
- "collisson", "collisions",
- "collonade", "colonnade",
- "collonies", "colonies",
- "collpased", "collapsed",
- "collpases", "collapses",
- "colombina", "colombia",
- "columbina", "columbia",
- "comapnies", "companies",
- "combatans", "combatants",
- "combinato", "combination",
- "combusion", "combustion",
- "comestics", "cosmetics",
- "comisions", "commissions",
- "comission", "commission",
- "comitting", "committing",
- "commandes", "commands",
- "commentar", "commentator",
- "commentes", "commenters",
- "commercie", "commerce",
- "commision", "commission",
- "commiteed", "commited",
- "commiting", "committing",
- "commitmet", "commitments",
- "commongly", "commonly",
- "communiss", "communists",
- "communite", "communities",
- "communits", "communist",
- "communsim", "communism",
- "compaines", "companies",
- "compalins", "complains",
- "compalint", "compliant",
- "comparisn", "comparisons",
- "compeltes", "completes",
- "competant", "competent",
- "competend", "competed",
- "competion", "competition",
- "competive", "competitive",
- "compilant", "compliant",
- "compilare", "compiler",
- "compilato", "compilation",
- "compitent", "competent",
- "complaind", "complained",
- "complaing", "complaining",
- "completen", "complement",
- "completey", "completely",
- "completin", "completion",
- "complians", "complains",
- "componant", "component",
- "comprable", "comparable",
- "compresas", "compress",
- "compreses", "compress",
- "compteurs", "computers",
- "comptuers", "computers",
- "computato", "computation",
- "comradets", "comrades",
- "comsetics", "cosmetics",
- "conanical", "canonical",
- "conatiner", "container",
- "concelaed", "concealed",
- "concelaer", "concealer",
- "concelear", "concealer",
- "concensus", "consensus",
- "conceptos", "concepts",
- "conceptul", "conceptual",
- "concernig", "concerning",
- "concertas", "concerts",
- "concevied", "conceived",
- "conciders", "considers",
- "concieted", "conceited",
- "concieved", "conceived",
- "conclusie", "conclusive",
- "concsious", "conscious",
- "concurret", "concurrent",
- "condamned", "condemned",
- "condemend", "condemned",
- "condemmed", "condemned",
- "condemnig", "condemning",
- "condenmed", "condemned",
- "condesend", "condensed",
- "condesned", "condensed",
- "condmened", "condemned",
- "conection", "connection",
- "conenctor", "connector",
- "conferene", "conferences",
- "confessin", "confession",
- "confideny", "confidently",
- "confilcts", "conflicts",
- "confimred", "confirmed",
- "confirmas", "confirms",
- "conflcits", "conflicts",
- "confrimed", "confirmed",
- "congitive", "cognitive",
- "conlcuded", "concluded",
- "connectes", "connects",
- "connectit", "connecticut",
- "connectos", "connectors",
- "conquerer", "conqueror",
- "consdider", "consider",
- "consensul", "consensual",
- "conserned", "concerned",
- "consicous", "conscious",
- "considerd", "considered",
- "considert", "considerate",
- "consisent", "consistent",
- "consistes", "consists",
- "consolato", "consolation",
- "consolide", "consolidate",
- "consonent", "consonant",
- "constanly", "constantly",
- "constanst", "constants",
- "constanty", "constantly",
- "constasnt", "constants",
- "constitue", "constitutes",
- "constrait", "constraints",
- "construcs", "constructs",
- "construde", "construed",
- "construst", "constructs",
- "constured", "construed",
- "consulant", "consultant",
- "consultat", "consultant",
- "consumate", "consummate",
- "contactes", "contacts",
- "contactos", "contacts",
- "contagios", "contagious",
- "containes", "contains",
- "containig", "containing",
- "containts", "contains",
- "contemple", "contemplate",
- "contendor", "contender",
- "contentas", "contents",
- "contentes", "contents",
- "contentos", "contents",
- "contestas", "contests",
- "contestat", "contestants",
- "contestes", "contests",
- "contextes", "contexts",
- "contextos", "contexts",
- "contianer", "container",
- "contibute", "contribute",
- "contigent", "contingent",
- "continant", "continental",
- "continens", "continents",
- "continous", "continuous",
- "continuos", "continuous",
- "continute", "continue",
- "contiunal", "continual",
- "contracto", "contraction",
- "contribue", "contribute",
- "contribuo", "contributor",
- "controlas", "controls",
- "controled", "controlled",
- "controles", "controls",
- "controlls", "controls",
- "convenant", "covenant",
- "convencen", "convenience",
- "conveniet", "convenient",
- "conversie", "converse",
- "conversin", "conversions",
- "convertie", "convertible",
- "convertis", "converts",
- "cooldwons", "cooldowns",
- "coordinar", "coordinator",
- "copenhagn", "copenhagen",
- "coprorate", "corporate",
- "copywrite", "copyright",
- "corcodile", "crocodile",
- "corparate", "corporate",
- "corproate", "corporate",
- "correclty", "correctly",
- "correctin", "correction",
- "correlato", "correlation",
- "corridoor", "corridor",
- "corruptin", "corruption",
- "corssfire", "crossfire",
- "corsshair", "crosshair",
- "corsspost", "crosspost",
- "coruching", "crouching",
- "cosemtics", "cosmetics",
- "costumise", "costumes",
- "counciles", "councils",
- "councills", "councils",
- "councilos", "councils",
- "countains", "contains",
- "counteres", "counters",
- "countires", "countries",
- "courching", "crouching",
- "courtesey", "courtesy",
- "courtesty", "courtesy",
- "coururier", "courier",
- "coutnered", "countered",
- "crapenter", "carpenter",
- "creativey", "creatively",
- "creedence", "credence",
- "crhistmas", "christmas",
- "cricketts", "crickets",
- "criminaly", "criminally",
- "critereon", "criterion",
- "criterias", "criteria",
- "criticaly", "critically",
- "criticies", "criticise",
- "criticisn", "criticising",
- "critisice", "criticise",
- "critisicm", "criticism",
- "critising", "criticising",
- "critisism", "criticism",
- "critisize", "criticise",
- "critizing", "criticizing",
- "crosshiar", "crosshair",
- "crossifre", "crossfire",
- "crticised", "criticised",
- "crusdaers", "crusaders",
- "crutchers", "crutches",
- "crystalls", "crystals",
- "crystalus", "crystals",
- "crystalys", "crystals",
- "cuacasian", "caucasian",
- "cuasality", "causality",
- "culitvate", "cultivate",
- "culturaly", "culturally",
- "culturels", "cultures",
- "curiostiy", "curiosity",
- "curisoity", "curiosity",
- "currenlty", "currently",
- "curriculm", "curriculum",
- "cursaders", "crusaders",
- "custcenes", "cutscenes",
- "cutsceens", "cutscenes",
- "cutscence", "cutscene",
- "cutsences", "cutscenes",
- "cyclinder", "cylinder",
- "cyclistes", "cyclists",
- "cylindres", "cylinders",
- "cynicisim", "cynicism",
- "dahsboard", "dashboard",
- "dalmation", "dalmatian",
- "dangeroys", "dangerously",
- "dashbaord", "dashboard",
- "daugthers", "daughters",
- "davantage", "advantage",
- "deadlfits", "deadlifts",
- "deadpoool", "deadpool",
- "dealershp", "dealerships",
- "deathmath", "deathmatch",
- "decalring", "declaring",
- "decendant", "descendant",
- "decendent", "descendant",
- "decipting", "depicting",
- "deciption", "depiction",
- "decisivie", "decisive",
- "declarase", "declares",
- "declarees", "declares",
- "decoratie", "decorative",
- "decoratin", "decorations",
- "decpetion", "deception",
- "decpetive", "deceptive",
- "decribing", "describing",
- "decsended", "descended",
- "deductibe", "deductible",
- "defaintly", "defiantly",
- "defaltion", "deflation",
- "defanitly", "defiantly",
- "defeintly", "definetly",
- "defendent", "defendant",
- "defensese", "defenseless",
- "defianlty", "defiantly",
- "deficeint", "deficient",
- "deficieny", "deficiency",
- "deficites", "deficits",
- "definance", "defiance",
- "definatey", "definately",
- "definatly", "definitely",
- "definetly", "definitely",
- "definetyl", "definetly",
- "definilty", "definitly",
- "definitie", "definitive",
- "definitin", "definitions",
- "definitly", "definitely",
- "definiton", "definition",
- "definitve", "definite",
- "definityl", "definitly",
- "definltey", "definetly",
- "defintaly", "defiantly",
- "defintily", "definitly",
- "defintion", "definition",
- "defintley", "definetly",
- "defitenly", "definetly",
- "defitinly", "definitly",
- "defitnaly", "defiantly",
- "defitnely", "definetly",
- "deflectin", "deflection",
- "defnietly", "definetly",
- "degeneret", "degenerate",
- "degradato", "degradation",
- "degradead", "degraded",
- "degrassie", "degrasse",
- "degrassse", "degrasse",
- "deifnetly", "definetly",
- "deifnitly", "definitly",
- "deisgners", "designers",
- "delagates", "delegates",
- "delcaring", "declaring",
- "delcining", "declining",
- "delegatie", "delegate",
- "delerious", "delirious",
- "delfation", "deflation",
- "deliveres", "delivers",
- "deliverys", "delivers",
- "delpoying", "deploying",
- "demcorats", "democrats",
- "deminsion", "dimension",
- "democarcy", "democracy",
- "democract", "democrat",
- "demonstre", "demonstrate",
- "denominar", "denominator",
- "dentistas", "dentists",
- "dentistes", "dentists",
- "deomcrats", "democrats",
- "deopsited", "deposited",
- "deparment", "department",
- "departmet", "departments",
- "depciting", "depicting",
- "depcition", "depiction",
- "depection", "deception",
- "depedency", "dependency",
- "depicitng", "depicting",
- "depiciton", "depiction",
- "deplyoing", "deploying",
- "depoisted", "deposited",
- "depolying", "deploying",
- "depositas", "deposits",
- "deposites", "deposits",
- "depositis", "deposits",
- "depositos", "deposits",
- "depostied", "deposited",
- "depressie", "depressive",
- "depressin", "depression",
- "depserate", "desperate",
- "depsoited", "deposited",
- "descirbes", "describes",
- "descision", "decision",
- "desginers", "designers",
- "desgining", "designing",
- "desicions", "decisions",
- "designade", "designated",
- "designato", "designation",
- "desingage", "disengage",
- "desingers", "designers",
- "desinging", "designing",
- "desktopos", "desktops",
- "desparate", "desperate",
- "desperato", "desperation",
- "despoited", "deposited",
- "desriable", "desirable",
- "dessigned", "designed",
- "destinato", "destination",
- "destoryed", "destroyed",
- "destoryer", "destroyer",
- "destroyes", "destroys",
- "destructo", "destruction",
- "destryoed", "destroyed",
- "destryoer", "destroyer",
- "desuction", "seduction",
- "detailled", "detailed",
- "detatched", "detached",
- "detectivs", "detectives",
- "deteriate", "deteriorate",
- "determing", "determining",
- "determins", "determines",
- "developrs", "develops",
- "diabetees", "diabetes",
- "diablical", "diabolical",
- "diagonaal", "diagonal",
- "diagonsed", "diagnosed",
- "diagonsis", "diagnosis",
- "diagramas", "diagrams",
- "diagramms", "diagrams",
- "dialectes", "dialects",
- "dialectos", "dialects",
- "diarrheoa", "diarrhea",
- "diasbling", "disabling",
- "dichomoty", "dichotomy",
- "dicovered", "discovered",
- "dictaters", "dictates",
- "dictionay", "dictionary",
- "difenitly", "definitly",
- "diferrent", "different",
- "differene", "differences",
- "differens", "differences",
- "differeny", "differently",
- "difficuly", "difficulty",
- "diffucult", "difficult",
- "dificulty", "difficulty",
- "diganosed", "diagnosed",
- "diganosis", "diagnosis",
- "dimenions", "dimensions",
- "dimention", "dimension",
- "dimesnion", "dimension",
- "diminishs", "diminishes",
- "dinasours", "dinosaurs",
- "dinosuars", "dinosaurs",
- "dinsoaurs", "dinosaurs",
- "dionsaurs", "dinosaurs",
- "diphtongs", "diphthongs",
- "dipthongs", "diphthongs",
- "direcotry", "directory",
- "directoty", "directory",
- "directroy", "directory",
- "disaprity", "disparity",
- "disastros", "disastrous",
- "disatrous", "disastrous",
- "disbaling", "disabling",
- "disbeleif", "disbelief",
- "disbelife", "disbelief",
- "disciplen", "disciplines",
- "disclamer", "disclaimer",
- "disclosue", "disclosure",
- "disconnet", "disconnect",
- "discosure", "discourse",
- "discoverd", "discovered",
- "discovere", "discoveries",
- "discredid", "discredited",
- "discribed", "described",
- "discribes", "describes",
- "discussin", "discussion",
- "diserable", "desirable",
- "disgarees", "disagrees",
- "disgiused", "disguised",
- "disgusied", "disguised",
- "disgustes", "disgusts",
- "disgustos", "disgusts",
- "disgustus", "disgusts",
- "dishonesy", "dishonesty",
- "dishonord", "dishonored",
- "disicples", "disciples",
- "dismantel", "dismantle",
- "dismisals", "dismissal",
- "disnegage", "disengage",
- "dispairty", "disparity",
- "dispalyed", "displayed",
- "dispartiy", "disparity",
- "dispenced", "dispensed",
- "dispeners", "dispenser",
- "displayes", "displays",
- "disruptin", "disruption",
- "dissapear", "disappear",
- "dissarray", "disarray",
- "dissmisal", "dismissal",
- "disspiate", "dissipate",
- "distincte", "distinctive",
- "distrcits", "districts",
- "distribue", "distributed",
- "distrubed", "disturbed",
- "distrupts", "distrust",
- "disturben", "disturbance",
- "diverisfy", "diversify",
- "diveristy", "diversity",
- "diverstiy", "diversity",
- "dividened", "dividend",
- "divinitiy", "divinity",
- "doccument", "document",
- "docrtines", "doctrines",
- "docuhebag", "douchebag",
- "dogdammit", "goddammit",
- "dogfather", "godfather",
- "dolphines", "dolphins",
- "domecracy", "democracy",
- "domecrats", "democrats",
- "domiantes", "dominates",
- "dominatin", "domination",
- "dominaton", "domination",
- "dominiant", "dominant",
- "donwgrade", "downgrade",
- "donwloads", "downloads",
- "donwsides", "downsides",
- "donwvoted", "downvoted",
- "donwvotes", "downvotes",
- "doublelit", "doublelift",
- "doucehbag", "douchebag",
- "downgarde", "downgrade",
- "downlaods", "downloads",
- "downloaad", "download",
- "downovted", "downvoted",
- "dravadian", "dravidian",
- "drummless", "drumless",
- "dsyphoria", "dysphoria",
- "dsytopian", "dystopian",
- "duaghters", "daughters",
- "duplicats", "duplicates",
- "durabiliy", "durability",
- "dynamicus", "dynamics",
- "dypshoria", "dysphoria",
- "dyshporia", "dysphoria",
- "dysoptian", "dystopian",
- "dysphoira", "dysphoria",
- "dysphroia", "dysphoria",
- "dyspohria", "dysphoria",
- "dyspotian", "dystopian",
- "dystopain", "dystopian",
- "dystpoian", "dystopian",
- "eachohter", "eachother",
- "eachotehr", "eachother",
- "eachtoher", "eachother",
- "earpluggs", "earplugs",
- "earthboud", "earthbound",
- "eastwoood", "eastwood",
- "eastwoord", "eastwood",
- "ecclectic", "eclectic",
- "ecomonics", "economics",
- "edficient", "deficient",
- "effecient", "efficient",
- "efficeint", "efficient",
- "efficency", "efficiency",
- "efficieny", "efficiency",
- "effulence", "effluence",
- "egalitara", "egalitarian",
- "egpytians", "egyptians",
- "egyptains", "egyptians",
- "egytpians", "egyptians",
- "ehtically", "ethically",
- "ehtnicity", "ethnicity",
- "eighteeen", "eighteen",
- "eitquette", "etiquette",
- "ejacualte", "ejaculate",
- "electivre", "elective",
- "electorns", "electrons",
- "electrial", "electrical",
- "electricy", "electricity",
- "electroal", "electoral",
- "elementay", "elementary",
- "elepahnts", "elephants",
- "eliminase", "eliminates",
- "eliminato", "elimination",
- "ellignton", "ellington",
- "ellingotn", "ellington",
- "eloquenty", "eloquently",
- "elsehwere", "elsewhere",
- "emapthize", "empathize",
- "embarress", "embarrassed",
- "emmisarry", "emissary",
- "emmisions", "emissions",
- "emmitting", "emitting",
- "empahsize", "emphasize",
- "emperical", "empirical",
- "emphaised", "emphasised",
- "emphatize", "empathize",
- "emphazise", "emphasize",
- "emphysyma", "emphysema",
- "empitness", "emptiness",
- "employeer", "employer",
- "employeur", "employer",
- "empolyees", "employees",
- "emtpiness", "emptiness",
- "emualtion", "emulation",
- "enahncing", "enhancing",
- "enchantig", "enchanting",
- "enclousre", "enclosure",
- "enclsoure", "enclosure",
- "encolsure", "enclosure",
- "encompase", "encompass",
- "encounted", "encountered",
- "encrpyted", "encrypted",
- "encrytped", "encrypted",
- "encyrpted", "encrypted",
- "endangerd", "endangered",
- "enevlopes", "envelopes",
- "enforcees", "enforces",
- "engagemet", "engagements",
- "engagment", "engagement",
- "engieneer", "engineer",
- "engineeer", "engineer",
- "engineerd", "engineered",
- "enhacning", "enhancing",
- "enhanceds", "enhances",
- "enligthen", "enlighten",
- "enourmous", "enormous",
- "ensconsed", "ensconced",
- "enthicity", "ethnicity",
- "enthusiam", "enthusiasm",
- "enthusiat", "enthusiast",
- "entirelly", "entirely",
- "entitlied", "entitled",
- "enveloppe", "envelope",
- "epidsodes", "episodes",
- "epilepsey", "epilepsy",
- "epiphanny", "epiphany",
- "episonage", "espionage",
- "epscially", "specially",
- "epsionage", "espionage",
- "eqautions", "equations",
- "equialent", "equivalent",
- "equivalet", "equivalents",
- "ermington", "remington",
- "erroenous", "erroneous",
- "escalatie", "escalate",
- "escalatin", "escalation",
- "esitmated", "estimated",
- "esitmates", "estimates",
- "eslewhere", "elsewhere",
- "especialy", "especially",
- "espianoge", "espionage",
- "espinoage", "espionage",
- "espoinage", "espionage",
- "esponiage", "espionage",
- "espressso", "espresso",
- "essencial", "essential",
- "essentail", "essential",
- "essentias", "essentials",
- "essentual", "essential",
- "essesital", "essential",
- "estiamted", "estimated",
- "estiamtes", "estimates",
- "estimatin", "estimation",
- "ethcially", "ethically",
- "ethincity", "ethnicity",
- "ethnicaly", "ethnically",
- "ethniticy", "ethnicity",
- "etmyology", "etymology",
- "euclidian", "euclidean",
- "euorpeans", "europeans",
- "euphoriac", "euphoric",
- "euphorica", "euphoria",
- "europenas", "europeans",
- "europians", "europeans",
- "eurpoeans", "europeans",
- "evangelia", "evangelical",
- "evelation", "elevation",
- "evenlopes", "envelopes",
- "eventally", "eventually",
- "eventualy", "eventually",
- "everthing", "everything",
- "evertyime", "everytime",
- "everwhere", "everywhere",
- "everyoens", "everyones",
- "everyteim", "everytime",
- "everytiem", "everytime",
- "everyting", "everything",
- "eveyrones", "everyones",
- "evreyones", "everyones",
- "evreytime", "everytime",
- "exagerate", "exaggerate",
- "exahusted", "exhausted",
- "exapnsive", "expansive",
- "exauhsted", "exhausted",
- "excahnges", "exchanges",
- "excecuted", "executed",
- "excecutes", "executes",
- "excellant", "excellent",
- "excercise", "exercise",
- "excerised", "exercised",
- "excerises", "exercises",
- "exceuting", "executing",
- "exchnages", "exchanges",
- "exclsuive", "exclusive",
- "excludeds", "excludes",
- "exclusivs", "exclusives",
- "exclusivy", "exclusivity",
- "excpetion", "exception",
- "exculding", "excluding",
- "exculsion", "exclusion",
- "exculsive", "exclusive",
- "execising", "exercising",
- "execption", "exception",
- "exectuing", "executing",
- "exectuion", "execution",
- "exectuive", "executive",
- "executabe", "executable",
- "exepmtion", "exemption",
- "exerbated", "exacerbated",
- "exercices", "exercise",
- "exerciese", "exercises",
- "exercizes", "exercise",
- "exersices", "exercises",
- "exhasuted", "exhausted",
- "exhaustin", "exhaustion",
- "exhibites", "exhibits",
- "exhibitin", "exhibition",
- "exhibtion", "exhibition",
- "exhuasted", "exhausted",
- "exibition", "exhibition",
- "existance", "existence",
- "existenta", "existential",
- "existince", "existence",
- "existnace", "existance",
- "exlcuding", "excluding",
- "exlcusion", "exclusion",
- "exlcusive", "exclusive",
- "exlpoding", "exploding",
- "exlporers", "explorers",
- "exlposion", "explosion",
- "exonorate", "exonerate",
- "expalined", "explained",
- "expanisve", "expansive",
- "expatriot", "expatriate",
- "expectany", "expectancy",
- "expection", "exception",
- "expemtion", "exemption",
- "experimet", "experiments",
- "explaines", "explains",
- "explainig", "explaining",
- "explaning", "explaining",
- "expliciet", "explicit",
- "explicity", "explicitly",
- "explictly", "explicitly",
- "explioted", "exploited",
- "explodeds", "explodes",
- "exploites", "exploits",
- "explorare", "explorer",
- "explotied", "exploited",
- "expolding", "exploding",
- "expolited", "exploited",
- "expolsion", "explosion",
- "expolsive", "explosive",
- "expressie", "expressive",
- "expressin", "expression",
- "exsitance", "existance",
- "extention", "extension",
- "exteriour", "exterior",
- "extermely", "extremely",
- "extermism", "extremism",
- "extermist", "extremist",
- "externaly", "externally",
- "extractin", "extraction",
- "extrapole", "extrapolate",
- "extreemly", "extremely",
- "extremers", "extremes",
- "extremley", "extremely",
- "extrotion", "extortion",
- "eyeballls", "eyeballs",
- "eyebrowes", "eyebrows",
- "eyebrowns", "eyebrows",
- "eyesahdow", "eyeshadow",
- "eyeshdaow", "eyeshadow",
- "eygptians", "egyptians",
- "eytmology", "etymology",
- "faceboook", "facebook",
- "faciliate", "facilitate",
- "facilites", "facilities",
- "facilitiy", "facility",
- "facinated", "fascinated",
- "facutally", "factually",
- "familiair", "familiar",
- "familiare", "familiarize",
- "familiary", "familiarity",
- "familliar", "familiar",
- "fanaticas", "fanatics",
- "fanaticos", "fanatics",
- "fanaticus", "fanatics",
- "fanatsies", "fantasies",
- "fanatsize", "fantasize",
- "fandation", "foundation",
- "fanservie", "fanservice",
- "fantazise", "fantasize",
- "farenheit", "fahrenheit",
- "fascistes", "fascists",
- "fashoined", "fashioned",
- "favorties", "favorites",
- "favoruite", "favourite",
- "favourits", "favourites",
- "favourtie", "favourite",
- "fedreally", "federally",
- "feminisim", "feminism",
- "feminsits", "feminists",
- "femminist", "feminist",
- "fesitvals", "festivals",
- "fetishers", "fetishes",
- "fightings", "fighting",
- "filetimes", "lifetimes",
- "filiament", "filament",
- "filmmakes", "filmmakers",
- "fingernal", "fingernails",
- "flashligt", "flashlight",
- "flavorade", "flavored",
- "flavoures", "flavours",
- "flavourus", "flavours",
- "flawlessy", "flawlessly",
- "flexibily", "flexibility",
- "fluctaute", "fluctuate",
- "flucutate", "fluctuate",
- "fluttersy", "fluttershy",
- "follwoing", "following",
- "foootball", "football",
- "forcefuly", "forcefully",
- "forcibley", "forcibly",
- "forciblly", "forcibly",
- "forearmes", "forearms",
- "foreginer", "foreigner",
- "foregroud", "foreground",
- "foreinger", "foreigner",
- "forgeiner", "foreigner",
- "forgiener", "foreigner",
- "forgivens", "forgiveness",
- "foriegner", "foreigner",
- "forigener", "foreigner",
- "formerlly", "formerly",
- "formualte", "formulate",
- "formulaes", "formulas",
- "formulars", "formulas",
- "forntline", "frontline",
- "forntpage", "frontpage",
- "fortuante", "fortunate",
- "forumlate", "formulate",
- "foundatin", "foundations",
- "fourteeen", "fourteen",
- "fractales", "fractals",
- "fractalis", "fractals",
- "fractalus", "fractals",
- "fragement", "fragment",
- "fragmenot", "fragment",
- "franchies", "franchise",
- "francsico", "francisco",
- "franscico", "francisco",
- "frecklers", "freckles",
- "freedomes", "freedoms",
- "freestlye", "freestyle",
- "freesytle", "freestyle",
- "fremented", "fermented",
- "freqeuncy", "frequency",
- "frequence", "frequencies",
- "friendlis", "friendlies",
- "frightend", "frightened",
- "fromation", "formation",
- "frontapge", "frontpage",
- "frontilne", "frontline",
- "frustrato", "frustration",
- "frustrats", "frustrates",
- "fucntions", "functions",
- "fullscren", "fullscreen",
- "funcitons", "functions",
- "functiong", "functioning",
- "functtion", "function",
- "furiosuly", "furiously",
- "furiuosly", "furiously",
- "futuristc", "futuristic",
- "gagnsters", "gangsters",
- "galations", "galatians",
- "galdiator", "gladiator",
- "gallaxies", "galaxies",
- "garanteed", "guaranteed",
- "garantees", "guarantees",
- "garuantee", "guarantee",
- "gatherins", "gatherings",
- "gauntelts", "gauntlets",
- "gauntlent", "gauntlet",
- "gaurantee", "guarantee",
- "gaurentee", "guarantee",
- "genatilia", "genitalia",
- "geneology", "genealogy",
- "generalbs", "generals",
- "generalis", "generals",
- "generaste", "generates",
- "generatie", "generate",
- "generatin", "generations",
- "generatos", "generators",
- "genitaila", "genitalia",
- "genitales", "genitals",
- "genitalis", "genitals",
- "geniunely", "genuinely",
- "gentailia", "genitalia",
- "gentelmen", "gentlemen",
- "gentialia", "genitalia",
- "genuienly", "genuinely",
- "genuinley", "genuinely",
- "geogrpahy", "geography",
- "germaniac", "germanic",
- "geurrilla", "guerrilla",
- "gimmickey", "gimmicky",
- "gimmickly", "gimmicky",
- "girlfried", "girlfriend",
- "goalkeepr", "goalkeeper",
- "godafther", "godfather",
- "godspeeed", "godspeed",
- "goegraphy", "geography",
- "goldfisch", "goldfish",
- "goosebums", "goosebumps",
- "gorvement", "goverment",
- "govemrent", "goverment",
- "govenment", "government",
- "goverance", "governance",
- "goveremnt", "goverment",
- "goverment", "government",
- "govermetn", "goverment",
- "govermnet", "goverment",
- "governmet", "governments",
- "govorment", "government",
- "govrement", "goverment",
- "gracefull", "graceful",
- "gracefuly", "gracefully",
- "graduaste", "graduates",
- "graduatin", "graduation",
- "grahpical", "graphical",
- "grativate", "gravitate",
- "graudally", "gradually",
- "graudates", "graduates",
- "greenalnd", "greenland",
- "grenaders", "grenades",
- "grpahical", "graphical",
- "guadulupe", "guadalupe",
- "guaranted", "guaranteed",
- "guarantes", "guarantees",
- "guardains", "guardians",
- "guarentee", "guarantee",
- "guaridans", "guardians",
- "guatamala", "guatemala",
- "guerrilas", "guerrillas",
- "guradians", "guardians",
- "guranteed", "guaranteed",
- "gurantees", "guarantees",
- "gutiarist", "guitarist",
- "habsbourg", "habsburg",
- "hairstlye", "hairstyle",
- "hairsytle", "hairstyle",
- "halarious", "hilarious",
- "hambruger", "hamburger",
- "hamburges", "hamburgers",
- "hamphsire", "hampshire",
- "hamsphire", "hampshire",
- "handboook", "handbook",
- "handedley", "handedly",
- "handedlly", "handedly",
- "handicape", "handicapped",
- "hapmshire", "hampshire",
- "happended", "happened",
- "happenend", "happened",
- "happenned", "happened",
- "harasment", "harassment",
- "hardenend", "hardened",
- "hardwoord", "hardwood",
- "haristyle", "hairstyle",
- "harrasing", "harassing",
- "harrassed", "harassed",
- "harrasses", "harassed",
- "hdinsight", "hindsight",
- "headahces", "headaches",
- "headhpone", "headphone",
- "headshoot", "headshot",
- "healither", "healthier",
- "healtheir", "healthier",
- "healthiet", "healthiest",
- "healthire", "healthier",
- "heapdhone", "headphone",
- "hedgehoog", "hedgehog",
- "hedgehorg", "hedgehog",
- "heightend", "heightened",
- "heirarchy", "hierarchy",
- "herculase", "hercules",
- "herculeas", "hercules",
- "herculees", "hercules",
- "herculeus", "hercules",
- "heriarchy", "hierarchy",
- "hesistant", "hesitant",
- "hesistate", "hesitate",
- "hesitatin", "hesitation",
- "hieroglph", "hieroglyph",
- "highschol", "highschool",
- "hindisght", "hindsight",
- "hindrence", "hindrance",
- "hinduisim", "hinduism",
- "hinduisum", "hinduism",
- "hipsanics", "hispanics",
- "hirearchy", "hierarchy",
- "hirsohima", "hiroshima",
- "hispancis", "hispanics",
- "hitboxers", "hitboxes",
- "hoepfully", "hopefully",
- "holocasut", "holocaust",
- "holocuast", "holocaust",
- "homeonwer", "homeowner",
- "homeopaty", "homeopathy",
- "homewolrd", "homeworld",
- "homewoner", "homeowner",
- "homewrold", "homeworld",
- "homogenes", "homogeneous",
- "homosexul", "homosexuals",
- "hopelessy", "hopelessly",
- "hopsitals", "hospitals",
- "horishima", "hiroshima",
- "horizones", "horizons",
- "horizonts", "horizons",
- "horrendos", "horrendous",
- "horribley", "horribly",
- "horriblly", "horribly",
- "horrifing", "horrifying",
- "hositlity", "hostility",
- "hospitaly", "hospitality",
- "hosptials", "hospitals",
- "hourgalss", "hourglass",
- "hourlgass", "hourglass",
- "househols", "households",
- "humanitis", "humanities",
- "humanoind", "humanoid",
- "humiditiy", "humidity",
- "hunagrian", "hungarian",
- "hurriance", "hurricane",
- "hurricans", "hurricanes",
- "husbandos", "husbands",
- "hydraluic", "hydraulic",
- "hydropile", "hydrophile",
- "hydropobe", "hydrophobe",
- "hydrualic", "hydraulic",
- "hyopcrite", "hypocrite",
- "hypcorite", "hypocrite",
- "hyperoble", "hyperbole",
- "hypocracy", "hypocrisy",
- "hypocrasy", "hypocrisy",
- "hypocricy", "hypocrisy",
- "hypocriet", "hypocrite",
- "hypocrits", "hypocrites",
- "hyporcite", "hypocrite",
- "hypothess", "hypotheses",
- "hyprocisy", "hypocrisy",
- "hyprocite", "hypocrite",
- "hyrdation", "hydration",
- "hyrdaulic", "hydraulic",
- "hysterica", "hysteria",
- "hysteriia", "hysteria",
- "iburpofen", "ibuprofen",
- "icleandic", "icelandic",
- "icongnito", "incognito",
- "idealisim", "idealism",
- "idealistc", "idealistic",
- "identifiy", "identify",
- "ideologis", "ideologies",
- "ignornace", "ignorance",
- "illegales", "illegals",
- "illegalis", "illegals",
- "illegalls", "illegals",
- "illnesess", "illnesses",
- "illsuions", "illusions",
- "illuminai", "illuminati",
- "imagenary", "imaginary",
- "imaginery", "imaginary",
- "imaptient", "impatient",
- "imigrated", "emigrated",
- "immensley", "immensely",
- "immerisve", "immersive",
- "immesnely", "immensely",
- "immidiate", "immediate",
- "immigrato", "immigration",
- "immitated", "imitated",
- "immitator", "imitator",
- "immobilie", "immobile",
- "immobille", "immobile",
- "immobilze", "immobile",
- "immortaly", "immortality",
- "immserive", "immersive",
- "impaitent", "impatient",
- "imparital", "impartial",
- "impedence", "impedance",
- "implantes", "implants",
- "implicati", "implicit",
- "impliciet", "implicit",
- "implicity", "implicitly",
- "impliment", "implement",
- "implusive", "impulsive",
- "importamt", "important",
- "importend", "imported",
- "imporving", "improving",
- "impossibe", "impossible",
- "imprefect", "imperfect",
- "impressin", "impressions",
- "imprioned", "imprisoned",
- "improbabe", "improbable",
- "impulisve", "impulsive",
- "impuslive", "impulsive",
- "imrpoving", "improving",
- "inadequet", "inadequate",
- "inadquate", "inadequate",
- "inaugures", "inaugurates",
- "inbalance", "imbalance",
- "inbeetwen", "inbetween",
- "inbetween", "between",
- "inbewteen", "inbetween",
- "incarnato", "incarnation",
- "incgonito", "incognito",
- "inclinato", "inclination",
- "includeds", "includes",
- "incoginto", "incognito",
- "incongito", "incognito",
- "incorpore", "incorporate",
- "incpetion", "inception",
- "incredibe", "incredible",
- "incrediby", "incredibly",
- "inculding", "including",
- "incunabla", "incunabula",
- "indicaste", "indicates",
- "indicatie", "indicative",
- "indicence", "incidence",
- "indicents", "incidents",
- "indigenos", "indigenous",
- "indirecty", "indirectly",
- "indisious", "insidious",
- "individul", "individual",
- "individus", "individuals",
- "indoensia", "indonesia",
- "indoneisa", "indonesia",
- "indutrial", "industrial",
- "inersting", "inserting",
- "inexpense", "inexpensive",
- "infallibe", "infallible",
- "inferioir", "inferior",
- "inferiour", "inferior",
- "infestato", "infestation",
- "infiltrar", "infiltrator",
- "infinitey", "infinity",
- "infinitie", "infinite",
- "infinitiy", "infinity",
- "infinitly", "infinity",
- "inflatabe", "inflatable",
- "influense", "influences",
- "influenta", "influential",
- "informate", "informative",
- "infraread", "infrared",
- "ingeniuty", "ingenuity",
- "ingeunity", "ingenuity",
- "ingocnito", "incognito",
- "ingorance", "ignorance",
- "inguenity", "ingenuity",
- "inhabitat", "inhabitants",
- "inheirted", "inherited",
- "inhertied", "inherited",
- "initailly", "initially",
- "initalese", "initialese",
- "initaling", "initialing",
- "initalise", "initialise",
- "initalism", "initialism",
- "initalize", "initialize",
- "initalled", "initialled",
- "initation", "initiation",
- "initiales", "initials",
- "initiatie", "initiatives",
- "initiatin", "initiation",
- "initiatve", "initiate",
- "injustics", "injustices",
- "inlcuding", "including",
- "inmigrant", "immigrant",
- "innoucous", "innocuous",
- "innovatin", "innovations",
- "innovatve", "innovate",
- "inpection", "inception",
- "inpending", "impending",
- "inproving", "improving",
- "inpsector", "inspector",
- "inpsiring", "inspiring",
- "inquisito", "inquisition",
- "inquisitr", "inquisitor",
- "inresting", "inserting",
- "insanelly", "insanely",
- "insepctor", "inspector",
- "insidiuos", "insidious",
- "insipring", "inspiring",
- "insluated", "insulated",
- "inspectin", "inspection",
- "instabilt", "instability",
- "installes", "installs",
- "installus", "installs",
- "instering", "inserting",
- "insticnts", "instincts",
- "institude", "instituted",
- "instituto", "institution",
- "insualted", "insulated",
- "insurence", "insurance",
- "insurgeny", "insurgency",
- "integirty", "integrity",
- "integraal", "integral",
- "integrade", "integrated",
- "integrato", "integration",
- "intenisty", "intensity",
- "intensley", "intensely",
- "interacte", "interactive",
- "interents", "internets",
- "interesat", "interest",
- "interesst", "interests",
- "interewbs", "interwebs",
- "interfase", "interfaces",
- "interfeer", "interfere",
- "interfers", "interferes",
- "intergate", "integrate",
- "intergity", "integrity",
- "interiour", "interior",
- "internest", "internets",
- "interpert", "interpret",
- "interprut", "interrupt",
- "interrups", "interrupts",
- "interstae", "interstate",
- "interveen", "intervene",
- "intervied", "interviewed",
- "intervier", "interviewer",
- "intervies", "interviews",
- "intesnely", "intensely",
- "intesnity", "intensity",
- "intestins", "intestines",
- "inticrate", "intricate",
- "intimidad", "intimidated",
- "intircate", "intricate",
- "intiution", "intuition",
- "intiutive", "intuitive",
- "intorduce", "introduce",
- "intorvert", "introvert",
- "intracite", "intricate",
- "intrduced", "introduced",
- "intregity", "integrity",
- "intrenets", "internets",
- "intrepret", "interpret",
- "intrerupt", "interrupt",
- "intrewebs", "interwebs",
- "intrinisc", "intrinsic",
- "intrisinc", "intrinsic",
- "intrisnic", "intrinsic",
- "intriuged", "intrigued",
- "introdued", "introduced",
- "introduse", "introduces",
- "introvers", "introverts",
- "intruiged", "intrigued",
- "intrument", "instrument",
- "inutition", "intuition",
- "inutitive", "intuitive",
- "invaderas", "invaders",
- "invalidas", "invalidates",
- "inventios", "inventions",
- "investige", "investigate",
- "investmet", "investments",
- "invincibe", "invincible",
- "invloving", "involving",
- "invovling", "involving",
- "ipubrofen", "ibuprofen",
- "iranianos", "iranians",
- "irelevent", "irrelevant",
- "ironicaly", "ironically",
- "irritatie", "irritate",
- "irritatin", "irritation",
- "isalmists", "islamists",
- "isalnders", "islanders",
- "islamiskt", "islamist",
- "islamsits", "islamists",
- "islmaists", "islamists",
- "isntaller", "installer",
- "isntances", "instances",
- "isntantly", "instantly",
- "israelies", "israelis",
- "israelits", "israelis",
- "italianas", "italians",
- "italianos", "italians",
- "jailbrake", "jailbreak",
- "jalibreak", "jailbreak",
- "jamaicain", "jamaican",
- "jersualem", "jerusalem",
- "jeruselam", "jerusalem",
- "jeruslaem", "jerusalem",
- "journalis", "journals",
- "judegment", "judgement",
- "judgemant", "judgemental",
- "judisuary", "judiciary",
- "jugdement", "judgement",
- "juggernat", "juggernaut",
- "juvenille", "juvenile",
- "keneysian", "keynesian",
- "kentuckey", "kentucky",
- "kenyesian", "keynesian",
- "keybaords", "keyboards",
- "keyensian", "keynesian",
- "keyesnian", "keynesian",
- "keynseian", "keynesian",
- "keysenian", "keynesian",
- "kilometes", "kilometers",
- "kindapped", "kidnapped",
- "kncokback", "knockback",
- "knoweldge", "knowledge",
- "knowlegde", "knowledge",
- "konckback", "knockback",
- "kryptonie", "kryptonite",
- "labirynth", "labyrinth",
- "laboratoy", "laboratory",
- "laboreres", "laborers",
- "labratory", "laboratory",
- "labriynth", "labyrinth",
- "labryinth", "labyrinth",
- "labyrnith", "labyrinth",
- "landscaps", "landscapes",
- "landscspe", "landscapes",
- "langauges", "languages",
- "languague", "language",
- "lanuchers", "launchers",
- "lanugages", "languages",
- "larington", "arlington",
- "latitudie", "latitude",
- "lattitude", "latitude",
- "laucnhers", "launchers",
- "laucnhing", "launching",
- "launchign", "launching",
- "laybrinth", "labyrinth",
- "lebanesse", "lebanese",
- "leceister", "leicester",
- "leciester", "leicester",
- "legitmate", "legitimate",
- "legnedary", "legendary",
- "lesbianas", "lesbians",
- "lesbianus", "lesbians",
- "letivicus", "leviticus",
- "leutenant", "lieutenant",
- "levaithan", "leviathan",
- "levellign", "levelling",
- "levetated", "levitated",
- "levetates", "levitates",
- "levicitus", "leviticus",
- "levleling", "levelling",
- "lfiesteal", "lifesteal",
- "liberales", "liberals",
- "liberalim", "liberalism",
- "liberalis", "liberals",
- "liberatin", "liberation",
- "libraires", "libraries",
- "liecester", "leicester",
- "lieuenant", "lieutenant",
- "lieutenat", "lieutenant",
- "lifespawn", "lifespan",
- "lifestlye", "lifestyle",
- "lighnting", "lightning",
- "lightnign", "lightning",
- "ligthning", "lightning",
- "ligthroom", "lightroom",
- "lingerine", "lingerie",
- "lispticks", "lipsticks",
- "listenend", "listened",
- "literarly", "literary",
- "literarry", "literary",
- "literatre", "literate",
- "literatue", "literate",
- "literture", "literature",
- "lithaunia", "lithuania",
- "lithuaina", "lithuania",
- "lithuiana", "lithuania",
- "lithunaia", "lithuania",
- "litigatin", "litigation",
- "lituhania", "lithuania",
- "liveprool", "liverpool",
- "livestrem", "livestream",
- "lobbysits", "lobbyists",
- "lockscren", "lockscreen",
- "logisitcs", "logistics",
- "logsitics", "logistics",
- "loiusiana", "louisiana",
- "lollipoop", "lollipop",
- "louisvile", "louisville",
- "luanchers", "launchers",
- "luanching", "launching",
- "lubicrant", "lubricant",
- "lubircant", "lubricant",
- "ludcrious", "ludicrous",
- "ludricous", "ludicrous",
- "lunaticos", "lunatics",
- "lunaticus", "lunatics",
- "macaronni", "macaroni",
- "maestries", "masteries",
- "magainzes", "magazines",
- "magensium", "magnesium",
- "magincian", "magician",
- "magintude", "magnitude",
- "magneisum", "magnesium",
- "magnesuim", "magnesium",
- "magnifine", "magnificent",
- "mainfesto", "manifesto",
- "mainfests", "manifests",
- "mainstrem", "mainstream",
- "maintaing", "maintaining",
- "maintance", "maintenance",
- "maintians", "maintains",
- "mairjuana", "marijuana",
- "malasyian", "malaysian",
- "malayisan", "malaysian",
- "malaysain", "malaysian",
- "maletonin", "melatonin",
- "maltesian", "maltese",
- "malyasian", "malaysian",
- "managable", "manageable",
- "managment", "management",
- "mandarian", "mandarin",
- "mandarijn", "mandarin",
- "mandarion", "mandarin",
- "maneouvre", "manoeuvre",
- "maneuveur", "maneuver",
- "maneveurs", "maneuvers",
- "manfiesto", "manifesto",
- "manfiests", "manifests",
- "mangesium", "magnesium",
- "mangitude", "magnitude",
- "manouvers", "maneuvers",
- "mantained", "maintained",
- "manuevers", "maneuvers",
- "maraudeur", "marauder",
- "marevlous", "marvelous",
- "margarent", "margaret",
- "margarite", "margaret",
- "marginaal", "marginal",
- "marginaly", "marginally",
- "marijauna", "marijuana",
- "marineras", "mariners",
- "marineris", "mariners",
- "marineros", "mariners",
- "marjiuana", "marijuana",
- "marjority", "majority",
- "marmelade", "marmalade",
- "marrtyred", "martyred",
- "massagens", "massages",
- "massivley", "massively",
- "masteires", "masteries",
- "mastereis", "masteries",
- "masterise", "masteries",
- "mastermid", "mastermind",
- "mastieres", "masteries",
- "masturbae", "masturbated",
- "materiaal", "material",
- "matierals", "materials",
- "mattreses", "mattress",
- "mayalsian", "malaysian",
- "maylasian", "malaysian",
- "mccarthey", "mccarthy",
- "mecahnics", "mechanics",
- "mecernary", "mercenary",
- "mechancis", "mechanics",
- "mechanims", "mechanism",
- "mechaninc", "mechanic",
- "mechansim", "mechanism",
- "medicince", "medicine",
- "mediciney", "mediciny",
- "meditatie", "meditate",
- "meditatin", "meditation",
- "megathred", "megathread",
- "melanotin", "melatonin",
- "melborune", "melbourne",
- "melbounre", "melbourne",
- "membrance", "membrane",
- "menstraul", "menstrual",
- "menstural", "menstrual",
- "mensutral", "menstrual",
- "mentiones", "mentions",
- "mercanery", "mercenary",
- "merhcants", "merchants",
- "messagers", "messages",
- "messanger", "messenger",
- "metabloic", "metabolic",
- "metalurgy", "metallurgy",
- "methaphor", "metaphor",
- "methapors", "metaphors",
- "methodoly", "methodology",
- "metropols", "metropolis",
- "mexicanas", "mexicans",
- "mexicants", "mexicans",
- "mexicanus", "mexicans",
- "michellle", "michelle",
- "micorwave", "microwave",
- "micoscopy", "microscopy",
- "microphen", "microphone",
- "migrantes", "migrants",
- "migrianes", "migraines",
- "milawukee", "milwaukee",
- "milennium", "millennium",
- "milestons", "milestones",
- "militians", "militias",
- "millenial", "millennial",
- "millenian", "millennia",
- "millenium", "millennium",
- "millionar", "millionaire",
- "millitary", "military",
- "miluwakee", "milwaukee",
- "milwakuee", "milwaukee",
- "milwuakee", "milwaukee",
- "mindcarck", "mindcrack",
- "mindlessy", "mindlessly",
- "minerales", "minerals",
- "minisclue", "miniscule",
- "miniscuel", "miniscule",
- "ministery", "ministry",
- "minisucle", "miniscule",
- "minitaure", "miniature",
- "minituare", "miniature",
- "minneosta", "minnesota",
- "minnestoa", "minnesota",
- "minsicule", "miniscule",
- "minsiters", "ministers",
- "minstries", "ministries",
- "miraculos", "miraculous",
- "mircowave", "microwave",
- "mirrorred", "mirrored",
- "miserabel", "miserable",
- "mispelled", "misspelled",
- "misreable", "miserable",
- "misreably", "miserably",
- "missisipi", "mississippi",
- "missonary", "missionary",
- "missourri", "missouri",
- "misspelld", "misspelled",
- "mobilitiy", "mobility",
- "moderatey", "moderately",
- "moderatin", "moderation",
- "modifires", "modifiers",
- "moelcules", "molecules",
- "moleclues", "molecules",
- "molestare", "molester",
- "molestato", "molestation",
- "molesterd", "molested",
- "monestary", "monastery",
- "monitores", "monitors",
- "monolgoue", "monologue",
- "monolight", "moonlight",
- "monolouge", "monologue",
- "monopolis", "monopolies",
- "monopolly", "monopoly",
- "monopoloy", "monopoly",
- "monserrat", "montserrat",
- "monstorus", "monstrous",
- "monstruos", "monstrous",
- "montanous", "mountainous",
- "monumnets", "monuments",
- "moratlity", "mortality",
- "morbidley", "morbidly",
- "morgatges", "mortgages",
- "morgtages", "mortgages",
- "morisette", "morissette",
- "mormonsim", "mormonism",
- "morroccan", "moroccan",
- "mortailty", "mortality",
- "mosquitto", "mosquito",
- "motivatie", "motivate",
- "motivatin", "motivations",
- "motorcyce", "motorcycles",
- "motorolja", "motorola",
- "motoroloa", "motorola",
- "moustahce", "moustache",
- "movepseed", "movespeed",
- "mozzarela", "mozzarella",
- "mucisians", "musicians",
- "mulitated", "mutilated",
- "mulitples", "multiples",
- "multipled", "multiplied",
- "multplies", "multiples",
- "murdererd", "murdered",
- "muscially", "musically",
- "muscician", "musician",
- "musculair", "muscular",
- "mushrooom", "mushroom",
- "musicains", "musicians",
- "mutatiohn", "mutation",
- "mutialted", "mutilated",
- "mutilatin", "mutilation",
- "mutliated", "mutilated",
- "mutliples", "multiples",
- "mutlitude", "multitude",
- "mysterise", "mysteries",
- "mysterous", "mysterious",
- "nacrotics", "narcotics",
- "naferious", "nefarious",
- "nahsville", "nashville",
- "narcissim", "narcissism",
- "narcissit", "narcissist",
- "narcissts", "narcissist",
- "narctoics", "narcotics",
- "nasvhille", "nashville",
- "nationaal", "national",
- "nationaly", "nationally",
- "nativelly", "natively",
- "natrually", "naturally",
- "navigatie", "navigate",
- "navigatin", "navigation",
- "neccesary", "necessary",
- "necessite", "necessities",
- "neckbears", "neckbeards",
- "neckbread", "neckbeard",
- "nedlessly", "endlessly",
- "needlessy", "needlessly",
- "negiotate", "negotiate",
- "negociate", "negotiate",
- "negoitate", "negotiate",
- "neigbhour", "neighbour",
- "neigbours", "neighbours",
- "neighboor", "neighbor",
- "nessecary", "necessary",
- "newcaslte", "newcastle",
- "newcastel", "newcastle",
- "nieghbour", "neighbour",
- "nightfa;;", "nightfall",
- "nightlcub", "nightclub",
- "nigthclub", "nightclub",
- "nigthlife", "nightlife",
- "nigthmare", "nightmare",
- "nihilisim", "nihilism",
- "ninteenth", "nineteenth",
- "nominatie", "nominate",
- "nominatin", "nomination",
- "noninital", "noninitial",
- "norhteast", "northeast",
- "norhtwest", "northwest",
- "normanday", "normandy",
- "northeren", "northern",
- "norwegain", "norwegian",
- "norwiegan", "norwegian",
- "nostaglia", "nostalgia",
- "nostaglic", "nostalgic",
- "nostaliga", "nostalgia",
- "nostaligc", "nostalgic",
- "nostlagia", "nostalgia",
- "nostlagic", "nostalgic",
- "nostriles", "nostrils",
- "nostrills", "nostrils",
- "notacible", "noticable",
- "notciable", "noticable",
- "noteboook", "notebook",
- "noteriety", "notoriety",
- "noteworty", "noteworthy",
- "noticable", "noticeable",
- "noticably", "noticeably",
- "noticalbe", "noticable",
- "noticeing", "noticing",
- "noticible", "noticeable",
- "notoroius", "notorious",
- "novermber", "november",
- "nullabour", "nullarbor",
- "numberous", "numerous",
- "numercial", "numerical",
- "numerious", "numerous",
- "nuremburg", "nuremberg",
- "nurtients", "nutrients",
- "nutirents", "nutrients",
- "nutreints", "nutrients",
- "nutritent", "nutrient",
- "nutritian", "nutritional",
- "nutritios", "nutritious",
- "obediance", "obedience",
- "obeidence", "obedience",
- "obersvant", "observant",
- "obersvers", "observers",
- "obesssion", "obsession",
- "obiedence", "obedience",
- "obivously", "obviously",
- "objectivs", "objectives",
- "objectivy", "objectivity",
- "obscruity", "obscurity",
- "obscuirty", "obscurity",
- "observare", "observer",
- "observerd", "observed",
- "obssesion", "obsession",
- "obssesive", "obsessive",
- "obssessed", "obsessed",
- "obstruced", "obstructed",
- "obsucrity", "obscurity",
- "obtainabe", "obtainable",
- "obviosuly", "obviously",
- "obvioulsy", "obviously",
- "obvisouly", "obviously",
- "obvoiusly", "obviously",
- "ocasional", "occasional",
- "ocasioned", "occasioned",
- "ocassions", "occasions",
- "occaisons", "occasions",
- "occassion", "occasion",
- "occurance", "occurrence",
- "occurence", "occurrence",
- "octohedra", "octahedra",
- "ocuntries", "countries",
- "ocurrance", "occurrence",
- "ocurrence", "occurrence",
- "offcially", "officially",
- "offically", "officially",
- "officialy", "officially",
- "offpsring", "offspring",
- "offspirng", "offspring",
- "offsrping", "offspring",
- "ogliarchy", "oligarchy",
- "oilgarchy", "oligarchy",
- "oligrachy", "oligarchy",
- "ommitting", "omitting",
- "onlsaught", "onslaught",
- "onsalught", "onslaught",
- "onslaugth", "onslaught",
- "onsluaght", "onslaught",
- "onwership", "ownership",
- "opiniones", "opinions",
- "oposition", "opposition",
- "opponenet", "opponent",
- "opposiste", "opposites",
- "opposties", "opposites",
- "oppressin", "oppression",
- "opression", "oppression",
- "opressive", "oppressive",
- "opthalmic", "ophthalmic",
- "optimisim", "optimism",
- "optimistc", "optimistic",
- "optinally", "optimally",
- "oragnered", "orangered",
- "oragnised", "organised",
- "oragnizer", "organizer",
- "orcehstra", "orchestra",
- "ordinarly", "ordinary",
- "orgainsed", "organised",
- "orgainzer", "organizer",
- "organered", "orangered",
- "organices", "organise",
- "organisim", "organism",
- "organiske", "organise",
- "organiste", "organise",
- "organites", "organise",
- "organizms", "organism",
- "organsied", "organised",
- "organsims", "organisms",
- "organzier", "organizer",
- "orginally", "originally",
- "orgnaised", "organised",
- "orhcestra", "orchestra",
- "orientato", "orientation",
- "origanaly", "originally",
- "originall", "original",
- "originalt", "originality",
- "originaly", "originally",
- "origintea", "originate",
- "origional", "original",
- "orignally", "originally",
- "orignials", "originals",
- "oublisher", "publisher",
- "oursleves", "ourselves",
- "oustiders", "outsiders",
- "oustpoken", "outspoken",
- "outisders", "outsiders",
- "outnumbed", "outnumbered",
- "outpalyed", "outplayed",
- "outperfom", "outperform",
- "outpsoken", "outspoken",
- "outrageos", "outrageous",
- "outskirst", "outskirts",
- "outskrits", "outskirts",
- "outwieghs", "outweighs",
- "overbaord", "overboard",
- "overclcok", "overclock",
- "overdirve", "overdrive",
- "overhpyed", "overhyped",
- "overhwelm", "overwhelm",
- "overlcock", "overclock",
- "overloard", "overload",
- "overpaied", "overpaid",
- "overpowed", "overpowered",
- "overriden", "overridden",
- "overwhlem", "overwhelm",
- "overwirte", "overwrite",
- "overwtach", "overwatch",
- "overyhped", "overhyped",
- "owernship", "ownership",
- "pacificts", "pacifist",
- "packageid", "packaged",
- "pactivity", "captivity",
- "painkills", "painkillers",
- "paitently", "patiently",
- "paitience", "patience",
- "pakistain", "pakistani",
- "pakistian", "pakistani",
- "pakistnai", "pakistani",
- "paksitani", "pakistani",
- "paladines", "paladins",
- "paladinos", "paladins",
- "palestein", "palestine",
- "palestina", "palestinian",
- "palistian", "palestinian",
- "paltforms", "platforms",
- "palystyle", "playstyle",
- "pancakers", "pancakes",
- "pantomine", "pantomime",
- "paradimes", "paradise",
- "paragraps", "paragraphs",
- "paragrpah", "paragraph",
- "paralells", "parallels",
- "paralelly", "parallelly",
- "paralisys", "paralysis",
- "parallely", "parallelly",
- "paralzyed", "paralyzed",
- "paramedis", "paramedics",
- "paramters", "parameters",
- "paranoica", "paranoia",
- "paranoida", "paranoia",
- "parasties", "parasites",
- "paraylsis", "paralysis",
- "paraylzed", "paralyzed",
- "parellels", "parallels",
- "paricular", "particular",
- "parisitic", "parasitic",
- "paritally", "partially",
- "parliment", "parliament",
- "parmesaen", "parmesan",
- "parntered", "partnered",
- "parrallel", "parallel",
- "partchett", "pratchett",
- "parterned", "partnered",
- "participe", "participate",
- "partiotic", "patriotic",
- "partisain", "partisan",
- "pasengers", "passengers",
- "passagens", "passages",
- "passagers", "passages",
- "passerbys", "passersby",
- "passiones", "passions",
- "passivley", "passively",
- "passowrds", "passwords",
- "pateintly", "patiently",
- "paticular", "particular",
- "patinetly", "patiently",
- "patriarca", "patriarchal",
- "patriarcy", "patriarchy",
- "patriotas", "patriots",
- "patriotes", "patriots",
- "patroitic", "patriotic",
- "pattented", "patented",
- "pavillion", "pavilion",
- "pbulisher", "publisher",
- "peacefuly", "peacefully",
- "pedohpile", "pedophile",
- "pedophila", "pedophilia",
- "pedophils", "pedophiles",
- "peircings", "piercings",
- "penalites", "penalties",
- "penatlies", "penalties",
- "penduluum", "pendulum",
- "penerator", "penetrator",
- "penguines", "penguins",
- "penguings", "penguins",
- "penguinos", "penguins",
- "peninsual", "peninsula",
- "peninusla", "peninsula",
- "penisnula", "peninsula",
- "penisular", "peninsular",
- "pennisula", "peninsula",
- "pensinula", "peninsula",
- "pentagoon", "pentagon",
- "peodphile", "pedophile",
- "pepperino", "pepperoni",
- "peppermit", "peppermint",
- "percepted", "perceived",
- "percevied", "perceived",
- "percieved", "perceived",
- "percisely", "precisely",
- "percision", "precision",
- "percursor", "precursor",
- "perdators", "predators",
- "peremiter", "perimeter",
- "perfeclty", "perfectly",
- "perfomers", "performers",
- "performas", "performs",
- "perfromer", "performer",
- "pericings", "piercings",
- "perimetre", "perimeter",
- "peristent", "persistent",
- "periwinke", "periwinkle",
- "permanant", "permanent",
- "permature", "premature",
- "permenant", "permanent",
- "permieter", "perimeter",
- "permissie", "permissible",
- "permissin", "permissions",
- "permisson", "permission",
- "pernament", "permanent",
- "perorders", "preorders",
- "perpetrar", "perpetrator",
- "perpetuae", "perpetuate",
- "perpetuas", "perpetuates",
- "persauded", "persuaded",
- "perscribe", "prescribe",
- "perserved", "preserved",
- "persistes", "persists",
- "personaes", "personas",
- "personaly", "personally",
- "personell", "personnel",
- "personhod", "personhood",
- "persuated", "persuade",
- "pertended", "pretended",
- "pertoleum", "petroleum",
- "perusaded", "persuaded",
- "pervertes", "perverse",
- "pesticids", "pesticides",
- "petroluem", "petroleum",
- "phemonena", "phenomena",
- "phenemona", "phenomena",
- "phenonema", "phenomena",
- "phillipse", "phillies",
- "philosopy", "philosophy",
- "philosphy", "philosophy",
- "phonecian", "phoenecian",
- "phonemena", "phenomena",
- "phongraph", "phonograph",
- "photograh", "photograph",
- "phsyician", "physician",
- "phsyicist", "physicist",
- "phycisian", "physician",
- "phycisist", "physicist",
- "physicaly", "physically",
- "physicits", "physicist",
- "physisict", "physicist",
- "piblisher", "publisher",
- "picthfork", "pitchfork",
- "pinetrest", "pinterest",
- "placeheld", "placeholder",
- "placemens", "placements",
- "plaestine", "palestine",
- "plagarism", "plagiarism",
- "planatery", "planetary",
- "planation", "plantation",
- "planteary", "planetary",
- "plasticas", "plastics",
- "plasticos", "plastics",
- "plasticus", "plastics",
- "platfroms", "platforms",
- "platofrms", "platforms",
- "plausable", "plausible",
- "plausbile", "plausible",
- "plausibel", "plausible",
- "playgroud", "playground",
- "playright", "playwright",
- "playstlye", "playstyle",
- "playwrite", "playwright",
- "plebicite", "plebiscite",
- "plethoria", "plethora",
- "ploarized", "polarized",
- "pointeres", "pointers",
- "polinator", "pollinator",
- "polishees", "polishes",
- "politelly", "politely",
- "politican", "politician",
- "politicas", "politics",
- "politicin", "politician",
- "politicus", "politics",
- "polygammy", "polygamy",
- "populatin", "populations",
- "poralized", "polarized",
- "porcelian", "porcelain",
- "porcelina", "porcelain",
- "poreclain", "porcelain",
- "porftolio", "portfolio",
- "porgramme", "programme",
- "portfoilo", "portfolio",
- "portoflio", "portfolio",
- "portraing", "portraying",
- "portrayes", "portrays",
- "portrayls", "portrays",
- "portriats", "portraits",
- "portugese", "portuguese",
- "portugues", "portuguese",
- "posessing", "possessing",
- "posession", "possession",
- "positiond", "positioned",
- "positiong", "positioning",
- "positionl", "positional",
- "positiviy", "positivity",
- "possesess", "possesses",
- "possesing", "possessing",
- "possesion", "possession",
- "possessin", "possessions",
- "possibile", "possible",
- "possibily", "possibility",
- "possibley", "possibly",
- "possiblly", "possibly",
- "possition", "position",
- "powderade", "powdered",
- "powerfull", "powerful",
- "pracitcal", "practical",
- "practhett", "pratchett",
- "practicly", "practically",
- "practives", "practise",
- "pragamtic", "pragmatic",
- "preadtors", "predators",
- "precedeed", "preceded",
- "preceeded", "preceded",
- "preceived", "perceived",
- "preciesly", "precisely",
- "precisley", "precisely",
- "precurors", "precursor",
- "precurosr", "precursor",
- "precurser", "precursor",
- "predatobr", "predator",
- "predictie", "predictive",
- "predictin", "prediction",
- "predjuice", "prejudice",
- "predujice", "prejudice",
- "prefectly", "perfectly",
- "preferens", "preferences",
- "prefering", "preferring",
- "preformer", "performer",
- "pregnance", "pregnancies",
- "preimeter", "perimeter",
- "prejiduce", "prejudice",
- "prejucide", "prejudice",
- "premanent", "permanent",
- "premeired", "premiered",
- "preorderd", "preordered",
- "preparato", "preparation",
- "prepatory", "preparatory",
- "presentas", "presents",
- "presentes", "presents",
- "presicely", "precisely",
- "presicion", "precision",
- "presideny", "presidency",
- "prestigiu", "prestigious",
- "prestigue", "prestige",
- "presuaded", "persuaded",
- "pretendas", "pretends",
- "pretensje", "pretense",
- "pretinent", "pertinent",
- "prevelant", "prevalent",
- "preventin", "prevention",
- "previvous", "previous",
- "priesthod", "priesthood",
- "priestood", "priesthood",
- "primaires", "primaries",
- "primairly", "primarily",
- "primarliy", "primarily",
- "primative", "primitive",
- "primordal", "primordial",
- "princesas", "princess",
- "princeses", "princess",
- "princesss", "princesses",
- "principas", "principals",
- "principly", "principally",
- "prinicple", "principle",
- "prioritie", "prioritize",
- "prioritse", "priorities",
- "privalege", "privilege",
- "privelege", "privilege",
- "privelige", "privilege",
- "privilage", "privilege",
- "privilegs", "privileges",
- "privledge", "privilege",
- "probabily", "probability",
- "probablly", "probably",
- "problemas", "problems",
- "procative", "proactive",
- "procedger", "procedure",
- "proceding", "proceeding",
- "proceedes", "proceeds",
- "procelain", "porcelain",
- "procesess", "processes",
- "processer", "processor",
- "processos", "processors",
- "proclamed", "proclaimed",
- "procotols", "protocols",
- "prodecure", "procedure",
- "productie", "productive",
- "productin", "productions",
- "productos", "products",
- "profesion", "profusion",
- "professer", "professor",
- "professin", "professions",
- "proffesed", "professed",
- "proffesor", "professor",
- "progessed", "progressed",
- "programas", "programs",
- "programem", "programme",
- "programes", "programs",
- "programms", "programs",
- "progresso", "progression",
- "progresss", "progresses",
- "projectie", "projectile",
- "projectin", "projection",
- "prominant", "prominent",
- "promiscus", "promiscuous",
- "promotted", "promoted",
- "pronomial", "pronominal",
- "pronouced", "pronounced",
- "pronounds", "pronouns",
- "pronounes", "pronouns",
- "propagana", "propaganda",
- "properies", "properties",
- "propertly", "property",
- "propeties", "properties",
- "prophesie", "prophecies",
- "prophetes", "prophets",
- "propogate", "propagate",
- "proposels", "proposes",
- "proposito", "proposition",
- "propperly", "properly",
- "propsects", "prospects",
- "prosperos", "prosperous",
- "prostitue", "prostitute",
- "protectes", "protects",
- "protectie", "protective",
- "protectos", "protectors",
- "proteinas", "proteins",
- "proteines", "proteins",
- "protestas", "protests",
- "protestat", "protestant",
- "protestes", "protests",
- "protestos", "protests",
- "protfolio", "portfolio",
- "protocool", "protocol",
- "prototpye", "prototype",
- "prototyps", "prototypes",
- "protraits", "portraits",
- "protrayal", "portrayal",
- "protrayed", "portrayed",
- "provicial", "provincial",
- "provincie", "province",
- "provisios", "provisions",
- "pruchased", "purchased",
- "pruchases", "purchases",
- "prugatory", "purgatory",
- "pruposely", "purposely",
- "pscyhotic", "psychotic",
- "pseudonyn", "pseudonym",
- "pshycosis", "psychosis",
- "pshycotic", "psychotic",
- "psycology", "psychology",
- "psycothic", "psychotic",
- "ptichfork", "pitchfork",
- "pubilsher", "publisher",
- "publiaher", "publisher",
- "publicaly", "publicly",
- "publicani", "publication",
- "publicher", "publisher",
- "publiclly", "publicly",
- "publihser", "publisher",
- "publisehr", "publisher",
- "publisger", "publisher",
- "publishor", "publisher",
- "publishre", "publisher",
- "publsiher", "publisher",
- "publusher", "publisher",
- "puchasing", "purchasing",
- "punishmet", "punishments",
- "puplisher", "publisher",
- "puragtory", "purgatory",
- "purcahsed", "purchased",
- "purcahses", "purchases",
- "purhcased", "purchased",
- "purposley", "purposely",
- "pursuaded", "persuaded",
- "pursuades", "persuades",
- "pyramidas", "pyramids",
- "pyramides", "pyramids",
- "pyschosis", "psychosis",
- "pyschotic", "psychotic",
- "qaulifies", "qualifies",
- "quantifiy", "quantify",
- "quantitiy", "quantity",
- "quantitty", "quantity",
- "quartlery", "quarterly",
- "queations", "equations",
- "queenland", "queensland",
- "questiond", "questioned",
- "questiong", "questioning",
- "questionn", "questioning",
- "radicalis", "radicals",
- "rapsberry", "raspberry",
- "rasbperry", "raspberry",
- "rationaly", "rationally",
- "reactiony", "reactionary",
- "realisitc", "realistic",
- "realoding", "reloading",
- "realsitic", "realistic",
- "realtable", "relatable",
- "realtions", "relations",
- "realtives", "relatives",
- "reamining", "remaining",
- "reaplying", "replaying",
- "reasearch", "research",
- "reaveling", "revealing",
- "rebellios", "rebellious",
- "rebllions", "rebellions",
- "recations", "creations",
- "reccomend", "recommend",
- "reccuring", "recurring",
- "receeding", "receding",
- "recepient", "recipient",
- "recgonise", "recognise",
- "recgonize", "recognize",
- "recidents", "residents",
- "recievers", "receivers",
- "recieving", "receiving",
- "recipiant", "recipient",
- "reciproce", "reciprocate",
- "reclutant", "reluctant",
- "recoginse", "recognise",
- "recoginze", "recognize",
- "recomends", "recommends",
- "recommens", "recommends",
- "reconenct", "reconnect",
- "recongise", "recognise",
- "recongize", "recognize",
- "reconicle", "reconcile",
- "reconized", "recognized",
- "recordare", "recorder",
- "recoveres", "recovers",
- "recoverys", "recovers",
- "recpetive", "receptive",
- "recpetors", "receptors",
- "recquired", "required",
- "recreatie", "recreate",
- "recruitcs", "recruits",
- "recruites", "recruits",
- "recrusion", "recursion",
- "recrutied", "recruited",
- "recrutier", "recruiter",
- "rectangel", "rectangle",
- "rectanlge", "rectangle",
- "recuiting", "recruiting",
- "recurison", "recursion",
- "recurited", "recruited",
- "recuriter", "recruiter",
- "recusrion", "recursion",
- "redeemeed", "redeemed",
- "redundany", "redundancy",
- "redundent", "redundant",
- "reedeming", "redeeming",
- "refelcted", "reflected",
- "refereces", "references",
- "refereees", "referees",
- "refereers", "referees",
- "referemce", "reference",
- "referencs", "references",
- "referense", "references",
- "referiang", "referring",
- "referinng", "refering",
- "refernces", "references",
- "refernece", "reference",
- "refershed", "refreshed",
- "refersher", "refresher",
- "reffering", "referring",
- "reflectie", "reflective",
- "refrehser", "refresher",
- "refrences", "references",
- "refromist", "reformist",
- "regionaal", "regional",
- "registerd", "registered",
- "registery", "registry",
- "regualrly", "regularly",
- "regualtor", "regulator",
- "regulaion", "regulation",
- "regulalry", "regularly",
- "regulares", "regulars",
- "regularis", "regulars",
- "regulatin", "regulations",
- "regurally", "regularly",
- "reigining", "reigning",
- "reinstale", "reinstalled",
- "reisntall", "reinstall",
- "reknowned", "renowned",
- "relaoding", "reloading",
- "relatiate", "retaliate",
- "relativiy", "relativity",
- "relativly", "relatively",
- "relativno", "relation",
- "relavence", "relevance",
- "relcutant", "reluctant",
- "relevence", "relevance",
- "relfected", "reflected",
- "reliabily", "reliability",
- "reliabley", "reliably",
- "religeous", "religious",
- "remasterd", "remastered",
- "rememberd", "remembered",
- "rememebrs", "remembers",
- "remianing", "remaining",
- "remignton", "remington",
- "remingotn", "remington",
- "remmebers", "remembers",
- "remotelly", "remotely",
- "rendevous", "rendezvous",
- "rendezous", "rendezvous",
- "renedered", "rende",
- "renegated", "renegade",
- "rennovate", "renovate",
- "repalying", "replaying",
- "repblican", "republican",
- "repeatedy", "repeatedly",
- "repective", "receptive",
- "repeition", "repetition",
- "repentent", "repentant",
- "rephrasse", "rephrase",
- "replusive", "repulsive",
- "reportedy", "reportedly",
- "represend", "represented",
- "repressin", "repression",
- "reprtoire", "repertoire",
- "repsonded", "responded",
- "reptition", "repetition",
- "reptuable", "reputable",
- "repubican", "republican",
- "republian", "republican",
- "repulican", "republican",
- "repulisve", "repulsive",
- "repuslive", "repulsive",
- "resaurant", "restaurant",
- "researchs", "researchers",
- "resembels", "resembles",
- "reserverd", "reserved",
- "resintall", "reinstall",
- "resistane", "resistances",
- "resistans", "resistances",
- "resistend", "resisted",
- "resistent", "resistant",
- "resmebles", "resembles",
- "resolutin", "resolutions",
- "resoruces", "resources",
- "respectes", "respects",
- "respectos", "respects",
- "responces", "response",
- "respondas", "responds",
- "respondis", "responds",
- "respondus", "responds",
- "respoting", "reposting",
- "ressemble", "resemble",
- "ressurect", "resurrect",
- "restarant", "restaurant",
- "resticted", "restricted",
- "restircts", "restricts",
- "restorani", "restoration",
- "restraind", "restrained",
- "restraing", "restraining",
- "restraunt", "restraint",
- "restriant", "restraint",
- "restricte", "restrictive",
- "resturant", "restaurant",
- "retailate", "retaliate",
- "retalaite", "retaliate",
- "retaliers", "retailers",
- "reteriver", "retriever",
- "retirever", "retriever",
- "retrevier", "retriever",
- "reuptable", "reputable",
- "reveiwers", "reviewers",
- "revelaing", "revealing",
- "revelance", "relevance",
- "revolutin", "revolutions",
- "rewachted", "rewatched",
- "rewatchig", "rewatching",
- "rferences", "references",
- "ridiculos", "ridiculous",
- "ridiculue", "ridicule",
- "ridiculus", "ridiculous",
- "righetous", "righteous",
- "rightfuly", "rightfully",
- "rightoues", "righteous",
- "rigourous", "rigorous",
- "rigtheous", "righteous",
- "rilvaries", "rivalries",
- "rininging", "ringing",
- "rivarlies", "rivalries",
- "rivlaries", "rivalries",
- "roaylties", "royalties",
- "roboticus", "robotics",
- "roganisms", "organisms",
- "royalites", "royalties",
- "roylaties", "royalties",
- "ruleboook", "rulebook",
- "sacarstic", "sarcastic",
- "sacntuary", "sanctuary",
- "sacrafice", "sacrifice",
- "sacrastic", "sarcastic",
- "sacrifise", "sacrifices",
- "salughter", "slaughter",
- "samckdown", "smackdown",
- "sanctiond", "sanctioned",
- "sancturay", "sanctuary",
- "sancutary", "sanctuary",
- "sandstrom", "sandstorm",
- "sandwhich", "sandwich",
- "sanhedrim", "sanhedrin",
- "santcuary", "sanctuary",
- "santioned", "sanctioned",
- "sapphirre", "sapphire",
- "sastified", "satisfied",
- "sastifies", "satisfies",
- "satelites", "satellites",
- "saterdays", "saturdays",
- "satisifed", "satisfied",
- "satisifes", "satisfies",
- "satrudays", "saturdays",
- "satsified", "satisfied",
- "satsifies", "satisfies",
- "sattelite", "satellite",
- "saxaphone", "saxophone",
- "scaepgoat", "scapegoat",
- "scaleable", "scalable",
- "scandales", "scandals",
- "scandalos", "scandals",
- "scantuary", "sanctuary",
- "scaricity", "scarcity",
- "scarifice", "sacrifice",
- "scarmbled", "scrambled",
- "scartched", "scratched",
- "scartches", "scratches",
- "scavanged", "scavenged",
- "sceintist", "scientist",
- "scholalry", "scholarly",
- "sciencers", "sciences",
- "scientfic", "scientific",
- "scientifc", "scientific",
- "scientits", "scientist",
- "sclupture", "sculpture",
- "scnearios", "scenarios",
- "scoreboad", "scoreboard",
- "scottisch", "scottish",
- "scracthed", "scratched",
- "scracthes", "scratches",
- "scrambeld", "scrambled",
- "scrathces", "scratches",
- "scrollade", "scrolled",
- "scrutiney", "scrutiny",
- "scrutinty", "scrutiny",
- "sculpteur", "sculpture",
- "sculputre", "sculpture",
- "scultpure", "sculpture",
- "scuplture", "sculpture",
- "scuptures", "sculptures",
- "seamlessy", "seamlessly",
- "searchign", "searching",
- "sebasitan", "sebastian",
- "sebastain", "sebastian",
- "sebsatian", "sebastian",
- "secceeded", "seceded",
- "secertary", "secretary",
- "secratary", "secretary",
- "secratery", "secretary",
- "secretery", "secretary",
- "secretley", "secretly",
- "sednetary", "sedentary",
- "seduciton", "seduction",
- "semanitcs", "semantics",
- "semestres", "semesters",
- "semnatics", "semantics",
- "semseters", "semesters",
- "senatores", "senators",
- "sendetary", "sedentary",
- "sensitivy", "sensitivity",
- "sentimant", "sentimental",
- "sepcially", "specially",
- "seperated", "separated",
- "seperates", "separates",
- "seperator", "separator",
- "septmeber", "september",
- "seraching", "searching",
- "seriosuly", "seriously",
- "serioulsy", "seriously",
- "seriuosly", "seriously",
- "servantes", "servants",
- "settlment", "settlement",
- "sexualizd", "sexualized",
- "sexuallly", "sexually",
- "shadasloo", "shadaloo",
- "shaprness", "sharpness",
- "sharpenss", "sharpness",
- "shawhsank", "shawshank",
- "sheilding", "shielding",
- "shephered", "shepherd",
- "shileding", "shielding",
- "shitstrom", "shitstorm",
- "shletered", "sheltered",
- "shoudlers", "shoulders",
- "shouldnot", "shouldnt",
- "shperical", "spherical",
- "shwashank", "shawshank",
- "sidebaord", "sideboard",
- "siganture", "signature",
- "signapore", "singapore",
- "signitory", "signatory",
- "silhouete", "silhouette",
- "similiair", "similiar",
- "simliarly", "similarly",
- "simluated", "simulated",
- "simluator", "simulator",
- "simplifiy", "simplify",
- "simualted", "simulated",
- "simualtor", "simulator",
- "simulatie", "simulate",
- "simulatin", "simulation",
- "sinagpore", "singapore",
- "sincerley", "sincerely",
- "singature", "signature",
- "singpaore", "singapore",
- "singulair", "singular",
- "singulary", "singularity",
- "skateboad", "skateboard",
- "skeletaal", "skeletal",
- "skepitcal", "skeptical",
- "skepticim", "skepticism",
- "sketpical", "skeptical",
- "slaughted", "slaughtered",
- "slaugther", "slaughter",
- "slipperly", "slippery",
- "sluaghter", "slaughter",
- "smackdwon", "smackdown",
- "smealting", "smelting",
- "smeesters", "semesters",
- "snadstorm", "sandstorm",
- "snippetts", "snippets",
- "snowfalke", "snowflake",
- "snowflaek", "snowflake",
- "snowlfake", "snowflake",
- "snwoballs", "snowballs",
- "snythesis", "synthesis",
- "snythetic", "synthetic",
- "socailism", "socialism",
- "socailist", "socialist",
- "socailize", "socialize",
- "soceities", "societies",
- "socialini", "socializing",
- "socialiss", "socialists",
- "socialsim", "socialism",
- "socieites", "societies",
- "socilaism", "socialism",
- "socilaist", "socialist",
- "sociopati", "sociopathic",
- "sociopats", "sociopaths",
- "socratees", "socrates",
- "socrateks", "socrates",
- "soemthing", "something",
- "sohpomore", "sophomore",
- "soliliquy", "soliloquy",
- "somehting", "something",
- "someoneis", "someones",
- "somethign", "something",
- "somethins", "somethings",
- "sopohmore", "sophomore",
- "sotryline", "storyline",
- "soundtrak", "soundtrack",
- "sountrack", "soundtrack",
- "sourthern", "southern",
- "souvenier", "souvenir",
- "soveregin", "sovereign",
- "sovereing", "sovereign",
- "soveriegn", "sovereign",
- "spacegoat", "scapegoat",
- "spagehtti", "spaghetti",
- "spahgetti", "spaghetti",
- "sparlking", "sparkling",
- "spartants", "spartans",
- "specailly", "specially",
- "specailty", "specialty",
- "specality", "specialty",
- "speciales", "specials",
- "specialis", "specials",
- "speciatly", "specialty",
- "specifing", "specifying",
- "specimine", "specimen",
- "spectrail", "spectral",
- "specualte", "speculate",
- "speechers", "speeches",
- "spehrical", "spherical",
- "speically", "specially",
- "spetember", "september",
- "sphagetti", "spaghetti",
- "splatooon", "splatoon",
- "sponosred", "sponsored",
- "sponsered", "sponsored",
- "sponsores", "sponsors",
- "spontanes", "spontaneous",
- "sponzored", "sponsored",
- "sprakling", "sparkling",
- "sprinkeld", "sprinkled",
- "squadroon", "squadron",
- "squirrles", "squirrels",
- "squirrtle", "squirrel",
- "squrriels", "squirrels",
- "srirachia", "sriracha",
- "srirachra", "sriracha",
- "stabliize", "stabilize",
- "stainlees", "stainless",
- "startegic", "strategic",
- "startlxde", "startled",
- "statisitc", "statistic",
- "staurdays", "saturdays",
- "steadilly", "steadily",
- "stealthly", "stealthy",
- "stichting", "stitching",
- "sticthing", "stitching",
- "stimulans", "stimulants",
- "stockplie", "stockpile",
- "stornegst", "strongest",
- "stragetic", "strategic",
- "straightn", "straighten",
- "strangets", "strangest",
- "strategis", "strategies",
- "strawbery", "strawberry",
- "streamade", "streamed",
- "streamare", "streamer",
- "streamear", "streamer",
- "strechted", "stretched",
- "strechtes", "stretches",
- "strecthed", "stretched",
- "strecthes", "stretches",
- "stregnths", "strengths",
- "strenghen", "strengthen",
- "strengthn", "strengthen",
- "strentghs", "strengths",
- "stressade", "stressed",
- "stressers", "stresses",
- "strictist", "strictest",
- "stringnet", "stringent",
- "stroyline", "storyline",
- "structual", "structural",
- "structurs", "structures",
- "strucutre", "structure",
- "struggeld", "struggled",
- "struggels", "struggles",
- "stryofoam", "styrofoam",
- "stuctured", "structured",
- "stuggling", "struggling",
- "stupitidy", "stupidity",
- "sturcture", "structure",
- "sturggled", "struggled",
- "sturggles", "struggles",
- "styrofaom", "styrofoam",
- "subarmine", "submarine",
- "subculter", "subculture",
- "submachne", "submachine",
- "subpecies", "subspecies",
- "subscirbe", "subscribe",
- "subsidary", "subsidiary",
- "subsizide", "subsidize",
- "subsquent", "subsequent",
- "subsrcibe", "subscribe",
- "substanse", "substances",
- "substanta", "substantial",
- "substante", "substantive",
- "substarte", "substrate",
- "substitue", "substitute",
- "substract", "subtract",
- "subtances", "substances",
- "subtiltes", "subtitles",
- "subtitels", "subtitles",
- "subtletly", "subtlety",
- "subtlties", "subtitles",
- "succedded", "succeeded",
- "succeedes", "succeeds",
- "succesful", "successful",
- "succesion", "succession",
- "succesive", "successive",
- "suceeding", "succeeding",
- "sucesfuly", "successfully",
- "sucessful", "successful",
- "sucession", "succession",
- "sucessive", "successive",
- "sufferage", "suffrage",
- "sufferred", "suffered",
- "sufficent", "sufficient",
- "suggestes", "suggests",
- "suggestie", "suggestive",
- "sumbarine", "submarine",
- "sumberged", "submerged",
- "summenors", "summoners",
- "summoenrs", "summoners",
- "sunderlad", "sunderland",
- "sunglases", "sunglasses",
- "superfluu", "superfluous",
- "superiour", "superior",
- "superisor", "superiors",
- "supermare", "supermarket",
- "superviso", "supervision",
- "suposedly", "supposedly",
- "supportes", "supports",
- "suppreses", "suppress",
- "supressed", "suppressed",
- "supresses", "suppresses",
- "suprising", "surprising",
- "suprizing", "surprising",
- "supsicion", "suspicion",
- "surounded", "surrounded",
- "surprized", "surprised",
- "surronded", "surrounded",
- "surrouded", "surrounded",
- "surrouned", "surround",
- "survivers", "survivors",
- "survivied", "survived",
- "survivour", "survivor",
- "susbcribe", "subscribe",
- "susbtrate", "substrate",
- "susncreen", "sunscreen",
- "suspectes", "suspects",
- "suspendes", "suspense",
- "suspensie", "suspense",
- "swastikka", "swastika",
- "sweatshit", "sweatshirt",
- "sweetheat", "sweetheart",
- "switchign", "switching",
- "swithcing", "switching",
- "swtiching", "switching",
- "sydnicate", "syndicate",
- "sykwalker", "skywalker",
- "sylablles", "syllables",
- "syllabels", "syllables",
- "symbolsim", "symbolism",
- "symettric", "symmetric",
- "symmetral", "symmetric",
- "symmetria", "symmetrical",
- "symoblism", "symbolism",
- "sympathie", "sympathize",
- "symphoney", "symphony",
- "symptomes", "symptoms",
- "symptomps", "symptoms",
- "synagouge", "synagogue",
- "syndacite", "syndicate",
- "syndiacte", "syndicate",
- "synidcate", "syndicate",
- "synonymes", "synonyms",
- "synonymis", "synonyms",
- "synonymns", "synonyms",
- "synonymos", "synonymous",
- "synonymus", "synonyms",
- "synopsies", "synopsis",
- "syntehsis", "synthesis",
- "syntehtic", "synthetic",
- "syntethic", "synthetic",
- "syphyllis", "syphilis",
- "syracusae", "syracuse",
- "sytrofoam", "styrofoam",
- "tablespon", "tablespoon",
- "tacticaly", "tactically",
- "tanenhill", "tannehill",
- "tannheill", "tannehill",
- "targetted", "targeted",
- "tawainese", "taiwanese",
- "tawianese", "taiwanese",
- "taxanomic", "taxonomic",
- "teamfighs", "teamfights",
- "teamfigth", "teamfight",
- "teamifght", "teamfight",
- "teampseak", "teamspeak",
- "teaspooon", "teaspoon",
- "techician", "technician",
- "techinque", "technique",
- "technolgy", "technology",
- "teeangers", "teenagers",
- "tehtering", "tethering",
- "telegrpah", "telegraph",
- "televsion", "television",
- "temafight", "teamfight",
- "tempaltes", "templates",
- "temparate", "temperate",
- "templaras", "templars",
- "templares", "templars",
- "temporali", "temporarily",
- "tenacitiy", "tenacity",
- "tensiones", "tensions",
- "tentacels", "tentacles",
- "tentacuel", "tentacle",
- "tentalces", "tentacles",
- "termianls", "terminals",
- "terminato", "termination",
- "terorrism", "terrorism",
- "terorrist", "terrorist",
- "terrabyte", "terabyte",
- "terribley", "terribly",
- "terriblly", "terribly",
- "terriroty", "territory",
- "terrorits", "terrorist",
- "terrorsim", "terrorism",
- "tesitcles", "testicles",
- "tesitmony", "testimony",
- "testicels", "testicles",
- "testomony", "testimony",
- "texturers", "textures",
- "thankfuly", "thankfully",
- "thankyoou", "thankyou",
- "themselfs", "themselves",
- "themselvs", "themselves",
- "themslves", "themselves",
- "theologia", "theological",
- "therafter", "thereafter",
- "therefoer", "therefor",
- "therefour", "therefor",
- "theroists", "theorists",
- "thetering", "tethering",
- "thirlling", "thrilling",
- "thirteeen", "thirteen",
- "thoecracy", "theocracy",
- "thoerists", "theorists",
- "thoroughy", "thoroughly",
- "thoughout", "throughout",
- "threatend", "threatened",
- "throrough", "thorough",
- "throughly", "thoroughly",
- "througout", "throughout",
- "thrusdays", "thursdays",
- "thurdsays", "thursdays",
- "thursdsay", "thursdays",
- "thursters", "thrusters",
- "tiawanese", "taiwanese",
- "timestmap", "timestamp",
- "tirangles", "triangles",
- "tocuhdown", "touchdown",
- "toghether", "together",
- "tolerence", "tolerance",
- "tommorrow", "tomorrow",
- "torandoes", "tornadoes",
- "torchligt", "torchlight",
- "torelable", "tolerable",
- "toritllas", "tortillas",
- "tornaodes", "tornadoes",
- "torpeados", "torpedoes",
- "torrentas", "torrents",
- "torrentes", "torrents",
- "tortialls", "tortillas",
- "tortillia", "tortilla",
- "tortillla", "tortilla",
- "tottehnam", "tottenham",
- "tottenahm", "tottenham",
- "tottneham", "tottenham",
- "toturials", "tutorials",
- "touchdwon", "touchdown",
- "touristas", "tourists",
- "touristes", "tourists",
- "touristey", "touristy",
- "touristly", "touristy",
- "touristsy", "touristy",
- "tournamet", "tournament",
- "toxicitiy", "toxicity",
- "trafficed", "trafficked",
- "tragicaly", "tragically",
- "traileras", "trailers",
- "traingles", "triangles",
- "trainwrek", "trainwreck",
- "traitoris", "traitors",
- "traitorus", "traitors",
- "tramautic", "traumatic",
- "tranlsate", "translate",
- "transalte", "translate",
- "transcris", "transcripts",
- "transcrit", "transcript",
- "transferd", "transferred",
- "transfere", "transferred",
- "transfors", "transforms",
- "transfrom", "transform",
- "transiten", "transient",
- "transitin", "transitions",
- "transofrm", "transform",
- "transplat", "transplant",
- "trasnfers", "transfers",
- "trasnform", "transform",
- "trasnport", "transport",
- "traversie", "traverse",
- "travestry", "travesty",
- "treasuers", "treasures",
- "treasurey", "treasury",
- "treatmens", "treatments",
- "treausres", "treasures",
- "tremendos", "tremendous",
- "trhilling", "thrilling",
- "trhusters", "thrusters",
- "triangels", "triangles",
- "trianlges", "triangles",
- "tribunaal", "tribunal",
- "triguered", "triggered",
- "trinagles", "triangles",
- "truamatic", "traumatic",
- "truthfuly", "truthfully",
- "tunrtable", "turntable",
- "turnaroud", "turnaround",
- "turntabel", "turntable",
- "typcially", "typically",
- "tyrranies", "tyrannies",
- "ubiquitos", "ubiquitous",
- "ugprading", "upgrading",
- "ukrainain", "ukrainian",
- "ukrainias", "ukrainians",
- "ukrainina", "ukrainian",
- "ukrainisn", "ukrainians",
- "ukrianian", "ukrainian",
- "ulitmatum", "ultimatum",
- "ulteriour", "ulterior",
- "umbrellla", "umbrella",
- "unaminous", "unanimous",
- "unanmious", "unanimous",
- "unanswerd", "unanswered",
- "unanymous", "unanimous",
- "unbannend", "unbanned",
- "uncensord", "uncensored",
- "uncomited", "uncommitted",
- "undercunt", "undercut",
- "underdong", "underdog",
- "undergard", "undergrad",
- "underming", "undermining",
- "understad", "understands",
- "underwaer", "underwear",
- "underware", "underwear",
- "undescore", "underscore",
- "unforseen", "unforeseen",
- "unfortune", "unfortunate",
- "unfriendy", "unfriendly",
- "unhealhty", "unhealthy",
- "unheathly", "unhealthy",
- "unhelathy", "unhealthy",
- "unicornis", "unicorns",
- "unicornus", "unicorns",
- "uniformes", "uniforms",
- "uninamous", "unanimous",
- "unintuive", "unintuitive",
- "uniquelly", "uniquely",
- "unisntall", "uninstall",
- "univerity", "university",
- "universse", "universes",
- "univesity", "university",
- "unnistall", "uninstall",
- "unoffical", "unofficial",
- "unopenend", "unopened",
- "unplayabe", "unplayable",
- "unplesant", "unpleasant",
- "unpopluar", "unpopular",
- "unrankend", "unranked",
- "unreliabe", "unreliable",
- "unrwitten", "unwritten",
- "untrianed", "untrained",
- "unusaully", "unusually",
- "unuseable", "unusable",
- "unusuable", "unusable",
- "unvierses", "universes",
- "unweildly", "unwieldy",
- "unwieldly", "unwieldy",
- "unwirtten", "unwritten",
- "unworthly", "unworthy",
- "upcomming", "upcoming",
- "upgarding", "upgrading",
- "upgradded", "upgraded",
- "uplfiting", "uplifting",
- "uplifitng", "uplifting",
- "urkainian", "ukrainian",
- "utlimatum", "ultimatum",
- "vacciante", "vaccinate",
- "vaccinato", "vaccination",
- "vacciners", "vaccines",
- "vacestomy", "vasectomy",
- "vaguaries", "vagaries",
- "vaibility", "viability",
- "vaildated", "validated",
- "vairables", "variables",
- "valdiated", "validated",
- "valentein", "valentine",
- "valentien", "valentine",
- "valentins", "valentines",
- "validitiy", "validity",
- "valueable", "valuable",
- "vanadlism", "vandalism",
- "vandalsim", "vandalism",
- "varaibles", "variables",
- "varations", "variations",
- "variantes", "variants",
- "vascetomy", "vasectomy",
- "vastecomy", "vasectomy",
- "veganisim", "veganism",
- "vegetarin", "vegetarians",
- "vegitable", "vegetable",
- "vehementy", "vehemently",
- "veiwpoint", "viewpoint",
- "velantine", "valentine",
- "vendettta", "vendetta",
- "venegance", "vengeance",
- "veneuzela", "venezuela",
- "venezeula", "venezuela",
- "venezulea", "venezuela",
- "vengaence", "vengeance",
- "vengenace", "vengeance",
- "ventilato", "ventilation",
- "verbatium", "verbatim",
- "verfiying", "verifying",
- "verifiyng", "verifying",
- "verisions", "revisions",
- "versalite", "versatile",
- "versatily", "versatility",
- "versiones", "versions",
- "versitale", "versatile",
- "verstaile", "versatile",
- "verticaly", "vertically",
- "veryifing", "verifying",
- "vicotrian", "victorian",
- "vicotries", "victories",
- "victoires", "victories",
- "victorain", "victorian",
- "victorina", "victorian",
- "victorios", "victorious",
- "videogaem", "videogame",
- "videogams", "videogames",
- "vidoegame", "videogame",
- "viewpiont", "viewpoint",
- "vigilence", "vigilance",
- "vigliante", "vigilante",
- "vigourous", "vigorous",
- "viligante", "vigilante",
- "viloently", "violently",
- "vincinity", "vicinity",
- "vioalting", "violating",
- "violentce", "violence",
- "virbation", "vibration",
- "virgintiy", "virginity",
- "virignity", "virginity",
- "virutally", "virtually",
- "visibiliy", "visibility",
- "vitaminas", "vitamins",
- "vitamines", "vitamins",
- "vitrually", "virtually",
- "vociemail", "voicemail",
- "voilating", "violating",
- "voilation", "violation",
- "voilently", "violently",
- "volatiliy", "volatility",
- "voleyball", "volleyball",
- "volontary", "voluntary",
- "volonteer", "volunteer",
- "volunatry", "voluntary",
- "volunteed", "volunteered",
- "vriginity", "virginity",
- "wallpapes", "wallpapers",
- "warrantly", "warranty",
- "warrriors", "warriors",
- "wavelengh", "wavelength",
- "weakenend", "weakened",
- "weakneses", "weakness",
- "weaknesss", "weaknesses",
- "wealtheir", "wealthier",
- "weaponary", "weaponry",
- "wedensday", "wednesday",
- "wednesdsy", "wednesdays",
- "wednessay", "wednesdays",
- "wednseday", "wednesday",
- "welathier", "wealthier",
- "wendesday", "wednesday",
- "wesbtrook", "westbrook",
- "westernes", "westerners",
- "westrbook", "westbrook",
- "whereever", "wherever",
- "whietlist", "whitelist",
- "whilrwind", "whirlwind",
- "whilsting", "whistling",
- "whipsered", "whispered",
- "whislting", "whistling",
- "whisperes", "whispers",
- "whitelsit", "whitelist",
- "whitleist", "whitelist",
- "whitsling", "whistling",
- "whrilwind", "whirlwind",
- "whsipered", "whispered",
- "whtielist", "whitelist",
- "widespred", "widespread",
- "widesread", "widespread",
- "windshied", "windshield",
- "wintesses", "witnesses",
- "wisconisn", "wisconsin",
- "wishlisht", "wishlist",
- "wishpered", "whispered",
- "withdrawl", "withdrawal",
- "withelist", "whitelist",
- "witnesess", "witnesses",
- "wolrdview", "worldview",
- "wolrdwide", "worldwide",
- "wonderlad", "wonderland",
- "wordlview", "worldview",
- "wordlwide", "worldwide",
- "worhtless", "worthless",
- "workfroce", "workforce",
- "worldivew", "worldview",
- "worldveiw", "worldview",
- "worstened", "worsened",
- "worthelss", "worthless",
- "xenbolade", "xenoblade",
- "xenobalde", "xenoblade",
- "xenophoby", "xenophobia",
- "xeonblade", "xenoblade",
- "yementite", "yemenite",
- "yorkshrie", "yorkshire",
- "yorskhire", "yorkshire",
- "yosemitie", "yosemite",
- "youngents", "youngest",
- "yourselvs", "yourselves",
- "zimbabwae", "zimbabwe",
- "zionistas", "zionists",
- "zionistes", "zionists",
- "abandond", "abandoned",
- "abdomine", "abdomen",
- "abilitiy", "ability",
- "abilties", "abilities",
- "abondons", "abandons",
- "aboslute", "absolute",
- "abosrbed", "absorbed",
- "abruplty", "abruptly",
- "abrutply", "abruptly",
- "abscence", "absence",
- "absestos", "asbestos",
- "absoluts", "absolutes",
- "absolvte", "absolve",
- "absorbes", "absorbs",
- "absoulte", "absolute",
- "abstante", "bastante",
- "abudance", "abundance",
- "abudcted", "abducted",
- "abundunt", "abundant",
- "aburptly", "abruptly",
- "abuseres", "abusers",
- "abusrdly", "absurdly",
- "academis", "academics",
- "accademy", "academy",
- "acccused", "accused",
- "acceptes", "accepts",
- "accidens", "accidents",
- "accideny", "accidently",
- "accoring", "according",
- "accountt", "accountant",
- "accpeted", "accepted",
- "accuarcy", "accuracy",
- "accumule", "accumulate",
- "accusato", "accusation",
- "accussed", "accused",
- "acedamia", "academia",
- "acedemic", "academic",
- "acheived", "achieved",
- "acheives", "achieves",
- "achieval", "achievable",
- "acnedote", "anecdote",
- "acording", "according",
- "acornyms", "acronyms",
- "acousitc", "acoustic",
- "acoutsic", "acoustic",
- "acovados", "avocados",
- "acquifer", "acquire",
- "acquited", "acquitted",
- "acquried", "acquired",
- "acronmys", "acronyms",
- "acronysm", "acronyms",
- "acroynms", "acronyms",
- "acrynoms", "acronyms",
- "acsended", "ascended",
- "actaully", "actually",
- "activite", "activities",
- "activits", "activities",
- "activley", "actively",
- "actresss", "actresses",
- "actualey", "actualy",
- "actualiy", "actuality",
- "actualky", "actualy",
- "actualmy", "actualy",
- "actualoy", "actualy",
- "actualpy", "actualy",
- "actualty", "actualy",
- "acutally", "actually",
- "acutions", "auctions",
- "adaptare", "adapter",
- "adbandon", "abandon",
- "adbucted", "abducted",
- "addictes", "addicts",
- "addictin", "addictions",
- "addictis", "addictions",
- "addional", "additional",
- "addopted", "adopted",
- "addresed", "addressed",
- "adealide", "adelaide",
- "adecuate", "adequate",
- "adeilade", "adelaide",
- "adeladie", "adelaide",
- "adeliade", "adelaide",
- "adeqaute", "adequate",
- "adheisve", "adhesive",
- "adhevise", "adhesive",
- "adivsors", "advisors",
- "admiraal", "admiral",
- "adolence", "adolescent",
- "adorbale", "adorable",
- "adovcacy", "advocacy",
- "adpaters", "adapters",
- "adquired", "acquired",
- "adquires", "acquires",
- "adresing", "addressing",
- "adressed", "addressed",
- "adroable", "adorable",
- "adultrey", "adultery",
- "adventue", "adventures",
- "adventus", "adventures",
- "advertis", "adverts",
- "advesary", "adversary",
- "adviseer", "adviser",
- "adviseur", "adviser",
- "advocade", "advocated",
- "advocats", "advocates",
- "advsiors", "advisors",
- "aethists", "atheists",
- "affaires", "affairs",
- "affilate", "affiliate",
- "affintiy", "affinity",
- "affleunt", "affluent",
- "affulent", "affluent",
- "afircans", "africans",
- "africain", "african",
- "afternon", "afternoon",
- "againnst", "against",
- "agnositc", "agnostic",
- "agonstic", "agnostic",
- "agravate", "aggravate",
- "agreemnt", "agreement",
- "agregate", "aggregate",
- "agressie", "agressive",
- "agressor", "aggressor",
- "agrieved", "aggrieved",
- "agruable", "arguable",
- "agruably", "arguably",
- "agrument", "argument",
- "ahtletes", "athletes",
- "aincents", "ancients",
- "airboner", "airborne",
- "airbrone", "airborne",
- "aircarft", "aircraft",
- "airplans", "airplanes",
- "airporta", "airports",
- "airpsace", "airspace",
- "airscape", "airspace",
- "akransas", "arkansas",
- "alchemey", "alchemy",
- "alchohol", "alcohol",
- "alcholic", "alcoholic",
- "alcoholc", "alcoholics",
- "aldutery", "adultery",
- "aleniate", "alienate",
- "algoritm", "algorithm",
- "alimoney", "alimony",
- "alirghty", "alrighty",
- "allaince", "alliance",
- "alledged", "alleged",
- "alledges", "alleges",
- "allegedy", "allegedly",
- "allegely", "allegedly",
- "allegric", "allergic",
- "allergey", "allergy",
- "allianse", "alliances",
- "alligned", "aligned",
- "allinace", "alliance",
- "allopone", "allophone",
- "allready", "already",
- "almigthy", "almighty",
- "alpahbet", "alphabet",
- "alrigthy", "alrighty",
- "altantic", "atlantic",
- "alterato", "alteration",
- "alternar", "alternator",
- "althetes", "athletes",
- "althetic", "athletic",
- "altriusm", "altruism",
- "altrusim", "altruism",
- "alturism", "altruism",
- "aluminim", "aluminium",
- "alumnium", "aluminum",
- "alunimum", "aluminum",
- "amatersu", "amateurs",
- "amaterus", "amateurs",
- "amendmet", "amendments",
- "amercian", "american",
- "amercias", "americas",
- "amernian", "armenian",
- "amethsyt", "amethyst",
- "ameythst", "amethyst",
- "ammended", "amended",
- "amnestry", "amnesty",
- "amoungst", "amongst",
- "amplifiy", "amplify",
- "amplifly", "amplify",
- "amrchair", "armchair",
- "amrenian", "armenian",
- "amtheyst", "amethyst",
- "analgoue", "analogue",
- "analisys", "analysis",
- "analitic", "analytic",
- "analouge", "analogue",
- "analysie", "analyse",
- "analysit", "analyst",
- "analyste", "analyse",
- "analysze", "analyse",
- "analzyed", "analyzed",
- "anaolgue", "analogue",
- "anarchim", "anarchism",
- "anaylses", "analyses",
- "anaylsis", "analysis",
- "anaylsts", "analysts",
- "anaylzed", "analyzed",
- "ancedote", "anecdote",
- "anceints", "ancients",
- "ancinets", "ancients",
- "andoirds", "androids",
- "andorids", "androids",
- "andriods", "androids",
- "anecdots", "anecdotes",
- "anectode", "anecdote",
- "anedocte", "anecdote",
- "aneroxia", "anorexia",
- "aneroxic", "anorexic",
- "angostic", "agnostic",
- "angrilly", "angrily",
- "anicents", "ancients",
- "animatie", "animate",
- "animatte", "animate",
- "anlayses", "analyses",
- "annoints", "anoints",
- "annouced", "announced",
- "annoucne", "announce",
- "anntenas", "antennas",
- "anoerxia", "anorexia",
- "anoerxic", "anorexic",
- "anonymos", "anonymous",
- "anoreixa", "anorexia",
- "anounced", "announced",
- "anoxeria", "anorexia",
- "anoxeric", "anorexic",
- "answeres", "answers",
- "antartic", "antarctic",
- "antennea", "antenna",
- "antennna", "antenna",
- "anticipe", "anticipate",
- "antiquae", "antique",
- "antivirs", "antivirus",
- "anwsered", "answered",
- "anyhting", "anything",
- "anyhwere", "anywhere",
- "anyoneis", "anyones",
- "anythign", "anything",
- "anytying", "anything",
- "aparment", "apartment",
- "apartmet", "apartments",
- "apenines", "apennines",
- "aperutre", "aperture",
- "aplhabet", "alphabet",
- "apologes", "apologise",
- "aposltes", "apostles",
- "apostels", "apostles",
- "appaluse", "applause",
- "apparant", "apparent",
- "appareal", "apparel",
- "appareil", "apparel",
- "apperead", "appeared",
- "applaued", "applaud",
- "appluase", "applause",
- "appology", "apology",
- "apporach", "approach",
- "appraoch", "approach",
- "apreture", "aperture",
- "apsotles", "apostles",
- "aqaurium", "aquarium",
- "aqcuired", "acquired",
- "aquaduct", "aqueduct",
- "aquairum", "aquarium",
- "aquaruim", "aquarium",
- "aquiring", "acquiring",
- "aquitted", "acquitted",
- "arbitary", "arbitrary",
- "arbitray", "arbitrary",
- "arbiture", "arbiter",
- "architet", "architect",
- "archtype", "archetype",
- "aremnian", "armenian",
- "argentia", "argentina",
- "argubaly", "arguably",
- "arguemet", "arguement",
- "arguemtn", "arguement",
- "ariborne", "airborne",
- "aricraft", "aircraft",
- "ariplane", "airplane",
- "ariports", "airports",
- "arispace", "airspace",
- "aristote", "aristotle",
- "aritfact", "artifact",
- "arizonia", "arizona",
- "arkasnas", "arkansas",
- "arlighty", "alrighty",
- "armamant", "armament",
- "armenain", "armenian",
- "armenina", "armenian",
- "armpitts", "armpits",
- "armstrog", "armstrong",
- "arpanoid", "paranoid",
- "arpeture", "aperture",
- "arragned", "arranged",
- "arrestes", "arrests",
- "arrestos", "arrests",
- "arsenaal", "arsenal",
- "artemios", "artemis",
- "artemius", "artemis",
- "arthrits", "arthritis",
- "articule", "articulate",
- "artifacs", "artifacts",
- "artifcat", "artifact",
- "artilley", "artillery",
- "artisitc", "artistic",
- "artistas", "artists",
- "arugable", "arguable",
- "arugably", "arguably",
- "arugment", "argument",
- "asborbed", "absorbed",
- "asburdly", "absurdly",
- "ascneded", "ascended",
- "asissted", "assisted",
- "askreddt", "askreddit",
- "asnwered", "answered",
- "aspectos", "aspects",
- "asperges", "aspergers",
- "assasins", "assassins",
- "assemple", "assemble",
- "assertin", "assertions",
- "asshates", "asshats",
- "asshatts", "asshats",
- "assimile", "assimilate",
- "assistat", "assistants",
- "assitant", "assistant",
- "assmeble", "assemble",
- "assmebly", "assembly",
- "asssasin", "assassin",
- "assualts", "assaults",
- "asteorid", "asteroid",
- "asteriks", "asterisk",
- "asteriod", "asteroid",
- "asterois", "asteroids",
- "astersik", "asterisk",
- "asthetic", "aesthetic",
- "astronat", "astronaut",
- "asutrian", "austrian",
- "atheisim", "atheism",
- "atheistc", "atheistic",
- "atheltes", "athletes",
- "atheltic", "athletic",
- "athenean", "athenian",
- "athesits", "atheists",
- "athetlic", "athletic",
- "athients", "athiest",
- "atittude", "attitude",
- "atlantia", "atlanta",
- "atmoizer", "atomizer",
- "atomzier", "atomizer",
- "atribute", "attribute",
- "atrifact", "artifact",
- "attackes", "attackers",
- "attemped", "attempted",
- "attemted", "attempted",
- "attemtps", "attempts",
- "attidute", "attitude",
- "attitide", "attitude",
- "attribue", "attribute",
- "aucitons", "auctions",
- "audactiy", "audacity",
- "audcaity", "audacity",
- "audeince", "audience",
- "audiobok", "audiobook",
- "austeriy", "austerity",
- "austiran", "austrian",
- "austitic", "autistic",
- "austrain", "austrian",
- "australa", "australian",
- "austrija", "austria",
- "austrila", "austria",
- "autisitc", "autistic",
- "autoattk", "autoattack",
- "autograh", "autograph",
- "automato", "automation",
- "automony", "autonomy",
- "autority", "authority",
- "autsitic", "autistic",
- "auxilary", "auxiliary",
- "avacodos", "avocados",
- "avaiable", "available",
- "availabe", "available",
- "availble", "available",
- "avaition", "aviation",
- "avalable", "available",
- "avalance", "avalanche",
- "avataras", "avatars",
- "avatards", "avatars",
- "avatares", "avatars",
- "averadge", "averaged",
- "avergaed", "averaged",
- "avergaes", "averages",
- "aviaiton", "aviation",
- "avilable", "available",
- "avnegers", "avengers",
- "avodacos", "avocados",
- "awekened", "weakened",
- "awesomey", "awesomely",
- "awfullly", "awfully",
- "awkwardy", "awkwardly",
- "awnsered", "answered",
- "babysite", "babysitter",
- "baceause", "because",
- "bacehlor", "bachelor",
- "bachleor", "bachelor",
- "bacholer", "bachelor",
- "backeast", "backseat",
- "backerds", "backers",
- "backfied", "backfield",
- "backpacs", "backpacks",
- "balcanes", "balances",
- "balconey", "balcony",
- "balconny", "balcony",
- "ballistc", "ballistic",
- "balnaced", "balanced",
- "banannas", "bananas",
- "banditas", "bandits",
- "bandwith", "bandwidth",
- "bangkock", "bangkok",
- "baptisim", "baptism",
- "barabric", "barbaric",
- "barbarin", "barbarian",
- "barbaris", "barbarians",
- "bardford", "bradford",
- "bargaing", "bargaining",
- "baristia", "barista",
- "barrakcs", "barracks",
- "barrells", "barrels",
- "basicaly", "basically",
- "basiclay", "basicly",
- "basicley", "basicly",
- "basicliy", "basicly",
- "batistia", "batista",
- "battalin", "battalion",
- "bayonent", "bayonet",
- "beachead", "beachhead",
- "beacuoup", "beaucoup",
- "beardude", "bearded",
- "beastley", "beastly",
- "beatiful", "beautiful",
- "beccause", "because",
- "becuasse", "becuase",
- "befirend", "befriend",
- "befreind", "befriend",
- "begginer", "beginner",
- "begginig", "begging",
- "begginng", "begging",
- "begining", "beginning",
- "beginnig", "beginning",
- "behaivor", "behavior",
- "behavios", "behaviours",
- "behavoir", "behavior",
- "behavour", "behavior",
- "behngazi", "benghazi",
- "behtesda", "bethesda",
- "beleived", "believed",
- "beleiver", "believer",
- "beleives", "believes",
- "beliefes", "beliefs",
- "benefica", "beneficial",
- "bengahzi", "benghazi",
- "bengalas", "bengals",
- "bengalos", "bengals",
- "bengazhi", "benghazi",
- "benghzai", "benghazi",
- "bengzhai", "benghazi",
- "benhgazi", "benghazi",
- "benidect", "benedict",
- "benifits", "benefits",
- "berekley", "berkeley",
- "berserkr", "berserker",
- "beseiged", "besieged",
- "betehsda", "bethesda",
- "beteshda", "bethesda",
- "bethdesa", "bethesda",
- "bethedsa", "bethesda",
- "bethseda", "bethesda",
- "beyoncye", "beyonce",
- "bibilcal", "biblical",
- "bicylces", "bicycles",
- "bigfooot", "bigfoot",
- "bigining", "beginning",
- "bilbical", "biblical",
- "billboad", "billboard",
- "bilsters", "blisters",
- "bilzzard", "blizzard",
- "bilzzcon", "blizzcon",
- "biologia", "biological",
- "birhtday", "birthday",
- "birsbane", "brisbane",
- "birthdsy", "birthdays",
- "biseuxal", "bisexual",
- "bisexaul", "bisexual",
- "bitcions", "bitcoins",
- "bitocins", "bitcoins",
- "blackade", "blacked",
- "blackend", "blacked",
- "blackjak", "blackjack",
- "blacklit", "blacklist",
- "blatanty", "blatantly",
- "blessins", "blessings",
- "blessure", "blessing",
- "bloggare", "blogger",
- "bloggeur", "blogger",
- "bluebery", "blueberry",
- "bluetooh", "bluetooth",
- "blugaria", "bulgaria",
- "boardway", "broadway",
- "bollcoks", "bollocks",
- "bomberos", "bombers",
- "bookmars", "bookmarks",
- "boradway", "broadway",
- "boredoom", "boredom",
- "bouldore", "boulder",
- "bounites", "bounties",
- "boutnies", "bounties",
- "boutqiue", "boutique",
- "bouyancy", "buoyancy",
- "boyfried", "boyfriend",
- "bradcast", "broadcast",
- "bradfrod", "bradford",
- "brakeout", "breakout",
- "braodway", "broadway",
- "braverly", "bravery",
- "breathis", "breaths",
- "breathos", "breaths",
- "brekaout", "breakout",
- "brendamn", "brendan",
- "breweres", "brewers",
- "brewerey", "brewery",
- "brewerks", "brewers",
- "brewerys", "brewers",
- "brigaged", "brigade",
- "brigated", "brigade",
- "brigthen", "brighten",
- "briliant", "brilliant",
- "brillant", "brilliant",
- "bristool", "bristol",
- "brithday", "birthday",
- "brittish", "british",
- "briusers", "bruisers",
- "broadbad", "broadband",
- "broadcat", "broadcasts",
- "broadley", "broadly",
- "brocolli", "broccoli",
- "brodaway", "broadway",
- "broncoes", "broncos",
- "broswing", "browsing",
- "browines", "brownies",
- "browisng", "browsing",
- "brtually", "brutally",
- "brugundy", "burgundy",
- "bruisend", "bruised",
- "brussles", "brussels",
- "brusting", "bursting",
- "bubblews", "bubbles",
- "buddhits", "buddhist",
- "buddhsim", "buddhism",
- "buddishm", "buddhism",
- "buddisht", "buddhist",
- "buglaria", "bulgaria",
- "buhddism", "buddhism",
- "buhddist", "buddhist",
- "buidlers", "builders",
- "buidling", "building",
- "buildins", "buildings",
- "buisness", "business",
- "bulagria", "bulgaria",
- "bulgaira", "bulgaria",
- "buliders", "builders",
- "buliding", "building",
- "bulletts", "bullets",
- "burisers", "bruisers",
- "burriots", "burritos",
- "burritio", "burrito",
- "burritto", "burrito",
- "burrtios", "burritos",
- "burssels", "brussels",
- "burtally", "brutally",
- "burtsing", "bursting",
- "busrting", "bursting",
- "butcherd", "butchered",
- "butterey", "buttery",
- "butterfy", "butterfly",
- "butterry", "buttery",
- "butthoel", "butthole",
- "bycicles", "bicycles",
- "cabbagge", "cabbage",
- "cabients", "cabinets",
- "cabinate", "cabinet",
- "cabinent", "cabinet",
- "cabniets", "cabinets",
- "caclulus", "calculus",
- "cafetera", "cafeteria",
- "caffinee", "caffeine",
- "cahsiers", "cashiers",
- "cainster", "canister",
- "calander", "calendar",
- "calcular", "calculator",
- "calgarry", "calgary",
- "calibler", "calibre",
- "caloires", "calories",
- "calrkson", "clarkson",
- "calroies", "calories",
- "calssify", "classify",
- "calulate", "calculate",
- "calymore", "claymore",
- "camapign", "campaign",
- "cambodai", "cambodia",
- "camboida", "cambodia",
- "cambpell", "campbell",
- "cambride", "cambridge",
- "cambrige", "cambridge",
- "camoufle", "camouflage",
- "campagin", "campaign",
- "campaing", "campaign",
- "campains", "campaigns",
- "camperas", "campers",
- "camperos", "campers",
- "canadias", "canadians",
- "cananbis", "cannabis",
- "cancelas", "cancels",
- "canceles", "cancels",
- "cancells", "cancels",
- "canceres", "cancers",
- "cancerns", "cancers",
- "cancerus", "cancers",
- "candiate", "candidate",
- "candiens", "candies",
- "canistre", "canister",
- "cannabil", "cannibal",
- "cannbial", "cannibal",
- "cannibas", "cannabis",
- "cansiter", "canister",
- "capitans", "captains",
- "capitola", "capital",
- "capitulo", "capitol",
- "capmbell", "campbell",
- "capsuels", "capsules",
- "capsulse", "capsules",
- "capsumel", "capsule",
- "capteurs", "captures",
- "captials", "capitals",
- "captians", "captains",
- "capusles", "capsules",
- "caputres", "captures",
- "cardboad", "cardboard",
- "cardianl", "cardinal",
- "cardnial", "cardinal",
- "careflly", "carefully",
- "carefull", "careful",
- "carefuly", "carefully",
- "caricate", "caricature",
- "caridgan", "cardigan",
- "caridnal", "cardinal",
- "carinval", "carnival",
- "carloina", "carolina",
- "carnagie", "carnegie",
- "carnigie", "carnegie",
- "carnvial", "carnival",
- "carrotts", "carrots",
- "carrotus", "carrots",
- "cartells", "cartels",
- "cartmaan", "cartman",
- "cartride", "cartridge",
- "cartrige", "cartridge",
- "carvinal", "carnival",
- "casaulty", "casualty",
- "casheirs", "cashiers",
- "cashieer", "cashier",
- "cashires", "cashiers",
- "castleos", "castles",
- "castlers", "castles",
- "casulaty", "casualty",
- "cataclym", "cataclysm",
- "catagory", "category",
- "cataline", "catiline",
- "cataloge", "catalogue",
- "catalsyt", "catalyst",
- "cataylst", "catalyst",
- "cathloic", "catholic",
- "catlayst", "catalyst",
- "caucasin", "caucasian",
- "causalty", "casualty",
- "cellural", "cellular",
- "celullar", "cellular",
- "celverly", "cleverly",
- "cemetary", "cemetery",
- "centeres", "centers",
- "centerns", "centers",
- "centrase", "centres",
- "centrers", "centres",
- "ceratine", "creatine",
- "cerberal", "cerebral",
- "cerbreus", "cerberus",
- "cerbures", "cerberus",
- "ceremone", "ceremonies",
- "cerimony", "ceremony",
- "ceromony", "ceremony",
- "certainy", "certainty",
- "challege", "challenge",
- "chambear", "chamber",
- "chambres", "chambers",
- "champage", "champagne",
- "chanisaw", "chainsaw",
- "chanlder", "chandler",
- "charcaol", "charcoal",
- "chargehr", "charger",
- "chargeur", "charger",
- "chariman", "chairman",
- "charimsa", "charisma",
- "charmisa", "charisma",
- "charocal", "charcoal",
- "charsima", "charisma",
- "chasiers", "cashiers",
- "chassids", "chassis",
- "chassies", "chassis",
- "chatolic", "catholic",
- "chcukles", "chuckles",
- "checkare", "checker",
- "checkear", "checker",
- "cheesees", "cheeses",
- "cheeseus", "cheeses",
- "cheetoos", "cheetos",
- "chemcial", "chemical",
- "chemisty", "chemistry",
- "chernobl", "chernobyl",
- "chiansaw", "chainsaw",
- "chidlish", "childish",
- "chihuaha", "chihuahua",
- "childres", "childrens",
- "chillade", "chilled",
- "chillead", "chilled",
- "chillend", "chilled",
- "chilvary", "chivalry",
- "chinesse", "chinese",
- "chivarly", "chivalry",
- "chivlary", "chivalry",
- "chlidish", "childish",
- "chlroine", "chlorine",
- "chmabers", "chambers",
- "chocolae", "chocolates",
- "chocolet", "chocolates",
- "choesive", "cohesive",
- "choicers", "choices",
- "cholrine", "chlorine",
- "chorline", "chlorine",
- "chracter", "character",
- "christin", "christian",
- "chroline", "chlorine",
- "chromose", "chromosome",
- "chronice", "chronicles",
- "chruches", "churches",
- "chuckels", "chuckles",
- "cielings", "ceilings",
- "cigarete", "cigarettes",
- "cigarets", "cigarettes",
- "cilmbers", "climbers",
- "cilnatro", "cilantro",
- "ciltoris", "clitoris",
- "circiuts", "circuits",
- "circkets", "crickets",
- "circlebs", "circles",
- "circluar", "circular",
- "ciricuit", "circuit",
- "cirlcing", "circling",
- "ciruclar", "circular",
- "clannand", "clannad",
- "clarifiy", "clarify",
- "clarskon", "clarkson",
- "clasical", "classical",
- "classrom", "classroom",
- "classsic", "classics",
- "clausens", "clauses",
- "cleanies", "cleanse",
- "cleasner", "cleanser",
- "clenaser", "cleanser",
- "clevelry", "cleverly",
- "clhorine", "chlorine",
- "cliamtes", "climates",
- "cliantro", "cilantro",
- "clickare", "clicker",
- "clickbat", "clickbait",
- "clickear", "clicker",
- "clientes", "clients",
- "clincial", "clinical",
- "clinicas", "clinics",
- "clinicos", "clinics",
- "clipboad", "clipboard",
- "clitiros", "clitoris",
- "closeing", "closing",
- "closeley", "closely",
- "clyamore", "claymore",
- "clyinder", "cylinder",
- "cmoputer", "computer",
- "coindice", "coincide",
- "collapes", "collapse",
- "collares", "collars",
- "collaris", "collars",
- "collaros", "collars",
- "collaspe", "collapse",
- "colleage", "colleagues",
- "collecte", "collective",
- "collegue", "colleague",
- "collisin", "collisions",
- "collosal", "colossal",
- "collpase", "collapse",
- "coloardo", "colorado",
- "colordao", "colorado",
- "colubmia", "columbia",
- "columnas", "columns",
- "comadres", "comrades",
- "comander", "commander",
- "comandos", "commandos",
- "comapany", "company",
- "comapres", "compares",
- "combiens", "combines",
- "combinig", "combining",
- "comediac", "comedic",
- "comedias", "comedians",
- "comestic", "cosmetic",
- "comision", "commission",
- "comiting", "committing",
- "comitted", "committed",
- "comittee", "committee",
- "commandd", "commanded",
- "commecen", "commence",
- "commedic", "comedic",
- "commense", "commenters",
- "commenty", "commentary",
- "commiest", "commits",
- "commited", "committed",
- "commitee", "committee",
- "commites", "commits",
- "committe", "committee",
- "committs", "commits",
- "commitus", "commits",
- "commmand", "command",
- "communit", "communist",
- "companis", "companions",
- "comparse", "compares",
- "comparte", "compare",
- "compasso", "compassion",
- "compelte", "complete",
- "compense", "compensate",
- "complais", "complains",
- "complane", "complacent",
- "complate", "complacent",
- "compleet", "complete",
- "completi", "complexity",
- "complets", "completes",
- "complety", "completely",
- "complexs", "complexes",
- "complext", "complexity",
- "complexy", "complexity",
- "complict", "complicit",
- "complier", "compiler",
- "compones", "compose",
- "componet", "components",
- "componts", "compost",
- "composet", "compost",
- "composit", "compost",
- "composte", "compose",
- "comprese", "compressed",
- "compreso", "compressor",
- "compsers", "compress",
- "comptown", "compton",
- "compunet", "compute",
- "computre", "compute",
- "comradre", "comrade",
- "comsetic", "cosmetic",
- "conatins", "contains",
- "conceald", "concealed",
- "conceide", "conceived",
- "conceled", "concede",
- "concened", "concede",
- "concepta", "conceptual",
- "concered", "concede",
- "concernt", "concert",
- "concerte", "concrete",
- "concesso", "concession",
- "conceted", "concede",
- "conceved", "concede",
- "concibes", "concise",
- "concider", "consider",
- "concides", "concise",
- "concious", "conscious",
- "conclued", "conclude",
- "concluse", "conclusive",
- "concluso", "conclusion",
- "concreet", "concrete",
- "concrets", "concerts",
- "condemnd", "condemned",
- "conditon", "condition",
- "condomes", "condoms",
- "condomns", "condoms",
- "conduict", "conduit",
- "conected", "connected",
- "conencts", "connects",
- "confeses", "confess",
- "confesos", "confess",
- "confesso", "confession",
- "configue", "configure",
- "confilct", "conflict",
- "confirmd", "confirmed",
- "conflcit", "conflict",
- "conflics", "conflicts",
- "confrims", "confirms",
- "conicide", "coincide",
- "conlcude", "conclude",
- "conqueor", "conquer",
- "conquerd", "conquered",
- "conqured", "conquered",
- "conscent", "consent",
- "consious", "conscious",
- "constans", "constants",
- "constast", "constants",
- "constatn", "constant",
- "constrat", "constraint",
- "construt", "constructs",
- "containd", "contained",
- "containg", "containing",
- "contaire", "containers",
- "contanti", "contacting",
- "contense", "contenders",
- "contenst", "contents",
- "contexta", "contextual",
- "contextl", "contextual",
- "contians", "contains",
- "contined", "continued",
- "contines", "continents",
- "continum", "continuum",
- "continus", "continues",
- "continut", "continuity",
- "continuu", "continuous",
- "contracr", "contractor",
- "contracs", "contracts",
- "controll", "control",
- "convenit", "convenient",
- "convento", "convention",
- "converst", "converts",
- "convertr", "converter",
- "conviced", "convinced",
- "convicto", "conviction",
- "convingi", "convincing",
- "convinse", "convinces",
- "cooldows", "cooldowns",
- "coordine", "coordinate",
- "coralina", "carolina",
- "corollla", "corolla",
- "corolloa", "corolla",
- "corosion", "corrosion",
- "corpsers", "corpses",
- "corrdior", "corridor",
- "correcty", "correctly",
- "correnti", "correcting",
- "corretly", "correctly",
- "corrupto", "corruption",
- "cosemtic", "cosmetic",
- "cosutmes", "costumes",
- "couldnot", "couldnt",
- "coulored", "coloured",
- "counries", "countries",
- "counseil", "counsel",
- "counsole", "counsel",
- "counterd", "countered",
- "countert", "counteract",
- "countres", "counters",
- "courtrom", "courtroom",
- "courtsey", "courtesy",
- "cousines", "cousins",
- "cousings", "cousins",
- "coutners", "counters",
- "covanent", "covenant",
- "coverted", "converted",
- "coyotees", "coyotes",
- "cpatains", "captains",
- "cranbery", "cranberry",
- "crayones", "crayons",
- "creaeted", "created",
- "createin", "creatine",
- "createur", "creature",
- "creatien", "creatine",
- "creepgin", "creeping",
- "cricling", "circling",
- "cringely", "cringey",
- "cringery", "cringey",
- "criticas", "critics",
- "critices", "critics",
- "criticie", "criticise",
- "criticim", "criticisms",
- "criticis", "critics",
- "criticms", "critics",
- "criticos", "critics",
- "criticts", "critics",
- "criticus", "critics",
- "critiera", "criteria",
- "critized", "criticized",
- "croatioa", "croatia",
- "crossfie", "crossfire",
- "crosshar", "crosshair",
- "crosspot", "crosspost",
- "crowbahr", "crowbar",
- "cruasder", "crusader",
- "cruciaal", "crucial",
- "crucibel", "crucible",
- "cruicble", "crucible",
- "crusdaer", "crusader",
- "crusiers", "cruisers",
- "crusiing", "cruising",
- "cruthces", "crutches",
- "cthulhlu", "cthulhu",
- "cthulluh", "cthulhu",
- "cubpoard", "cupboard",
- "cuddleys", "cuddles",
- "culprint", "culprit",
- "cultrual", "cultural",
- "culutral", "cultural",
- "cupbaord", "cupboard",
- "cupborad", "cupboard",
- "curcible", "crucible",
- "curisers", "cruisers",
- "curising", "cruising",
- "currecny", "currency",
- "currence", "currencies",
- "currenly", "currently",
- "currenty", "currently",
- "cursader", "crusader",
- "custcene", "cutscene",
- "cutsceen", "cutscene",
- "cutscens", "cutscenes",
- "cutsence", "cutscene",
- "cylcists", "cyclists",
- "cylidner", "cylinder",
- "cylindre", "cylinder",
- "cynisicm", "cynicism",
- "cyrstals", "crystals",
- "dacquiri", "daiquiri",
- "daimonds", "diamonds",
- "dangeros", "dangers",
- "dangerus", "dangers",
- "darkenss", "darkness",
- "darnkess", "darkness",
- "dashboad", "dashboard",
- "daugther", "daughter",
- "deadlfit", "deadlift",
- "deadlifs", "deadlifts",
- "deafeted", "defeated",
- "deafults", "defaults",
- "dealying", "delaying",
- "deamenor", "demeanor",
- "deathcat", "deathmatch",
- "debuffes", "debuffs",
- "debufffs", "debuffs",
- "decalred", "declared",
- "decalres", "declares",
- "decembre", "december",
- "decidely", "decidedly",
- "decieved", "deceived",
- "decifits", "deficits",
- "decipted", "depicted",
- "declears", "declares",
- "declinig", "declining",
- "decmeber", "december",
- "decribed", "described",
- "decribes", "describes",
- "dedicato", "dedication",
- "deductie", "deductible",
- "defautls", "defaults",
- "defectos", "defects",
- "defectus", "defects",
- "defendas", "defends",
- "defendes", "defenders",
- "defendis", "defends",
- "defendre", "defender",
- "defendrs", "defends",
- "defensea", "defenseman",
- "defensen", "defenseman",
- "defensie", "defensive",
- "defetead", "defeated",
- "deffined", "defined",
- "deficiet", "deficient",
- "definate", "definite",
- "definaty", "definately",
- "definety", "definetly",
- "definito", "definition",
- "definitv", "definitive",
- "deflatin", "deflation",
- "deflecto", "deflection",
- "defualts", "defaults",
- "degarded", "degraded",
- "degenere", "degenerate",
- "degraged", "degrade",
- "degrated", "degrade",
- "deisgned", "designed",
- "deisgner", "designer",
- "dekstops", "desktops",
- "delcared", "declared",
- "delcares", "declares",
- "delepted", "depleted",
- "delivere", "deliveries",
- "delpeted", "depleted",
- "delpoyed", "deployed",
- "delyaing", "delaying",
- "demandas", "demands",
- "demandes", "demands",
- "demenaor", "demeanor",
- "democray", "democracy",
- "demolito", "demolition",
- "denseley", "densely",
- "densitiy", "density",
- "deomcrat", "democrat",
- "deovtion", "devotion",
- "departer", "departure",
- "departue", "departure",
- "depcited", "depicted",
- "depelted", "depleted",
- "dependat", "dependant",
- "depictes", "depicts",
- "depictin", "depictions",
- "depolyed", "deployed",
- "depositd", "deposited",
- "depostis", "deposits",
- "depresse", "depressive",
- "depresso", "depression",
- "derivate", "derivative",
- "descened", "descend",
- "descibed", "described",
- "descirbe", "describe",
- "descrise", "describes",
- "desgined", "designed",
- "desginer", "designer",
- "desicive", "decisive",
- "designad", "designated",
- "designes", "designs",
- "designet", "designated",
- "desinged", "designed",
- "desinger", "designer",
- "desitned", "destined",
- "desktiop", "desktop",
- "desorder", "disorder",
- "despides", "despised",
- "despiste", "despise",
- "destiney", "destiny",
- "destinty", "destiny",
- "destkops", "desktops",
- "destorys", "destroys",
- "destrose", "destroyers",
- "destroyd", "destroyed",
- "destroyr", "destroyers",
- "detalied", "detailed",
- "detectas", "detects",
- "detectes", "detects",
- "detectie", "detectives",
- "determen", "determines",
- "devasted", "devastated",
- "develope", "develop",
- "devialet", "deviate",
- "deviatie", "deviate",
- "devilers", "delivers",
- "devloved", "devolved",
- "devovled", "devolved",
- "diaganol", "diagonal",
- "diagnoal", "diagonal",
- "diagnoes", "diagnose",
- "diagnosi", "diagnostic",
- "diagonse", "diagnose",
- "diahrrea", "diarrhea",
- "dialetcs", "dialects",
- "dialgoue", "dialogue",
- "dialouge", "dialogue",
- "diarreah", "diarrhea",
- "diarreha", "diarrhea",
- "dichtomy", "dichotomy",
- "dickisch", "dickish",
- "dicovers", "discovers",
- "dicovery", "discovery",
- "dicussed", "discussed",
- "diferent", "different",
- "differnt", "different",
- "difficut", "difficulty",
- "diffrent", "different",
- "diganose", "diagnose",
- "dignitiy", "dignity",
- "dimaonds", "diamonds",
- "dinasour", "dinosaur",
- "dinosaus", "dinosaurs",
- "dinosuar", "dinosaur",
- "dinsoaur", "dinosaur",
- "dionsaur", "dinosaur",
- "diphtong", "diphthong",
- "diplomma", "diploma",
- "dipthong", "diphthong",
- "direclty", "directly",
- "directin", "directions",
- "directix", "directx",
- "directos", "directors",
- "directoy", "directory",
- "directrx", "directx",
- "dirfting", "drifting",
- "disabeld", "disabled",
- "disabels", "disables",
- "disagred", "disagreed",
- "disagres", "disagrees",
- "disbaled", "disabled",
- "disbales", "disables",
- "disbelif", "disbelief",
- "dischard", "discharged",
- "dischare", "discharged",
- "discound", "discounted",
- "discoure", "discourse",
- "discoved", "discovered",
- "discreto", "discretion",
- "discribe", "describe",
- "disentry", "dysentery",
- "disgiuse", "disguise",
- "dishoner", "dishonored",
- "dishonet", "dishonesty",
- "dislikse", "dislikes",
- "dismante", "dismantle",
- "dismisse", "dismissive",
- "disolved", "dissolved",
- "dispacth", "dispatch",
- "dispalys", "displays",
- "dispence", "dispense",
- "dispersa", "dispensary",
- "displayd", "displayed",
- "disposle", "dispose",
- "disposte", "dispose",
- "dispoves", "dispose",
- "disptach", "dispatch",
- "disricts", "districts",
- "dissovle", "dissolve",
- "distates", "distaste",
- "distatse", "distaste",
- "disticnt", "distinct",
- "distorto", "distortion",
- "distrcit", "district",
- "districs", "districts",
- "disturbd", "disturbed",
- "disupted", "disputed",
- "disuptes", "disputes",
- "diversed", "diverse",
- "diversiy", "diversify",
- "dividens", "dividends",
- "divintiy", "divinity",
- "divisons", "divisions",
- "doapmine", "dopamine",
- "docrines", "doctrines",
- "docrtine", "doctrine",
- "doctines", "doctrines",
- "doctirne", "doctrine",
- "doctrins", "doctrines",
- "dogamtic", "dogmatic",
- "dolhpins", "dolphins",
- "domapine", "dopamine",
- "domecrat", "democrat",
- "domiante", "dominate",
- "dominato", "domination",
- "dominats", "dominates",
- "dominent", "dominant",
- "dominoin", "dominion",
- "donwload", "download",
- "donwvote", "downvote",
- "doomdsay", "doomsday",
- "doosmday", "doomsday",
- "doplhins", "dolphins",
- "dopmaine", "dopamine",
- "dormtund", "dortmund",
- "dortumnd", "dortmund",
- "dotrmund", "dortmund",
- "douchely", "douchey",
- "doucheus", "douches",
- "dowloads", "downloads",
- "downlaod", "download",
- "downloas", "downloads",
- "downstar", "downstairs",
- "downvore", "downvoters",
- "downvotr", "downvoters",
- "downvots", "downvotes",
- "draculea", "dracula",
- "draculla", "dracula",
- "dragones", "dragons",
- "dragonus", "dragons",
- "drfiting", "drifting",
- "driectly", "directly",
- "drifitng", "drifting",
- "driveris", "drivers",
- "drotmund", "dortmund",
- "duaghter", "daughter",
- "dumbbels", "dumbbells",
- "dumptser", "dumpster",
- "dumspter", "dumpster",
- "dunegons", "dungeons",
- "dungeoun", "dungeon",
- "dungoens", "dungeons",
- "dupicate", "duplicate",
- "duplicas", "duplicates",
- "dwarvens", "dwarves",
- "dyanmics", "dynamics",
- "dyanmite", "dynamite",
- "dymanics", "dynamics",
- "dymanite", "dynamite",
- "dynastry", "dynasty",
- "dysentry", "dysentery",
- "dysphora", "dysphoria",
- "earilest", "earliest",
- "eatswood", "eastwood",
- "eceonomy", "economy",
- "ecidious", "deciduous",
- "ecologia", "ecological",
- "ecomonic", "economic",
- "ecstacys", "ecstasy",
- "ecstascy", "ecstasy",
- "ecstasty", "ecstasy",
- "ectastic", "ecstatic",
- "editoras", "editors",
- "editores", "editors",
- "efficent", "efficient",
- "egpytian", "egyptian",
- "egyptain", "egyptian",
- "egytpian", "egyptian",
- "ehtereal", "ethereal",
- "ehternet", "ethernet",
- "eigtheen", "eighteen",
- "electhor", "electro",
- "electorn", "electron",
- "elementy", "elementary",
- "elephans", "elephants",
- "elevatin", "elevation",
- "elicided", "elicited",
- "eligable", "eligible",
- "elimiate", "eliminate",
- "eliminas", "eliminates",
- "elitisim", "elitism",
- "elitistm", "elitism",
- "ellected", "elected",
- "embarass", "embarrass",
- "embargos", "embargoes",
- "embarras", "embarrass",
- "embassay", "embassy",
- "embassey", "embassy",
- "embasssy", "embassy",
- "emergend", "emerged",
- "emergerd", "emerged",
- "eminated", "emanated",
- "emminent", "eminent",
- "emmisary", "emissary",
- "emmision", "emission",
- "emmiting", "emitting",
- "emmitted", "emitted",
- "empathie", "empathize",
- "empirial", "empirical",
- "emulatin", "emulation",
- "enahnces", "enhances",
- "enchanct", "enchant",
- "encolsed", "enclosed",
- "endanged", "endangered",
- "endevors", "endeavors",
- "endevour", "endeavour",
- "endlessy", "endlessly",
- "endorces", "endorse",
- "engeneer", "engineer",
- "engeries", "energies",
- "engineed", "engineered",
- "engrames", "engrams",
- "engramms", "engrams",
- "enigneer", "engineer",
- "enitrely", "entirely",
- "enlcosed", "enclosed",
- "enlsaved", "enslaved",
- "ensalved", "enslaved",
- "enterity", "entirety",
- "entierly", "entirely",
- "entierty", "entirety",
- "entilted", "entitled",
- "entirley", "entirely",
- "entiteld", "entitled",
- "entitity", "entity",
- "entropay", "entropy",
- "entrophy", "entropy",
- "ephipany", "epiphany",
- "epihpany", "epiphany",
- "epilespy", "epilepsy",
- "epilgoue", "epilogue",
- "episdoes", "episodes",
- "epitomie", "epitome",
- "epliepsy", "epilepsy",
- "epliogue", "epilogue",
- "epsiodes", "episodes",
- "epsresso", "espresso",
- "eqaulity", "equality",
- "eqaution", "equation",
- "equailty", "equality",
- "eraticly", "erratically",
- "erroneos", "erroneous",
- "errupted", "erupted",
- "escalato", "escalation",
- "esctatic", "ecstatic",
- "esential", "essential",
- "esitmate", "estimate",
- "esperate", "seperate",
- "esportes", "esports",
- "estiamte", "estimate",
- "estoeric", "esoteric",
- "estonija", "estonia",
- "estoniya", "estonia",
- "etherael", "ethereal",
- "etherent", "ethernet",
- "ethicaly", "ethically",
- "etiquete", "etiquette",
- "etrailer", "retailer",
- "eugencis", "eugenics",
- "eugneics", "eugenics",
- "euhporia", "euphoria",
- "euhporic", "euphoric",
- "euorpean", "european",
- "euphoira", "euphoria",
- "euphroia", "euphoria",
- "euphroic", "euphoric",
- "europian", "european",
- "eurpoean", "european",
- "evangers", "avengers",
- "everyons", "everyones",
- "evidencd", "evidenced",
- "evidende", "evidenced",
- "evloving", "evolving",
- "evolveds", "evolves",
- "evolveos", "evolves",
- "evovling", "evolving",
- "excecute", "execute",
- "excedded", "exceeded",
- "excelent", "excellent",
- "exceptin", "exceptions",
- "excerise", "exercise",
- "excisted", "existed",
- "exclusie", "exclusives",
- "exculded", "excluded",
- "exculdes", "excludes",
- "exection", "execution",
- "exectued", "executed",
- "executie", "executive",
- "executin", "execution",
- "exellent", "excellent",
- "exerbate", "exacerbate",
- "exercide", "exercised",
- "exercies", "exercise",
- "exersice", "exercise",
- "exersize", "exercise",
- "exhalted", "exalted",
- "exhaustn", "exhaustion",
- "exhausto", "exhaustion",
- "exicting", "exciting",
- "exisitng", "existing",
- "existane", "existance",
- "existant", "existent",
- "existend", "existed",
- "exlcuded", "excluded",
- "exlcudes", "excludes",
- "exlporer", "explorer",
- "exoticas", "exotics",
- "exoticos", "exotics",
- "expalins", "explains",
- "expandas", "expands",
- "expandes", "expands",
- "expansie", "expansive",
- "expectes", "expects",
- "expectus", "expects",
- "expedito", "expedition",
- "expences", "expense",
- "expensie", "expense",
- "expensve", "expense",
- "expertas", "experts",
- "expertis", "experts",
- "expertos", "experts",
- "expireds", "expires",
- "explaind", "explained",
- "explaing", "explaining",
- "expliots", "exploits",
- "explodie", "explode",
- "exploint", "exploit",
- "explosie", "explosive",
- "explosin", "explosions",
- "exploted", "explode",
- "expoldes", "explodes",
- "expolits", "exploits",
- "exportas", "exports",
- "exportes", "exports",
- "exportfs", "exports",
- "exposees", "exposes",
- "exposito", "exposition",
- "expresse", "expressive",
- "expresss", "expresses",
- "expressy", "expressly",
- "exressed", "expressed",
- "exsitent", "existent",
- "exsiting", "existing",
- "extactly", "exactly",
- "extemely", "extremely",
- "extendes", "extends",
- "extendos", "extends",
- "extenion", "extension",
- "extensie", "extensive",
- "extensis", "extensions",
- "extortin", "extortion",
- "extracto", "extraction",
- "extreems", "extremes",
- "extremly", "extremely",
- "eygptian", "egyptian",
- "faboulus", "fabulous",
- "fabricas", "fabrics",
- "fabrices", "fabrics",
- "fabricus", "fabrics",
- "faceplam", "facepalm",
- "facilisi", "facilities",
- "faciltiy", "facility",
- "facsists", "fascists",
- "factores", "factors",
- "factorys", "factors",
- "factualy", "factually",
- "faggotts", "faggots",
- "faggotus", "faggots",
- "falcones", "falcons",
- "falgship", "flagship",
- "faliures", "failures",
- "falseley", "falsely",
- "falshing", "flashing",
- "falvored", "flavored",
- "falvours", "flavours",
- "familair", "familiar",
- "famoulsy", "famously",
- "fanatism", "fanaticism",
- "fanatsic", "fanatics",
- "fanserve", "fanservice",
- "fantasty", "fantasy",
- "farcking", "fracking",
- "fascisim", "fascism",
- "fashiond", "fashioned",
- "fasicsts", "fascists",
- "fatigure", "fatigue",
- "favorits", "favorites",
- "favourie", "favourites",
- "feasable", "feasible",
- "feasbile", "feasible",
- "febraury", "february",
- "februray", "february",
- "feburary", "february",
- "fedility", "fidelity",
- "fedorahs", "fedoras",
- "fedorans", "fedoras",
- "feilding", "fielding",
- "feisable", "feasible",
- "feitshes", "fetishes",
- "feltcher", "fletcher",
- "felxible", "flexible",
- "feminint", "femininity",
- "feminsim", "feminism",
- "feromone", "pheromone",
- "fesiable", "feasible",
- "festivas", "festivals",
- "festivle", "festive",
- "fictious", "fictitious",
- "fideling", "fielding",
- "fideltiy", "fidelity",
- "fiedling", "fielding",
- "fiedlity", "fidelity",
- "fighitng", "fighting",
- "figthing", "fighting",
- "fileding", "fielding",
- "fimilies", "families",
- "finacial", "financial",
- "fineshes", "finesse",
- "fingersi", "fingertips",
- "finnisch", "finnish",
- "finsihes", "finishes",
- "firebals", "fireballs",
- "firendly", "friendly",
- "firmwear", "firmware",
- "firwmare", "firmware",
- "flaghsip", "flagship",
- "flamable", "flammable",
- "flasghip", "flagship",
- "flatterd", "flattered",
- "flatteur", "flatter",
- "flattire", "flatter",
- "flavores", "flavors",
- "flechter", "fletcher",
- "flecther", "fletcher",
- "flemmish", "flemish",
- "flethcer", "fletcher",
- "flexbile", "flexible",
- "flexibel", "flexible",
- "flippade", "flipped",
- "flitered", "filtered",
- "florecen", "florence",
- "floridia", "florida",
- "floruide", "fluoride",
- "floruish", "flourish",
- "flourine", "fluorine",
- "floursih", "flourish",
- "fluorish", "flourish",
- "fluroide", "fluoride",
- "folowing", "following",
- "fontrier", "fontier",
- "forasken", "forsaken",
- "forbiden", "forbidden",
- "foreamrs", "forearms",
- "foreksin", "foreskin",
- "forenics", "forensic",
- "forenisc", "forensic",
- "foresnic", "forensic",
- "foreward", "foreword",
- "foricbly", "forcibly",
- "forigven", "forgiven",
- "formatin", "formation",
- "formelly", "formerly",
- "formuals", "formulas",
- "fornesic", "forensic",
- "forresst", "forrest",
- "forsekan", "forsaken",
- "forsekin", "foreskin",
- "forsenic", "forensic",
- "forskaen", "forsaken",
- "forsting", "frosting",
- "fortitue", "fortitude",
- "fortunae", "fortune",
- "fortunte", "fortune",
- "forumlas", "formulas",
- "forunner", "forerunner",
- "fossiles", "fossils",
- "fossilis", "fossils",
- "foundary", "foundry",
- "fountian", "fountain",
- "fourties", "forties",
- "fowrards", "forwards",
- "frackign", "fracking",
- "framgent", "fragment",
- "franches", "franchise",
- "franchie", "franchises",
- "franciso", "francisco",
- "frankiln", "franklin",
- "franlkin", "franklin",
- "freckels", "freckles",
- "freindly", "friendly",
- "frequeny", "frequency",
- "friendle", "friendlies",
- "friendsi", "friendlies",
- "frimware", "firmware",
- "frogiven", "forgiven",
- "frointer", "frontier",
- "fromerly", "formerly",
- "froniter", "frontier",
- "fronteir", "frontier",
- "frosaken", "forsaken",
- "frutcose", "fructose",
- "fucntion", "function",
- "fufilled", "fulfilled",
- "fulfiled", "fulfilled",
- "fullfill", "fulfill",
- "funciton", "function",
- "fundirse", "fundies",
- "funniliy", "funnily",
- "funnilly", "funnily",
- "furctose", "fructose",
- "furition", "fruition",
- "furuther", "further",
- "futurers", "futures",
- "futureus", "futures",
- "gamemdoe", "gamemode",
- "gamepaly", "gameplay",
- "gamergat", "gamertag",
- "gammeode", "gamemode",
- "ganerate", "generate",
- "garantee", "guarantee",
- "gardient", "gradient",
- "garfeild", "garfield",
- "garfiled", "garfield",
- "garflied", "garfield",
- "garnison", "garrison",
- "garrions", "garrison",
- "garriosn", "garrison",
- "garrsion", "garrison",
- "gatherig", "gatherings",
- "gauarana", "guaraná",
- "gauntelt", "gauntlet",
- "gauntles", "gauntlets",
- "gaurdian", "guardian",
- "gaurding", "guarding",
- "gautnlet", "gauntlet",
- "gemoetry", "geometry",
- "generaly", "generally",
- "generase", "generates",
- "generats", "generates",
- "genialia", "genitalia",
- "genisues", "geniuses",
- "genitala", "genitalia",
- "genrates", "generates",
- "gentials", "genitals",
- "gentlemn", "gentlemen",
- "genuises", "geniuses",
- "geograpy", "geography",
- "geomerty", "geometry",
- "geomtery", "geometry",
- "germanos", "germans",
- "germanus", "germans",
- "gernades", "grenades",
- "giagbyte", "gigabyte",
- "gigabtye", "gigabyte",
- "gigaybte", "gigabyte",
- "gigbayte", "gigabyte",
- "gignatic", "gigantic",
- "giltched", "glitched",
- "giltches", "glitches",
- "girafffe", "giraffe",
- "girefing", "griefing",
- "girlling", "grilling",
- "gladiatr", "gladiator",
- "glichted", "glitched",
- "glichtes", "glitches",
- "glicthed", "glitched",
- "glicthes", "glitches",
- "glitchey", "glitchy",
- "glitchly", "glitchy",
- "glitchty", "glitchy",
- "glithced", "glitched",
- "glithces", "glitches",
- "gloablly", "globally",
- "glodberg", "goldberg",
- "glodfish", "goldfish",
- "gloriuos", "glorious",
- "gltiched", "glitched",
- "gltiches", "glitches",
- "gmaertag", "gamertag",
- "goblings", "goblins",
- "goddammn", "goddamn",
- "goddammt", "goddammit",
- "godesses", "goddesses",
- "godlberg", "goldberg",
- "godlfish", "goldfish",
- "godounov", "godunov",
- "godpseed", "godspeed",
- "godspede", "godspeed",
- "goldifsh", "goldfish",
- "gonewidl", "gonewild",
- "goodlcuk", "goodluck",
- "goregous", "gorgeous",
- "gorgoeus", "gorgeous",
- "gorillia", "gorilla",
- "gorillla", "gorilla",
- "gospells", "gospels",
- "gottleib", "gottlieb",
- "gourmelt", "gourmet",
- "gourment", "gourmet",
- "gouvener", "governor",
- "govement", "government",
- "goverend", "governed",
- "govermet", "goverment",
- "governer", "governor",
- "gradualy", "gradually",
- "grafield", "garfield",
- "grafitti", "graffiti",
- "grahpics", "graphics",
- "grahpite", "graphite",
- "graident", "gradient",
- "granolla", "granola",
- "graphcis", "graphics",
- "grapichs", "graphics",
- "grappnel", "grapple",
- "greandes", "grenades",
- "greatful", "grateful",
- "greeneer", "greener",
- "greenhoe", "greenhouse",
- "greenlad", "greenland",
- "greenore", "greener",
- "greusome", "gruesome",
- "grieifng", "griefing",
- "grifeing", "griefing",
- "grizzlay", "grizzly",
- "grizzley", "grizzly",
- "grpahics", "graphics",
- "grpahite", "graphite",
- "gruseome", "gruesome",
- "guantano", "guantanamo",
- "guardain", "guardian",
- "guardias", "guardians",
- "guaridan", "guardian",
- "guerrila", "guerrilla",
- "guidence", "guidance",
- "guiseppe", "giuseppe",
- "guitards", "guitars",
- "guitares", "guitars",
- "guitarit", "guitarist",
- "gullbile", "gullible",
- "gunanine", "guanine",
- "guniness", "guinness",
- "gunniess", "guinness",
- "guradian", "guardian",
- "gurading", "guarding",
- "gurantee", "guarantee",
- "guresome", "gruesome",
- "guttaral", "guttural",
- "gutteral", "guttural",
- "hacthing", "hatching",
- "hafltime", "halftime",
- "haircuit", "haircut",
- "halfitme", "halftime",
- "hallowen", "halloween",
- "hamburgr", "hamburgers",
- "hamitlon", "hamilton",
- "hamliton", "hamilton",
- "handcufs", "handcuffs",
- "handeldy", "handedly",
- "handlade", "handled",
- "handlare", "handler",
- "handledy", "handedly",
- "hannbial", "hannibal",
- "haording", "hoarding",
- "hapening", "happening",
- "happends", "happens",
- "happenes", "happens",
- "happilly", "happily",
- "harldine", "hardline",
- "harrased", "harassed",
- "harrases", "harasses",
- "hatchign", "hatching",
- "hatesink", "heatsink",
- "hathcing", "hatching",
- "headachs", "headaches",
- "headests", "headsets",
- "headhsot", "headshot",
- "headseat", "headset",
- "healthit", "healthiest",
- "heastink", "heatsink",
- "heathern", "heathen",
- "heatskin", "heatsink",
- "heaviliy", "heavily",
- "heavilly", "heavily",
- "heavnely", "heavenly",
- "hedeghog", "hedgehog",
- "hegdehog", "hedgehog",
- "heighest", "heights",
- "heighted", "heightened",
- "heirachy", "hierarchy",
- "heistant", "hesitant",
- "heistate", "hesitate",
- "hellifre", "hellfire",
- "helluvva", "helluva",
- "helpfull", "helpful",
- "heratige", "heritage",
- "herclues", "hercules",
- "heridity", "heredity",
- "heroicas", "heroics",
- "heroices", "heroics",
- "heroicos", "heroics",
- "heroicus", "heroics",
- "hertiage", "heritage",
- "herucles", "hercules",
- "hestiant", "hesitant",
- "hestiate", "hesitate",
- "heveanly", "heavenly",
- "hierachy", "hierarchy",
- "hierarcy", "hierarchy",
- "highlane", "highlander",
- "hindiusm", "hinduism",
- "hindusim", "hinduism",
- "hinudism", "hinduism",
- "hiptsers", "hipsters",
- "hispanis", "hispanics",
- "hispters", "hipsters",
- "histroic", "historic",
- "hodlings", "holdings",
- "hoenstly", "honestly",
- "hoildays", "holidays",
- "holdiays", "holidays",
- "hollywod", "hollywood",
- "homeword", "homeworld",
- "homineim", "hominem",
- "homineum", "hominem",
- "honeslty", "honestly",
- "honeymon", "honeymoon",
- "honsetly", "honestly",
- "hopefuly", "hopefully",
- "hopkings", "hopkins",
- "hopsital", "hospital",
- "horading", "hoarding",
- "horzions", "horizons",
- "hosptial", "hospital",
- "hosteles", "hostels",
- "hostiliy", "hostility",
- "hotshoot", "hotshot",
- "hotsport", "hotspot",
- "hsyteria", "hysteria",
- "htaching", "hatching",
- "htiboxes", "hitboxes",
- "huanting", "haunting",
- "humaniod", "humanoid",
- "humanite", "humanities",
- "humantiy", "humanity",
- "humerous", "humorous",
- "huminoid", "humanoid",
- "humitidy", "humidity",
- "humoural", "humoral",
- "humouros", "humorous",
- "humurous", "humorous",
- "hunderds", "hundreds",
- "hundread", "hundred",
- "hungarin", "hungarian",
- "huntmsan", "huntsman",
- "hutnsman", "huntsman",
- "hybrides", "hybrids",
- "hybridus", "hybrids",
- "hydorgen", "hydrogen",
- "hydratin", "hydration",
- "hydregon", "hydrogen",
- "hygience", "hygiene",
- "hygienne", "hygiene",
- "hyperbel", "hyperbole",
- "hypocrit", "hypocrite",
- "hyponsis", "hypnosis",
- "hyrdogen", "hydrogen",
- "icefrong", "icefrog",
- "icelings", "ceilings",
- "idaeidae", "idea",
- "idealogy", "ideology",
- "idealsim", "idealism",
- "idenfity", "identify",
- "idenitfy", "identify",
- "identite", "identities",
- "ideologe", "ideologies",
- "illiegal", "illegal",
- "illinios", "illinois",
- "illionis", "illinois",
- "illnesss", "illnesses",
- "illumini", "illuminati",
- "illustre", "illustrate",
- "illution", "illusion",
- "ilogical", "illogical",
- "ilterate", "literate",
- "imapired", "impaired",
- "imgrants", "migrants",
- "imigrant", "emigrant",
- "immboile", "immobile",
- "immenint", "imminent",
- "immersie", "immerse",
- "immersve", "immerse",
- "immitate", "imitate",
- "immoblie", "immobile",
- "immortas", "immortals",
- "impactes", "impacts",
- "impactos", "impacts",
- "imparied", "impaired",
- "imperavi", "imperative",
- "imperfet", "imperfect",
- "implemet", "implements",
- "implosed", "implode",
- "impluses", "impulses",
- "imporper", "improper",
- "importas", "imports",
- "importen", "importance",
- "importes", "imports",
- "imporved", "improved",
- "imporves", "improves",
- "impropre", "improper",
- "improted", "imported",
- "improvie", "improvised",
- "impusles", "impulses",
- "imrpoved", "improved",
- "imrpoves", "improves",
- "inbetwen", "inbetween",
- "inclince", "incline",
- "inclinde", "incline",
- "includng", "including",
- "incorect", "incorrect",
- "incuding", "including",
- "inculded", "included",
- "indianas", "indians",
- "indiands", "indians",
- "indiania", "indiana",
- "indianna", "indiana",
- "indianos", "indians",
- "indicato", "indication",
- "indicats", "indicators",
- "indonesa", "indonesia",
- "indulgue", "indulge",
- "infantis", "infants",
- "infantus", "infants",
- "infarred", "infrared",
- "infectin", "infections",
- "infermon", "inferno",
- "infiltre", "infiltrate",
- "infintie", "infinite",
- "infintiy", "infinity",
- "inflatie", "inflate",
- "influens", "influences",
- "informas", "informs",
- "informis", "informs",
- "infromal", "informal",
- "infromed", "informed",
- "ingenius", "ingenious",
- "ingition", "ignition",
- "ingorant", "ignorant",
- "inheriet", "inherit",
- "inherint", "inherit",
- "inhumaan", "inhuman",
- "inhumain", "inhuman",
- "inifnite", "infinite",
- "inifnity", "infinity",
- "inisghts", "insights",
- "initails", "initials",
- "initaite", "initiate",
- "initaled", "initialed",
- "initally", "initially",
- "initialy", "initially",
- "initmacy", "intimacy",
- "initmate", "intimate",
- "injustie", "injustices",
- "inlcuded", "included",
- "inlcudes", "includes",
- "innocens", "innocents",
- "innocuos", "innocuous",
- "innvoate", "innovate",
- "inocence", "innocence",
- "inpolite", "impolite",
- "inpsired", "inspired",
- "inquirey", "inquiry",
- "inquirie", "inquire",
- "inquiriy", "inquiry",
- "inrested", "inserted",
- "insanley", "insanely",
- "insectes", "insects",
- "insectos", "insects",
- "insertas", "inserts",
- "insertes", "inserts",
- "insertos", "inserts",
- "insidios", "insidious",
- "insigths", "insights",
- "insipred", "inspired",
- "insipres", "inspires",
- "insistas", "insists",
- "insistes", "insists",
- "insistis", "insists",
- "insmonia", "insomnia",
- "insomina", "insomnia",
- "insonmia", "insomnia",
- "inspried", "inspired",
- "inspries", "inspires",
- "instanse", "instances",
- "instanty", "instantly",
- "instered", "inserted",
- "insticnt", "instinct",
- "instincs", "instincts",
- "institue", "institute",
- "insultas", "insults",
- "insultes", "insults",
- "insultos", "insults",
- "intamicy", "intimacy",
- "intamite", "intimate",
- "intendes", "intends",
- "intendos", "intends",
- "intentas", "intents",
- "intented", "intended",
- "interace", "interacted",
- "interacs", "interacts",
- "interect", "interacted",
- "interent", "internet",
- "interese", "interested",
- "interfce", "interface",
- "intergal", "integral",
- "internts", "interns",
- "internus", "interns",
- "interpet", "interpret",
- "interrim", "interim",
- "interste", "interstate",
- "interupt", "interrupt",
- "intevene", "intervene",
- "intially", "initially",
- "intiials", "initials",
- "intimaty", "intimately",
- "intimide", "intimidate",
- "intregal", "integral",
- "intriuge", "intrigue",
- "introdue", "introduces",
- "introdus", "introduces",
- "introvet", "introvert",
- "intruige", "intrigue",
- "intutive", "intuitive",
- "inudstry", "industry",
- "inventer", "inventor",
- "invertes", "inverse",
- "invincil", "invincible",
- "invitato", "invitation",
- "invloved", "involved",
- "invloves", "involves",
- "invovled", "involved",
- "invovles", "involves",
- "iranains", "iranians",
- "iraninas", "iranians",
- "iritable", "irritable",
- "iritated", "irritated",
- "ironicly", "ironically",
- "irritato", "irritation",
- "isalmist", "islamist",
- "isarelis", "israelis",
- "islamits", "islamist",
- "islamsit", "islamist",
- "islandes", "islanders",
- "ismalist", "islamist",
- "isntalls", "installs",
- "isolatie", "isolate",
- "israelli", "israeli",
- "israleis", "israelis",
- "isralies", "israelis",
- "isrealis", "israelis",
- "issueing", "issuing",
- "italains", "italians",
- "jaguards", "jaguars",
- "jaguares", "jaguars",
- "jailbrek", "jailbreak",
- "jaimacan", "jamaican",
- "jamacain", "jamaican",
- "jamaicia", "jamaica",
- "jamiacan", "jamaican",
- "januaray", "january",
- "janurary", "january",
- "jeapardy", "jeopardy",
- "jefferry", "jeffery",
- "jefferty", "jeffery",
- "jennigns", "jennings",
- "jeoprady", "jeopardy",
- "jepoardy", "jeopardy",
- "jerusalm", "jerusalem",
- "jewelrey", "jewelry",
- "jewllery", "jewellery",
- "joanthan", "jonathan",
- "joepardy", "jeopardy",
- "johanine", "johannine",
- "jonatahn", "jonathan",
- "journaal", "journal",
- "journied", "journeyed",
- "journies", "journeys",
- "joysitck", "joystick",
- "juadaism", "judaism",
- "judaisim", "judaism",
- "judgemet", "judgements",
- "juducial", "judicial",
- "jugnling", "jungling",
- "junglign", "jungling",
- "junlging", "jungling",
- "justifiy", "justify",
- "juveline", "juvenile",
- "juvenlie", "juvenile",
- "katemine", "ketamine",
- "kennedey", "kennedy",
- "ketmaine", "ketamine",
- "keybaord", "keyboard",
- "keyboars", "keyboards",
- "keyborad", "keyboard",
- "keychian", "keychain",
- "kicthens", "kitchens",
- "kindgoms", "kingdoms",
- "kittiens", "kitties",
- "knockbak", "knockback",
- "knowlege", "knowledge",
- "knuckels", "knuckles",
- "koreanos", "koreans",
- "kunckles", "knuckles",
- "kurdisch", "kurdish",
- "labatory", "lavatory",
- "labenese", "lebanese",
- "laboraty", "laboratory",
- "laguages", "languages",
- "landscae", "landscapes",
- "langauge", "language",
- "lanucher", "launcher",
- "lanuches", "launches",
- "laodouts", "loadouts",
- "larwence", "lawrence",
- "lasagnea", "lasagna",
- "lasagnia", "lasagna",
- "laucnhed", "launched",
- "laucnher", "launcher",
- "laucnhes", "launches",
- "laundrey", "laundry",
- "lawernce", "lawrence",
- "lazyness", "laziness",
- "leaglize", "legalize",
- "lecteurs", "lectures",
- "lecutres", "lectures",
- "lefitsts", "leftists",
- "leftsits", "leftists",
- "legenday", "legendary",
- "legionis", "legions",
- "legitimt", "legitimate",
- "lengthes", "lengths",
- "lengthly", "lengthy",
- "lentiles", "lentils",
- "lentills", "lentils",
- "lesbains", "lesbians",
- "lesibans", "lesbians",
- "levander", "lavender",
- "levelign", "leveling",
- "levetate", "levitate",
- "leviathn", "leviathan",
- "levleing", "leveling",
- "liberato", "liberation",
- "libertae", "liberate",
- "libertea", "liberate",
- "librarse", "libraries",
- "licencie", "licence",
- "licencse", "licence",
- "liebrals", "liberals",
- "liekable", "likeable",
- "lifepsan", "lifespan",
- "lifestel", "lifesteal",
- "lifestye", "lifestyle",
- "lighitng", "lighting",
- "lightnig", "lightning",
- "lightres", "lighters",
- "lightrom", "lightroom",
- "ligthers", "lighters",
- "ligthing", "lighting",
- "likebale", "likeable",
- "limitant", "militant",
- "limitato", "limitation",
- "lincolin", "lincoln",
- "lincolon", "lincoln",
- "lineupes", "lineups",
- "lingeire", "lingerie",
- "lingiere", "lingerie",
- "linnaena", "linnaean",
- "lipstics", "lipsticks",
- "liquidas", "liquids",
- "liquides", "liquids",
- "liquidos", "liquids",
- "liscense", "license",
- "lisenced", "silenced",
- "listenes", "listens",
- "listents", "listens",
- "listners", "listeners",
- "litature", "literature",
- "litecion", "litecoin",
- "liteicon", "litecoin",
- "literaly", "literally",
- "lithuana", "lithuania",
- "litigato", "litigation",
- "liverpol", "liverpool",
- "logtiech", "logitech",
- "longitme", "longtime",
- "longtiem", "longtime",
- "looseley", "loosely",
- "loreplay", "roleplay",
- "luanched", "launched",
- "luancher", "launcher",
- "luanches", "launches",
- "lubricat", "lubricant",
- "lucifear", "lucifer",
- "luckilly", "luckily",
- "macarino", "macaroni",
- "machiens", "machines",
- "mackeral", "mackerel",
- "macthups", "matchups",
- "magasine", "magazine",
- "magazins", "magazines",
- "magentic", "magnetic",
- "magicain", "magician",
- "magisine", "magazine",
- "magizine", "magazine",
- "magnetis", "magnets",
- "magnited", "magnitude",
- "magnitue", "magnitude",
- "mainfest", "manifest",
- "maintian", "maintain",
- "majoroty", "majority",
- "makrsman", "marksman",
- "malariya", "malaria",
- "malasiya", "malaysia",
- "malasyia", "malaysia",
- "malayisa", "malaysia",
- "malyasia", "malaysia",
- "mamalian", "mammalian",
- "manadrin", "mandarin",
- "manaully", "manually",
- "mandaste", "mandates",
- "mandrain", "mandarin",
- "mandrian", "mandarin",
- "maneveur", "maneuver",
- "manevuer", "maneuver",
- "manfiest", "manifest",
- "mangetic", "magnetic",
- "manglade", "mangled",
- "manifeso", "manifesto",
- "manipule", "manipulate",
- "manouver", "maneuver",
- "manuales", "manuals",
- "manuever", "maneuver",
- "maraconi", "macaroni",
- "maradeur", "marauder",
- "maraduer", "marauder",
- "maragret", "margaret",
- "marbleds", "marbles",
- "margerat", "margaret",
- "margines", "margins",
- "margings", "margins",
- "marginis", "margins",
- "marignal", "marginal",
- "marilyin", "marilyn",
- "marinens", "marines",
- "markedet", "marketed",
- "markeras", "markers",
- "markerts", "markers",
- "marniers", "mariners",
- "marraige", "marriage",
- "marryied", "married",
- "marskman", "marksman",
- "maruader", "marauder",
- "marvelos", "marvelous",
- "marxisim", "marxism",
- "mascarra", "mascara",
- "massacer", "massacre",
- "massarce", "massacre",
- "massasge", "massages",
- "masscare", "massacre",
- "masteris", "masteries",
- "masturbe", "masturbate",
- "materias", "materials",
- "mathcups", "matchups",
- "mathewes", "mathews",
- "matieral", "material",
- "matterss", "mattress",
- "mauarder", "marauder",
- "maximini", "maximizing",
- "mayalsia", "malaysia",
- "maybelle", "maybelline",
- "maylasia", "malaysia",
- "mccarhty", "mccarthy",
- "mcgergor", "mcgregor",
- "mchanics", "mechanics",
- "mclarean", "mclaren",
- "mcreggor", "mcgregor",
- "meagtron", "megatron",
- "meancing", "menacing",
- "meaninng", "meaning",
- "meatbals", "meatballs",
- "mecahnic", "mechanic",
- "mechanim", "mechanism",
- "mechanis", "mechanics",
- "medacine", "medicine",
- "medatite", "meditate",
- "medeival", "medieval",
- "medevial", "medieval",
- "mediavel", "medieval",
- "medicaly", "medically",
- "mediciad", "medicaid",
- "medicins", "medicines",
- "medicore", "mediocre",
- "medievel", "medieval",
- "mediocer", "mediocre",
- "mediocry", "mediocrity",
- "mediorce", "mediocre",
- "meditato", "meditation",
- "mediveal", "medieval",
- "medoicre", "mediocre",
- "meerkrat", "meerkat",
- "megatorn", "megatron",
- "meidcare", "medicare",
- "meixcans", "mexicans",
- "melboure", "melbourne",
- "meltodwn", "meltdown",
- "memoriez", "memorize",
- "mencaing", "menacing",
- "menstrul", "menstrual",
- "mentiong", "mentioning",
- "meoldies", "melodies",
- "merchans", "merchants",
- "mercurcy", "mercury",
- "mercurey", "mercury",
- "merficul", "merciful",
- "merhcant", "merchant",
- "mericful", "merciful",
- "messgaed", "messaged",
- "messiach", "messiah",
- "metagaem", "metagame",
- "metahpor", "metaphor",
- "metamage", "metagame",
- "methapor", "metaphor",
- "metldown", "meltdown",
- "metricas", "metrics",
- "metrices", "metrics",
- "metropos", "metropolis",
- "mexcians", "mexicans",
- "mexicain", "mexican",
- "mhytical", "mythical",
- "michagan", "michigan",
- "michgian", "michigan",
- "microtax", "microatx",
- "microwae", "microwaves",
- "midfeild", "midfield",
- "midfiled", "midfield",
- "midifeld", "midfield",
- "migrains", "migraines",
- "migriane", "migraine",
- "milennia", "millennia",
- "miligram", "milligram",
- "miliitas", "militias",
- "miliraty", "military",
- "militais", "militias",
- "millenia", "millennia",
- "millenna", "millennia",
- "miltiant", "militant",
- "minature", "miniature",
- "mindcrak", "mindcrack",
- "minerial", "mineral",
- "mingiame", "minigame",
- "minimage", "minigame",
- "minimals", "minimalist",
- "minimalt", "minimalist",
- "minimini", "minimizing",
- "minimium", "minimum",
- "miniscue", "miniscule",
- "minsiter", "minister",
- "minsitry", "ministry",
- "miraculu", "miraculous",
- "miralces", "miracles",
- "mircales", "miracles",
- "mircoatx", "microatx",
- "mirgaine", "migraine",
- "mirorred", "mirrored",
- "misnadry", "misandry",
- "misogynt", "misogynist",
- "missigno", "mission",
- "missiony", "missionary",
- "misslies", "missiles",
- "missorui", "missouri",
- "misspeld", "misspelled",
- "mistakey", "mistakenly",
- "mistread", "mistreated",
- "mobiltiy", "mobility",
- "moderats", "moderates",
- "modulair", "modular",
- "moleculs", "molecules",
- "momentos", "moments",
- "momentus", "moments",
- "monagomy", "monogamy",
- "mongoles", "mongols",
- "mongolos", "mongols",
- "monitord", "monitored",
- "monogmay", "monogamy",
- "monolite", "monolithic",
- "monologe", "monologue",
- "monolopy", "monopoly",
- "monoploy", "monopoly",
- "monopols", "monopolies",
- "monrachy", "monarchy",
- "monstros", "monstrous",
- "montaban", "montana",
- "montains", "mountains",
- "montanha", "montana",
- "montania", "montana",
- "montanna", "montana",
- "montanta", "montana",
- "montanya", "montana",
- "montaran", "montana",
- "monteize", "monetize",
- "monteral", "montreal",
- "montiors", "monitors",
- "montnana", "montana",
- "montypic", "monotypic",
- "monumnet", "monument",
- "moonligt", "moonlight",
- "moprhine", "morphine",
- "morbildy", "morbidly",
- "mordibly", "morbidly",
- "morevoer", "moreover",
- "morhpine", "morphine",
- "moribdly", "morbidly",
- "mormones", "mormons",
- "mormonts", "mormons",
- "moroever", "moreover",
- "morotola", "motorola",
- "morphein", "morphine",
- "morriosn", "morrison",
- "morrocco", "morocco",
- "morrsion", "morrison",
- "mortards", "mortars",
- "mortarts", "mortars",
- "moruning", "mourning",
- "mosnters", "monsters",
- "mosqueto", "mosquitoes",
- "mosquite", "mosquitoes",
- "mosqutio", "mosquito",
- "motoroal", "motorola",
- "mounment", "monument",
- "mounring", "mourning",
- "mountian", "mountain",
- "moustace", "moustache",
- "movesped", "movespeed",
- "mozillia", "mozilla",
- "mozillla", "mozilla",
- "msytical", "mystical",
- "mucnhies", "munchies",
- "mudering", "murdering",
- "muffings", "muffins",
- "muffinus", "muffins",
- "mulitple", "multiple",
- "mulitply", "multiply",
- "multiplr", "multiplier",
- "multipls", "multiples",
- "mundance", "mundane",
- "mundande", "mundane",
- "muniches", "munchies",
- "murderes", "murders",
- "murderus", "murders",
- "muscluar", "muscular",
- "muscualr", "muscular",
- "musicaly", "musically",
- "musuclar", "muscular",
- "mutliple", "multiple",
- "mutliply", "multiply",
- "myhtical", "mythical",
- "mysitcal", "mystical",
- "mysogyny", "misogyny",
- "mysteris", "mysteries",
- "mythraic", "mithraic",
- "nagivate", "navigate",
- "naopleon", "napoleon",
- "napcakes", "pancakes",
- "naploeon", "napoleon",
- "napoelon", "napoleon",
- "napolean", "napoleon",
- "napoloen", "napoleon",
- "narcissm", "narcissism",
- "narcisst", "narcissist",
- "narcotis", "narcotics",
- "narwharl", "narwhal",
- "naseuous", "nauseous",
- "nashvile", "nashville",
- "nasueous", "nauseous",
- "natievly", "natively",
- "nationas", "nationals",
- "nationsl", "nationals",
- "nativley", "natively",
- "natuilus", "nautilus",
- "naturaly", "naturally",
- "naturels", "natures",
- "naturely", "naturally",
- "naturens", "natures",
- "naturual", "natural",
- "nauesous", "nauseous",
- "naughtly", "naughty",
- "nauitlus", "nautilus",
- "nauseuos", "nauseous",
- "nautiuls", "nautilus",
- "nautlius", "nautilus",
- "nautulis", "nautilus",
- "naviagte", "navigate",
- "navigato", "navigation",
- "nazereth", "nazareth",
- "necesary", "necessary",
- "neckbead", "neckbeard",
- "needlees", "needles",
- "nefarios", "nefarious",
- "negativy", "negativity",
- "neglectn", "neglecting",
- "neglible", "negligible",
- "neigbour", "neighbour",
- "neolitic", "neolithic",
- "netboook", "netbook",
- "neuronas", "neurons",
- "neutraal", "neutral",
- "neutralt", "neutrality",
- "neutraly", "neutrality",
- "newcaste", "newcastle",
- "nickanme", "nickname",
- "nickmane", "nickname",
- "nieghbor", "neighbor",
- "nightime", "nighttime",
- "nightley", "nightly",
- "nightlie", "nightlife",
- "nihilsim", "nihilism",
- "nilihism", "nihilism",
- "nirtogen", "nitrogen",
- "nirvanna", "nirvana",
- "nitorgen", "nitrogen",
- "niusance", "nuisance",
- "noctrune", "nocturne",
- "noctunre", "nocturne",
- "nocturen", "nocturne",
- "nominato", "nomination",
- "nonsence", "nonsense",
- "nonsesne", "nonsense",
- "noramlly", "normally",
- "norhtern", "northern",
- "normalis", "normals",
- "normalls", "normals",
- "normalos", "normals",
- "northeat", "northeast",
- "northren", "northern",
- "northwet", "northwest",
- "norwegin", "norwegian",
- "nostalga", "nostalgia",
- "nostirls", "nostrils",
- "notabley", "notably",
- "notablly", "notably",
- "noteable", "notable",
- "noteably", "notably",
- "noticabe", "noticable",
- "notorios", "notorious",
- "novmeber", "november",
- "nromandy", "normandy",
- "nuatilus", "nautilus",
- "nuculear", "nuclear",
- "nuetered", "neutered",
- "nuisanse", "nuisance",
- "nullifiy", "nullify",
- "nurtient", "nutrient",
- "nusaince", "nuisance",
- "nusiance", "nuisance",
- "nutirent", "nutrient",
- "nutriens", "nutrients",
- "nuturing", "nurturing",
- "obdisian", "obsidian",
- "obediant", "obedient",
- "obession", "obsession",
- "obilvion", "oblivion",
- "obisdian", "obsidian",
- "obsessie", "obsessive",
- "obsessin", "obsession",
- "obsidain", "obsidian",
- "obstacal", "obstacle",
- "obvilion", "oblivion",
- "ocasions", "occasions",
- "ocassion", "occasion",
- "occaison", "occasion",
- "occupato", "occupation",
- "occuring", "occurring",
- "octobear", "october",
- "octopuns", "octopus",
- "ofcoruse", "ofcourse",
- "ofcoures", "ofcourse",
- "ofcousre", "ofcourse",
- "ofcrouse", "ofcourse",
- "officals", "officials",
- "officaly", "officially",
- "offsited", "offside",
- "ofocurse", "ofcourse",
- "oligarcy", "oligarchy",
- "olmypics", "olympics",
- "olymipcs", "olympics",
- "olypmics", "olympics",
- "ommision", "omission",
- "ommiting", "omitting",
- "ommitted", "omitted",
- "ongewild", "gonewild",
- "onslaugt", "onslaught",
- "operatie", "operative",
- "opinoins", "opinions",
- "oppinion", "opinion",
- "opponant", "opponent",
- "opposits", "opposites",
- "oppossed", "opposed",
- "oppresso", "oppression",
- "optimaal", "optimal",
- "optomism", "optimism",
- "oragnise", "organise",
- "orangerd", "orangered",
- "orangers", "oranges",
- "orangism", "organism",
- "orchesta", "orchestra",
- "ordianry", "ordinary",
- "oreintal", "oriental",
- "orgainse", "organise",
- "orgainze", "organize",
- "organims", "organism",
- "organsie", "organise",
- "organsim", "organism",
- "organzie", "organize",
- "orgasmes", "orgasms",
- "orgasmos", "orgasms",
- "orgasmus", "orgasms",
- "orginize", "organise",
- "orhtodox", "orthodox",
- "oridnary", "ordinary",
- "originas", "origins",
- "origines", "origins",
- "originsl", "originals",
- "orphanes", "orphans",
- "osbidian", "obsidian",
- "othrodox", "orthodox",
- "ourselvs", "ourselves",
- "oustider", "outsider",
- "outfeild", "outfield",
- "outfidel", "outfield",
- "outfiled", "outfield",
- "outisder", "outsider",
- "outplayd", "outplayed",
- "outputed", "outputted",
- "outsoure", "outsourced",
- "overboad", "overboard",
- "overclok", "overclock",
- "overdrev", "overdrive",
- "overhual", "overhaul",
- "overlaod", "overload",
- "overpiad", "overpaid",
- "overules", "overuse",
- "overwath", "overwatch",
- "overwhem", "overwhelm",
- "oximoron", "oxymoron",
- "oylmpics", "olympics",
- "pacakged", "packaged",
- "packadge", "packaged",
- "paficist", "pacifist",
- "painfuly", "painfully",
- "paitence", "patience",
- "paitents", "patients",
- "palidans", "paladins",
- "palstics", "plastics",
- "paltform", "platform",
- "paltinum", "platinum",
- "palyable", "playable",
- "palyoffs", "playoffs",
- "pancaeks", "pancakes",
- "panckaes", "pancakes",
- "pandoria", "pandora",
- "pandorra", "pandora",
- "panedmic", "pandemic",
- "panethon", "pantheon",
- "pankaces", "pancakes",
- "panmedic", "pandemic",
- "pantehon", "pantheon",
- "panthoen", "pantheon",
- "paradies", "paradise",
- "paradyse", "parades",
- "paragrah", "paragraph",
- "paraiste", "parasite",
- "paralell", "parallel",
- "paralely", "parallelly",
- "paralles", "parallels",
- "parameds", "paramedics",
- "paramter", "parameter",
- "paranioa", "paranoia",
- "paraniod", "paranoid",
- "paraside", "paradise",
- "parasits", "parasites",
- "parastie", "parasite",
- "parctise", "practise",
- "paremsan", "parmesan",
- "paristan", "partisan",
- "parmasen", "parmesan",
- "parmenas", "parmesan",
- "parmsean", "parmesan",
- "parnters", "partners",
- "parralel", "parallel",
- "parterns", "partners",
- "partialy", "partially",
- "partians", "partisan",
- "partical", "particular",
- "particel", "particle",
- "partiets", "parties",
- "partiots", "patriots",
- "partnerd", "partnered",
- "partsian", "partisan",
- "passabel", "passable",
- "passione", "passionate",
- "passisve", "passives",
- "passpost", "passports",
- "passvies", "passives",
- "passwors", "passwords",
- "pasttime", "pastime",
- "pastural", "pastoral",
- "pateince", "patience",
- "pateints", "patients",
- "patethic", "pathetic",
- "patheitc", "pathetic",
- "patienty", "patiently",
- "patirots", "patriots",
- "patriarh", "patriarchy",
- "patroits", "patriots",
- "patrolls", "patrols",
- "patronas", "patrons",
- "patrones", "patrons",
- "patronis", "patrons",
- "patronos", "patrons",
- "pattened", "patented",
- "patterno", "patterson",
- "pattersn", "patterson",
- "pblisher", "publisher",
- "peageant", "pageant",
- "pebbleos", "pebbles",
- "pebblers", "pebbles",
- "pebblets", "pebbles",
- "peciluar", "peculiar",
- "pecuilar", "peculiar",
- "peculair", "peculiar",
- "peculure", "peculiar",
- "peformed", "performed",
- "peircing", "piercing",
- "penaltis", "penalties",
- "penatgon", "pentagon",
- "penciles", "pencils",
- "pendatic", "pedantic",
- "pengiuns", "penguins",
- "penisula", "peninsula",
- "pensioen", "pension",
- "pepperin", "pepperoni",
- "perceded", "preceded",
- "percente", "percentile",
- "percieve", "perceive",
- "percious", "precious",
- "perclude", "preclude",
- "perfecty", "perfectly",
- "perfroms", "performs",
- "perheaps", "perhaps",
- "pericing", "piercing",
- "peridoic", "periodic",
- "perimetr", "perimeter",
- "periodes", "periods",
- "periodos", "periods",
- "permanet", "permanent",
- "permiere", "premiere",
- "permises", "premises",
- "permitas", "permits",
- "permites", "permits",
- "permitis", "permits",
- "permitts", "permits",
- "permiums", "premiums",
- "peroidic", "periodic",
- "perosnas", "personas",
- "perpetue", "perpetuate",
- "persaude", "persuade",
- "perserve", "preserve",
- "persisit", "persist",
- "personel", "personnel",
- "persones", "persons",
- "personis", "persons",
- "personsa", "personas",
- "perstige", "prestige",
- "persuaso", "persuasion",
- "persuded", "persuaded",
- "persuing", "pursuing",
- "persuits", "pursuits",
- "persumed", "presumed",
- "pertaing", "pertaining",
- "pertians", "pertains",
- "pertinet", "pertinent",
- "pervents", "prevents",
- "perverst", "pervert",
- "perviews", "previews",
- "pervious", "previous",
- "perxoide", "peroxide",
- "pessiary", "pessary",
- "petetion", "petition",
- "petrolem", "petroleum",
- "phantoom", "phantom",
- "pharamcy", "pharmacy",
- "pharmacs", "pharmacist",
- "pharmsci", "pharmacist",
- "phenomon", "phenomenon",
- "phramacy", "pharmacy",
- "phsyical", "physical",
- "phsyique", "physique",
- "phyiscal", "physical",
- "phyisque", "physique",
- "physcial", "physical",
- "physicis", "physicians",
- "physicks", "physics",
- "physicts", "physicist",
- "physqiue", "physique",
- "picthers", "pitchers",
- "pillards", "pillars",
- "pillaris", "pillars",
- "pinancle", "pinnacle",
- "pinapple", "pineapple",
- "pinnalce", "pinnacle",
- "pinnaple", "pineapple",
- "pinncale", "pinnacle",
- "pinpiont", "pinpoint",
- "pinteret", "pinterest",
- "piolting", "piloting",
- "pioneeer", "pioneer",
- "pithcers", "pitchers",
- "placebro", "placebo",
- "placemet", "placements",
- "planetas", "planets",
- "planetos", "planets",
- "plantiff", "plaintiff",
- "plantium", "platinum",
- "plasitcs", "plastics",
- "platfrom", "platform",
- "platimun", "platinum",
- "platnium", "platinum",
- "platnuim", "platinum",
- "plausibe", "plausible",
- "playbody", "playboy",
- "playstye", "playstyle",
- "pleasent", "pleasant",
- "plehtora", "plethora",
- "pleothra", "plethora",
- "plethroa", "plethora",
- "ploygamy", "polygamy",
- "pnatheon", "pantheon",
- "poeoples", "peoples",
- "poingant", "poignant",
- "pointeur", "pointer",
- "pointure", "pointer",
- "poisones", "poisons",
- "poisonis", "poisons",
- "poisonos", "poisons",
- "poisonus", "poisons",
- "polgyamy", "polygamy",
- "polietly", "politely",
- "politing", "piloting",
- "politley", "politely",
- "poltical", "political",
- "poluting", "polluting",
- "polution", "pollution",
- "polygoon", "polygon",
- "polymore", "polymer",
- "pomotion", "promotion",
- "popoulus", "populous",
- "populair", "popular",
- "populare", "popular",
- "populary", "popularity",
- "porcelan", "porcelain",
- "porposes", "proposes",
- "portabel", "portable",
- "portalis", "portals",
- "portalus", "portals",
- "portayed", "portrayed",
- "portgual", "portugal",
- "portrais", "portraits",
- "portrary", "portray",
- "portrayl", "portrayal",
- "portriat", "portrait",
- "posessed", "possessed",
- "posesses", "possesses",
- "posioned", "poisoned",
- "positivs", "positives",
- "positivy", "positivity",
- "possable", "possible",
- "possably", "possibly",
- "possbily", "possibly",
- "posseses", "possesses",
- "possesse", "possessive",
- "possesss", "possesses",
- "potrayed", "portrayed",
- "poverful", "powerful",
- "powerded", "powdered",
- "powerpot", "powerpoint",
- "pracitse", "practise",
- "practial", "practical",
- "practies", "practise",
- "pratcise", "practise",
- "praticle", "particle",
- "prceeded", "preceded",
- "preadtor", "predator",
- "preample", "preamble",
- "preceeds", "precedes",
- "precisie", "precise",
- "precisly", "precisely",
- "precisou", "precious",
- "preculde", "preclude",
- "predicat", "predict",
- "predicte", "predictive",
- "preferas", "prefers",
- "prefered", "preferred",
- "preferes", "prefers",
- "preferis", "prefers",
- "preferrs", "prefers",
- "preimere", "premiere",
- "preimums", "premiums",
- "preiodic", "periodic",
- "preivews", "previews",
- "prejudis", "prejudices",
- "prelayed", "replayed",
- "premeire", "premiere",
- "premesis", "premises",
- "premiare", "premier",
- "premines", "premise",
- "premuims", "premiums",
- "preorded", "preordered",
- "preordes", "preorders",
- "preoxide", "peroxide",
- "prepaird", "prepaid",
- "preqeuls", "prequels",
- "prequles", "prequels",
- "prescrie", "prescribed",
- "presense", "presence",
- "presenst", "presets",
- "presidet", "presidents",
- "presists", "persists",
- "presitge", "prestige",
- "presonas", "personas",
- "presuade", "persuade",
- "pretador", "predator",
- "pretains", "pertains",
- "preveiws", "previews",
- "preverse", "perverse",
- "previwes", "previews",
- "pricipal", "principal",
- "priciple", "principle",
- "priemere", "premiere",
- "priestes", "priests",
- "primaris", "primaries",
- "primarly", "primarily",
- "princila", "principals",
- "principl", "principals",
- "prisitne", "pristine",
- "probelms", "problems",
- "probleem", "problem",
- "procalim", "proclaim",
- "proccess", "process",
- "proceded", "proceeded",
- "proceder", "procedure",
- "procedes", "proceeds",
- "procedue", "procedure",
- "proceeed", "proceed",
- "procesed", "proceeds",
- "processs", "processes",
- "proclami", "proclaim",
- "procliam", "proclaim",
- "procotol", "protocol",
- "prodcuts", "products",
- "producto", "production",
- "profesor", "professor",
- "proficit", "proficient",
- "profilic", "prolific",
- "progroms", "pogroms",
- "prohibis", "prohibits",
- "prohpecy", "prophecy",
- "prohpets", "prophets",
- "projecte", "projectile",
- "projecto", "projection",
- "prolouge", "prologue",
- "promplty", "promptly",
- "promptes", "prompts",
- "promptus", "prompts",
- "promtply", "promptly",
- "pronoune", "pronounced",
- "propechy", "prophecy",
- "propehcy", "prophecy",
- "propehts", "prophets",
- "prophacy", "prophecy",
- "propmted", "prompted",
- "propmtly", "promptly",
- "proponet", "proponents",
- "proposse", "proposes",
- "proposte", "propose",
- "proprety", "property",
- "propsect", "prospect",
- "prosepct", "prospect",
- "prostite", "prostitute",
- "protable", "portable",
- "protecte", "protective",
- "protiens", "proteins",
- "protines", "proteins",
- "protocal", "protocol",
- "prototye", "prototype",
- "protrait", "portrait",
- "protrays", "portrays",
- "protugal", "portugal",
- "proverai", "proverbial",
- "providee", "providence",
- "proximty", "proximity",
- "pruchase", "purchase",
- "pryamids", "pyramids",
- "ptichers", "pitchers",
- "pubisher", "publisher",
- "publiser", "publisher",
- "puinsher", "punisher",
- "pulisher", "publisher",
- "pumkpins", "pumpkins",
- "pumpinks", "pumpkins",
- "pumpknis", "pumpkins",
- "punshier", "punisher",
- "punsiher", "punisher",
- "punsihes", "punishes",
- "purcahse", "purchase",
- "pyramind", "pyramid",
- "pyrimads", "pyramids",
- "pyrmaids", "pyramids",
- "qauntity", "quantity",
- "qualifiy", "qualify",
- "quanitfy", "quantify",
- "quantaty", "quantity",
- "quantite", "quantities",
- "quantuum", "quantum",
- "quarante", "quarantine",
- "quartery", "quarterly",
- "qucikest", "quickest",
- "queation", "equation",
- "quention", "quentin",
- "quickets", "quickest",
- "quicklyu", "quickly",
- "rabbitos", "rabbits",
- "rabbitts", "rabbits",
- "racistas", "racists",
- "racistes", "racists",
- "radaince", "radiance",
- "rahpsody", "rhapsody",
- "raidance", "radiance",
- "railraod", "railroad",
- "randomes", "randoms",
- "randomez", "randomized",
- "randomns", "randoms",
- "randomrs", "randoms",
- "randomus", "randoms",
- "raosting", "roasting",
- "raphsody", "rhapsody",
- "raptores", "raptors",
- "raspbery", "raspberry",
- "rationel", "rationale",
- "realible", "reliable",
- "realibly", "reliably",
- "realiest", "earliest",
- "realisim", "realism",
- "realisme", "realise",
- "realistc", "realistic",
- "realiste", "realise",
- "realoded", "reloaded",
- "realsied", "realised",
- "realtion", "relation",
- "realtive", "relative",
- "reamined", "remained",
- "reapired", "repaired",
- "reaplugs", "earplugs",
- "reaserch", "research",
- "reasonal", "reasonably",
- "reatiler", "retailer",
- "reaveled", "revealed",
- "rebellis", "rebellious",
- "reboudns", "rebounds",
- "rebounce", "rebound",
- "rebuildt", "rebuilt",
- "rebuplic", "republic",
- "receeded", "receded",
- "recepits", "receipts",
- "receptie", "receptive",
- "receptos", "receptors",
- "receving", "receiving",
- "recident", "resident",
- "reciding", "residing",
- "recieved", "received",
- "reciever", "receiver",
- "recieves", "receives",
- "recipees", "recipes",
- "recipets", "recipes",
- "recogise", "recognise",
- "recogize", "recognize",
- "recognie", "recognizes",
- "recomend", "recommend",
- "recommed", "recommend",
- "reconnet", "reconnect",
- "rectange", "rectangle",
- "rectifiy", "rectify",
- "recuring", "recurring",
- "recurits", "recruits",
- "redeisgn", "redesign",
- "redemeed", "redeemed",
- "redesgin", "redesign",
- "redesing", "redesign",
- "reedemed", "redeemed",
- "refeeres", "referees",
- "refelcts", "reflects",
- "refelxes", "reflexes",
- "referede", "referee",
- "referene", "referee",
- "referens", "references",
- "referere", "referee",
- "referign", "refering",
- "refering", "referring",
- "refernce", "references",
- "reffered", "referred",
- "refilles", "refills",
- "refillls", "refills",
- "reflecte", "reflective",
- "reflecto", "reflection",
- "reformes", "reforms",
- "refreing", "refering",
- "refrence", "reference",
- "refreshd", "refreshed",
- "refreshr", "refresher",
- "refromed", "reformed",
- "regardes", "regards",
- "regenade", "renegade",
- "regenere", "regenerate",
- "regiones", "regions",
- "regisrty", "registry",
- "registed", "registered",
- "regresas", "regress",
- "regreses", "regress",
- "regresos", "regress",
- "regresse", "regressive",
- "regresso", "regression",
- "regrests", "regress",
- "regretts", "regrets",
- "regsitry", "registry",
- "regualrs", "regulars",
- "regualte", "regulate",
- "reguarly", "regularly",
- "regulary", "regularly",
- "regulatr", "regulator",
- "regulats", "regulators",
- "rehersal", "rehearsal",
- "rehtoric", "rhetoric",
- "reiceved", "recieved",
- "reigment", "regiment",
- "reigonal", "regional",
- "rekenton", "renekton",
- "relaible", "reliable",
- "relaibly", "reliably",
- "relaised", "realised",
- "relaoded", "reloaded",
- "relasped", "relapsed",
- "relatabe", "relatable",
- "relateds", "relates",
- "relativy", "relativity",
- "relavent", "relevant",
- "relected", "reelected",
- "relegato", "relegation",
- "releived", "relieved",
- "releiver", "reliever",
- "relevent", "relevant",
- "relfects", "reflects",
- "relfexes", "reflexes",
- "reliased", "realised",
- "religous", "religious",
- "relpased", "relapsed",
- "remainds", "remains",
- "remainig", "remaining",
- "remannts", "remnants",
- "remarkes", "remarks",
- "remembed", "remembered",
- "remembee", "remembered",
- "rememebr", "remember",
- "remenant", "remnant",
- "reminent", "remnant",
- "remmeber", "remember",
- "remotley", "remotely",
- "renderes", "renders",
- "reneagde", "renegade",
- "renetkon", "renekton",
- "renewabe", "renewables",
- "renketon", "renekton",
- "renmants", "remnants",
- "renoylds", "reynolds",
- "renteris", "renters",
- "renyolds", "reynolds",
- "reowrked", "reworked",
- "repaires", "repairs",
- "repalces", "replaces",
- "reparied", "repaired",
- "repblics", "republics",
- "repbulic", "republic",
- "repeatae", "repeatable",
- "repeates", "repeats",
- "repetion", "repetition",
- "repharse", "rephrase",
- "repitles", "reptiles",
- "replased", "relapsed",
- "replayes", "replays",
- "replicae", "replicated",
- "replubic", "republic",
- "reportes", "reporters",
- "reposity", "repository",
- "repostas", "reposts",
- "repostes", "reposts",
- "repostig", "reposting",
- "repostus", "reposts",
- "represet", "represents",
- "represso", "repression",
- "reprhase", "rephrase",
- "repsects", "respects",
- "repsonds", "responds",
- "repsonse", "response",
- "repsoted", "reposted",
- "repubics", "republics",
- "republis", "republics",
- "repulics", "republics",
- "repulsie", "repulsive",
- "requiers", "requires",
- "requieum", "requiem",
- "requilme", "requiem",
- "requried", "required",
- "requries", "requires",
- "rescuecd", "rescued",
- "researce", "researcher",
- "resembes", "resembles",
- "reserach", "research",
- "resevoir", "reservoir",
- "resgined", "resigned",
- "residude", "residue",
- "residule", "residue",
- "resinged", "resigned",
- "resistas", "resists",
- "resisten", "resistance",
- "resistes", "resists",
- "resloved", "resolved",
- "resloves", "resolves",
- "resmeble", "resemble",
- "resotred", "restored",
- "resourse", "resources",
- "resovled", "resolved",
- "resovles", "resolves",
- "respecte", "respective",
- "respesct", "respects",
- "responce", "response",
- "responed", "respond",
- "respones", "response",
- "responsd", "responds",
- "respoted", "reposted",
- "restanti", "restarting",
- "restrait", "restraint",
- "restrics", "restricts",
- "resuable", "reusable",
- "retailes", "retailers",
- "retalier", "retailer",
- "rethoric", "rhetoric",
- "retirase", "retires",
- "retireds", "retires",
- "retireus", "retires",
- "retireve", "retrieve",
- "retreive", "retrieve",
- "retrived", "retrieved",
- "retunred", "returned",
- "reuasble", "reusable",
- "reveales", "reveals",
- "reveiwed", "reviewed",
- "reveiwer", "reviewer",
- "revelaed", "revealed",
- "revelant", "relevant",
- "revelead", "revealed",
- "reverals", "reversal",
- "reviewes", "reviewers",
- "revlover", "revolver",
- "revloves", "revolves",
- "revovler", "revolver",
- "revovles", "revolves",
- "rewatchd", "rewatched",
- "rewitten", "rewritten",
- "rewritte", "rewrite",
- "rewtched", "wretched",
- "reynlods", "reynolds",
- "reyonlds", "reynolds",
- "rhaposdy", "rhapsody",
- "rhaspody", "rhapsody",
- "rheotric", "rhetoric",
- "righteos", "righteous",
- "rigntone", "ringtone",
- "ringotne", "ringtone",
- "ritalian", "ritalin",
- "rivalrly", "rivalry",
- "roachers", "roaches",
- "robberts", "robbers",
- "robberys", "robbers",
- "robocoop", "robocop",
- "robocorp", "robocop",
- "robocoup", "robocop",
- "roelplay", "roleplay",
- "roganism", "organism",
- "rolepaly", "roleplay",
- "romaanin", "romanian",
- "romainan", "romanian",
- "romanain", "romanian",
- "romanica", "romania",
- "rosettta", "rosetta",
- "rostaing", "roasting",
- "routeros", "routers",
- "rutgerus", "rutgers",
- "ryenolds", "reynolds",
- "sacrifie", "sacrifice",
- "saddends", "saddens",
- "saddenes", "saddens",
- "sadisitc", "sadistic",
- "salaires", "salaries",
- "sandales", "sandals",
- "sandalls", "sandals",
- "sandstom", "sandstorm",
- "sanotrum", "santorum",
- "santourm", "santorum",
- "santroum", "santorum",
- "santurom", "santorum",
- "sapcebar", "spacebar",
- "sapphrie", "sapphire",
- "sarcasam", "sarcasm",
- "sarcasim", "sarcasm",
- "sarcastc", "sarcastic",
- "sargeant", "sergeant",
- "sasauges", "sausages",
- "sasuages", "sausages",
- "satelite", "satellite",
- "satellie", "satellites",
- "saterday", "saturday",
- "satifies", "satisfies",
- "satisfiy", "satisfy",
- "satrical", "satirical",
- "satruday", "saturday",
- "saturdsy", "saturdays",
- "sawstika", "swastika",
- "scandlas", "scandals",
- "scannign", "scanning",
- "scarmble", "scramble",
- "scepture", "scepter",
- "schedual", "schedule",
- "schoalrs", "scholars",
- "scholary", "scholarly",
- "schoodle", "schooled",
- "scientic", "scientific",
- "scientis", "scientist",
- "scoprion", "scorpion",
- "scorates", "socrates",
- "scoripon", "scorpion",
- "scorpoin", "scorpion",
- "scostman", "scotsman",
- "scratchs", "scratches",
- "scriptue", "scriptures",
- "scriptus", "scripts",
- "scritped", "scripted",
- "scroates", "socrates",
- "scropion", "scorpion",
- "scrpited", "scripted",
- "scruitny", "scrutiny",
- "scrunity", "scrutiny",
- "sctosman", "scotsman",
- "sculpter", "sculpture",
- "scurtiny", "scrutiny",
- "seahakws", "seahawks",
- "seahwaks", "seahawks",
- "seantors", "senators",
- "sebastin", "sebastian",
- "seceeded", "succeeded",
- "secertly", "secretly",
- "secrelty", "secretly",
- "secretas", "secrets",
- "secretos", "secrets",
- "secruity", "security",
- "secuirty", "security",
- "sedereal", "sidereal",
- "seldomly", "seldom",
- "selectie", "selective",
- "selfiers", "selfies",
- "semestre", "semester",
- "semseter", "semester",
- "senarios", "scenarios",
- "senerity", "serenity",
- "seniores", "seniors",
- "senisble", "sensible",
- "sensibel", "sensible",
- "sensores", "sensors",
- "senstive", "sensitive",
- "sentaors", "senators",
- "sentiers", "sentries",
- "sentinet", "sentient",
- "sentinte", "sentient",
- "sentires", "sentries",
- "sentreis", "sentries",
- "separato", "separation",
- "separete", "seperate",
- "sepearte", "seperate",
- "seperate", "separate",
- "seplling", "spelling",
- "sepreate", "seperate",
- "sepulcre", "sepulchre",
- "serached", "searched",
- "seraches", "searches",
- "serentiy", "serenity",
- "sergaent", "sergeant",
- "settigns", "settings",
- "seventen", "seventeen",
- "severeal", "several",
- "severeid", "severed",
- "severide", "severed",
- "severley", "severely",
- "sexaully", "sexually",
- "seziures", "seizures",
- "sezuires", "seizures",
- "shadoloo", "shadaloo",
- "shangahi", "shanghai",
- "shanghia", "shanghai",
- "sharplay", "sharply",
- "sharpley", "sharply",
- "shawshak", "shawshank",
- "shcolars", "scholars",
- "shcooled", "schooled",
- "sheilded", "shielded",
- "shelterd", "sheltered",
- "shelvers", "shelves",
- "shelveys", "shelves",
- "sherlcok", "sherlock",
- "shetlers", "shelters",
- "shfiting", "shifting",
- "shifitng", "shifting",
- "shifteer", "shifter",
- "shileded", "shielded",
- "shineing", "shining",
- "shitstom", "shitstorm",
- "shittoon", "shitton",
- "shittown", "shitton",
- "shleters", "shelters",
- "shnaghai", "shanghai",
- "shortend", "shortened",
- "shotuout", "shoutout",
- "shoudlnt", "shouldnt",
- "shouldes", "shoulders",
- "shoulndt", "shouldnt",
- "shrapenl", "shrapnel",
- "shrelock", "sherlock",
- "shrinked", "shrunk",
- "shrpanel", "shrapnel",
- "shtiless", "shitless",
- "shuoldnt", "shouldnt",
- "sideboad", "sideboard",
- "sidleine", "sideline",
- "siezable", "sizeable",
- "siezures", "seizures",
- "signatue", "signatures",
- "signfies", "signifies",
- "signifiy", "signify",
- "signigns", "signings",
- "signular", "singular",
- "silbings", "siblings",
- "silicoln", "silicon",
- "silicoon", "silicon",
- "silimiar", "similiar",
- "simialir", "similiar",
- "simiilar", "similiar",
- "similair", "similar",
- "similari", "similiar",
- "similart", "similarity",
- "similary", "similarly",
- "similiar", "similar",
- "simliiar", "similiar",
- "simluate", "simulate",
- "simmilar", "similar",
- "simpelst", "simplest",
- "simplets", "simplest",
- "simplicy", "simplicity",
- "simplier", "simpler",
- "simulato", "simulation",
- "singlers", "singles",
- "singluar", "singular",
- "sinistre", "sinister",
- "sinsiter", "sinister",
- "sitckers", "stickers",
- "sitrring", "stirring",
- "sizebale", "sizeable",
- "skateing", "skating",
- "skecthes", "sketches",
- "skelatel", "skeletal",
- "skeletos", "skeletons",
- "sketchey", "sketchy",
- "sketpics", "skeptics",
- "skillsto", "skillshots",
- "skimrish", "skirmish",
- "skpetics", "skeptics",
- "skrimish", "skirmish",
- "skteches", "sketches",
- "skywalkr", "skywalker",
- "slaptoon", "splatoon",
- "slaverly", "slavery",
- "slienced", "silenced",
- "sliently", "silently",
- "slighlty", "slightly",
- "sligthly", "slightly",
- "smartare", "smarter",
- "snetries", "sentries",
- "snippent", "snippet",
- "snippert", "snippet",
- "snowbals", "snowballs",
- "snugglie", "snuggle",
- "snydrome", "syndrome",
- "snyopsis", "synopsis",
- "soberity", "sobriety",
- "sobreity", "sobriety",
- "socailly", "socially",
- "socalism", "socialism",
- "socartes", "socrates",
- "socialim", "socialism",
- "socities", "societies",
- "socttish", "scottish",
- "soemthin", "somethin",
- "soilders", "soldiers",
- "solatary", "solitary",
- "soldeirs", "soldiers",
- "soliders", "soldiers",
- "soluable", "soluble",
- "solutide", "solitude",
- "somalija", "somalia",
- "somehtin", "somethin",
- "someoens", "someones",
- "somethis", "somethings",
- "sometihn", "somethin",
- "sometinh", "somethin",
- "somoenes", "someones",
- "somtimes", "sometimes",
- "somwhere", "somewhere",
- "soparnos", "sopranos",
- "sophmore", "sophomore",
- "sorcercy", "sorcery",
- "sorcerey", "sorcery",
- "sorceror", "sorcerer",
- "sorcerry", "sorcery",
- "sorpanos", "sopranos",
- "southren", "southern",
- "soverein", "sovereign",
- "soverign", "sovereign",
- "sovietes", "soviets",
- "spagheti", "spaghetti",
- "spainish", "spanish",
- "spaltoon", "splatoon",
- "spammade", "spammed",
- "spammare", "spammer",
- "spammear", "spammer",
- "spammend", "spammed",
- "spammeur", "spammer",
- "spanisch", "spanish",
- "sparklie", "sparkle",
- "spawnign", "spawning",
- "specemin", "specimen",
- "speciaal", "special",
- "specialt", "specialist",
- "specialy", "specially",
- "specialz", "specialize",
- "specifed", "specified",
- "specifiy", "specify",
- "speciman", "specimen",
- "specrtal", "spectral",
- "speicals", "specials",
- "spellign", "spelling",
- "spendour", "splendour",
- "sphereos", "spheres",
- "spilnter", "splinter",
- "spiltter", "splitter",
- "spindrel", "spindle",
- "spirites", "spirits",
- "spiritis", "spirits",
- "spiritus", "spirits",
- "spirtied", "spirited",
- "spleling", "spelling",
- "splitner", "splinter",
- "spoilerd", "spoiled",
- "spoliers", "spoilers",
- "sponsord", "sponsored",
- "sporanos", "sopranos",
- "spotifiy", "spotify",
- "spotifty", "spotify",
- "sppeches", "speeches",
- "sprayade", "sprayed",
- "spreaded", "spread",
- "springst", "sprints",
- "sprinkel", "sprinkle",
- "sprintas", "sprints",
- "spritual", "spiritual",
- "sproutes", "sprouts",
- "spwaning", "spawning",
- "sqaudron", "squadron",
- "sqaurely", "squarely",
- "sqiurtle", "squirtle",
- "squardon", "squadron",
- "squareds", "squares",
- "squarley", "squarely",
- "squeakey", "squeaky",
- "squeakly", "squeaky",
- "squirlte", "squirtle",
- "squirrle", "squirrel",
- "squirtel", "squirtle",
- "squishey", "squishy",
- "squishly", "squishy",
- "squritle", "squirtle",
- "squrriel", "squirrel",
- "squrtile", "squirtle",
- "sriarcha", "sriracha",
- "srriacha", "sriracha",
- "sryacuse", "syracuse",
- "staduims", "stadiums",
- "staidums", "stadiums",
- "staklers", "stalkers",
- "stalekrs", "stalkers",
- "stalkear", "stalker",
- "staminia", "stamina",
- "stampade", "stamped",
- "stampeed", "stamped",
- "stancels", "stances",
- "stancers", "stances",
- "standars", "standards",
- "standbay", "standby",
- "standbuy", "standby",
- "stangant", "stagnant",
- "staright", "straight",
- "starined", "strained",
- "starlted", "startled",
- "startegy", "strategy",
- "starteld", "startled",
- "startsup", "startups",
- "stateman", "statesman",
- "staticts", "statist",
- "stationd", "stationed",
- "stationy", "stationary",
- "statiskt", "statist",
- "statistc", "statistic",
- "statment", "statement",
- "stattues", "statutes",
- "statuets", "statutes",
- "statuser", "stature",
- "staurday", "saturday",
- "steadliy", "steadily",
- "stealhty", "stealthy",
- "steathly", "stealthy",
- "stelathy", "stealthy",
- "sterilze", "sterile",
- "steriods", "steroids",
- "stichted", "stitched",
- "sticthed", "stitched",
- "sticthes", "stitches",
- "stimulai", "stimuli",
- "stimulas", "stimulants",
- "stimulat", "stimulants",
- "stimulli", "stimuli",
- "stingent", "stringent",
- "stirkers", "strikers",
- "stlakers", "stalkers",
- "stomache", "stomach",
- "stormade", "stormed",
- "stormend", "stormed",
- "stradegy", "strategy",
- "stragety", "strategy",
- "straignt", "straighten",
- "straigth", "straight",
- "straings", "strains",
- "strangel", "strangle",
- "stranget", "strangest",
- "stratgey", "strategy",
- "stratled", "startled",
- "streames", "streams",
- "streamos", "streams",
- "streamus", "streams",
- "streamys", "streams",
- "stregnth", "strength",
- "stremear", "streamer",
- "strenght", "strength",
- "strengts", "strengths",
- "strenous", "strenuous",
- "strentgh", "strength",
- "stretchs", "stretches",
- "striaght", "straight",
- "striclty", "strictly",
- "striekrs", "strikers",
- "strikely", "strikingly",
- "stringet", "stringent",
- "stubbron", "stubborn",
- "stubmled", "stumbled",
- "stucture", "structure",
- "studioes", "studios",
- "stuipder", "stupider",
- "stumbeld", "stumbled",
- "stupdily", "stupidly",
- "stupidiy", "stupidity",
- "stylisch", "stylish",
- "styrofom", "styrofoam",
- "suasages", "sausages",
- "subltety", "subtlety",
- "submarie", "submarines",
- "subruban", "suburban",
- "subscrie", "subscriber",
- "subsidie", "subsidized",
- "subsidiy", "subsidy",
- "substace", "substance",
- "substans", "substances",
- "substite", "substitute",
- "subtelty", "subtlety",
- "subtetly", "subtlety",
- "subtilte", "subtitle",
- "subtitel", "subtitle",
- "subtitls", "subtitles",
- "subtltey", "subtlety",
- "succeded", "succeeded",
- "succedes", "succeeds",
- "succeeed", "succeed",
- "succesed", "succeeds",
- "successs", "successes",
- "succsess", "success",
- "suceeded", "succeeded",
- "sucesful", "successful",
- "sucesion", "succession",
- "sucesses", "successes",
- "sucessor", "successor",
- "sucessot", "successor",
- "sucidial", "suicidal",
- "suddnely", "suddenly",
- "sufficit", "sufficient",
- "suggesst", "suggests",
- "suggeste", "suggestive",
- "summenor", "summoner",
- "summones", "summoners",
- "sunfiber", "sunfire",
- "sunscren", "sunscreen",
- "superham", "superhuman",
- "superheo", "superhero",
- "superios", "superiors",
- "supirsed", "suprised",
- "suposing", "supposing",
- "supporre", "supporters",
- "suprised", "surprised",
- "suprized", "surprised",
- "suprsied", "suprised",
- "supsects", "suspects",
- "supsense", "suspense",
- "surbuban", "suburban",
- "surounds", "surrounds",
- "surpases", "surpass",
- "surpress", "suppress",
- "surprize", "surprise",
- "surrouns", "surrounds",
- "surveill", "surveil",
- "surveyer", "surveyor",
- "surviver", "survivor",
- "suspened", "suspend",
- "suspenso", "suspension",
- "swaering", "swearing",
- "swansoon", "swanson",
- "swasitka", "swastika",
- "swaskita", "swastika",
- "swatiska", "swastika",
- "swatsika", "swastika",
- "swedisch", "swedish",
- "swiftley", "swiftly",
- "swithced", "switched",
- "swithces", "switches",
- "swtiched", "switched",
- "swtiches", "switches",
- "syarcuse", "syracuse",
- "sydnrome", "syndrome",
- "sylablle", "syllable",
- "syllabel", "syllable",
- "symapthy", "sympathy",
- "symboles", "symbols",
- "symhpony", "symphony",
- "symmerty", "symmetry",
- "symmtery", "symmetry",
- "symoblic", "symbolic",
- "symphaty", "sympathy",
- "symptoom", "symptom",
- "symtpoms", "symptoms",
- "synomyns", "synonyms",
- "synonmys", "synonyms",
- "synonomy", "synonym",
- "synoynms", "synonyms",
- "synphony", "symphony",
- "synposis", "synopsis",
- "sypmathy", "sympathy",
- "sypmtoms", "symptoms",
- "sypnosis", "synopsis",
- "syraucse", "syracuse",
- "syrcause", "syracuse",
- "syringae", "syringe",
- "syringue", "syringe",
- "sysamdin", "sysadmin",
- "sysdamin", "sysadmin",
- "tacticas", "tactics",
- "tacticts", "tactics",
- "tacticus", "tactics",
- "tagliate", "tailgate",
- "tahnkyou", "thankyou",
- "tailsman", "talisman",
- "taiwanee", "taiwanese",
- "taligate", "tailgate",
- "taliored", "tailored",
- "tallents", "tallest",
- "talsiman", "talisman",
- "tanturms", "tantrums",
- "tapitude", "aptitude",
- "tasliman", "talisman",
- "tattooes", "tattoos",
- "tattooos", "tattoos",
- "taxanomy", "taxonomy",
- "teamfigt", "teamfight",
- "teamspek", "teamspeak",
- "teancity", "tenacity",
- "teapsoon", "teaspoon",
- "techniqe", "technique",
- "teenages", "teenagers",
- "telegrah", "telegraph",
- "telphony", "telephony",
- "tempalrs", "templars",
- "tempalte", "template",
- "templats", "templates",
- "templeos", "temples",
- "templers", "temples",
- "temporay", "temporary",
- "temprary", "temporary",
- "tenacles", "tentacles",
- "tenactiy", "tenacity",
- "tencaity", "tenacity",
- "tendancy", "tendency",
- "tendence", "tendencies",
- "tentacel", "tentacle",
- "tentacls", "tentacles",
- "tentalce", "tentacle",
- "tequilia", "tequila",
- "terriory", "territory",
- "territoy", "territory",
- "terroist", "terrorist",
- "tesitcle", "testicle",
- "testicel", "testicle",
- "testifiy", "testify",
- "teusdays", "tuesdays",
- "texutres", "textures",
- "thaliand", "thailand",
- "theather", "theater",
- "theathre", "theater",
- "theature", "theater",
- "theisitc", "theistic",
- "themslef", "themself",
- "theorits", "theorist",
- "theraphy", "therapy",
- "thereian", "therein",
- "theroies", "theories",
- "theroist", "theorist",
- "thesitic", "theistic",
- "thialand", "thailand",
- "thiestic", "theistic",
- "thikning", "thinking",
- "thirites", "thirties",
- "thirstay", "thirsty",
- "thnakyou", "thankyou",
- "thoeries", "theories",
- "thoerist", "theorist",
- "thomspon", "thompson",
- "thopmson", "thompson",
- "thougths", "thoughts",
- "thourogh", "thorough",
- "threates", "threatens",
- "threefor", "therefor",
- "thriteen", "thirteen",
- "thrities", "thirties",
- "throaths", "throats",
- "throners", "thrones",
- "throough", "thorough",
- "throught", "thought",
- "thrusday", "thursday",
- "thumbnal", "thumbnails",
- "thurdsay", "thursday",
- "thursdsy", "thursdays",
- "tightare", "tighter",
- "timestap", "timestamp",
- "tirangle", "triangle",
- "tirbunal", "tribunal",
- "titainum", "titanium",
- "titanuim", "titanium",
- "tocuhpad", "touchpad",
- "togehter", "together",
- "togheter", "together",
- "toiletts", "toilets",
- "tolerabe", "tolerable",
- "tommorow", "tomorrow",
- "tonguers", "tongues",
- "toriodal", "toroidal",
- "toritlla", "tortilla",
- "tornadoe", "tornado",
- "torotise", "tortoise",
- "torpedeo", "torpedo",
- "torphies", "trophies",
- "tortiose", "tortoise",
- "toruisty", "touristy",
- "toruneys", "tourneys",
- "touchapd", "touchpad",
- "tounreys", "tourneys",
- "tourisim", "tourism",
- "touritsy", "touristy",
- "tournyes", "tourneys",
- "toursits", "tourists",
- "toursity", "touristy",
- "toxiticy", "toxicity",
- "trabajao", "trabajo",
- "trabajdo", "trabajo",
- "trackres", "trackers",
- "trageted", "targeted",
- "traingle", "triangle",
- "traitour", "traitor",
- "trakcers", "trackers",
- "traliers", "trailers",
- "tranform", "transform",
- "transeat", "translates",
- "transfom", "transform",
- "transfos", "transforms",
- "transiet", "transient",
- "transito", "transition",
- "transpot", "transport",
- "trasnfer", "transfer",
- "tratiors", "traitors",
- "traveles", "travels",
- "traveres", "traverse",
- "treasurs", "treasures",
- "treatmet", "treatments",
- "treatsie", "treaties",
- "treausre", "treasure",
- "tredning", "trending",
- "tremelos", "tremolos",
- "tresuary", "treasury",
- "trialers", "trailers",
- "trianers", "trainers",
- "triangel", "triangle",
- "triangls", "triangles",
- "trianing", "training",
- "trianlge", "triangle",
- "triators", "traitors",
- "tribuanl", "tribunal",
- "trickyer", "trickery",
- "triggern", "triggering",
- "trilogoy", "trilogy",
- "trinagle", "triangle",
- "trinekts", "trinkets",
- "tringale", "triangle",
- "trinitiy", "trinity",
- "triology", "trilogy",
- "triumpth", "triumph",
- "trohpies", "trophies",
- "trollade", "trolled",
- "tropcial", "tropical",
- "trotilla", "tortilla",
- "trpoical", "tropical",
- "trubinal", "tribunal",
- "trubines", "turbines",
- "tsunamai", "tsunami",
- "tuesdsay", "tuesdays",
- "tunnells", "tunnels",
- "turkisch", "turkish",
- "turntabe", "turntable",
- "turretts", "turrets",
- "tusedays", "tuesdays",
- "tutorual", "tutorial",
- "twilgiht", "twilight",
- "tylenool", "tylenol",
- "typicaly", "typically",
- "tyranies", "tyrannies",
- "tyrannia", "tyrannical",
- "ublisher", "publisher",
- "udnercut", "undercut",
- "udnerdog", "underdog",
- "ugpraded", "upgraded",
- "ugprades", "upgrades",
- "ukrainie", "ukraine",
- "ukrainin", "ukrainian",
- "ukranian", "ukrainian",
- "ulitmate", "ultimate",
- "ultamite", "ultimate",
- "ultiamte", "ultimate",
- "ultimely", "ultimately",
- "ultrason", "ultrasound",
- "umberlla", "umbrella",
- "unabnned", "unbanned",
- "unbanend", "unbanned",
- "uncanney", "uncanny",
- "uncannny", "uncanny",
- "underbog", "undergo",
- "underglo", "undergo",
- "undersog", "undergo",
- "undertoe", "undertones",
- "underwar", "underwater",
- "unfailry", "unfairly",
- "unfarily", "unfairly",
- "ungodley", "ungodly",
- "unhapppy", "unhappy",
- "unhealty", "unhealthy",
- "unicrons", "unicorns",
- "unifroms", "uniforms",
- "uniquley", "uniquely",
- "univeral", "universal",
- "unlikley", "unlikely",
- "unlockes", "unlocks",
- "unluckly", "unlucky",
- "unpoened", "unopened",
- "unqiuely", "uniquely",
- "unrakned", "unranked",
- "unrnaked", "unranked",
- "unrpoven", "unproven",
- "unsuable", "unusable",
- "untraind", "untrained",
- "unusualy", "unusually",
- "unvierse", "universe",
- "unworhty", "unworthy",
- "upgarded", "upgraded",
- "upgardes", "upgrades",
- "uploades", "uploads",
- "upstaris", "upstairs",
- "upstiars", "upstairs",
- "urethrea", "urethra",
- "uruguary", "uruguay",
- "ususally", "usually",
- "utilitiy", "utility",
- "utlimate", "ultimate",
- "vaccinae", "vaccinated",
- "vaccinet", "vaccinated",
- "vacinity", "vicinity",
- "vaguelly", "vaguely",
- "vaiation", "aviation",
- "vaieties", "varieties",
- "vailidty", "validity",
- "vairable", "variable",
- "vaklyrie", "valkyrie",
- "valenica", "valencia",
- "valentie", "valentines",
- "valentis", "valentines",
- "validade", "validated",
- "valkirye", "valkyrie",
- "valkiyre", "valkyrie",
- "valkriye", "valkyrie",
- "valkryie", "valkyrie",
- "valkyire", "valkyrie",
- "valnecia", "valencia",
- "valubale", "valuable",
- "valykrie", "valkyrie",
- "vamipres", "vampires",
- "vampiers", "vampires",
- "vampries", "vampires",
- "vangurad", "vanguard",
- "vanillia", "vanilla",
- "vanillla", "vanilla",
- "vanugard", "vanguard",
- "varaible", "variable",
- "varaints", "variants",
- "variabel", "variable",
- "varibale", "variable",
- "varities", "varieties",
- "vassales", "vassals",
- "vassalls", "vassals",
- "vassalos", "vassals",
- "vaticaan", "vatican",
- "vaticina", "vatican",
- "vaulable", "valuable",
- "vaylkrie", "valkyrie",
- "vechiles", "vehicles",
- "vectores", "vectors",
- "vegansim", "veganism",
- "vegtable", "vegetable",
- "vehciles", "vehicles",
- "vehicels", "vehicles",
- "vehicule", "vehicle",
- "veichles", "vehicles",
- "venelope", "envelope",
- "venemous", "venomous",
- "vengance", "vengeance",
- "vengence", "vengeance",
- "verablly", "verbally",
- "verbaitm", "verbatim",
- "verisons", "versions",
- "versatel", "versatile",
- "vertabim", "verbatim",
- "vertigro", "vertigo",
- "vesseles", "vessels",
- "vessells", "vessels",
- "viabiliy", "viability",
- "viatmins", "vitamins",
- "vibratie", "vibrate",
- "vibratin", "vibration",
- "vicintiy", "vicinity",
- "vicseral", "visceral",
- "victimas", "victims",
- "victimes", "victims",
- "victorin", "victorian",
- "victoris", "victories",
- "vieweres", "viewers",
- "viewpoit", "viewpoints",
- "vigilane", "vigilante",
- "vigliant", "vigilant",
- "vikingos", "vikings",
- "viligant", "vigilant",
- "villegas", "villages",
- "vindicte", "vindictive",
- "vinicity", "vicinity",
- "violatin", "violation",
- "violenty", "violently",
- "violetas", "violates",
- "virament", "vraiment",
- "virbator", "vibrator",
- "virginas", "virgins",
- "virgines", "virgins",
- "virgings", "virgins",
- "virginis", "virgins",
- "virginus", "virgins",
- "virtualy", "virtually",
- "virtuels", "virtues",
- "virtuose", "virtues",
- "viscreal", "visceral",
- "visercal", "visceral",
- "visibily", "visibility",
- "visibley", "visibly",
- "visiblly", "visibly",
- "vitailty", "vitality",
- "vitimans", "vitamins",
- "vitmains", "vitamins",
- "vitories", "victories",
- "voicemal", "voicemail",
- "voilates", "violates",
- "volatily", "volatility",
- "volcando", "volcano",
- "volcanoe", "volcano",
- "volcaron", "volcano",
- "vriament", "vraiment",
- "wahtever", "whatever",
- "wallpapr", "wallpapers",
- "warantee", "warranty",
- "warcarft", "warcraft",
- "warrante", "warranties",
- "warriros", "warriors",
- "watchemn", "watchmen",
- "watchign", "watching",
- "wathcing", "watching",
- "wathcmen", "watchmen",
- "wathever", "whatever",
- "watkings", "watkins",
- "wealthly", "wealthy",
- "webistes", "websites",
- "websties", "websites",
- "wednesdy", "wednesdays",
- "weigthed", "weighted",
- "weridest", "weirdest",
- "werstler", "wrestler",
- "wesbites", "websites",
- "westbrok", "westbrook",
- "westerse", "westerners",
- "wherease", "whereas",
- "whipsers", "whispers",
- "whislist", "wishlist",
- "whisltes", "whistles",
- "whisperd", "whispered",
- "whistels", "whistles",
- "whitsles", "whistles",
- "whsipers", "whispers",
- "widgetas", "widgets",
- "wieghted", "weighted",
- "willaims", "williams",
- "willfuly", "willfully",
- "willimas", "williams",
- "windsoar", "windsor",
- "wininpeg", "winnipeg",
- "winnigns", "winnings",
- "winnpieg", "winnipeg",
- "wiredest", "weirdest",
- "wishlsit", "wishlist",
- "wishpers", "whispers",
- "withdral", "withdrawal",
- "witnesss", "witnesses",
- "wonderes", "wonders",
- "wonderus", "wonders",
- "workfore", "workforce",
- "wouldnot", "wouldnt",
- "wranlger", "wrangler",
- "wreckign", "wrecking",
- "wrecthed", "wretched",
- "wrekcing", "wrecking",
- "wreslter", "wrestler",
- "wresters", "wrestlers",
- "writting", "writing",
- "wrnagler", "wrangler",
- "wrteched", "wretched",
- "yeilding", "yielding",
- "yoesmite", "yosemite",
- "yorksher", "yorkshire",
- "yorkshie", "yorkshire",
- "yosemeti", "yosemite",
- "yosimete", "yosemite",
- "zealotes", "zealots",
- "zealoths", "zealots",
- "zealotus", "zealots",
- "zealouts", "zealous",
- "zepplein", "zeppelin",
- "zepplien", "zeppelin",
- "zimbabew", "zimbabwe",
- "zimbawbe", "zimbabwe",
- "zinoists", "zionists",
- "zionisim", "zionism",
- "zionistm", "zionism",
- "zionsits", "zionists",
- "zoinists", "zionists",
- "abiltiy", "ability",
- "abodmen", "abdomen",
- "abondon", "abandon",
- "aboslve", "absolve",
- "abosrbs", "absorbs",
- "abriter", "arbiter",
- "abrupty", "abruptly",
- "absense", "absence",
- "absolue", "absolute",
- "absovle", "absolve",
- "absrobs", "absorbs",
- "absuers", "abusers",
- "absurdy", "absurdly",
- "absymal", "abysmal",
- "abymsal", "abysmal",
- "acadamy", "academy",
- "acadmic", "academic",
- "accesss", "access",
- "accpets", "accepts",
- "accross", "across",
- "accuray", "accuracy",
- "acheive", "achieve",
- "achived", "achieved",
- "acident", "accident",
- "ackward", "awkward",
- "acrlyic", "acrylic",
- "actauly", "actualy",
- "activit", "activist",
- "activly", "actively",
- "actualy", "actually",
- "actulay", "actualy",
- "acuracy", "accuracy",
- "acusing", "causing",
- "acustom", "accustom",
- "acutaly", "actualy",
- "acyrlic", "acrylic",
- "adaptes", "adapters",
- "adatper", "adapter",
- "adbomen", "abdomen",
- "addcits", "addicts",
- "adderss", "address",
- "addtion", "addition",
- "adequet", "adequate",
- "adequit", "adequate",
- "adivser", "adviser",
- "adivsor", "advisor",
- "admited", "admitted",
- "admrial", "admiral",
- "adpater", "adapter",
- "adquire", "acquire",
- "adultey", "adultery",
- "adverst", "adverts",
- "adviced", "advised",
- "advocay", "advocacy",
- "advsior", "advisor",
- "aeriels", "aerials",
- "affaris", "affairs",
- "affiars", "affairs",
- "afircan", "african",
- "africas", "africans",
- "afwully", "awfully",
- "againts", "against",
- "agaisnt", "against",
- "aganist", "against",
- "aggreed", "agreed",
- "agianst", "against",
- "agreing", "agreeing",
- "agruing", "arguing",
- "ahtiest", "athiest",
- "aicraft", "aircraft",
- "ailmony", "alimony",
- "airbore", "airborne",
- "aircaft", "aircraft",
- "airlfow", "airflow",
- "airosft", "airsoft",
- "airpost", "airports",
- "airsfot", "airsoft",
- "airzona", "arizona",
- "alchmey", "alchemy",
- "alchool", "alcohol",
- "alcohal", "alcohol",
- "aledged", "alleged",
- "aledges", "alleges",
- "alegbra", "algebra",
- "algerba", "algebra",
- "alienet", "alienate",
- "alledge", "allege",
- "allegry", "allergy",
- "alltime", "all-time",
- "almighy", "almighty",
- "alochol", "alcohol",
- "alotted", "allotted",
- "alowing", "allowing",
- "alphabt", "alphabet",
- "alreayd", "already",
- "alrighy", "alrighty",
- "altanta", "atlanta",
- "alteast", "atleast",
- "altough", "although",
- "alusion", "allusion",
- "amateus", "amateurs",
- "amatuer", "amateur",
- "amature", "armature",
- "amensia", "amnesia",
- "amensty", "amnesty",
- "amercia", "america",
- "americs", "americas",
- "ammount", "amount",
- "ammused", "amused",
- "amneisa", "amnesia",
- "amnsety", "amnesty",
- "amognst", "amongst",
- "amongts", "amongst",
- "amonsgt", "amongst",
- "ampilfy", "amplify",
- "amrpits", "armpits",
- "analoge", "analogue",
- "analsyt", "analyst",
- "analyes", "analyse",
- "analyts", "analyst",
- "analzye", "analyze",
- "anaylse", "analyse",
- "anaylst", "analyst",
- "anaylze", "analyze",
- "anceint", "ancient",
- "andorid", "android",
- "andriod", "android",
- "androis", "androids",
- "angirly", "angrily",
- "angluar", "angular",
- "angualr", "angular",
- "anicent", "ancient",
- "anitque", "antique",
- "anixety", "anxiety",
- "anmesia", "amnesia",
- "anmesty", "amnesty",
- "annoint", "anoint",
- "annualy", "annually",
- "annuled", "annulled",
- "anohter", "another",
- "anomoly", "anomaly",
- "answerd", "answered",
- "anuglar", "angular",
- "anulled", "annulled",
- "anwsers", "answers",
- "anwyays", "anyways",
- "anxeity", "anxiety",
- "anyoens", "anyones",
- "anyonse", "anyones",
- "anywyas", "anyways",
- "aparent", "apparent",
- "appeard", "appeared",
- "appluad", "applaud",
- "aproval", "approval",
- "apsects", "aspects",
- "apshalt", "asphalt",
- "apsirin", "aspirin",
- "aqcuire", "acquire",
- "aquarim", "aquarium",
- "aquired", "acquired",
- "aranged", "arranged",
- "arbitre", "arbiter",
- "arcahic", "archaic",
- "archiac", "archaic",
- "arcylic", "acrylic",
- "aresnal", "arsenal",
- "aretmis", "artemis",
- "argubly", "arguably",
- "aribter", "arbiter",
- "ariflow", "airflow",
- "arisoft", "airsoft",
- "aritsts", "artists",
- "armchar", "armchair",
- "arogant", "arrogant",
- "arogent", "arrogant",
- "arresst", "arrests",
- "arround", "around",
- "arsneal", "arsenal",
- "artcile", "article",
- "artical", "article",
- "articel", "article",
- "artistc", "artistic",
- "artmeis", "artemis",
- "artsits", "artists",
- "aruging", "arguing",
- "aseuxal", "asexual",
- "asexaul", "asexual",
- "ashpalt", "asphalt",
- "asiprin", "aspirin",
- "asissts", "assists",
- "asnwers", "answers",
- "asorbed", "absorbed",
- "aspahlt", "asphalt",
- "asphlat", "asphalt",
- "aspriin", "aspirin",
- "assagne", "assange",
- "assasin", "assassin",
- "assembe", "assemble",
- "assemby", "assembly",
- "assisst", "assists",
- "assnage", "assange",
- "asssits", "assists",
- "assualt", "assault",
- "asterik", "asterisk",
- "asutria", "austria",
- "atcualy", "actualy",
- "atelast", "atleast",
- "athesim", "atheism",
- "athiesm", "atheism",
- "athiest", "atheist",
- "athiets", "athiest",
- "athlets", "athletes",
- "atlantc", "atlantic",
- "atleats", "atleast",
- "atlesat", "atleast",
- "atorney", "attorney",
- "atremis", "artemis",
- "attemps", "attempts",
- "attemts", "attempts",
- "attened", "attended",
- "attracs", "attracts",
- "audbile", "audible",
- "audibel", "audible",
- "austira", "austria",
- "austrai", "austria",
- "autistc", "autistic",
- "avation", "aviation",
- "avtaars", "avatars",
- "awakend", "awakened",
- "bablyon", "babylon",
- "backdor", "backdoor",
- "backsta", "backseat",
- "baclony", "balcony",
- "badnits", "bandits",
- "baiscly", "basicly",
- "bakcers", "backers",
- "balanse", "balances",
- "balcked", "blacked",
- "banhsee", "banshee",
- "bankgok", "bangkok",
- "baoynet", "bayonet",
- "baptims", "baptism",
- "baptsim", "baptism",
- "baragin", "bargain",
- "bargani", "bargain",
- "bargian", "bargain",
- "bariner", "brainer",
- "barlkey", "barkley",
- "barracs", "barracks",
- "barrles", "barrels",
- "barsita", "barista",
- "barvery", "bravery",
- "bascily", "basicly",
- "basicly", "basically",
- "basilcy", "basicly",
- "basiton", "bastion",
- "basnhee", "banshee",
- "bastane", "bastante",
- "bastars", "bastards",
- "bastino", "bastion",
- "bathrom", "bathroom",
- "batitsa", "batista",
- "batsita", "batista",
- "bayblon", "babylon",
- "baynoet", "bayonet",
- "bayoent", "bayonet",
- "bceuase", "becuase",
- "beacuse", "because",
- "bealtes", "beatles",
- "beaslty", "beastly",
- "beatels", "beatles",
- "beaucop", "beaucoup",
- "becamae", "became",
- "becames", "becomes",
- "becasue", "because",
- "becouse", "because",
- "becuaes", "becuase",
- "becuase", "because",
- "becusae", "becuase",
- "befried", "befriend",
- "beggins", "begins",
- "beglian", "belgian",
- "beglium", "belgium",
- "begnals", "bengals",
- "bejiing", "beijing",
- "beleifs", "beliefs",
- "beleive", "believe",
- "belgain", "belgian",
- "belguim", "belgium",
- "believr", "believer",
- "believs", "believes",
- "belifes", "beliefs",
- "beligan", "belgian",
- "beligum", "belgium",
- "belived", "believed",
- "belives", "believes",
- "benagls", "bengals",
- "benedit", "benedict",
- "benghai", "benghazi",
- "benglas", "bengals",
- "benifit", "benefit",
- "beoynce", "beyonce",
- "beraded", "bearded",
- "bersekr", "berserk",
- "beseige", "besiege",
- "betales", "beatles",
- "bethesa", "bethesda",
- "betrayd", "betrayed",
- "beucase", "becuase",
- "bewteen", "between",
- "bicthes", "bitches",
- "bidrman", "birdman",
- "biejing", "beijing",
- "bifgoot", "bigfoot",
- "bigorty", "bigotry",
- "bigtoed", "bigoted",
- "bigtory", "bigotry",
- "biogted", "bigoted",
- "biogtry", "bigotry",
- "bioplar", "bipolar",
- "biploar", "bipolar",
- "birdamn", "birdman",
- "birdges", "bridges",
- "birgade", "brigade",
- "bitcion", "bitcoin",
- "bithced", "bitched",
- "bithces", "bitches",
- "bitocin", "bitcoin",
- "bizzare", "bizarre",
- "blacony", "balcony",
- "blaimed", "blamed",
- "blankes", "blankets",
- "blegian", "belgian",
- "blegium", "belgium",
- "blizzad", "blizzard",
- "blockes", "blockers",
- "bloster", "bolster",
- "blulets", "bullets",
- "bobmers", "bombers",
- "bollocs", "bollocks",
- "bondary", "boundary",
- "bonnano", "bonanno",
- "bonsues", "bonuses",
- "boraden", "broaden",
- "borader", "broader",
- "boradly", "broadly",
- "bordeom", "boredom",
- "boslter", "bolster",
- "boudler", "boulder",
- "boundry", "boundary",
- "bounses", "bonuses",
- "boutiqe", "boutique",
- "bouyant", "buoyant",
- "braevry", "bravery",
- "braista", "barista",
- "brakley", "barkley",
- "branier", "brainer",
- "braoden", "broaden",
- "braoder", "broader",
- "braodly", "broadly",
- "brednan", "brendan",
- "breifly", "briefly",
- "breserk", "berserk",
- "brethen", "brethren",
- "brewrey", "brewery",
- "briagde", "brigade",
- "brianer", "brainer",
- "bridman", "birdman",
- "brielfy", "briefly",
- "brigdes", "bridges",
- "brightn", "brighten",
- "brisben", "brisbane",
- "britian", "britain",
- "britsol", "bristol",
- "briused", "bruised",
- "briuser", "bruiser",
- "briuses", "bruises",
- "brocoli", "broccoli",
- "bronocs", "broncos",
- "browine", "brownie",
- "brownei", "brownie",
- "brownis", "brownies",
- "bruglar", "burglar",
- "brunete", "brunette",
- "bruning", "burning",
- "brusied", "bruised",
- "brusies", "bruises",
- "brusses", "brussels",
- "brutaly", "brutally",
- "btiched", "bitched",
- "btiches", "bitches",
- "bubbels", "bubbles",
- "buddhim", "buddhism",
- "buddhit", "buddhist",
- "buddist", "buddhist",
- "budgest", "budgets",
- "bugdets", "budgets",
- "buildes", "builders",
- "bulgara", "bulgaria",
- "bullest", "bullets",
- "buoancy", "buoyancy",
- "burguny", "burgundy",
- "buriser", "bruiser",
- "burlgar", "burglar",
- "burnign", "burning",
- "burried", "buried",
- "burrtio", "burrito",
- "busines", "business",
- "busness", "business",
- "butthoe", "butthole",
- "buttrey", "buttery",
- "cababge", "cabbage",
- "cabines", "cabinets",
- "cabniet", "cabinet",
- "caclium", "calcium",
- "cacuses", "caucuses",
- "caffeen", "caffeine",
- "cahched", "cached",
- "cahotic", "chaotic",
- "cahsier", "cashier",
- "cailbre", "calibre",
- "calaber", "caliber",
- "calagry", "calgary",
- "calback", "callback",
- "calbire", "calibre",
- "calcuim", "calcium",
- "calculs", "calculus",
- "calicum", "calcium",
- "calrify", "clarify",
- "calrity", "clarity",
- "caluses", "clauses",
- "camboda", "cambodia",
- "campain", "campaign",
- "campuss", "campuses",
- "cancles", "cancels",
- "cancres", "cancers",
- "cancuks", "canucks",
- "canides", "candies",
- "cannnot", "cannot",
- "canrage", "carnage",
- "capible", "capable",
- "capitas", "capitals",
- "capsuls", "capsules",
- "captais", "captains",
- "captial", "capital",
- "captiol", "capitol",
- "captued", "captured",
- "capturd", "captured",
- "capusle", "capsule",
- "carange", "carnage",
- "carbien", "carbine",
- "cardaic", "cardiac",
- "cardina", "cardigan",
- "careing", "caring",
- "caridac", "cardiac",
- "carmtan", "cartman",
- "carnege", "carnage",
- "carnige", "carnage",
- "carolan", "carolina",
- "carreer", "career",
- "carrers", "careers",
- "cartles", "cartels",
- "caryons", "crayons",
- "casette", "cassette",
- "casheir", "cashier",
- "cashies", "cashiers",
- "cashire", "cashier",
- "casltes", "castles",
- "caspule", "capsule",
- "cassete", "cassette",
- "castels", "castles",
- "casuing", "causing",
- "cathlic", "catholic",
- "cauncks", "canucks",
- "cavarly", "cavalry",
- "cavlary", "cavalry",
- "celcius", "celsius",
- "celisus", "celsius",
- "celitcs", "celtics",
- "celsuis", "celsius",
- "centruy", "century",
- "centuty", "century",
- "ceratin", "certain",
- "cermaic", "ceramic",
- "certian", "certain",
- "cervial", "cervical",
- "cesspol", "cesspool",
- "cetlics", "celtics",
- "chambre", "chamber",
- "charcol", "charcoal",
- "charisa", "charisma",
- "chasiss", "chassis",
- "chatoic", "chaotic",
- "cheeots", "cheetos",
- "cheesse", "cheeses",
- "chekcer", "checker",
- "chelsae", "chelsea",
- "cheslea", "chelsea",
- "chiense", "chinese",
- "childen", "children",
- "chimeny", "chimney",
- "chinees", "chinese",
- "chinmey", "chimney",
- "chipest", "chipset",
- "chispet", "chipset",
- "chivaly", "chivalry",
- "chlesea", "chelsea",
- "choatic", "chaotic",
- "chocies", "choices",
- "choosen", "chosen",
- "chtulhu", "cthulhu",
- "churchs", "churches",
- "cilanto", "cilantro",
- "cilents", "clients",
- "circels", "circles",
- "circuis", "circuits",
- "cirlces", "circles",
- "clacium", "calcium",
- "claerer", "clearer",
- "claerly", "clearly",
- "clagary", "calgary",
- "claibre", "calibre",
- "claimes", "claims",
- "clairfy", "clarify",
- "clairty", "clarity",
- "clanand", "clannad",
- "clarfiy", "clarify",
- "classis", "classics",
- "clasues", "clauses",
- "claymer", "claymore",
- "claymoe", "claymore",
- "cleanes", "cleanse",
- "cleasne", "cleanse",
- "cleints", "clients",
- "clenase", "cleanse",
- "clesius", "celsius",
- "cletics", "celtics",
- "clevery", "cleverly",
- "climats", "climates",
- "climbes", "climbers",
- "clincis", "clinics",
- "clitors", "clitoris",
- "cloesly", "closely",
- "closley", "closely",
- "cluases", "clauses",
- "cluprit", "culprit",
- "coalese", "coalesce",
- "coctail", "cocktail",
- "cohesie", "cohesive",
- "colgone", "cologne",
- "collape", "collapse",
- "collest", "collects",
- "collony", "colony",
- "collumn", "column",
- "cologen", "cologne",
- "colomba", "colombia",
- "colonge", "cologne",
- "colorao", "colorado",
- "colourd", "coloured",
- "columsn", "columns",
- "comando", "commando",
- "comapny", "company",
- "comapre", "compare",
- "comarde", "comrade",
- "comback", "comeback",
- "combins", "combines",
- "comdeic", "comedic",
- "comited", "committed",
- "commano", "commando",
- "commans", "commands",
- "commere", "commerce",
- "comming", "coming",
- "commitd", "commited",
- "compase", "compares",
- "compede", "competed",
- "compilr", "compiler",
- "compnay", "company",
- "compots", "compost",
- "comrads", "comrades",
- "comtpon", "compton",
- "conceed", "concede",
- "conceps", "concepts",
- "conclue", "conclude",
- "concret", "concert",
- "condenm", "condemn",
- "condiut", "conduit",
- "condmen", "condemn",
- "confids", "confides",
- "confins", "confines",
- "confise", "confines",
- "conflit", "conflict",
- "conived", "connived",
- "connecs", "connects",
- "conqeur", "conquer",
- "conqure", "conquer",
- "consept", "concept",
- "consern", "concern",
- "consums", "consumes",
- "contacs", "contacts",
- "contais", "contains",
- "contast", "contacts",
- "contemt", "contempt",
- "contens", "contents",
- "contess", "contests",
- "contian", "contain",
- "contine", "continue",
- "convers", "converts",
- "conveyd", "conveyed",
- "convine", "convince",
- "coprses", "corpses",
- "coputer", "computer",
- "corasir", "corsair",
- "coratia", "croatia",
- "coridal", "cordial",
- "corsari", "corsair",
- "corsiar", "corsair",
- "corspes", "corpses",
- "corwbar", "crowbar",
- "costums", "costumes",
- "coudlnt", "couldnt",
- "coulmns", "columns",
- "coulndt", "couldnt",
- "counsle", "counsel",
- "countes", "counters",
- "courtey", "courtesy",
- "covenat", "covenant",
- "coytoes", "coyotes",
- "crabine", "carbine",
- "cralwed", "crawled",
- "craotia", "croatia",
- "craweld", "crawled",
- "creamic", "ceramic",
- "createn", "creatine",
- "creater", "creature",
- "creatie", "creatine",
- "creatue", "creature",
- "creepes", "creepers",
- "creepig", "creeping",
- "creulty", "cruelty",
- "cricles", "circles",
- "critera", "criteria",
- "cropses", "corpses",
- "crosair", "corsair",
- "crpytic", "cryptic",
- "crsytal", "crystal",
- "crtical", "critical",
- "crucibe", "crucible",
- "cruetly", "cruelty",
- "cruical", "crucial",
- "crulety", "cruelty",
- "crusdae", "crusade",
- "crusier", "cruiser",
- "crusies", "cruises",
- "crusive", "cursive",
- "crutchs", "crutches",
- "crypitc", "cryptic",
- "crystas", "crystals",
- "crystsl", "crystals",
- "crytpic", "cryptic",
- "crytsal", "crystal",
- "cthluhu", "cthulhu",
- "cthuhlu", "cthulhu",
- "cthuluh", "cthulhu",
- "ctuhlhu", "cthulhu",
- "cuasing", "causing",
- "cubcile", "cubicle",
- "cubilce", "cubicle",
- "cuddels", "cuddles",
- "culrpit", "culprit",
- "culturs", "cultures",
- "cupboad", "cupboard",
- "cuplrit", "culprit",
- "curatin", "curtain",
- "curcial", "crucial",
- "curcuit", "circuit",
- "curelty", "cruelty",
- "curiser", "cruiser",
- "curisve", "cursive",
- "currate", "curate",
- "currens", "currents",
- "curreny", "currency",
- "currest", "currents",
- "cursade", "crusade",
- "curtian", "curtain",
- "cyandie", "cyanide",
- "cyclits", "cyclist",
- "cycloen", "cyclone",
- "cycolps", "cyclops",
- "cylcist", "cyclist",
- "cylcone", "cyclone",
- "cylcops", "cyclops",
- "cynaide", "cyanide",
- "cyrptic", "cryptic",
- "cyrstal", "crystal",
- "dagners", "dangers",
- "daimond", "diamond",
- "damenor", "demeanor",
- "dammage", "damage",
- "darcula", "dracula",
- "dargons", "dragons",
- "darkets", "darkest",
- "datbase", "database",
- "daulity", "duality",
- "dawrves", "dwarves",
- "ddogers", "dodgers",
- "ddoging", "dodging",
- "deadlit", "deadlift",
- "deadpol", "deadpool",
- "deafult", "default",
- "deahtly", "deathly",
- "deatils", "details",
- "deatlhy", "deathly",
- "decalre", "declare",
- "decison", "decision",
- "declars", "declares",
- "declase", "declares",
- "decress", "decrees",
- "decribe", "describe",
- "decsend", "descend",
- "dectect", "detect",
- "defaint", "defiant",
- "defauls", "defaults",
- "defelct", "deflect",
- "defensd", "defends",
- "deffine", "define",
- "definat", "defiant",
- "definet", "definite",
- "definie", "definite",
- "definig", "defining",
- "definit", "definite",
- "defualt", "default",
- "degarde", "degrade",
- "degrase", "degrasse",
- "degrate", "degrade",
- "deiners", "deniers",
- "deisgns", "designs",
- "deivant", "deviant",
- "dekstop", "desktop",
- "delcare", "declare",
- "delfect", "deflect",
- "demenor", "demeanor",
- "dementa", "dementia",
- "demsond", "desmond",
- "deneirs", "deniers",
- "denisty", "density",
- "densley", "densely",
- "depcits", "depicts",
- "dependd", "depended",
- "depitcs", "depicts",
- "deployd", "deployed",
- "depsise", "despise",
- "descrie", "describe",
- "descuss", "discuss",
- "desgins", "designs",
- "desings", "designs",
- "desitny", "destiny",
- "desnely", "densely",
- "desnity", "density",
- "desomnd", "desmond",
- "despict", "depict",
- "despide", "despised",
- "despies", "despise",
- "destkop", "desktop",
- "destory", "destroy",
- "destros", "destroys",
- "detaild", "detailed",
- "detials", "details",
- "detorit", "detroit",
- "detriot", "detroit",
- "deuling", "dueling",
- "devaint", "deviant",
- "devaite", "deviate",
- "devided", "divided",
- "devlove", "devolve",
- "devotin", "devotion",
- "devovle", "devolve",
- "diabets", "diabetes",
- "dialecs", "dialects",
- "dialoge", "dialogue",
- "diamons", "diamonds",
- "diasble", "disable",
- "dicksih", "dickish",
- "dicover", "discover",
- "dictats", "dictates",
- "dieties", "deities",
- "dilpoma", "diploma",
- "dimaond", "diamond",
- "dingity", "dignity",
- "dinosar", "dinosaur",
- "diosese", "diocese",
- "dipolma", "diploma",
- "dirbble", "dribble",
- "directy", "directly",
- "diretcx", "directx",
- "dirived", "derived",
- "dirvers", "drivers",
- "disbale", "disable",
- "disguss", "disgusts",
- "disliks", "dislikes",
- "disover", "discover",
- "dispair", "despair",
- "dispath", "dispatch",
- "dispite", "despite",
- "dispuse", "disputes",
- "disputs", "disputes",
- "dissole", "dissolve",
- "distase", "distaste",
- "distint", "distinct",
- "divison", "division",
- "docuhes", "douches",
- "docuhey", "douchey",
- "dogders", "dodgers",
- "dogding", "dodging",
- "dolhpin", "dolphin",
- "dolphis", "dolphins",
- "dominae", "dominate",
- "dominno", "dominion",
- "doplhin", "dolphin",
- "dortmud", "dortmund",
- "draclua", "dracula",
- "dracual", "dracula",
- "drakest", "darkest",
- "dramtic", "dramatic",
- "dribbel", "dribble",
- "driectx", "directx",
- "driftig", "drifting",
- "drinkes", "drinkers",
- "druming", "drumming",
- "duailty", "duality",
- "dualtiy", "duality",
- "dubsetp", "dubstep",
- "dulaity", "duality",
- "duleing", "dueling",
- "dunegon", "dungeon",
- "dungeos", "dungeons",
- "dungoen", "dungeon",
- "durring", "during",
- "dusbtep", "dubstep",
- "dyansty", "dynasty",
- "dynamis", "dynamics",
- "dynsaty", "dynasty",
- "earlies", "earliest",
- "earliet", "earliest",
- "earplus", "earplugs",
- "eastwod", "eastwood",
- "ebcuase", "becuase",
- "ecilpse", "eclipse",
- "eclipes", "eclipse",
- "eclispe", "eclipse",
- "eclpise", "eclipse",
- "ectsasy", "ecstasy",
- "edbiles", "edibles",
- "edibels", "edibles",
- "effords", "efforts",
- "ehtanol", "ethanol",
- "eifnach", "einfach",
- "eighten", "eighteen",
- "einfahc", "einfach",
- "elasped", "elapsed",
- "elcipse", "eclipse",
- "elction", "election",
- "elecrto", "electro",
- "electic", "electric",
- "electon", "election",
- "ellitot", "elliott",
- "elloitt", "elliott",
- "elphant", "elephant",
- "emabrgo", "embargo",
- "emabssy", "embassy",
- "emapthy", "empathy",
- "embeded", "embedded",
- "embrago", "embargo",
- "eminate", "emanate",
- "emipres", "empires",
- "emision", "emission",
- "emiting", "emitting",
- "emition", "emission",
- "emmited", "emitted",
- "empahty", "empathy",
- "emphsis", "emphasis",
- "empiers", "empires",
- "empited", "emptied",
- "emplore", "employer",
- "emporer", "emperor",
- "empries", "empires",
- "emtpied", "emptied",
- "enameld", "enameled",
- "encahnt", "enchant",
- "encalve", "enclave",
- "encrpyt", "encrypt",
- "encyrpt", "encrypt",
- "endores", "endorse",
- "endrose", "endorse",
- "energis", "energies",
- "enforse", "enforces",
- "enginer", "engineer",
- "englsih", "english",
- "enhanse", "enhances",
- "enlcave", "enclave",
- "enlgish", "english",
- "enlsave", "enslave",
- "ensalve", "enslave",
- "entbook", "netbook",
- "entirey", "entirety",
- "entorpy", "entropy",
- "epiloge", "epilogue",
- "episdoe", "episode",
- "epsiode", "episode",
- "epsorts", "esports",
- "eptiome", "epitome",
- "equiped", "equipped",
- "erested", "arrested",
- "escapse", "escapes",
- "escpaes", "escapes",
- "esctasy", "ecstasy",
- "esporst", "esports",
- "espreso", "espresso",
- "esprots", "esports",
- "essense", "essence",
- "etherel", "ethereal",
- "ethnaol", "ethanol",
- "euphora", "euphoria",
- "europen", "european",
- "eurpean", "european",
- "everets", "everest",
- "everset", "everest",
- "evloved", "evolved",
- "evloves", "evolves",
- "evovled", "evolved",
- "evovles", "evolves",
- "exaclty", "exactly",
- "exahust", "exhaust",
- "examind", "examined",
- "exapnds", "expands",
- "exatled", "exalted",
- "excange", "exchange",
- "excatly", "exactly",
- "excells", "excels",
- "exceprt", "excerpt",
- "excluse", "excludes",
- "excrept", "excerpt",
- "exculde", "exclude",
- "exelent", "excellent",
- "exemple", "example",
- "exerpts", "excerpts",
- "exhasut", "exhaust",
- "exhuast", "exhaust",
- "exising", "existing",
- "existet", "existent",
- "exlated", "exalted",
- "exlcude", "exclude",
- "exliled", "exiled",
- "exludes", "excludes",
- "exmaple", "example",
- "exoitcs", "exotics",
- "expalin", "explain",
- "expeced", "expected",
- "expells", "expels",
- "expiers", "expires",
- "explict", "explicit",
- "expliot", "exploit",
- "explods", "explodes",
- "explose", "explodes",
- "expolde", "explode",
- "expolit", "exploit",
- "exposse", "exposes",
- "expries", "expires",
- "exsited", "existed",
- "extered", "exerted",
- "exterme", "extreme",
- "extoics", "exotics",
- "extreem", "extreme",
- "extrems", "extremes",
- "eyebals", "eyeballs",
- "eyebros", "eyebrows",
- "fabulos", "fabulous",
- "facebok", "facebook",
- "facepam", "facepalm",
- "faclons", "falcons",
- "facsism", "fascism",
- "facsist", "fascist",
- "failurs", "failures",
- "faincee", "fiancee",
- "falesly", "falsely",
- "falired", "flaired",
- "falshed", "flashed",
- "falshes", "flashes",
- "falsley", "falsely",
- "falvors", "flavors",
- "familes", "families",
- "famoust", "famous",
- "famousy", "famously",
- "fanatsy", "fantasy",
- "fantaic", "fanatic",
- "faoming", "foaming",
- "fascits", "fascist",
- "fasicsm", "fascism",
- "fasicst", "fascist",
- "faslely", "falsely",
- "fatiuge", "fatigue",
- "febuary", "february",
- "fecthed", "fetched",
- "fecthes", "fetches",
- "feminen", "feminine",
- "feminie", "feminine",
- "feminim", "feminism",
- "feodras", "fedoras",
- "fertily", "fertility",
- "fesitve", "festive",
- "fethced", "fetched",
- "fethces", "fetches",
- "fetishs", "fetishes",
- "fianite", "finite",
- "fianlly", "finally",
- "fiercly", "fiercely",
- "filcker", "flicker",
- "filpped", "flipped",
- "filterd", "filtered",
- "finacee", "fiancee",
- "fineses", "finesse",
- "fininsh", "finnish",
- "finishs", "finishes",
- "finisse", "finishes",
- "finnsih", "finnish",
- "firends", "friends",
- "firggin", "friggin",
- "firsbee", "frisbee",
- "firslty", "firstly",
- "firtsly", "firstly",
- "fitlers", "filters",
- "flacons", "falcons",
- "flahsed", "flashed",
- "flahses", "flashes",
- "flaried", "flaired",
- "flasely", "falsely",
- "flashig", "flashing",
- "flavord", "flavored",
- "flavous", "flavours",
- "flawess", "flawless",
- "flciker", "flicker",
- "fliters", "filters",
- "flordia", "florida",
- "florene", "florence",
- "fnaatic", "fanatic",
- "fomaing", "foaming",
- "fonetic", "phonetic",
- "forefit", "forfeit",
- "foregin", "foreign",
- "foreing", "foreign",
- "forfiet", "forfeit",
- "forhead", "forehead",
- "foriegn", "foreign",
- "formaly", "formally",
- "formery", "formerly",
- "formost", "foremost",
- "formual", "formula",
- "formuls", "formulas",
- "forrset", "forrest",
- "forsakn", "forsaken",
- "forsane", "forsaken",
- "forumla", "formula",
- "fountan", "fountain",
- "fourten", "fourteen",
- "fracter", "fracture",
- "fragmet", "fragment",
- "freedos", "freedoms",
- "freinds", "friends",
- "frigign", "friggin",
- "fristly", "firstly",
- "frostig", "frosting",
- "frsibee", "frisbee",
- "fruitin", "fruition",
- "fullets", "fullest",
- "fullset", "fullest",
- "funides", "fundies",
- "funtion", "function",
- "furance", "furnace",
- "furncae", "furnace",
- "futhroc", "futhark",
- "gadgest", "gadgets",
- "gagdets", "gadgets",
- "galatic", "galactic",
- "galcier", "glacier",
- "galsgow", "glasgow",
- "gameply", "gameplay",
- "gamerga", "gamertag",
- "gankign", "ganking",
- "ganster", "gangster",
- "garabge", "garbage",
- "garfied", "garfield",
- "garnola", "granola",
- "generas", "generals",
- "genersl", "generals",
- "geniuss", "geniuses",
- "geogria", "georgia",
- "geomety", "geometry",
- "georiga", "georgia",
- "gernade", "grenade",
- "gerogia", "georgia",
- "gigabye", "gigabyte",
- "giltchy", "glitchy",
- "gimmics", "gimmicks",
- "gimmicy", "gimmicky",
- "girzzly", "grizzly",
- "glagsow", "glasgow",
- "glaicer", "glacier",
- "glicthy", "glitchy",
- "glimpes", "glimpse",
- "glimspe", "glimpse",
- "glipmse", "glimpse",
- "glitchd", "glitched",
- "glitchs", "glitches",
- "glithcy", "glitchy",
- "globaly", "globally",
- "gloiath", "goliath",
- "glorios", "glorious",
- "gltichy", "glitchy",
- "gnaking", "ganking",
- "gnawwed", "gnawed",
- "goddanm", "goddamn",
- "goddman", "goddamn",
- "godliek", "godlike",
- "godlman", "goldman",
- "godsped", "godspeed",
- "goergia", "georgia",
- "goilath", "goliath",
- "golaith", "goliath",
- "golbins", "goblins",
- "goldamn", "goldman",
- "goldbeg", "goldberg",
- "goldike", "godlike",
- "golitah", "goliath",
- "goodluk", "goodluck",
- "gorumet", "gourmet",
- "gosepls", "gospels",
- "gosples", "gospels",
- "gpysies", "gypsies",
- "grabage", "garbage",
- "grahpic", "graphic",
- "grainte", "granite",
- "grammer", "grammar",
- "graniet", "granite",
- "grantie", "granite",
- "graphie", "graphite",
- "graphis", "graphics",
- "grappel", "grapple",
- "greande", "grenade",
- "grenads", "grenades",
- "greneer", "greener",
- "griaffe", "giraffe",
- "gridles", "griddles",
- "grillig", "grilling",
- "grpahic", "graphic",
- "guardin", "guardian",
- "guiness", "guinness",
- "gullibe", "gullible",
- "gutiars", "guitars",
- "gypises", "gypsies",
- "gyspies", "gypsies",
- "habaeus", "habeas",
- "haethen", "heathen",
- "hailfax", "halifax",
- "halfiax", "halifax",
- "handbok", "handbook",
- "handedy", "handedly",
- "handeld", "handled",
- "hanlder", "handler",
- "hannibl", "hannibal",
- "hanuted", "haunted",
- "haorder", "hoarder",
- "hapened", "happened",
- "happend", "happened",
- "happliy", "happily",
- "harased", "harassed",
- "harases", "harasses",
- "hardend", "hardened",
- "hardwod", "hardwood",
- "haricut", "haircut",
- "hatchig", "hatching",
- "hauntig", "haunting",
- "haviest", "heaviest",
- "headest", "headset",
- "headses", "headsets",
- "heaveny", "heavenly",
- "heigher", "higher",
- "heigths", "heights",
- "helemts", "helmets",
- "hellfie", "hellfire",
- "hellvua", "helluva",
- "helment", "helmet",
- "helpped", "helped",
- "hemlets", "helmets",
- "henious", "heinous",
- "heorics", "heroics",
- "heorine", "heroine",
- "heriocs", "heroics",
- "herione", "heroine",
- "herocis", "heroics",
- "heronie", "heroine",
- "hesiman", "heisman",
- "hieghts", "heights",
- "hienous", "heinous",
- "hiesman", "heisman",
- "himselv", "himself",
- "hiptser", "hipster",
- "hismelf", "himself",
- "hispter", "hipster",
- "hitboxs", "hitboxes",
- "hoilday", "holiday",
- "hokpins", "hopkins",
- "holdiay", "holiday",
- "holdins", "holdings",
- "homniem", "hominem",
- "horader", "hoarder",
- "hosited", "hoisted",
- "hosthot", "hotshot",
- "hostles", "hostels",
- "hostpot", "hotspot",
- "hothsot", "hotshot",
- "hotpsot", "hotspot",
- "hotsopt", "hotspot",
- "hounour", "honour",
- "hseldon", "sheldon",
- "huanted", "haunted",
- "humanit", "humanist",
- "humants", "humanist",
- "humidiy", "humidity",
- "humoros", "humorous",
- "hunagry", "hungary",
- "hunderd", "hundred",
- "hundres", "hundreds",
- "hungray", "hungary",
- "hurdels", "hurdles",
- "hurldes", "hurdles",
- "husbans", "husbands",
- "hweaton", "wheaton",
- "hybirds", "hybrids",
- "hydogen", "hydrogen",
- "hygeine", "hygiene",
- "hypnoss", "hypnosis",
- "hyrbids", "hybrids",
- "hystera", "hysteria",
- "iceforg", "icefrog",
- "ierland", "ireland",
- "ignitin", "ignition",
- "ignorat", "ignorant",
- "illegas", "illegals",
- "illegsl", "illegals",
- "illinos", "illinois",
- "imanent", "eminent",
- "imapcts", "impacts",
- "iminent", "eminent",
- "imminet", "imminent",
- "implict", "implicit",
- "imploed", "implode",
- "imploys", "employs",
- "impluse", "impulse",
- "impolde", "implode",
- "importd", "imported",
- "imporve", "improve",
- "impules", "impulse",
- "impusle", "impulse",
- "imrpove", "improve",
- "incldue", "include",
- "incluse", "includes",
- "indains", "indians",
- "indiaan", "indiana",
- "indluge", "indulge",
- "indugle", "indulge",
- "infalte", "inflate",
- "infenro", "inferno",
- "infered", "inferred",
- "inferir", "inferior",
- "infinet", "infinite",
- "infinie", "infinite",
- "infinit", "infinite",
- "infornt", "infront",
- "infroms", "informs",
- "infrotn", "infront",
- "inheirt", "inherit",
- "inidans", "indians",
- "initals", "initials",
- "initisl", "initials",
- "inlcine", "incline",
- "inovker", "invoker",
- "inpeach", "impeach",
- "inpsect", "inspect",
- "inpsire", "inspire",
- "inquier", "inquire",
- "inquriy", "inquiry",
- "insaney", "insanely",
- "inscets", "insects",
- "insepct", "inspect",
- "insipre", "inspire",
- "insluts", "insults",
- "instade", "instead",
- "instint", "instinct",
- "intenst", "intents",
- "intered", "interred",
- "interet", "interest",
- "internt", "internet",
- "interro", "interior",
- "intrest", "interest",
- "intrige", "intrigue",
- "invlove", "involve",
- "invoekr", "invoker",
- "invovle", "involve",
- "iornman", "ironman",
- "iranain", "iranian",
- "iranias", "iranians",
- "iranina", "iranian",
- "irleand", "ireland",
- "ironamn", "ironman",
- "isalmic", "islamic",
- "isareli", "israeli",
- "islamit", "islamist",
- "islmaic", "islamic",
- "isloate", "isolate",
- "isralei", "israeli",
- "isreali", "israeli",
- "italias", "italians",
- "jagaurs", "jaguars",
- "jaguras", "jaguars",
- "jamacia", "jamaica",
- "jamaina", "jamaican",
- "jamiaca", "jamaica",
- "jamsine", "jasmine",
- "janaury", "january",
- "januray", "january",
- "japanes", "japanese",
- "jasmien", "jasmine",
- "jaugars", "jaguars",
- "jaunary", "january",
- "jeircho", "jericho",
- "jennins", "jennings",
- "jeopary", "jeopardy",
- "jeresys", "jerseys",
- "jericoh", "jericho",
- "jersyes", "jerseys",
- "jewerly", "jewelry",
- "jorunal", "journal",
- "jounral", "journal",
- "joystik", "joystick",
- "juadism", "judaism",
- "judasim", "judaism",
- "judical", "judicial",
- "juipter", "jupiter",
- "junglig", "jungling",
- "juptier", "jupiter",
- "jusitfy", "justify",
- "justfiy", "justify",
- "karakoe", "karaoke",
- "karoake", "karaoke",
- "kenendy", "kennedy",
- "kenndey", "kennedy",
- "kentucy", "kentucky",
- "keyboad", "keyboard",
- "keychan", "keychain",
- "keynode", "keynote",
- "kicthen", "kitchen",
- "killins", "killings",
- "kineitc", "kinetic",
- "kinghts", "knights",
- "kinteic", "kinetic",
- "kitches", "kitchens",
- "kitites", "kitties",
- "knietic", "kinetic",
- "knigths", "knights",
- "knuckel", "knuckle",
- "kroeans", "koreans",
- "krudish", "kurdish",
- "ktichen", "kitchen",
- "kubirck", "kubrick",
- "kunckle", "knuckle",
- "kurbick", "kubrick",
- "kuridsh", "kurdish",
- "laguage", "language",
- "landins", "landings",
- "lantren", "lantern",
- "laready", "already",
- "laregly", "largely",
- "largley", "largely",
- "lasanga", "lasagna",
- "lasgana", "lasagna",
- "latitue", "latitude",
- "latnern", "lantern",
- "launhed", "launched",
- "lavendr", "lavender",
- "leathal", "lethal",
- "lefitst", "leftist",
- "leftits", "leftist",
- "legnths", "lengths",
- "legnthy", "lengthy",
- "legoins", "legions",
- "leigons", "legions",
- "lenghts", "lengths",
- "lenoard", "leonard",
- "lepoard", "leopard",
- "lesbain", "lesbian",
- "lesiban", "lesbian",
- "lesiure", "leisure",
- "liasion", "liaison",
- "liasons", "liaisons",
- "liberae", "liberate",
- "liberas", "liberals",
- "lienups", "lineups",
- "liesure", "leisure",
- "liftime", "lifetime",
- "lighlty", "lightly",
- "lightes", "lighters",
- "ligthly", "lightly",
- "linclon", "lincoln",
- "linueps", "lineups",
- "liqiuds", "liquids",
- "lisence", "license",
- "lisense", "license",
- "listend", "listened",
- "litecon", "litecoin",
- "literae", "literate",
- "lithuim", "lithium",
- "litihum", "lithium",
- "loadous", "loadouts",
- "loenard", "leonard",
- "loepard", "leopard",
- "logiteh", "logitech",
- "loosley", "loosely",
- "luandry", "laundry",
- "luckliy", "luckily",
- "luicfer", "lucifer",
- "lunatis", "lunatics",
- "maching", "machine",
- "machins", "machines",
- "maclolm", "malcolm",
- "macthup", "matchup",
- "madsion", "madison",
- "magents", "magnets",
- "magicin", "magician",
- "magolia", "magnolia",
- "maidson", "madison",
- "maintan", "maintain",
- "mairlyn", "marilyn",
- "malaira", "malaria",
- "malaysa", "malaysia",
- "malclom", "malcolm",
- "manauls", "manuals",
- "mandase", "mandates",
- "mandats", "mandates",
- "mangeld", "mangled",
- "mangets", "magnets",
- "manualy", "manually",
- "manuver", "maneuver",
- "marbels", "marbles",
- "margart", "margaret",
- "mariage", "marriage",
- "mariens", "marines",
- "maritan", "martian",
- "marixsm", "marxism",
- "mariyln", "marilyn",
- "markede", "marketed",
- "marlbes", "marbles",
- "marliyn", "marilyn",
- "marnies", "marines",
- "marrage", "marriage",
- "martail", "martial",
- "martain", "martian",
- "masacra", "mascara",
- "massace", "massacre",
- "mathcup", "matchup",
- "mathwes", "mathews",
- "matrial", "martial",
- "maunals", "manuals",
- "mcalren", "mclaren",
- "meanins", "meanings",
- "medicad", "medicaid",
- "medicae", "medicare",
- "medioce", "mediocre",
- "meixcan", "mexican",
- "meldoic", "melodic",
- "melieux", "milieux",
- "melodis", "melodies",
- "memeber", "member",
- "memoery", "memory",
- "memorie", "memory",
- "menally", "mentally",
- "mentaly", "mentally",
- "meoldic", "melodic",
- "meranda", "veranda",
- "merchat", "merchant",
- "merucry", "mercury",
- "messagd", "messaged",
- "messaih", "messiah",
- "metagem", "metagame",
- "metalic", "metallic",
- "mexcian", "mexican",
- "michina", "michigan",
- "midfied", "midfield",
- "midotwn", "midtown",
- "midtwon", "midtown",
- "migrans", "migrants",
- "militat", "militant",
- "militis", "militias",
- "miltary", "military",
- "mimimum", "minimum",
- "mineras", "minerals",
- "mininos", "minions",
- "ministr", "minister",
- "ministy", "ministry",
- "minoins", "minions",
- "minstry", "ministry",
- "minumum", "minimum",
- "mirrord", "mirrored",
- "misandy", "misandry",
- "misison", "mission",
- "misouri", "missouri",
- "mispell", "misspell",
- "missils", "missiles",
- "mistery", "mystery",
- "mobiliy", "mobility",
- "modualr", "modular",
- "momento", "memento",
- "momment", "moment",
- "monarcy", "monarchy",
- "monatge", "montage",
- "monglos", "mongols",
- "monitos", "monitors",
- "monstre", "monster",
- "montaeg", "montage",
- "montrel", "montreal",
- "monumet", "monument",
- "morbidy", "morbidly",
- "morgage", "mortgage",
- "morphen", "morphine",
- "morphie", "morphine",
- "morroco", "morocco",
- "mortage", "mortgage",
- "mosnter", "monster",
- "mosture", "moisture",
- "motivet", "motivate",
- "motnage", "montage",
- "motoral", "motorola",
- "mountan", "mountain",
- "movment", "movement",
- "mucuous", "mucous",
- "muesums", "museums",
- "muliple", "multiple",
- "mulsims", "muslims",
- "multipe", "multiple",
- "multipy", "multiply",
- "munbers", "numbers",
- "munchis", "munchies",
- "murderd", "murdered",
- "muscial", "musical",
- "mushrom", "mushroom",
- "musilms", "muslims",
- "muslces", "muscles",
- "musuems", "museums",
- "mutatin", "mutation",
- "mypsace", "myspace",
- "mysapce", "myspace",
- "napolen", "napoleon",
- "narhwal", "narwhal",
- "natique", "antique",
- "nativey", "natively",
- "natrual", "natural",
- "naugthy", "naughty",
- "nauseos", "nauseous",
- "nautils", "nautilus",
- "nautral", "natural",
- "nautres", "natures",
- "nectode", "netcode",
- "needels", "needles",
- "neruons", "neurons",
- "neslave", "enslave",
- "netocde", "netcode",
- "netowrk", "network",
- "netural", "neutral",
- "neturon", "neutron",
- "netwrok", "network",
- "neurton", "neutron",
- "neuterd", "neutered",
- "nighlty", "nightly",
- "nigthly", "nightly",
- "nihilim", "nihilism",
- "ninties", "1990s",
- "niverse", "inverse",
- "nocture", "nocturne",
- "nominae", "nominate",
- "nominet", "nominate",
- "nonsene", "nonsense",
- "noramls", "normals",
- "norhern", "northern",
- "normaly", "normally",
- "normany", "normandy",
- "northen", "northern",
- "nostris", "nostrils",
- "notario", "ontario",
- "notebok", "notebook",
- "nothern", "northern",
- "nowdays", "nowadays",
- "nrivana", "nirvana",
- "nuaghty", "naughty",
- "nubmers", "numbers",
- "nucelar", "nuclear",
- "nucelus", "nucleus",
- "nuclean", "unclean",
- "nuclues", "nucleus",
- "nucular", "nuclear",
- "nuerons", "neurons",
- "nuetral", "neutral",
- "nuetron", "neutron",
- "nulcear", "nuclear",
- "nullfiy", "nullify",
- "nusance", "nuisance",
- "nutriet", "nutrient",
- "oarcles", "oracles",
- "obivous", "obvious",
- "obvoius", "obvious",
- "ocarnia", "ocarina",
- "ocasion", "occasion",
- "occured", "occurred",
- "ocotber", "october",
- "ocotpus", "octopus",
- "ocraina", "ocarina",
- "ocuntry", "country",
- "ocurred", "occurred",
- "ofcoure", "ofcourse",
- "offcers", "officers",
- "offical", "official",
- "offisde", "offside",
- "oftenly", "often",
- "ogrilla", "gorilla",
- "olmypic", "olympic",
- "olreans", "orleans",
- "olympis", "olympics",
- "olypmic", "olympic",
- "omision", "omission",
- "omiting", "omitting",
- "omlette", "omelette",
- "ommited", "omitted",
- "onatrio", "ontario",
- "onbaord", "onboard",
- "onborad", "onboard",
- "ontairo", "ontario",
- "ontraio", "ontario",
- "opartor", "operator",
- "openess", "openness",
- "opitcal", "optical",
- "opitmal", "optimal",
- "oponent", "opponent",
- "oposite", "opposite",
- "oppenly", "openly",
- "opponet", "opponent",
- "oprhans", "orphans",
- "optimim", "optimism",
- "oracels", "oracles",
- "oragnes", "oranges",
- "oragsms", "orgasms",
- "oralces", "oracles",
- "orbtial", "orbital",
- "orcales", "oracles",
- "orelans", "orleans",
- "organes", "organise",
- "organie", "organise",
- "organim", "organism",
- "orginal", "original",
- "orhpans", "orphans",
- "oribtal", "orbital",
- "orlenas", "orleans",
- "orpahns", "orphans",
- "orthodx", "orthodox",
- "outfied", "outfield",
- "outsidr", "outsider",
- "overhal", "overhaul",
- "overpad", "overpaid",
- "oversue", "overuse",
- "overtun", "overturn",
- "ownders", "wonders",
- "owuldve", "wouldve",
- "oylmpic", "olympic",
- "pacakge", "package",
- "pacifit", "pacifist",
- "packade", "packaged",
- "pacthes", "patches",
- "pahntom", "phantom",
- "paitent", "patient",
- "palcebo", "placebo",
- "pallete", "palette",
- "palster", "plaster",
- "palyboy", "playboy",
- "pamflet", "pamphlet",
- "pamplet", "pamphlet",
- "pancaks", "pancakes",
- "pandroa", "pandora",
- "panthen", "pantheon",
- "paradim", "paradigm",
- "paradse", "parades",
- "paralel", "parallel",
- "paranoa", "paranoia",
- "parises", "praises",
- "parites", "parties",
- "partice", "particle",
- "partick", "patrick",
- "partiel", "particle",
- "partiot", "patriot",
- "partols", "patrols",
- "passabe", "passable",
- "passivs", "passives",
- "pasuing", "pausing",
- "pateint", "patient",
- "pathces", "patches",
- "patiens", "patients",
- "patirot", "patriot",
- "patrcik", "patrick",
- "patrios", "patriots",
- "patroit", "patriot",
- "peaples", "peoples",
- "pebbels", "pebbles",
- "peirced", "pierced",
- "penatly", "penalty",
- "pendulm", "pendulum",
- "penguis", "penguins",
- "penicls", "pencils",
- "penison", "pension",
- "penisse", "penises",
- "penitum", "pentium",
- "pensies", "penises",
- "pensino", "pension",
- "pentuim", "pentium",
- "peopels", "peoples",
- "percise", "precise",
- "perdict", "predict",
- "perfers", "prefers",
- "perhasp", "perhaps",
- "perhpas", "perhaps",
- "perisan", "persian",
- "perjery", "perjury",
- "permade", "premade",
- "permier", "premier",
- "permise", "premise",
- "permium", "premium",
- "peroids", "periods",
- "peronal", "personal",
- "perpaid", "prepaid",
- "perphas", "perhaps",
- "persain", "persian",
- "persets", "presets",
- "persits", "persist",
- "persued", "pursued",
- "persuit", "pursuit",
- "pervail", "prevail",
- "perview", "preview",
- "pharoah", "pharaoh",
- "phatnom", "phantom",
- "phsyics", "physics",
- "phyiscs", "physics",
- "physcis", "physics",
- "physiqe", "physique",
- "picthed", "pitched",
- "picther", "pitcher",
- "picthes", "pitches",
- "piegons", "pigeons",
- "piglrim", "pilgrim",
- "pigoens", "pigeons",
- "pilgirm", "pilgrim",
- "pilrgim", "pilgrim",
- "pinoeer", "pioneer",
- "pinpoit", "pinpoint",
- "pionere", "pioneer",
- "pireced", "pierced",
- "pithces", "pitches",
- "plantes", "planets",
- "plastis", "plastics",
- "plastre", "plaster",
- "plataeu", "plateau",
- "plateua", "plateau",
- "playabe", "playable",
- "playofs", "playoffs",
- "plesant", "pleasant",
- "pligrim", "pilgrim",
- "ploygon", "polygon",
- "ploymer", "polymer",
- "podemso", "podemos",
- "podmeos", "podemos",
- "poeples", "peoples",
- "poignat", "poignant",
- "poineer", "pioneer",
- "pointes", "pointers",
- "poisond", "poisoned",
- "polgyon", "polygon",
- "polical", "political",
- "polishs", "polishes",
- "polisse", "polishes",
- "politey", "politely",
- "poluted", "polluted",
- "polutes", "pollutes",
- "popluar", "popular",
- "populer", "popular",
- "populos", "populous",
- "porpose", "propose",
- "porshan", "portion",
- "porshon", "portion",
- "portait", "portrait",
- "portary", "portray",
- "portras", "portrays",
- "portrat", "portrait",
- "posions", "poisons",
- "positon", "position",
- "positve", "positive",
- "possiby", "possibly",
- "postdam", "potsdam",
- "postion", "position",
- "postive", "positive",
- "potatos", "potatoes",
- "potical", "optical",
- "potrait", "portrait",
- "powderd", "powdered",
- "poweful", "powerful",
- "poylgon", "polygon",
- "poylmer", "polymer",
- "practie", "practise",
- "praisse", "praises",
- "praries", "prairies",
- "prasied", "praised",
- "prasies", "praises",
- "pratice", "practice",
- "preamde", "premade",
- "preceed", "precede",
- "precice", "precise",
- "preests", "presets",
- "prehaps", "perhaps",
- "preimer", "premier",
- "preimum", "premium",
- "preists", "priests",
- "preivew", "preview",
- "premeir", "premier",
- "premiee", "premiere",
- "premire", "premier",
- "premits", "permits",
- "premius", "premiums",
- "premuim", "premium",
- "prepair", "prepare",
- "preriod", "period",
- "presens", "presents",
- "presest", "presets",
- "presist", "persist",
- "prestes", "presets",
- "presude", "presumed",
- "pretene", "pretense",
- "pretens", "pretends",
- "preveiw", "preview",
- "prevert", "pervert",
- "previal", "prevail",
- "previes", "previews",
- "previos", "previous",
- "priased", "praised",
- "priases", "praises",
- "printes", "printers",
- "pristen", "pristine",
- "probabe", "probable",
- "probaly", "probably",
- "probelm", "problem",
- "procede", "proceed",
- "procees", "proceeds",
- "procesd", "proceeds",
- "proclam", "proclaim",
- "produly", "proudly",
- "produse", "produces",
- "progidy", "prodigy",
- "progrom", "pogrom",
- "prohibt", "prohibit",
- "prohpet", "prophet",
- "prologe", "prologue",
- "promose", "promotes",
- "promots", "promotes",
- "prompty", "promptly",
- "promtps", "prompts",
- "pronous", "pronouns",
- "prooved", "proved",
- "propeht", "prophet",
- "prophey", "prophecy",
- "propper", "proper",
- "protals", "portals",
- "protecs", "protects",
- "protess", "protests",
- "protocl", "protocol",
- "protray", "portray",
- "prouldy", "proudly",
- "provded", "provided",
- "provine", "province",
- "prusuit", "pursuit",
- "pryamid", "pyramid",
- "pscyhed", "psyched",
- "ptiched", "pitched",
- "pticher", "pitcher",
- "puasing", "pausing",
- "publicy", "publicly",
- "publsih", "publish",
- "puhsups", "pushups",
- "punishs", "punishes",
- "punisse", "punishes",
- "pursiut", "pursuit",
- "pursude", "pursued",
- "purused", "pursued",
- "pushpus", "pushups",
- "pyarmid", "pyramid",
- "pyramis", "pyramids",
- "pyrmaid", "pyramid",
- "pysched", "psyched",
- "qaulify", "qualify",
- "qaulity", "quality",
- "qauntum", "quantum",
- "quailfy", "qualify",
- "quailty", "quality",
- "queires", "queries",
- "queitly", "quietly",
- "quereis", "queries",
- "quicket", "quickest",
- "quielty", "quietly",
- "quitely", "quietly",
- "qunatum", "quantum",
- "qunetin", "quentin",
- "racisst", "racists",
- "racthet", "ratchet",
- "radaint", "radiant",
- "radiane", "radiance",
- "radicas", "radicals",
- "radiers", "raiders",
- "raelism", "realism",
- "raidant", "radiant",
- "railrod", "railroad",
- "rainbos", "rainbows",
- "raoches", "roaches",
- "raoming", "roaming",
- "raptros", "raptors",
- "raputre", "rapture",
- "rathcet", "ratchet",
- "ratpure", "rapture",
- "reacing", "reaching",
- "reagrds", "regards",
- "realies", "realise",
- "realsie", "realise",
- "realsim", "realism",
- "realtes", "relates",
- "reamins", "remains",
- "reapirs", "repairs",
- "rebouns", "rebounds",
- "rebulit", "rebuilt",
- "recalim", "reclaim",
- "receips", "receipts",
- "recided", "resided",
- "reciept", "receipt",
- "recievd", "recieved",
- "recieve", "receive",
- "recitfy", "rectify",
- "recived", "received",
- "reclami", "reclaim",
- "recliam", "reclaim",
- "recorre", "recorder",
- "recoves", "recovers",
- "recpies", "recipes",
- "redeemd", "redeemed",
- "redners", "renders",
- "refelct", "reflect",
- "referal", "referral",
- "refered", "referred",
- "referig", "refering",
- "referrs", "refers",
- "reflexs", "reflexes",
- "refrers", "refers",
- "refroms", "reforms",
- "refusla", "refusal",
- "regerts", "regrets",
- "regiems", "regimes",
- "regimet", "regiment",
- "registy", "registry",
- "regluar", "regular",
- "regrest", "regrets",
- "regulae", "regulate",
- "regulas", "regulars",
- "regulsr", "regulars",
- "reigmes", "regimes",
- "reigons", "regions",
- "reitres", "retires",
- "reivews", "reviews",
- "reknown", "renown",
- "relaise", "realise",
- "relapes", "relapse",
- "relaspe", "relapse",
- "relatie", "relative",
- "relatin", "relation",
- "relcaim", "reclaim",
- "releive", "relieve",
- "releses", "releases",
- "relfect", "reflect",
- "reliabe", "reliable",
- "relient", "reliant",
- "relized", "realised",
- "relpase", "relapse",
- "remaind", "remained",
- "remaing", "remaining",
- "remakrs", "remarks",
- "remannt", "remnant",
- "remeber", "remember",
- "remians", "remains",
- "remnans", "remnants",
- "renderd", "rendered",
- "renegae", "renegade",
- "renmant", "remnant",
- "rentors", "renters",
- "rentres", "renters",
- "renuion", "reunion",
- "repaird", "repaired",
- "repalys", "replays",
- "repblic", "republic",
- "repeast", "repeats",
- "repitle", "reptile",
- "replase", "replaces",
- "replayd", "replayed",
- "reponse", "response",
- "repostd", "reposted",
- "repsawn", "respawn",
- "repsond", "respond",
- "repsots", "reposts",
- "reptiel", "reptile",
- "reptils", "reptiles",
- "repubic", "republic",
- "republi", "republic",
- "repulic", "republic",
- "reqiuem", "requiem",
- "requeim", "requiem",
- "requime", "requiem",
- "requred", "required",
- "resapwn", "respawn",
- "rescuse", "rescues",
- "resembe", "resemble",
- "reslove", "resolve",
- "resolvs", "resolves",
- "resonet", "resonate",
- "resovle", "resolve",
- "respest", "respects",
- "respone", "response",
- "respwan", "respawn",
- "ressits", "resists",
- "restord", "restored",
- "resuced", "rescued",
- "resuces", "rescues",
- "returnd", "returned",
- "reuinon", "reunion",
- "reveald", "revealed",
- "reveiws", "reviews",
- "revelas", "reveals",
- "reveral", "reversal",
- "reviere", "reviewer",
- "reviewd", "reviewed",
- "reviewr", "reviewer",
- "revolvr", "revolver",
- "revolvs", "revolves",
- "rewirte", "rewrite",
- "reworkd", "reworked",
- "rewriet", "rewrite",
- "reynols", "reynolds",
- "rhapsoy", "rhapsody",
- "rhythem", "rhythm",
- "rhythim", "rhythm",
- "rhytmic", "rhythmic",
- "riaders", "raiders",
- "ritlain", "ritalin",
- "ritoers", "rioters",
- "rivarly", "rivalry",
- "rivlary", "rivalry",
- "roahces", "roaches",
- "robotis", "robotics",
- "rococco", "rococo",
- "roestta", "rosetta",
- "roiters", "rioters",
- "roleply", "roleplay",
- "romaina", "romania",
- "romaing", "roaming",
- "romanin", "romanian",
- "romanna", "romanian",
- "roomate", "roommate",
- "rotuers", "routers",
- "rugters", "rutgers",
- "rulebok", "rulebook",
- "rumorus", "rumours",
- "rumuors", "rumours",
- "runnung", "running",
- "ruslted", "rustled",
- "russina", "russian",
- "russion", "russian",
- "rusteld", "rustled",
- "rythmic", "rhythmic",
- "rythyms", "rhythms",
- "sacrasm", "sarcasm",
- "saddnes", "saddens",
- "sadistc", "sadistic",
- "sadning", "sanding",
- "salaris", "salaries",
- "salavge", "salvage",
- "salvery", "slavery",
- "salying", "slaying",
- "sampels", "samples",
- "samruai", "samurai",
- "samuari", "samurai",
- "samuria", "samurai",
- "sandlas", "sandals",
- "sandnig", "sanding",
- "sanlder", "sandler",
- "santorm", "santorum",
- "sapphie", "sapphire",
- "sarcams", "sarcasm",
- "sargant", "sergeant",
- "sasuage", "sausage",
- "satifsy", "satisfy",
- "satsify", "satisfy",
- "satsohi", "satoshi",
- "savanha", "savannah",
- "savannh", "savannah",
- "saveing", "saving",
- "sawnsea", "swansea",
- "sawnson", "swanson",
- "scandas", "scandals",
- "scannig", "scanning",
- "scartch", "scratch",
- "scheems", "schemes",
- "schoold", "schooled",
- "sciense", "sciences",
- "scinece", "science",
- "scootes", "scooters",
- "scorpin", "scorpion",
- "scpeter", "scepter",
- "scracth", "scratch",
- "scrambe", "scramble",
- "scritps", "scripts",
- "scrolld", "scrolled",
- "scrpits", "scripts",
- "scyhter", "scyther",
- "seached", "searched",
- "seaches", "searches",
- "seahaws", "seahawks",
- "seantor", "senator",
- "searchd", "searched",
- "searchs", "searches",
- "sebrian", "serbian",
- "secerts", "secrets",
- "secpter", "scepter",
- "secrest", "secrets",
- "secrety", "secretly",
- "seflies", "selfies",
- "seguoys", "segues",
- "seinors", "seniors",
- "selifes", "selfies",
- "senoirs", "seniors",
- "sensure", "censure",
- "sentaor", "senator",
- "sentris", "sentries",
- "serbain", "serbian",
- "sergeat", "sergeant",
- "sergent", "sergeant",
- "seriban", "serbian",
- "servans", "servants",
- "sesnors", "sensors",
- "settins", "settings",
- "severly", "severely",
- "sexualy", "sexually",
- "seziure", "seizure",
- "shaddow", "shadow",
- "shanghi", "shanghai",
- "shaprie", "sharpie",
- "shaprly", "sharply",
- "sharipe", "sharpie",
- "shcemes", "schemes",
- "sheelpe", "sheeple",
- "sheepel", "sheeple",
- "shephed", "shepherd",
- "sherlok", "sherlock",
- "shetler", "shelter",
- "shevles", "shelves",
- "shfiter", "shifter",
- "shieldd", "shielded",
- "shiping", "shipping",
- "shirely", "shirley",
- "shitfer", "shifter",
- "shledon", "sheldon",
- "shleter", "shelter",
- "shoudln", "should",
- "shouldt", "shouldnt",
- "shoutot", "shoutout",
- "showede", "showered",
- "showerd", "showered",
- "shperes", "spheres",
- "shriley", "shirley",
- "siblins", "siblings",
- "sidelen", "sideline",
- "sideral", "sidereal",
- "siezing", "seizing",
- "siezure", "seizure",
- "signfiy", "signify",
- "signins", "signings",
- "signles", "singles",
- "silders", "sliders",
- "silenty", "silently",
- "similir", "similiar",
- "simliar", "similar",
- "simplet", "simplest",
- "simpley", "simply",
- "simplfy", "simplify",
- "simpliy", "simplify",
- "simposn", "simpson",
- "simspon", "simpson",
- "singals", "signals",
- "singels", "singles",
- "singify", "signify",
- "singsog", "singsong",
- "sitmuli", "stimuli",
- "skecthy", "sketchy",
- "skeletl", "skeletal",
- "skeptis", "skeptics",
- "sketchs", "sketches",
- "sketpic", "skeptic",
- "skpetic", "skeptic",
- "sktechy", "sketchy",
- "skwyard", "skyward",
- "slavage", "salvage",
- "slayign", "slaying",
- "sldiers", "sliders",
- "slefies", "selfies",
- "slighly", "slightly",
- "slighty", "slightly",
- "slippes", "slippers",
- "slippey", "slippery",
- "smaples", "samples",
- "smartre", "smarter",
- "smaurai", "samurai",
- "snadler", "sandler",
- "snigles", "singles",
- "snippes", "snippets",
- "snodwen", "snowden",
- "snwoden", "snowden",
- "snycing", "syncing",
- "snyergy", "synergy",
- "socialy", "socially",
- "sofware", "software",
- "soildly", "solidly",
- "soldies", "soldiers",
- "soldily", "solidly",
- "somaila", "somalia",
- "someons", "someones",
- "somethn", "somethin",
- "southen", "southern",
- "soveits", "soviets",
- "spacebr", "spacebar",
- "spainsh", "spanish",
- "spansih", "spanish",
- "spanwed", "spawned",
- "sparkel", "sparkle",
- "spartas", "spartans",
- "spartsn", "spartans",
- "sparyed", "sprayed",
- "spawend", "spawned",
- "spawnig", "spawning",
- "specail", "special",
- "specfic", "specific",
- "specias", "specials",
- "specisl", "specials",
- "spectum", "spectrum",
- "speechs", "speeches",
- "spehres", "spheres",
- "speical", "special",
- "speices", "species",
- "spellig", "spelling",
- "spindel", "spindle",
- "spiritd", "spirited",
- "splaton", "splatoon",
- "splittr", "splitter",
- "spoiles", "spoilers",
- "spoitfy", "spotify",
- "spolied", "spoiled",
- "sponser", "sponsor",
- "sporles", "sproles",
- "sporuts", "sprouts",
- "spotfiy", "spotify",
- "sprinke", "sprinkle",
- "sproels", "sproles",
- "spwaned", "spawned",
- "sqaures", "squares",
- "sqeuaky", "squeaky",
- "sqiushy", "squishy",
- "squarey", "squarely",
- "squirel", "squirtle",
- "squirle", "squirrel",
- "squirrl", "squirrel",
- "squirte", "squirtle",
- "squsihy", "squishy",
- "sriraca", "sriracha",
- "srpouts", "sprouts",
- "sryians", "syrians",
- "sryinge", "syringe",
- "stadius", "stadiums",
- "staduim", "stadium",
- "stagnat", "stagnant",
- "staidum", "stadium",
- "stakler", "stalker",
- "stalkes", "stalkers",
- "stamnia", "stamina",
- "staoshi", "satoshi",
- "starins", "strains",
- "startde", "startled",
- "startus", "startups",
- "statits", "statist",
- "statsit", "statist",
- "statuer", "stature",
- "statuse", "statutes",
- "statuts", "statutes",
- "stautes", "statues",
- "stealty", "stealthy",
- "steeles", "steelers",
- "steorid", "steroid",
- "steriel", "sterile",
- "sterlie", "sterile",
- "stickes", "stickers",
- "stiring", "stirring",
- "stirker", "striker",
- "stirrig", "stirring",
- "stitchs", "stitches",
- "stlaker", "stalker",
- "stlyish", "stylish",
- "storeis", "stories",
- "storise", "stories",
- "stormde", "stormed",
- "straigt", "straight",
- "straind", "strained",
- "streamd", "streamed",
- "stregth", "strength",
- "strengh", "strength",
- "streoid", "steroid",
- "stresss", "stresses",
- "strians", "strains",
- "stricty", "strictly",
- "striekr", "striker",
- "stromed", "stormed",
- "stubbon", "stubborn",
- "studing", "studying",
- "stuidos", "studios",
- "stunami", "tsunami",
- "stupidr", "stupider",
- "stupidy", "stupidly",
- "stupire", "stupider",
- "suasage", "sausage",
- "subisdy", "subsidy",
- "subjest", "subjects",
- "subtiel", "subtitle",
- "succede", "succeed",
- "succeds", "succeeds",
- "succees", "succeeds",
- "succesd", "succeeds",
- "suceeds", "succeeds",
- "suddeny", "suddenly",
- "suefull", "usefull",
- "sufferd", "suffered",
- "summonr", "summoner",
- "summore", "summoner",
- "sunggle", "snuggle",
- "sunifre", "sunfire",
- "superme", "supreme",
- "suposed", "supposed",
- "suposes", "supposes",
- "suppoed", "supposed",
- "suppost", "supports",
- "suprass", "surpass",
- "supress", "suppress",
- "suprisd", "suprised",
- "suprise", "surprise",
- "suprize", "surprise",
- "supsend", "suspend",
- "suround", "surround",
- "surpeme", "supreme",
- "surroud", "surround",
- "sweidsh", "swedish",
- "swiflty", "swiftly",
- "swiming", "swimming",
- "switchs", "switches",
- "switfly", "swiftly",
- "swnasea", "swansea",
- "sycning", "syncing",
- "sycther", "scyther",
- "syirans", "syrians",
- "sykward", "skyward",
- "syllabe", "syllable",
- "symetry", "symmetry",
- "symmety", "symmetry",
- "symobls", "symbols",
- "sympaty", "sympathy",
- "symtpom", "symptom",
- "synegry", "synergy",
- "synoynm", "synonym",
- "sypmtom", "symptom",
- "syracue", "syracuse",
- "syrains", "syrians",
- "sysadmn", "sysadmin",
- "systemc", "systemic",
- "sytlish", "stylish",
- "tabacco", "tobacco",
- "tailban", "taliban",
- "tailord", "tailored",
- "talbian", "taliban",
- "tallets", "tallest",
- "tangeld", "tangled",
- "tanlged", "tangled",
- "targetd", "targeted",
- "taryvon", "trayvon",
- "teached", "taught",
- "teaspon", "teaspoon",
- "techeis", "techies",
- "tehcies", "techies",
- "temepst", "tempest",
- "tempels", "temples",
- "tempets", "tempest",
- "templas", "templars",
- "tempset", "tempest",
- "tenacle", "tentacle",
- "tendacy", "tendency",
- "tequlia", "tequila",
- "tesitfy", "testify",
- "testice", "testicle",
- "teusday", "tuesday",
- "thankyu", "thankyou",
- "thearpy", "therapy",
- "theistc", "theistic",
- "theives", "thieves",
- "themsef", "themself",
- "therefo", "thereof",
- "therien", "therein",
- "theroem", "theorem",
- "thesits", "theists",
- "thiests", "theists",
- "thirldy", "thirdly",
- "thirten", "thirteen",
- "thirtsy", "thirsty",
- "thoerem", "theorem",
- "thorats", "throats",
- "thornes", "thrones",
- "thoruim", "thorium",
- "thoughs", "thoughts",
- "threadd", "threaded",
- "threeof", "thereof",
- "thridly", "thirdly",
- "thristy", "thirsty",
- "throast", "throats",
- "throium", "thorium",
- "thryoid", "thyroid",
- "thyorid", "thyroid",
- "thyriod", "thyroid",
- "tigther", "tighter",
- "tiolets", "toilets",
- "tirdent", "trident",
- "titanim", "titanium",
- "tlaking", "talking",
- "tobbaco", "tobacco",
- "toliets", "toilets",
- "tolkein", "tolkien",
- "tomatos", "tomatoes",
- "tongiht", "tonight",
- "tonuges", "tongues",
- "toppins", "toppings",
- "torando", "tornado",
- "torndao", "tornado",
- "torpdeo", "torpedo",
- "torrest", "torrents",
- "tortila", "tortilla",
- "toruney", "tourney",
- "toubles", "troubles",
- "touchda", "touchpad",
- "tounrey", "tourney",
- "tourisy", "touristy",
- "tourits", "tourist",
- "tournes", "tourneys",
- "toursim", "tourism",
- "toursit", "tourist",
- "towords", "towards",
- "trackes", "trackers",
- "trailes", "trailers",
- "traines", "trainers",
- "trainig", "training",
- "tralier", "trailer",
- "tratior", "traitor",
- "traveld", "traveled",
- "travere", "traverse",
- "travesy", "travesty",
- "travles", "travels",
- "treasue", "treasure",
- "treatis", "treaties",
- "tremelo", "tremolo",
- "trendig", "trending",
- "trialer", "trailer",
- "triange", "triangle",
- "triator", "traitor",
- "trickey", "trickery",
- "tridnet", "trident",
- "trimuph", "triumph",
- "trinkes", "trinkets",
- "trinkst", "trinkets",
- "trintiy", "trinity",
- "triolgy", "trilogy",
- "troleld", "trolled",
- "troling", "trolling",
- "tronado", "tornado",
- "tropedo", "torpedo",
- "trudnle", "trundle",
- "truimph", "triumph",
- "trukish", "turkish",
- "trundel", "trundle",
- "trunlde", "trundle",
- "tryahrd", "tryhard",
- "tryavon", "trayvon",
- "tsamina", "stamina",
- "tsnuami", "tsunami",
- "tsuanmi", "tsunami",
- "tsunmai", "tsunami",
- "tuesdsy", "tuesdays",
- "tunnles", "tunnels",
- "turbins", "turbines",
- "turksih", "turkish",
- "turltes", "turtles",
- "turrest", "turrets",
- "turtels", "turtles",
- "tuseday", "tuesday",
- "tusnami", "tsunami",
- "tutrles", "turtles",
- "twiligt", "twilight",
- "tyelnol", "tylenol",
- "typcial", "typical",
- "tyrhard", "tryhard",
- "tyrrany", "tyranny",
- "udpated", "updated",
- "uesfull", "usefull",
- "ugprade", "upgrade",
- "ukarine", "ukraine",
- "ukranie", "ukraine",
- "ukriane", "ukraine",
- "ultimae", "ultimate",
- "umbrela", "umbrella",
- "unahppy", "unhappy",
- "unbannd", "unbanned",
- "underog", "undergo",
- "unfairy", "unfairly",
- "ungoldy", "ungodly",
- "unicors", "unicorns",
- "uniquey", "uniquely",
- "unknwon", "unknown",
- "unkonwn", "unknown",
- "unlcean", "unclean",
- "unlcoks", "unlocks",
- "unlcuky", "unlucky",
- "unlikey", "unlikely",
- "unopend", "unopened",
- "unprone", "unproven",
- "unusabe", "unusable",
- "unworty", "unworthy",
- "upgarde", "upgrade",
- "upgrads", "upgrades",
- "uplaods", "uploads",
- "upsteam", "upstream",
- "urainum", "uranium",
- "uranuim", "uranium",
- "uretrha", "urethra",
- "urkaine", "ukraine",
- "urnaium", "uranium",
- "urugauy", "uruguay",
- "usefull", "useful",
- "usefuly", "usefully",
- "utiltiy", "utility",
- "utopain", "utopian",
- "utpoian", "utopian",
- "vaccins", "vaccines",
- "vaccume", "vacuum",
- "vageuly", "vaguely",
- "vaguley", "vaguely",
- "vairant", "variant",
- "valenca", "valencia",
- "valetta", "valletta",
- "valkyre", "valkyrie",
- "valuabe", "valuable",
- "valuble", "valuable",
- "vampirs", "vampires",
- "vanguad", "vanguard",
- "varaint", "variant",
- "vareity", "variety",
- "varians", "variants",
- "varient", "variant",
- "varisty", "varsity",
- "varitey", "variety",
- "varstiy", "varsity",
- "vasalls", "vassals",
- "vasslas", "vassals",
- "vaugely", "vaguely",
- "vecotrs", "vectors",
- "vectros", "vectors",
- "veitnam", "vietnam",
- "veiwers", "viewers",
- "vendeta", "vendetta",
- "verbaly", "verbally",
- "verical", "vertical",
- "verious", "various",
- "verison", "version",
- "veritgo", "vertigo",
- "versoin", "version",
- "vertgio", "vertigo",
- "vessles", "vessels",
- "vetween", "between",
- "viatmin", "vitamin",
- "vibratr", "vibrator",
- "vicitms", "victims",
- "vientam", "vietnam",
- "vigrins", "virgins",
- "vikigns", "vikings",
- "villian", "villain",
- "villify", "vilify",
- "virbate", "vibrate",
- "virigns", "virgins",
- "virtiol", "vitriol",
- "virutal", "virtual",
- "virutes", "virtues",
- "visable", "visible",
- "visably", "visibly",
- "visbily", "visibly",
- "visting", "visiting",
- "vistors", "visitors",
- "vitaliy", "vitality",
- "vitamis", "vitamins",
- "vitenam", "vietnam",
- "vitirol", "vitriol",
- "vitmain", "vitamin",
- "vitroil", "vitriol",
- "vitrual", "virtual",
- "vitrues", "virtues",
- "volatge", "voltage",
- "volumne", "volume",
- "votlage", "voltage",
- "vrigins", "virgins",
- "waclott", "walcott",
- "wacther", "watcher",
- "waitres", "waiters",
- "waktins", "watkins",
- "warcrat", "warcraft",
- "wardobe", "wardrobe",
- "wariwck", "warwick",
- "warrany", "warranty",
- "warrent", "warrant",
- "warrios", "warriors",
- "warwcik", "warwick",
- "wathcer", "watcher",
- "watiers", "waiters",
- "waviers", "waivers",
- "wawrick", "warwick",
- "wayword", "wayward",
- "webapge", "webpage",
- "webiste", "website",
- "webstie", "website",
- "weigths", "weights",
- "weilded", "wielded",
- "weirldy", "weirdly",
- "weirods", "weirdos",
- "welathy", "wealthy",
- "wendsay", "wednesday",
- "wensday", "wednesday",
- "wepbage", "webpage",
- "weridly", "weirdly",
- "weridos", "weirdos",
- "werstle", "wrestle",
- "wesbite", "website",
- "whaeton", "wheaton",
- "whipser", "whisper",
- "whislte", "whistle",
- "whistel", "whistle",
- "whitsle", "whistle",
- "whsiper", "whisper",
- "wiaters", "waiters",
- "wiavers", "waivers",
- "widgest", "widgets",
- "wieghts", "weights",
- "wigdets", "widgets",
- "windosr", "windsor",
- "winnins", "winnings",
- "winsdor", "windsor",
- "wintson", "winston",
- "wirting", "writing",
- "wisnton", "winston",
- "withces", "witches",
- "witheld", "withheld",
- "withing", "within",
- "withold", "withhold",
- "wlacott", "walcott",
- "wokring", "working",
- "workins", "workings",
- "woudlnt", "wouldnt",
- "woudlve", "wouldve",
- "woulndt", "wouldnt",
- "wreslte", "wrestle",
- "wroking", "working",
- "wtiches", "witches",
- "wupport", "support",
- "yaching", "yachting",
- "younget", "youngest",
- "youseff", "yousef",
- "youself", "yourself",
- "zaelots", "zealots",
- "zealtos", "zealots",
- "zelaots", "zealots",
- "zelaous", "zealous",
- "zimbabe", "zimbabwe",
- "zionsim", "zionism",
- "zionsit", "zionist",
- "zoinism", "zionism",
- "zoinist", "zionist",
- "abbout", "about",
- "abilty", "ability",
- "absail", "abseil",
- "abutts", "abuts",
- "achive", "achieve",
- "acused", "accused",
- "addopt", "adopt",
- "addres", "address",
- "adress", "address",
- "aeriel", "aerial",
- "affort", "afford",
- "agains", "against",
- "aginst", "against",
- "ahppen", "happen",
- "aiport", "airport",
- "aisian", "asian",
- "albiet", "albeit",
- "alchol", "alcohol",
- "aledge", "allege",
- "aleged", "alleged",
- "allign", "align",
- "almsot", "almost",
- "alomst", "almost",
- "alowed", "allowed",
- "alwasy", "always",
- "alwyas", "always",
- "amking", "making",
- "ammend", "amend",
- "amoung", "among",
- "aplied", "applied",
- "appart", "apart",
- "aquire", "acquire",
- "aready", "already",
- "arised", "arose",
- "arival", "arrival",
- "arrary", "array",
- "artice", "article",
- "asetic", "ascetic",
- "asside", "aside",
- "attemp", "attempt",
- "attemt", "attempt",
- "auther", "author",
- "awared", "awarded",
- "bedore", "before",
- "beeing", "being",
- "befoer", "before",
- "beggin", "begin",
- "beleif", "belief",
- "belive", "believe",
- "beteen", "between",
- "betwen", "between",
- "beween", "between",
- "bianry", "binary",
- "boyant", "buoyant",
- "broady", "broadly",
- "buddah", "buddha",
- "buring", "burying",
- "carcas", "carcass",
- "casion", "caisson",
- "casued", "caused",
- "casues", "causes",
- "ceasar", "caesar",
- "cencus", "census",
- "censur", "censor",
- "cheifs", "chiefs",
- "circut", "circuit",
- "clasic", "classic",
- "coform", "conform",
- "comany", "company",
- "coucil", "council",
- "densly", "densely",
- "deside", "decide",
- "devels", "delves",
- "devide", "divide",
- "dieing", "dying",
- "divice", "device",
- "doulbe", "double",
- "dreasm", "dreams",
- "duting", "during",
- "ealier", "earlier",
- "eearly", "early",
- "efford", "effort",
- "emited", "emitted",
- "emnity", "enmity",
- "enduce", "induce",
- "enlish", "english",
- "erally", "orally",
- "eratic", "erratic",
- "ethose", "those",
- "exampt", "exempt",
- "excact", "exact",
- "excell", "excel",
- "exerpt", "excerpt",
- "exinct", "extinct",
- "expell", "expel",
- "expoch", "epoch",
- "extint", "extinct",
- "facist", "fascist",
- "faught", "fought",
- "finaly", "finally",
- "forsaw", "foresaw",
- "fougth", "fought",
- "fourty", "forty",
- "foward", "forward",
- "freind", "friend",
- "fromed", "formed",
- "fufill", "fulfill",
- "futher", "further",
- "gardai", "gardaí",
- "ghandi", "gandhi",
- "glight", "flight",
- "gloabl", "global",
- "godess", "goddess",
- "guilia", "giulia",
- "guilio", "giulio",
- "habeus", "habeas",
- "harras", "harass",
- "hatian", "haitian",
- "heared", "heard",
- "hertzs", "hertz",
- "hieght", "height",
- "higest", "highest",
- "higway", "highway",
- "honory", "honorary",
- "howver", "however",
- "hstory", "history",
- "hunman", "human",
- "husban", "husband",
- "hvaing", "having",
- "illess", "illness",
- "ilness", "illness",
- "imagin", "imagine",
- "imense", "immense",
- "includ", "include",
- "inital", "initial",
- "interm", "interim",
- "intial", "initial",
- "iunior", "junior",
- "jaques", "jacques",
- "jospeh", "joseph",
- "jouney", "journey",
- "klenex", "kleenex",
- "labled", "labelled",
- "largst", "largest",
- "larrry", "larry",
- "lefted", "left",
- "lenght", "length",
- "lerans", "learns",
- "liason", "liaison",
- "libary", "library",
- "lieing", "lying",
- "lieved", "lived",
- "littel", "little",
- "livley", "lively",
- "lonley", "lonely",
- "mailny", "mainly",
- "markes", "marks",
- "mileau", "milieu",
- "milion", "million",
- "millon", "million",
- "misile", "missile",
- "missen", "mizzen",
- "missle", "missile",
- "mkaing", "making",
- "moderm", "modem",
- "moreso", "more",
- "mounth", "month",
- "myraid", "myriad",
- "naieve", "naive",
- "nestin", "nesting",
- "nineth", "ninth",
- "noveau", "nouveau",
- "occour", "occur",
- "occurr", "occur",
- "offred", "offered",
- "omited", "omitted",
- "ouevre", "oeuvre",
- "oxigen", "oxygen",
- "p0enis", "penis",
- "packge", "package",
- "peaple", "people",
- "pensle", "pencil",
- "peopel", "people",
- "peotry", "poetry",
- "perade", "parade",
- "persan", "person",
- "persue", "pursue",
- "plateu", "plateau",
- "poenis", "penis",
- "poisin", "poison",
- "polute", "pollute",
- "posess", "possess",
- "posion", "poison",
- "prairy", "prairie",
- "prarie", "prairie",
- "preiod", "period",
- "privte", "private",
- "proces", "process",
- "proove", "prove",
- "psuedo", "pseudo",
- "psyhic", "psychic",
- "pucini", "puccini",
- "pumkin", "pumpkin",
- "puting", "putting",
- "pyscic", "psychic",
- "quizes", "quizzes",
- "quuery", "query",
- "racaus", "raucous",
- "radify", "ratify",
- "raelly", "really",
- "reacll", "recall",
- "realyl", "really",
- "reched", "reached",
- "recide", "reside",
- "recrod", "record",
- "refect", "reflect",
- "relaly", "really",
- "renewl", "renewal",
- "retuns", "returns",
- "reveiw", "review",
- "rhymme", "rhyme",
- "rigeur", "rigueur",
- "rocord", "record",
- "rougly", "roughly",
- "runing", "running",
- "rythem", "rhythm",
- "rythim", "rhythm",
- "saftey", "safety",
- "salery", "salary",
- "satisy", "satisfy",
- "satric", "satiric",
- "saught", "sought",
- "scince", "science",
- "scirpt", "script",
- "seceed", "succeed",
- "seinor", "senior",
- "sepina", "subpoena",
- "sevice", "service",
- "shamen", "shaman",
- "sheild", "shield",
- "shiped", "shipped",
- "shorly", "shortly",
- "shoudl", "should",
- "shreak", "shriek",
- "siezed", "seized",
- "sixtin", "sistine",
- "sneeks", "sneaks",
- "somene", "someone",
- "soudns", "sounds",
- "sourth", "south",
- "speach", "speech",
- "spects", "aspects",
- "spoace", "space",
- "sqaure", "square",
- "staion", "station",
- "stange", "strange",
- "stilus", "stylus",
- "stirrs", "stirs",
- "stopry", "story",
- "strnad", "strand",
- "studdy", "study",
- "suceed", "succeed",
- "sucess", "success",
- "sucide", "suicide",
- "sumary", "summary",
- "suport", "support",
- "supose", "suppose",
- "surfce", "surface",
- "surley", "surly",
- "swaers", "swears",
- "swepth", "swept",
- "talekd", "talked",
- "theese", "these",
- "therby", "thereby",
- "thigns", "things",
- "thigsn", "things",
- "thikns", "thinks",
- "thiunk", "think",
- "thnigs", "things",
- "threee", "three",
- "tkaing", "taking",
- "tounge", "tongue",
- "tourch", "torch",
- "towrad", "toward",
- "trafic", "traffic",
- "troups", "troupes",
- "truely", "truly",
- "twelth", "twelfth",
- "tyrany", "tyranny",
- "unabel", "unable",
- "unkown", "unknown",
- "untill", "until",
- "usally", "usually",
- "useage", "usage",
- "useing", "using",
- "usualy", "usually",
- "vaccum", "vacuum",
- "variey", "variety",
- "varing", "varying",
- "varity", "variety",
- "vasall", "vassal",
- "vigeur", "vigueur",
- "villin", "villain",
- "vreity", "variety",
- "vriety", "variety",
- "whants", "wants",
- "wheras", "whereas",
- "wheter", "whether",
- "wholey", "wholly",
- "whther", "whether",
- "wnated", "wanted",
- "writen", "written",
- "yaerly", "yearly",
- "yotube", "youtube",
- "zeebra", "zebra",
- "abotu", "about",
- "adres", "address",
- "afair", "affair",
- "agian", "again",
- "agina", "again",
- "agred", "agreed",
- "alege", "allege",
- "alsot", "also",
- "altho", "although",
- "amung", "among",
- "anual", "annual",
- "aroud", "around",
- "arund", "around",
- "asign", "assign",
- "assit", "assist",
- "asume", "assume",
- "atain", "attain",
- "autor", "author",
- "baout", "about",
- "blaim", "blame",
- "boaut", "bout",
- "boook", "book",
- "borke", "broke",
- "breif", "brief",
- "caost", "coast",
- "casue", "cause",
- "chasr", "chaser",
- "cheif", "chief",
- "chuch", "church",
- "claer", "clear",
- "clera", "clear",
- "coudl", "could",
- "crowm", "crown",
- "deram", "dram",
- "diety", "deity",
- "doens", "does",
- "doign", "doing",
- "donig", "doing",
- "drnik", "drink",
- "durig", "during",
- "earnt", "earned",
- "eigth", "eighth",
- "eiter", "either",
- "emtpy", "empty",
- "endig", "ending",
- "eveyr", "every",
- "exept", "except",
- "eyars", "years",
- "eyasr", "years",
- "fiels", "fields",
- "firts", "flirts",
- "fleed", "fled",
- "fomed", "formed",
- "foucs", "focus",
- "foudn", "found",
- "fouth", "fourth",
- "frome", "from",
- "ganes", "games",
- "gaurd", "guard",
- "gerat", "great",
- "gogin", "going",
- "goign", "going",
- "gonig", "going",
- "graet", "great",
- "greif", "grief",
- "gropu", "group",
- "guage", "gauge",
- "hapen", "happen",
- "herad", "heard",
- "heroe", "hero",
- "higer", "higher",
- "housr", "hours",
- "htere", "there",
- "htikn", "think",
- "hting", "thing",
- "htink", "think",
- "hwihc", "which",
- "hwile", "while",
- "hwole", "whole",
- "idaes", "ideas",
- "idesa", "ideas",
- "ihaca", "ithaca",
- "knwos", "knows",
- "konws", "knows",
- "lastr", "last",
- "lavae", "larvae",
- "layed", "laid",
- "leage", "league",
- "leanr", "lean",
- "leran", "learn",
- "levle", "level",
- "lible", "libel",
- "liekd", "liked",
- "liuke", "like",
- "lmits", "limits",
- "lonly", "lonely",
- "lukid", "likud",
- "lybia", "libya",
- "maked", "marked",
- "makse", "makes",
- "mamal", "mammal",
- "mileu", "milieu",
- "mkaes", "makes",
- "modle", "model",
- "moent", "moment",
- "moeny", "money",
- "monts", "months",
- "movei", "movie",
- "muder", "murder",
- "mysef", "myself",
- "neice", "niece",
- "ninty", "ninety",
- "ocurr", "occur",
- "oging", "going",
- "opose", "oppose",
- "orded", "ordered",
- "orgin", "origin",
- "otehr", "other",
- "ouput", "output",
- "owudl", "would",
- "paide", "paid",
- "palce", "place",
- "pased", "passed",
- "payed", "paid",
- "peice", "piece",
- "peoms", "poems",
- "poety", "poetry",
- "pwoer", "power",
- "qtuie", "quite",
- "qutie", "quite",
- "realy", "really",
- "repid", "rapid",
- "rised", "raised",
- "rulle", "rule",
- "rwite", "write",
- "rythm", "rhythm",
- "safty", "safety",
- "scoll", "scroll",
- "seach", "search",
- "seige", "siege",
- "seing", "seeing",
- "sence", "sense",
- "sicne", "since",
- "sieze", "seize",
- "sinse", "sines",
- "slowy", "slowly",
- "snese", "sneeze",
- "soley", "solely",
- "sotry", "story",
- "sotyr", "satyr",
- "soudn", "sound",
- "sould", "could",
- "spred", "spread",
- "stlye", "style",
- "stong", "strong",
- "stoyr", "story",
- "strat", "start",
- "stroy", "story",
- "suppy", "supply",
- "swaer", "swear",
- "syrap", "syrup",
- "sytem", "system",
- "sytle", "style",
- "tatoo", "tattoo",
- "thast", "that",
- "theif", "thief",
- "theri", "their",
- "thgat", "that",
- "thier", "their",
- "thign", "thing",
- "thikn", "think",
- "thnig", "thing",
- "thrid", "third",
- "thsoe", "those",
- "thyat", "that",
- "tihkn", "think",
- "timne", "time",
- "tiome", "time",
- "tkaes", "takes",
- "todya", "today",
- "tyhat", "that",
- "unsed", "used",
- "weild", "wield",
- "whant", "want",
- "whcih", "which",
- "whihc", "which",
- "whith", "with",
- "whlch", "which",
- "wholy", "wholly",
- "wierd", "weird",
- "wille", "will",
- "willk", "will",
- "withh", "with",
- "witht", "with",
- "wiull", "will",
- "wnats", "wants",
- "wohle", "whole",
- "worls", "world",
- "woudl", "would",
- "wriet", "write",
- "wroet", "wrote",
- "yaers", "years",
- "yatch", "yacht",
- "yearm", "year",
- "yeasr", "years",
- "yeild", "yield",
- "yeras", "years",
- "yersa", "years",
- "agin", "again",
- "agre", "agree",
- "ahev", "have",
- "ahve", "have",
- "alse", "else",
- "amke", "make",
- "anbd", "and",
- "andd", "and",
- "apon", "upon",
- "aslo", "also",
- "awya", "away",
- "bakc", "back",
- "bcak", "back",
- "clas", "class",
- "cpoy", "coy",
- "cxan", "cyan",
- "daed", "dead",
- "dael", "deal",
- "diea", "idea",
- "doub", "doubt",
- "dyas", "dryas",
- "eahc", "each",
- "efel", "evil",
- "eles", "eels",
- "ened", "need",
- "enxt", "next",
- "esle", "else",
- "eyar", "year",
- "fatc", "fact",
- "fidn", "find",
- "fomr", "from",
- "grwo", "grow",
- "haev", "have",
- "halp", "help",
- "holf", "hold",
- "hten", "then",
- "htey", "they",
- "htis", "this",
- "hvae", "have",
- "hvea", "have",
- "inot", "into",
- "iwll", "will",
- "iwth", "with",
- "jstu", "just",
- "jsut", "just",
- "knwo", "know",
- "konw", "know",
- "kwno", "know",
- "liek", "like",
- "loev", "love",
- "lveo", "love",
- "lvoe", "love",
- "mkae", "make",
- "mkea", "make",
- "mroe", "more",
- "nkow", "know",
- "nkwo", "know",
- "nmae", "name",
- "noth", "north",
- "nowe", "now",
- "omre", "more",
- "onot", "note",
- "onyl", "only",
- "owrk", "work",
- "peom", "poem",
- "pich", "pitch",
- "rela", "real",
- "sasy", "says",
- "smae", "same",
- "smoe", "some",
- "soem", "some",
- "sohw", "show",
- "stpo", "stop",
- "suop", "soup",
- "syas", "says",
- "tahn", "than",
- "taht", "that",
- "tast", "taste",
- "tath", "that",
- "tehy", "they",
- "tghe", "the",
- "ther", "there",
- "thge", "the",
- "thna", "than",
- "thne", "then",
- "thsi", "this",
- "thta", "that",
- "tiem", "time",
- "tihs", "this",
- "tjhe", "the",
- "tkae", "take",
- "tood", "todo",
- "tust", "trust",
- "twon", "town",
- "twpo", "two",
- "tyhe", "they",
- "uise", "use",
- "vell", "well",
- "veyr", "very",
- "vrey", "very",
- "vyer", "very",
- "vyre", "very",
- "waht", "what",
- "wass", "was",
- "watn", "want",
- "weas", "was",
- "wehn", "when",
- "whic", "which",
- "whta", "what",
- "wich", "which",
- "wief", "wife",
- "wiew", "view",
- "wiht", "with",
- "witn", "with",
- "wnat", "want",
- "wokr", "work",
- "wrok", "work",
- "wtih", "with",
- "yaer", "year",
- "yera", "year",
- "yrea", "year",
- "ytou", "you",
- "adn", "and",
- "ect", "etc",
- "nto", "not",
- "teh", "the",
- "thn", "then",
- "tje", "the",
- "whn", "when",
- "wih", "with",
- "yuo", "you",
-}
-
-// DictAmerican converts UK spellings to US spellings
-var DictAmerican = []string{
- "institutionalisation", "institutionalization",
- "internationalisation", "internationalization",
- "professionalisation", "professionalization",
- "compartmentalising", "compartmentalizing",
- "institutionalising", "institutionalizing",
- "internationalising", "internationalizing",
- "compartmentalised", "compartmentalized",
- "compartmentalises", "compartmentalizes",
- "decriminalisation", "decriminalization",
- "denationalisation", "denationalization",
- "fictionalisations", "fictionalizations",
- "institutionalised", "institutionalized",
- "institutionalises", "institutionalizes",
- "intellectualising", "intellectualizing",
- "internationalised", "internationalized",
- "internationalises", "internationalizes",
- "pedestrianisation", "pedestrianization",
- "professionalising", "professionalizing",
- "archaeologically", "archeologically",
- "compartmentalise", "compartmentalize",
- "decentralisation", "decentralization",
- "demilitarisation", "demilitarization",
- "externalisations", "externalizations",
- "fictionalisation", "fictionalization",
- "institutionalise", "institutionalize",
- "intellectualised", "intellectualized",
- "intellectualises", "intellectualizes",
- "internationalise", "internationalize",
- "nationalisations", "nationalizations",
- "palaeontologists", "paleontologists",
- "professionalised", "professionalized",
- "professionalises", "professionalizes",
- "rationalisations", "rationalizations",
- "sensationalising", "sensationalizing",
- "sentimentalising", "sentimentalizing",
- "acclimatisation", "acclimatization",
- "bougainvillaeas", "bougainvilleas",
- "commercialising", "commercializing",
- "conceptualising", "conceptualizing",
- "contextualising", "contextualizing",
- "crystallisation", "crystallization",
- "decriminalising", "decriminalizing",
- "democratisation", "democratization",
- "denationalising", "denationalizing",
- "depersonalising", "depersonalizing",
- "desensitisation", "desensitization",
- "destabilisation", "destabilization",
- "disorganisation", "disorganization",
- "extemporisation", "extemporization",
- "externalisation", "externalization",
- "familiarisation", "familiarization",
- "generalisations", "generalizations",
- "hospitalisation", "hospitalization",
- "individualising", "individualizing",
- "industrialising", "industrializing",
- "intellectualise", "intellectualize",
- "internalisation", "internalization",
- "manoeuvrability", "maneuverability",
- "marginalisation", "marginalization",
- "materialisation", "materialization",
- "miniaturisation", "miniaturization",
- "nationalisation", "nationalization",
- "neighbourliness", "neighborliness",
- "overemphasising", "overemphasizing",
- "palaeontologist", "paleontologist",
- "particularising", "particularizing",
- "pedestrianising", "pedestrianizing",
- "professionalise", "professionalize",
- "psychoanalysing", "psychoanalyzing",
- "rationalisation", "rationalization",
- "reorganisations", "reorganizations",
- "revolutionising", "revolutionizing",
- "sensationalised", "sensationalized",
- "sensationalises", "sensationalizes",
- "sentimentalised", "sentimentalized",
- "sentimentalises", "sentimentalizes",
- "specialisations", "specializations",
- "standardisation", "standardization",
- "synchronisation", "synchronization",
- "systematisation", "systematization",
- "aggrandisement", "aggrandizement",
- "anaesthetising", "anesthetizing",
- "archaeological", "archeological",
- "archaeologists", "archeologists",
- "bougainvillaea", "bougainvillea",
- "characterising", "characterizing",
- "collectivising", "collectivizing",
- "commercialised", "commercialized",
- "commercialises", "commercializes",
- "conceptualised", "conceptualized",
- "conceptualises", "conceptualizes",
- "contextualised", "contextualized",
- "contextualises", "contextualizes",
- "decentralising", "decentralizing",
- "decriminalised", "decriminalized",
- "decriminalises", "decriminalizes",
- "dehumanisation", "dehumanization",
- "demilitarising", "demilitarizing",
- "demobilisation", "demobilization",
- "demoralisation", "demoralization",
- "denationalised", "denationalized",
- "denationalises", "denationalizes",
- "depersonalised", "depersonalized",
- "depersonalises", "depersonalizes",
- "disembowelling", "disemboweling",
- "dramatisations", "dramatizations",
- "editorialising", "editorializing",
- "encyclopaedias", "encyclopedias",
- "fictionalising", "fictionalizing",
- "fraternisation", "fraternization",
- "generalisation", "generalization",
- "gynaecological", "gynecological",
- "gynaecologists", "gynecologists",
- "haematological", "hematological",
- "haematologists", "hematologists",
- "immobilisation", "immobilization",
- "individualised", "individualized",
- "individualises", "individualizes",
- "industrialised", "industrialized",
- "industrialises", "industrializes",
- "liberalisation", "liberalization",
- "monopolisation", "monopolization",
- "naturalisation", "naturalization",
- "neighbourhoods", "neighborhoods",
- "neutralisation", "neutralization",
- "organisational", "organizational",
- "outmanoeuvring", "outmaneuvering",
- "overemphasised", "overemphasized",
- "overemphasises", "overemphasizes",
- "paediatricians", "pediatricians",
- "particularised", "particularized",
- "particularises", "particularizes",
- "pasteurisation", "pasteurization",
- "pedestrianised", "pedestrianized",
- "pedestrianises", "pedestrianizes",
- "philosophising", "philosophizing",
- "politicisation", "politicization",
- "popularisation", "popularization",
- "pressurisation", "pressurization",
- "prioritisation", "prioritization",
- "privatisations", "privatizations",
- "propagandising", "propagandizing",
- "psychoanalysed", "psychoanalyzed",
- "psychoanalyses", "psychoanalyzes",
- "regularisation", "regularization",
- "reorganisation", "reorganization",
- "revolutionised", "revolutionized",
- "revolutionises", "revolutionizes",
- "secularisation", "secularization",
- "sensationalise", "sensationalize",
- "sentimentalise", "sentimentalize",
- "serialisations", "serializations",
- "specialisation", "specialization",
- "sterilisations", "sterilizations",
- "stigmatisation", "stigmatization",
- "transistorised", "transistorized",
- "unrecognisable", "unrecognizable",
- "visualisations", "visualizations",
- "westernisation", "westernization",
- "accessorising", "accessorizing",
- "acclimatising", "acclimatizing",
- "amortisations", "amortizations",
- "amphitheatres", "amphitheaters",
- "anaesthetised", "anesthetized",
- "anaesthetises", "anesthetizes",
- "anaesthetists", "anesthetists",
- "archaeologist", "archeologist",
- "backpedalling", "backpedaling",
- "behaviourists", "behaviorists",
- "breathalysers", "breathalyzers",
- "breathalysing", "breathalyzing",
- "callisthenics", "calisthenics",
- "cannibalising", "cannibalizing",
- "characterised", "characterized",
- "characterises", "characterizes",
- "circularising", "circularizing",
- "clarinettists", "clarinetists",
- "collectivised", "collectivized",
- "collectivises", "collectivizes",
- "commercialise", "commercialize",
- "computerising", "computerizing",
- "conceptualise", "conceptualize",
- "contextualise", "contextualize",
- "criminalising", "criminalizing",
- "crystallising", "crystallizing",
- "decentralised", "decentralized",
- "decentralises", "decentralizes",
- "decriminalise", "decriminalize",
- "demilitarised", "demilitarized",
- "demilitarises", "demilitarizes",
- "democratising", "democratizing",
- "denationalise", "denationalize",
- "depersonalise", "depersonalize",
- "desensitising", "desensitizing",
- "destabilising", "destabilizing",
- "disembowelled", "disemboweled",
- "dishonourable", "dishonorable",
- "dishonourably", "dishonorably",
- "dramatisation", "dramatization",
- "editorialised", "editorialized",
- "editorialises", "editorializes",
- "encyclopaedia", "encyclopedia",
- "encyclopaedic", "encyclopedic",
- "extemporising", "extemporizing",
- "externalising", "externalizing",
- "familiarising", "familiarizing",
- "fertilisation", "fertilization",
- "fictionalised", "fictionalized",
- "fictionalises", "fictionalizes",
- "formalisation", "formalization",
- "fossilisation", "fossilization",
- "globalisation", "globalization",
- "gynaecologist", "gynecologist",
- "haematologist", "hematologist",
- "haemophiliacs", "hemophiliacs",
- "haemorrhaging", "hemorrhaging",
- "harmonisation", "harmonization",
- "hospitalising", "hospitalizing",
- "hypothesising", "hypothesizing",
- "immortalising", "immortalizing",
- "individualise", "individualize",
- "industrialise", "industrialize",
- "internalising", "internalizing",
- "marginalising", "marginalizing",
- "materialising", "materializing",
- "mechanisation", "mechanization",
- "memorialising", "memorializing",
- "miniaturising", "miniaturizing",
- "miscatalogued", "miscataloged",
- "misdemeanours", "misdemeanors",
- "multicoloured", "multicolored",
- "nationalising", "nationalizing",
- "neighbourhood", "neighborhood",
- "normalisation", "normalization",
- "organisations", "organizations",
- "outmanoeuvred", "outmaneuvered",
- "outmanoeuvres", "outmaneuvers",
- "overemphasise", "overemphasize",
- "paediatrician", "pediatrician",
- "palaeontology", "paleontology",
- "particularise", "particularize",
- "passivisation", "passivization",
- "patronisingly", "patronizingly",
- "pedestrianise", "pedestrianize",
- "personalising", "personalizing",
- "philosophised", "philosophized",
- "philosophises", "philosophizes",
- "privatisation", "privatization",
- "propagandised", "propagandized",
- "propagandises", "propagandizes",
- "proselytisers", "proselytizers",
- "proselytising", "proselytizing",
- "psychoanalyse", "psychoanalyze",
- "pulverisation", "pulverization",
- "rationalising", "rationalizing",
- "reconnoitring", "reconnoitering",
- "revolutionise", "revolutionize",
- "romanticising", "romanticizing",
- "serialisation", "serialization",
- "socialisation", "socialization",
- "stabilisation", "stabilization",
- "standardising", "standardizing",
- "sterilisation", "sterilization",
- "subsidisation", "subsidization",
- "synchronising", "synchronizing",
- "systematising", "systematizing",
- "tantalisingly", "tantalizingly",
- "underutilised", "underutilized",
- "victimisation", "victimization",
- "visualisation", "visualization",
- "vocalisations", "vocalizations",
- "vulgarisation", "vulgarization",
- "accessorised", "accessorized",
- "accessorises", "accessorizes",
- "acclimatised", "acclimatized",
- "acclimatises", "acclimatizes",
- "amortisation", "amortization",
- "amphitheatre", "amphitheater",
- "anaesthetics", "anesthetics",
- "anaesthetise", "anesthetize",
- "anaesthetist", "anesthetist",
- "antagonising", "antagonizing",
- "appetisingly", "appetizingly",
- "backpedalled", "backpedaled",
- "bastardising", "bastardizing",
- "behaviourism", "behaviorism",
- "behaviourist", "behaviorist",
- "bowdlerising", "bowdlerizing",
- "breathalysed", "breathalyzed",
- "breathalyser", "breathalyzer",
- "breathalyses", "breathalyzes",
- "cannibalised", "cannibalized",
- "cannibalises", "cannibalizes",
- "capitalising", "capitalizing",
- "caramelising", "caramelizing",
- "categorising", "categorizing",
- "centigrammes", "centigrams",
- "centralising", "centralizing",
- "centrepieces", "centerpieces",
- "characterise", "characterize",
- "circularised", "circularized",
- "circularises", "circularizes",
- "clarinettist", "clarinetist",
- "collectivise", "collectivize",
- "colonisation", "colonization",
- "computerised", "computerized",
- "computerises", "computerizes",
- "criminalised", "criminalized",
- "criminalises", "criminalizes",
- "crystallised", "crystallized",
- "crystallises", "crystallizes",
- "decentralise", "decentralize",
- "dehumanising", "dehumanizing",
- "demilitarise", "demilitarize",
- "demobilising", "demobilizing",
- "democratised", "democratized",
- "democratises", "democratizes",
- "demoralising", "demoralizing",
- "desensitised", "desensitized",
- "desensitises", "desensitizes",
- "destabilised", "destabilized",
- "destabilises", "destabilizes",
- "discolouring", "discoloring",
- "dishonouring", "dishonoring",
- "disorganised", "disorganized",
- "editorialise", "editorialize",
- "endeavouring", "endeavoring",
- "equalisation", "equalization",
- "evangelising", "evangelizing",
- "extemporised", "extemporized",
- "extemporises", "extemporizes",
- "externalised", "externalized",
- "externalises", "externalizes",
- "familiarised", "familiarized",
- "familiarises", "familiarizes",
- "fictionalise", "fictionalize",
- "finalisation", "finalization",
- "fraternising", "fraternizing",
- "generalising", "generalizing",
- "haemophiliac", "hemophiliac",
- "haemorrhaged", "hemorrhaged",
- "haemorrhages", "hemorrhages",
- "haemorrhoids", "hemorrhoids",
- "homoeopathic", "homeopathic",
- "homogenising", "homogenizing",
- "hospitalised", "hospitalized",
- "hospitalises", "hospitalizes",
- "hypothesised", "hypothesized",
- "hypothesises", "hypothesizes",
- "idealisation", "idealization",
- "immobilisers", "immobilizers",
- "immobilising", "immobilizing",
- "immortalised", "immortalized",
- "immortalises", "immortalizes",
- "immunisation", "immunization",
- "initialising", "initializing",
- "internalised", "internalized",
- "internalises", "internalizes",
- "jeopardising", "jeopardizing",
- "legalisation", "legalization",
- "legitimising", "legitimizing",
- "liberalising", "liberalizing",
- "manoeuvrable", "maneuverable",
- "manoeuvrings", "maneuverings",
- "marginalised", "marginalized",
- "marginalises", "marginalizes",
- "marvellously", "marvelously",
- "materialised", "materialized",
- "materialises", "materializes",
- "maximisation", "maximization",
- "memorialised", "memorialized",
- "memorialises", "memorializes",
- "metabolising", "metabolizing",
- "militarising", "militarizing",
- "milligrammes", "milligrams",
- "miniaturised", "miniaturized",
- "miniaturises", "miniaturizes",
- "misbehaviour", "misbehavior",
- "misdemeanour", "misdemeanor",
- "mobilisation", "mobilization",
- "moisturisers", "moisturizers",
- "moisturising", "moisturizing",
- "monopolising", "monopolizing",
- "moustachioed", "mustachioed",
- "nationalised", "nationalized",
- "nationalises", "nationalizes",
- "naturalising", "naturalizing",
- "neighbouring", "neighboring",
- "neutralising", "neutralizing",
- "oesophaguses", "esophaguses",
- "organisation", "organization",
- "orthopaedics", "orthopedics",
- "outmanoeuvre", "outmaneuver",
- "palaeolithic", "paleolithic",
- "pasteurising", "pasteurizing",
- "personalised", "personalized",
- "personalises", "personalizes",
- "philosophise", "philosophize",
- "plagiarising", "plagiarizing",
- "ploughshares", "plowshares",
- "polarisation", "polarization",
- "politicising", "politicizing",
- "popularising", "popularizing",
- "pressurising", "pressurizing",
- "prioritising", "prioritizing",
- "propagandise", "propagandize",
- "proselytised", "proselytized",
- "proselytiser", "proselytizer",
- "proselytises", "proselytizes",
- "radicalising", "radicalizing",
- "rationalised", "rationalized",
- "rationalises", "rationalizes",
- "realisations", "realizations",
- "recognisable", "recognizable",
- "recognisably", "recognizably",
- "recognisance", "recognizance",
- "reconnoitred", "reconnoitered",
- "reconnoitres", "reconnoiters",
- "regularising", "regularizing",
- "reorganising", "reorganizing",
- "revitalising", "revitalizing",
- "rhapsodising", "rhapsodizing",
- "romanticised", "romanticized",
- "romanticises", "romanticizes",
- "scandalising", "scandalizing",
- "scrutinising", "scrutinizing",
- "secularising", "secularizing",
- "specialising", "specializing",
- "squirrelling", "squirreling",
- "standardised", "standardized",
- "standardises", "standardizes",
- "stigmatising", "stigmatizing",
- "sympathisers", "sympathizers",
- "sympathising", "sympathizing",
- "synchronised", "synchronized",
- "synchronises", "synchronizes",
- "synthesisers", "synthesizers",
- "synthesising", "synthesizing",
- "systematised", "systematized",
- "systematises", "systematizes",
- "technicolour", "technicolor",
- "theatregoers", "theatergoers",
- "traumatising", "traumatizing",
- "trivialising", "trivializing",
- "unauthorised", "unauthorized",
- "uncatalogued", "uncataloged",
- "unfavourable", "unfavorable",
- "unfavourably", "unfavorably",
- "unionisation", "unionization",
- "unrecognised", "unrecognized",
- "untrammelled", "untrammeled",
- "urbanisation", "urbanization",
- "vaporisation", "vaporization",
- "vocalisation", "vocalization",
- "watercolours", "watercolors",
- "westernising", "westernizing",
- "accessorise", "accessorize",
- "acclimatise", "acclimatize",
- "agonisingly", "agonizingly",
- "amortisable", "amortizable",
- "anaesthesia", "anesthesia",
- "anaesthetic", "anesthetic",
- "anglicising", "anglicizing",
- "antagonised", "antagonized",
- "antagonises", "antagonizes",
- "apologising", "apologizing",
- "archaeology", "archeology",
- "authorising", "authorizing",
- "bastardised", "bastardized",
- "bastardises", "bastardizes",
- "bedevilling", "bedeviling",
- "behavioural", "behavioral",
- "belabouring", "belaboring",
- "bowdlerised", "bowdlerized",
- "bowdlerises", "bowdlerizes",
- "breathalyse", "breathalyze",
- "brutalising", "brutalizing",
- "cannibalise", "cannibalize",
- "capitalised", "capitalized",
- "capitalises", "capitalizes",
- "caramelised", "caramelized",
- "caramelises", "caramelizes",
- "carbonising", "carbonizing",
- "cataloguing", "cataloging",
- "categorised", "categorized",
- "categorises", "categorizes",
- "cauterising", "cauterizing",
- "centigramme", "centigram",
- "centilitres", "centiliters",
- "centimetres", "centimeters",
- "centralised", "centralized",
- "centralises", "centralizes",
- "centrefolds", "centerfolds",
- "centrepiece", "centerpiece",
- "channelling", "channeling",
- "chequebooks", "checkbooks",
- "circularise", "circularize",
- "colourfully", "colorfully",
- "colourizing", "colorizing",
- "computerise", "computerize",
- "councillors", "councilors",
- "counselling", "counseling",
- "counsellors", "counselors",
- "criminalise", "criminalize",
- "criticising", "criticizing",
- "crystallise", "crystallize",
- "customising", "customizing",
- "defenceless", "defenseless",
- "dehumanised", "dehumanized",
- "dehumanises", "dehumanizes",
- "demobilised", "demobilized",
- "demobilises", "demobilizes",
- "democratise", "democratize",
- "demoralised", "demoralized",
- "demoralises", "demoralizes",
- "deodorising", "deodorizing",
- "desensitise", "desensitize",
- "destabilise", "destabilize",
- "discoloured", "discolored",
- "dishevelled", "disheveled",
- "dishonoured", "dishonored",
- "dramatising", "dramatizing",
- "economising", "economizing",
- "empathising", "empathizing",
- "emphasising", "emphasizing",
- "endeavoured", "endeavored",
- "epitomising", "epitomizing",
- "evangelised", "evangelized",
- "evangelises", "evangelizes",
- "extemporise", "extemporize",
- "externalise", "externalize",
- "factorising", "factorizing",
- "familiarise", "familiarize",
- "fantasising", "fantasizing",
- "favouritism", "favoritism",
- "fertilisers", "fertilizers",
- "fertilising", "fertilizing",
- "flavourings", "flavorings",
- "flavourless", "flavorless",
- "flavoursome", "flavorsome",
- "formalising", "formalizing",
- "fossilising", "fossilizing",
- "fraternised", "fraternized",
- "fraternises", "fraternizes",
- "galvanising", "galvanizing",
- "generalised", "generalized",
- "generalises", "generalizes",
- "ghettoising", "ghettoizing",
- "globalising", "globalizing",
- "gruellingly", "gruelingly",
- "gynaecology", "gynecology",
- "haematology", "hematology",
- "haemoglobin", "hemoglobin",
- "haemophilia", "hemophilia",
- "haemorrhage", "hemorrhage",
- "harmonising", "harmonizing",
- "homoeopaths", "homeopaths",
- "homoeopathy", "homeopathy",
- "homogenised", "homogenized",
- "homogenises", "homogenizes",
- "hospitalise", "hospitalize",
- "hybridising", "hybridizing",
- "hypnotising", "hypnotizing",
- "hypothesise", "hypothesize",
- "immobilised", "immobilized",
- "immobiliser", "immobilizer",
- "immobilises", "immobilizes",
- "immortalise", "immortalize",
- "impanelling", "impaneling",
- "imperilling", "imperiling",
- "initialised", "initialized",
- "initialises", "initializes",
- "initialling", "initialing",
- "instalments", "installments",
- "internalise", "internalize",
- "italicising", "italicizing",
- "jeopardised", "jeopardized",
- "jeopardises", "jeopardizes",
- "kilogrammes", "kilograms",
- "legitimised", "legitimized",
- "legitimises", "legitimizes",
- "liberalised", "liberalized",
- "liberalises", "liberalizes",
- "lionisation", "lionization",
- "liquidisers", "liquidizers",
- "liquidising", "liquidizing",
- "magnetising", "magnetizing",
- "manoeuvring", "maneuvering",
- "marginalise", "marginalize",
- "marshalling", "marshaling",
- "materialise", "materialize",
- "mechanising", "mechanizing",
- "memorialise", "memorialize",
- "mesmerising", "mesmerizing",
- "metabolised", "metabolized",
- "metabolises", "metabolizes",
- "micrometres", "micrometers",
- "militarised", "militarized",
- "militarises", "militarizes",
- "milligramme", "milligram",
- "millilitres", "milliliters",
- "millimetres", "millimeters",
- "miniaturise", "miniaturize",
- "modernising", "modernizing",
- "moisturised", "moisturized",
- "moisturiser", "moisturizer",
- "moisturises", "moisturizes",
- "monopolised", "monopolized",
- "monopolises", "monopolizes",
- "nationalise", "nationalize",
- "naturalised", "naturalized",
- "naturalises", "naturalizes",
- "neighbourly", "neighborly",
- "neutralised", "neutralized",
- "neutralises", "neutralizes",
- "normalising", "normalizing",
- "orthopaedic", "orthopedic",
- "ostracising", "ostracizing",
- "oxidisation", "oxidization",
- "paediatrics", "pediatrics",
- "paedophiles", "pedophiles",
- "paedophilia", "pedophilia",
- "passivising", "passivizing",
- "pasteurised", "pasteurized",
- "pasteurises", "pasteurizes",
- "patronising", "patronizing",
- "personalise", "personalize",
- "plagiarised", "plagiarized",
- "plagiarises", "plagiarizes",
- "ploughshare", "plowshare",
- "politicised", "politicized",
- "politicises", "politicizes",
- "popularised", "popularized",
- "popularises", "popularizes",
- "praesidiums", "presidiums",
- "pressurised", "pressurized",
- "pressurises", "pressurizes",
- "prioritised", "prioritized",
- "prioritises", "prioritizes",
- "privatising", "privatizing",
- "proselytise", "proselytize",
- "publicising", "publicizing",
- "pulverising", "pulverizing",
- "quarrelling", "quarreling",
- "radicalised", "radicalized",
- "radicalises", "radicalizes",
- "randomising", "randomizing",
- "rationalise", "rationalize",
- "realisation", "realization",
- "recognising", "recognizing",
- "reconnoitre", "reconnoiter",
- "regularised", "regularized",
- "regularises", "regularizes",
- "remodelling", "remodeling",
- "reorganised", "reorganized",
- "reorganises", "reorganizes",
- "revitalised", "revitalized",
- "revitalises", "revitalizes",
- "rhapsodised", "rhapsodized",
- "rhapsodises", "rhapsodizes",
- "romanticise", "romanticize",
- "scandalised", "scandalized",
- "scandalises", "scandalizes",
- "sceptically", "skeptically",
- "scrutinised", "scrutinized",
- "scrutinises", "scrutinizes",
- "secularised", "secularized",
- "secularises", "secularizes",
- "sensitising", "sensitizing",
- "serialising", "serializing",
- "sermonising", "sermonizing",
- "shrivelling", "shriveling",
- "signalising", "signalizing",
- "snorkelling", "snorkeling",
- "snowploughs", "snowplow",
- "socialising", "socializing",
- "solemnising", "solemnizing",
- "specialised", "specialized",
- "specialises", "specializes",
- "squirrelled", "squirreled",
- "stabilisers", "stabilizers",
- "stabilising", "stabilizing",
- "standardise", "standardize",
- "stencilling", "stenciling",
- "sterilisers", "sterilizers",
- "sterilising", "sterilizing",
- "stigmatised", "stigmatized",
- "stigmatises", "stigmatizes",
- "subsidisers", "subsidizers",
- "subsidising", "subsidizing",
- "summarising", "summarizing",
- "symbolising", "symbolizing",
- "sympathised", "sympathized",
- "sympathiser", "sympathizer",
- "sympathises", "sympathizes",
- "synchronise", "synchronize",
- "synthesised", "synthesized",
- "synthesiser", "synthesizer",
- "synthesises", "synthesizes",
- "systematise", "systematize",
- "tantalising", "tantalizing",
- "temporising", "temporizing",
- "tenderising", "tenderizing",
- "terrorising", "terrorizing",
- "theatregoer", "theatergoer",
- "traumatised", "traumatized",
- "traumatises", "traumatizes",
- "trivialised", "trivialized",
- "trivialises", "trivializes",
- "tyrannising", "tyrannizing",
- "uncivilised", "uncivilized",
- "unorganised", "unorganized",
- "unravelling", "unraveling",
- "utilisation", "utilization",
- "vandalising", "vandalizing",
- "verbalising", "verbalizing",
- "victimising", "victimizing",
- "visualising", "visualizing",
- "vulgarising", "vulgarizing",
- "watercolour", "watercolor",
- "westernised", "westernized",
- "westernises", "westernizes",
- "worshipping", "worshiping",
- "aeroplanes", "airplanes",
- "amortising", "amortizing",
- "anglicised", "anglicized",
- "anglicises", "anglicizes",
- "annualised", "annualized",
- "antagonise", "antagonize",
- "apologised", "apologized",
- "apologises", "apologizes",
- "appetisers", "appetizers",
- "appetising", "appetizing",
- "authorised", "authorized",
- "authorises", "authorizes",
- "bannisters", "banisters",
- "bastardise", "bastardize",
- "bedevilled", "bedeviled",
- "behaviours", "behaviors",
- "bejewelled", "bejeweled",
- "belaboured", "belabored",
- "bowdlerise", "bowdlerize",
- "brutalised", "brutalized",
- "brutalises", "brutalizes",
- "canalising", "canalizing",
- "cancelling", "canceling",
- "canonising", "canonizing",
- "capitalise", "capitalize",
- "caramelise", "caramelize",
- "carbonised", "carbonized",
- "carbonises", "carbonizes",
- "catalogued", "cataloged",
- "catalogues", "catalogs",
- "catalysing", "catalyzing",
- "categorise", "categorize",
- "cauterised", "cauterized",
- "cauterises", "cauterizes",
- "centilitre", "centiliter",
- "centimetre", "centimeter",
- "centralise", "centralize",
- "centrefold", "centerfold",
- "channelled", "channeled",
- "chequebook", "checkbook",
- "chiselling", "chiseling",
- "civilising", "civilizing",
- "clamouring", "clamoring",
- "colonisers", "colonizers",
- "colonising", "colonizing",
- "colourants", "colorants",
- "colourized", "colorized",
- "colourizes", "colorizes",
- "colourless", "colorless",
- "connexions", "connections",
- "councillor", "councilor",
- "counselled", "counseled",
- "counsellor", "counselor",
- "criticised", "criticized",
- "criticises", "criticizes",
- "cudgelling", "cudgeling",
- "customised", "customized",
- "customises", "customizes",
- "dehumanise", "dehumanize",
- "demobilise", "demobilize",
- "demonising", "demonizing",
- "demoralise", "demoralize",
- "deodorised", "deodorized",
- "deodorises", "deodorizes",
- "deputising", "deputizing",
- "digitising", "digitizing",
- "discolours", "discolors",
- "dishonours", "dishonors",
- "dramatised", "dramatized",
- "dramatises", "dramatizes",
- "drivelling", "driveling",
- "economised", "economized",
- "economises", "economizes",
- "empathised", "empathized",
- "empathises", "empathizes",
- "emphasised", "emphasized",
- "emphasises", "emphasizes",
- "enamelling", "enameling",
- "endeavours", "endeavors",
- "energising", "energizing",
- "epaulettes", "epaulets",
- "epicentres", "epicenters",
- "epitomised", "epitomized",
- "epitomises", "epitomizes",
- "equalisers", "equalizers",
- "equalising", "equalizing",
- "eulogising", "eulogizing",
- "evangelise", "evangelize",
- "factorised", "factorized",
- "factorises", "factorizes",
- "fantasised", "fantasized",
- "fantasises", "fantasizes",
- "favourable", "favorable",
- "favourably", "favorably",
- "favourites", "favorites",
- "feminising", "feminizing",
- "fertilised", "fertilized",
- "fertiliser", "fertilizer",
- "fertilises", "fertilizes",
- "fibreglass", "fiberglass",
- "finalising", "finalizing",
- "flavouring", "flavoring",
- "formalised", "formalized",
- "formalises", "formalizes",
- "fossilised", "fossilized",
- "fossilises", "fossilizes",
- "fraternise", "fraternize",
- "fulfilment", "fulfillment",
- "funnelling", "funneling",
- "galvanised", "galvanized",
- "galvanises", "galvanizes",
- "gambolling", "gamboling",
- "gaolbreaks", "jailbreaks",
- "generalise", "generalize",
- "ghettoised", "ghettoized",
- "ghettoises", "ghettoizes",
- "globalised", "globalized",
- "globalises", "globalizes",
- "gonorrhoea", "gonorrhea",
- "grovelling", "groveling",
- "harbouring", "harboring",
- "harmonised", "harmonized",
- "harmonises", "harmonizes",
- "homoeopath", "homeopath",
- "homogenise", "homogenize",
- "honourable", "honorable",
- "honourably", "honorably",
- "humanising", "humanizing",
- "humourless", "humorless",
- "hybridised", "hybridized",
- "hybridises", "hybridizes",
- "hypnotised", "hypnotized",
- "hypnotises", "hypnotizes",
- "idealising", "idealizing",
- "immobilise", "immobilize",
- "immunising", "immunizing",
- "impanelled", "impaneled",
- "imperilled", "imperiled",
- "inflexions", "inflections",
- "initialise", "initialize",
- "initialled", "initialed",
- "instalment", "installment",
- "ionisation", "ionization",
- "italicised", "italicized",
- "italicises", "italicizes",
- "jeopardise", "jeopardize",
- "kilogramme", "kilogram",
- "kilometres", "kilometers",
- "lacklustre", "lackluster",
- "legalising", "legalizing",
- "legitimise", "legitimize",
- "liberalise", "liberalize",
- "liquidised", "liquidized",
- "liquidiser", "liquidizer",
- "liquidises", "liquidizes",
- "localising", "localizing",
- "magnetised", "magnetized",
- "magnetises", "magnetizes",
- "manoeuvred", "maneuvered",
- "manoeuvres", "maneuvers",
- "marshalled", "marshaled",
- "marvelling", "marveling",
- "marvellous", "marvelous",
- "maximising", "maximizing",
- "mechanised", "mechanized",
- "mechanises", "mechanizes",
- "memorising", "memorizing",
- "mesmerised", "mesmerized",
- "mesmerises", "mesmerizes",
- "metabolise", "metabolize",
- "micrometre", "micrometer",
- "militarise", "militarize",
- "millilitre", "milliliter",
- "millimetre", "millimeter",
- "minimising", "minimizing",
- "mobilising", "mobilizing",
- "modernised", "modernized",
- "modernises", "modernizes",
- "moisturise", "moisturize",
- "monopolise", "monopolize",
- "moralising", "moralizing",
- "mouldering", "moldering",
- "moustached", "mustached",
- "moustaches", "mustaches",
- "naturalise", "naturalize",
- "neighbours", "neighbors",
- "neutralise", "neutralize",
- "normalised", "normalized",
- "normalises", "normalizes",
- "oesophagus", "esophagus",
- "optimising", "optimizing",
- "organisers", "organizers",
- "organising", "organizing",
- "ostracised", "ostracized",
- "ostracises", "ostracizes",
- "paederasts", "pederasts",
- "paediatric", "pediatric",
- "paedophile", "pedophile",
- "panellists", "panelists",
- "paralysing", "paralyzing",
- "parcelling", "parceling",
- "passivised", "passivized",
- "passivises", "passivizes",
- "pasteurise", "pasteurize",
- "patronised", "patronized",
- "patronises", "patronizes",
- "penalising", "penalizing",
- "pencilling", "penciling",
- "plagiarise", "plagiarize",
- "polarising", "polarizing",
- "politicise", "politicize",
- "popularise", "popularize",
- "practising", "practicing",
- "praesidium", "presidium",
- "pressurise", "pressurize",
- "prioritise", "prioritize",
- "privatised", "privatized",
- "privatises", "privatizes",
- "programmes", "programs",
- "publicised", "publicized",
- "publicises", "publicizes",
- "pulverised", "pulverized",
- "pulverises", "pulverizes",
- "pummelling", "pummeled",
- "quarrelled", "quarreled",
- "radicalise", "radicalize",
- "randomised", "randomized",
- "randomises", "randomizes",
- "realisable", "realizable",
- "recognised", "recognized",
- "recognises", "recognizes",
- "refuelling", "refueling",
- "regularise", "regularize",
- "remodelled", "remodeled",
- "remoulding", "remolding",
- "reorganise", "reorganize",
- "revitalise", "revitalize",
- "rhapsodise", "rhapsodize",
- "ritualised", "ritualized",
- "sanitising", "sanitizing",
- "satirising", "satirizing",
- "scandalise", "scandalize",
- "scepticism", "skepticism",
- "scrutinise", "scrutinize",
- "secularise", "secularize",
- "sensitised", "sensitized",
- "sensitises", "sensitizes",
- "sepulchres", "sepulchers",
- "serialised", "serialized",
- "serialises", "serializes",
- "sermonised", "sermonized",
- "sermonises", "sermonizes",
- "shovelling", "shoveling",
- "shrivelled", "shriveled",
- "signalised", "signalized",
- "signalises", "signalizes",
- "signalling", "signaling",
- "snivelling", "sniveling",
- "snorkelled", "snorkeled",
- "snowplough", "snowplow",
- "socialised", "socialized",
- "socialises", "socializes",
- "sodomising", "sodomizing",
- "solemnised", "solemnized",
- "solemnises", "solemnizes",
- "specialise", "specialize",
- "spiralling", "spiraling",
- "splendours", "splendors",
- "stabilised", "stabilized",
- "stabiliser", "stabilizer",
- "stabilises", "stabilizes",
- "stencilled", "stenciled",
- "sterilised", "sterilized",
- "steriliser", "sterilizer",
- "sterilises", "sterilizes",
- "stigmatise", "stigmatize",
- "subsidised", "subsidized",
- "subsidiser", "subsidizer",
- "subsidises", "subsidizes",
- "succouring", "succoring",
- "sulphurous", "sulfurous",
- "summarised", "summarized",
- "summarises", "summarizes",
- "swivelling", "swiveling",
- "symbolised", "symbolized",
- "symbolises", "symbolizes",
- "sympathise", "sympathize",
- "synthesise", "synthesize",
- "tantalised", "tantalized",
- "tantalises", "tantalizes",
- "temporised", "temporized",
- "temporises", "temporizes",
- "tenderised", "tenderized",
- "tenderises", "tenderizes",
- "terrorised", "terrorized",
- "terrorises", "terrorizes",
- "theorising", "theorizing",
- "traumatise", "traumatize",
- "travellers", "travelers",
- "travelling", "traveling",
- "tricolours", "tricolors",
- "trivialise", "trivialize",
- "tunnelling", "tunneling",
- "tyrannised", "tyrannized",
- "tyrannises", "tyrannizes",
- "unequalled", "unequaled",
- "unionising", "unionizing",
- "unravelled", "unraveled",
- "unrivalled", "unrivaled",
- "urbanising", "urbanizing",
- "utilisable", "utilizable",
- "vandalised", "vandalized",
- "vandalises", "vandalizes",
- "vaporising", "vaporizing",
- "verbalised", "verbalized",
- "verbalises", "verbalizes",
- "victimised", "victimized",
- "victimises", "victimizes",
- "visualised", "visualized",
- "visualises", "visualizes",
- "vocalising", "vocalizing",
- "vulcanised", "vulcanized",
- "vulgarised", "vulgarized",
- "vulgarises", "vulgarizes",
- "weaselling", "weaseling",
- "westernise", "westernize",
- "womanisers", "womanizers",
- "womanising", "womanizing",
- "worshipped", "worshiped",
- "worshipper", "worshiper",
- "aeroplane", "airplane",
- "aetiology", "etiology",
- "agonising", "agonizing",
- "almanacks", "almanacs",
- "aluminium", "aluminum",
- "amortised", "amortized",
- "amortises", "amortizes",
- "analogues", "analogs",
- "analysing", "analyzing",
- "anglicise", "anglicize",
- "apologise", "apologize",
- "appetiser", "appetizer",
- "armourers", "armorers",
- "armouries", "armories",
- "artefacts", "artifacts",
- "authorise", "authorize",
- "baptising", "baptizing",
- "behaviour", "behavior",
- "belabours", "belabors",
- "brutalise", "brutalize",
- "callipers", "calipers",
- "canalised", "canalized",
- "canalises", "canalizes",
- "cancelled", "canceled",
- "canonised", "canonized",
- "canonises", "canonizes",
- "carbonise", "carbonize",
- "carolling", "caroling",
- "catalogue", "catalog",
- "catalysed", "catalyzed",
- "catalyses", "catalyzes",
- "cauterise", "cauterize",
- "cavilling", "caviling",
- "chequered", "checkered",
- "chiselled", "chiseled",
- "civilised", "civilized",
- "civilises", "civilizes",
- "clamoured", "clamored",
- "colonised", "colonized",
- "coloniser", "colonizer",
- "colonises", "colonizes",
- "colourant", "colorant",
- "coloureds", "coloreds",
- "colourful", "colorful",
- "colouring", "coloring",
- "colourize", "colorize",
- "connexion", "connection",
- "criticise", "criticize",
- "cruellest", "cruelest",
- "cudgelled", "cudgeled",
- "customise", "customize",
- "demeanour", "demeanor",
- "demonised", "demonized",
- "demonises", "demonizes",
- "deodorise", "deodorize",
- "deputised", "deputized",
- "deputises", "deputizes",
- "dialogues", "dialogs",
- "diarrhoea", "diarrhea",
- "digitised", "digitized",
- "digitises", "digitizes",
- "discolour", "discolor",
- "disfavour", "disfavor",
- "dishonour", "dishonor",
- "dramatise", "dramatize",
- "drivelled", "driveled",
- "economise", "economize",
- "empathise", "empathize",
- "emphasise", "emphasize",
- "enamelled", "enameled",
- "enamoured", "enamored",
- "endeavour", "endeavor",
- "energised", "energized",
- "energises", "energizes",
- "epaulette", "epaulet",
- "epicentre", "epicenter",
- "epitomise", "epitomize",
- "equalised", "equalized",
- "equaliser", "equalizer",
- "equalises", "equalizes",
- "eulogised", "eulogized",
- "eulogises", "eulogizes",
- "factorise", "factorize",
- "fantasise", "fantasize",
- "favouring", "favoring",
- "favourite", "favorite",
- "feminised", "feminized",
- "feminises", "feminizes",
- "fertilise", "fertilize",
- "finalised", "finalized",
- "finalises", "finalizes",
- "flautists", "flutists",
- "flavoured", "flavored",
- "formalise", "formalize",
- "fossilise", "fossilize",
- "funnelled", "funneled",
- "galvanise", "galvanize",
- "gambolled", "gamboled",
- "gaolbirds", "jailbirds",
- "gaolbreak", "jailbreak",
- "ghettoise", "ghettoize",
- "globalise", "globalize",
- "gravelled", "graveled",
- "grovelled", "groveled",
- "gruelling", "grueling",
- "harboured", "harbored",
- "harmonise", "harmonize",
- "honouring", "honoring",
- "humanised", "humanized",
- "humanises", "humanizes",
- "humouring", "humoring",
- "hybridise", "hybridize",
- "hypnotise", "hypnotize",
- "idealised", "idealized",
- "idealises", "idealizes",
- "idolising", "idolizing",
- "immunised", "immunized",
- "immunises", "immunizes",
- "inflexion", "inflection",
- "italicise", "italicize",
- "itemising", "itemizing",
- "jewellers", "jewelers",
- "jewellery", "jewelry",
- "kilometre", "kilometer",
- "labelling", "labeling",
- "labourers", "laborers",
- "labouring", "laboring",
- "legalised", "legalized",
- "legalises", "legalizes",
- "leukaemia", "leukemia",
- "levellers", "levelers",
- "levelling", "leveling",
- "libelling", "libeling",
- "libellous", "libelous",
- "licencing", "licensing",
- "lionising", "lionizing",
- "liquidise", "liquidize",
- "localised", "localized",
- "localises", "localizes",
- "magnetise", "magnetize",
- "manoeuvre", "maneuver",
- "marvelled", "marveled",
- "maximised", "maximized",
- "maximises", "maximizes",
- "mechanise", "mechanize",
- "mediaeval", "medieval",
- "memorised", "memorized",
- "memorises", "memorizes",
- "mesmerise", "mesmerize",
- "minimised", "minimized",
- "minimises", "minimizes",
- "mobilised", "mobilized",
- "mobilises", "mobilizes",
- "modellers", "modelers",
- "modelling", "modeling",
- "modernise", "modernize",
- "moralised", "moralized",
- "moralises", "moralizes",
- "motorised", "motorized",
- "mouldered", "moldered",
- "mouldiest", "moldiest",
- "mouldings", "moldings",
- "moustache", "mustache",
- "neighbour", "neighbor",
- "normalise", "normalize",
- "odourless", "odorless",
- "oestrogen", "estrogen",
- "optimised", "optimized",
- "optimises", "optimizes",
- "organised", "organized",
- "organiser", "organizer",
- "organises", "organizes",
- "ostracise", "ostracize",
- "oxidising", "oxidizing",
- "paederast", "pederast",
- "panelling", "paneling",
- "panellist", "panelist",
- "paralysed", "paralyzed",
- "paralyses", "paralyzes",
- "parcelled", "parceled",
- "passivise", "passivize",
- "patronise", "patronize",
- "pedalling", "pedaling",
- "penalised", "penalized",
- "penalises", "penalizes",
- "pencilled", "penciled",
- "ploughing", "plowing",
- "ploughman", "plowman",
- "ploughmen", "plowmen",
- "polarised", "polarized",
- "polarises", "polarizes",
- "practised", "practiced",
- "practises", "practices",
- "pretences", "pretenses",
- "primaeval", "primeval",
- "privatise", "privatize",
- "programme", "program",
- "publicise", "publicize",
- "pulverise", "pulverize",
- "pummelled", "pummel",
- "randomise", "randomize",
- "ravelling", "raveling",
- "realising", "realizing",
- "recognise", "recognize",
- "refuelled", "refueled",
- "remoulded", "remolded",
- "revellers", "revelers",
- "revelling", "reveling",
- "rivalling", "rivaling",
- "saltpetre", "saltpeter",
- "sanitised", "sanitized",
- "sanitises", "sanitizes",
- "satirised", "satirized",
- "satirises", "satirizes",
- "savouries", "savories",
- "savouring", "savoring",
- "sceptical", "skeptical",
- "sensitise", "sensitize",
- "sepulchre", "sepulcher",
- "serialise", "serialize",
- "sermonise", "sermonize",
- "shovelled", "shoveled",
- "signalise", "signalize",
- "signalled", "signaled",
- "snivelled", "sniveled",
- "socialise", "socialize",
- "sodomised", "sodomized",
- "sodomises", "sodomizes",
- "solemnise", "solemnize",
- "spiralled", "spiraled",
- "splendour", "splendor",
- "stabilise", "stabilize",
- "sterilise", "sterilize",
- "subsidise", "subsidize",
- "succoured", "succored",
- "sulphates", "sulfates",
- "sulphides", "sulfides",
- "summarise", "summarize",
- "swivelled", "swiveled",
- "symbolise", "symbolize",
- "syphoning", "siphoning",
- "tantalise", "tantalize",
- "tasselled", "tasseled",
- "temporise", "temporize",
- "tenderise", "tenderize",
- "terrorise", "terrorize",
- "theorised", "theorized",
- "theorises", "theorizes",
- "towelling", "toweling",
- "travelled", "traveled",
- "traveller", "traveler",
- "trialling", "trialing",
- "tricolour", "tricolor",
- "tunnelled", "tunneled",
- "tyrannise", "tyrannize",
- "unionised", "unionized",
- "unionises", "unionizes",
- "unsavoury", "unsavory",
- "urbanised", "urbanized",
- "urbanises", "urbanizes",
- "utilising", "utilizing",
- "vandalise", "vandalize",
- "vaporised", "vaporized",
- "vaporises", "vaporizes",
- "verbalise", "verbalize",
- "victimise", "victimize",
- "visualise", "visualize",
- "vocalised", "vocalized",
- "vocalises", "vocalizes",
- "vulgarise", "vulgarize",
- "weaselled", "weaseled",
- "womanised", "womanized",
- "womaniser", "womanizer",
- "womanises", "womanizes",
- "yodelling", "yodeling",
- "yoghourts", "yogurts",
- "agonised", "agonized",
- "agonises", "agonizes",
- "almanack", "almanac",
- "amortise", "amortize",
- "analogue", "analog",
- "analysed", "analyzed",
- "analyses", "analyzes",
- "armoured", "armored",
- "armourer", "armorer",
- "artefact", "artifact",
- "baptised", "baptized",
- "baptises", "baptizes",
- "baulking", "balking",
- "belabour", "belabor",
- "bevelled", "beveled",
- "calibres", "calibers",
- "calliper", "caliper",
- "canalise", "canalize",
- "canonise", "canonize",
- "carolled", "caroled",
- "catalyse", "catalyze",
- "cavilled", "caviled",
- "civilise", "civilize",
- "clamours", "clamors",
- "clangour", "clangor",
- "colonise", "colonize",
- "coloured", "colored",
- "cosiness", "coziness",
- "crueller", "crueler",
- "defences", "defenses",
- "demonise", "demonize",
- "deputise", "deputize",
- "dialling", "dialing",
- "dialogue", "dialog",
- "digitise", "digitize",
- "draughty", "drafty",
- "duelling", "dueling",
- "energise", "energize",
- "enthrals", "enthralls",
- "equalise", "equalize",
- "eulogise", "eulogize",
- "favoured", "favored",
- "feminise", "feminize",
- "finalise", "finalize",
- "flautist", "flutist",
- "flavours", "flavors",
- "foetuses", "fetuses",
- "fuelling", "fueling",
- "gaolbird", "jailbird",
- "gryphons", "griffins",
- "harbours", "harbors",
- "honoured", "honored",
- "humanise", "humanize",
- "humoured", "humored",
- "idealise", "idealize",
- "idolised", "idolized",
- "idolises", "idolizes",
- "immunise", "immunize",
- "ionisers", "ionizers",
- "ionising", "ionizing",
- "itemised", "itemized",
- "itemises", "itemizes",
- "jewelled", "jeweled",
- "jeweller", "jeweler",
- "labelled", "labeled",
- "laboured", "labored",
- "labourer", "laborer",
- "legalise", "legalize",
- "levelled", "leveled",
- "leveller", "leveler",
- "libelled", "libeled",
- "licenced", "licensed",
- "licences", "licenses",
- "lionised", "lionized",
- "lionises", "lionizes",
- "localise", "localize",
- "maximise", "maximize",
- "memorise", "memorize",
- "minimise", "minimize",
- "misspelt", "misspelled",
- "mobilise", "mobilize",
- "modelled", "modeled",
- "modeller", "modeler",
- "moralise", "moralize",
- "moulders", "molders",
- "mouldier", "moldier",
- "moulding", "molding",
- "moulting", "molting",
- "offences", "offenses",
- "optimise", "optimize",
- "organise", "organize",
- "oxidised", "oxidized",
- "oxidises", "oxidizes",
- "panelled", "paneled",
- "paralyse", "paralyze",
- "parlours", "parlors",
- "pedalled", "pedaled",
- "penalise", "penalize",
- "philtres", "filters",
- "ploughed", "plowed",
- "polarise", "polarize",
- "practise", "practice",
- "pretence", "pretense",
- "ravelled", "raveled",
- "realised", "realized",
- "realises", "realizes",
- "remoulds", "remolds",
- "revelled", "reveled",
- "reveller", "reveler",
- "rivalled", "rivaled",
- "rumoured", "rumored",
- "sanitise", "sanitize",
- "satirise", "satirize",
- "saviours", "saviors",
- "savoured", "savored",
- "sceptics", "skeptics",
- "sceptres", "scepters",
- "sodomise", "sodomize",
- "spectres", "specters",
- "succours", "succors",
- "sulphate", "sulfate",
- "sulphide", "sulfide",
- "syphoned", "siphoned",
- "theatres", "theaters",
- "theorise", "theorize",
- "towelled", "toweled",
- "toxaemia", "toxemia",
- "trialled", "trialed",
- "unionise", "unionize",
- "urbanise", "urbanize",
- "utilised", "utilized",
- "utilises", "utilizes",
- "vaporise", "vaporize",
- "vocalise", "vocalize",
- "womanise", "womanize",
- "yodelled", "yodeled",
- "yoghourt", "yogurt",
- "yoghurts", "yogurts",
- "agonise", "agonize",
- "anaemia", "anemia",
- "anaemic", "anemic",
- "analyse", "analyze",
- "arbours", "arbors",
- "armoury", "armory",
- "baptise", "baptize",
- "baulked", "balked",
- "behoved", "behooved",
- "behoves", "behooves",
- "calibre", "caliber",
- "candour", "candor",
- "centred", "centered",
- "centres", "centers",
- "cheques", "checks",
- "clamour", "clamor",
- "colours", "colors",
- "cosiest", "coziest",
- "defence", "defense",
- "dialled", "dialed",
- "distils", "distills",
- "duelled", "dueled",
- "enthral", "enthrall",
- "favours", "favors",
- "fervour", "fervor",
- "flavour", "flavor",
- "fuelled", "fueled",
- "fulfils", "fulfills",
- "gaolers", "jailers",
- "gaoling", "jailing",
- "gipsies", "gypsies",
- "glueing", "gluing",
- "goitres", "goiters",
- "grammes", "grams",
- "groynes", "groins",
- "gryphon", "griffin",
- "harbour", "harbor",
- "honours", "honors",
- "humours", "humors",
- "idolise", "idolize",
- "instals", "installs",
- "instils", "instills",
- "ionised", "ionized",
- "ioniser", "ionizer",
- "ionises", "ionizes",
- "itemise", "itemize",
- "labours", "labors",
- "licence", "license",
- "lionise", "lionize",
- "louvred", "louvered",
- "louvres", "louvers",
- "moulded", "molded",
- "moulder", "molder",
- "moulted", "molted",
- "offence", "offense",
- "oxidise", "oxidize",
- "parlour", "parlor",
- "philtre", "filter",
- "ploughs", "plows",
- "pyjamas", "pajamas",
- "rancour", "rancor",
- "realise", "realize",
- "remould", "remold",
- "rigours", "rigors",
- "rumours", "rumors",
- "saviour", "savior",
- "savours", "savors",
- "savoury", "savory",
- "sceptic", "skeptic",
- "sceptre", "scepter",
- "spectre", "specter",
- "storeys", "stories",
- "succour", "succor",
- "sulphur", "sulfur",
- "syphons", "siphons",
- "theatre", "theater",
- "tumours", "tumors",
- "utilise", "utilize",
- "vapours", "vapors",
- "waggons", "wagons",
- "yoghurt", "yogurt",
- "ageing", "aging",
- "appals", "appalls",
- "arbour", "arbor",
- "ardour", "ardor",
- "baulks", "balks",
- "behove", "behoove",
- "centre", "center",
- "cheque", "check",
- "chilli", "chili",
- "colour", "color",
- "cosier", "cozier",
- "cosies", "cozies",
- "cosily", "cozily",
- "distil", "distill",
- "edoema", "edema",
- "enrols", "enrolls",
- "faecal", "fecal",
- "faeces", "feces",
- "favour", "favor",
- "fibres", "fibers",
- "foetal", "fetal",
- "foetid", "fetid",
- "foetus", "fetus",
- "fulfil", "fulfill",
- "gaoled", "jailed",
- "gaoler", "jailer",
- "goitre", "goiter",
- "gramme", "gram",
- "groyne", "groin",
- "honour", "honor",
- "humour", "humor",
- "instal", "install",
- "instil", "instill",
- "ionise", "ionize",
- "labour", "labor",
- "litres", "liters",
- "lustre", "luster",
- "meagre", "meager",
- "metres", "meters",
- "mitres", "miters",
- "moulds", "molds",
- "mouldy", "moldy",
- "moults", "molts",
- "odours", "odors",
- "plough", "plow",
- "pyjama", "pajama",
- "rigour", "rigor",
- "rumour", "rumor",
- "savour", "savor",
- "storey", "story",
- "syphon", "siphon",
- "tumour", "tumor",
- "valour", "valor",
- "vapour", "vapor",
- "vigour", "vigor",
- "waggon", "wagon",
- "appal", "appall",
- "baulk", "balk",
- "enrol", "enroll",
- "fibre", "fiber",
- "gaols", "jails",
- "litre", "liter",
- "metre", "meter",
- "mitre", "miter",
- "mould", "mold",
- "moult", "molt",
- "odour", "odor",
- "tyres", "tires",
- "cosy", "cozy",
- "gaol", "jail",
- "tyre", "tire",
-}
-
-// DictBritish converts US spellings to UK spellings
-var DictBritish = []string{
- "institutionalization", "institutionalisation",
- "internationalization", "internationalisation",
- "professionalization", "professionalisation",
- "compartmentalizing", "compartmentalising",
- "institutionalizing", "institutionalising",
- "internationalizing", "internationalising",
- "compartmentalized", "compartmentalised",
- "compartmentalizes", "compartmentalises",
- "decriminalization", "decriminalisation",
- "denationalization", "denationalisation",
- "fictionalizations", "fictionalisations",
- "institutionalized", "institutionalised",
- "institutionalizes", "institutionalises",
- "intellectualizing", "intellectualising",
- "internationalized", "internationalised",
- "internationalizes", "internationalises",
- "pedestrianization", "pedestrianisation",
- "professionalizing", "professionalising",
- "compartmentalize", "compartmentalise",
- "decentralization", "decentralisation",
- "demilitarization", "demilitarisation",
- "externalizations", "externalisations",
- "fictionalization", "fictionalisation",
- "institutionalize", "institutionalise",
- "intellectualized", "intellectualised",
- "intellectualizes", "intellectualises",
- "internationalize", "internationalise",
- "nationalizations", "nationalisations",
- "professionalized", "professionalised",
- "professionalizes", "professionalises",
- "rationalizations", "rationalisations",
- "sensationalizing", "sensationalising",
- "sentimentalizing", "sentimentalising",
- "acclimatization", "acclimatisation",
- "commercializing", "commercialising",
- "conceptualizing", "conceptualising",
- "contextualizing", "contextualising",
- "crystallization", "crystallisation",
- "decriminalizing", "decriminalising",
- "democratization", "democratisation",
- "denationalizing", "denationalising",
- "depersonalizing", "depersonalising",
- "desensitization", "desensitisation",
- "disorganization", "disorganisation",
- "extemporization", "extemporisation",
- "externalization", "externalisation",
- "familiarization", "familiarisation",
- "generalizations", "generalisations",
- "hospitalization", "hospitalisation",
- "individualizing", "individualising",
- "industrializing", "industrialising",
- "intellectualize", "intellectualise",
- "internalization", "internalisation",
- "maneuverability", "manoeuvrability",
- "materialization", "materialisation",
- "miniaturization", "miniaturisation",
- "nationalization", "nationalisation",
- "overemphasizing", "overemphasising",
- "paleontologists", "palaeontologists",
- "particularizing", "particularising",
- "pedestrianizing", "pedestrianising",
- "professionalize", "professionalise",
- "psychoanalyzing", "psychoanalysing",
- "rationalization", "rationalisation",
- "reorganizations", "reorganisations",
- "revolutionizing", "revolutionising",
- "sensationalized", "sensationalised",
- "sensationalizes", "sensationalises",
- "sentimentalized", "sentimentalised",
- "sentimentalizes", "sentimentalises",
- "specializations", "specialisations",
- "standardization", "standardisation",
- "synchronization", "synchronisation",
- "systematization", "systematisation",
- "aggrandizement", "aggrandisement",
- "characterizing", "characterising",
- "collectivizing", "collectivising",
- "commercialized", "commercialised",
- "commercializes", "commercialises",
- "conceptualized", "conceptualised",
- "conceptualizes", "conceptualises",
- "contextualized", "contextualised",
- "contextualizes", "contextualises",
- "decentralizing", "decentralising",
- "decriminalized", "decriminalised",
- "decriminalizes", "decriminalises",
- "dehumanization", "dehumanisation",
- "demilitarizing", "demilitarising",
- "demobilization", "demobilisation",
- "demoralization", "demoralisation",
- "denationalized", "denationalised",
- "denationalizes", "denationalises",
- "depersonalized", "depersonalised",
- "depersonalizes", "depersonalises",
- "dramatizations", "dramatisations",
- "editorializing", "editorialising",
- "fictionalizing", "fictionalising",
- "fraternization", "fraternisation",
- "generalization", "generalisation",
- "immobilization", "immobilisation",
- "individualized", "individualised",
- "individualizes", "individualises",
- "industrialized", "industrialised",
- "industrializes", "industrialises",
- "liberalization", "liberalisation",
- "monopolization", "monopolisation",
- "naturalization", "naturalisation",
- "neighborliness", "neighbourliness",
- "neutralization", "neutralisation",
- "organizational", "organisational",
- "outmaneuvering", "outmanoeuvring",
- "overemphasized", "overemphasised",
- "overemphasizes", "overemphasises",
- "paleontologist", "palaeontologist",
- "particularized", "particularised",
- "particularizes", "particularises",
- "pasteurization", "pasteurisation",
- "pedestrianized", "pedestrianised",
- "pedestrianizes", "pedestrianises",
- "philosophizing", "philosophising",
- "politicization", "politicisation",
- "popularization", "popularisation",
- "pressurization", "pressurisation",
- "prioritization", "prioritisation",
- "privatizations", "privatisations",
- "propagandizing", "propagandising",
- "psychoanalyzed", "psychoanalysed",
- "psychoanalyzes", "psychoanalyses",
- "reconnoitering", "reconnoitring",
- "regularization", "regularisation",
- "reorganization", "reorganisation",
- "revolutionized", "revolutionised",
- "revolutionizes", "revolutionises",
- "secularization", "secularisation",
- "sensationalize", "sensationalise",
- "sentimentalize", "sentimentalise",
- "serializations", "serialisations",
- "specialization", "specialisation",
- "sterilizations", "sterilisations",
- "stigmatization", "stigmatisation",
- "transistorized", "transistorised",
- "unrecognizable", "unrecognisable",
- "visualizations", "visualisations",
- "westernization", "westernisation",
- "accessorizing", "accessorising",
- "acclimatizing", "acclimatising",
- "amortizations", "amortisations",
- "amphitheaters", "amphitheatres",
- "anesthetizing", "anaesthetising",
- "archeologists", "archaeologists",
- "breathalyzers", "breathalysers",
- "breathalyzing", "breathalysing",
- "cannibalizing", "cannibalising",
- "characterized", "characterised",
- "characterizes", "characterises",
- "circularizing", "circularising",
- "collectivized", "collectivised",
- "collectivizes", "collectivises",
- "commercialize", "commercialise",
- "computerizing", "computerising",
- "conceptualize", "conceptualise",
- "contextualize", "contextualise",
- "criminalizing", "criminalising",
- "crystallizing", "crystallising",
- "decentralized", "decentralised",
- "decentralizes", "decentralises",
- "decriminalize", "decriminalise",
- "demilitarized", "demilitarised",
- "demilitarizes", "demilitarises",
- "democratizing", "democratising",
- "denationalize", "denationalise",
- "depersonalize", "depersonalise",
- "desensitizing", "desensitising",
- "destabilizing", "destabilising",
- "disemboweling", "disembowelling",
- "dramatization", "dramatisation",
- "editorialized", "editorialised",
- "editorializes", "editorialises",
- "extemporizing", "extemporising",
- "externalizing", "externalising",
- "familiarizing", "familiarising",
- "fertilization", "fertilisation",
- "fictionalized", "fictionalised",
- "fictionalizes", "fictionalises",
- "formalization", "formalisation",
- "fossilization", "fossilisation",
- "globalization", "globalisation",
- "gynecological", "gynaecological",
- "gynecologists", "gynaecologists",
- "harmonization", "harmonisation",
- "hematological", "haematological",
- "hematologists", "haematologists",
- "hospitalizing", "hospitalising",
- "hypothesizing", "hypothesising",
- "immortalizing", "immortalising",
- "individualize", "individualise",
- "industrialize", "industrialise",
- "internalizing", "internalising",
- "marginalizing", "marginalising",
- "materializing", "materialising",
- "mechanization", "mechanisation",
- "memorializing", "memorialising",
- "miniaturizing", "miniaturising",
- "nationalizing", "nationalising",
- "neighborhoods", "neighbourhoods",
- "normalization", "normalisation",
- "organizations", "organisations",
- "outmaneuvered", "outmanoeuvred",
- "overemphasize", "overemphasise",
- "particularize", "particularise",
- "passivization", "passivisation",
- "patronizingly", "patronisingly",
- "pedestrianize", "pedestrianise",
- "pediatricians", "paediatricians",
- "personalizing", "personalising",
- "philosophized", "philosophised",
- "philosophizes", "philosophises",
- "privatization", "privatisation",
- "propagandized", "propagandised",
- "propagandizes", "propagandises",
- "proselytizers", "proselytisers",
- "proselytizing", "proselytising",
- "psychoanalyze", "psychoanalyse",
- "pulverization", "pulverisation",
- "rationalizing", "rationalising",
- "reconnoitered", "reconnoitred",
- "revolutionize", "revolutionise",
- "romanticizing", "romanticising",
- "serialization", "serialisation",
- "socialization", "socialisation",
- "standardizing", "standardising",
- "sterilization", "sterilisation",
- "subsidization", "subsidisation",
- "synchronizing", "synchronising",
- "systematizing", "systematising",
- "tantalizingly", "tantalisingly",
- "underutilized", "underutilised",
- "victimization", "victimisation",
- "visualization", "visualisation",
- "vocalizations", "vocalisations",
- "vulgarization", "vulgarisation",
- "accessorized", "accessorised",
- "accessorizes", "accessorises",
- "acclimatized", "acclimatised",
- "acclimatizes", "acclimatises",
- "amortization", "amortisation",
- "amphitheater", "amphitheatre",
- "anesthetists", "anaesthetists",
- "anesthetized", "anaesthetised",
- "anesthetizes", "anaesthetises",
- "antagonizing", "antagonising",
- "appetizingly", "appetisingly",
- "archeologist", "archaeologist",
- "backpedaling", "backpedalling",
- "bastardizing", "bastardising",
- "behaviorists", "behaviourists",
- "bowdlerizing", "bowdlerising",
- "breathalyzed", "breathalysed",
- "breathalyzes", "breathalyses",
- "cannibalized", "cannibalised",
- "cannibalizes", "cannibalises",
- "capitalizing", "capitalising",
- "caramelizing", "caramelising",
- "categorizing", "categorising",
- "centerpieces", "centrepieces",
- "centralizing", "centralising",
- "characterize", "characterise",
- "circularized", "circularised",
- "circularizes", "circularises",
- "clarinetists", "clarinettists",
- "collectivize", "collectivise",
- "colonization", "colonisation",
- "computerized", "computerised",
- "computerizes", "computerises",
- "criminalized", "criminalised",
- "criminalizes", "criminalises",
- "crystallized", "crystallised",
- "crystallizes", "crystallises",
- "decentralize", "decentralise",
- "dehumanizing", "dehumanising",
- "demilitarize", "demilitarise",
- "demobilizing", "demobilising",
- "democratized", "democratised",
- "democratizes", "democratises",
- "demoralizing", "demoralising",
- "desensitized", "desensitised",
- "desensitizes", "desensitises",
- "destabilized", "destabilised",
- "destabilizes", "destabilises",
- "disemboweled", "disembowelled",
- "dishonorable", "dishonourable",
- "dishonorably", "dishonourably",
- "disorganized", "disorganised",
- "editorialize", "editorialise",
- "equalization", "equalisation",
- "evangelizing", "evangelising",
- "extemporized", "extemporised",
- "extemporizes", "extemporises",
- "externalized", "externalised",
- "externalizes", "externalises",
- "familiarized", "familiarised",
- "familiarizes", "familiarises",
- "fictionalize", "fictionalise",
- "finalization", "finalisation",
- "fraternizing", "fraternising",
- "generalizing", "generalising",
- "gynecologist", "gynaecologist",
- "hematologist", "haematologist",
- "hemophiliacs", "haemophiliacs",
- "hemorrhaging", "haemorrhaging",
- "homogenizing", "homogenising",
- "hospitalized", "hospitalised",
- "hospitalizes", "hospitalises",
- "hypothesized", "hypothesised",
- "hypothesizes", "hypothesises",
- "idealization", "idealisation",
- "immobilizers", "immobilisers",
- "immobilizing", "immobilising",
- "immortalized", "immortalised",
- "immortalizes", "immortalises",
- "immunization", "immunisation",
- "initializing", "initialising",
- "installments", "instalments",
- "internalized", "internalised",
- "internalizes", "internalises",
- "jeopardizing", "jeopardising",
- "legalization", "legalisation",
- "legitimizing", "legitimising",
- "liberalizing", "liberalising",
- "maneuverable", "manoeuvrable",
- "maneuverings", "manoeuvrings",
- "marginalized", "marginalised",
- "marginalizes", "marginalises",
- "materialized", "materialised",
- "materializes", "materialises",
- "maximization", "maximisation",
- "memorialized", "memorialised",
- "memorializes", "memorialises",
- "metabolizing", "metabolising",
- "militarizing", "militarising",
- "miniaturized", "miniaturised",
- "miniaturizes", "miniaturises",
- "miscataloged", "miscatalogued",
- "misdemeanors", "misdemeanours",
- "mobilization", "mobilisation",
- "moisturizers", "moisturisers",
- "moisturizing", "moisturising",
- "monopolizing", "monopolising",
- "multicolored", "multicoloured",
- "nationalized", "nationalised",
- "nationalizes", "nationalises",
- "naturalizing", "naturalising",
- "neighborhood", "neighbourhood",
- "neutralizing", "neutralising",
- "organization", "organisation",
- "outmaneuvers", "outmanoeuvres",
- "paleontology", "palaeontology",
- "pasteurizing", "pasteurising",
- "pediatrician", "paediatrician",
- "personalized", "personalised",
- "personalizes", "personalises",
- "philosophize", "philosophise",
- "plagiarizing", "plagiarising",
- "polarization", "polarisation",
- "politicizing", "politicising",
- "popularizing", "popularising",
- "pressurizing", "pressurising",
- "prioritizing", "prioritising",
- "propagandize", "propagandise",
- "proselytized", "proselytised",
- "proselytizer", "proselytiser",
- "proselytizes", "proselytises",
- "radicalizing", "radicalising",
- "rationalized", "rationalised",
- "rationalizes", "rationalises",
- "realizations", "realisations",
- "recognizable", "recognisable",
- "recognizably", "recognisably",
- "recognizance", "recognisance",
- "reconnoiters", "reconnoitres",
- "regularizing", "regularising",
- "reorganizing", "reorganising",
- "revitalizing", "revitalising",
- "rhapsodizing", "rhapsodising",
- "romanticized", "romanticised",
- "romanticizes", "romanticises",
- "scandalizing", "scandalising",
- "scrutinizing", "scrutinising",
- "secularizing", "secularising",
- "standardized", "standardised",
- "standardizes", "standardises",
- "stigmatizing", "stigmatising",
- "sympathizers", "sympathisers",
- "sympathizing", "sympathising",
- "synchronized", "synchronised",
- "synchronizes", "synchronises",
- "synthesizing", "synthesising",
- "systematized", "systematised",
- "systematizes", "systematises",
- "theatergoers", "theatregoers",
- "traumatizing", "traumatising",
- "trivializing", "trivialising",
- "unauthorized", "unauthorised",
- "unionization", "unionisation",
- "unrecognized", "unrecognised",
- "urbanization", "urbanisation",
- "vaporization", "vaporisation",
- "vocalization", "vocalisation",
- "westernizing", "westernising",
- "accessorize", "accessorise",
- "acclimatize", "acclimatise",
- "agonizingly", "agonisingly",
- "amortizable", "amortisable",
- "anesthetics", "anaesthetics",
- "anesthetist", "anaesthetist",
- "anesthetize", "anaesthetise",
- "anglicizing", "anglicising",
- "antagonized", "antagonised",
- "antagonizes", "antagonises",
- "apologizing", "apologising",
- "backpedaled", "backpedalled",
- "bastardized", "bastardised",
- "bastardizes", "bastardises",
- "behaviorism", "behaviourism",
- "behaviorist", "behaviourist",
- "bowdlerized", "bowdlerised",
- "bowdlerizes", "bowdlerises",
- "brutalizing", "brutalising",
- "cannibalize", "cannibalise",
- "capitalized", "capitalised",
- "capitalizes", "capitalises",
- "caramelized", "caramelised",
- "caramelizes", "caramelises",
- "carbonizing", "carbonising",
- "categorized", "categorised",
- "categorizes", "categorises",
- "cauterizing", "cauterising",
- "centerfolds", "centrefolds",
- "centerpiece", "centrepiece",
- "centiliters", "centilitres",
- "centimeters", "centimetres",
- "centralized", "centralised",
- "centralizes", "centralises",
- "circularize", "circularise",
- "clarinetist", "clarinettist",
- "computerize", "computerise",
- "criminalize", "criminalise",
- "criticizing", "criticising",
- "crystallize", "crystallise",
- "customizing", "customising",
- "defenseless", "defenceless",
- "dehumanized", "dehumanised",
- "dehumanizes", "dehumanises",
- "demobilized", "demobilised",
- "demobilizes", "demobilises",
- "democratize", "democratise",
- "demoralized", "demoralised",
- "demoralizes", "demoralises",
- "deodorizing", "deodorising",
- "desensitize", "desensitise",
- "destabilize", "destabilise",
- "discoloring", "discolouring",
- "dishonoring", "dishonouring",
- "dramatizing", "dramatising",
- "economizing", "economising",
- "empathizing", "empathising",
- "emphasizing", "emphasising",
- "endeavoring", "endeavouring",
- "epitomizing", "epitomising",
- "esophaguses", "oesophaguses",
- "evangelized", "evangelised",
- "evangelizes", "evangelises",
- "extemporize", "extemporise",
- "externalize", "externalise",
- "factorizing", "factorising",
- "familiarize", "familiarise",
- "fantasizing", "fantasising",
- "fertilizers", "fertilisers",
- "fertilizing", "fertilising",
- "formalizing", "formalising",
- "fossilizing", "fossilising",
- "fraternized", "fraternised",
- "fraternizes", "fraternises",
- "fulfillment", "fulfilment",
- "galvanizing", "galvanising",
- "generalized", "generalised",
- "generalizes", "generalises",
- "ghettoizing", "ghettoising",
- "globalizing", "globalising",
- "harmonizing", "harmonising",
- "hemophiliac", "haemophiliac",
- "hemorrhaged", "haemorrhaged",
- "hemorrhages", "haemorrhages",
- "hemorrhoids", "haemorrhoids",
- "homogenized", "homogenised",
- "homogenizes", "homogenises",
- "hospitalize", "hospitalise",
- "hybridizing", "hybridising",
- "hypnotizing", "hypnotising",
- "hypothesize", "hypothesise",
- "immobilized", "immobilised",
- "immobilizer", "immobiliser",
- "immobilizes", "immobilises",
- "immortalize", "immortalise",
- "initialized", "initialised",
- "initializes", "initialises",
- "installment", "instalment",
- "internalize", "internalise",
- "italicizing", "italicising",
- "jeopardized", "jeopardised",
- "jeopardizes", "jeopardises",
- "legitimized", "legitimised",
- "legitimizes", "legitimises",
- "liberalized", "liberalised",
- "liberalizes", "liberalises",
- "lionization", "lionisation",
- "liquidizers", "liquidisers",
- "liquidizing", "liquidising",
- "magnetizing", "magnetising",
- "maneuvering", "manoeuvring",
- "marginalize", "marginalise",
- "marvelously", "marvellously",
- "materialize", "materialise",
- "mechanizing", "mechanising",
- "memorialize", "memorialise",
- "mesmerizing", "mesmerising",
- "metabolized", "metabolised",
- "metabolizes", "metabolises",
- "militarized", "militarised",
- "militarizes", "militarises",
- "milliliters", "millilitres",
- "millimeters", "millimetres",
- "miniaturize", "miniaturise",
- "misbehavior", "misbehaviour",
- "misdemeanor", "misdemeanour",
- "modernizing", "modernising",
- "moisturized", "moisturised",
- "moisturizer", "moisturiser",
- "moisturizes", "moisturises",
- "monopolized", "monopolised",
- "monopolizes", "monopolises",
- "nationalize", "nationalise",
- "naturalized", "naturalised",
- "naturalizes", "naturalises",
- "neighboring", "neighbouring",
- "neutralized", "neutralised",
- "neutralizes", "neutralises",
- "normalizing", "normalising",
- "orthopedics", "orthopaedics",
- "ostracizing", "ostracising",
- "outmaneuver", "outmanoeuvre",
- "oxidization", "oxidisation",
- "pasteurized", "pasteurised",
- "pasteurizes", "pasteurises",
- "patronizing", "patronising",
- "personalize", "personalise",
- "plagiarized", "plagiarised",
- "plagiarizes", "plagiarises",
- "politicized", "politicised",
- "politicizes", "politicises",
- "popularized", "popularised",
- "popularizes", "popularises",
- "pressurized", "pressurised",
- "pressurizes", "pressurises",
- "prioritized", "prioritised",
- "prioritizes", "prioritises",
- "privatizing", "privatising",
- "proselytize", "proselytise",
- "publicizing", "publicising",
- "pulverizing", "pulverising",
- "radicalized", "radicalised",
- "radicalizes", "radicalises",
- "randomizing", "randomising",
- "rationalize", "rationalise",
- "realization", "realisation",
- "recognizing", "recognising",
- "reconnoiter", "reconnoitre",
- "regularized", "regularised",
- "regularizes", "regularises",
- "reorganized", "reorganised",
- "reorganizes", "reorganises",
- "revitalized", "revitalised",
- "revitalizes", "revitalises",
- "rhapsodized", "rhapsodised",
- "rhapsodizes", "rhapsodises",
- "romanticize", "romanticise",
- "scandalized", "scandalised",
- "scandalizes", "scandalises",
- "scrutinized", "scrutinised",
- "scrutinizes", "scrutinises",
- "secularized", "secularised",
- "secularizes", "secularises",
- "sensitizing", "sensitising",
- "serializing", "serialising",
- "sermonizing", "sermonising",
- "signalizing", "signalising",
- "skeptically", "sceptically",
- "socializing", "socialising",
- "solemnizing", "solemnising",
- "specialized", "specialised",
- "specializes", "specialises",
- "squirreling", "squirrelling",
- "stabilizers", "stabilisers",
- "stabilizing", "stabilising",
- "standardize", "standardise",
- "sterilizers", "sterilisers",
- "sterilizing", "sterilising",
- "stigmatized", "stigmatised",
- "stigmatizes", "stigmatises",
- "subsidizers", "subsidisers",
- "subsidizing", "subsidising",
- "summarizing", "summarising",
- "symbolizing", "symbolising",
- "sympathized", "sympathised",
- "sympathizer", "sympathiser",
- "sympathizes", "sympathises",
- "synchronize", "synchronise",
- "synthesized", "synthesised",
- "synthesizes", "synthesises",
- "systematize", "systematise",
- "tantalizing", "tantalising",
- "temporizing", "temporising",
- "tenderizing", "tenderising",
- "terrorizing", "terrorising",
- "theatergoer", "theatregoer",
- "traumatized", "traumatised",
- "traumatizes", "traumatises",
- "trivialized", "trivialised",
- "trivializes", "trivialises",
- "tyrannizing", "tyrannising",
- "uncataloged", "uncatalogued",
- "uncivilized", "uncivilised",
- "unfavorable", "unfavourable",
- "unfavorably", "unfavourably",
- "unorganized", "unorganised",
- "untrammeled", "untrammelled",
- "utilization", "utilisation",
- "vandalizing", "vandalising",
- "verbalizing", "verbalising",
- "victimizing", "victimising",
- "visualizing", "visualising",
- "vulgarizing", "vulgarising",
- "watercolors", "watercolours",
- "westernized", "westernised",
- "westernizes", "westernises",
- "amortizing", "amortising",
- "anesthesia", "anaesthesia",
- "anesthetic", "anaesthetic",
- "anglicized", "anglicised",
- "anglicizes", "anglicises",
- "annualized", "annualised",
- "antagonize", "antagonise",
- "apologized", "apologised",
- "apologizes", "apologises",
- "appetizers", "appetisers",
- "appetizing", "appetising",
- "archeology", "archaeology",
- "authorizes", "authorises",
- "bastardize", "bastardise",
- "bedeviling", "bedevilling",
- "behavioral", "behavioural",
- "belaboring", "belabouring",
- "bowdlerize", "bowdlerise",
- "brutalized", "brutalised",
- "brutalizes", "brutalises",
- "canalizing", "canalising",
- "canonizing", "canonising",
- "capitalize", "capitalise",
- "caramelize", "caramelise",
- "carbonized", "carbonised",
- "carbonizes", "carbonises",
- "cataloging", "cataloguing",
- "catalyzing", "catalysing",
- "categorize", "categorise",
- "cauterized", "cauterised",
- "cauterizes", "cauterises",
- "centerfold", "centrefold",
- "centiliter", "centilitre",
- "centimeter", "centimetre",
- "centralize", "centralise",
- "channeling", "channelling",
- "checkbooks", "chequebooks",
- "civilizing", "civilising",
- "colonizers", "colonisers",
- "colonizing", "colonising",
- "colorfully", "colourfully",
- "colorizing", "colourizing",
- "councilors", "councillors",
- "counselors", "counsellors",
- "criticized", "criticised",
- "criticizes", "criticises",
- "customized", "customised",
- "customizes", "customises",
- "dehumanize", "dehumanise",
- "demobilize", "demobilise",
- "demonizing", "demonising",
- "demoralize", "demoralise",
- "deodorized", "deodorised",
- "deodorizes", "deodorises",
- "deputizing", "deputising",
- "digitizing", "digitising",
- "discolored", "discoloured",
- "disheveled", "dishevelled",
- "dishonored", "dishonoured",
- "dramatized", "dramatised",
- "dramatizes", "dramatises",
- "economized", "economised",
- "economizes", "economises",
- "empathized", "empathised",
- "empathizes", "empathises",
- "emphasized", "emphasised",
- "emphasizes", "emphasises",
- "endeavored", "endeavoured",
- "energizing", "energising",
- "epicenters", "epicentres",
- "epitomized", "epitomised",
- "epitomizes", "epitomises",
- "equalizers", "equalisers",
- "equalizing", "equalising",
- "eulogizing", "eulogising",
- "evangelize", "evangelise",
- "factorized", "factorised",
- "factorizes", "factorises",
- "fantasized", "fantasised",
- "fantasizes", "fantasises",
- "favoritism", "favouritism",
- "feminizing", "feminising",
- "fertilized", "fertilised",
- "fertilizer", "fertiliser",
- "fertilizes", "fertilises",
- "fiberglass", "fibreglass",
- "finalizing", "finalising",
- "flavorings", "flavourings",
- "flavorless", "flavourless",
- "flavorsome", "flavoursome",
- "formalized", "formalised",
- "formalizes", "formalises",
- "fossilized", "fossilised",
- "fossilizes", "fossilises",
- "fraternize", "fraternise",
- "galvanized", "galvanised",
- "galvanizes", "galvanises",
- "generalize", "generalise",
- "ghettoized", "ghettoised",
- "ghettoizes", "ghettoises",
- "globalized", "globalised",
- "globalizes", "globalises",
- "gruelingly", "gruellingly",
- "gynecology", "gynaecology",
- "harmonized", "harmonised",
- "harmonizes", "harmonises",
- "hematology", "haematology",
- "hemoglobin", "haemoglobin",
- "hemophilia", "haemophilia",
- "hemorrhage", "haemorrhage",
- "homogenize", "homogenise",
- "humanizing", "humanising",
- "hybridized", "hybridised",
- "hybridizes", "hybridises",
- "hypnotized", "hypnotised",
- "hypnotizes", "hypnotises",
- "idealizing", "idealising",
- "immobilize", "immobilise",
- "immunizing", "immunising",
- "impaneling", "impanelling",
- "imperiling", "imperilling",
- "initialing", "initialling",
- "initialize", "initialise",
- "ionization", "ionisation",
- "italicized", "italicised",
- "italicizes", "italicises",
- "jeopardize", "jeopardise",
- "kilometers", "kilometres",
- "lackluster", "lacklustre",
- "legalizing", "legalising",
- "legitimize", "legitimise",
- "liberalize", "liberalise",
- "liquidized", "liquidised",
- "liquidizer", "liquidiser",
- "liquidizes", "liquidises",
- "localizing", "localising",
- "magnetized", "magnetised",
- "magnetizes", "magnetises",
- "maneuvered", "manoeuvred",
- "marshaling", "marshalling",
- "maximizing", "maximising",
- "mechanized", "mechanised",
- "mechanizes", "mechanises",
- "memorizing", "memorising",
- "mesmerized", "mesmerised",
- "mesmerizes", "mesmerises",
- "metabolize", "metabolise",
- "militarize", "militarise",
- "milliliter", "millilitre",
- "millimeter", "millimetre",
- "minimizing", "minimising",
- "mobilizing", "mobilising",
- "modernized", "modernised",
- "modernizes", "modernises",
- "moisturize", "moisturise",
- "monopolize", "monopolise",
- "moralizing", "moralising",
- "naturalize", "naturalise",
- "neighborly", "neighbourly",
- "neutralize", "neutralise",
- "normalized", "normalised",
- "normalizes", "normalises",
- "optimizing", "optimising",
- "organizers", "organisers",
- "organizing", "organising",
- "orthopedic", "orthopaedic",
- "ostracized", "ostracised",
- "ostracizes", "ostracises",
- "paralyzing", "paralysing",
- "pasteurize", "pasteurise",
- "patronized", "patronised",
- "patronizes", "patronises",
- "pedophiles", "paedophiles",
- "pedophilia", "paedophilia",
- "penalizing", "penalising",
- "plagiarize", "plagiarise",
- "plowshares", "ploughshares",
- "polarizing", "polarising",
- "politicize", "politicise",
- "popularize", "popularise",
- "prioritize", "prioritise",
- "privatized", "privatised",
- "privatizes", "privatises",
- "publicized", "publicised",
- "publicizes", "publicises",
- "pulverized", "pulverised",
- "pulverizes", "pulverises",
- "quarreling", "quarrelling",
- "radicalize", "radicalise",
- "randomized", "randomised",
- "randomizes", "randomises",
- "realizable", "realisable",
- "recognized", "recognised",
- "recognizes", "recognises",
- "regularize", "regularise",
- "remodeling", "remodelling",
- "reorganize", "reorganise",
- "revitalize", "revitalise",
- "rhapsodize", "rhapsodise",
- "ritualized", "ritualised",
- "sanitizing", "sanitising",
- "satirizing", "satirising",
- "scandalize", "scandalise",
- "scrutinize", "scrutinise",
- "secularize", "secularise",
- "sensitized", "sensitised",
- "sensitizes", "sensitises",
- "sepulchers", "sepulchres",
- "serialized", "serialised",
- "serializes", "serialises",
- "sermonized", "sermonised",
- "sermonizes", "sermonises",
- "shriveling", "shrivelling",
- "signalized", "signalised",
- "signalizes", "signalises",
- "skepticism", "scepticism",
- "socialized", "socialised",
- "socializes", "socialises",
- "sodomizing", "sodomising",
- "solemnized", "solemnised",
- "solemnizes", "solemnises",
- "specialize", "specialise",
- "squirreled", "squirrelled",
- "stabilized", "stabilised",
- "stabilizer", "stabiliser",
- "stabilizes", "stabilises",
- "stenciling", "stencilling",
- "sterilized", "sterilised",
- "sterilizer", "steriliser",
- "sterilizes", "sterilises",
- "stigmatize", "stigmatise",
- "subsidized", "subsidised",
- "subsidizer", "subsidiser",
- "subsidizes", "subsidises",
- "summarized", "summarised",
- "summarizes", "summarises",
- "symbolized", "symbolised",
- "symbolizes", "symbolises",
- "sympathize", "sympathise",
- "tantalized", "tantalised",
- "tantalizes", "tantalises",
- "temporized", "temporised",
- "temporizes", "temporises",
- "tenderized", "tenderised",
- "tenderizes", "tenderises",
- "terrorized", "terrorised",
- "terrorizes", "terrorises",
- "theorizing", "theorising",
- "traumatize", "traumatise",
- "trivialize", "trivialise",
- "tyrannized", "tyrannised",
- "tyrannizes", "tyrannises",
- "unionizing", "unionising",
- "unraveling", "unravelling",
- "urbanizing", "urbanising",
- "utilizable", "utilisable",
- "vandalized", "vandalised",
- "vandalizes", "vandalises",
- "vaporizing", "vaporising",
- "verbalized", "verbalised",
- "verbalizes", "verbalises",
- "victimized", "victimised",
- "victimizes", "victimises",
- "visualized", "visualised",
- "visualizes", "visualises",
- "vocalizing", "vocalising",
- "vulcanized", "vulcanised",
- "vulgarized", "vulgarised",
- "vulgarizes", "vulgarises",
- "watercolor", "watercolour",
- "westernize", "westernise",
- "womanizers", "womanisers",
- "womanizing", "womanising",
- "worshiping", "worshipping",
- "agonizing", "agonising",
- "airplanes", "aeroplanes",
- "amortized", "amortised",
- "amortizes", "amortises",
- "analyzing", "analysing",
- "apologize", "apologise",
- "appetizer", "appetiser",
- "artifacts", "artefacts",
- "baptizing", "baptising",
- "bedeviled", "bedevilled",
- "behaviors", "behaviours",
- "bejeweled", "bejewelled",
- "belabored", "belaboured",
- "brutalize", "brutalise",
- "canalized", "canalised",
- "canalizes", "canalises",
- "canonized", "canonised",
- "canonizes", "canonises",
- "carbonize", "carbonise",
- "cataloged", "catalogued",
- "catalyzed", "catalysed",
- "catalyzes", "catalyses",
- "cauterize", "cauterise",
- "channeled", "channelled",
- "checkbook", "chequebook",
- "checkered", "chequered",
- "chiseling", "chiselling",
- "civilized", "civilised",
- "civilizes", "civilises",
- "clamoring", "clamouring",
- "colonized", "colonised",
- "colonizer", "coloniser",
- "colonizes", "colonises",
- "colorants", "colourants",
- "colorized", "colourized",
- "colorizes", "colourizes",
- "colorless", "colourless",
- "councilor", "councillor",
- "counseled", "counselled",
- "counselor", "counsellor",
- "criticize", "criticise",
- "cudgeling", "cudgelling",
- "customize", "customise",
- "demonized", "demonised",
- "demonizes", "demonises",
- "deodorize", "deodorise",
- "deputized", "deputised",
- "deputizes", "deputises",
- "digitized", "digitised",
- "digitizes", "digitises",
- "discolors", "discolours",
- "dishonors", "dishonours",
- "dramatize", "dramatise",
- "driveling", "drivelling",
- "economize", "economise",
- "empathize", "empathise",
- "emphasize", "emphasise",
- "enameling", "enamelling",
- "endeavors", "endeavours",
- "energized", "energised",
- "energizes", "energises",
- "enthralls", "enthrals",
- "epicenter", "epicentre",
- "epitomize", "epitomise",
- "equalized", "equalised",
- "equalizer", "equaliser",
- "equalizes", "equalises",
- "eulogized", "eulogised",
- "eulogizes", "eulogises",
- "factorize", "factorise",
- "fantasize", "fantasise",
- "favorable", "favourable",
- "favorably", "favourably",
- "favorites", "favourites",
- "feminized", "feminised",
- "feminizes", "feminises",
- "fertilize", "fertilise",
- "finalized", "finalised",
- "finalizes", "finalises",
- "flavoring", "flavouring",
- "formalize", "formalise",
- "fossilize", "fossilise",
- "funneling", "funnelling",
- "galvanize", "galvanise",
- "gamboling", "gambolling",
- "ghettoize", "ghettoise",
- "globalize", "globalise",
- "gonorrhea", "gonorrhoea",
- "groveling", "grovelling",
- "harboring", "harbouring",
- "harmonize", "harmonise",
- "honorably", "honourably",
- "humanized", "humanised",
- "humanizes", "humanises",
- "hybridize", "hybridise",
- "hypnotize", "hypnotise",
- "idealized", "idealised",
- "idealizes", "idealises",
- "idolizing", "idolising",
- "immunized", "immunised",
- "immunizes", "immunises",
- "impaneled", "impanelled",
- "imperiled", "imperilled",
- "initialed", "initialled",
- "italicize", "italicise",
- "itemizing", "itemising",
- "kilometer", "kilometre",
- "legalized", "legalised",
- "legalizes", "legalises",
- "lionizing", "lionising",
- "liquidize", "liquidise",
- "localized", "localised",
- "localizes", "localises",
- "magnetize", "magnetise",
- "maneuvers", "manoeuvres",
- "marshaled", "marshalled",
- "marveling", "marvelling",
- "marvelous", "marvellous",
- "maximized", "maximised",
- "maximizes", "maximises",
- "mechanize", "mechanise",
- "memorized", "memorised",
- "memorizes", "memorises",
- "mesmerize", "mesmerise",
- "minimized", "minimised",
- "minimizes", "minimises",
- "mobilized", "mobilised",
- "mobilizes", "mobilises",
- "modernize", "modernise",
- "moldering", "mouldering",
- "moralized", "moralised",
- "moralizes", "moralises",
- "motorized", "motorised",
- "mustached", "moustached",
- "mustaches", "moustaches",
- "neighbors", "neighbours",
- "normalize", "normalise",
- "optimized", "optimised",
- "optimizes", "optimises",
- "organized", "organised",
- "organizer", "organiser",
- "organizes", "organises",
- "ostracize", "ostracise",
- "oxidizing", "oxidising",
- "panelists", "panellists",
- "paralyzed", "paralysed",
- "paralyzes", "paralyses",
- "parceling", "parcelling",
- "patronize", "patronise",
- "pedophile", "paedophile",
- "penalized", "penalised",
- "penalizes", "penalises",
- "penciling", "pencilling",
- "plowshare", "ploughshare",
- "polarized", "polarised",
- "polarizes", "polarises",
- "practiced", "practised",
- "pretenses", "pretences",
- "privatize", "privatise",
- "publicize", "publicise",
- "pulverize", "pulverise",
- "quarreled", "quarrelled",
- "randomize", "randomise",
- "realizing", "realising",
- "recognize", "recognise",
- "refueling", "refuelling",
- "remodeled", "remodelled",
- "remolding", "remoulding",
- "saltpeter", "saltpetre",
- "sanitized", "sanitised",
- "sanitizes", "sanitises",
- "satirized", "satirised",
- "satirizes", "satirises",
- "sensitize", "sensitise",
- "sepulcher", "sepulchre",
- "serialize", "serialise",
- "sermonize", "sermonise",
- "shoveling", "shovelling",
- "shriveled", "shrivelled",
- "signaling", "signalling",
- "signalize", "signalise",
- "skeptical", "sceptical",
- "sniveling", "snivelling",
- "snorkeled", "snorkelled",
- "socialize", "socialise",
- "sodomized", "sodomised",
- "sodomizes", "sodomises",
- "solemnize", "solemnise",
- "spiraling", "spiralling",
- "splendors", "splendours",
- "stabilize", "stabilise",
- "stenciled", "stencilled",
- "sterilize", "sterilise",
- "subsidize", "subsidise",
- "succoring", "succouring",
- "sulfurous", "sulphurous",
- "summarize", "summarise",
- "swiveling", "swivelling",
- "symbolize", "symbolise",
- "tantalize", "tantalise",
- "temporize", "temporise",
- "tenderize", "tenderise",
- "terrorize", "terrorise",
- "theorized", "theorised",
- "theorizes", "theorises",
- "travelers", "travellers",
- "traveling", "travelling",
- "tricolors", "tricolours",
- "tunneling", "tunnelling",
- "tyrannize", "tyrannise",
- "unequaled", "unequalled",
- "unionized", "unionised",
- "unionizes", "unionises",
- "unraveled", "unravelled",
- "unrivaled", "unrivalled",
- "urbanized", "urbanised",
- "urbanizes", "urbanises",
- "utilizing", "utilising",
- "vandalize", "vandalise",
- "vaporized", "vaporised",
- "vaporizes", "vaporises",
- "verbalize", "verbalise",
- "victimize", "victimise",
- "visualize", "visualise",
- "vocalized", "vocalised",
- "vocalizes", "vocalises",
- "vulgarize", "vulgarise",
- "weaseling", "weaselling",
- "womanized", "womanised",
- "womanizer", "womaniser",
- "womanizes", "womanises",
- "worshiped", "worshipped",
- "worshiper", "worshipper",
- "agonized", "agonised",
- "agonizes", "agonises",
- "airplane", "aeroplane",
- "aluminum", "aluminium",
- "amortize", "amortise",
- "analyzed", "analysed",
- "analyzes", "analyses",
- "armorers", "armourers",
- "armories", "armouries",
- "artifact", "artefact",
- "baptized", "baptised",
- "baptizes", "baptises",
- "behavior", "behaviour",
- "behooved", "behoved",
- "behooves", "behoves",
- "belabors", "belabours",
- "calibers", "calibres",
- "canalize", "canalise",
- "canonize", "canonise",
- "catalogs", "catalogues",
- "catalyze", "catalyse",
- "caviling", "cavilling",
- "centered", "centred",
- "chiseled", "chiselled",
- "civilize", "civilise",
- "clamored", "clamoured",
- "colonize", "colonise",
- "colorant", "colourant",
- "coloreds", "coloureds",
- "colorful", "colourful",
- "coloring", "colouring",
- "colorize", "colourize",
- "coziness", "cosiness",
- "cruelest", "cruellest",
- "cudgeled", "cudgelled",
- "defenses", "defences",
- "demeanor", "demeanour",
- "demonize", "demonise",
- "deputize", "deputise",
- "diarrhea", "diarrhoea",
- "digitize", "digitise",
- "disfavor", "disfavour",
- "dishonor", "dishonour",
- "distills", "distils",
- "driveled", "drivelled",
- "enameled", "enamelled",
- "enamored", "enamoured",
- "endeavor", "endeavour",
- "energize", "energise",
- "epaulets", "epaulettes",
- "equalize", "equalise",
- "estrogen", "oestrogen",
- "etiology", "aetiology",
- "eulogize", "eulogise",
- "favoring", "favouring",
- "favorite", "favourite",
- "feminize", "feminise",
- "finalize", "finalise",
- "flavored", "flavoured",
- "flutists", "flautists",
- "fulfills", "fulfils",
- "funneled", "funnelled",
- "gamboled", "gambolled",
- "graveled", "gravelled",
- "groveled", "grovelled",
- "grueling", "gruelling",
- "harbored", "harboured",
- "honoring", "honouring",
- "humanize", "humanise",
- "humoring", "humouring",
- "idealize", "idealise",
- "idolized", "idolised",
- "idolizes", "idolises",
- "immunize", "immunise",
- "ionizing", "ionising",
- "itemized", "itemised",
- "itemizes", "itemises",
- "jewelers", "jewellers",
- "labeling", "labelling",
- "laborers", "labourers",
- "laboring", "labouring",
- "legalize", "legalise",
- "leukemia", "leukaemia",
- "levelers", "levellers",
- "leveling", "levelling",
- "libeling", "libelling",
- "libelous", "libellous",
- "lionized", "lionised",
- "lionizes", "lionises",
- "localize", "localise",
- "louvered", "louvred",
- "maneuver", "manoeuvre",
- "marveled", "marvelled",
- "maximize", "maximise",
- "memorize", "memorise",
- "minimize", "minimise",
- "mobilize", "mobilise",
- "modelers", "modellers",
- "modeling", "modelling",
- "moldered", "mouldered",
- "moldiest", "mouldiest",
- "moldings", "mouldings",
- "moralize", "moralise",
- "mustache", "moustache",
- "neighbor", "neighbour",
- "odorless", "odourless",
- "offenses", "offences",
- "optimize", "optimise",
- "organize", "organise",
- "oxidized", "oxidised",
- "oxidizes", "oxidises",
- "paneling", "panelling",
- "panelist", "panellist",
- "paralyze", "paralyse",
- "parceled", "parcelled",
- "pedaling", "pedalling",
- "penalize", "penalise",
- "penciled", "pencilled",
- "polarize", "polarise",
- "pretense", "pretence",
- "pummeled", "pummelling",
- "raveling", "ravelling",
- "realized", "realised",
- "realizes", "realises",
- "refueled", "refuelled",
- "remolded", "remoulded",
- "revelers", "revellers",
- "reveling", "revelling",
- "rivaling", "rivalling",
- "sanitize", "sanitise",
- "satirize", "satirise",
- "savories", "savouries",
- "savoring", "savouring",
- "scepters", "sceptres",
- "shoveled", "shovelled",
- "signaled", "signalled",
- "skeptics", "sceptics",
- "sniveled", "snivelled",
- "sodomize", "sodomise",
- "specters", "spectres",
- "spiraled", "spiralled",
- "splendor", "splendour",
- "succored", "succoured",
- "sulfates", "sulphates",
- "sulfides", "sulphides",
- "swiveled", "swivelled",
- "tasseled", "tasselled",
- "theaters", "theatres",
- "theorize", "theorise",
- "toweling", "towelling",
- "traveler", "traveller",
- "trialing", "trialling",
- "tricolor", "tricolour",
- "tunneled", "tunnelled",
- "unionize", "unionise",
- "unsavory", "unsavoury",
- "urbanize", "urbanise",
- "utilized", "utilised",
- "utilizes", "utilises",
- "vaporize", "vaporise",
- "vocalize", "vocalise",
- "weaseled", "weaselled",
- "womanize", "womanise",
- "yodeling", "yodelling",
- "agonize", "agonise",
- "analyze", "analyse",
- "appalls", "appals",
- "armored", "armoured",
- "armorer", "armourer",
- "baptize", "baptise",
- "behoove", "behove",
- "belabor", "belabour",
- "beveled", "bevelled",
- "caliber", "calibre",
- "caroled", "carolled",
- "caviled", "cavilled",
- "centers", "centres",
- "clamors", "clamours",
- "clangor", "clangour",
- "colored", "coloured",
- "coziest", "cosiest",
- "crueler", "crueller",
- "defense", "defence",
- "dialing", "dialling",
- "dialogs", "dialogues",
- "distill", "distil",
- "dueling", "duelling",
- "enrolls", "enrols",
- "epaulet", "epaulette",
- "favored", "favoured",
- "flavors", "flavours",
- "flutist", "flautist",
- "fueling", "fuelling",
- "fulfill", "fulfil",
- "goiters", "goitres",
- "harbors", "harbours",
- "honored", "honoured",
- "humored", "humoured",
- "idolize", "idolise",
- "ionized", "ionised",
- "ionizes", "ionises",
- "itemize", "itemise",
- "jeweled", "jewelled",
- "jeweler", "jeweller",
- "jewelry", "jewellery",
- "labeled", "labelled",
- "labored", "laboured",
- "laborer", "labourer",
- "leveled", "levelled",
- "leveler", "leveller",
- "libeled", "libelled",
- "lionize", "lionise",
- "louvers", "louvres",
- "modeled", "modelled",
- "modeler", "modeller",
- "molders", "moulders",
- "moldier", "mouldier",
- "molding", "moulding",
- "molting", "moulting",
- "offense", "offence",
- "oxidize", "oxidise",
- "pajamas", "pyjamas",
- "paneled", "panelled",
- "parlors", "parlours",
- "pedaled", "pedalled",
- "plowing", "ploughing",
- "plowman", "ploughman",
- "plowmen", "ploughmen",
- "realize", "realise",
- "remolds", "remoulds",
- "reveled", "revelled",
- "reveler", "reveller",
- "rivaled", "rivalled",
- "rumored", "rumoured",
- "saviors", "saviours",
- "savored", "savoured",
- "scepter", "sceptre",
- "skeptic", "sceptic",
- "specter", "spectre",
- "succors", "succours",
- "sulfate", "sulphate",
- "sulfide", "sulphide",
- "theater", "theatre",
- "toweled", "towelled",
- "toxemia", "toxaemia",
- "trialed", "trialled",
- "utilize", "utilise",
- "yodeled", "yodelled",
- "anemia", "anaemia",
- "anemic", "anaemic",
- "appall", "appal",
- "arbors", "arbours",
- "armory", "armoury",
- "candor", "candour",
- "center", "centre",
- "clamor", "clamour",
- "colors", "colours",
- "cozier", "cosier",
- "cozies", "cosies",
- "cozily", "cosily",
- "dialed", "dialled",
- "drafty", "draughty",
- "dueled", "duelled",
- "favors", "favours",
- "fervor", "fervour",
- "fibers", "fibres",
- "flavor", "flavour",
- "fueled", "fuelled",
- "goiter", "goitre",
- "harbor", "harbour",
- "honors", "honours",
- "humors", "humours",
- "labors", "labours",
- "liters", "litres",
- "louver", "louvre",
- "luster", "lustre",
- "meager", "meagre",
- "miters", "mitres",
- "molded", "moulded",
- "molder", "moulder",
- "molted", "moulted",
- "pajama", "pyjama",
- "parlor", "parlour",
- "plowed", "ploughed",
- "rancor", "rancour",
- "remold", "remould",
- "rigors", "rigours",
- "rumors", "rumours",
- "savors", "savours",
- "savory", "savoury",
- "succor", "succour",
- "tumors", "tumours",
- "vapors", "vapours",
- "aging", "ageing",
- "arbor", "arbour",
- "ardor", "ardour",
- "armor", "armour",
- "chili", "chilli",
- "color", "colour",
- "edema", "edoema",
- "favor", "favour",
- "fecal", "faecal",
- "feces", "faeces",
- "fiber", "fibre",
- "honor", "honour",
- "humor", "humour",
- "labor", "labour",
- "liter", "litre",
- "miter", "mitre",
- "molds", "moulds",
- "moldy", "mouldy",
- "molts", "moults",
- "odors", "odours",
- "plows", "ploughs",
- "rigor", "rigour",
- "rumor", "rumour",
- "savor", "savour",
- "valor", "valour",
- "vapor", "vapour",
- "vigor", "vigour",
- "cozy", "cosy",
- "mold", "mould",
- "molt", "moult",
- "odor", "odour",
- "plow", "plough",
-}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md b/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
deleted file mode 100644
index 1cade6cef..000000000
--- a/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Brian Goff
-
-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/cpuguy83/go-md2man/v2/md2man/md2man.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
deleted file mode 100644
index b48005673..000000000
--- a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package md2man
-
-import (
- "github.com/russross/blackfriday/v2"
-)
-
-// Render converts a markdown document into a roff formatted document.
-func Render(doc []byte) []byte {
- renderer := NewRoffRenderer()
-
- return blackfriday.Run(doc,
- []blackfriday.Option{blackfriday.WithRenderer(renderer),
- blackfriday.WithExtensions(renderer.GetExtensions())}...)
-}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
deleted file mode 100644
index 0668a66cf..000000000
--- a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
+++ /dev/null
@@ -1,345 +0,0 @@
-package md2man
-
-import (
- "fmt"
- "io"
- "os"
- "strings"
-
- "github.com/russross/blackfriday/v2"
-)
-
-// roffRenderer implements the blackfriday.Renderer interface for creating
-// roff format (manpages) from markdown text
-type roffRenderer struct {
- extensions blackfriday.Extensions
- listCounters []int
- firstHeader bool
- defineTerm bool
- listDepth int
-}
-
-const (
- titleHeader = ".TH "
- topLevelHeader = "\n\n.SH "
- secondLevelHdr = "\n.SH "
- otherHeader = "\n.SS "
- crTag = "\n"
- emphTag = "\\fI"
- emphCloseTag = "\\fP"
- strongTag = "\\fB"
- strongCloseTag = "\\fP"
- breakTag = "\n.br\n"
- paraTag = "\n.PP\n"
- hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n"
- linkTag = "\n\\[la]"
- linkCloseTag = "\\[ra]"
- codespanTag = "\\fB\\fC"
- codespanCloseTag = "\\fR"
- codeTag = "\n.PP\n.RS\n\n.nf\n"
- codeCloseTag = "\n.fi\n.RE\n"
- quoteTag = "\n.PP\n.RS\n"
- quoteCloseTag = "\n.RE\n"
- listTag = "\n.RS\n"
- listCloseTag = "\n.RE\n"
- arglistTag = "\n.TP\n"
- tableStart = "\n.TS\nallbox;\n"
- tableEnd = ".TE\n"
- tableCellStart = "T{\n"
- tableCellEnd = "\nT}\n"
-)
-
-// NewRoffRenderer creates a new blackfriday Renderer for generating roff documents
-// from markdown
-func NewRoffRenderer() *roffRenderer { // nolint: golint
- var extensions blackfriday.Extensions
-
- extensions |= blackfriday.NoIntraEmphasis
- extensions |= blackfriday.Tables
- extensions |= blackfriday.FencedCode
- extensions |= blackfriday.SpaceHeadings
- extensions |= blackfriday.Footnotes
- extensions |= blackfriday.Titleblock
- extensions |= blackfriday.DefinitionLists
- return &roffRenderer{
- extensions: extensions,
- }
-}
-
-// GetExtensions returns the list of extensions used by this renderer implementation
-func (r *roffRenderer) GetExtensions() blackfriday.Extensions {
- return r.extensions
-}
-
-// RenderHeader handles outputting the header at document start
-func (r *roffRenderer) RenderHeader(w io.Writer, ast *blackfriday.Node) {
- // disable hyphenation
- out(w, ".nh\n")
-}
-
-// RenderFooter handles outputting the footer at the document end; the roff
-// renderer has no footer information
-func (r *roffRenderer) RenderFooter(w io.Writer, ast *blackfriday.Node) {
-}
-
-// RenderNode is called for each node in a markdown document; based on the node
-// type the equivalent roff output is sent to the writer
-func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
-
- var walkAction = blackfriday.GoToNext
-
- switch node.Type {
- case blackfriday.Text:
- r.handleText(w, node, entering)
- case blackfriday.Softbreak:
- out(w, crTag)
- case blackfriday.Hardbreak:
- out(w, breakTag)
- case blackfriday.Emph:
- if entering {
- out(w, emphTag)
- } else {
- out(w, emphCloseTag)
- }
- case blackfriday.Strong:
- if entering {
- out(w, strongTag)
- } else {
- out(w, strongCloseTag)
- }
- case blackfriday.Link:
- if !entering {
- out(w, linkTag+string(node.LinkData.Destination)+linkCloseTag)
- }
- case blackfriday.Image:
- // ignore images
- walkAction = blackfriday.SkipChildren
- case blackfriday.Code:
- out(w, codespanTag)
- escapeSpecialChars(w, node.Literal)
- out(w, codespanCloseTag)
- case blackfriday.Document:
- break
- case blackfriday.Paragraph:
- // roff .PP markers break lists
- if r.listDepth > 0 {
- return blackfriday.GoToNext
- }
- if entering {
- out(w, paraTag)
- } else {
- out(w, crTag)
- }
- case blackfriday.BlockQuote:
- if entering {
- out(w, quoteTag)
- } else {
- out(w, quoteCloseTag)
- }
- case blackfriday.Heading:
- r.handleHeading(w, node, entering)
- case blackfriday.HorizontalRule:
- out(w, hruleTag)
- case blackfriday.List:
- r.handleList(w, node, entering)
- case blackfriday.Item:
- r.handleItem(w, node, entering)
- case blackfriday.CodeBlock:
- out(w, codeTag)
- escapeSpecialChars(w, node.Literal)
- out(w, codeCloseTag)
- case blackfriday.Table:
- r.handleTable(w, node, entering)
- case blackfriday.TableCell:
- r.handleTableCell(w, node, entering)
- case blackfriday.TableHead:
- case blackfriday.TableBody:
- case blackfriday.TableRow:
- // no action as cell entries do all the nroff formatting
- return blackfriday.GoToNext
- default:
- fmt.Fprintln(os.Stderr, "WARNING: go-md2man does not handle node type "+node.Type.String())
- }
- return walkAction
-}
-
-func (r *roffRenderer) handleText(w io.Writer, node *blackfriday.Node, entering bool) {
- var (
- start, end string
- )
- // handle special roff table cell text encapsulation
- if node.Parent.Type == blackfriday.TableCell {
- if len(node.Literal) > 30 {
- start = tableCellStart
- end = tableCellEnd
- } else {
- // end rows that aren't terminated by "tableCellEnd" with a cr if end of row
- if node.Parent.Next == nil && !node.Parent.IsHeader {
- end = crTag
- }
- }
- }
- out(w, start)
- escapeSpecialChars(w, node.Literal)
- out(w, end)
-}
-
-func (r *roffRenderer) handleHeading(w io.Writer, node *blackfriday.Node, entering bool) {
- if entering {
- switch node.Level {
- case 1:
- if !r.firstHeader {
- out(w, titleHeader)
- r.firstHeader = true
- break
- }
- out(w, topLevelHeader)
- case 2:
- out(w, secondLevelHdr)
- default:
- out(w, otherHeader)
- }
- }
-}
-
-func (r *roffRenderer) handleList(w io.Writer, node *blackfriday.Node, entering bool) {
- openTag := listTag
- closeTag := listCloseTag
- if node.ListFlags&blackfriday.ListTypeDefinition != 0 {
- // tags for definition lists handled within Item node
- openTag = ""
- closeTag = ""
- }
- if entering {
- r.listDepth++
- if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
- r.listCounters = append(r.listCounters, 1)
- }
- out(w, openTag)
- } else {
- if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
- r.listCounters = r.listCounters[:len(r.listCounters)-1]
- }
- out(w, closeTag)
- r.listDepth--
- }
-}
-
-func (r *roffRenderer) handleItem(w io.Writer, node *blackfriday.Node, entering bool) {
- if entering {
- if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
- out(w, fmt.Sprintf(".IP \"%3d.\" 5\n", r.listCounters[len(r.listCounters)-1]))
- r.listCounters[len(r.listCounters)-1]++
- } else if node.ListFlags&blackfriday.ListTypeDefinition != 0 {
- // state machine for handling terms and following definitions
- // since blackfriday does not distinguish them properly, nor
- // does it seperate them into separate lists as it should
- if !r.defineTerm {
- out(w, arglistTag)
- r.defineTerm = true
- } else {
- r.defineTerm = false
- }
- } else {
- out(w, ".IP \\(bu 2\n")
- }
- } else {
- out(w, "\n")
- }
-}
-
-func (r *roffRenderer) handleTable(w io.Writer, node *blackfriday.Node, entering bool) {
- if entering {
- out(w, tableStart)
- //call walker to count cells (and rows?) so format section can be produced
- columns := countColumns(node)
- out(w, strings.Repeat("l ", columns)+"\n")
- out(w, strings.Repeat("l ", columns)+".\n")
- } else {
- out(w, tableEnd)
- }
-}
-
-func (r *roffRenderer) handleTableCell(w io.Writer, node *blackfriday.Node, entering bool) {
- var (
- start, end string
- )
- if node.IsHeader {
- start = codespanTag
- end = codespanCloseTag
- }
- if entering {
- if node.Prev != nil && node.Prev.Type == blackfriday.TableCell {
- out(w, "\t"+start)
- } else {
- out(w, start)
- }
- } else {
- // need to carriage return if we are at the end of the header row
- if node.IsHeader && node.Next == nil {
- end = end + crTag
- }
- out(w, end)
- }
-}
-
-// because roff format requires knowing the column count before outputting any table
-// data we need to walk a table tree and count the columns
-func countColumns(node *blackfriday.Node) int {
- var columns int
-
- node.Walk(func(node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
- switch node.Type {
- case blackfriday.TableRow:
- if !entering {
- return blackfriday.Terminate
- }
- case blackfriday.TableCell:
- if entering {
- columns++
- }
- default:
- }
- return blackfriday.GoToNext
- })
- return columns
-}
-
-func out(w io.Writer, output string) {
- io.WriteString(w, output) // nolint: errcheck
-}
-
-func needsBackslash(c byte) bool {
- for _, r := range []byte("-_&\\~") {
- if c == r {
- return true
- }
- }
- return false
-}
-
-func escapeSpecialChars(w io.Writer, text []byte) {
- for i := 0; i < len(text); i++ {
- // escape initial apostrophe or period
- if len(text) >= 1 && (text[0] == '\'' || text[0] == '.') {
- out(w, "\\&")
- }
-
- // directly copy normal characters
- org := i
-
- for i < len(text) && !needsBackslash(text[i]) {
- i++
- }
- if i > org {
- w.Write(text[org:i]) // nolint: errcheck
- }
-
- // escape a character
- if i >= len(text) {
- break
- }
-
- w.Write([]byte{'\\', text[i]}) // nolint: errcheck
- }
-}
diff --git a/vendor/github.com/cweill/gotests/.gitignore b/vendor/github.com/cweill/gotests/.gitignore
deleted file mode 100644
index 496ee2ca6..000000000
--- a/vendor/github.com/cweill/gotests/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.DS_Store
\ No newline at end of file
diff --git a/vendor/github.com/cweill/gotests/.travis.yml b/vendor/github.com/cweill/gotests/.travis.yml
deleted file mode 100644
index bd55fa2a6..000000000
--- a/vendor/github.com/cweill/gotests/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-sudo: required
-language: go
-go:
- - 1.9.x
- - 1.10.x
- - 1.11.x
- - 1.12.x
-before_install:
- - go get github.com/mattn/goveralls
- - if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
-script:
- - go test ./...
- - go test -c -covermode=count -coverpkg=github.com/cweill/gotests,github.com/cweill/gotests/internal/input,github.com/cweill/gotests/internal/render,github.com/cweill/gotests/internal/goparser,github.com/cweill/gotests/internal/output,github.com/cweill/gotests/internal/models
- - ./gotests.test -test.coverprofile coverage.cov
- - $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=coverage.cov
diff --git a/vendor/github.com/cweill/gotests/CONTRIBUTING.md b/vendor/github.com/cweill/gotests/CONTRIBUTING.md
deleted file mode 100644
index df2ceb7ef..000000000
--- a/vendor/github.com/cweill/gotests/CONTRIBUTING.md
+++ /dev/null
@@ -1,24 +0,0 @@
-Want to contribute? Great! First, read this page (including the small print at the end).
-
-### Before you contribute ###
-Before we can use your code, you must sign the
-[Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual?csw=1)
-(CLA), which you can do online. The CLA is necessary mainly because you own the
-copyright to your changes, even after your contribution becomes part of our
-codebase, so we need your permission to use and distribute your code. We also
-need to be sure of various other things—for instance that you'll tell us if you
-know that your code infringes on other people's patents. You don't have to sign
-the CLA until after you've submitted your code for review and a member has
-approved it, but you must do it before we can put your code into our codebase.
-Before you start working on a larger contribution, you should get in touch with
-us first through the issue tracker with your idea so that we can help out and
-possibly guide you. Coordinating up front makes it much easier to avoid
-frustration later on.
-
-### Code reviews ###
-All submissions, including submissions by project members, require review. We
-use Github pull requests for this purpose.
-
-### The small print ###
-Contributions made by corporations are covered by a different agreement than
-the one above, the Software Grant and Corporate Contributor License Agreement.
diff --git a/vendor/github.com/cweill/gotests/LICENSE b/vendor/github.com/cweill/gotests/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/github.com/cweill/gotests/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/cweill/gotests/README.md b/vendor/github.com/cweill/gotests/README.md
deleted file mode 100644
index f4216ba17..000000000
--- a/vendor/github.com/cweill/gotests/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# gotests [](https://github.com/cweill/gotests/blob/master/LICENSE) [](https://godoc.org/github.com/cweill/gotests) [](https://travis-ci.org/cweill/gotests) [](https://coveralls.io/github/cweill/gotests?branch=master) [](https://codebeat.co/projects/github-com-cweill-gotests) [](https://goreportcard.com/report/github.com/cweill/gotests)
-
-`gotests` makes writing Go tests easy. It's a Golang commandline tool that generates [table driven tests](https://github.com/golang/go/wiki/TableDrivenTests) based on its target source files' function and method signatures. Any new dependencies in the test files are automatically imported.
-
-## Demo
-
-The following shows `gotests` in action using the [official Sublime Text 3 plugin](https://github.com/cweill/GoTests-Sublime). Plugins also exist for [Emacs](https://github.com/damienlevin/GoTests-Emacs), also [Emacs](https://github.com/s-kostyaev/go-gen-test), [Vim](https://github.com/buoto/gotests-vim), [Atom Editor](https://atom.io/packages/gotests), [Visual Studio Code](https://github.com/Microsoft/vscode-go), and [IntelliJ Goland](https://www.jetbrains.com/help/go/run-debug-configuration-for-go-test.html).
-
-
-
-## Installation
-
-__Minimum Go version:__ Go 1.6
-
-Use [`go get`](https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies) to install and update:
-
-```sh
-$ go get -u github.com/cweill/gotests/...
-```
-
-## Usage
-
-From the commandline, `gotests` can generate Go tests for specific source files or an entire directory. By default, it prints its output to `stdout`.
-
-```sh
-$ gotests [options] PATH ...
-```
-
-Available options:
-
-```
- -all generate go tests for all functions and methods
-
- -excl regexp. generate go tests for functions and methods that don't
- match. Takes precedence over -only, -exported, and -all
-
- -exported generate go tests for exported functions and methods. Takes
- precedence over -only and -all
-
- -i print test inputs in error messages
-
- -only regexp. generate go tests for functions and methods that match only.
- Takes precedence over -all
-
- -w write output to (test) files instead of stdout
-
- -nosubtests disable subtest generation. Only available for Go 1.7+
-
- -template_dir optional. Path to a directory containing custom test code templates
-```
-
-## Contributions
-
-Contributing guidelines are in [CONTRIBUTING.md](CONTRIBUTING.md).
-
-## License
-
-`gotests` is released under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).
diff --git a/vendor/github.com/cweill/gotests/gotests.go b/vendor/github.com/cweill/gotests/gotests.go
deleted file mode 100644
index 9a9b0046a..000000000
--- a/vendor/github.com/cweill/gotests/gotests.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// Package gotests contains the core logic for generating table-driven tests.
-package gotests
-
-import (
- "fmt"
- "go/importer"
- "go/types"
- "path"
- "regexp"
- "sort"
- "sync"
-
- "github.com/cweill/gotests/internal/goparser"
- "github.com/cweill/gotests/internal/input"
- "github.com/cweill/gotests/internal/models"
- "github.com/cweill/gotests/internal/output"
-)
-
-// Options provides custom filters and parameters for generating tests.
-type Options struct {
- Only *regexp.Regexp // Includes only functions that match.
- Exclude *regexp.Regexp // Excludes functions that match.
- Exported bool // Include only exported methods
- PrintInputs bool // Print function parameters in error messages
- Subtests bool // Print tests using Go 1.7 subtests
- Importer func() types.Importer // A custom importer.
- TemplateDir string // Path to custom template set
-}
-
-// A GeneratedTest contains information about a test file with generated tests.
-type GeneratedTest struct {
- Path string // The test file's absolute path.
- Functions []*models.Function // The functions with new test methods.
- Output []byte // The contents of the test file.
-}
-
-// GenerateTests generates table-driven tests for the function and method
-// signatures defined in the target source path file(s). The source path
-// parameter can be either a Go source file or directory containing Go files.
-func GenerateTests(srcPath string, opt *Options) ([]*GeneratedTest, error) {
- if opt == nil {
- opt = &Options{}
- }
- srcFiles, err := input.Files(srcPath)
- if err != nil {
- return nil, fmt.Errorf("input.Files: %v", err)
- }
- files, err := input.Files(path.Dir(srcPath))
- if err != nil {
- return nil, fmt.Errorf("input.Files: %v", err)
- }
- if opt.Importer == nil || opt.Importer() == nil {
- opt.Importer = importer.Default
- }
- return parallelize(srcFiles, files, opt)
-}
-
-// result stores a generateTest result.
-type result struct {
- gt *GeneratedTest
- err error
-}
-
-// parallelize generates tests for the given source files concurrently.
-func parallelize(srcFiles, files []models.Path, opt *Options) ([]*GeneratedTest, error) {
- var wg sync.WaitGroup
- rs := make(chan *result, len(srcFiles))
- for _, src := range srcFiles {
- wg.Add(1)
- // Worker
- go func(src models.Path) {
- defer wg.Done()
- r := &result{}
- r.gt, r.err = generateTest(src, files, opt)
- rs <- r
- }(src)
- }
- // Closer.
- go func() {
- wg.Wait()
- close(rs)
- }()
- return readResults(rs)
-}
-
-// readResults reads the result channel.
-func readResults(rs <-chan *result) ([]*GeneratedTest, error) {
- var gts []*GeneratedTest
- for r := range rs {
- if r.err != nil {
- return nil, r.err
- }
- if r.gt != nil {
- gts = append(gts, r.gt)
- }
- }
- return gts, nil
-}
-
-func generateTest(src models.Path, files []models.Path, opt *Options) (*GeneratedTest, error) {
- p := &goparser.Parser{Importer: opt.Importer()}
- sr, err := p.Parse(string(src), files)
- if err != nil {
- return nil, fmt.Errorf("Parser.Parse source file: %v", err)
- }
- h := sr.Header
- h.Code = nil // Code is only needed from parsed test files.
- testPath := models.Path(src).TestPath()
- h, tf, err := parseTestFile(p, testPath, h)
- if err != nil {
- return nil, err
- }
- funcs := testableFuncs(sr.Funcs, opt.Only, opt.Exclude, opt.Exported, tf)
- if len(funcs) == 0 {
- return nil, nil
- }
- b, err := output.Process(h, funcs, &output.Options{
- PrintInputs: opt.PrintInputs,
- Subtests: opt.Subtests,
- TemplateDir: opt.TemplateDir,
- })
- if err != nil {
- return nil, fmt.Errorf("output.Process: %v", err)
- }
- return &GeneratedTest{
- Path: testPath,
- Functions: funcs,
- Output: b,
- }, nil
-}
-
-func parseTestFile(p *goparser.Parser, testPath string, h *models.Header) (*models.Header, []string, error) {
- if !output.IsFileExist(testPath) {
- return h, nil, nil
- }
- tr, err := p.Parse(testPath, nil)
- if err != nil {
- if err == goparser.ErrEmptyFile {
- // Overwrite empty test files.
- return h, nil, nil
- }
- return nil, nil, fmt.Errorf("Parser.Parse test file: %v", err)
- }
- var testFuncs []string
- for _, fun := range tr.Funcs {
- testFuncs = append(testFuncs, fun.Name)
- }
- tr.Header.Imports = append(tr.Header.Imports, h.Imports...)
- h = tr.Header
- return h, testFuncs, nil
-}
-
-func testableFuncs(funcs []*models.Function, only, excl *regexp.Regexp, exp bool, testFuncs []string) []*models.Function {
- sort.Strings(testFuncs)
- var fs []*models.Function
- for _, f := range funcs {
- if isTestFunction(f, testFuncs) || isExcluded(f, excl) || isUnexported(f, exp) || !isIncluded(f, only) || isInvalid(f) {
- continue
- }
- fs = append(fs, f)
- }
- return fs
-}
-
-func isInvalid(f *models.Function) bool {
- if f.Name == "init" && f.IsNaked() {
- return true
- }
- return false
-}
-
-func isTestFunction(f *models.Function, testFuncs []string) bool {
- return len(testFuncs) > 0 && contains(testFuncs, f.TestName())
-}
-
-func isExcluded(f *models.Function, excl *regexp.Regexp) bool {
- return excl != nil && (excl.MatchString(f.Name) || excl.MatchString(f.FullName()))
-}
-
-func isUnexported(f *models.Function, exp bool) bool {
- return exp && !f.IsExported
-}
-
-func isIncluded(f *models.Function, only *regexp.Regexp) bool {
- return only == nil || only.MatchString(f.Name) || only.MatchString(f.FullName())
-}
-
-func contains(ss []string, s string) bool {
- if i := sort.SearchStrings(ss, s); i < len(ss) && ss[i] == s {
- return true
- }
- return false
-}
diff --git a/vendor/github.com/cweill/gotests/internal/goparser/goparser.go b/vendor/github.com/cweill/gotests/internal/goparser/goparser.go
deleted file mode 100644
index f4b35c247..000000000
--- a/vendor/github.com/cweill/gotests/internal/goparser/goparser.go
+++ /dev/null
@@ -1,313 +0,0 @@
-// Package goparse contains logic for parsing Go files. Specifically it parses
-// source and test files into domain models for generating tests.
-package goparser
-
-import (
- "errors"
- "fmt"
- "go/ast"
- "go/parser"
- "go/token"
- "go/types"
- "io/ioutil"
-
- "strings"
-
- "github.com/cweill/gotests/internal/models"
-)
-
-// ErrEmptyFile represents an empty file error.
-var ErrEmptyFile = errors.New("file is empty")
-
-// Result representats a parsed Go file.
-type Result struct {
- // The package name and imports of a Go file.
- Header *models.Header
- // All the functions and methods in a Go file.
- Funcs []*models.Function
-}
-
-// Parser can parse Go files.
-type Parser struct {
- // The importer to resolve packages from import paths.
- Importer types.Importer
-}
-
-// Parse parses a given Go file at srcPath, along any files that share the same
-// package, into a domain model for generating tests.
-func (p *Parser) Parse(srcPath string, files []models.Path) (*Result, error) {
- b, err := p.readFile(srcPath)
- if err != nil {
- return nil, err
- }
- fset := token.NewFileSet()
- f, err := p.parseFile(fset, srcPath)
- if err != nil {
- return nil, err
- }
- fs, err := p.parseFiles(fset, f, files)
- if err != nil {
- return nil, err
- }
- return &Result{
- Header: &models.Header{
- Comments: parsePkgComment(f, f.Package),
- Package: f.Name.String(),
- Imports: parseImports(f.Imports),
- Code: goCode(b, f),
- },
- Funcs: p.parseFunctions(fset, f, fs),
- }, nil
-}
-
-func (p *Parser) readFile(srcPath string) ([]byte, error) {
- b, err := ioutil.ReadFile(srcPath)
- if err != nil {
- return nil, fmt.Errorf("ioutil.ReadFile: %v", err)
- }
- if len(b) == 0 {
- return nil, ErrEmptyFile
- }
- return b, nil
-}
-
-func (p *Parser) parseFile(fset *token.FileSet, srcPath string) (*ast.File, error) {
- f, err := parser.ParseFile(fset, srcPath, nil, parser.ParseComments)
- if err != nil {
- return nil, fmt.Errorf("target parser.ParseFile(): %v", err)
- }
- return f, nil
-}
-
-func (p *Parser) parseFiles(fset *token.FileSet, f *ast.File, files []models.Path) ([]*ast.File, error) {
- pkg := f.Name.String()
- var fs []*ast.File
- for _, file := range files {
- ff, err := parser.ParseFile(fset, string(file), nil, 0)
- if err != nil {
- return nil, fmt.Errorf("other file parser.ParseFile: %v", err)
- }
- if name := ff.Name.String(); name != pkg {
- continue
- }
- fs = append(fs, ff)
- }
- return fs, nil
-}
-
-func (p *Parser) parseFunctions(fset *token.FileSet, f *ast.File, fs []*ast.File) []*models.Function {
- ul, el := p.parseTypes(fset, fs)
- var funcs []*models.Function
- for _, d := range f.Decls {
- fDecl, ok := d.(*ast.FuncDecl)
- if !ok {
- continue
- }
- funcs = append(funcs, parseFunc(fDecl, ul, el))
- }
- return funcs
-}
-
-func (p *Parser) parseTypes(fset *token.FileSet, fs []*ast.File) (map[string]types.Type, map[*types.Struct]ast.Expr) {
- conf := &types.Config{
- Importer: p.Importer,
- // Adding a NO-OP error function ignores errors and performs best-effort
- // type checking. https://godoc.org/golang.org/x/tools/go/types#Config
- Error: func(error) {},
- }
- ti := &types.Info{
- Types: make(map[ast.Expr]types.TypeAndValue),
- }
- // Note: conf.Check can fail, but since Info is not required data, it's ok.
- conf.Check("", fset, fs, ti)
- ul := make(map[string]types.Type)
- el := make(map[*types.Struct]ast.Expr)
- for e, t := range ti.Types {
- // Collect the underlying types.
- ul[t.Type.String()] = t.Type.Underlying()
- // Collect structs to determine the fields of a receiver.
- if v, ok := t.Type.(*types.Struct); ok {
- el[v] = e
- }
- }
- return ul, el
-}
-
-func parsePkgComment(f *ast.File, pkgPos token.Pos) []string {
- var comments []string
- var count int
-
- for _, comment := range f.Comments {
-
- if comment.End() >= pkgPos {
- break
- }
- for _, c := range comment.List {
- count += len(c.Text) + 1 // +1 for '\n'
- if count < int(c.End()) {
- n := int(c.End()) - count - 1
- comments = append(comments, strings.Repeat("\n", n))
- count++ // for last of '\n'
- }
- comments = append(comments, c.Text)
- }
- }
-
- if int(pkgPos)-count > 1 {
- comments = append(comments, strings.Repeat("\n", int(pkgPos)-count-2))
- }
- return comments
-}
-
-// Returns the Go code below the imports block.
-func goCode(b []byte, f *ast.File) []byte {
- furthestPos := f.Name.End()
- for _, node := range f.Imports {
- if pos := node.End(); pos > furthestPos {
- furthestPos = pos
- }
- }
- if furthestPos < token.Pos(len(b)) {
- furthestPos++
-
- // Avoid wrong output on windows-encoded files
- if b[furthestPos-2] == '\r' && b[furthestPos-1] == '\n' && furthestPos < token.Pos(len(b)) {
- furthestPos++
- }
- }
- return b[furthestPos:]
-}
-
-func parseFunc(fDecl *ast.FuncDecl, ul map[string]types.Type, el map[*types.Struct]ast.Expr) *models.Function {
- f := &models.Function{
- Name: fDecl.Name.String(),
- IsExported: fDecl.Name.IsExported(),
- Receiver: parseReceiver(fDecl.Recv, ul, el),
- Parameters: parseFieldList(fDecl.Type.Params, ul),
- }
- fs := parseFieldList(fDecl.Type.Results, ul)
- i := 0
- for _, fi := range fs {
- if fi.Type.String() == "error" {
- f.ReturnsError = true
- continue
- }
- fi.Index = i
- f.Results = append(f.Results, fi)
- i++
- }
- return f
-}
-
-func parseImports(imps []*ast.ImportSpec) []*models.Import {
- var is []*models.Import
- for _, imp := range imps {
- var n string
- if imp.Name != nil {
- n = imp.Name.String()
- }
- is = append(is, &models.Import{
- Name: n,
- Path: imp.Path.Value,
- })
- }
- return is
-}
-
-func parseReceiver(fl *ast.FieldList, ul map[string]types.Type, el map[*types.Struct]ast.Expr) *models.Receiver {
- if fl == nil {
- return nil
- }
- r := &models.Receiver{
- Field: parseFieldList(fl, ul)[0],
- }
- t, ok := ul[r.Type.Value]
- if !ok {
- return r
- }
- s, ok := t.(*types.Struct)
- if !ok {
- return r
- }
- st, found := el[s]
- if !found {
- return r
- }
- r.Fields = append(r.Fields, parseFieldList(st.(*ast.StructType).Fields, ul)...)
- for i, f := range r.Fields {
- // https://github.com/cweill/gotests/issues/69
- if i >= s.NumFields() {
- break
- }
- f.Name = s.Field(i).Name()
- }
- return r
-
-}
-
-func parseFieldList(fl *ast.FieldList, ul map[string]types.Type) []*models.Field {
- if fl == nil {
- return nil
- }
- i := 0
- var fs []*models.Field
- for _, f := range fl.List {
- for _, pf := range parseFields(f, ul) {
- pf.Index = i
- fs = append(fs, pf)
- i++
- }
- }
- return fs
-}
-
-func parseFields(f *ast.Field, ul map[string]types.Type) []*models.Field {
- t := parseExpr(f.Type, ul)
- if len(f.Names) == 0 {
- return []*models.Field{{
- Type: t,
- }}
- }
- var fs []*models.Field
- for _, n := range f.Names {
- fs = append(fs, &models.Field{
- Name: n.Name,
- Type: t,
- })
- }
- return fs
-}
-
-func parseExpr(e ast.Expr, ul map[string]types.Type) *models.Expression {
- switch v := e.(type) {
- case *ast.StarExpr:
- val := types.ExprString(v.X)
- return &models.Expression{
- Value: val,
- IsStar: true,
- Underlying: underlying(val, ul),
- }
- case *ast.Ellipsis:
- exp := parseExpr(v.Elt, ul)
- return &models.Expression{
- Value: exp.Value,
- IsStar: exp.IsStar,
- IsVariadic: true,
- Underlying: underlying(exp.Value, ul),
- }
- default:
- val := types.ExprString(e)
- return &models.Expression{
- Value: val,
- Underlying: underlying(val, ul),
- IsWriter: val == "io.Writer",
- }
- }
-}
-
-func underlying(val string, ul map[string]types.Type) string {
- if ul[val] != nil {
- return ul[val].String()
- }
- return ""
-}
diff --git a/vendor/github.com/cweill/gotests/internal/input/input.go b/vendor/github.com/cweill/gotests/internal/input/input.go
deleted file mode 100644
index 4496c1759..000000000
--- a/vendor/github.com/cweill/gotests/internal/input/input.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package input
-
-import (
- "fmt"
- "path"
- "path/filepath"
- "os"
-
- "github.com/cweill/gotests/internal/models"
-)
-
-// Returns all the Golang files for the given path. Ignores hidden files.
-func Files(srcPath string) ([]models.Path, error) {
- srcPath, err := filepath.Abs(srcPath)
- if err != nil {
- return nil, fmt.Errorf("filepath.Abs: %v\n", err)
- }
- var fi os.FileInfo
- if fi, err = os.Stat(srcPath); err != nil {
- return nil, fmt.Errorf("os.Stat: %v\n", err)
- }
- if fi.IsDir() {
- return dirFiles(srcPath)
- }
- return file(srcPath)
-}
-
-func dirFiles(srcPath string) ([]models.Path, error) {
- ps, err := filepath.Glob(path.Join(srcPath, "*.go"))
- if err != nil {
- return nil, fmt.Errorf("filepath.Glob: %v\n", err)
- }
- var srcPaths []models.Path
- for _, p := range ps {
- src := models.Path(p)
- if isHiddenFile(p) || src.IsTestPath() {
- continue
- }
- srcPaths = append(srcPaths, src)
- }
- return srcPaths, nil
-}
-
-func file(srcPath string) ([]models.Path, error) {
- src := models.Path(srcPath)
- if filepath.Ext(srcPath) != ".go" || isHiddenFile(srcPath) {
- return nil, fmt.Errorf("no Go source files found at %v", srcPath)
- }
- return []models.Path{src}, nil
-}
-
-func isHiddenFile(path string) bool {
- return []rune(filepath.Base(path))[0] == '.'
-}
diff --git a/vendor/github.com/cweill/gotests/internal/models/models.go b/vendor/github.com/cweill/gotests/internal/models/models.go
deleted file mode 100644
index 8e583954e..000000000
--- a/vendor/github.com/cweill/gotests/internal/models/models.go
+++ /dev/null
@@ -1,172 +0,0 @@
-package models
-
-import (
- "strings"
- "unicode"
-)
-
-type Expression struct {
- Value string
- IsStar bool
- IsVariadic bool
- IsWriter bool
- Underlying string
-}
-
-func (e *Expression) String() string {
- value := e.Value
- if e.IsStar {
- value = "*" + value
- }
- if e.IsVariadic {
- return "[]" + value
- }
- return value
-}
-
-type Field struct {
- Name string
- Type *Expression
- Index int
-}
-
-func (f *Field) IsWriter() bool {
- return f.Type.IsWriter
-}
-
-func (f *Field) IsStruct() bool {
- return strings.HasPrefix(f.Type.Underlying, "struct")
-}
-
-func (f *Field) IsBasicType() bool {
- return isBasicType(f.Type.String()) || isBasicType(f.Type.Underlying)
-}
-
-func isBasicType(t string) bool {
- switch t {
- case "bool", "string", "int", "int8", "int16", "int32", "int64", "uint",
- "uint8", "uint16", "uint32", "uint64", "uintptr", "byte", "rune",
- "float32", "float64", "complex64", "complex128":
- return true
- default:
- return false
- }
-}
-
-func (f *Field) IsNamed() bool {
- return f.Name != "" && f.Name != "_"
-}
-
-func (f *Field) ShortName() string {
- return strings.ToLower(string([]rune(f.Type.Value)[0]))
-}
-
-type Receiver struct {
- *Field
- Fields []*Field
-}
-
-type Function struct {
- Name string
- IsExported bool
- Receiver *Receiver
- Parameters []*Field
- Results []*Field
- ReturnsError bool
-}
-
-func (f *Function) TestParameters() []*Field {
- var ps []*Field
- for _, p := range f.Parameters {
- if p.IsWriter() {
- continue
- }
- ps = append(ps, p)
- }
- return ps
-}
-
-func (f *Function) TestResults() []*Field {
- var ps []*Field
- ps = append(ps, f.Results...)
- for _, p := range f.Parameters {
- if !p.IsWriter() {
- continue
- }
- ps = append(ps, &Field{
- Name: p.Name,
- Type: &Expression{
- Value: "string",
- IsWriter: true,
- Underlying: "string",
- },
- Index: len(ps),
- })
- }
- return ps
-}
-
-func (f *Function) ReturnsMultiple() bool {
- return len(f.Results) > 1
-}
-
-func (f *Function) OnlyReturnsOneValue() bool {
- return len(f.Results) == 1 && !f.ReturnsError
-}
-
-func (f *Function) OnlyReturnsError() bool {
- return len(f.Results) == 0 && f.ReturnsError
-}
-
-func (f *Function) FullName() string {
- var r string
- if f.Receiver != nil {
- r = f.Receiver.Type.Value
- }
- return strings.Title(r) + strings.Title(f.Name)
-}
-
-func (f *Function) TestName() string {
- if strings.HasPrefix(f.Name, "Test") {
- return f.Name
- }
- if f.Receiver != nil {
- receiverType := f.Receiver.Type.Value
- if unicode.IsLower([]rune(receiverType)[0]) {
- receiverType = "_" + receiverType
- }
- return "Test" + receiverType + "_" + f.Name
- }
- if unicode.IsLower([]rune(f.Name)[0]) {
- return "Test_" + f.Name
- }
- return "Test" + f.Name
-}
-
-func (f *Function) IsNaked() bool {
- return f.Receiver == nil && len(f.Parameters) == 0 && len(f.Results) == 0
-}
-
-type Import struct {
- Name, Path string
-}
-
-type Header struct {
- Comments []string
- Package string
- Imports []*Import
- Code []byte
-}
-
-type Path string
-
-func (p Path) TestPath() string {
- if !p.IsTestPath() {
- return strings.TrimSuffix(string(p), ".go") + "_test.go"
- }
- return string(p)
-}
-
-func (p Path) IsTestPath() bool {
- return strings.HasSuffix(string(p), "_test.go")
-}
diff --git a/vendor/github.com/cweill/gotests/internal/output/output.go b/vendor/github.com/cweill/gotests/internal/output/output.go
deleted file mode 100644
index 38466cad4..000000000
--- a/vendor/github.com/cweill/gotests/internal/output/output.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package output
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "os"
-
- "golang.org/x/tools/imports"
-
- "github.com/cweill/gotests/internal/models"
- "github.com/cweill/gotests/internal/render"
-)
-
-type Options struct {
- PrintInputs bool
- Subtests bool
- TemplateDir string
-}
-
-func Process(head *models.Header, funcs []*models.Function, opt *Options) ([]byte, error) {
- if opt != nil && opt.TemplateDir != "" {
- err := render.LoadCustomTemplates(opt.TemplateDir)
- if err != nil {
- return nil, fmt.Errorf("loading custom templates: %v", err)
- }
- }
-
- tf, err := ioutil.TempFile("", "gotests_")
- if err != nil {
- return nil, fmt.Errorf("ioutil.TempFile: %v", err)
- }
- defer tf.Close()
- defer os.Remove(tf.Name())
- b := &bytes.Buffer{}
- if err := writeTests(b, head, funcs, opt); err != nil {
- return nil, err
- }
-
- out, err := imports.Process(tf.Name(), b.Bytes(), nil)
- if err != nil {
- return nil, fmt.Errorf("imports.Process: %v", err)
- }
- return out, nil
-}
-
-func IsFileExist(path string) bool {
- _, err := os.Stat(path)
- return !os.IsNotExist(err)
-}
-
-func writeTests(w io.Writer, head *models.Header, funcs []*models.Function, opt *Options) error {
- b := bufio.NewWriter(w)
- if err := render.Header(b, head); err != nil {
- return fmt.Errorf("render.Header: %v", err)
- }
- for _, fun := range funcs {
- if err := render.TestFunction(b, fun, opt.PrintInputs, opt.Subtests); err != nil {
- return fmt.Errorf("render.TestFunction: %v", err)
- }
- }
- return b.Flush()
-}
diff --git a/vendor/github.com/cweill/gotests/internal/render/README.md b/vendor/github.com/cweill/gotests/internal/render/README.md
deleted file mode 100644
index 2430e9e1e..000000000
--- a/vendor/github.com/cweill/gotests/internal/render/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-bindata.go must be generated with https://github.com/jteeuwen/go-bindata.
-
-From the gotests root run `$ go generate ./...`.
-
-Or run `$ go-bindata -pkg=bindata -o "internal/render/bindata/bindata.go" internal/render/templates/`.
-
-During development run `$ go-bindata -pkg=bindata -o "internal/render/bindata/bindata.go" -debug internal/render/templates/` instead.
\ No newline at end of file
diff --git a/vendor/github.com/cweill/gotests/internal/render/bindata/esc.go b/vendor/github.com/cweill/gotests/internal/render/bindata/esc.go
deleted file mode 100644
index 78e11b36b..000000000
--- a/vendor/github.com/cweill/gotests/internal/render/bindata/esc.go
+++ /dev/null
@@ -1,323 +0,0 @@
-// Code generated by "esc -o bindata/esc.go -pkg=bindata templates"; DO NOT EDIT.
-
-package bindata
-
-import (
- "bytes"
- "compress/gzip"
- "encoding/base64"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "path"
- "sync"
- "time"
-)
-
-type _escLocalFS struct{}
-
-var _escLocal _escLocalFS
-
-type _escStaticFS struct{}
-
-var _escStatic _escStaticFS
-
-type _escDirectory struct {
- fs http.FileSystem
- name string
-}
-
-type _escFile struct {
- compressed string
- size int64
- modtime int64
- local string
- isDir bool
-
- once sync.Once
- data []byte
- name string
-}
-
-func (_escLocalFS) Open(name string) (http.File, error) {
- f, present := _escData[path.Clean(name)]
- if !present {
- return nil, os.ErrNotExist
- }
- return os.Open(f.local)
-}
-
-func (_escStaticFS) prepare(name string) (*_escFile, error) {
- f, present := _escData[path.Clean(name)]
- if !present {
- return nil, os.ErrNotExist
- }
- var err error
- f.once.Do(func() {
- f.name = path.Base(name)
- if f.size == 0 {
- return
- }
- var gr *gzip.Reader
- b64 := base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(f.compressed))
- gr, err = gzip.NewReader(b64)
- if err != nil {
- return
- }
- f.data, err = ioutil.ReadAll(gr)
- })
- if err != nil {
- return nil, err
- }
- return f, nil
-}
-
-func (fs _escStaticFS) Open(name string) (http.File, error) {
- f, err := fs.prepare(name)
- if err != nil {
- return nil, err
- }
- return f.File()
-}
-
-func (dir _escDirectory) Open(name string) (http.File, error) {
- return dir.fs.Open(dir.name + name)
-}
-
-func (f *_escFile) File() (http.File, error) {
- type httpFile struct {
- *bytes.Reader
- *_escFile
- }
- return &httpFile{
- Reader: bytes.NewReader(f.data),
- _escFile: f,
- }, nil
-}
-
-func (f *_escFile) Close() error {
- return nil
-}
-
-func (f *_escFile) Readdir(count int) ([]os.FileInfo, error) {
- if !f.isDir {
- return nil, fmt.Errorf(" escFile.Readdir: '%s' is not directory", f.name)
- }
-
- fis, ok := _escDirs[f.local]
- if !ok {
- return nil, fmt.Errorf(" escFile.Readdir: '%s' is directory, but we have no info about content of this dir, local=%s", f.name, f.local)
- }
- limit := count
- if count <= 0 || limit > len(fis) {
- limit = len(fis)
- }
-
- if len(fis) == 0 && count > 0 {
- return nil, io.EOF
- }
-
- return []os.FileInfo(fis[0:limit]), nil
-}
-
-func (f *_escFile) Stat() (os.FileInfo, error) {
- return f, nil
-}
-
-func (f *_escFile) Name() string {
- return f.name
-}
-
-func (f *_escFile) Size() int64 {
- return f.size
-}
-
-func (f *_escFile) Mode() os.FileMode {
- return 0
-}
-
-func (f *_escFile) ModTime() time.Time {
- return time.Unix(f.modtime, 0)
-}
-
-func (f *_escFile) IsDir() bool {
- return f.isDir
-}
-
-func (f *_escFile) Sys() interface{} {
- return f
-}
-
-// FS returns a http.Filesystem for the embedded assets. If useLocal is true,
-// the filesystem's contents are instead used.
-func FS(useLocal bool) http.FileSystem {
- if useLocal {
- return _escLocal
- }
- return _escStatic
-}
-
-// Dir returns a http.Filesystem for the embedded assets on a given prefix dir.
-// If useLocal is true, the filesystem's contents are instead used.
-func Dir(useLocal bool, name string) http.FileSystem {
- if useLocal {
- return _escDirectory{fs: _escLocal, name: name}
- }
- return _escDirectory{fs: _escStatic, name: name}
-}
-
-// FSByte returns the named file from the embedded assets. If useLocal is
-// true, the filesystem's contents are instead used.
-func FSByte(useLocal bool, name string) ([]byte, error) {
- if useLocal {
- f, err := _escLocal.Open(name)
- if err != nil {
- return nil, err
- }
- b, err := ioutil.ReadAll(f)
- _ = f.Close()
- return b, err
- }
- f, err := _escStatic.prepare(name)
- if err != nil {
- return nil, err
- }
- return f.data, nil
-}
-
-// FSMustByte is the same as FSByte, but panics if name is not present.
-func FSMustByte(useLocal bool, name string) []byte {
- b, err := FSByte(useLocal, name)
- if err != nil {
- panic(err)
- }
- return b
-}
-
-// FSString is the string version of FSByte.
-func FSString(useLocal bool, name string) (string, error) {
- b, err := FSByte(useLocal, name)
- return string(b), err
-}
-
-// FSMustString is the string version of FSMustByte.
-func FSMustString(useLocal bool, name string) string {
- return string(FSMustByte(useLocal, name))
-}
-
-var _escData = map[string]*_escFile{
-
- "/templates/call.tmpl": {
- name: "call.tmpl",
- local: "templates/call.tmpl",
- size: 241,
- modtime: 1540446832,
- compressed: `
-H4sIAAAAAAAC/0SOQWrDQAxFryKMFy0YHaDQA3hTSlvatRjLrsCeFo2SEITuHsY4mdWHP2/el/vEs2SG
-LtG6dhHuF7FfwA9OLGfW2sgM+c8Ax/JpekoWYYbunKf6eicBI1qLb7RxxJO7Ul4Yehmg5xVeXgHfSWlj
-Yy2HvZeIAR5/296PitUbzJB0KU2/K+riTuPX9Z9xLN+kQpOkCMTG7vF85C0AAP//ZQi8iPEAAAA=
-`,
- },
-
- "/templates/function.tmpl": {
- name: "function.tmpl",
- local: "templates/function.tmpl",
- size: 2392,
- modtime: 1540483824,
- compressed: `
-H4sIAAAAAAAC/7RWTW/jNhA9S79i1sgupMJh7g58aJC06KFx4QTNoSgKRh65RGnKJUcJDIL/vSBFfVpO
-c9kcImlIznvz5g0Ta3dYCoWwKGtVkKjUwrnU2mu4KmG1BuZcmvolsJY9o6FHfkDnMoIfCA0JtWfPOdg0
-8UfeBf0NbIsFijfUzqVJCIsS2C/miXRdUAh20Z8Eyp1pYgmdjghliIAJm33euFtztcfJgcTa8O1JBnqn
-I8YlfwTVLn51mG1o8D559ax8mb9xzQ9IqANYoMb1fkRsQOv8RAAMoTN2A8QxvhfUeNH/+HMAo/gBPaxQ
-+3h4RuaWO1e7XuuJXFHa5tEpIk2vWZvyXNAL4n0gWZIEvfyvmTMD3bZoakmmxXnhij6SrIPcItVamQet
-q6jBO1f0oDW8VpWc6OyFvLmB5839ZgU/7nbgtYaCGzQstKGsNFgrSsgqDeypfm2akamKvKCP/B/c5blz
-8NcSiHyTrA3JYynNdptC/GlZdpmcI7atVUbEfEeX4IdqOkYQOcN1L/tcty+M1VkPA83Qn9MRw2aunfsW
-qUeF2e9c1uicbVNcmLbEWtZM/wqIWOMjNpjBZZ+gn71kZiDPPiLezAi1Zb5oQV31o9FareHb64nQsLu6
-LFHbzwDGUWnau1HyNHRTfh7fKAwq5dAxIzwcJSeEhW4cvICrMvi2Xym4lE34EosZGyeijF2bEnMOUOum
-q3Mgt50pM7/vyxqUkLl/ErF2OmKbiYWUZbYY5jqgMXyPsRT0O2ANX9+W0B7/+rZYjuCFOtZd8aj1cgCW
-945ob4nRuIe1yZjoULC1zc1UVIqEqjEWNuewDy11DnnJU0H1nyvqB6fzGHsK12+W3w62NKoOL6zed9Jg
-xLjjRhSDP0xdc6/KOX/5oRxxGOoshcJpoz/N5zvhf9FYSiyI3SMeH/6tucy6DMsxoXzIqOveZ3zYEo5k
-f60liaMckY18eq/+j1Evkrz8D8PEp+ALGl7XLnVp2vr0vwAAAP//X+Qs81gJAAA=
-`,
- },
-
- "/templates/header.tmpl": {
- name: "header.tmpl",
- local: "templates/header.tmpl",
- size: 142,
- modtime: 1540481163,
- compressed: `
-H4sIAAAAAAAC/0TMMQ7CMAyF4d2nsDrBQC7BxIK4gkUebYXiViGb9e6OlAi6/bL1voiM1+rQaYFl1ImU
-iGo+Q9N1KwXePmRE6g941gspuz3fNkMj0mMkKbKWfatNT4dw65cB3K2AHJO2/DhSzv/6BgAA///GzMM9
-jgAAAA==
-`,
- },
-
- "/templates/inline.tmpl": {
- name: "inline.tmpl",
- local: "templates/inline.tmpl",
- size: 49,
- modtime: 1540446006,
- compressed: `
-H4sIAAAAAAAC/6quTklNy8xLVVDKzMvJzEtVqq1VqK4uSc0tyEksSVVQSk7MyVFS0AOLpual1NYCAgAA
-//+q60H/MQAAAA==
-`,
- },
-
- "/templates/inputs.tmpl": {
- name: "inputs.tmpl",
- local: "templates/inputs.tmpl",
- size: 152,
- modtime: 1540446821,
- compressed: `
-H4sIAAAAAAAC/0yNMQoCQQxFrxKWLSUHEDyAneAJIptZptgomWz1yd1lRoupEh7/vw9sWqopLdU+Z7Ql
-E1gLXW/E/a2F7B3Ez/MV2qJlRrDJoRcC1LZ/Zi388GpxH5IOXWzXwcXl0FD/dcX3xsCgfWLyzOcbAAD/
-/468z9qYAAAA
-`,
- },
-
- "/templates/message.tmpl": {
- name: "message.tmpl",
- local: "templates/message.tmpl",
- size: 201,
- modtime: 1540446006,
- compressed: `
-H4sIAAAAAAAC/zyN4WqDQBCE//sUiyi0oPsAhT5A/xRpS/9f4mgW9GLuTkNY9t2DB/HXDDPDN6o9BvGg
-ckaMbkRJrVmhKgP5ayL+XU8JMUWz+sakCt+bqd4lXYh/cIZsCHvCf48F/O+mFWZ8DPnbzTB7y0Tugvj0
-5Zd1B6oG50dQJQ1VmOjjk7hzwc1ICLmXgSoxa16/9XZws7wXqi1l+wwAAP//kC65UskAAAA=
-`,
- },
-
- "/templates/results.tmpl": {
- name: "results.tmpl",
- local: "templates/results.tmpl",
- size: 168,
- modtime: 1540446006,
- compressed: `
-H4sIAAAAAAAC/1yNTQrCQAyFr/Iosyw9gOBS3HsDoRkJlAy8ma5C7i6pRcFVfr4vee6rVDXBROn7NvoU
-AXc+7SUoOqPIhssVy+ODI9y1omjEDHexNTf3NrBkc85a82DstH4jG1MW8uQ4hMbv0385A3/uUd8BAAD/
-/7BPz2GoAAAA
-`,
- },
-
- "/templates": {
- name: "templates",
- local: `templates`,
- isDir: true,
- },
-}
-
-var _escDirs = map[string][]os.FileInfo{
-
- "templates": {
- _escData["/templates/call.tmpl"],
- _escData["/templates/function.tmpl"],
- _escData["/templates/header.tmpl"],
- _escData["/templates/inline.tmpl"],
- _escData["/templates/inputs.tmpl"],
- _escData["/templates/message.tmpl"],
- _escData["/templates/results.tmpl"],
- },
-}
diff --git a/vendor/github.com/cweill/gotests/internal/render/bindata/helper.go b/vendor/github.com/cweill/gotests/internal/render/bindata/helper.go
deleted file mode 100644
index d73dba3c7..000000000
--- a/vendor/github.com/cweill/gotests/internal/render/bindata/helper.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Package bindata
-// Helper with wrapper for backward compatibility with go-bindata
-// used only AssetNames func, because only this func has no analog on esc
-//
-// the reason for changing go-bindata to esc - is:
-// `go-bindata creator deleted their @github account and someone else created a new account with the same name.`
-//
-// https://github.com/jteeuwen/go-bindata/issues/5
-// https://twitter.com/francesc/status/961249107020001280
-//
-// After research some of alternatives - `esc` - is looks like one of the best choice
-// https://tech.townsourced.com/post/embedding-static-files-in-go/
-
-package bindata
-
-// AssetNames returns the names of the assets. (for compatible with go-bindata)
-func AssetNames() []string {
- names := make([]string, 0, len(_escData))
- for name := range _escData {
- names = append(names, name)
- }
- return names
-}
diff --git a/vendor/github.com/cweill/gotests/internal/render/render.go b/vendor/github.com/cweill/gotests/internal/render/render.go
deleted file mode 100644
index 942f328fc..000000000
--- a/vendor/github.com/cweill/gotests/internal/render/render.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package render
-
-//go:generate esc -o bindata/esc.go -pkg=bindata templates
-import (
- "fmt"
- "io"
- "io/ioutil"
- "path"
- "strings"
- "text/template"
-
- "github.com/cweill/gotests/internal/models"
- "github.com/cweill/gotests/internal/render/bindata"
-)
-
-const name = "name"
-
-var (
- tmpls *template.Template
-)
-
-func init() {
- initEmptyTmpls()
- for _, name := range bindata.AssetNames() {
- tmpls = template.Must(tmpls.Parse(bindata.FSMustString(false, name)))
- }
-}
-
-// LoadCustomTemplates allows to load in custom templates from a specified path.
-func LoadCustomTemplates(dir string) error {
- initEmptyTmpls()
-
- files, err := ioutil.ReadDir(dir)
- if err != nil {
- return fmt.Errorf("ioutil.ReadDir: %v", err)
- }
-
- templateFiles := []string{}
- for _, f := range files {
- templateFiles = append(templateFiles, path.Join(dir, f.Name()))
- }
- tmpls, err = tmpls.ParseFiles(templateFiles...)
- if err != nil {
- return fmt.Errorf("tmpls.ParseFiles: %v", err)
- }
- return nil
-}
-
-func initEmptyTmpls() {
- tmpls = template.New("render").Funcs(map[string]interface{}{
- "Field": fieldName,
- "Receiver": receiverName,
- "Param": parameterName,
- "Want": wantName,
- "Got": gotName,
- })
-}
-
-func fieldName(f *models.Field) string {
- var n string
- if f.IsNamed() {
- n = f.Name
- } else {
- n = f.Type.String()
- }
- return n
-}
-
-func receiverName(f *models.Receiver) string {
- var n string
- if f.IsNamed() {
- n = f.Name
- } else {
- n = f.ShortName()
- }
- if n == "name" {
- // Avoid conflict with test struct's "name" field.
- n = "n"
- }
- return n
-}
-
-func parameterName(f *models.Field) string {
- var n string
- if f.IsNamed() {
- n = f.Name
- } else {
- n = fmt.Sprintf("in%v", f.Index)
- }
- return n
-}
-
-func wantName(f *models.Field) string {
- var n string
- if f.IsNamed() {
- n = "want" + strings.Title(f.Name)
- } else if f.Index == 0 {
- n = "want"
- } else {
- n = fmt.Sprintf("want%v", f.Index)
- }
- return n
-}
-
-func gotName(f *models.Field) string {
- var n string
- if f.IsNamed() {
- n = "got" + strings.Title(f.Name)
- } else if f.Index == 0 {
- n = "got"
- } else {
- n = fmt.Sprintf("got%v", f.Index)
- }
- return n
-}
-
-func Header(w io.Writer, h *models.Header) error {
- if err := tmpls.ExecuteTemplate(w, "header", h); err != nil {
- return err
- }
- _, err := w.Write(h.Code)
- return err
-}
-
-func TestFunction(w io.Writer, f *models.Function, printInputs bool, subtests bool) error {
- return tmpls.ExecuteTemplate(w, "function", struct {
- *models.Function
- PrintInputs bool
- Subtests bool
- }{
- Function: f,
- PrintInputs: printInputs,
- Subtests: subtests,
- })
-}
diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE
deleted file mode 100644
index bc52e96f2..000000000
--- a/vendor/github.com/davecgh/go-spew/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-ISC License
-
-Copyright (c) 2012-2016 Dave Collins
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go
deleted file mode 100644
index 792994785..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/bypass.go
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2015-2016 Dave Collins
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine, compiled by GopherJS, and
-// "-tags safe" is not added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// Go versions prior to 1.4 are disabled because they use a different layout
-// for interfaces which make the implementation of unsafeReflectValue more complex.
-// +build !js,!appengine,!safe,!disableunsafe,go1.4
-
-package spew
-
-import (
- "reflect"
- "unsafe"
-)
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = false
-
- // ptrSize is the size of a pointer on the current arch.
- ptrSize = unsafe.Sizeof((*byte)(nil))
-)
-
-type flag uintptr
-
-var (
- // flagRO indicates whether the value field of a reflect.Value
- // is read-only.
- flagRO flag
-
- // flagAddr indicates whether the address of the reflect.Value's
- // value may be taken.
- flagAddr flag
-)
-
-// flagKindMask holds the bits that make up the kind
-// part of the flags field. In all the supported versions,
-// it is in the lower 5 bits.
-const flagKindMask = flag(0x1f)
-
-// Different versions of Go have used different
-// bit layouts for the flags type. This table
-// records the known combinations.
-var okFlags = []struct {
- ro, addr flag
-}{{
- // From Go 1.4 to 1.5
- ro: 1 << 5,
- addr: 1 << 7,
-}, {
- // Up to Go tip.
- ro: 1<<5 | 1<<6,
- addr: 1 << 8,
-}}
-
-var flagValOffset = func() uintptr {
- field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
- if !ok {
- panic("reflect.Value has no flag field")
- }
- return field.Offset
-}()
-
-// flagField returns a pointer to the flag field of a reflect.Value.
-func flagField(v *reflect.Value) *flag {
- return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset))
-}
-
-// unsafeReflectValue converts the passed reflect.Value into a one that bypasses
-// the typical safety restrictions preventing access to unaddressable and
-// unexported data. It works by digging the raw pointer to the underlying
-// value out of the protected value and generating a new unprotected (unsafe)
-// reflect.Value to it.
-//
-// This allows us to check for implementations of the Stringer and error
-// interfaces to be used for pretty printing ordinarily unaddressable and
-// inaccessible values such as unexported struct fields.
-func unsafeReflectValue(v reflect.Value) reflect.Value {
- if !v.IsValid() || (v.CanInterface() && v.CanAddr()) {
- return v
- }
- flagFieldPtr := flagField(&v)
- *flagFieldPtr &^= flagRO
- *flagFieldPtr |= flagAddr
- return v
-}
-
-// Sanity checks against future reflect package changes
-// to the type or semantics of the Value.flag field.
-func init() {
- field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
- if !ok {
- panic("reflect.Value has no flag field")
- }
- if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() {
- panic("reflect.Value flag field has changed kind")
- }
- type t0 int
- var t struct {
- A t0
- // t0 will have flagEmbedRO set.
- t0
- // a will have flagStickyRO set
- a t0
- }
- vA := reflect.ValueOf(t).FieldByName("A")
- va := reflect.ValueOf(t).FieldByName("a")
- vt0 := reflect.ValueOf(t).FieldByName("t0")
-
- // Infer flagRO from the difference between the flags
- // for the (otherwise identical) fields in t.
- flagPublic := *flagField(&vA)
- flagWithRO := *flagField(&va) | *flagField(&vt0)
- flagRO = flagPublic ^ flagWithRO
-
- // Infer flagAddr from the difference between a value
- // taken from a pointer and not.
- vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A")
- flagNoPtr := *flagField(&vA)
- flagPtr := *flagField(&vPtrA)
- flagAddr = flagNoPtr ^ flagPtr
-
- // Check that the inferred flags tally with one of the known versions.
- for _, f := range okFlags {
- if flagRO == f.ro && flagAddr == f.addr {
- return
- }
- }
- panic("reflect.Value read-only flag has changed semantics")
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
deleted file mode 100644
index 205c28d68..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2015-2016 Dave Collins
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is running on Google App Engine, compiled by GopherJS, or
-// "-tags safe" is added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// +build js appengine safe disableunsafe !go1.4
-
-package spew
-
-import "reflect"
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = true
-)
-
-// unsafeReflectValue typically converts the passed reflect.Value into a one
-// that bypasses the typical safety restrictions preventing access to
-// unaddressable and unexported data. However, doing this relies on access to
-// the unsafe package. This is a stub version which simply returns the passed
-// reflect.Value when the unsafe package is not available.
-func unsafeReflectValue(v reflect.Value) reflect.Value {
- return v
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go
deleted file mode 100644
index 1be8ce945..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/common.go
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "sort"
- "strconv"
-)
-
-// Some constants in the form of bytes to avoid string overhead. This mirrors
-// the technique used in the fmt package.
-var (
- panicBytes = []byte("(PANIC=")
- plusBytes = []byte("+")
- iBytes = []byte("i")
- trueBytes = []byte("true")
- falseBytes = []byte("false")
- interfaceBytes = []byte("(interface {})")
- commaNewlineBytes = []byte(",\n")
- newlineBytes = []byte("\n")
- openBraceBytes = []byte("{")
- openBraceNewlineBytes = []byte("{\n")
- closeBraceBytes = []byte("}")
- asteriskBytes = []byte("*")
- colonBytes = []byte(":")
- colonSpaceBytes = []byte(": ")
- openParenBytes = []byte("(")
- closeParenBytes = []byte(")")
- spaceBytes = []byte(" ")
- pointerChainBytes = []byte("->")
- nilAngleBytes = []byte("")
- maxNewlineBytes = []byte("\n")
- maxShortBytes = []byte("")
- circularBytes = []byte("")
- circularShortBytes = []byte("")
- invalidAngleBytes = []byte("")
- openBracketBytes = []byte("[")
- closeBracketBytes = []byte("]")
- percentBytes = []byte("%")
- precisionBytes = []byte(".")
- openAngleBytes = []byte("<")
- closeAngleBytes = []byte(">")
- openMapBytes = []byte("map[")
- closeMapBytes = []byte("]")
- lenEqualsBytes = []byte("len=")
- capEqualsBytes = []byte("cap=")
-)
-
-// hexDigits is used to map a decimal value to a hex digit.
-var hexDigits = "0123456789abcdef"
-
-// catchPanic handles any panics that might occur during the handleMethods
-// calls.
-func catchPanic(w io.Writer, v reflect.Value) {
- if err := recover(); err != nil {
- w.Write(panicBytes)
- fmt.Fprintf(w, "%v", err)
- w.Write(closeParenBytes)
- }
-}
-
-// handleMethods attempts to call the Error and String methods on the underlying
-// type the passed reflect.Value represents and outputes the result to Writer w.
-//
-// It handles panics in any called methods by catching and displaying the error
-// as the formatted value.
-func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) {
- // We need an interface to check if the type implements the error or
- // Stringer interface. However, the reflect package won't give us an
- // interface on certain things like unexported struct fields in order
- // to enforce visibility rules. We use unsafe, when it's available,
- // to bypass these restrictions since this package does not mutate the
- // values.
- if !v.CanInterface() {
- if UnsafeDisabled {
- return false
- }
-
- v = unsafeReflectValue(v)
- }
-
- // Choose whether or not to do error and Stringer interface lookups against
- // the base type or a pointer to the base type depending on settings.
- // Technically calling one of these methods with a pointer receiver can
- // mutate the value, however, types which choose to satisify an error or
- // Stringer interface with a pointer receiver should not be mutating their
- // state inside these interface methods.
- if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() {
- v = unsafeReflectValue(v)
- }
- if v.CanAddr() {
- v = v.Addr()
- }
-
- // Is it an error or Stringer?
- switch iface := v.Interface().(type) {
- case error:
- defer catchPanic(w, v)
- if cs.ContinueOnMethod {
- w.Write(openParenBytes)
- w.Write([]byte(iface.Error()))
- w.Write(closeParenBytes)
- w.Write(spaceBytes)
- return false
- }
-
- w.Write([]byte(iface.Error()))
- return true
-
- case fmt.Stringer:
- defer catchPanic(w, v)
- if cs.ContinueOnMethod {
- w.Write(openParenBytes)
- w.Write([]byte(iface.String()))
- w.Write(closeParenBytes)
- w.Write(spaceBytes)
- return false
- }
- w.Write([]byte(iface.String()))
- return true
- }
- return false
-}
-
-// printBool outputs a boolean value as true or false to Writer w.
-func printBool(w io.Writer, val bool) {
- if val {
- w.Write(trueBytes)
- } else {
- w.Write(falseBytes)
- }
-}
-
-// printInt outputs a signed integer value to Writer w.
-func printInt(w io.Writer, val int64, base int) {
- w.Write([]byte(strconv.FormatInt(val, base)))
-}
-
-// printUint outputs an unsigned integer value to Writer w.
-func printUint(w io.Writer, val uint64, base int) {
- w.Write([]byte(strconv.FormatUint(val, base)))
-}
-
-// printFloat outputs a floating point value using the specified precision,
-// which is expected to be 32 or 64bit, to Writer w.
-func printFloat(w io.Writer, val float64, precision int) {
- w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision)))
-}
-
-// printComplex outputs a complex value using the specified float precision
-// for the real and imaginary parts to Writer w.
-func printComplex(w io.Writer, c complex128, floatPrecision int) {
- r := real(c)
- w.Write(openParenBytes)
- w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision)))
- i := imag(c)
- if i >= 0 {
- w.Write(plusBytes)
- }
- w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision)))
- w.Write(iBytes)
- w.Write(closeParenBytes)
-}
-
-// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x'
-// prefix to Writer w.
-func printHexPtr(w io.Writer, p uintptr) {
- // Null pointer.
- num := uint64(p)
- if num == 0 {
- w.Write(nilAngleBytes)
- return
- }
-
- // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix
- buf := make([]byte, 18)
-
- // It's simpler to construct the hex string right to left.
- base := uint64(16)
- i := len(buf) - 1
- for num >= base {
- buf[i] = hexDigits[num%base]
- num /= base
- i--
- }
- buf[i] = hexDigits[num]
-
- // Add '0x' prefix.
- i--
- buf[i] = 'x'
- i--
- buf[i] = '0'
-
- // Strip unused leading bytes.
- buf = buf[i:]
- w.Write(buf)
-}
-
-// valuesSorter implements sort.Interface to allow a slice of reflect.Value
-// elements to be sorted.
-type valuesSorter struct {
- values []reflect.Value
- strings []string // either nil or same len and values
- cs *ConfigState
-}
-
-// newValuesSorter initializes a valuesSorter instance, which holds a set of
-// surrogate keys on which the data should be sorted. It uses flags in
-// ConfigState to decide if and how to populate those surrogate keys.
-func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface {
- vs := &valuesSorter{values: values, cs: cs}
- if canSortSimply(vs.values[0].Kind()) {
- return vs
- }
- if !cs.DisableMethods {
- vs.strings = make([]string, len(values))
- for i := range vs.values {
- b := bytes.Buffer{}
- if !handleMethods(cs, &b, vs.values[i]) {
- vs.strings = nil
- break
- }
- vs.strings[i] = b.String()
- }
- }
- if vs.strings == nil && cs.SpewKeys {
- vs.strings = make([]string, len(values))
- for i := range vs.values {
- vs.strings[i] = Sprintf("%#v", vs.values[i].Interface())
- }
- }
- return vs
-}
-
-// canSortSimply tests whether a reflect.Kind is a primitive that can be sorted
-// directly, or whether it should be considered for sorting by surrogate keys
-// (if the ConfigState allows it).
-func canSortSimply(kind reflect.Kind) bool {
- // This switch parallels valueSortLess, except for the default case.
- switch kind {
- case reflect.Bool:
- return true
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- return true
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- return true
- case reflect.Float32, reflect.Float64:
- return true
- case reflect.String:
- return true
- case reflect.Uintptr:
- return true
- case reflect.Array:
- return true
- }
- return false
-}
-
-// Len returns the number of values in the slice. It is part of the
-// sort.Interface implementation.
-func (s *valuesSorter) Len() int {
- return len(s.values)
-}
-
-// Swap swaps the values at the passed indices. It is part of the
-// sort.Interface implementation.
-func (s *valuesSorter) Swap(i, j int) {
- s.values[i], s.values[j] = s.values[j], s.values[i]
- if s.strings != nil {
- s.strings[i], s.strings[j] = s.strings[j], s.strings[i]
- }
-}
-
-// valueSortLess returns whether the first value should sort before the second
-// value. It is used by valueSorter.Less as part of the sort.Interface
-// implementation.
-func valueSortLess(a, b reflect.Value) bool {
- switch a.Kind() {
- case reflect.Bool:
- return !a.Bool() && b.Bool()
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- return a.Int() < b.Int()
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- return a.Uint() < b.Uint()
- case reflect.Float32, reflect.Float64:
- return a.Float() < b.Float()
- case reflect.String:
- return a.String() < b.String()
- case reflect.Uintptr:
- return a.Uint() < b.Uint()
- case reflect.Array:
- // Compare the contents of both arrays.
- l := a.Len()
- for i := 0; i < l; i++ {
- av := a.Index(i)
- bv := b.Index(i)
- if av.Interface() == bv.Interface() {
- continue
- }
- return valueSortLess(av, bv)
- }
- }
- return a.String() < b.String()
-}
-
-// Less returns whether the value at index i should sort before the
-// value at index j. It is part of the sort.Interface implementation.
-func (s *valuesSorter) Less(i, j int) bool {
- if s.strings == nil {
- return valueSortLess(s.values[i], s.values[j])
- }
- return s.strings[i] < s.strings[j]
-}
-
-// sortValues is a sort function that handles both native types and any type that
-// can be converted to error or Stringer. Other inputs are sorted according to
-// their Value.String() value to ensure display stability.
-func sortValues(values []reflect.Value, cs *ConfigState) {
- if len(values) == 0 {
- return
- }
- sort.Sort(newValuesSorter(values, cs))
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go
deleted file mode 100644
index 2e3d22f31..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/config.go
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
-)
-
-// ConfigState houses the configuration options used by spew to format and
-// display values. There is a global instance, Config, that is used to control
-// all top-level Formatter and Dump functionality. Each ConfigState instance
-// provides methods equivalent to the top-level functions.
-//
-// The zero value for ConfigState provides no indentation. You would typically
-// want to set it to a space or a tab.
-//
-// Alternatively, you can use NewDefaultConfig to get a ConfigState instance
-// with default settings. See the documentation of NewDefaultConfig for default
-// values.
-type ConfigState struct {
- // Indent specifies the string to use for each indentation level. The
- // global config instance that all top-level functions use set this to a
- // single space by default. If you would like more indentation, you might
- // set this to a tab with "\t" or perhaps two spaces with " ".
- Indent string
-
- // MaxDepth controls the maximum number of levels to descend into nested
- // data structures. The default, 0, means there is no limit.
- //
- // NOTE: Circular data structures are properly detected, so it is not
- // necessary to set this value unless you specifically want to limit deeply
- // nested data structures.
- MaxDepth int
-
- // DisableMethods specifies whether or not error and Stringer interfaces are
- // invoked for types that implement them.
- DisableMethods bool
-
- // DisablePointerMethods specifies whether or not to check for and invoke
- // error and Stringer interfaces on types which only accept a pointer
- // receiver when the current type is not a pointer.
- //
- // NOTE: This might be an unsafe action since calling one of these methods
- // with a pointer receiver could technically mutate the value, however,
- // in practice, types which choose to satisify an error or Stringer
- // interface with a pointer receiver should not be mutating their state
- // inside these interface methods. As a result, this option relies on
- // access to the unsafe package, so it will not have any effect when
- // running in environments without access to the unsafe package such as
- // Google App Engine or with the "safe" build tag specified.
- DisablePointerMethods bool
-
- // DisablePointerAddresses specifies whether to disable the printing of
- // pointer addresses. This is useful when diffing data structures in tests.
- DisablePointerAddresses bool
-
- // DisableCapacities specifies whether to disable the printing of capacities
- // for arrays, slices, maps and channels. This is useful when diffing
- // data structures in tests.
- DisableCapacities bool
-
- // ContinueOnMethod specifies whether or not recursion should continue once
- // a custom error or Stringer interface is invoked. The default, false,
- // means it will print the results of invoking the custom error or Stringer
- // interface and return immediately instead of continuing to recurse into
- // the internals of the data type.
- //
- // NOTE: This flag does not have any effect if method invocation is disabled
- // via the DisableMethods or DisablePointerMethods options.
- ContinueOnMethod bool
-
- // SortKeys specifies map keys should be sorted before being printed. Use
- // this to have a more deterministic, diffable output. Note that only
- // native types (bool, int, uint, floats, uintptr and string) and types
- // that support the error or Stringer interfaces (if methods are
- // enabled) are supported, with other types sorted according to the
- // reflect.Value.String() output which guarantees display stability.
- SortKeys bool
-
- // SpewKeys specifies that, as a last resort attempt, map keys should
- // be spewed to strings and sorted by those strings. This is only
- // considered if SortKeys is true.
- SpewKeys bool
-}
-
-// Config is the active configuration of the top-level functions.
-// The configuration can be changed by modifying the contents of spew.Config.
-var Config = ConfigState{Indent: " "}
-
-// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the formatted string as a value that satisfies error. See NewFormatter
-// for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) {
- return fmt.Errorf(format, c.convertArgs(a)...)
-}
-
-// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprint(w, c.convertArgs(a)...)
-}
-
-// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- return fmt.Fprintf(w, format, c.convertArgs(a)...)
-}
-
-// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
-// passed with a Formatter interface returned by c.NewFormatter. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprintln(w, c.convertArgs(a)...)
-}
-
-// Print is a wrapper for fmt.Print that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Print(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Print(a ...interface{}) (n int, err error) {
- return fmt.Print(c.convertArgs(a)...)
-}
-
-// Printf is a wrapper for fmt.Printf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) {
- return fmt.Printf(format, c.convertArgs(a)...)
-}
-
-// Println is a wrapper for fmt.Println that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Println(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Println(a ...interface{}) (n int, err error) {
- return fmt.Println(c.convertArgs(a)...)
-}
-
-// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprint(a ...interface{}) string {
- return fmt.Sprint(c.convertArgs(a)...)
-}
-
-// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprintf(format string, a ...interface{}) string {
- return fmt.Sprintf(format, c.convertArgs(a)...)
-}
-
-// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
-// were passed with a Formatter interface returned by c.NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprintln(a ...interface{}) string {
- return fmt.Sprintln(c.convertArgs(a)...)
-}
-
-/*
-NewFormatter returns a custom formatter that satisfies the fmt.Formatter
-interface. As a result, it integrates cleanly with standard fmt package
-printing functions. The formatter is useful for inline printing of smaller data
-types similar to the standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Typically this function shouldn't be called directly. It is much easier to make
-use of the custom formatter by calling one of the convenience functions such as
-c.Printf, c.Println, or c.Printf.
-*/
-func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter {
- return newFormatter(c, v)
-}
-
-// Fdump formats and displays the passed arguments to io.Writer w. It formats
-// exactly the same as Dump.
-func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) {
- fdump(c, w, a...)
-}
-
-/*
-Dump displays the passed parameters to standard out with newlines, customizable
-indentation, and additional debug information such as complete types and all
-pointer addresses used to indirect to the final value. It provides the
-following features over the built-in printing facilities provided by the fmt
-package:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output
-
-The configuration options are controlled by modifying the public members
-of c. See ConfigState for options documentation.
-
-See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
-get the formatted result as a string.
-*/
-func (c *ConfigState) Dump(a ...interface{}) {
- fdump(c, os.Stdout, a...)
-}
-
-// Sdump returns a string with the passed arguments formatted exactly the same
-// as Dump.
-func (c *ConfigState) Sdump(a ...interface{}) string {
- var buf bytes.Buffer
- fdump(c, &buf, a...)
- return buf.String()
-}
-
-// convertArgs accepts a slice of arguments and returns a slice of the same
-// length with each argument converted to a spew Formatter interface using
-// the ConfigState associated with s.
-func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) {
- formatters = make([]interface{}, len(args))
- for index, arg := range args {
- formatters[index] = newFormatter(c, arg)
- }
- return formatters
-}
-
-// NewDefaultConfig returns a ConfigState with the following default settings.
-//
-// Indent: " "
-// MaxDepth: 0
-// DisableMethods: false
-// DisablePointerMethods: false
-// ContinueOnMethod: false
-// SortKeys: false
-func NewDefaultConfig() *ConfigState {
- return &ConfigState{Indent: " "}
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go
deleted file mode 100644
index aacaac6f1..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/doc.go
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
-Package spew implements a deep pretty printer for Go data structures to aid in
-debugging.
-
-A quick overview of the additional features spew provides over the built-in
-printing facilities for Go data types are as follows:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output (only when using
- Dump style)
-
-There are two different approaches spew allows for dumping Go data structures:
-
- * Dump style which prints with newlines, customizable indentation,
- and additional debug information such as types and all pointer addresses
- used to indirect to the final value
- * A custom Formatter interface that integrates cleanly with the standard fmt
- package and replaces %v, %+v, %#v, and %#+v to provide inline printing
- similar to the default %v while providing the additional functionality
- outlined above and passing unsupported format verbs such as %x and %q
- along to fmt
-
-Quick Start
-
-This section demonstrates how to quickly get started with spew. See the
-sections below for further details on formatting and configuration options.
-
-To dump a variable with full newlines, indentation, type, and pointer
-information use Dump, Fdump, or Sdump:
- spew.Dump(myVar1, myVar2, ...)
- spew.Fdump(someWriter, myVar1, myVar2, ...)
- str := spew.Sdump(myVar1, myVar2, ...)
-
-Alternatively, if you would prefer to use format strings with a compacted inline
-printing style, use the convenience wrappers Printf, Fprintf, etc with
-%v (most compact), %+v (adds pointer addresses), %#v (adds types), or
-%#+v (adds types and pointer addresses):
- spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
- spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-
-Configuration Options
-
-Configuration of spew is handled by fields in the ConfigState type. For
-convenience, all of the top-level functions use a global state available
-via the spew.Config global.
-
-It is also possible to create a ConfigState instance that provides methods
-equivalent to the top-level functions. This allows concurrent configuration
-options. See the ConfigState documentation for more details.
-
-The following configuration options are available:
- * Indent
- String to use for each indentation level for Dump functions.
- It is a single space by default. A popular alternative is "\t".
-
- * MaxDepth
- Maximum number of levels to descend into nested data structures.
- There is no limit by default.
-
- * DisableMethods
- Disables invocation of error and Stringer interface methods.
- Method invocation is enabled by default.
-
- * DisablePointerMethods
- Disables invocation of error and Stringer interface methods on types
- which only accept pointer receivers from non-pointer variables.
- Pointer method invocation is enabled by default.
-
- * DisablePointerAddresses
- DisablePointerAddresses specifies whether to disable the printing of
- pointer addresses. This is useful when diffing data structures in tests.
-
- * DisableCapacities
- DisableCapacities specifies whether to disable the printing of
- capacities for arrays, slices, maps and channels. This is useful when
- diffing data structures in tests.
-
- * ContinueOnMethod
- Enables recursion into types after invoking error and Stringer interface
- methods. Recursion after method invocation is disabled by default.
-
- * SortKeys
- Specifies map keys should be sorted before being printed. Use
- this to have a more deterministic, diffable output. Note that
- only native types (bool, int, uint, floats, uintptr and string)
- and types which implement error or Stringer interfaces are
- supported with other types sorted according to the
- reflect.Value.String() output which guarantees display
- stability. Natural map order is used by default.
-
- * SpewKeys
- Specifies that, as a last resort attempt, map keys should be
- spewed to strings and sorted by those strings. This is only
- considered if SortKeys is true.
-
-Dump Usage
-
-Simply call spew.Dump with a list of variables you want to dump:
-
- spew.Dump(myVar1, myVar2, ...)
-
-You may also call spew.Fdump if you would prefer to output to an arbitrary
-io.Writer. For example, to dump to standard error:
-
- spew.Fdump(os.Stderr, myVar1, myVar2, ...)
-
-A third option is to call spew.Sdump to get the formatted output as a string:
-
- str := spew.Sdump(myVar1, myVar2, ...)
-
-Sample Dump Output
-
-See the Dump example for details on the setup of the types and variables being
-shown here.
-
- (main.Foo) {
- unexportedField: (*main.Bar)(0xf84002e210)({
- flag: (main.Flag) flagTwo,
- data: (uintptr)
- }),
- ExportedField: (map[interface {}]interface {}) (len=1) {
- (string) (len=3) "one": (bool) true
- }
- }
-
-Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C
-command as shown.
- ([]uint8) (len=32 cap=32) {
- 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
- 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
- 00000020 31 32 |12|
- }
-
-Custom Formatter
-
-Spew provides a custom formatter that implements the fmt.Formatter interface
-so that it integrates cleanly with standard fmt package printing functions. The
-formatter is useful for inline printing of smaller data types similar to the
-standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Custom Formatter Usage
-
-The simplest way to make use of the spew custom formatter is to call one of the
-convenience functions such as spew.Printf, spew.Println, or spew.Printf. The
-functions have syntax you are most likely already familiar with:
-
- spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
- spew.Println(myVar, myVar2)
- spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-
-See the Index for the full list convenience functions.
-
-Sample Formatter Output
-
-Double pointer to a uint8:
- %v: <**>5
- %+v: <**>(0xf8400420d0->0xf8400420c8)5
- %#v: (**uint8)5
- %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5
-
-Pointer to circular struct with a uint8 field and a pointer to itself:
- %v: <*>{1 <*>}
- %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)}
- %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)}
- %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)}
-
-See the Printf example for details on the setup of variables being shown
-here.
-
-Errors
-
-Since it is possible for custom Stringer/error interfaces to panic, spew
-detects them and handles them internally by printing the panic information
-inline with the output. Since spew is intended to provide deep pretty printing
-capabilities on structures, it intentionally does not return any errors.
-*/
-package spew
diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go
deleted file mode 100644
index f78d89fc1..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/dump.go
+++ /dev/null
@@ -1,509 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "encoding/hex"
- "fmt"
- "io"
- "os"
- "reflect"
- "regexp"
- "strconv"
- "strings"
-)
-
-var (
- // uint8Type is a reflect.Type representing a uint8. It is used to
- // convert cgo types to uint8 slices for hexdumping.
- uint8Type = reflect.TypeOf(uint8(0))
-
- // cCharRE is a regular expression that matches a cgo char.
- // It is used to detect character arrays to hexdump them.
- cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`)
-
- // cUnsignedCharRE is a regular expression that matches a cgo unsigned
- // char. It is used to detect unsigned character arrays to hexdump
- // them.
- cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`)
-
- // cUint8tCharRE is a regular expression that matches a cgo uint8_t.
- // It is used to detect uint8_t arrays to hexdump them.
- cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`)
-)
-
-// dumpState contains information about the state of a dump operation.
-type dumpState struct {
- w io.Writer
- depth int
- pointers map[uintptr]int
- ignoreNextType bool
- ignoreNextIndent bool
- cs *ConfigState
-}
-
-// indent performs indentation according to the depth level and cs.Indent
-// option.
-func (d *dumpState) indent() {
- if d.ignoreNextIndent {
- d.ignoreNextIndent = false
- return
- }
- d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth))
-}
-
-// unpackValue returns values inside of non-nil interfaces when possible.
-// This is useful for data types like structs, arrays, slices, and maps which
-// can contain varying types packed inside an interface.
-func (d *dumpState) unpackValue(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Interface && !v.IsNil() {
- v = v.Elem()
- }
- return v
-}
-
-// dumpPtr handles formatting of pointers by indirecting them as necessary.
-func (d *dumpState) dumpPtr(v reflect.Value) {
- // Remove pointers at or below the current depth from map used to detect
- // circular refs.
- for k, depth := range d.pointers {
- if depth >= d.depth {
- delete(d.pointers, k)
- }
- }
-
- // Keep list of all dereferenced pointers to show later.
- pointerChain := make([]uintptr, 0)
-
- // Figure out how many levels of indirection there are by dereferencing
- // pointers and unpacking interfaces down the chain while detecting circular
- // references.
- nilFound := false
- cycleFound := false
- indirects := 0
- ve := v
- for ve.Kind() == reflect.Ptr {
- if ve.IsNil() {
- nilFound = true
- break
- }
- indirects++
- addr := ve.Pointer()
- pointerChain = append(pointerChain, addr)
- if pd, ok := d.pointers[addr]; ok && pd < d.depth {
- cycleFound = true
- indirects--
- break
- }
- d.pointers[addr] = d.depth
-
- ve = ve.Elem()
- if ve.Kind() == reflect.Interface {
- if ve.IsNil() {
- nilFound = true
- break
- }
- ve = ve.Elem()
- }
- }
-
- // Display type information.
- d.w.Write(openParenBytes)
- d.w.Write(bytes.Repeat(asteriskBytes, indirects))
- d.w.Write([]byte(ve.Type().String()))
- d.w.Write(closeParenBytes)
-
- // Display pointer information.
- if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 {
- d.w.Write(openParenBytes)
- for i, addr := range pointerChain {
- if i > 0 {
- d.w.Write(pointerChainBytes)
- }
- printHexPtr(d.w, addr)
- }
- d.w.Write(closeParenBytes)
- }
-
- // Display dereferenced value.
- d.w.Write(openParenBytes)
- switch {
- case nilFound:
- d.w.Write(nilAngleBytes)
-
- case cycleFound:
- d.w.Write(circularBytes)
-
- default:
- d.ignoreNextType = true
- d.dump(ve)
- }
- d.w.Write(closeParenBytes)
-}
-
-// dumpSlice handles formatting of arrays and slices. Byte (uint8 under
-// reflection) arrays and slices are dumped in hexdump -C fashion.
-func (d *dumpState) dumpSlice(v reflect.Value) {
- // Determine whether this type should be hex dumped or not. Also,
- // for types which should be hexdumped, try to use the underlying data
- // first, then fall back to trying to convert them to a uint8 slice.
- var buf []uint8
- doConvert := false
- doHexDump := false
- numEntries := v.Len()
- if numEntries > 0 {
- vt := v.Index(0).Type()
- vts := vt.String()
- switch {
- // C types that need to be converted.
- case cCharRE.MatchString(vts):
- fallthrough
- case cUnsignedCharRE.MatchString(vts):
- fallthrough
- case cUint8tCharRE.MatchString(vts):
- doConvert = true
-
- // Try to use existing uint8 slices and fall back to converting
- // and copying if that fails.
- case vt.Kind() == reflect.Uint8:
- // We need an addressable interface to convert the type
- // to a byte slice. However, the reflect package won't
- // give us an interface on certain things like
- // unexported struct fields in order to enforce
- // visibility rules. We use unsafe, when available, to
- // bypass these restrictions since this package does not
- // mutate the values.
- vs := v
- if !vs.CanInterface() || !vs.CanAddr() {
- vs = unsafeReflectValue(vs)
- }
- if !UnsafeDisabled {
- vs = vs.Slice(0, numEntries)
-
- // Use the existing uint8 slice if it can be
- // type asserted.
- iface := vs.Interface()
- if slice, ok := iface.([]uint8); ok {
- buf = slice
- doHexDump = true
- break
- }
- }
-
- // The underlying data needs to be converted if it can't
- // be type asserted to a uint8 slice.
- doConvert = true
- }
-
- // Copy and convert the underlying type if needed.
- if doConvert && vt.ConvertibleTo(uint8Type) {
- // Convert and copy each element into a uint8 byte
- // slice.
- buf = make([]uint8, numEntries)
- for i := 0; i < numEntries; i++ {
- vv := v.Index(i)
- buf[i] = uint8(vv.Convert(uint8Type).Uint())
- }
- doHexDump = true
- }
- }
-
- // Hexdump the entire slice as needed.
- if doHexDump {
- indent := strings.Repeat(d.cs.Indent, d.depth)
- str := indent + hex.Dump(buf)
- str = strings.Replace(str, "\n", "\n"+indent, -1)
- str = strings.TrimRight(str, d.cs.Indent)
- d.w.Write([]byte(str))
- return
- }
-
- // Recursively call dump for each item.
- for i := 0; i < numEntries; i++ {
- d.dump(d.unpackValue(v.Index(i)))
- if i < (numEntries - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
-}
-
-// dump is the main workhorse for dumping a value. It uses the passed reflect
-// value to figure out what kind of object we are dealing with and formats it
-// appropriately. It is a recursive function, however circular data structures
-// are detected and handled properly.
-func (d *dumpState) dump(v reflect.Value) {
- // Handle invalid reflect values immediately.
- kind := v.Kind()
- if kind == reflect.Invalid {
- d.w.Write(invalidAngleBytes)
- return
- }
-
- // Handle pointers specially.
- if kind == reflect.Ptr {
- d.indent()
- d.dumpPtr(v)
- return
- }
-
- // Print type information unless already handled elsewhere.
- if !d.ignoreNextType {
- d.indent()
- d.w.Write(openParenBytes)
- d.w.Write([]byte(v.Type().String()))
- d.w.Write(closeParenBytes)
- d.w.Write(spaceBytes)
- }
- d.ignoreNextType = false
-
- // Display length and capacity if the built-in len and cap functions
- // work with the value's kind and the len/cap itself is non-zero.
- valueLen, valueCap := 0, 0
- switch v.Kind() {
- case reflect.Array, reflect.Slice, reflect.Chan:
- valueLen, valueCap = v.Len(), v.Cap()
- case reflect.Map, reflect.String:
- valueLen = v.Len()
- }
- if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 {
- d.w.Write(openParenBytes)
- if valueLen != 0 {
- d.w.Write(lenEqualsBytes)
- printInt(d.w, int64(valueLen), 10)
- }
- if !d.cs.DisableCapacities && valueCap != 0 {
- if valueLen != 0 {
- d.w.Write(spaceBytes)
- }
- d.w.Write(capEqualsBytes)
- printInt(d.w, int64(valueCap), 10)
- }
- d.w.Write(closeParenBytes)
- d.w.Write(spaceBytes)
- }
-
- // Call Stringer/error interfaces if they exist and the handle methods flag
- // is enabled
- if !d.cs.DisableMethods {
- if (kind != reflect.Invalid) && (kind != reflect.Interface) {
- if handled := handleMethods(d.cs, d.w, v); handled {
- return
- }
- }
- }
-
- switch kind {
- case reflect.Invalid:
- // Do nothing. We should never get here since invalid has already
- // been handled above.
-
- case reflect.Bool:
- printBool(d.w, v.Bool())
-
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- printInt(d.w, v.Int(), 10)
-
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- printUint(d.w, v.Uint(), 10)
-
- case reflect.Float32:
- printFloat(d.w, v.Float(), 32)
-
- case reflect.Float64:
- printFloat(d.w, v.Float(), 64)
-
- case reflect.Complex64:
- printComplex(d.w, v.Complex(), 32)
-
- case reflect.Complex128:
- printComplex(d.w, v.Complex(), 64)
-
- case reflect.Slice:
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- break
- }
- fallthrough
-
- case reflect.Array:
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- d.dumpSlice(v)
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.String:
- d.w.Write([]byte(strconv.Quote(v.String())))
-
- case reflect.Interface:
- // The only time we should get here is for nil interfaces due to
- // unpackValue calls.
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- }
-
- case reflect.Ptr:
- // Do nothing. We should never get here since pointers have already
- // been handled above.
-
- case reflect.Map:
- // nil maps should be indicated as different than empty maps
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- break
- }
-
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- numEntries := v.Len()
- keys := v.MapKeys()
- if d.cs.SortKeys {
- sortValues(keys, d.cs)
- }
- for i, key := range keys {
- d.dump(d.unpackValue(key))
- d.w.Write(colonSpaceBytes)
- d.ignoreNextIndent = true
- d.dump(d.unpackValue(v.MapIndex(key)))
- if i < (numEntries - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.Struct:
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- vt := v.Type()
- numFields := v.NumField()
- for i := 0; i < numFields; i++ {
- d.indent()
- vtf := vt.Field(i)
- d.w.Write([]byte(vtf.Name))
- d.w.Write(colonSpaceBytes)
- d.ignoreNextIndent = true
- d.dump(d.unpackValue(v.Field(i)))
- if i < (numFields - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.Uintptr:
- printHexPtr(d.w, uintptr(v.Uint()))
-
- case reflect.UnsafePointer, reflect.Chan, reflect.Func:
- printHexPtr(d.w, v.Pointer())
-
- // There were not any other types at the time this code was written, but
- // fall back to letting the default fmt package handle it in case any new
- // types are added.
- default:
- if v.CanInterface() {
- fmt.Fprintf(d.w, "%v", v.Interface())
- } else {
- fmt.Fprintf(d.w, "%v", v.String())
- }
- }
-}
-
-// fdump is a helper function to consolidate the logic from the various public
-// methods which take varying writers and config states.
-func fdump(cs *ConfigState, w io.Writer, a ...interface{}) {
- for _, arg := range a {
- if arg == nil {
- w.Write(interfaceBytes)
- w.Write(spaceBytes)
- w.Write(nilAngleBytes)
- w.Write(newlineBytes)
- continue
- }
-
- d := dumpState{w: w, cs: cs}
- d.pointers = make(map[uintptr]int)
- d.dump(reflect.ValueOf(arg))
- d.w.Write(newlineBytes)
- }
-}
-
-// Fdump formats and displays the passed arguments to io.Writer w. It formats
-// exactly the same as Dump.
-func Fdump(w io.Writer, a ...interface{}) {
- fdump(&Config, w, a...)
-}
-
-// Sdump returns a string with the passed arguments formatted exactly the same
-// as Dump.
-func Sdump(a ...interface{}) string {
- var buf bytes.Buffer
- fdump(&Config, &buf, a...)
- return buf.String()
-}
-
-/*
-Dump displays the passed parameters to standard out with newlines, customizable
-indentation, and additional debug information such as complete types and all
-pointer addresses used to indirect to the final value. It provides the
-following features over the built-in printing facilities provided by the fmt
-package:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output
-
-The configuration options are controlled by an exported package global,
-spew.Config. See ConfigState for options documentation.
-
-See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
-get the formatted result as a string.
-*/
-func Dump(a ...interface{}) {
- fdump(&Config, os.Stdout, a...)
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go
deleted file mode 100644
index b04edb7d7..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/format.go
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "strconv"
- "strings"
-)
-
-// supportedFlags is a list of all the character flags supported by fmt package.
-const supportedFlags = "0-+# "
-
-// formatState implements the fmt.Formatter interface and contains information
-// about the state of a formatting operation. The NewFormatter function can
-// be used to get a new Formatter which can be used directly as arguments
-// in standard fmt package printing calls.
-type formatState struct {
- value interface{}
- fs fmt.State
- depth int
- pointers map[uintptr]int
- ignoreNextType bool
- cs *ConfigState
-}
-
-// buildDefaultFormat recreates the original format string without precision
-// and width information to pass in to fmt.Sprintf in the case of an
-// unrecognized type. Unless new types are added to the language, this
-// function won't ever be called.
-func (f *formatState) buildDefaultFormat() (format string) {
- buf := bytes.NewBuffer(percentBytes)
-
- for _, flag := range supportedFlags {
- if f.fs.Flag(int(flag)) {
- buf.WriteRune(flag)
- }
- }
-
- buf.WriteRune('v')
-
- format = buf.String()
- return format
-}
-
-// constructOrigFormat recreates the original format string including precision
-// and width information to pass along to the standard fmt package. This allows
-// automatic deferral of all format strings this package doesn't support.
-func (f *formatState) constructOrigFormat(verb rune) (format string) {
- buf := bytes.NewBuffer(percentBytes)
-
- for _, flag := range supportedFlags {
- if f.fs.Flag(int(flag)) {
- buf.WriteRune(flag)
- }
- }
-
- if width, ok := f.fs.Width(); ok {
- buf.WriteString(strconv.Itoa(width))
- }
-
- if precision, ok := f.fs.Precision(); ok {
- buf.Write(precisionBytes)
- buf.WriteString(strconv.Itoa(precision))
- }
-
- buf.WriteRune(verb)
-
- format = buf.String()
- return format
-}
-
-// unpackValue returns values inside of non-nil interfaces when possible and
-// ensures that types for values which have been unpacked from an interface
-// are displayed when the show types flag is also set.
-// This is useful for data types like structs, arrays, slices, and maps which
-// can contain varying types packed inside an interface.
-func (f *formatState) unpackValue(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Interface {
- f.ignoreNextType = false
- if !v.IsNil() {
- v = v.Elem()
- }
- }
- return v
-}
-
-// formatPtr handles formatting of pointers by indirecting them as necessary.
-func (f *formatState) formatPtr(v reflect.Value) {
- // Display nil if top level pointer is nil.
- showTypes := f.fs.Flag('#')
- if v.IsNil() && (!showTypes || f.ignoreNextType) {
- f.fs.Write(nilAngleBytes)
- return
- }
-
- // Remove pointers at or below the current depth from map used to detect
- // circular refs.
- for k, depth := range f.pointers {
- if depth >= f.depth {
- delete(f.pointers, k)
- }
- }
-
- // Keep list of all dereferenced pointers to possibly show later.
- pointerChain := make([]uintptr, 0)
-
- // Figure out how many levels of indirection there are by derferencing
- // pointers and unpacking interfaces down the chain while detecting circular
- // references.
- nilFound := false
- cycleFound := false
- indirects := 0
- ve := v
- for ve.Kind() == reflect.Ptr {
- if ve.IsNil() {
- nilFound = true
- break
- }
- indirects++
- addr := ve.Pointer()
- pointerChain = append(pointerChain, addr)
- if pd, ok := f.pointers[addr]; ok && pd < f.depth {
- cycleFound = true
- indirects--
- break
- }
- f.pointers[addr] = f.depth
-
- ve = ve.Elem()
- if ve.Kind() == reflect.Interface {
- if ve.IsNil() {
- nilFound = true
- break
- }
- ve = ve.Elem()
- }
- }
-
- // Display type or indirection level depending on flags.
- if showTypes && !f.ignoreNextType {
- f.fs.Write(openParenBytes)
- f.fs.Write(bytes.Repeat(asteriskBytes, indirects))
- f.fs.Write([]byte(ve.Type().String()))
- f.fs.Write(closeParenBytes)
- } else {
- if nilFound || cycleFound {
- indirects += strings.Count(ve.Type().String(), "*")
- }
- f.fs.Write(openAngleBytes)
- f.fs.Write([]byte(strings.Repeat("*", indirects)))
- f.fs.Write(closeAngleBytes)
- }
-
- // Display pointer information depending on flags.
- if f.fs.Flag('+') && (len(pointerChain) > 0) {
- f.fs.Write(openParenBytes)
- for i, addr := range pointerChain {
- if i > 0 {
- f.fs.Write(pointerChainBytes)
- }
- printHexPtr(f.fs, addr)
- }
- f.fs.Write(closeParenBytes)
- }
-
- // Display dereferenced value.
- switch {
- case nilFound:
- f.fs.Write(nilAngleBytes)
-
- case cycleFound:
- f.fs.Write(circularShortBytes)
-
- default:
- f.ignoreNextType = true
- f.format(ve)
- }
-}
-
-// format is the main workhorse for providing the Formatter interface. It
-// uses the passed reflect value to figure out what kind of object we are
-// dealing with and formats it appropriately. It is a recursive function,
-// however circular data structures are detected and handled properly.
-func (f *formatState) format(v reflect.Value) {
- // Handle invalid reflect values immediately.
- kind := v.Kind()
- if kind == reflect.Invalid {
- f.fs.Write(invalidAngleBytes)
- return
- }
-
- // Handle pointers specially.
- if kind == reflect.Ptr {
- f.formatPtr(v)
- return
- }
-
- // Print type information unless already handled elsewhere.
- if !f.ignoreNextType && f.fs.Flag('#') {
- f.fs.Write(openParenBytes)
- f.fs.Write([]byte(v.Type().String()))
- f.fs.Write(closeParenBytes)
- }
- f.ignoreNextType = false
-
- // Call Stringer/error interfaces if they exist and the handle methods
- // flag is enabled.
- if !f.cs.DisableMethods {
- if (kind != reflect.Invalid) && (kind != reflect.Interface) {
- if handled := handleMethods(f.cs, f.fs, v); handled {
- return
- }
- }
- }
-
- switch kind {
- case reflect.Invalid:
- // Do nothing. We should never get here since invalid has already
- // been handled above.
-
- case reflect.Bool:
- printBool(f.fs, v.Bool())
-
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- printInt(f.fs, v.Int(), 10)
-
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- printUint(f.fs, v.Uint(), 10)
-
- case reflect.Float32:
- printFloat(f.fs, v.Float(), 32)
-
- case reflect.Float64:
- printFloat(f.fs, v.Float(), 64)
-
- case reflect.Complex64:
- printComplex(f.fs, v.Complex(), 32)
-
- case reflect.Complex128:
- printComplex(f.fs, v.Complex(), 64)
-
- case reflect.Slice:
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- break
- }
- fallthrough
-
- case reflect.Array:
- f.fs.Write(openBracketBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- numEntries := v.Len()
- for i := 0; i < numEntries; i++ {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- f.ignoreNextType = true
- f.format(f.unpackValue(v.Index(i)))
- }
- }
- f.depth--
- f.fs.Write(closeBracketBytes)
-
- case reflect.String:
- f.fs.Write([]byte(v.String()))
-
- case reflect.Interface:
- // The only time we should get here is for nil interfaces due to
- // unpackValue calls.
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- }
-
- case reflect.Ptr:
- // Do nothing. We should never get here since pointers have already
- // been handled above.
-
- case reflect.Map:
- // nil maps should be indicated as different than empty maps
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- break
- }
-
- f.fs.Write(openMapBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- keys := v.MapKeys()
- if f.cs.SortKeys {
- sortValues(keys, f.cs)
- }
- for i, key := range keys {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- f.ignoreNextType = true
- f.format(f.unpackValue(key))
- f.fs.Write(colonBytes)
- f.ignoreNextType = true
- f.format(f.unpackValue(v.MapIndex(key)))
- }
- }
- f.depth--
- f.fs.Write(closeMapBytes)
-
- case reflect.Struct:
- numFields := v.NumField()
- f.fs.Write(openBraceBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- vt := v.Type()
- for i := 0; i < numFields; i++ {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- vtf := vt.Field(i)
- if f.fs.Flag('+') || f.fs.Flag('#') {
- f.fs.Write([]byte(vtf.Name))
- f.fs.Write(colonBytes)
- }
- f.format(f.unpackValue(v.Field(i)))
- }
- }
- f.depth--
- f.fs.Write(closeBraceBytes)
-
- case reflect.Uintptr:
- printHexPtr(f.fs, uintptr(v.Uint()))
-
- case reflect.UnsafePointer, reflect.Chan, reflect.Func:
- printHexPtr(f.fs, v.Pointer())
-
- // There were not any other types at the time this code was written, but
- // fall back to letting the default fmt package handle it if any get added.
- default:
- format := f.buildDefaultFormat()
- if v.CanInterface() {
- fmt.Fprintf(f.fs, format, v.Interface())
- } else {
- fmt.Fprintf(f.fs, format, v.String())
- }
- }
-}
-
-// Format satisfies the fmt.Formatter interface. See NewFormatter for usage
-// details.
-func (f *formatState) Format(fs fmt.State, verb rune) {
- f.fs = fs
-
- // Use standard formatting for verbs that are not v.
- if verb != 'v' {
- format := f.constructOrigFormat(verb)
- fmt.Fprintf(fs, format, f.value)
- return
- }
-
- if f.value == nil {
- if fs.Flag('#') {
- fs.Write(interfaceBytes)
- }
- fs.Write(nilAngleBytes)
- return
- }
-
- f.format(reflect.ValueOf(f.value))
-}
-
-// newFormatter is a helper function to consolidate the logic from the various
-// public methods which take varying config states.
-func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter {
- fs := &formatState{value: v, cs: cs}
- fs.pointers = make(map[uintptr]int)
- return fs
-}
-
-/*
-NewFormatter returns a custom formatter that satisfies the fmt.Formatter
-interface. As a result, it integrates cleanly with standard fmt package
-printing functions. The formatter is useful for inline printing of smaller data
-types similar to the standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Typically this function shouldn't be called directly. It is much easier to make
-use of the custom formatter by calling one of the convenience functions such as
-Printf, Println, or Fprintf.
-*/
-func NewFormatter(v interface{}) fmt.Formatter {
- return newFormatter(&Config, v)
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/davecgh/go-spew/spew/spew.go
deleted file mode 100644
index 32c0e3388..000000000
--- a/vendor/github.com/davecgh/go-spew/spew/spew.go
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "fmt"
- "io"
-)
-
-// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the formatted string as a value that satisfies error. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Errorf(format string, a ...interface{}) (err error) {
- return fmt.Errorf(format, convertArgs(a)...)
-}
-
-// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprint(w, convertArgs(a)...)
-}
-
-// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- return fmt.Fprintf(w, format, convertArgs(a)...)
-}
-
-// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
-// passed with a default Formatter interface returned by NewFormatter. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprintln(w, convertArgs(a)...)
-}
-
-// Print is a wrapper for fmt.Print that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b))
-func Print(a ...interface{}) (n int, err error) {
- return fmt.Print(convertArgs(a)...)
-}
-
-// Printf is a wrapper for fmt.Printf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Printf(format string, a ...interface{}) (n int, err error) {
- return fmt.Printf(format, convertArgs(a)...)
-}
-
-// Println is a wrapper for fmt.Println that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b))
-func Println(a ...interface{}) (n int, err error) {
- return fmt.Println(convertArgs(a)...)
-}
-
-// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprint(a ...interface{}) string {
- return fmt.Sprint(convertArgs(a)...)
-}
-
-// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprintf(format string, a ...interface{}) string {
- return fmt.Sprintf(format, convertArgs(a)...)
-}
-
-// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
-// were passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprintln(a ...interface{}) string {
- return fmt.Sprintln(convertArgs(a)...)
-}
-
-// convertArgs accepts a slice of arguments and returns a slice of the same
-// length with each argument converted to a default spew Formatter interface.
-func convertArgs(args []interface{}) (formatters []interface{}) {
- formatters = make([]interface{}, len(args))
- for index, arg := range args {
- formatters[index] = NewFormatter(arg)
- }
- return formatters
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/.gitignore b/vendor/github.com/dgrijalva/jwt-go/.gitignore
deleted file mode 100644
index 80bed650e..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-bin
-
-
diff --git a/vendor/github.com/dgrijalva/jwt-go/.travis.yml b/vendor/github.com/dgrijalva/jwt-go/.travis.yml
deleted file mode 100644
index 1027f56cd..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: go
-
-script:
- - go vet ./...
- - go test -v ./...
-
-go:
- - 1.3
- - 1.4
- - 1.5
- - 1.6
- - 1.7
- - tip
diff --git a/vendor/github.com/dgrijalva/jwt-go/LICENSE b/vendor/github.com/dgrijalva/jwt-go/LICENSE
deleted file mode 100644
index df83a9c2f..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/LICENSE
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) 2012 Dave Grijalva
-
-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/dgrijalva/jwt-go/MIGRATION_GUIDE.md b/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md
deleted file mode 100644
index 7fc1f793c..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md
+++ /dev/null
@@ -1,97 +0,0 @@
-## Migration Guide from v2 -> v3
-
-Version 3 adds several new, frequently requested features. To do so, it introduces a few breaking changes. We've worked to keep these as minimal as possible. This guide explains the breaking changes and how you can quickly update your code.
-
-### `Token.Claims` is now an interface type
-
-The most requested feature from the 2.0 verison of this library was the ability to provide a custom type to the JSON parser for claims. This was implemented by introducing a new interface, `Claims`, to replace `map[string]interface{}`. We also included two concrete implementations of `Claims`: `MapClaims` and `StandardClaims`.
-
-`MapClaims` is an alias for `map[string]interface{}` with built in validation behavior. It is the default claims type when using `Parse`. The usage is unchanged except you must type cast the claims property.
-
-The old example for parsing a token looked like this..
-
-```go
- if token, err := jwt.Parse(tokenString, keyLookupFunc); err == nil {
- fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"])
- }
-```
-
-is now directly mapped to...
-
-```go
- if token, err := jwt.Parse(tokenString, keyLookupFunc); err == nil {
- claims := token.Claims.(jwt.MapClaims)
- fmt.Printf("Token for user %v expires %v", claims["user"], claims["exp"])
- }
-```
-
-`StandardClaims` is designed to be embedded in your custom type. You can supply a custom claims type with the new `ParseWithClaims` function. Here's an example of using a custom claims type.
-
-```go
- type MyCustomClaims struct {
- User string
- *StandardClaims
- }
-
- if token, err := jwt.ParseWithClaims(tokenString, &MyCustomClaims{}, keyLookupFunc); err == nil {
- claims := token.Claims.(*MyCustomClaims)
- fmt.Printf("Token for user %v expires %v", claims.User, claims.StandardClaims.ExpiresAt)
- }
-```
-
-### `ParseFromRequest` has been moved
-
-To keep this library focused on the tokens without becoming overburdened with complex request processing logic, `ParseFromRequest` and its new companion `ParseFromRequestWithClaims` have been moved to a subpackage, `request`. The method signatues have also been augmented to receive a new argument: `Extractor`.
-
-`Extractors` do the work of picking the token string out of a request. The interface is simple and composable.
-
-This simple parsing example:
-
-```go
- if token, err := jwt.ParseFromRequest(tokenString, req, keyLookupFunc); err == nil {
- fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"])
- }
-```
-
-is directly mapped to:
-
-```go
- if token, err := request.ParseFromRequest(req, request.OAuth2Extractor, keyLookupFunc); err == nil {
- claims := token.Claims.(jwt.MapClaims)
- fmt.Printf("Token for user %v expires %v", claims["user"], claims["exp"])
- }
-```
-
-There are several concrete `Extractor` types provided for your convenience:
-
-* `HeaderExtractor` will search a list of headers until one contains content.
-* `ArgumentExtractor` will search a list of keys in request query and form arguments until one contains content.
-* `MultiExtractor` will try a list of `Extractors` in order until one returns content.
-* `AuthorizationHeaderExtractor` will look in the `Authorization` header for a `Bearer` token.
-* `OAuth2Extractor` searches the places an OAuth2 token would be specified (per the spec): `Authorization` header and `access_token` argument
-* `PostExtractionFilter` wraps an `Extractor`, allowing you to process the content before it's parsed. A simple example is stripping the `Bearer ` text from a header
-
-
-### RSA signing methods no longer accept `[]byte` keys
-
-Due to a [critical vulnerability](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/), we've decided the convenience of accepting `[]byte` instead of `rsa.PublicKey` or `rsa.PrivateKey` isn't worth the risk of misuse.
-
-To replace this behavior, we've added two helper methods: `ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error)` and `ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error)`. These are just simple helpers for unpacking PEM encoded PKCS1 and PKCS8 keys. If your keys are encoded any other way, all you need to do is convert them to the `crypto/rsa` package's types.
-
-```go
- func keyLookupFunc(*Token) (interface{}, error) {
- // Don't forget to validate the alg is what you expect:
- if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok {
- return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"])
- }
-
- // Look up key
- key, err := lookupPublicKey(token.Header["kid"])
- if err != nil {
- return nil, err
- }
-
- // Unpack key from PEM encoded PKCS8
- return jwt.ParseRSAPublicKeyFromPEM(key)
- }
-```
diff --git a/vendor/github.com/dgrijalva/jwt-go/README.md b/vendor/github.com/dgrijalva/jwt-go/README.md
deleted file mode 100644
index d358d881b..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/README.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# jwt-go
-
-[](https://travis-ci.org/dgrijalva/jwt-go)
-[](https://godoc.org/github.com/dgrijalva/jwt-go)
-
-A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html)
-
-**NEW VERSION COMING:** There have been a lot of improvements suggested since the version 3.0.0 released in 2016. I'm working now on cutting two different releases: 3.2.0 will contain any non-breaking changes or enhancements. 4.0.0 will follow shortly which will include breaking changes. See the 4.0.0 milestone to get an idea of what's coming. If you have other ideas, or would like to participate in 4.0.0, now's the time. If you depend on this library and don't want to be interrupted, I recommend you use your dependency mangement tool to pin to version 3.
-
-**SECURITY NOTICE:** Some older versions of Go have a security issue in the cryotp/elliptic. Recommendation is to upgrade to at least 1.8.3. See issue #216 for more detail.
-
-**SECURITY NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage. See the examples provided.
-
-## What the heck is a JWT?
-
-JWT.io has [a great introduction](https://jwt.io/introduction) to JSON Web Tokens.
-
-In short, it's a signed JSON object that does something useful (for example, authentication). It's commonly used for `Bearer` tokens in Oauth 2. A token is made of three parts, separated by `.`'s. The first two parts are JSON objects, that have been [base64url](http://tools.ietf.org/html/rfc4648) encoded. The last part is the signature, encoded the same way.
-
-The first part is called the header. It contains the necessary information for verifying the last part, the signature. For example, which encryption method was used for signing and what key was used.
-
-The part in the middle is the interesting bit. It's called the Claims and contains the actual stuff you care about. Refer to [the RFC](http://self-issued.info/docs/draft-jones-json-web-token.html) for information about reserved keys and the proper way to add your own.
-
-## What's in the box?
-
-This library supports the parsing and verification as well as the generation and signing of JWTs. Current supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own.
-
-## Examples
-
-See [the project documentation](https://godoc.org/github.com/dgrijalva/jwt-go) for examples of usage:
-
-* [Simple example of parsing and validating a token](https://godoc.org/github.com/dgrijalva/jwt-go#example-Parse--Hmac)
-* [Simple example of building and signing a token](https://godoc.org/github.com/dgrijalva/jwt-go#example-New--Hmac)
-* [Directory of Examples](https://godoc.org/github.com/dgrijalva/jwt-go#pkg-examples)
-
-## Extensions
-
-This library publishes all the necessary components for adding your own signing methods. Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod`.
-
-Here's an example of an extension that integrates with the Google App Engine signing tools: https://github.com/someone1/gcp-jwt-go
-
-## Compliance
-
-This library was last reviewed to comply with [RTF 7519](http://www.rfc-editor.org/info/rfc7519) dated May 2015 with a few notable differences:
-
-* In order to protect against accidental use of [Unsecured JWTs](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#UnsecuredJWT), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key.
-
-## Project Status & Versioning
-
-This library is considered production ready. Feedback and feature requests are appreciated. The API should be considered stable. There should be very few backwards-incompatible changes outside of major version updates (and only with good reason).
-
-This project uses [Semantic Versioning 2.0.0](http://semver.org). Accepted pull requests will land on `master`. Periodically, versions will be tagged from `master`. You can find all the releases on [the project releases page](https://github.com/dgrijalva/jwt-go/releases).
-
-While we try to make it obvious when we make breaking changes, there isn't a great mechanism for pushing announcements out to users. You may want to use this alternative package include: `gopkg.in/dgrijalva/jwt-go.v3`. It will do the right thing WRT semantic versioning.
-
-**BREAKING CHANGES:***
-* Version 3.0.0 includes _a lot_ of changes from the 2.x line, including a few that break the API. We've tried to break as few things as possible, so there should just be a few type signature changes. A full list of breaking changes is available in `VERSION_HISTORY.md`. See `MIGRATION_GUIDE.md` for more information on updating your code.
-
-## Usage Tips
-
-### Signing vs Encryption
-
-A token is simply a JSON object that is signed by its author. this tells you exactly two things about the data:
-
-* The author of the token was in the possession of the signing secret
-* The data has not been modified since it was signed
-
-It's important to know that JWT does not provide encryption, which means anyone who has access to the token can read its contents. If you need to protect (encrypt) the data, there is a companion spec, `JWE`, that provides this functionality. JWE is currently outside the scope of this library.
-
-### Choosing a Signing Method
-
-There are several signing methods available, and you should probably take the time to learn about the various options before choosing one. The principal design decision is most likely going to be symmetric vs asymmetric.
-
-Symmetric signing methods, such as HSA, use only a single secret. This is probably the simplest signing method to use since any `[]byte` can be used as a valid secret. They are also slightly computationally faster to use, though this rarely is enough to matter. Symmetric signing methods work the best when both producers and consumers of tokens are trusted, or even the same system. Since the same secret is used to both sign and validate tokens, you can't easily distribute the key for validation.
-
-Asymmetric signing methods, such as RSA, use different keys for signing and verifying tokens. This makes it possible to produce tokens with a private key, and allow any consumer to access the public key for verification.
-
-### Signing Methods and Key Types
-
-Each signing method expects a different object type for its signing keys. See the package documentation for details. Here are the most common ones:
-
-* The [HMAC signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodHMAC) (`HS256`,`HS384`,`HS512`) expect `[]byte` values for signing and validation
-* The [RSA signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodRSA) (`RS256`,`RS384`,`RS512`) expect `*rsa.PrivateKey` for signing and `*rsa.PublicKey` for validation
-* The [ECDSA signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodECDSA) (`ES256`,`ES384`,`ES512`) expect `*ecdsa.PrivateKey` for signing and `*ecdsa.PublicKey` for validation
-
-### JWT and OAuth
-
-It's worth mentioning that OAuth and JWT are not the same thing. A JWT token is simply a signed JSON object. It can be used anywhere such a thing is useful. There is some confusion, though, as JWT is the most common type of bearer token used in OAuth2 authentication.
-
-Without going too far down the rabbit hole, here's a description of the interaction of these technologies:
-
-* OAuth is a protocol for allowing an identity provider to be separate from the service a user is logging in to. For example, whenever you use Facebook to log into a different service (Yelp, Spotify, etc), you are using OAuth.
-* OAuth defines several options for passing around authentication data. One popular method is called a "bearer token". A bearer token is simply a string that _should_ only be held by an authenticated user. Thus, simply presenting this token proves your identity. You can probably derive from here why a JWT might make a good bearer token.
-* Because bearer tokens are used for authentication, it's important they're kept secret. This is why transactions that use bearer tokens typically happen over SSL.
-
-## More
-
-Documentation can be found [on godoc.org](http://godoc.org/github.com/dgrijalva/jwt-go).
-
-The command line utility included in this project (cmd/jwt) provides a straightforward example of token creation and parsing as well as a useful tool for debugging your own integration. You'll also find several implementation examples in the documentation.
diff --git a/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md b/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md
deleted file mode 100644
index 637029831..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md
+++ /dev/null
@@ -1,118 +0,0 @@
-## `jwt-go` Version History
-
-#### 3.2.0
-
-* Added method `ParseUnverified` to allow users to split up the tasks of parsing and validation
-* HMAC signing method returns `ErrInvalidKeyType` instead of `ErrInvalidKey` where appropriate
-* Added options to `request.ParseFromRequest`, which allows for an arbitrary list of modifiers to parsing behavior. Initial set include `WithClaims` and `WithParser`. Existing usage of this function will continue to work as before.
-* Deprecated `ParseFromRequestWithClaims` to simplify API in the future.
-
-#### 3.1.0
-
-* Improvements to `jwt` command line tool
-* Added `SkipClaimsValidation` option to `Parser`
-* Documentation updates
-
-#### 3.0.0
-
-* **Compatibility Breaking Changes**: See MIGRATION_GUIDE.md for tips on updating your code
- * Dropped support for `[]byte` keys when using RSA signing methods. This convenience feature could contribute to security vulnerabilities involving mismatched key types with signing methods.
- * `ParseFromRequest` has been moved to `request` subpackage and usage has changed
- * The `Claims` property on `Token` is now type `Claims` instead of `map[string]interface{}`. The default value is type `MapClaims`, which is an alias to `map[string]interface{}`. This makes it possible to use a custom type when decoding claims.
-* Other Additions and Changes
- * Added `Claims` interface type to allow users to decode the claims into a custom type
- * Added `ParseWithClaims`, which takes a third argument of type `Claims`. Use this function instead of `Parse` if you have a custom type you'd like to decode into.
- * Dramatically improved the functionality and flexibility of `ParseFromRequest`, which is now in the `request` subpackage
- * Added `ParseFromRequestWithClaims` which is the `FromRequest` equivalent of `ParseWithClaims`
- * Added new interface type `Extractor`, which is used for extracting JWT strings from http requests. Used with `ParseFromRequest` and `ParseFromRequestWithClaims`.
- * Added several new, more specific, validation errors to error type bitmask
- * Moved examples from README to executable example files
- * Signing method registry is now thread safe
- * Added new property to `ValidationError`, which contains the raw error returned by calls made by parse/verify (such as those returned by keyfunc or json parser)
-
-#### 2.7.0
-
-This will likely be the last backwards compatible release before 3.0.0, excluding essential bug fixes.
-
-* Added new option `-show` to the `jwt` command that will just output the decoded token without verifying
-* Error text for expired tokens includes how long it's been expired
-* Fixed incorrect error returned from `ParseRSAPublicKeyFromPEM`
-* Documentation updates
-
-#### 2.6.0
-
-* Exposed inner error within ValidationError
-* Fixed validation errors when using UseJSONNumber flag
-* Added several unit tests
-
-#### 2.5.0
-
-* Added support for signing method none. You shouldn't use this. The API tries to make this clear.
-* Updated/fixed some documentation
-* Added more helpful error message when trying to parse tokens that begin with `BEARER `
-
-#### 2.4.0
-
-* Added new type, Parser, to allow for configuration of various parsing parameters
- * You can now specify a list of valid signing methods. Anything outside this set will be rejected.
- * You can now opt to use the `json.Number` type instead of `float64` when parsing token JSON
-* Added support for [Travis CI](https://travis-ci.org/dgrijalva/jwt-go)
-* Fixed some bugs with ECDSA parsing
-
-#### 2.3.0
-
-* Added support for ECDSA signing methods
-* Added support for RSA PSS signing methods (requires go v1.4)
-
-#### 2.2.0
-
-* Gracefully handle a `nil` `Keyfunc` being passed to `Parse`. Result will now be the parsed token and an error, instead of a panic.
-
-#### 2.1.0
-
-Backwards compatible API change that was missed in 2.0.0.
-
-* The `SignedString` method on `Token` now takes `interface{}` instead of `[]byte`
-
-#### 2.0.0
-
-There were two major reasons for breaking backwards compatibility with this update. The first was a refactor required to expand the width of the RSA and HMAC-SHA signing implementations. There will likely be no required code changes to support this change.
-
-The second update, while unfortunately requiring a small change in integration, is required to open up this library to other signing methods. Not all keys used for all signing methods have a single standard on-disk representation. Requiring `[]byte` as the type for all keys proved too limiting. Additionally, this implementation allows for pre-parsed tokens to be reused, which might matter in an application that parses a high volume of tokens with a small set of keys. Backwards compatibilty has been maintained for passing `[]byte` to the RSA signing methods, but they will also accept `*rsa.PublicKey` and `*rsa.PrivateKey`.
-
-It is likely the only integration change required here will be to change `func(t *jwt.Token) ([]byte, error)` to `func(t *jwt.Token) (interface{}, error)` when calling `Parse`.
-
-* **Compatibility Breaking Changes**
- * `SigningMethodHS256` is now `*SigningMethodHMAC` instead of `type struct`
- * `SigningMethodRS256` is now `*SigningMethodRSA` instead of `type struct`
- * `KeyFunc` now returns `interface{}` instead of `[]byte`
- * `SigningMethod.Sign` now takes `interface{}` instead of `[]byte` for the key
- * `SigningMethod.Verify` now takes `interface{}` instead of `[]byte` for the key
-* Renamed type `SigningMethodHS256` to `SigningMethodHMAC`. Specific sizes are now just instances of this type.
- * Added public package global `SigningMethodHS256`
- * Added public package global `SigningMethodHS384`
- * Added public package global `SigningMethodHS512`
-* Renamed type `SigningMethodRS256` to `SigningMethodRSA`. Specific sizes are now just instances of this type.
- * Added public package global `SigningMethodRS256`
- * Added public package global `SigningMethodRS384`
- * Added public package global `SigningMethodRS512`
-* Moved sample private key for HMAC tests from an inline value to a file on disk. Value is unchanged.
-* Refactored the RSA implementation to be easier to read
-* Exposed helper methods `ParseRSAPrivateKeyFromPEM` and `ParseRSAPublicKeyFromPEM`
-
-#### 1.0.2
-
-* Fixed bug in parsing public keys from certificates
-* Added more tests around the parsing of keys for RS256
-* Code refactoring in RS256 implementation. No functional changes
-
-#### 1.0.1
-
-* Fixed panic if RS256 signing method was passed an invalid key
-
-#### 1.0.0
-
-* First versioned release
-* API stabilized
-* Supports creating, signing, parsing, and validating JWT tokens
-* Supports RS256 and HS256 signing methods
\ No newline at end of file
diff --git a/vendor/github.com/dgrijalva/jwt-go/claims.go b/vendor/github.com/dgrijalva/jwt-go/claims.go
deleted file mode 100644
index f0228f02e..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/claims.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package jwt
-
-import (
- "crypto/subtle"
- "fmt"
- "time"
-)
-
-// For a type to be a Claims object, it must just have a Valid method that determines
-// if the token is invalid for any supported reason
-type Claims interface {
- Valid() error
-}
-
-// Structured version of Claims Section, as referenced at
-// https://tools.ietf.org/html/rfc7519#section-4.1
-// See examples for how to use this with your own claim types
-type StandardClaims struct {
- Audience string `json:"aud,omitempty"`
- ExpiresAt int64 `json:"exp,omitempty"`
- Id string `json:"jti,omitempty"`
- IssuedAt int64 `json:"iat,omitempty"`
- Issuer string `json:"iss,omitempty"`
- NotBefore int64 `json:"nbf,omitempty"`
- Subject string `json:"sub,omitempty"`
-}
-
-// Validates time based claims "exp, iat, nbf".
-// There is no accounting for clock skew.
-// As well, if any of the above claims are not in the token, it will still
-// be considered a valid claim.
-func (c StandardClaims) Valid() error {
- vErr := new(ValidationError)
- now := TimeFunc().Unix()
-
- // The claims below are optional, by default, so if they are set to the
- // default value in Go, let's not fail the verification for them.
- if c.VerifyExpiresAt(now, false) == false {
- delta := time.Unix(now, 0).Sub(time.Unix(c.ExpiresAt, 0))
- vErr.Inner = fmt.Errorf("token is expired by %v", delta)
- vErr.Errors |= ValidationErrorExpired
- }
-
- if c.VerifyIssuedAt(now, false) == false {
- vErr.Inner = fmt.Errorf("Token used before issued")
- vErr.Errors |= ValidationErrorIssuedAt
- }
-
- if c.VerifyNotBefore(now, false) == false {
- vErr.Inner = fmt.Errorf("token is not valid yet")
- vErr.Errors |= ValidationErrorNotValidYet
- }
-
- if vErr.valid() {
- return nil
- }
-
- return vErr
-}
-
-// Compares the aud claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool {
- return verifyAud(c.Audience, cmp, req)
-}
-
-// Compares the exp claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool {
- return verifyExp(c.ExpiresAt, cmp, req)
-}
-
-// Compares the iat claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (c *StandardClaims) VerifyIssuedAt(cmp int64, req bool) bool {
- return verifyIat(c.IssuedAt, cmp, req)
-}
-
-// Compares the iss claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (c *StandardClaims) VerifyIssuer(cmp string, req bool) bool {
- return verifyIss(c.Issuer, cmp, req)
-}
-
-// Compares the nbf claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool {
- return verifyNbf(c.NotBefore, cmp, req)
-}
-
-// ----- helpers
-
-func verifyAud(aud string, cmp string, required bool) bool {
- if aud == "" {
- return !required
- }
- if subtle.ConstantTimeCompare([]byte(aud), []byte(cmp)) != 0 {
- return true
- } else {
- return false
- }
-}
-
-func verifyExp(exp int64, now int64, required bool) bool {
- if exp == 0 {
- return !required
- }
- return now <= exp
-}
-
-func verifyIat(iat int64, now int64, required bool) bool {
- if iat == 0 {
- return !required
- }
- return now >= iat
-}
-
-func verifyIss(iss string, cmp string, required bool) bool {
- if iss == "" {
- return !required
- }
- if subtle.ConstantTimeCompare([]byte(iss), []byte(cmp)) != 0 {
- return true
- } else {
- return false
- }
-}
-
-func verifyNbf(nbf int64, now int64, required bool) bool {
- if nbf == 0 {
- return !required
- }
- return now >= nbf
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/doc.go b/vendor/github.com/dgrijalva/jwt-go/doc.go
deleted file mode 100644
index a86dc1a3b..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/doc.go
+++ /dev/null
@@ -1,4 +0,0 @@
-// Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html
-//
-// See README.md for more info.
-package jwt
diff --git a/vendor/github.com/dgrijalva/jwt-go/ecdsa.go b/vendor/github.com/dgrijalva/jwt-go/ecdsa.go
deleted file mode 100644
index f97738124..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/ecdsa.go
+++ /dev/null
@@ -1,148 +0,0 @@
-package jwt
-
-import (
- "crypto"
- "crypto/ecdsa"
- "crypto/rand"
- "errors"
- "math/big"
-)
-
-var (
- // Sadly this is missing from crypto/ecdsa compared to crypto/rsa
- ErrECDSAVerification = errors.New("crypto/ecdsa: verification error")
-)
-
-// Implements the ECDSA family of signing methods signing methods
-// Expects *ecdsa.PrivateKey for signing and *ecdsa.PublicKey for verification
-type SigningMethodECDSA struct {
- Name string
- Hash crypto.Hash
- KeySize int
- CurveBits int
-}
-
-// Specific instances for EC256 and company
-var (
- SigningMethodES256 *SigningMethodECDSA
- SigningMethodES384 *SigningMethodECDSA
- SigningMethodES512 *SigningMethodECDSA
-)
-
-func init() {
- // ES256
- SigningMethodES256 = &SigningMethodECDSA{"ES256", crypto.SHA256, 32, 256}
- RegisterSigningMethod(SigningMethodES256.Alg(), func() SigningMethod {
- return SigningMethodES256
- })
-
- // ES384
- SigningMethodES384 = &SigningMethodECDSA{"ES384", crypto.SHA384, 48, 384}
- RegisterSigningMethod(SigningMethodES384.Alg(), func() SigningMethod {
- return SigningMethodES384
- })
-
- // ES512
- SigningMethodES512 = &SigningMethodECDSA{"ES512", crypto.SHA512, 66, 521}
- RegisterSigningMethod(SigningMethodES512.Alg(), func() SigningMethod {
- return SigningMethodES512
- })
-}
-
-func (m *SigningMethodECDSA) Alg() string {
- return m.Name
-}
-
-// Implements the Verify method from SigningMethod
-// For this verify method, key must be an ecdsa.PublicKey struct
-func (m *SigningMethodECDSA) Verify(signingString, signature string, key interface{}) error {
- var err error
-
- // Decode the signature
- var sig []byte
- if sig, err = DecodeSegment(signature); err != nil {
- return err
- }
-
- // Get the key
- var ecdsaKey *ecdsa.PublicKey
- switch k := key.(type) {
- case *ecdsa.PublicKey:
- ecdsaKey = k
- default:
- return ErrInvalidKeyType
- }
-
- if len(sig) != 2*m.KeySize {
- return ErrECDSAVerification
- }
-
- r := big.NewInt(0).SetBytes(sig[:m.KeySize])
- s := big.NewInt(0).SetBytes(sig[m.KeySize:])
-
- // Create hasher
- if !m.Hash.Available() {
- return ErrHashUnavailable
- }
- hasher := m.Hash.New()
- hasher.Write([]byte(signingString))
-
- // Verify the signature
- if verifystatus := ecdsa.Verify(ecdsaKey, hasher.Sum(nil), r, s); verifystatus == true {
- return nil
- } else {
- return ErrECDSAVerification
- }
-}
-
-// Implements the Sign method from SigningMethod
-// For this signing method, key must be an ecdsa.PrivateKey struct
-func (m *SigningMethodECDSA) Sign(signingString string, key interface{}) (string, error) {
- // Get the key
- var ecdsaKey *ecdsa.PrivateKey
- switch k := key.(type) {
- case *ecdsa.PrivateKey:
- ecdsaKey = k
- default:
- return "", ErrInvalidKeyType
- }
-
- // Create the hasher
- if !m.Hash.Available() {
- return "", ErrHashUnavailable
- }
-
- hasher := m.Hash.New()
- hasher.Write([]byte(signingString))
-
- // Sign the string and return r, s
- if r, s, err := ecdsa.Sign(rand.Reader, ecdsaKey, hasher.Sum(nil)); err == nil {
- curveBits := ecdsaKey.Curve.Params().BitSize
-
- if m.CurveBits != curveBits {
- return "", ErrInvalidKey
- }
-
- keyBytes := curveBits / 8
- if curveBits%8 > 0 {
- keyBytes += 1
- }
-
- // We serialize the outpus (r and s) into big-endian byte arrays and pad
- // them with zeros on the left to make sure the sizes work out. Both arrays
- // must be keyBytes long, and the output must be 2*keyBytes long.
- rBytes := r.Bytes()
- rBytesPadded := make([]byte, keyBytes)
- copy(rBytesPadded[keyBytes-len(rBytes):], rBytes)
-
- sBytes := s.Bytes()
- sBytesPadded := make([]byte, keyBytes)
- copy(sBytesPadded[keyBytes-len(sBytes):], sBytes)
-
- out := append(rBytesPadded, sBytesPadded...)
-
- return EncodeSegment(out), nil
- } else {
- return "", err
- }
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go b/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go
deleted file mode 100644
index d19624b72..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package jwt
-
-import (
- "crypto/ecdsa"
- "crypto/x509"
- "encoding/pem"
- "errors"
-)
-
-var (
- ErrNotECPublicKey = errors.New("Key is not a valid ECDSA public key")
- ErrNotECPrivateKey = errors.New("Key is not a valid ECDSA private key")
-)
-
-// Parse PEM encoded Elliptic Curve Private Key Structure
-func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) {
- var err error
-
- // Parse PEM block
- var block *pem.Block
- if block, _ = pem.Decode(key); block == nil {
- return nil, ErrKeyMustBePEMEncoded
- }
-
- // Parse the key
- var parsedKey interface{}
- if parsedKey, err = x509.ParseECPrivateKey(block.Bytes); err != nil {
- return nil, err
- }
-
- var pkey *ecdsa.PrivateKey
- var ok bool
- if pkey, ok = parsedKey.(*ecdsa.PrivateKey); !ok {
- return nil, ErrNotECPrivateKey
- }
-
- return pkey, nil
-}
-
-// Parse PEM encoded PKCS1 or PKCS8 public key
-func ParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error) {
- var err error
-
- // Parse PEM block
- var block *pem.Block
- if block, _ = pem.Decode(key); block == nil {
- return nil, ErrKeyMustBePEMEncoded
- }
-
- // Parse the key
- var parsedKey interface{}
- if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil {
- if cert, err := x509.ParseCertificate(block.Bytes); err == nil {
- parsedKey = cert.PublicKey
- } else {
- return nil, err
- }
- }
-
- var pkey *ecdsa.PublicKey
- var ok bool
- if pkey, ok = parsedKey.(*ecdsa.PublicKey); !ok {
- return nil, ErrNotECPublicKey
- }
-
- return pkey, nil
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/errors.go b/vendor/github.com/dgrijalva/jwt-go/errors.go
deleted file mode 100644
index 1c93024aa..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/errors.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package jwt
-
-import (
- "errors"
-)
-
-// Error constants
-var (
- ErrInvalidKey = errors.New("key is invalid")
- ErrInvalidKeyType = errors.New("key is of invalid type")
- ErrHashUnavailable = errors.New("the requested hash function is unavailable")
-)
-
-// The errors that might occur when parsing and validating a token
-const (
- ValidationErrorMalformed uint32 = 1 << iota // Token is malformed
- ValidationErrorUnverifiable // Token could not be verified because of signing problems
- ValidationErrorSignatureInvalid // Signature validation failed
-
- // Standard Claim validation errors
- ValidationErrorAudience // AUD validation failed
- ValidationErrorExpired // EXP validation failed
- ValidationErrorIssuedAt // IAT validation failed
- ValidationErrorIssuer // ISS validation failed
- ValidationErrorNotValidYet // NBF validation failed
- ValidationErrorId // JTI validation failed
- ValidationErrorClaimsInvalid // Generic claims validation error
-)
-
-// Helper for constructing a ValidationError with a string error message
-func NewValidationError(errorText string, errorFlags uint32) *ValidationError {
- return &ValidationError{
- text: errorText,
- Errors: errorFlags,
- }
-}
-
-// The error from Parse if token is not valid
-type ValidationError struct {
- Inner error // stores the error returned by external dependencies, i.e.: KeyFunc
- Errors uint32 // bitfield. see ValidationError... constants
- text string // errors that do not have a valid error just have text
-}
-
-// Validation error is an error type
-func (e ValidationError) Error() string {
- if e.Inner != nil {
- return e.Inner.Error()
- } else if e.text != "" {
- return e.text
- } else {
- return "token is invalid"
- }
-}
-
-// No errors
-func (e *ValidationError) valid() bool {
- return e.Errors == 0
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/hmac.go b/vendor/github.com/dgrijalva/jwt-go/hmac.go
deleted file mode 100644
index addbe5d40..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/hmac.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package jwt
-
-import (
- "crypto"
- "crypto/hmac"
- "errors"
-)
-
-// Implements the HMAC-SHA family of signing methods signing methods
-// Expects key type of []byte for both signing and validation
-type SigningMethodHMAC struct {
- Name string
- Hash crypto.Hash
-}
-
-// Specific instances for HS256 and company
-var (
- SigningMethodHS256 *SigningMethodHMAC
- SigningMethodHS384 *SigningMethodHMAC
- SigningMethodHS512 *SigningMethodHMAC
- ErrSignatureInvalid = errors.New("signature is invalid")
-)
-
-func init() {
- // HS256
- SigningMethodHS256 = &SigningMethodHMAC{"HS256", crypto.SHA256}
- RegisterSigningMethod(SigningMethodHS256.Alg(), func() SigningMethod {
- return SigningMethodHS256
- })
-
- // HS384
- SigningMethodHS384 = &SigningMethodHMAC{"HS384", crypto.SHA384}
- RegisterSigningMethod(SigningMethodHS384.Alg(), func() SigningMethod {
- return SigningMethodHS384
- })
-
- // HS512
- SigningMethodHS512 = &SigningMethodHMAC{"HS512", crypto.SHA512}
- RegisterSigningMethod(SigningMethodHS512.Alg(), func() SigningMethod {
- return SigningMethodHS512
- })
-}
-
-func (m *SigningMethodHMAC) Alg() string {
- return m.Name
-}
-
-// Verify the signature of HSXXX tokens. Returns nil if the signature is valid.
-func (m *SigningMethodHMAC) Verify(signingString, signature string, key interface{}) error {
- // Verify the key is the right type
- keyBytes, ok := key.([]byte)
- if !ok {
- return ErrInvalidKeyType
- }
-
- // Decode signature, for comparison
- sig, err := DecodeSegment(signature)
- if err != nil {
- return err
- }
-
- // Can we use the specified hashing method?
- if !m.Hash.Available() {
- return ErrHashUnavailable
- }
-
- // This signing method is symmetric, so we validate the signature
- // by reproducing the signature from the signing string and key, then
- // comparing that against the provided signature.
- hasher := hmac.New(m.Hash.New, keyBytes)
- hasher.Write([]byte(signingString))
- if !hmac.Equal(sig, hasher.Sum(nil)) {
- return ErrSignatureInvalid
- }
-
- // No validation errors. Signature is good.
- return nil
-}
-
-// Implements the Sign method from SigningMethod for this signing method.
-// Key must be []byte
-func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) (string, error) {
- if keyBytes, ok := key.([]byte); ok {
- if !m.Hash.Available() {
- return "", ErrHashUnavailable
- }
-
- hasher := hmac.New(m.Hash.New, keyBytes)
- hasher.Write([]byte(signingString))
-
- return EncodeSegment(hasher.Sum(nil)), nil
- }
-
- return "", ErrInvalidKeyType
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/map_claims.go b/vendor/github.com/dgrijalva/jwt-go/map_claims.go
deleted file mode 100644
index 291213c46..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/map_claims.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package jwt
-
-import (
- "encoding/json"
- "errors"
- // "fmt"
-)
-
-// Claims type that uses the map[string]interface{} for JSON decoding
-// This is the default claims type if you don't supply one
-type MapClaims map[string]interface{}
-
-// Compares the aud claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (m MapClaims) VerifyAudience(cmp string, req bool) bool {
- aud, _ := m["aud"].(string)
- return verifyAud(aud, cmp, req)
-}
-
-// Compares the exp claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool {
- switch exp := m["exp"].(type) {
- case float64:
- return verifyExp(int64(exp), cmp, req)
- case json.Number:
- v, _ := exp.Int64()
- return verifyExp(v, cmp, req)
- }
- return req == false
-}
-
-// Compares the iat claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (m MapClaims) VerifyIssuedAt(cmp int64, req bool) bool {
- switch iat := m["iat"].(type) {
- case float64:
- return verifyIat(int64(iat), cmp, req)
- case json.Number:
- v, _ := iat.Int64()
- return verifyIat(v, cmp, req)
- }
- return req == false
-}
-
-// Compares the iss claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (m MapClaims) VerifyIssuer(cmp string, req bool) bool {
- iss, _ := m["iss"].(string)
- return verifyIss(iss, cmp, req)
-}
-
-// Compares the nbf claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (m MapClaims) VerifyNotBefore(cmp int64, req bool) bool {
- switch nbf := m["nbf"].(type) {
- case float64:
- return verifyNbf(int64(nbf), cmp, req)
- case json.Number:
- v, _ := nbf.Int64()
- return verifyNbf(v, cmp, req)
- }
- return req == false
-}
-
-// Validates time based claims "exp, iat, nbf".
-// There is no accounting for clock skew.
-// As well, if any of the above claims are not in the token, it will still
-// be considered a valid claim.
-func (m MapClaims) Valid() error {
- vErr := new(ValidationError)
- now := TimeFunc().Unix()
-
- if m.VerifyExpiresAt(now, false) == false {
- vErr.Inner = errors.New("Token is expired")
- vErr.Errors |= ValidationErrorExpired
- }
-
- if m.VerifyIssuedAt(now, false) == false {
- vErr.Inner = errors.New("Token used before issued")
- vErr.Errors |= ValidationErrorIssuedAt
- }
-
- if m.VerifyNotBefore(now, false) == false {
- vErr.Inner = errors.New("Token is not valid yet")
- vErr.Errors |= ValidationErrorNotValidYet
- }
-
- if vErr.valid() {
- return nil
- }
-
- return vErr
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/none.go b/vendor/github.com/dgrijalva/jwt-go/none.go
deleted file mode 100644
index f04d189d0..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/none.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package jwt
-
-// Implements the none signing method. This is required by the spec
-// but you probably should never use it.
-var SigningMethodNone *signingMethodNone
-
-const UnsafeAllowNoneSignatureType unsafeNoneMagicConstant = "none signing method allowed"
-
-var NoneSignatureTypeDisallowedError error
-
-type signingMethodNone struct{}
-type unsafeNoneMagicConstant string
-
-func init() {
- SigningMethodNone = &signingMethodNone{}
- NoneSignatureTypeDisallowedError = NewValidationError("'none' signature type is not allowed", ValidationErrorSignatureInvalid)
-
- RegisterSigningMethod(SigningMethodNone.Alg(), func() SigningMethod {
- return SigningMethodNone
- })
-}
-
-func (m *signingMethodNone) Alg() string {
- return "none"
-}
-
-// Only allow 'none' alg type if UnsafeAllowNoneSignatureType is specified as the key
-func (m *signingMethodNone) Verify(signingString, signature string, key interface{}) (err error) {
- // Key must be UnsafeAllowNoneSignatureType to prevent accidentally
- // accepting 'none' signing method
- if _, ok := key.(unsafeNoneMagicConstant); !ok {
- return NoneSignatureTypeDisallowedError
- }
- // If signing method is none, signature must be an empty string
- if signature != "" {
- return NewValidationError(
- "'none' signing method with non-empty signature",
- ValidationErrorSignatureInvalid,
- )
- }
-
- // Accept 'none' signing method.
- return nil
-}
-
-// Only allow 'none' signing if UnsafeAllowNoneSignatureType is specified as the key
-func (m *signingMethodNone) Sign(signingString string, key interface{}) (string, error) {
- if _, ok := key.(unsafeNoneMagicConstant); ok {
- return "", nil
- }
- return "", NoneSignatureTypeDisallowedError
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/parser.go b/vendor/github.com/dgrijalva/jwt-go/parser.go
deleted file mode 100644
index d6901d9ad..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/parser.go
+++ /dev/null
@@ -1,148 +0,0 @@
-package jwt
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "strings"
-)
-
-type Parser struct {
- ValidMethods []string // If populated, only these methods will be considered valid
- UseJSONNumber bool // Use JSON Number format in JSON decoder
- SkipClaimsValidation bool // Skip claims validation during token parsing
-}
-
-// Parse, validate, and return a token.
-// keyFunc will receive the parsed token and should return the key for validating.
-// If everything is kosher, err will be nil
-func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
- return p.ParseWithClaims(tokenString, MapClaims{}, keyFunc)
-}
-
-func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) {
- token, parts, err := p.ParseUnverified(tokenString, claims)
- if err != nil {
- return token, err
- }
-
- // Verify signing method is in the required set
- if p.ValidMethods != nil {
- var signingMethodValid = false
- var alg = token.Method.Alg()
- for _, m := range p.ValidMethods {
- if m == alg {
- signingMethodValid = true
- break
- }
- }
- if !signingMethodValid {
- // signing method is not in the listed set
- return token, NewValidationError(fmt.Sprintf("signing method %v is invalid", alg), ValidationErrorSignatureInvalid)
- }
- }
-
- // Lookup key
- var key interface{}
- if keyFunc == nil {
- // keyFunc was not provided. short circuiting validation
- return token, NewValidationError("no Keyfunc was provided.", ValidationErrorUnverifiable)
- }
- if key, err = keyFunc(token); err != nil {
- // keyFunc returned an error
- if ve, ok := err.(*ValidationError); ok {
- return token, ve
- }
- return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable}
- }
-
- vErr := &ValidationError{}
-
- // Validate Claims
- if !p.SkipClaimsValidation {
- if err := token.Claims.Valid(); err != nil {
-
- // If the Claims Valid returned an error, check if it is a validation error,
- // If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set
- if e, ok := err.(*ValidationError); !ok {
- vErr = &ValidationError{Inner: err, Errors: ValidationErrorClaimsInvalid}
- } else {
- vErr = e
- }
- }
- }
-
- // Perform validation
- token.Signature = parts[2]
- if err = token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil {
- vErr.Inner = err
- vErr.Errors |= ValidationErrorSignatureInvalid
- }
-
- if vErr.valid() {
- token.Valid = true
- return token, nil
- }
-
- return token, vErr
-}
-
-// WARNING: Don't use this method unless you know what you're doing
-//
-// This method parses the token but doesn't validate the signature. It's only
-// ever useful in cases where you know the signature is valid (because it has
-// been checked previously in the stack) and you want to extract values from
-// it.
-func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Token, parts []string, err error) {
- parts = strings.Split(tokenString, ".")
- if len(parts) != 3 {
- return nil, parts, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed)
- }
-
- token = &Token{Raw: tokenString}
-
- // parse Header
- var headerBytes []byte
- if headerBytes, err = DecodeSegment(parts[0]); err != nil {
- if strings.HasPrefix(strings.ToLower(tokenString), "bearer ") {
- return token, parts, NewValidationError("tokenstring should not contain 'bearer '", ValidationErrorMalformed)
- }
- return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed}
- }
- if err = json.Unmarshal(headerBytes, &token.Header); err != nil {
- return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed}
- }
-
- // parse Claims
- var claimBytes []byte
- token.Claims = claims
-
- if claimBytes, err = DecodeSegment(parts[1]); err != nil {
- return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed}
- }
- dec := json.NewDecoder(bytes.NewBuffer(claimBytes))
- if p.UseJSONNumber {
- dec.UseNumber()
- }
- // JSON Decode. Special case for map type to avoid weird pointer behavior
- if c, ok := token.Claims.(MapClaims); ok {
- err = dec.Decode(&c)
- } else {
- err = dec.Decode(&claims)
- }
- // Handle decode error
- if err != nil {
- return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed}
- }
-
- // Lookup signature method
- if method, ok := token.Header["alg"].(string); ok {
- if token.Method = GetSigningMethod(method); token.Method == nil {
- return token, parts, NewValidationError("signing method (alg) is unavailable.", ValidationErrorUnverifiable)
- }
- } else {
- return token, parts, NewValidationError("signing method (alg) is unspecified.", ValidationErrorUnverifiable)
- }
-
- return token, parts, nil
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa.go b/vendor/github.com/dgrijalva/jwt-go/rsa.go
deleted file mode 100644
index e4caf1ca4..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/rsa.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package jwt
-
-import (
- "crypto"
- "crypto/rand"
- "crypto/rsa"
-)
-
-// Implements the RSA family of signing methods signing methods
-// Expects *rsa.PrivateKey for signing and *rsa.PublicKey for validation
-type SigningMethodRSA struct {
- Name string
- Hash crypto.Hash
-}
-
-// Specific instances for RS256 and company
-var (
- SigningMethodRS256 *SigningMethodRSA
- SigningMethodRS384 *SigningMethodRSA
- SigningMethodRS512 *SigningMethodRSA
-)
-
-func init() {
- // RS256
- SigningMethodRS256 = &SigningMethodRSA{"RS256", crypto.SHA256}
- RegisterSigningMethod(SigningMethodRS256.Alg(), func() SigningMethod {
- return SigningMethodRS256
- })
-
- // RS384
- SigningMethodRS384 = &SigningMethodRSA{"RS384", crypto.SHA384}
- RegisterSigningMethod(SigningMethodRS384.Alg(), func() SigningMethod {
- return SigningMethodRS384
- })
-
- // RS512
- SigningMethodRS512 = &SigningMethodRSA{"RS512", crypto.SHA512}
- RegisterSigningMethod(SigningMethodRS512.Alg(), func() SigningMethod {
- return SigningMethodRS512
- })
-}
-
-func (m *SigningMethodRSA) Alg() string {
- return m.Name
-}
-
-// Implements the Verify method from SigningMethod
-// For this signing method, must be an *rsa.PublicKey structure.
-func (m *SigningMethodRSA) Verify(signingString, signature string, key interface{}) error {
- var err error
-
- // Decode the signature
- var sig []byte
- if sig, err = DecodeSegment(signature); err != nil {
- return err
- }
-
- var rsaKey *rsa.PublicKey
- var ok bool
-
- if rsaKey, ok = key.(*rsa.PublicKey); !ok {
- return ErrInvalidKeyType
- }
-
- // Create hasher
- if !m.Hash.Available() {
- return ErrHashUnavailable
- }
- hasher := m.Hash.New()
- hasher.Write([]byte(signingString))
-
- // Verify the signature
- return rsa.VerifyPKCS1v15(rsaKey, m.Hash, hasher.Sum(nil), sig)
-}
-
-// Implements the Sign method from SigningMethod
-// For this signing method, must be an *rsa.PrivateKey structure.
-func (m *SigningMethodRSA) Sign(signingString string, key interface{}) (string, error) {
- var rsaKey *rsa.PrivateKey
- var ok bool
-
- // Validate type of key
- if rsaKey, ok = key.(*rsa.PrivateKey); !ok {
- return "", ErrInvalidKey
- }
-
- // Create the hasher
- if !m.Hash.Available() {
- return "", ErrHashUnavailable
- }
-
- hasher := m.Hash.New()
- hasher.Write([]byte(signingString))
-
- // Sign the string and return the encoded bytes
- if sigBytes, err := rsa.SignPKCS1v15(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil)); err == nil {
- return EncodeSegment(sigBytes), nil
- } else {
- return "", err
- }
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go b/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go
deleted file mode 100644
index 10ee9db8a..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go
+++ /dev/null
@@ -1,126 +0,0 @@
-// +build go1.4
-
-package jwt
-
-import (
- "crypto"
- "crypto/rand"
- "crypto/rsa"
-)
-
-// Implements the RSAPSS family of signing methods signing methods
-type SigningMethodRSAPSS struct {
- *SigningMethodRSA
- Options *rsa.PSSOptions
-}
-
-// Specific instances for RS/PS and company
-var (
- SigningMethodPS256 *SigningMethodRSAPSS
- SigningMethodPS384 *SigningMethodRSAPSS
- SigningMethodPS512 *SigningMethodRSAPSS
-)
-
-func init() {
- // PS256
- SigningMethodPS256 = &SigningMethodRSAPSS{
- &SigningMethodRSA{
- Name: "PS256",
- Hash: crypto.SHA256,
- },
- &rsa.PSSOptions{
- SaltLength: rsa.PSSSaltLengthAuto,
- Hash: crypto.SHA256,
- },
- }
- RegisterSigningMethod(SigningMethodPS256.Alg(), func() SigningMethod {
- return SigningMethodPS256
- })
-
- // PS384
- SigningMethodPS384 = &SigningMethodRSAPSS{
- &SigningMethodRSA{
- Name: "PS384",
- Hash: crypto.SHA384,
- },
- &rsa.PSSOptions{
- SaltLength: rsa.PSSSaltLengthAuto,
- Hash: crypto.SHA384,
- },
- }
- RegisterSigningMethod(SigningMethodPS384.Alg(), func() SigningMethod {
- return SigningMethodPS384
- })
-
- // PS512
- SigningMethodPS512 = &SigningMethodRSAPSS{
- &SigningMethodRSA{
- Name: "PS512",
- Hash: crypto.SHA512,
- },
- &rsa.PSSOptions{
- SaltLength: rsa.PSSSaltLengthAuto,
- Hash: crypto.SHA512,
- },
- }
- RegisterSigningMethod(SigningMethodPS512.Alg(), func() SigningMethod {
- return SigningMethodPS512
- })
-}
-
-// Implements the Verify method from SigningMethod
-// For this verify method, key must be an rsa.PublicKey struct
-func (m *SigningMethodRSAPSS) Verify(signingString, signature string, key interface{}) error {
- var err error
-
- // Decode the signature
- var sig []byte
- if sig, err = DecodeSegment(signature); err != nil {
- return err
- }
-
- var rsaKey *rsa.PublicKey
- switch k := key.(type) {
- case *rsa.PublicKey:
- rsaKey = k
- default:
- return ErrInvalidKey
- }
-
- // Create hasher
- if !m.Hash.Available() {
- return ErrHashUnavailable
- }
- hasher := m.Hash.New()
- hasher.Write([]byte(signingString))
-
- return rsa.VerifyPSS(rsaKey, m.Hash, hasher.Sum(nil), sig, m.Options)
-}
-
-// Implements the Sign method from SigningMethod
-// For this signing method, key must be an rsa.PrivateKey struct
-func (m *SigningMethodRSAPSS) Sign(signingString string, key interface{}) (string, error) {
- var rsaKey *rsa.PrivateKey
-
- switch k := key.(type) {
- case *rsa.PrivateKey:
- rsaKey = k
- default:
- return "", ErrInvalidKeyType
- }
-
- // Create the hasher
- if !m.Hash.Available() {
- return "", ErrHashUnavailable
- }
-
- hasher := m.Hash.New()
- hasher.Write([]byte(signingString))
-
- // Sign the string and return the encoded bytes
- if sigBytes, err := rsa.SignPSS(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil), m.Options); err == nil {
- return EncodeSegment(sigBytes), nil
- } else {
- return "", err
- }
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go b/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go
deleted file mode 100644
index a5ababf95..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package jwt
-
-import (
- "crypto/rsa"
- "crypto/x509"
- "encoding/pem"
- "errors"
-)
-
-var (
- ErrKeyMustBePEMEncoded = errors.New("Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key")
- ErrNotRSAPrivateKey = errors.New("Key is not a valid RSA private key")
- ErrNotRSAPublicKey = errors.New("Key is not a valid RSA public key")
-)
-
-// Parse PEM encoded PKCS1 or PKCS8 private key
-func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error) {
- var err error
-
- // Parse PEM block
- var block *pem.Block
- if block, _ = pem.Decode(key); block == nil {
- return nil, ErrKeyMustBePEMEncoded
- }
-
- var parsedKey interface{}
- if parsedKey, err = x509.ParsePKCS1PrivateKey(block.Bytes); err != nil {
- if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil {
- return nil, err
- }
- }
-
- var pkey *rsa.PrivateKey
- var ok bool
- if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok {
- return nil, ErrNotRSAPrivateKey
- }
-
- return pkey, nil
-}
-
-// Parse PEM encoded PKCS1 or PKCS8 private key protected with password
-func ParseRSAPrivateKeyFromPEMWithPassword(key []byte, password string) (*rsa.PrivateKey, error) {
- var err error
-
- // Parse PEM block
- var block *pem.Block
- if block, _ = pem.Decode(key); block == nil {
- return nil, ErrKeyMustBePEMEncoded
- }
-
- var parsedKey interface{}
-
- var blockDecrypted []byte
- if blockDecrypted, err = x509.DecryptPEMBlock(block, []byte(password)); err != nil {
- return nil, err
- }
-
- if parsedKey, err = x509.ParsePKCS1PrivateKey(blockDecrypted); err != nil {
- if parsedKey, err = x509.ParsePKCS8PrivateKey(blockDecrypted); err != nil {
- return nil, err
- }
- }
-
- var pkey *rsa.PrivateKey
- var ok bool
- if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok {
- return nil, ErrNotRSAPrivateKey
- }
-
- return pkey, nil
-}
-
-// Parse PEM encoded PKCS1 or PKCS8 public key
-func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error) {
- var err error
-
- // Parse PEM block
- var block *pem.Block
- if block, _ = pem.Decode(key); block == nil {
- return nil, ErrKeyMustBePEMEncoded
- }
-
- // Parse the key
- var parsedKey interface{}
- if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil {
- if cert, err := x509.ParseCertificate(block.Bytes); err == nil {
- parsedKey = cert.PublicKey
- } else {
- return nil, err
- }
- }
-
- var pkey *rsa.PublicKey
- var ok bool
- if pkey, ok = parsedKey.(*rsa.PublicKey); !ok {
- return nil, ErrNotRSAPublicKey
- }
-
- return pkey, nil
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/signing_method.go b/vendor/github.com/dgrijalva/jwt-go/signing_method.go
deleted file mode 100644
index ed1f212b2..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/signing_method.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package jwt
-
-import (
- "sync"
-)
-
-var signingMethods = map[string]func() SigningMethod{}
-var signingMethodLock = new(sync.RWMutex)
-
-// Implement SigningMethod to add new methods for signing or verifying tokens.
-type SigningMethod interface {
- Verify(signingString, signature string, key interface{}) error // Returns nil if signature is valid
- Sign(signingString string, key interface{}) (string, error) // Returns encoded signature or error
- Alg() string // returns the alg identifier for this method (example: 'HS256')
-}
-
-// Register the "alg" name and a factory function for signing method.
-// This is typically done during init() in the method's implementation
-func RegisterSigningMethod(alg string, f func() SigningMethod) {
- signingMethodLock.Lock()
- defer signingMethodLock.Unlock()
-
- signingMethods[alg] = f
-}
-
-// Get a signing method from an "alg" string
-func GetSigningMethod(alg string) (method SigningMethod) {
- signingMethodLock.RLock()
- defer signingMethodLock.RUnlock()
-
- if methodF, ok := signingMethods[alg]; ok {
- method = methodF()
- }
- return
-}
diff --git a/vendor/github.com/dgrijalva/jwt-go/token.go b/vendor/github.com/dgrijalva/jwt-go/token.go
deleted file mode 100644
index d637e0867..000000000
--- a/vendor/github.com/dgrijalva/jwt-go/token.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package jwt
-
-import (
- "encoding/base64"
- "encoding/json"
- "strings"
- "time"
-)
-
-// TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time).
-// You can override it to use another time value. This is useful for testing or if your
-// server uses a different time zone than your tokens.
-var TimeFunc = time.Now
-
-// Parse methods use this callback function to supply
-// the key for verification. The function receives the parsed,
-// but unverified Token. This allows you to use properties in the
-// Header of the token (such as `kid`) to identify which key to use.
-type Keyfunc func(*Token) (interface{}, error)
-
-// A JWT Token. Different fields will be used depending on whether you're
-// creating or parsing/verifying a token.
-type Token struct {
- Raw string // The raw token. Populated when you Parse a token
- Method SigningMethod // The signing method used or to be used
- Header map[string]interface{} // The first segment of the token
- Claims Claims // The second segment of the token
- Signature string // The third segment of the token. Populated when you Parse a token
- Valid bool // Is the token valid? Populated when you Parse/Verify a token
-}
-
-// Create a new Token. Takes a signing method
-func New(method SigningMethod) *Token {
- return NewWithClaims(method, MapClaims{})
-}
-
-func NewWithClaims(method SigningMethod, claims Claims) *Token {
- return &Token{
- Header: map[string]interface{}{
- "typ": "JWT",
- "alg": method.Alg(),
- },
- Claims: claims,
- Method: method,
- }
-}
-
-// Get the complete, signed token
-func (t *Token) SignedString(key interface{}) (string, error) {
- var sig, sstr string
- var err error
- if sstr, err = t.SigningString(); err != nil {
- return "", err
- }
- if sig, err = t.Method.Sign(sstr, key); err != nil {
- return "", err
- }
- return strings.Join([]string{sstr, sig}, "."), nil
-}
-
-// Generate the signing string. This is the
-// most expensive part of the whole deal. Unless you
-// need this for something special, just go straight for
-// the SignedString.
-func (t *Token) SigningString() (string, error) {
- var err error
- parts := make([]string, 2)
- for i, _ := range parts {
- var jsonValue []byte
- if i == 0 {
- if jsonValue, err = json.Marshal(t.Header); err != nil {
- return "", err
- }
- } else {
- if jsonValue, err = json.Marshal(t.Claims); err != nil {
- return "", err
- }
- }
-
- parts[i] = EncodeSegment(jsonValue)
- }
- return strings.Join(parts, "."), nil
-}
-
-// Parse, validate, and return a token.
-// keyFunc will receive the parsed token and should return the key for validating.
-// If everything is kosher, err will be nil
-func Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
- return new(Parser).Parse(tokenString, keyFunc)
-}
-
-func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) {
- return new(Parser).ParseWithClaims(tokenString, claims, keyFunc)
-}
-
-// Encode JWT specific base64url encoding with padding stripped
-func EncodeSegment(seg []byte) string {
- return strings.TrimRight(base64.URLEncoding.EncodeToString(seg), "=")
-}
-
-// Decode JWT specific base64url encoding with padding stripped
-func DecodeSegment(seg string) ([]byte, error) {
- if l := len(seg) % 4; l > 0 {
- seg += strings.Repeat("=", 4-l)
- }
-
- return base64.URLEncoding.DecodeString(seg)
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/.editorconfig b/vendor/github.com/fsnotify/fsnotify/.editorconfig
deleted file mode 100644
index fad895851..000000000
--- a/vendor/github.com/fsnotify/fsnotify/.editorconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-root = true
-
-[*.go]
-indent_style = tab
-indent_size = 4
-insert_final_newline = true
-
-[*.{yml,yaml}]
-indent_style = space
-indent_size = 2
-insert_final_newline = true
-trim_trailing_whitespace = true
diff --git a/vendor/github.com/fsnotify/fsnotify/.gitattributes b/vendor/github.com/fsnotify/fsnotify/.gitattributes
deleted file mode 100644
index 32f1001be..000000000
--- a/vendor/github.com/fsnotify/fsnotify/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-go.sum linguist-generated
diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore
deleted file mode 100644
index 4cd0cbaf4..000000000
--- a/vendor/github.com/fsnotify/fsnotify/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-# Setup a Global .gitignore for OS and editor generated files:
-# https://help.github.com/articles/ignoring-files
-# git config --global core.excludesfile ~/.gitignore_global
-
-.vagrant
-*.sublime-project
diff --git a/vendor/github.com/fsnotify/fsnotify/.travis.yml b/vendor/github.com/fsnotify/fsnotify/.travis.yml
deleted file mode 100644
index a9c30165c..000000000
--- a/vendor/github.com/fsnotify/fsnotify/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-sudo: false
-language: go
-
-go:
- - "stable"
- - "1.11.x"
- - "1.10.x"
- - "1.9.x"
-
-matrix:
- include:
- - go: "stable"
- env: GOLINT=true
- allow_failures:
- - go: tip
- fast_finish: true
-
-
-before_install:
- - if [ ! -z "${GOLINT}" ]; then go get -u golang.org/x/lint/golint; fi
-
-script:
- - go test --race ./...
-
-after_script:
- - test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
- - if [ ! -z "${GOLINT}" ]; then echo running golint; golint --set_exit_status ./...; else echo skipping golint; fi
- - go vet ./...
-
-os:
- - linux
- - osx
- - windows
-
-notifications:
- email: false
diff --git a/vendor/github.com/fsnotify/fsnotify/AUTHORS b/vendor/github.com/fsnotify/fsnotify/AUTHORS
deleted file mode 100644
index 5ab5d41c5..000000000
--- a/vendor/github.com/fsnotify/fsnotify/AUTHORS
+++ /dev/null
@@ -1,52 +0,0 @@
-# Names should be added to this file as
-# Name or Organization
-# The email address is not required for organizations.
-
-# You can update this list using the following command:
-#
-# $ git shortlog -se | awk '{print $2 " " $3 " " $4}'
-
-# Please keep the list sorted.
-
-Aaron L
-Adrien Bustany
-Amit Krishnan
-Anmol Sethi
-Bjørn Erik Pedersen
-Bruno Bigras
-Caleb Spare
-Case Nelson
-Chris Howey
-Christoffer Buchholz
-Daniel Wagner-Hall
-Dave Cheney
-Evan Phoenix
-Francisco Souza
-Hari haran
-John C Barstow
-Kelvin Fo
-Ken-ichirou MATSUZAWA
-Matt Layher
-Nathan Youngman
-Nickolai Zeldovich
-Patrick
-Paul Hammond
-Pawel Knap
-Pieter Droogendijk
-Pursuit92
-Riku Voipio
-Rob Figueiredo
-Rodrigo Chiossi
-Slawek Ligus
-Soge Zhang
-Tiffany Jernigan
-Tilak Sharma
-Tom Payne
-Travis Cline
-Tudor Golubenco
-Vahe Khachikyan
-Yukang
-bronze1man
-debrando
-henrikedwards
-铁哥
diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
deleted file mode 100644
index be4d7ea2c..000000000
--- a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
+++ /dev/null
@@ -1,317 +0,0 @@
-# Changelog
-
-## v1.4.7 / 2018-01-09
-
-* BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine)
-* Tests: Fix missing verb on format string (thanks @rchiossi)
-* Linux: Fix deadlock in Remove (thanks @aarondl)
-* Linux: Watch.Add improvements (avoid race, fix consistency, reduce garbage) (thanks @twpayne)
-* Docs: Moved FAQ into the README (thanks @vahe)
-* Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich)
-* Docs: replace references to OS X with macOS
-
-## v1.4.2 / 2016-10-10
-
-* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack)
-
-## v1.4.1 / 2016-10-04
-
-* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack)
-
-## v1.4.0 / 2016-10-01
-
-* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie)
-
-## v1.3.1 / 2016-06-28
-
-* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc)
-
-## v1.3.0 / 2016-04-19
-
-* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135)
-
-## v1.2.10 / 2016-03-02
-
-* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj)
-
-## v1.2.9 / 2016-01-13
-
-kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep)
-
-## v1.2.8 / 2015-12-17
-
-* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test)
-* inotify: fix race in test
-* enable race detection for continuous integration (Linux, Mac, Windows)
-
-## v1.2.5 / 2015-10-17
-
-* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki)
-* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken)
-* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie)
-* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion)
-
-## v1.2.1 / 2015-10-14
-
-* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx)
-
-## v1.2.0 / 2015-02-08
-
-* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD)
-* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD)
-* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59)
-
-## v1.1.1 / 2015-02-05
-
-* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD)
-
-## v1.1.0 / 2014-12-12
-
-* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43)
- * add low-level functions
- * only need to store flags on directories
- * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13)
- * done can be an unbuffered channel
- * remove calls to os.NewSyscallError
-* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher)
-* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48)
-* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51)
-
-## v1.0.4 / 2014-09-07
-
-* kqueue: add dragonfly to the build tags.
-* Rename source code files, rearrange code so exported APIs are at the top.
-* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang)
-
-## v1.0.3 / 2014-08-19
-
-* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36)
-
-## v1.0.2 / 2014-08-17
-
-* [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso)
-* [Fix] Make ./path and path equivalent. (thanks @zhsso)
-
-## v1.0.0 / 2014-08-15
-
-* [API] Remove AddWatch on Windows, use Add.
-* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30)
-* Minor updates based on feedback from golint.
-
-## dev / 2014-07-09
-
-* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify).
-* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno)
-
-## dev / 2014-07-04
-
-* kqueue: fix incorrect mutex used in Close()
-* Update example to demonstrate usage of Op.
-
-## dev / 2014-06-28
-
-* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4)
-* Fix for String() method on Event (thanks Alex Brainman)
-* Don't build on Plan 9 or Solaris (thanks @4ad)
-
-## dev / 2014-06-21
-
-* Events channel of type Event rather than *Event.
-* [internal] use syscall constants directly for inotify and kqueue.
-* [internal] kqueue: rename events to kevents and fileEvent to event.
-
-## dev / 2014-06-19
-
-* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally).
-* [internal] remove cookie from Event struct (unused).
-* [internal] Event struct has the same definition across every OS.
-* [internal] remove internal watch and removeWatch methods.
-
-## dev / 2014-06-12
-
-* [API] Renamed Watch() to Add() and RemoveWatch() to Remove().
-* [API] Pluralized channel names: Events and Errors.
-* [API] Renamed FileEvent struct to Event.
-* [API] Op constants replace methods like IsCreate().
-
-## dev / 2014-06-12
-
-* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98)
-
-## dev / 2014-05-23
-
-* [API] Remove current implementation of WatchFlags.
- * current implementation doesn't take advantage of OS for efficiency
- * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes
- * no tests for the current implementation
- * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195)
-
-## v0.9.3 / 2014-12-31
-
-* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51)
-
-## v0.9.2 / 2014-08-17
-
-* [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso)
-
-## v0.9.1 / 2014-06-12
-
-* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98)
-
-## v0.9.0 / 2014-01-17
-
-* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany)
-* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare)
-* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library.
-
-## v0.8.12 / 2013-11-13
-
-* [API] Remove FD_SET and friends from Linux adapter
-
-## v0.8.11 / 2013-11-02
-
-* [Doc] Add Changelog [#72][] (thanks @nathany)
-* [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond)
-
-## v0.8.10 / 2013-10-19
-
-* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott)
-* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer)
-* [Doc] specify OS-specific limits in README (thanks @debrando)
-
-## v0.8.9 / 2013-09-08
-
-* [Doc] Contributing (thanks @nathany)
-* [Doc] update package path in example code [#63][] (thanks @paulhammond)
-* [Doc] GoCI badge in README (Linux only) [#60][]
-* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany)
-
-## v0.8.8 / 2013-06-17
-
-* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie)
-
-## v0.8.7 / 2013-06-03
-
-* [API] Make syscall flags internal
-* [Fix] inotify: ignore event changes
-* [Fix] race in symlink test [#45][] (reported by @srid)
-* [Fix] tests on Windows
-* lower case error messages
-
-## v0.8.6 / 2013-05-23
-
-* kqueue: Use EVT_ONLY flag on Darwin
-* [Doc] Update README with full example
-
-## v0.8.5 / 2013-05-09
-
-* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg)
-
-## v0.8.4 / 2013-04-07
-
-* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz)
-
-## v0.8.3 / 2013-03-13
-
-* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin)
-* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin)
-
-## v0.8.2 / 2013-02-07
-
-* [Doc] add Authors
-* [Fix] fix data races for map access [#29][] (thanks @fsouza)
-
-## v0.8.1 / 2013-01-09
-
-* [Fix] Windows path separators
-* [Doc] BSD License
-
-## v0.8.0 / 2012-11-09
-
-* kqueue: directory watching improvements (thanks @vmirage)
-* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto)
-* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr)
-
-## v0.7.4 / 2012-10-09
-
-* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji)
-* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig)
-* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig)
-* [Fix] kqueue: modify after recreation of file
-
-## v0.7.3 / 2012-09-27
-
-* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage)
-* [Fix] kqueue: no longer get duplicate CREATE events
-
-## v0.7.2 / 2012-09-01
-
-* kqueue: events for created directories
-
-## v0.7.1 / 2012-07-14
-
-* [Fix] for renaming files
-
-## v0.7.0 / 2012-07-02
-
-* [Feature] FSNotify flags
-* [Fix] inotify: Added file name back to event path
-
-## v0.6.0 / 2012-06-06
-
-* kqueue: watch files after directory created (thanks @tmc)
-
-## v0.5.1 / 2012-05-22
-
-* [Fix] inotify: remove all watches before Close()
-
-## v0.5.0 / 2012-05-03
-
-* [API] kqueue: return errors during watch instead of sending over channel
-* kqueue: match symlink behavior on Linux
-* inotify: add `DELETE_SELF` (requested by @taralx)
-* [Fix] kqueue: handle EINTR (reported by @robfig)
-* [Doc] Godoc example [#1][] (thanks @davecheney)
-
-## v0.4.0 / 2012-03-30
-
-* Go 1 released: build with go tool
-* [Feature] Windows support using winfsnotify
-* Windows does not have attribute change notifications
-* Roll attribute notifications into IsModify
-
-## v0.3.0 / 2012-02-19
-
-* kqueue: add files when watch directory
-
-## v0.2.0 / 2011-12-30
-
-* update to latest Go weekly code
-
-## v0.1.0 / 2011-10-19
-
-* kqueue: add watch on file creation to match inotify
-* kqueue: create file event
-* inotify: ignore `IN_IGNORED` events
-* event String()
-* linux: common FileEvent functions
-* initial commit
-
-[#79]: https://github.com/howeyc/fsnotify/pull/79
-[#77]: https://github.com/howeyc/fsnotify/pull/77
-[#72]: https://github.com/howeyc/fsnotify/issues/72
-[#71]: https://github.com/howeyc/fsnotify/issues/71
-[#70]: https://github.com/howeyc/fsnotify/issues/70
-[#63]: https://github.com/howeyc/fsnotify/issues/63
-[#62]: https://github.com/howeyc/fsnotify/issues/62
-[#60]: https://github.com/howeyc/fsnotify/issues/60
-[#59]: https://github.com/howeyc/fsnotify/issues/59
-[#49]: https://github.com/howeyc/fsnotify/issues/49
-[#45]: https://github.com/howeyc/fsnotify/issues/45
-[#40]: https://github.com/howeyc/fsnotify/issues/40
-[#36]: https://github.com/howeyc/fsnotify/issues/36
-[#33]: https://github.com/howeyc/fsnotify/issues/33
-[#29]: https://github.com/howeyc/fsnotify/issues/29
-[#25]: https://github.com/howeyc/fsnotify/issues/25
-[#24]: https://github.com/howeyc/fsnotify/issues/24
-[#21]: https://github.com/howeyc/fsnotify/issues/21
diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
deleted file mode 100644
index 828a60b24..000000000
--- a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# Contributing
-
-## Issues
-
-* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnotify/fsnotify/issues).
-* Please indicate the platform you are using fsnotify on.
-* A code example to reproduce the problem is appreciated.
-
-## Pull Requests
-
-### Contributor License Agreement
-
-fsnotify is derived from code in the [golang.org/x/exp](https://godoc.org/golang.org/x/exp) package and it may be included [in the standard library](https://github.com/fsnotify/fsnotify/issues/1) in the future. Therefore fsnotify carries the same [LICENSE](https://github.com/fsnotify/fsnotify/blob/master/LICENSE) as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual).
-
-Please indicate that you have signed the CLA in your pull request.
-
-### How fsnotify is Developed
-
-* Development is done on feature branches.
-* Tests are run on BSD, Linux, macOS and Windows.
-* Pull requests are reviewed and [applied to master][am] using [hub][].
- * Maintainers may modify or squash commits rather than asking contributors to.
-* To issue a new release, the maintainers will:
- * Update the CHANGELOG
- * Tag a version, which will become available through gopkg.in.
-
-### How to Fork
-
-For smooth sailing, always use the original import path. Installing with `go get` makes this easy.
-
-1. Install from GitHub (`go get -u github.com/fsnotify/fsnotify`)
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Ensure everything works and the tests pass (see below)
-4. Commit your changes (`git commit -am 'Add some feature'`)
-
-Contribute upstream:
-
-1. Fork fsnotify on GitHub
-2. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`)
-3. Push to the branch (`git push fork my-new-feature`)
-4. Create a new Pull Request on GitHub
-
-This workflow is [thoroughly explained by Katrina Owen](https://splice.com/blog/contributing-open-source-git-repositories-go/).
-
-### Testing
-
-fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Windows.
-
-Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on.
-
-To aid in cross-platform testing there is a Vagrantfile for Linux and BSD.
-
-* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
-* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder.
-* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password)
-* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`.
-* When you're done, you will want to halt or destroy the Vagrant boxes.
-
-Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory.
-
-Right now there is no equivalent solution for Windows and macOS, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads).
-
-### Maintainers
-
-Help maintaining fsnotify is welcome. To be a maintainer:
-
-* Submit a pull request and sign the CLA as above.
-* You must be able to run the test suite on Mac, Windows, Linux and BSD.
-
-To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][].
-
-All code changes should be internal pull requests.
-
-Releases are tagged using [Semantic Versioning](http://semver.org/).
-
-[hub]: https://github.com/github/hub
-[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs
diff --git a/vendor/github.com/fsnotify/fsnotify/LICENSE b/vendor/github.com/fsnotify/fsnotify/LICENSE
deleted file mode 100644
index e180c8fb0..000000000
--- a/vendor/github.com/fsnotify/fsnotify/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-Copyright (c) 2012-2019 fsnotify Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md
deleted file mode 100644
index b2629e522..000000000
--- a/vendor/github.com/fsnotify/fsnotify/README.md
+++ /dev/null
@@ -1,130 +0,0 @@
-# File system notifications for Go
-
-[](https://godoc.org/github.com/fsnotify/fsnotify) [](https://goreportcard.com/report/github.com/fsnotify/fsnotify)
-
-fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running:
-
-```console
-go get -u golang.org/x/sys/...
-```
-
-Cross platform: Windows, Linux, BSD and macOS.
-
-| Adapter | OS | Status |
-| --------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
-| inotify | Linux 2.6.27 or later, Android\* | Supported [](https://travis-ci.org/fsnotify/fsnotify) |
-| kqueue | BSD, macOS, iOS\* | Supported [](https://travis-ci.org/fsnotify/fsnotify) |
-| ReadDirectoryChangesW | Windows | Supported [](https://travis-ci.org/fsnotify/fsnotify) |
-| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) |
-| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/issues/12) |
-| fanotify | Linux 2.6.37+ | [Planned](https://github.com/fsnotify/fsnotify/issues/114) |
-| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) |
-| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) |
-
-\* Android and iOS are untested.
-
-Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.
-
-## API stability
-
-fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).
-
-All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number.
-
-Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.
-
-## Usage
-
-```go
-package main
-
-import (
- "log"
-
- "github.com/fsnotify/fsnotify"
-)
-
-func main() {
- watcher, err := fsnotify.NewWatcher()
- if err != nil {
- log.Fatal(err)
- }
- defer watcher.Close()
-
- done := make(chan bool)
- go func() {
- for {
- select {
- case event, ok := <-watcher.Events:
- if !ok {
- return
- }
- log.Println("event:", event)
- if event.Op&fsnotify.Write == fsnotify.Write {
- log.Println("modified file:", event.Name)
- }
- case err, ok := <-watcher.Errors:
- if !ok {
- return
- }
- log.Println("error:", err)
- }
- }
- }()
-
- err = watcher.Add("/tmp/foo")
- if err != nil {
- log.Fatal(err)
- }
- <-done
-}
-```
-
-## Contributing
-
-Please refer to [CONTRIBUTING][] before opening an issue or pull request.
-
-## Example
-
-See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go).
-
-## FAQ
-
-**When a file is moved to another directory is it still being watched?**
-
-No (it shouldn't be, unless you are watching where it was moved to).
-
-**When I watch a directory, are all subdirectories watched as well?**
-
-No, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap [#18][]).
-
-**Do I have to watch the Error and Event channels in a separate goroutine?**
-
-As of now, yes. Looking into making this single-thread friendly (see [howeyc #7][#7])
-
-**Why am I receiving multiple events for the same file on OS X?**
-
-Spotlight indexing on OS X can result in multiple events (see [howeyc #62][#62]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11][]).
-
-**How many files can be watched at once?**
-
-There are OS-specific limits as to how many watches can be created:
-* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error.
-* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error.
-
-**Why don't notifications work with NFS filesystems or filesystem in userspace (FUSE)?**
-
-fsnotify requires support from underlying OS to work. The current NFS protocol does not provide network level support for file notifications.
-
-[#62]: https://github.com/howeyc/fsnotify/issues/62
-[#18]: https://github.com/fsnotify/fsnotify/issues/18
-[#11]: https://github.com/fsnotify/fsnotify/issues/11
-[#7]: https://github.com/howeyc/fsnotify/issues/7
-
-[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md
-
-## Related Projects
-
-* [notify](https://github.com/rjeczalik/notify)
-* [fsevents](https://github.com/fsnotify/fsevents)
-
diff --git a/vendor/github.com/fsnotify/fsnotify/fen.go b/vendor/github.com/fsnotify/fsnotify/fen.go
deleted file mode 100644
index ced39cb88..000000000
--- a/vendor/github.com/fsnotify/fsnotify/fen.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2010 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.
-
-// +build solaris
-
-package fsnotify
-
-import (
- "errors"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- return nil, errors.New("FEN based watcher not yet supported for fsnotify\n")
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- return nil
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- return nil
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go
deleted file mode 100644
index 89cab046d..000000000
--- a/vendor/github.com/fsnotify/fsnotify/fsnotify.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012 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.
-
-// +build !plan9
-
-// Package fsnotify provides a platform-independent interface for file system notifications.
-package fsnotify
-
-import (
- "bytes"
- "errors"
- "fmt"
-)
-
-// Event represents a single file system notification.
-type Event struct {
- Name string // Relative path to the file or directory.
- Op Op // File operation that triggered the event.
-}
-
-// Op describes a set of file operations.
-type Op uint32
-
-// These are the generalized file operations that can trigger a notification.
-const (
- Create Op = 1 << iota
- Write
- Remove
- Rename
- Chmod
-)
-
-func (op Op) String() string {
- // Use a buffer for efficient string concatenation
- var buffer bytes.Buffer
-
- if op&Create == Create {
- buffer.WriteString("|CREATE")
- }
- if op&Remove == Remove {
- buffer.WriteString("|REMOVE")
- }
- if op&Write == Write {
- buffer.WriteString("|WRITE")
- }
- if op&Rename == Rename {
- buffer.WriteString("|RENAME")
- }
- if op&Chmod == Chmod {
- buffer.WriteString("|CHMOD")
- }
- if buffer.Len() == 0 {
- return ""
- }
- return buffer.String()[1:] // Strip leading pipe
-}
-
-// String returns a string representation of the event in the form
-// "file: REMOVE|WRITE|..."
-func (e Event) String() string {
- return fmt.Sprintf("%q: %s", e.Name, e.Op.String())
-}
-
-// Common errors that can be reported by a watcher
-var (
- ErrEventOverflow = errors.New("fsnotify queue overflow")
-)
diff --git a/vendor/github.com/fsnotify/fsnotify/go.mod b/vendor/github.com/fsnotify/fsnotify/go.mod
deleted file mode 100644
index ff11e13f2..000000000
--- a/vendor/github.com/fsnotify/fsnotify/go.mod
+++ /dev/null
@@ -1,5 +0,0 @@
-module github.com/fsnotify/fsnotify
-
-go 1.13
-
-require golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9
diff --git a/vendor/github.com/fsnotify/fsnotify/go.sum b/vendor/github.com/fsnotify/fsnotify/go.sum
deleted file mode 100644
index f60af9855..000000000
--- a/vendor/github.com/fsnotify/fsnotify/go.sum
+++ /dev/null
@@ -1,2 +0,0 @@
-golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 h1:L2auWcuQIvxz9xSEqzESnV/QN/gNRXNApHi3fYwl2w0=
-golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify.go b/vendor/github.com/fsnotify/fsnotify/inotify.go
deleted file mode 100644
index d9fd1b88a..000000000
--- a/vendor/github.com/fsnotify/fsnotify/inotify.go
+++ /dev/null
@@ -1,337 +0,0 @@
-// Copyright 2010 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.
-
-// +build linux
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
- "sync"
- "unsafe"
-
- "golang.org/x/sys/unix"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- mu sync.Mutex // Map access
- fd int
- poller *fdPoller
- watches map[string]*watch // Map of inotify watches (key: path)
- paths map[int]string // Map of watched paths (key: watch descriptor)
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
- doneResp chan struct{} // Channel to respond to Close
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- // Create inotify fd
- fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC)
- if fd == -1 {
- return nil, errno
- }
- // Create epoll
- poller, err := newFdPoller(fd)
- if err != nil {
- unix.Close(fd)
- return nil, err
- }
- w := &Watcher{
- fd: fd,
- poller: poller,
- watches: make(map[string]*watch),
- paths: make(map[int]string),
- Events: make(chan Event),
- Errors: make(chan error),
- done: make(chan struct{}),
- doneResp: make(chan struct{}),
- }
-
- go w.readEvents()
- return w, nil
-}
-
-func (w *Watcher) isClosed() bool {
- select {
- case <-w.done:
- return true
- default:
- return false
- }
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- if w.isClosed() {
- return nil
- }
-
- // Send 'close' signal to goroutine, and set the Watcher to closed.
- close(w.done)
-
- // Wake up goroutine
- w.poller.wake()
-
- // Wait for goroutine to close
- <-w.doneResp
-
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- name = filepath.Clean(name)
- if w.isClosed() {
- return errors.New("inotify instance already closed")
- }
-
- const agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM |
- unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY |
- unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF
-
- var flags uint32 = agnosticEvents
-
- w.mu.Lock()
- defer w.mu.Unlock()
- watchEntry := w.watches[name]
- if watchEntry != nil {
- flags |= watchEntry.flags | unix.IN_MASK_ADD
- }
- wd, errno := unix.InotifyAddWatch(w.fd, name, flags)
- if wd == -1 {
- return errno
- }
-
- if watchEntry == nil {
- w.watches[name] = &watch{wd: uint32(wd), flags: flags}
- w.paths[wd] = name
- } else {
- watchEntry.wd = uint32(wd)
- watchEntry.flags = flags
- }
-
- return nil
-}
-
-// Remove stops watching the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- name = filepath.Clean(name)
-
- // Fetch the watch.
- w.mu.Lock()
- defer w.mu.Unlock()
- watch, ok := w.watches[name]
-
- // Remove it from inotify.
- if !ok {
- return fmt.Errorf("can't remove non-existent inotify watch for: %s", name)
- }
-
- // We successfully removed the watch if InotifyRmWatch doesn't return an
- // error, we need to clean up our internal state to ensure it matches
- // inotify's kernel state.
- delete(w.paths, int(watch.wd))
- delete(w.watches, name)
-
- // inotify_rm_watch will return EINVAL if the file has been deleted;
- // the inotify will already have been removed.
- // watches and pathes are deleted in ignoreLinux() implicitly and asynchronously
- // by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE
- // so that EINVAL means that the wd is being rm_watch()ed or its file removed
- // by another thread and we have not received IN_IGNORE event.
- success, errno := unix.InotifyRmWatch(w.fd, watch.wd)
- if success == -1 {
- // TODO: Perhaps it's not helpful to return an error here in every case.
- // the only two possible errors are:
- // EBADF, which happens when w.fd is not a valid file descriptor of any kind.
- // EINVAL, which is when fd is not an inotify descriptor or wd is not a valid watch descriptor.
- // Watch descriptors are invalidated when they are removed explicitly or implicitly;
- // explicitly by inotify_rm_watch, implicitly when the file they are watching is deleted.
- return errno
- }
-
- return nil
-}
-
-type watch struct {
- wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall)
- flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags)
-}
-
-// readEvents reads from the inotify file descriptor, converts the
-// received events into Event objects and sends them via the Events channel
-func (w *Watcher) readEvents() {
- var (
- buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events
- n int // Number of bytes read with read()
- errno error // Syscall errno
- ok bool // For poller.wait
- )
-
- defer close(w.doneResp)
- defer close(w.Errors)
- defer close(w.Events)
- defer unix.Close(w.fd)
- defer w.poller.close()
-
- for {
- // See if we have been closed.
- if w.isClosed() {
- return
- }
-
- ok, errno = w.poller.wait()
- if errno != nil {
- select {
- case w.Errors <- errno:
- case <-w.done:
- return
- }
- continue
- }
-
- if !ok {
- continue
- }
-
- n, errno = unix.Read(w.fd, buf[:])
- // If a signal interrupted execution, see if we've been asked to close, and try again.
- // http://man7.org/linux/man-pages/man7/signal.7.html :
- // "Before Linux 3.8, reads from an inotify(7) file descriptor were not restartable"
- if errno == unix.EINTR {
- continue
- }
-
- // unix.Read might have been woken up by Close. If so, we're done.
- if w.isClosed() {
- return
- }
-
- if n < unix.SizeofInotifyEvent {
- var err error
- if n == 0 {
- // If EOF is received. This should really never happen.
- err = io.EOF
- } else if n < 0 {
- // If an error occurred while reading.
- err = errno
- } else {
- // Read was too short.
- err = errors.New("notify: short read in readEvents()")
- }
- select {
- case w.Errors <- err:
- case <-w.done:
- return
- }
- continue
- }
-
- var offset uint32
- // We don't know how many events we just read into the buffer
- // While the offset points to at least one whole event...
- for offset <= uint32(n-unix.SizeofInotifyEvent) {
- // Point "raw" to the event in the buffer
- raw := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset]))
-
- mask := uint32(raw.Mask)
- nameLen := uint32(raw.Len)
-
- if mask&unix.IN_Q_OVERFLOW != 0 {
- select {
- case w.Errors <- ErrEventOverflow:
- case <-w.done:
- return
- }
- }
-
- // If the event happened to the watched directory or the watched file, the kernel
- // doesn't append the filename to the event, but we would like to always fill the
- // the "Name" field with a valid filename. We retrieve the path of the watch from
- // the "paths" map.
- w.mu.Lock()
- name, ok := w.paths[int(raw.Wd)]
- // IN_DELETE_SELF occurs when the file/directory being watched is removed.
- // This is a sign to clean up the maps, otherwise we are no longer in sync
- // with the inotify kernel state which has already deleted the watch
- // automatically.
- if ok && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF {
- delete(w.paths, int(raw.Wd))
- delete(w.watches, name)
- }
- w.mu.Unlock()
-
- if nameLen > 0 {
- // Point "bytes" at the first byte of the filename
- bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))
- // The filename is padded with NULL bytes. TrimRight() gets rid of those.
- name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000")
- }
-
- event := newEvent(name, mask)
-
- // Send the events that are not ignored on the events channel
- if !event.ignoreLinux(mask) {
- select {
- case w.Events <- event:
- case <-w.done:
- return
- }
- }
-
- // Move to the next event in the buffer
- offset += unix.SizeofInotifyEvent + nameLen
- }
- }
-}
-
-// Certain types of events can be "ignored" and not sent over the Events
-// channel. Such as events marked ignore by the kernel, or MODIFY events
-// against files that do not exist.
-func (e *Event) ignoreLinux(mask uint32) bool {
- // Ignore anything the inotify API says to ignore
- if mask&unix.IN_IGNORED == unix.IN_IGNORED {
- return true
- }
-
- // If the event is not a DELETE or RENAME, the file must exist.
- // Otherwise the event is ignored.
- // *Note*: this was put in place because it was seen that a MODIFY
- // event was sent after the DELETE. This ignores that MODIFY and
- // assumes a DELETE will come or has come if the file doesn't exist.
- if !(e.Op&Remove == Remove || e.Op&Rename == Rename) {
- _, statErr := os.Lstat(e.Name)
- return os.IsNotExist(statErr)
- }
- return false
-}
-
-// newEvent returns an platform-independent Event based on an inotify mask.
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO {
- e.Op |= Create
- }
- if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE {
- e.Op |= Remove
- }
- if mask&unix.IN_MODIFY == unix.IN_MODIFY {
- e.Op |= Write
- }
- if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM {
- e.Op |= Rename
- }
- if mask&unix.IN_ATTRIB == unix.IN_ATTRIB {
- e.Op |= Chmod
- }
- return e
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
deleted file mode 100644
index b33f2b4d4..000000000
--- a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2015 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.
-
-// +build linux
-
-package fsnotify
-
-import (
- "errors"
-
- "golang.org/x/sys/unix"
-)
-
-type fdPoller struct {
- fd int // File descriptor (as returned by the inotify_init() syscall)
- epfd int // Epoll file descriptor
- pipe [2]int // Pipe for waking up
-}
-
-func emptyPoller(fd int) *fdPoller {
- poller := new(fdPoller)
- poller.fd = fd
- poller.epfd = -1
- poller.pipe[0] = -1
- poller.pipe[1] = -1
- return poller
-}
-
-// Create a new inotify poller.
-// This creates an inotify handler, and an epoll handler.
-func newFdPoller(fd int) (*fdPoller, error) {
- var errno error
- poller := emptyPoller(fd)
- defer func() {
- if errno != nil {
- poller.close()
- }
- }()
- poller.fd = fd
-
- // Create epoll fd
- poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC)
- if poller.epfd == -1 {
- return nil, errno
- }
- // Create pipe; pipe[0] is the read end, pipe[1] the write end.
- errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK|unix.O_CLOEXEC)
- if errno != nil {
- return nil, errno
- }
-
- // Register inotify fd with epoll
- event := unix.EpollEvent{
- Fd: int32(poller.fd),
- Events: unix.EPOLLIN,
- }
- errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.fd, &event)
- if errno != nil {
- return nil, errno
- }
-
- // Register pipe fd with epoll
- event = unix.EpollEvent{
- Fd: int32(poller.pipe[0]),
- Events: unix.EPOLLIN,
- }
- errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.pipe[0], &event)
- if errno != nil {
- return nil, errno
- }
-
- return poller, nil
-}
-
-// Wait using epoll.
-// Returns true if something is ready to be read,
-// false if there is not.
-func (poller *fdPoller) wait() (bool, error) {
- // 3 possible events per fd, and 2 fds, makes a maximum of 6 events.
- // I don't know whether epoll_wait returns the number of events returned,
- // or the total number of events ready.
- // I decided to catch both by making the buffer one larger than the maximum.
- events := make([]unix.EpollEvent, 7)
- for {
- n, errno := unix.EpollWait(poller.epfd, events, -1)
- if n == -1 {
- if errno == unix.EINTR {
- continue
- }
- return false, errno
- }
- if n == 0 {
- // If there are no events, try again.
- continue
- }
- if n > 6 {
- // This should never happen. More events were returned than should be possible.
- return false, errors.New("epoll_wait returned more events than I know what to do with")
- }
- ready := events[:n]
- epollhup := false
- epollerr := false
- epollin := false
- for _, event := range ready {
- if event.Fd == int32(poller.fd) {
- if event.Events&unix.EPOLLHUP != 0 {
- // This should not happen, but if it does, treat it as a wakeup.
- epollhup = true
- }
- if event.Events&unix.EPOLLERR != 0 {
- // If an error is waiting on the file descriptor, we should pretend
- // something is ready to read, and let unix.Read pick up the error.
- epollerr = true
- }
- if event.Events&unix.EPOLLIN != 0 {
- // There is data to read.
- epollin = true
- }
- }
- if event.Fd == int32(poller.pipe[0]) {
- if event.Events&unix.EPOLLHUP != 0 {
- // Write pipe descriptor was closed, by us. This means we're closing down the
- // watcher, and we should wake up.
- }
- if event.Events&unix.EPOLLERR != 0 {
- // If an error is waiting on the pipe file descriptor.
- // This is an absolute mystery, and should never ever happen.
- return false, errors.New("Error on the pipe descriptor.")
- }
- if event.Events&unix.EPOLLIN != 0 {
- // This is a regular wakeup, so we have to clear the buffer.
- err := poller.clearWake()
- if err != nil {
- return false, err
- }
- }
- }
- }
-
- if epollhup || epollerr || epollin {
- return true, nil
- }
- return false, nil
- }
-}
-
-// Close the write end of the poller.
-func (poller *fdPoller) wake() error {
- buf := make([]byte, 1)
- n, errno := unix.Write(poller.pipe[1], buf)
- if n == -1 {
- if errno == unix.EAGAIN {
- // Buffer is full, poller will wake.
- return nil
- }
- return errno
- }
- return nil
-}
-
-func (poller *fdPoller) clearWake() error {
- // You have to be woken up a LOT in order to get to 100!
- buf := make([]byte, 100)
- n, errno := unix.Read(poller.pipe[0], buf)
- if n == -1 {
- if errno == unix.EAGAIN {
- // Buffer is empty, someone else cleared our wake.
- return nil
- }
- return errno
- }
- return nil
-}
-
-// Close all poller file descriptors, but not the one passed to it.
-func (poller *fdPoller) close() {
- if poller.pipe[1] != -1 {
- unix.Close(poller.pipe[1])
- }
- if poller.pipe[0] != -1 {
- unix.Close(poller.pipe[0])
- }
- if poller.epfd != -1 {
- unix.Close(poller.epfd)
- }
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/kqueue.go b/vendor/github.com/fsnotify/fsnotify/kqueue.go
deleted file mode 100644
index 86e76a3d6..000000000
--- a/vendor/github.com/fsnotify/fsnotify/kqueue.go
+++ /dev/null
@@ -1,521 +0,0 @@
-// Copyright 2010 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.
-
-// +build freebsd openbsd netbsd dragonfly darwin
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "sync"
- "time"
-
- "golang.org/x/sys/unix"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
-
- kq int // File descriptor (as returned by the kqueue() syscall).
-
- mu sync.Mutex // Protects access to watcher data
- watches map[string]int // Map of watched file descriptors (key: path).
- externalWatches map[string]bool // Map of watches added by user of the library.
- dirFlags map[string]uint32 // Map of watched directories to fflags used in kqueue.
- paths map[int]pathInfo // Map file descriptors to path names for processing kqueue events.
- fileExists map[string]bool // Keep track of if we know this file exists (to stop duplicate create events).
- isClosed bool // Set to true when Close() is first called
-}
-
-type pathInfo struct {
- name string
- isDir bool
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- kq, err := kqueue()
- if err != nil {
- return nil, err
- }
-
- w := &Watcher{
- kq: kq,
- watches: make(map[string]int),
- dirFlags: make(map[string]uint32),
- paths: make(map[int]pathInfo),
- fileExists: make(map[string]bool),
- externalWatches: make(map[string]bool),
- Events: make(chan Event),
- Errors: make(chan error),
- done: make(chan struct{}),
- }
-
- go w.readEvents()
- return w, nil
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- w.mu.Lock()
- if w.isClosed {
- w.mu.Unlock()
- return nil
- }
- w.isClosed = true
-
- // copy paths to remove while locked
- var pathsToRemove = make([]string, 0, len(w.watches))
- for name := range w.watches {
- pathsToRemove = append(pathsToRemove, name)
- }
- w.mu.Unlock()
- // unlock before calling Remove, which also locks
-
- for _, name := range pathsToRemove {
- w.Remove(name)
- }
-
- // send a "quit" message to the reader goroutine
- close(w.done)
-
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- w.mu.Lock()
- w.externalWatches[name] = true
- w.mu.Unlock()
- _, err := w.addWatch(name, noteAllEvents)
- return err
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- name = filepath.Clean(name)
- w.mu.Lock()
- watchfd, ok := w.watches[name]
- w.mu.Unlock()
- if !ok {
- return fmt.Errorf("can't remove non-existent kevent watch for: %s", name)
- }
-
- const registerRemove = unix.EV_DELETE
- if err := register(w.kq, []int{watchfd}, registerRemove, 0); err != nil {
- return err
- }
-
- unix.Close(watchfd)
-
- w.mu.Lock()
- isDir := w.paths[watchfd].isDir
- delete(w.watches, name)
- delete(w.paths, watchfd)
- delete(w.dirFlags, name)
- w.mu.Unlock()
-
- // Find all watched paths that are in this directory that are not external.
- if isDir {
- var pathsToRemove []string
- w.mu.Lock()
- for _, path := range w.paths {
- wdir, _ := filepath.Split(path.name)
- if filepath.Clean(wdir) == name {
- if !w.externalWatches[path.name] {
- pathsToRemove = append(pathsToRemove, path.name)
- }
- }
- }
- w.mu.Unlock()
- for _, name := range pathsToRemove {
- // Since these are internal, not much sense in propagating error
- // to the user, as that will just confuse them with an error about
- // a path they did not explicitly watch themselves.
- w.Remove(name)
- }
- }
-
- return nil
-}
-
-// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE)
-const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME
-
-// keventWaitTime to block on each read from kevent
-var keventWaitTime = durationToTimespec(100 * time.Millisecond)
-
-// addWatch adds name to the watched file set.
-// The flags are interpreted as described in kevent(2).
-// Returns the real path to the file which was added, if any, which may be different from the one passed in the case of symlinks.
-func (w *Watcher) addWatch(name string, flags uint32) (string, error) {
- var isDir bool
- // Make ./name and name equivalent
- name = filepath.Clean(name)
-
- w.mu.Lock()
- if w.isClosed {
- w.mu.Unlock()
- return "", errors.New("kevent instance already closed")
- }
- watchfd, alreadyWatching := w.watches[name]
- // We already have a watch, but we can still override flags.
- if alreadyWatching {
- isDir = w.paths[watchfd].isDir
- }
- w.mu.Unlock()
-
- if !alreadyWatching {
- fi, err := os.Lstat(name)
- if err != nil {
- return "", err
- }
-
- // Don't watch sockets.
- if fi.Mode()&os.ModeSocket == os.ModeSocket {
- return "", nil
- }
-
- // Don't watch named pipes.
- if fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe {
- return "", nil
- }
-
- // Follow Symlinks
- // Unfortunately, Linux can add bogus symlinks to watch list without
- // issue, and Windows can't do symlinks period (AFAIK). To maintain
- // consistency, we will act like everything is fine. There will simply
- // be no file events for broken symlinks.
- // Hence the returns of nil on errors.
- if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
- name, err = filepath.EvalSymlinks(name)
- if err != nil {
- return "", nil
- }
-
- w.mu.Lock()
- _, alreadyWatching = w.watches[name]
- w.mu.Unlock()
-
- if alreadyWatching {
- return name, nil
- }
-
- fi, err = os.Lstat(name)
- if err != nil {
- return "", nil
- }
- }
-
- watchfd, err = unix.Open(name, openMode, 0700)
- if watchfd == -1 {
- return "", err
- }
-
- isDir = fi.IsDir()
- }
-
- const registerAdd = unix.EV_ADD | unix.EV_CLEAR | unix.EV_ENABLE
- if err := register(w.kq, []int{watchfd}, registerAdd, flags); err != nil {
- unix.Close(watchfd)
- return "", err
- }
-
- if !alreadyWatching {
- w.mu.Lock()
- w.watches[name] = watchfd
- w.paths[watchfd] = pathInfo{name: name, isDir: isDir}
- w.mu.Unlock()
- }
-
- if isDir {
- // Watch the directory if it has not been watched before,
- // or if it was watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles)
- w.mu.Lock()
-
- watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE &&
- (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE)
- // Store flags so this watch can be updated later
- w.dirFlags[name] = flags
- w.mu.Unlock()
-
- if watchDir {
- if err := w.watchDirectoryFiles(name); err != nil {
- return "", err
- }
- }
- }
- return name, nil
-}
-
-// readEvents reads from kqueue and converts the received kevents into
-// Event values that it sends down the Events channel.
-func (w *Watcher) readEvents() {
- eventBuffer := make([]unix.Kevent_t, 10)
-
-loop:
- for {
- // See if there is a message on the "done" channel
- select {
- case <-w.done:
- break loop
- default:
- }
-
- // Get new events
- kevents, err := read(w.kq, eventBuffer, &keventWaitTime)
- // EINTR is okay, the syscall was interrupted before timeout expired.
- if err != nil && err != unix.EINTR {
- select {
- case w.Errors <- err:
- case <-w.done:
- break loop
- }
- continue
- }
-
- // Flush the events we received to the Events channel
- for len(kevents) > 0 {
- kevent := &kevents[0]
- watchfd := int(kevent.Ident)
- mask := uint32(kevent.Fflags)
- w.mu.Lock()
- path := w.paths[watchfd]
- w.mu.Unlock()
- event := newEvent(path.name, mask)
-
- if path.isDir && !(event.Op&Remove == Remove) {
- // Double check to make sure the directory exists. This can happen when
- // we do a rm -fr on a recursively watched folders and we receive a
- // modification event first but the folder has been deleted and later
- // receive the delete event
- if _, err := os.Lstat(event.Name); os.IsNotExist(err) {
- // mark is as delete event
- event.Op |= Remove
- }
- }
-
- if event.Op&Rename == Rename || event.Op&Remove == Remove {
- w.Remove(event.Name)
- w.mu.Lock()
- delete(w.fileExists, event.Name)
- w.mu.Unlock()
- }
-
- if path.isDir && event.Op&Write == Write && !(event.Op&Remove == Remove) {
- w.sendDirectoryChangeEvents(event.Name)
- } else {
- // Send the event on the Events channel.
- select {
- case w.Events <- event:
- case <-w.done:
- break loop
- }
- }
-
- if event.Op&Remove == Remove {
- // Look for a file that may have overwritten this.
- // For example, mv f1 f2 will delete f2, then create f2.
- if path.isDir {
- fileDir := filepath.Clean(event.Name)
- w.mu.Lock()
- _, found := w.watches[fileDir]
- w.mu.Unlock()
- if found {
- // make sure the directory exists before we watch for changes. When we
- // do a recursive watch and perform rm -fr, the parent directory might
- // have gone missing, ignore the missing directory and let the
- // upcoming delete event remove the watch from the parent directory.
- if _, err := os.Lstat(fileDir); err == nil {
- w.sendDirectoryChangeEvents(fileDir)
- }
- }
- } else {
- filePath := filepath.Clean(event.Name)
- if fileInfo, err := os.Lstat(filePath); err == nil {
- w.sendFileCreatedEventIfNew(filePath, fileInfo)
- }
- }
- }
-
- // Move to next event
- kevents = kevents[1:]
- }
- }
-
- // cleanup
- err := unix.Close(w.kq)
- if err != nil {
- // only way the previous loop breaks is if w.done was closed so we need to async send to w.Errors.
- select {
- case w.Errors <- err:
- default:
- }
- }
- close(w.Events)
- close(w.Errors)
-}
-
-// newEvent returns an platform-independent Event based on kqueue Fflags.
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&unix.NOTE_DELETE == unix.NOTE_DELETE {
- e.Op |= Remove
- }
- if mask&unix.NOTE_WRITE == unix.NOTE_WRITE {
- e.Op |= Write
- }
- if mask&unix.NOTE_RENAME == unix.NOTE_RENAME {
- e.Op |= Rename
- }
- if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB {
- e.Op |= Chmod
- }
- return e
-}
-
-func newCreateEvent(name string) Event {
- return Event{Name: name, Op: Create}
-}
-
-// watchDirectoryFiles to mimic inotify when adding a watch on a directory
-func (w *Watcher) watchDirectoryFiles(dirPath string) error {
- // Get all files
- files, err := ioutil.ReadDir(dirPath)
- if err != nil {
- return err
- }
-
- for _, fileInfo := range files {
- filePath := filepath.Join(dirPath, fileInfo.Name())
- filePath, err = w.internalWatch(filePath, fileInfo)
- if err != nil {
- return err
- }
-
- w.mu.Lock()
- w.fileExists[filePath] = true
- w.mu.Unlock()
- }
-
- return nil
-}
-
-// sendDirectoryEvents searches the directory for newly created files
-// and sends them over the event channel. This functionality is to have
-// the BSD version of fsnotify match Linux inotify which provides a
-// create event for files created in a watched directory.
-func (w *Watcher) sendDirectoryChangeEvents(dirPath string) {
- // Get all files
- files, err := ioutil.ReadDir(dirPath)
- if err != nil {
- select {
- case w.Errors <- err:
- case <-w.done:
- return
- }
- }
-
- // Search for new files
- for _, fileInfo := range files {
- filePath := filepath.Join(dirPath, fileInfo.Name())
- err := w.sendFileCreatedEventIfNew(filePath, fileInfo)
-
- if err != nil {
- return
- }
- }
-}
-
-// sendFileCreatedEvent sends a create event if the file isn't already being tracked.
-func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fileInfo os.FileInfo) (err error) {
- w.mu.Lock()
- _, doesExist := w.fileExists[filePath]
- w.mu.Unlock()
- if !doesExist {
- // Send create event
- select {
- case w.Events <- newCreateEvent(filePath):
- case <-w.done:
- return
- }
- }
-
- // like watchDirectoryFiles (but without doing another ReadDir)
- filePath, err = w.internalWatch(filePath, fileInfo)
- if err != nil {
- return err
- }
-
- w.mu.Lock()
- w.fileExists[filePath] = true
- w.mu.Unlock()
-
- return nil
-}
-
-func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, error) {
- if fileInfo.IsDir() {
- // mimic Linux providing delete events for subdirectories
- // but preserve the flags used if currently watching subdirectory
- w.mu.Lock()
- flags := w.dirFlags[name]
- w.mu.Unlock()
-
- flags |= unix.NOTE_DELETE | unix.NOTE_RENAME
- return w.addWatch(name, flags)
- }
-
- // watch file to mimic Linux inotify
- return w.addWatch(name, noteAllEvents)
-}
-
-// kqueue creates a new kernel event queue and returns a descriptor.
-func kqueue() (kq int, err error) {
- kq, err = unix.Kqueue()
- if kq == -1 {
- return kq, err
- }
- return kq, nil
-}
-
-// register events with the queue
-func register(kq int, fds []int, flags int, fflags uint32) error {
- changes := make([]unix.Kevent_t, len(fds))
-
- for i, fd := range fds {
- // SetKevent converts int to the platform-specific types:
- unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags)
- changes[i].Fflags = fflags
- }
-
- // register the events
- success, err := unix.Kevent(kq, changes, nil, nil)
- if success == -1 {
- return err
- }
- return nil
-}
-
-// read retrieves pending events, or waits until an event occurs.
-// A timeout of nil blocks indefinitely, while 0 polls the queue.
-func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]unix.Kevent_t, error) {
- n, err := unix.Kevent(kq, nil, events, timeout)
- if err != nil {
- return nil, err
- }
- return events[0:n], nil
-}
-
-// durationToTimespec prepares a timeout value
-func durationToTimespec(d time.Duration) unix.Timespec {
- return unix.NsecToTimespec(d.Nanoseconds())
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go b/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go
deleted file mode 100644
index 2306c4620..000000000
--- a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 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.
-
-// +build freebsd openbsd netbsd dragonfly
-
-package fsnotify
-
-import "golang.org/x/sys/unix"
-
-const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC
diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go b/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go
deleted file mode 100644
index 870c4d6d1..000000000
--- a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2013 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.
-
-// +build darwin
-
-package fsnotify
-
-import "golang.org/x/sys/unix"
-
-// note: this constant is not defined on BSD
-const openMode = unix.O_EVTONLY | unix.O_CLOEXEC
diff --git a/vendor/github.com/fsnotify/fsnotify/windows.go b/vendor/github.com/fsnotify/fsnotify/windows.go
deleted file mode 100644
index 09436f31d..000000000
--- a/vendor/github.com/fsnotify/fsnotify/windows.go
+++ /dev/null
@@ -1,561 +0,0 @@
-// Copyright 2011 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.
-
-// +build windows
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "os"
- "path/filepath"
- "runtime"
- "sync"
- "syscall"
- "unsafe"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- isClosed bool // Set to true when Close() is first called
- mu sync.Mutex // Map access
- port syscall.Handle // Handle to completion port
- watches watchMap // Map of watches (key: i-number)
- input chan *input // Inputs to the reader are sent on this channel
- quit chan chan<- error
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- port, e := syscall.CreateIoCompletionPort(syscall.InvalidHandle, 0, 0, 0)
- if e != nil {
- return nil, os.NewSyscallError("CreateIoCompletionPort", e)
- }
- w := &Watcher{
- port: port,
- watches: make(watchMap),
- input: make(chan *input, 1),
- Events: make(chan Event, 50),
- Errors: make(chan error),
- quit: make(chan chan<- error, 1),
- }
- go w.readEvents()
- return w, nil
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- if w.isClosed {
- return nil
- }
- w.isClosed = true
-
- // Send "quit" message to the reader goroutine
- ch := make(chan error)
- w.quit <- ch
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-ch
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- if w.isClosed {
- return errors.New("watcher already closed")
- }
- in := &input{
- op: opAddWatch,
- path: filepath.Clean(name),
- flags: sysFSALLEVENTS,
- reply: make(chan error),
- }
- w.input <- in
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-in.reply
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- in := &input{
- op: opRemoveWatch,
- path: filepath.Clean(name),
- reply: make(chan error),
- }
- w.input <- in
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-in.reply
-}
-
-const (
- // Options for AddWatch
- sysFSONESHOT = 0x80000000
- sysFSONLYDIR = 0x1000000
-
- // Events
- sysFSACCESS = 0x1
- sysFSALLEVENTS = 0xfff
- sysFSATTRIB = 0x4
- sysFSCLOSE = 0x18
- sysFSCREATE = 0x100
- sysFSDELETE = 0x200
- sysFSDELETESELF = 0x400
- sysFSMODIFY = 0x2
- sysFSMOVE = 0xc0
- sysFSMOVEDFROM = 0x40
- sysFSMOVEDTO = 0x80
- sysFSMOVESELF = 0x800
-
- // Special events
- sysFSIGNORED = 0x8000
- sysFSQOVERFLOW = 0x4000
-)
-
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO {
- e.Op |= Create
- }
- if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF {
- e.Op |= Remove
- }
- if mask&sysFSMODIFY == sysFSMODIFY {
- e.Op |= Write
- }
- if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM {
- e.Op |= Rename
- }
- if mask&sysFSATTRIB == sysFSATTRIB {
- e.Op |= Chmod
- }
- return e
-}
-
-const (
- opAddWatch = iota
- opRemoveWatch
-)
-
-const (
- provisional uint64 = 1 << (32 + iota)
-)
-
-type input struct {
- op int
- path string
- flags uint32
- reply chan error
-}
-
-type inode struct {
- handle syscall.Handle
- volume uint32
- index uint64
-}
-
-type watch struct {
- ov syscall.Overlapped
- ino *inode // i-number
- path string // Directory path
- mask uint64 // Directory itself is being watched with these notify flags
- names map[string]uint64 // Map of names being watched and their notify flags
- rename string // Remembers the old name while renaming a file
- buf [4096]byte
-}
-
-type indexMap map[uint64]*watch
-type watchMap map[uint32]indexMap
-
-func (w *Watcher) wakeupReader() error {
- e := syscall.PostQueuedCompletionStatus(w.port, 0, 0, nil)
- if e != nil {
- return os.NewSyscallError("PostQueuedCompletionStatus", e)
- }
- return nil
-}
-
-func getDir(pathname string) (dir string, err error) {
- attr, e := syscall.GetFileAttributes(syscall.StringToUTF16Ptr(pathname))
- if e != nil {
- return "", os.NewSyscallError("GetFileAttributes", e)
- }
- if attr&syscall.FILE_ATTRIBUTE_DIRECTORY != 0 {
- dir = pathname
- } else {
- dir, _ = filepath.Split(pathname)
- dir = filepath.Clean(dir)
- }
- return
-}
-
-func getIno(path string) (ino *inode, err error) {
- h, e := syscall.CreateFile(syscall.StringToUTF16Ptr(path),
- syscall.FILE_LIST_DIRECTORY,
- syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- nil, syscall.OPEN_EXISTING,
- syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OVERLAPPED, 0)
- if e != nil {
- return nil, os.NewSyscallError("CreateFile", e)
- }
- var fi syscall.ByHandleFileInformation
- if e = syscall.GetFileInformationByHandle(h, &fi); e != nil {
- syscall.CloseHandle(h)
- return nil, os.NewSyscallError("GetFileInformationByHandle", e)
- }
- ino = &inode{
- handle: h,
- volume: fi.VolumeSerialNumber,
- index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow),
- }
- return ino, nil
-}
-
-// Must run within the I/O thread.
-func (m watchMap) get(ino *inode) *watch {
- if i := m[ino.volume]; i != nil {
- return i[ino.index]
- }
- return nil
-}
-
-// Must run within the I/O thread.
-func (m watchMap) set(ino *inode, watch *watch) {
- i := m[ino.volume]
- if i == nil {
- i = make(indexMap)
- m[ino.volume] = i
- }
- i[ino.index] = watch
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) addWatch(pathname string, flags uint64) error {
- dir, err := getDir(pathname)
- if err != nil {
- return err
- }
- if flags&sysFSONLYDIR != 0 && pathname != dir {
- return nil
- }
- ino, err := getIno(dir)
- if err != nil {
- return err
- }
- w.mu.Lock()
- watchEntry := w.watches.get(ino)
- w.mu.Unlock()
- if watchEntry == nil {
- if _, e := syscall.CreateIoCompletionPort(ino.handle, w.port, 0, 0); e != nil {
- syscall.CloseHandle(ino.handle)
- return os.NewSyscallError("CreateIoCompletionPort", e)
- }
- watchEntry = &watch{
- ino: ino,
- path: dir,
- names: make(map[string]uint64),
- }
- w.mu.Lock()
- w.watches.set(ino, watchEntry)
- w.mu.Unlock()
- flags |= provisional
- } else {
- syscall.CloseHandle(ino.handle)
- }
- if pathname == dir {
- watchEntry.mask |= flags
- } else {
- watchEntry.names[filepath.Base(pathname)] |= flags
- }
- if err = w.startRead(watchEntry); err != nil {
- return err
- }
- if pathname == dir {
- watchEntry.mask &= ^provisional
- } else {
- watchEntry.names[filepath.Base(pathname)] &= ^provisional
- }
- return nil
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) remWatch(pathname string) error {
- dir, err := getDir(pathname)
- if err != nil {
- return err
- }
- ino, err := getIno(dir)
- if err != nil {
- return err
- }
- w.mu.Lock()
- watch := w.watches.get(ino)
- w.mu.Unlock()
- if watch == nil {
- return fmt.Errorf("can't remove non-existent watch for: %s", pathname)
- }
- if pathname == dir {
- w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
- watch.mask = 0
- } else {
- name := filepath.Base(pathname)
- w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED)
- delete(watch.names, name)
- }
- return w.startRead(watch)
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) deleteWatch(watch *watch) {
- for name, mask := range watch.names {
- if mask&provisional == 0 {
- w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED)
- }
- delete(watch.names, name)
- }
- if watch.mask != 0 {
- if watch.mask&provisional == 0 {
- w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
- }
- watch.mask = 0
- }
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) startRead(watch *watch) error {
- if e := syscall.CancelIo(watch.ino.handle); e != nil {
- w.Errors <- os.NewSyscallError("CancelIo", e)
- w.deleteWatch(watch)
- }
- mask := toWindowsFlags(watch.mask)
- for _, m := range watch.names {
- mask |= toWindowsFlags(m)
- }
- if mask == 0 {
- if e := syscall.CloseHandle(watch.ino.handle); e != nil {
- w.Errors <- os.NewSyscallError("CloseHandle", e)
- }
- w.mu.Lock()
- delete(w.watches[watch.ino.volume], watch.ino.index)
- w.mu.Unlock()
- return nil
- }
- e := syscall.ReadDirectoryChanges(watch.ino.handle, &watch.buf[0],
- uint32(unsafe.Sizeof(watch.buf)), false, mask, nil, &watch.ov, 0)
- if e != nil {
- err := os.NewSyscallError("ReadDirectoryChanges", e)
- if e == syscall.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 {
- // Watched directory was probably removed
- if w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) {
- if watch.mask&sysFSONESHOT != 0 {
- watch.mask = 0
- }
- }
- err = nil
- }
- w.deleteWatch(watch)
- w.startRead(watch)
- return err
- }
- return nil
-}
-
-// readEvents reads from the I/O completion port, converts the
-// received events into Event objects and sends them via the Events channel.
-// Entry point to the I/O thread.
-func (w *Watcher) readEvents() {
- var (
- n, key uint32
- ov *syscall.Overlapped
- )
- runtime.LockOSThread()
-
- for {
- e := syscall.GetQueuedCompletionStatus(w.port, &n, &key, &ov, syscall.INFINITE)
- watch := (*watch)(unsafe.Pointer(ov))
-
- if watch == nil {
- select {
- case ch := <-w.quit:
- w.mu.Lock()
- var indexes []indexMap
- for _, index := range w.watches {
- indexes = append(indexes, index)
- }
- w.mu.Unlock()
- for _, index := range indexes {
- for _, watch := range index {
- w.deleteWatch(watch)
- w.startRead(watch)
- }
- }
- var err error
- if e := syscall.CloseHandle(w.port); e != nil {
- err = os.NewSyscallError("CloseHandle", e)
- }
- close(w.Events)
- close(w.Errors)
- ch <- err
- return
- case in := <-w.input:
- switch in.op {
- case opAddWatch:
- in.reply <- w.addWatch(in.path, uint64(in.flags))
- case opRemoveWatch:
- in.reply <- w.remWatch(in.path)
- }
- default:
- }
- continue
- }
-
- switch e {
- case syscall.ERROR_MORE_DATA:
- if watch == nil {
- w.Errors <- errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer")
- } else {
- // The i/o succeeded but the buffer is full.
- // In theory we should be building up a full packet.
- // In practice we can get away with just carrying on.
- n = uint32(unsafe.Sizeof(watch.buf))
- }
- case syscall.ERROR_ACCESS_DENIED:
- // Watched directory was probably removed
- w.sendEvent(watch.path, watch.mask&sysFSDELETESELF)
- w.deleteWatch(watch)
- w.startRead(watch)
- continue
- case syscall.ERROR_OPERATION_ABORTED:
- // CancelIo was called on this handle
- continue
- default:
- w.Errors <- os.NewSyscallError("GetQueuedCompletionPort", e)
- continue
- case nil:
- }
-
- var offset uint32
- for {
- if n == 0 {
- w.Events <- newEvent("", sysFSQOVERFLOW)
- w.Errors <- errors.New("short read in readEvents()")
- break
- }
-
- // Point "raw" to the event in the buffer
- raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset]))
- buf := (*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName))
- name := syscall.UTF16ToString(buf[:raw.FileNameLength/2])
- fullname := filepath.Join(watch.path, name)
-
- var mask uint64
- switch raw.Action {
- case syscall.FILE_ACTION_REMOVED:
- mask = sysFSDELETESELF
- case syscall.FILE_ACTION_MODIFIED:
- mask = sysFSMODIFY
- case syscall.FILE_ACTION_RENAMED_OLD_NAME:
- watch.rename = name
- case syscall.FILE_ACTION_RENAMED_NEW_NAME:
- if watch.names[watch.rename] != 0 {
- watch.names[name] |= watch.names[watch.rename]
- delete(watch.names, watch.rename)
- mask = sysFSMOVESELF
- }
- }
-
- sendNameEvent := func() {
- if w.sendEvent(fullname, watch.names[name]&mask) {
- if watch.names[name]&sysFSONESHOT != 0 {
- delete(watch.names, name)
- }
- }
- }
- if raw.Action != syscall.FILE_ACTION_RENAMED_NEW_NAME {
- sendNameEvent()
- }
- if raw.Action == syscall.FILE_ACTION_REMOVED {
- w.sendEvent(fullname, watch.names[name]&sysFSIGNORED)
- delete(watch.names, name)
- }
- if w.sendEvent(fullname, watch.mask&toFSnotifyFlags(raw.Action)) {
- if watch.mask&sysFSONESHOT != 0 {
- watch.mask = 0
- }
- }
- if raw.Action == syscall.FILE_ACTION_RENAMED_NEW_NAME {
- fullname = filepath.Join(watch.path, watch.rename)
- sendNameEvent()
- }
-
- // Move to the next event in the buffer
- if raw.NextEntryOffset == 0 {
- break
- }
- offset += raw.NextEntryOffset
-
- // Error!
- if offset >= n {
- w.Errors <- errors.New("Windows system assumed buffer larger than it is, events have likely been missed.")
- break
- }
- }
-
- if err := w.startRead(watch); err != nil {
- w.Errors <- err
- }
- }
-}
-
-func (w *Watcher) sendEvent(name string, mask uint64) bool {
- if mask == 0 {
- return false
- }
- event := newEvent(name, uint32(mask))
- select {
- case ch := <-w.quit:
- w.quit <- ch
- case w.Events <- event:
- }
- return true
-}
-
-func toWindowsFlags(mask uint64) uint32 {
- var m uint32
- if mask&sysFSACCESS != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS
- }
- if mask&sysFSMODIFY != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_LAST_WRITE
- }
- if mask&sysFSATTRIB != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES
- }
- if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_FILE_NAME | syscall.FILE_NOTIFY_CHANGE_DIR_NAME
- }
- return m
-}
-
-func toFSnotifyFlags(action uint32) uint64 {
- switch action {
- case syscall.FILE_ACTION_ADDED:
- return sysFSCREATE
- case syscall.FILE_ACTION_REMOVED:
- return sysFSDELETE
- case syscall.FILE_ACTION_MODIFIED:
- return sysFSMODIFY
- case syscall.FILE_ACTION_RENAMED_OLD_NAME:
- return sysFSMOVEDFROM
- case syscall.FILE_ACTION_RENAMED_NEW_NAME:
- return sysFSMOVEDTO
- }
- return 0
-}
diff --git a/vendor/github.com/fzipp/gocyclo/CONTRIBUTORS b/vendor/github.com/fzipp/gocyclo/CONTRIBUTORS
deleted file mode 100644
index 1c09f1a06..000000000
--- a/vendor/github.com/fzipp/gocyclo/CONTRIBUTORS
+++ /dev/null
@@ -1,7 +0,0 @@
-# Names should be added to this file like so:
-# Name
-
-# Please keep the list sorted.
-
-Frederik Zipp
-Harshavardhana
diff --git a/vendor/github.com/fzipp/gocyclo/LICENSE b/vendor/github.com/fzipp/gocyclo/LICENSE
deleted file mode 100644
index 45f88d6cb..000000000
--- a/vendor/github.com/fzipp/gocyclo/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2013 Frederik Zipp. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of the copyright owner nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/fzipp/gocyclo/README.md b/vendor/github.com/fzipp/gocyclo/README.md
deleted file mode 100644
index b2ec36a7f..000000000
--- a/vendor/github.com/fzipp/gocyclo/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-Gocyclo calculates cyclomatic complexities of functions in Go source code.
-
-The cyclomatic complexity of a function is calculated according to the
-following rules:
-
- 1 is the base complexity of a function
- +1 for each 'if', 'for', 'case', '&&' or '||'
-
-To install, run
-
- $ go get github.com/fzipp/gocyclo
-
-and put the resulting binary in one of your PATH directories if
-`$GOPATH/bin` isn't already in your PATH.
-
-Usage:
-
- $ gocyclo [ ...] ...
-
-Examples:
-
- $ gocyclo .
- $ gocyclo main.go
- $ gocyclo -top 10 src/
- $ gocyclo -over 25 docker
- $ gocyclo -avg .
-
-The output fields for each line are:
-
-
-
diff --git a/vendor/github.com/fzipp/gocyclo/gocyclo.go b/vendor/github.com/fzipp/gocyclo/gocyclo.go
deleted file mode 100644
index 00ab50d1f..000000000
--- a/vendor/github.com/fzipp/gocyclo/gocyclo.go
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright 2013 Frederik Zipp. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Gocyclo calculates the cyclomatic complexities of functions and
-// methods in Go source code.
-//
-// Usage:
-// gocyclo [ ...] ...
-//
-// Flags:
-// -over N show functions with complexity > N only and
-// return exit code 1 if the output is non-empty
-// -top N show the top N most complex functions only
-// -avg show the average complexity
-//
-// The output fields for each line are:
-//
-package main
-
-import (
- "flag"
- "fmt"
- "go/ast"
- "go/parser"
- "go/token"
- "io"
- "log"
- "os"
- "path/filepath"
- "sort"
- "strings"
-)
-
-const usageDoc = `Calculate cyclomatic complexities of Go functions.
-Usage:
- gocyclo [flags] ...
-
-Flags:
- -over N show functions with complexity > N only and
- return exit code 1 if the set is non-empty
- -top N show the top N most complex functions only
- -avg show the average complexity over all functions,
- not depending on whether -over or -top are set
-
-The output fields for each line are:
-
-`
-
-func usage() {
- fmt.Fprintf(os.Stderr, usageDoc)
- os.Exit(2)
-}
-
-var (
- over = flag.Int("over", 0, "show functions with complexity > N only")
- top = flag.Int("top", -1, "show the top N most complex functions only")
- avg = flag.Bool("avg", false, "show the average complexity")
-)
-
-func main() {
- log.SetFlags(0)
- log.SetPrefix("gocyclo: ")
- flag.Usage = usage
- flag.Parse()
- args := flag.Args()
- if len(args) == 0 {
- usage()
- }
-
- stats := analyze(args)
- sort.Sort(byComplexity(stats))
- written := writeStats(os.Stdout, stats)
-
- if *avg {
- showAverage(stats)
- }
-
- if *over > 0 && written > 0 {
- os.Exit(1)
- }
-}
-
-func analyze(paths []string) []stat {
- var stats []stat
- for _, path := range paths {
- if isDir(path) {
- stats = analyzeDir(path, stats)
- } else {
- stats = analyzeFile(path, stats)
- }
- }
- return stats
-}
-
-func isDir(filename string) bool {
- fi, err := os.Stat(filename)
- return err == nil && fi.IsDir()
-}
-
-func analyzeFile(fname string, stats []stat) []stat {
- fset := token.NewFileSet()
- f, err := parser.ParseFile(fset, fname, nil, 0)
- if err != nil {
- log.Fatal(err)
- }
- return buildStats(f, fset, stats)
-}
-
-func analyzeDir(dirname string, stats []stat) []stat {
- filepath.Walk(dirname, func(path string, info os.FileInfo, err error) error {
- if err == nil && !info.IsDir() && strings.HasSuffix(path, ".go") {
- stats = analyzeFile(path, stats)
- }
- return err
- })
- return stats
-}
-
-func writeStats(w io.Writer, sortedStats []stat) int {
- for i, stat := range sortedStats {
- if i == *top {
- return i
- }
- if stat.Complexity <= *over {
- return i
- }
- fmt.Fprintln(w, stat)
- }
- return len(sortedStats)
-}
-
-func showAverage(stats []stat) {
- fmt.Printf("Average: %.3g\n", average(stats))
-}
-
-func average(stats []stat) float64 {
- total := 0
- for _, s := range stats {
- total += s.Complexity
- }
- return float64(total) / float64(len(stats))
-}
-
-type stat struct {
- PkgName string
- FuncName string
- Complexity int
- Pos token.Position
-}
-
-func (s stat) String() string {
- return fmt.Sprintf("%d %s %s %s", s.Complexity, s.PkgName, s.FuncName, s.Pos)
-}
-
-type byComplexity []stat
-
-func (s byComplexity) Len() int { return len(s) }
-func (s byComplexity) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s byComplexity) Less(i, j int) bool {
- return s[i].Complexity >= s[j].Complexity
-}
-
-func buildStats(f *ast.File, fset *token.FileSet, stats []stat) []stat {
- for _, decl := range f.Decls {
- if fn, ok := decl.(*ast.FuncDecl); ok {
- stats = append(stats, stat{
- PkgName: f.Name.Name,
- FuncName: funcName(fn),
- Complexity: complexity(fn),
- Pos: fset.Position(fn.Pos()),
- })
- }
- }
- return stats
-}
-
-// funcName returns the name representation of a function or method:
-// "(Type).Name" for methods or simply "Name" for functions.
-func funcName(fn *ast.FuncDecl) string {
- if fn.Recv != nil {
- if fn.Recv.NumFields() > 0 {
- typ := fn.Recv.List[0].Type
- return fmt.Sprintf("(%s).%s", recvString(typ), fn.Name)
- }
- }
- return fn.Name.Name
-}
-
-// recvString returns a string representation of recv of the
-// form "T", "*T", or "BADRECV" (if not a proper receiver type).
-func recvString(recv ast.Expr) string {
- switch t := recv.(type) {
- case *ast.Ident:
- return t.Name
- case *ast.StarExpr:
- return "*" + recvString(t.X)
- }
- return "BADRECV"
-}
-
-// complexity calculates the cyclomatic complexity of a function.
-func complexity(fn *ast.FuncDecl) int {
- v := complexityVisitor{}
- ast.Walk(&v, fn)
- return v.Complexity
-}
-
-type complexityVisitor struct {
- // Complexity is the cyclomatic complexity
- Complexity int
-}
-
-// Visit implements the ast.Visitor interface.
-func (v *complexityVisitor) Visit(n ast.Node) ast.Visitor {
- switch n := n.(type) {
- case *ast.FuncDecl, *ast.IfStmt, *ast.ForStmt, *ast.RangeStmt, *ast.CaseClause, *ast.CommClause:
- v.Complexity++
- case *ast.BinaryExpr:
- if n.Op == token.LAND || n.Op == token.LOR {
- v.Complexity++
- }
- }
- return v
-}
diff --git a/vendor/github.com/garyburd/redigo/LICENSE b/vendor/github.com/garyburd/redigo/LICENSE
deleted file mode 100644
index 67db85882..000000000
--- a/vendor/github.com/garyburd/redigo/LICENSE
+++ /dev/null
@@ -1,175 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
diff --git a/vendor/github.com/garyburd/redigo/internal/commandinfo.go b/vendor/github.com/garyburd/redigo/internal/commandinfo.go
deleted file mode 100644
index 11e584257..000000000
--- a/vendor/github.com/garyburd/redigo/internal/commandinfo.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package internal // import "github.com/garyburd/redigo/internal"
-
-import (
- "strings"
-)
-
-const (
- WatchState = 1 << iota
- MultiState
- SubscribeState
- MonitorState
-)
-
-type CommandInfo struct {
- Set, Clear int
-}
-
-var commandInfos = map[string]CommandInfo{
- "WATCH": {Set: WatchState},
- "UNWATCH": {Clear: WatchState},
- "MULTI": {Set: MultiState},
- "EXEC": {Clear: WatchState | MultiState},
- "DISCARD": {Clear: WatchState | MultiState},
- "PSUBSCRIBE": {Set: SubscribeState},
- "SUBSCRIBE": {Set: SubscribeState},
- "MONITOR": {Set: MonitorState},
-}
-
-func init() {
- for n, ci := range commandInfos {
- commandInfos[strings.ToLower(n)] = ci
- }
-}
-
-func LookupCommandInfo(commandName string) CommandInfo {
- if ci, ok := commandInfos[commandName]; ok {
- return ci
- }
- return commandInfos[strings.ToUpper(commandName)]
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/conn.go b/vendor/github.com/garyburd/redigo/redis/conn.go
deleted file mode 100644
index 5aa0f32f2..000000000
--- a/vendor/github.com/garyburd/redigo/redis/conn.go
+++ /dev/null
@@ -1,673 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package redis
-
-import (
- "bufio"
- "bytes"
- "crypto/tls"
- "errors"
- "fmt"
- "io"
- "net"
- "net/url"
- "regexp"
- "strconv"
- "sync"
- "time"
-)
-
-var (
- _ ConnWithTimeout = (*conn)(nil)
-)
-
-// conn is the low-level implementation of Conn
-type conn struct {
- // Shared
- mu sync.Mutex
- pending int
- err error
- conn net.Conn
-
- // Read
- readTimeout time.Duration
- br *bufio.Reader
-
- // Write
- writeTimeout time.Duration
- bw *bufio.Writer
-
- // Scratch space for formatting argument length.
- // '*' or '$', length, "\r\n"
- lenScratch [32]byte
-
- // Scratch space for formatting integers and floats.
- numScratch [40]byte
-}
-
-// DialTimeout acts like Dial but takes timeouts for establishing the
-// connection to the server, writing a command and reading a reply.
-//
-// Deprecated: Use Dial with options instead.
-func DialTimeout(network, address string, connectTimeout, readTimeout, writeTimeout time.Duration) (Conn, error) {
- return Dial(network, address,
- DialConnectTimeout(connectTimeout),
- DialReadTimeout(readTimeout),
- DialWriteTimeout(writeTimeout))
-}
-
-// DialOption specifies an option for dialing a Redis server.
-type DialOption struct {
- f func(*dialOptions)
-}
-
-type dialOptions struct {
- readTimeout time.Duration
- writeTimeout time.Duration
- dialer *net.Dialer
- dial func(network, addr string) (net.Conn, error)
- db int
- password string
- useTLS bool
- skipVerify bool
- tlsConfig *tls.Config
-}
-
-// DialReadTimeout specifies the timeout for reading a single command reply.
-func DialReadTimeout(d time.Duration) DialOption {
- return DialOption{func(do *dialOptions) {
- do.readTimeout = d
- }}
-}
-
-// DialWriteTimeout specifies the timeout for writing a single command.
-func DialWriteTimeout(d time.Duration) DialOption {
- return DialOption{func(do *dialOptions) {
- do.writeTimeout = d
- }}
-}
-
-// DialConnectTimeout specifies the timeout for connecting to the Redis server when
-// no DialNetDial option is specified.
-func DialConnectTimeout(d time.Duration) DialOption {
- return DialOption{func(do *dialOptions) {
- do.dialer.Timeout = d
- }}
-}
-
-// DialKeepAlive specifies the keep-alive period for TCP connections to the Redis server
-// when no DialNetDial option is specified.
-// If zero, keep-alives are not enabled. If no DialKeepAlive option is specified then
-// the default of 5 minutes is used to ensure that half-closed TCP sessions are detected.
-func DialKeepAlive(d time.Duration) DialOption {
- return DialOption{func(do *dialOptions) {
- do.dialer.KeepAlive = d
- }}
-}
-
-// DialNetDial specifies a custom dial function for creating TCP
-// connections, otherwise a net.Dialer customized via the other options is used.
-// DialNetDial overrides DialConnectTimeout and DialKeepAlive.
-func DialNetDial(dial func(network, addr string) (net.Conn, error)) DialOption {
- return DialOption{func(do *dialOptions) {
- do.dial = dial
- }}
-}
-
-// DialDatabase specifies the database to select when dialing a connection.
-func DialDatabase(db int) DialOption {
- return DialOption{func(do *dialOptions) {
- do.db = db
- }}
-}
-
-// DialPassword specifies the password to use when connecting to
-// the Redis server.
-func DialPassword(password string) DialOption {
- return DialOption{func(do *dialOptions) {
- do.password = password
- }}
-}
-
-// DialTLSConfig specifies the config to use when a TLS connection is dialed.
-// Has no effect when not dialing a TLS connection.
-func DialTLSConfig(c *tls.Config) DialOption {
- return DialOption{func(do *dialOptions) {
- do.tlsConfig = c
- }}
-}
-
-// DialTLSSkipVerify disables server name verification when connecting over
-// TLS. Has no effect when not dialing a TLS connection.
-func DialTLSSkipVerify(skip bool) DialOption {
- return DialOption{func(do *dialOptions) {
- do.skipVerify = skip
- }}
-}
-
-// DialUseTLS specifies whether TLS should be used when connecting to the
-// server. This option is ignore by DialURL.
-func DialUseTLS(useTLS bool) DialOption {
- return DialOption{func(do *dialOptions) {
- do.useTLS = useTLS
- }}
-}
-
-// Dial connects to the Redis server at the given network and
-// address using the specified options.
-func Dial(network, address string, options ...DialOption) (Conn, error) {
- do := dialOptions{
- dialer: &net.Dialer{
- KeepAlive: time.Minute * 5,
- },
- }
- for _, option := range options {
- option.f(&do)
- }
- if do.dial == nil {
- do.dial = do.dialer.Dial
- }
-
- netConn, err := do.dial(network, address)
- if err != nil {
- return nil, err
- }
-
- if do.useTLS {
- var tlsConfig *tls.Config
- if do.tlsConfig == nil {
- tlsConfig = &tls.Config{InsecureSkipVerify: do.skipVerify}
- } else {
- tlsConfig = cloneTLSConfig(do.tlsConfig)
- }
- if tlsConfig.ServerName == "" {
- host, _, err := net.SplitHostPort(address)
- if err != nil {
- netConn.Close()
- return nil, err
- }
- tlsConfig.ServerName = host
- }
-
- tlsConn := tls.Client(netConn, tlsConfig)
- if err := tlsConn.Handshake(); err != nil {
- netConn.Close()
- return nil, err
- }
- netConn = tlsConn
- }
-
- c := &conn{
- conn: netConn,
- bw: bufio.NewWriter(netConn),
- br: bufio.NewReader(netConn),
- readTimeout: do.readTimeout,
- writeTimeout: do.writeTimeout,
- }
-
- if do.password != "" {
- if _, err := c.Do("AUTH", do.password); err != nil {
- netConn.Close()
- return nil, err
- }
- }
-
- if do.db != 0 {
- if _, err := c.Do("SELECT", do.db); err != nil {
- netConn.Close()
- return nil, err
- }
- }
-
- return c, nil
-}
-
-var pathDBRegexp = regexp.MustCompile(`/(\d*)\z`)
-
-// DialURL connects to a Redis server at the given URL using the Redis
-// URI scheme. URLs should follow the draft IANA specification for the
-// scheme (https://www.iana.org/assignments/uri-schemes/prov/redis).
-func DialURL(rawurl string, options ...DialOption) (Conn, error) {
- u, err := url.Parse(rawurl)
- if err != nil {
- return nil, err
- }
-
- if u.Scheme != "redis" && u.Scheme != "rediss" {
- return nil, fmt.Errorf("invalid redis URL scheme: %s", u.Scheme)
- }
-
- // As per the IANA draft spec, the host defaults to localhost and
- // the port defaults to 6379.
- host, port, err := net.SplitHostPort(u.Host)
- if err != nil {
- // assume port is missing
- host = u.Host
- port = "6379"
- }
- if host == "" {
- host = "localhost"
- }
- address := net.JoinHostPort(host, port)
-
- if u.User != nil {
- password, isSet := u.User.Password()
- if isSet {
- options = append(options, DialPassword(password))
- }
- }
-
- match := pathDBRegexp.FindStringSubmatch(u.Path)
- if len(match) == 2 {
- db := 0
- if len(match[1]) > 0 {
- db, err = strconv.Atoi(match[1])
- if err != nil {
- return nil, fmt.Errorf("invalid database: %s", u.Path[1:])
- }
- }
- if db != 0 {
- options = append(options, DialDatabase(db))
- }
- } else if u.Path != "" {
- return nil, fmt.Errorf("invalid database: %s", u.Path[1:])
- }
-
- options = append(options, DialUseTLS(u.Scheme == "rediss"))
-
- return Dial("tcp", address, options...)
-}
-
-// NewConn returns a new Redigo connection for the given net connection.
-func NewConn(netConn net.Conn, readTimeout, writeTimeout time.Duration) Conn {
- return &conn{
- conn: netConn,
- bw: bufio.NewWriter(netConn),
- br: bufio.NewReader(netConn),
- readTimeout: readTimeout,
- writeTimeout: writeTimeout,
- }
-}
-
-func (c *conn) Close() error {
- c.mu.Lock()
- err := c.err
- if c.err == nil {
- c.err = errors.New("redigo: closed")
- err = c.conn.Close()
- }
- c.mu.Unlock()
- return err
-}
-
-func (c *conn) fatal(err error) error {
- c.mu.Lock()
- if c.err == nil {
- c.err = err
- // Close connection to force errors on subsequent calls and to unblock
- // other reader or writer.
- c.conn.Close()
- }
- c.mu.Unlock()
- return err
-}
-
-func (c *conn) Err() error {
- c.mu.Lock()
- err := c.err
- c.mu.Unlock()
- return err
-}
-
-func (c *conn) writeLen(prefix byte, n int) error {
- c.lenScratch[len(c.lenScratch)-1] = '\n'
- c.lenScratch[len(c.lenScratch)-2] = '\r'
- i := len(c.lenScratch) - 3
- for {
- c.lenScratch[i] = byte('0' + n%10)
- i -= 1
- n = n / 10
- if n == 0 {
- break
- }
- }
- c.lenScratch[i] = prefix
- _, err := c.bw.Write(c.lenScratch[i:])
- return err
-}
-
-func (c *conn) writeString(s string) error {
- c.writeLen('$', len(s))
- c.bw.WriteString(s)
- _, err := c.bw.WriteString("\r\n")
- return err
-}
-
-func (c *conn) writeBytes(p []byte) error {
- c.writeLen('$', len(p))
- c.bw.Write(p)
- _, err := c.bw.WriteString("\r\n")
- return err
-}
-
-func (c *conn) writeInt64(n int64) error {
- return c.writeBytes(strconv.AppendInt(c.numScratch[:0], n, 10))
-}
-
-func (c *conn) writeFloat64(n float64) error {
- return c.writeBytes(strconv.AppendFloat(c.numScratch[:0], n, 'g', -1, 64))
-}
-
-func (c *conn) writeCommand(cmd string, args []interface{}) error {
- c.writeLen('*', 1+len(args))
- if err := c.writeString(cmd); err != nil {
- return err
- }
- for _, arg := range args {
- if err := c.writeArg(arg, true); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (c *conn) writeArg(arg interface{}, argumentTypeOK bool) (err error) {
- switch arg := arg.(type) {
- case string:
- return c.writeString(arg)
- case []byte:
- return c.writeBytes(arg)
- case int:
- return c.writeInt64(int64(arg))
- case int64:
- return c.writeInt64(arg)
- case float64:
- return c.writeFloat64(arg)
- case bool:
- if arg {
- return c.writeString("1")
- } else {
- return c.writeString("0")
- }
- case nil:
- return c.writeString("")
- case Argument:
- if argumentTypeOK {
- return c.writeArg(arg.RedisArg(), false)
- }
- // See comment in default clause below.
- var buf bytes.Buffer
- fmt.Fprint(&buf, arg)
- return c.writeBytes(buf.Bytes())
- default:
- // This default clause is intended to handle builtin numeric types.
- // The function should return an error for other types, but this is not
- // done for compatibility with previous versions of the package.
- var buf bytes.Buffer
- fmt.Fprint(&buf, arg)
- return c.writeBytes(buf.Bytes())
- }
-}
-
-type protocolError string
-
-func (pe protocolError) Error() string {
- return fmt.Sprintf("redigo: %s (possible server error or unsupported concurrent read by application)", string(pe))
-}
-
-func (c *conn) readLine() ([]byte, error) {
- p, err := c.br.ReadSlice('\n')
- if err == bufio.ErrBufferFull {
- return nil, protocolError("long response line")
- }
- if err != nil {
- return nil, err
- }
- i := len(p) - 2
- if i < 0 || p[i] != '\r' {
- return nil, protocolError("bad response line terminator")
- }
- return p[:i], nil
-}
-
-// parseLen parses bulk string and array lengths.
-func parseLen(p []byte) (int, error) {
- if len(p) == 0 {
- return -1, protocolError("malformed length")
- }
-
- if p[0] == '-' && len(p) == 2 && p[1] == '1' {
- // handle $-1 and $-1 null replies.
- return -1, nil
- }
-
- var n int
- for _, b := range p {
- n *= 10
- if b < '0' || b > '9' {
- return -1, protocolError("illegal bytes in length")
- }
- n += int(b - '0')
- }
-
- return n, nil
-}
-
-// parseInt parses an integer reply.
-func parseInt(p []byte) (interface{}, error) {
- if len(p) == 0 {
- return 0, protocolError("malformed integer")
- }
-
- var negate bool
- if p[0] == '-' {
- negate = true
- p = p[1:]
- if len(p) == 0 {
- return 0, protocolError("malformed integer")
- }
- }
-
- var n int64
- for _, b := range p {
- n *= 10
- if b < '0' || b > '9' {
- return 0, protocolError("illegal bytes in length")
- }
- n += int64(b - '0')
- }
-
- if negate {
- n = -n
- }
- return n, nil
-}
-
-var (
- okReply interface{} = "OK"
- pongReply interface{} = "PONG"
-)
-
-func (c *conn) readReply() (interface{}, error) {
- line, err := c.readLine()
- if err != nil {
- return nil, err
- }
- if len(line) == 0 {
- return nil, protocolError("short response line")
- }
- switch line[0] {
- case '+':
- switch {
- case len(line) == 3 && line[1] == 'O' && line[2] == 'K':
- // Avoid allocation for frequent "+OK" response.
- return okReply, nil
- case len(line) == 5 && line[1] == 'P' && line[2] == 'O' && line[3] == 'N' && line[4] == 'G':
- // Avoid allocation in PING command benchmarks :)
- return pongReply, nil
- default:
- return string(line[1:]), nil
- }
- case '-':
- return Error(string(line[1:])), nil
- case ':':
- return parseInt(line[1:])
- case '$':
- n, err := parseLen(line[1:])
- if n < 0 || err != nil {
- return nil, err
- }
- p := make([]byte, n)
- _, err = io.ReadFull(c.br, p)
- if err != nil {
- return nil, err
- }
- if line, err := c.readLine(); err != nil {
- return nil, err
- } else if len(line) != 0 {
- return nil, protocolError("bad bulk string format")
- }
- return p, nil
- case '*':
- n, err := parseLen(line[1:])
- if n < 0 || err != nil {
- return nil, err
- }
- r := make([]interface{}, n)
- for i := range r {
- r[i], err = c.readReply()
- if err != nil {
- return nil, err
- }
- }
- return r, nil
- }
- return nil, protocolError("unexpected response line")
-}
-
-func (c *conn) Send(cmd string, args ...interface{}) error {
- c.mu.Lock()
- c.pending += 1
- c.mu.Unlock()
- if c.writeTimeout != 0 {
- c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout))
- }
- if err := c.writeCommand(cmd, args); err != nil {
- return c.fatal(err)
- }
- return nil
-}
-
-func (c *conn) Flush() error {
- if c.writeTimeout != 0 {
- c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout))
- }
- if err := c.bw.Flush(); err != nil {
- return c.fatal(err)
- }
- return nil
-}
-
-func (c *conn) Receive() (interface{}, error) {
- return c.ReceiveWithTimeout(c.readTimeout)
-}
-
-func (c *conn) ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error) {
- var deadline time.Time
- if timeout != 0 {
- deadline = time.Now().Add(timeout)
- }
- c.conn.SetReadDeadline(deadline)
-
- if reply, err = c.readReply(); err != nil {
- return nil, c.fatal(err)
- }
- // When using pub/sub, the number of receives can be greater than the
- // number of sends. To enable normal use of the connection after
- // unsubscribing from all channels, we do not decrement pending to a
- // negative value.
- //
- // The pending field is decremented after the reply is read to handle the
- // case where Receive is called before Send.
- c.mu.Lock()
- if c.pending > 0 {
- c.pending -= 1
- }
- c.mu.Unlock()
- if err, ok := reply.(Error); ok {
- return nil, err
- }
- return
-}
-
-func (c *conn) Do(cmd string, args ...interface{}) (interface{}, error) {
- return c.DoWithTimeout(c.readTimeout, cmd, args...)
-}
-
-func (c *conn) DoWithTimeout(readTimeout time.Duration, cmd string, args ...interface{}) (interface{}, error) {
- c.mu.Lock()
- pending := c.pending
- c.pending = 0
- c.mu.Unlock()
-
- if cmd == "" && pending == 0 {
- return nil, nil
- }
-
- if c.writeTimeout != 0 {
- c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout))
- }
-
- if cmd != "" {
- if err := c.writeCommand(cmd, args); err != nil {
- return nil, c.fatal(err)
- }
- }
-
- if err := c.bw.Flush(); err != nil {
- return nil, c.fatal(err)
- }
-
- var deadline time.Time
- if readTimeout != 0 {
- deadline = time.Now().Add(readTimeout)
- }
- c.conn.SetReadDeadline(deadline)
-
- if cmd == "" {
- reply := make([]interface{}, pending)
- for i := range reply {
- r, e := c.readReply()
- if e != nil {
- return nil, c.fatal(e)
- }
- reply[i] = r
- }
- return reply, nil
- }
-
- var err error
- var reply interface{}
- for i := 0; i <= pending; i++ {
- var e error
- if reply, e = c.readReply(); e != nil {
- return nil, c.fatal(e)
- }
- if e, ok := reply.(Error); ok && err == nil {
- err = e
- }
- }
- return reply, err
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/doc.go b/vendor/github.com/garyburd/redigo/redis/doc.go
deleted file mode 100644
index 1d19c1668..000000000
--- a/vendor/github.com/garyburd/redigo/redis/doc.go
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-// Package redis is a client for the Redis database.
-//
-// The Redigo FAQ (https://github.com/garyburd/redigo/wiki/FAQ) contains more
-// documentation about this package.
-//
-// Connections
-//
-// The Conn interface is the primary interface for working with Redis.
-// Applications create connections by calling the Dial, DialWithTimeout or
-// NewConn functions. In the future, functions will be added for creating
-// sharded and other types of connections.
-//
-// The application must call the connection Close method when the application
-// is done with the connection.
-//
-// Executing Commands
-//
-// The Conn interface has a generic method for executing Redis commands:
-//
-// Do(commandName string, args ...interface{}) (reply interface{}, err error)
-//
-// The Redis command reference (http://redis.io/commands) lists the available
-// commands. An example of using the Redis APPEND command is:
-//
-// n, err := conn.Do("APPEND", "key", "value")
-//
-// The Do method converts command arguments to bulk strings for transmission
-// to the server as follows:
-//
-// Go Type Conversion
-// []byte Sent as is
-// string Sent as is
-// int, int64 strconv.FormatInt(v)
-// float64 strconv.FormatFloat(v, 'g', -1, 64)
-// bool true -> "1", false -> "0"
-// nil ""
-// all other types fmt.Fprint(w, v)
-//
-// Redis command reply types are represented using the following Go types:
-//
-// Redis type Go type
-// error redis.Error
-// integer int64
-// simple string string
-// bulk string []byte or nil if value not present.
-// array []interface{} or nil if value not present.
-//
-// Use type assertions or the reply helper functions to convert from
-// interface{} to the specific Go type for the command result.
-//
-// Pipelining
-//
-// Connections support pipelining using the Send, Flush and Receive methods.
-//
-// Send(commandName string, args ...interface{}) error
-// Flush() error
-// Receive() (reply interface{}, err error)
-//
-// Send writes the command to the connection's output buffer. Flush flushes the
-// connection's output buffer to the server. Receive reads a single reply from
-// the server. The following example shows a simple pipeline.
-//
-// c.Send("SET", "foo", "bar")
-// c.Send("GET", "foo")
-// c.Flush()
-// c.Receive() // reply from SET
-// v, err = c.Receive() // reply from GET
-//
-// The Do method combines the functionality of the Send, Flush and Receive
-// methods. The Do method starts by writing the command and flushing the output
-// buffer. Next, the Do method receives all pending replies including the reply
-// for the command just sent by Do. If any of the received replies is an error,
-// then Do returns the error. If there are no errors, then Do returns the last
-// reply. If the command argument to the Do method is "", then the Do method
-// will flush the output buffer and receive pending replies without sending a
-// command.
-//
-// Use the Send and Do methods to implement pipelined transactions.
-//
-// c.Send("MULTI")
-// c.Send("INCR", "foo")
-// c.Send("INCR", "bar")
-// r, err := c.Do("EXEC")
-// fmt.Println(r) // prints [1, 1]
-//
-// Concurrency
-//
-// Connections support one concurrent caller to the Receive method and one
-// concurrent caller to the Send and Flush methods. No other concurrency is
-// supported including concurrent calls to the Do method.
-//
-// For full concurrent access to Redis, use the thread-safe Pool to get, use
-// and release a connection from within a goroutine. Connections returned from
-// a Pool have the concurrency restrictions described in the previous
-// paragraph.
-//
-// Publish and Subscribe
-//
-// Use the Send, Flush and Receive methods to implement Pub/Sub subscribers.
-//
-// c.Send("SUBSCRIBE", "example")
-// c.Flush()
-// for {
-// reply, err := c.Receive()
-// if err != nil {
-// return err
-// }
-// // process pushed message
-// }
-//
-// The PubSubConn type wraps a Conn with convenience methods for implementing
-// subscribers. The Subscribe, PSubscribe, Unsubscribe and PUnsubscribe methods
-// send and flush a subscription management command. The receive method
-// converts a pushed message to convenient types for use in a type switch.
-//
-// psc := redis.PubSubConn{Conn: c}
-// psc.Subscribe("example")
-// for {
-// switch v := psc.Receive().(type) {
-// case redis.Message:
-// fmt.Printf("%s: message: %s\n", v.Channel, v.Data)
-// case redis.Subscription:
-// fmt.Printf("%s: %s %d\n", v.Channel, v.Kind, v.Count)
-// case error:
-// return v
-// }
-// }
-//
-// Reply Helpers
-//
-// The Bool, Int, Bytes, String, Strings and Values functions convert a reply
-// to a value of a specific type. To allow convenient wrapping of calls to the
-// connection Do and Receive methods, the functions take a second argument of
-// type error. If the error is non-nil, then the helper function returns the
-// error. If the error is nil, the function converts the reply to the specified
-// type:
-//
-// exists, err := redis.Bool(c.Do("EXISTS", "foo"))
-// if err != nil {
-// // handle error return from c.Do or type conversion error.
-// }
-//
-// The Scan function converts elements of a array reply to Go types:
-//
-// var value1 int
-// var value2 string
-// reply, err := redis.Values(c.Do("MGET", "key1", "key2"))
-// if err != nil {
-// // handle error
-// }
-// if _, err := redis.Scan(reply, &value1, &value2); err != nil {
-// // handle error
-// }
-//
-// Errors
-//
-// Connection methods return error replies from the server as type redis.Error.
-//
-// Call the connection Err() method to determine if the connection encountered
-// non-recoverable error such as a network error or protocol parsing error. If
-// Err() returns a non-nil value, then the connection is not usable and should
-// be closed.
-package redis // import "github.com/garyburd/redigo/redis"
diff --git a/vendor/github.com/garyburd/redigo/redis/go16.go b/vendor/github.com/garyburd/redigo/redis/go16.go
deleted file mode 100644
index f6b1a7ccd..000000000
--- a/vendor/github.com/garyburd/redigo/redis/go16.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// +build !go1.7
-
-package redis
-
-import "crypto/tls"
-
-func cloneTLSConfig(cfg *tls.Config) *tls.Config {
- return &tls.Config{
- Rand: cfg.Rand,
- Time: cfg.Time,
- Certificates: cfg.Certificates,
- NameToCertificate: cfg.NameToCertificate,
- GetCertificate: cfg.GetCertificate,
- RootCAs: cfg.RootCAs,
- NextProtos: cfg.NextProtos,
- ServerName: cfg.ServerName,
- ClientAuth: cfg.ClientAuth,
- ClientCAs: cfg.ClientCAs,
- InsecureSkipVerify: cfg.InsecureSkipVerify,
- CipherSuites: cfg.CipherSuites,
- PreferServerCipherSuites: cfg.PreferServerCipherSuites,
- ClientSessionCache: cfg.ClientSessionCache,
- MinVersion: cfg.MinVersion,
- MaxVersion: cfg.MaxVersion,
- CurvePreferences: cfg.CurvePreferences,
- }
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/go17.go b/vendor/github.com/garyburd/redigo/redis/go17.go
deleted file mode 100644
index 5f3637911..000000000
--- a/vendor/github.com/garyburd/redigo/redis/go17.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// +build go1.7,!go1.8
-
-package redis
-
-import "crypto/tls"
-
-func cloneTLSConfig(cfg *tls.Config) *tls.Config {
- return &tls.Config{
- Rand: cfg.Rand,
- Time: cfg.Time,
- Certificates: cfg.Certificates,
- NameToCertificate: cfg.NameToCertificate,
- GetCertificate: cfg.GetCertificate,
- RootCAs: cfg.RootCAs,
- NextProtos: cfg.NextProtos,
- ServerName: cfg.ServerName,
- ClientAuth: cfg.ClientAuth,
- ClientCAs: cfg.ClientCAs,
- InsecureSkipVerify: cfg.InsecureSkipVerify,
- CipherSuites: cfg.CipherSuites,
- PreferServerCipherSuites: cfg.PreferServerCipherSuites,
- ClientSessionCache: cfg.ClientSessionCache,
- MinVersion: cfg.MinVersion,
- MaxVersion: cfg.MaxVersion,
- CurvePreferences: cfg.CurvePreferences,
- DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled,
- Renegotiation: cfg.Renegotiation,
- }
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/go18.go b/vendor/github.com/garyburd/redigo/redis/go18.go
deleted file mode 100644
index 558363be3..000000000
--- a/vendor/github.com/garyburd/redigo/redis/go18.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build go1.8
-
-package redis
-
-import "crypto/tls"
-
-func cloneTLSConfig(cfg *tls.Config) *tls.Config {
- return cfg.Clone()
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/log.go b/vendor/github.com/garyburd/redigo/redis/log.go
deleted file mode 100644
index b2996611c..000000000
--- a/vendor/github.com/garyburd/redigo/redis/log.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package redis
-
-import (
- "bytes"
- "fmt"
- "log"
- "time"
-)
-
-var (
- _ ConnWithTimeout = (*loggingConn)(nil)
-)
-
-// NewLoggingConn returns a logging wrapper around a connection.
-func NewLoggingConn(conn Conn, logger *log.Logger, prefix string) Conn {
- if prefix != "" {
- prefix = prefix + "."
- }
- return &loggingConn{conn, logger, prefix}
-}
-
-type loggingConn struct {
- Conn
- logger *log.Logger
- prefix string
-}
-
-func (c *loggingConn) Close() error {
- err := c.Conn.Close()
- var buf bytes.Buffer
- fmt.Fprintf(&buf, "%sClose() -> (%v)", c.prefix, err)
- c.logger.Output(2, buf.String())
- return err
-}
-
-func (c *loggingConn) printValue(buf *bytes.Buffer, v interface{}) {
- const chop = 32
- switch v := v.(type) {
- case []byte:
- if len(v) > chop {
- fmt.Fprintf(buf, "%q...", v[:chop])
- } else {
- fmt.Fprintf(buf, "%q", v)
- }
- case string:
- if len(v) > chop {
- fmt.Fprintf(buf, "%q...", v[:chop])
- } else {
- fmt.Fprintf(buf, "%q", v)
- }
- case []interface{}:
- if len(v) == 0 {
- buf.WriteString("[]")
- } else {
- sep := "["
- fin := "]"
- if len(v) > chop {
- v = v[:chop]
- fin = "...]"
- }
- for _, vv := range v {
- buf.WriteString(sep)
- c.printValue(buf, vv)
- sep = ", "
- }
- buf.WriteString(fin)
- }
- default:
- fmt.Fprint(buf, v)
- }
-}
-
-func (c *loggingConn) print(method, commandName string, args []interface{}, reply interface{}, err error) {
- var buf bytes.Buffer
- fmt.Fprintf(&buf, "%s%s(", c.prefix, method)
- if method != "Receive" {
- buf.WriteString(commandName)
- for _, arg := range args {
- buf.WriteString(", ")
- c.printValue(&buf, arg)
- }
- }
- buf.WriteString(") -> (")
- if method != "Send" {
- c.printValue(&buf, reply)
- buf.WriteString(", ")
- }
- fmt.Fprintf(&buf, "%v)", err)
- c.logger.Output(3, buf.String())
-}
-
-func (c *loggingConn) Do(commandName string, args ...interface{}) (interface{}, error) {
- reply, err := c.Conn.Do(commandName, args...)
- c.print("Do", commandName, args, reply, err)
- return reply, err
-}
-
-func (c *loggingConn) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error) {
- reply, err := DoWithTimeout(c.Conn, timeout, commandName, args...)
- c.print("DoWithTimeout", commandName, args, reply, err)
- return reply, err
-}
-
-func (c *loggingConn) Send(commandName string, args ...interface{}) error {
- err := c.Conn.Send(commandName, args...)
- c.print("Send", commandName, args, nil, err)
- return err
-}
-
-func (c *loggingConn) Receive() (interface{}, error) {
- reply, err := c.Conn.Receive()
- c.print("Receive", "", nil, reply, err)
- return reply, err
-}
-
-func (c *loggingConn) ReceiveWithTimeout(timeout time.Duration) (interface{}, error) {
- reply, err := ReceiveWithTimeout(c.Conn, timeout)
- c.print("ReceiveWithTimeout", "", nil, reply, err)
- return reply, err
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/pool.go b/vendor/github.com/garyburd/redigo/redis/pool.go
deleted file mode 100644
index 3e6f4260a..000000000
--- a/vendor/github.com/garyburd/redigo/redis/pool.go
+++ /dev/null
@@ -1,527 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package redis
-
-import (
- "bytes"
- "crypto/rand"
- "crypto/sha1"
- "errors"
- "io"
- "strconv"
- "sync"
- "sync/atomic"
- "time"
-
- "github.com/garyburd/redigo/internal"
-)
-
-var (
- _ ConnWithTimeout = (*pooledConnection)(nil)
- _ ConnWithTimeout = (*errorConnection)(nil)
-)
-
-var nowFunc = time.Now // for testing
-
-// ErrPoolExhausted is returned from a pool connection method (Do, Send,
-// Receive, Flush, Err) when the maximum number of database connections in the
-// pool has been reached.
-var ErrPoolExhausted = errors.New("redigo: connection pool exhausted")
-
-var (
- errPoolClosed = errors.New("redigo: connection pool closed")
- errConnClosed = errors.New("redigo: connection closed")
-)
-
-// Pool maintains a pool of connections. The application calls the Get method
-// to get a connection from the pool and the connection's Close method to
-// return the connection's resources to the pool.
-//
-// The following example shows how to use a pool in a web application. The
-// application creates a pool at application startup and makes it available to
-// request handlers using a package level variable. The pool configuration used
-// here is an example, not a recommendation.
-//
-// func newPool(addr string) *redis.Pool {
-// return &redis.Pool{
-// MaxIdle: 3,
-// IdleTimeout: 240 * time.Second,
-// Dial: func () (redis.Conn, error) { return redis.Dial("tcp", addr) },
-// }
-// }
-//
-// var (
-// pool *redis.Pool
-// redisServer = flag.String("redisServer", ":6379", "")
-// )
-//
-// func main() {
-// flag.Parse()
-// pool = newPool(*redisServer)
-// ...
-// }
-//
-// A request handler gets a connection from the pool and closes the connection
-// when the handler is done:
-//
-// func serveHome(w http.ResponseWriter, r *http.Request) {
-// conn := pool.Get()
-// defer conn.Close()
-// ...
-// }
-//
-// Use the Dial function to authenticate connections with the AUTH command or
-// select a database with the SELECT command:
-//
-// pool := &redis.Pool{
-// // Other pool configuration not shown in this example.
-// Dial: func () (redis.Conn, error) {
-// c, err := redis.Dial("tcp", server)
-// if err != nil {
-// return nil, err
-// }
-// if _, err := c.Do("AUTH", password); err != nil {
-// c.Close()
-// return nil, err
-// }
-// if _, err := c.Do("SELECT", db); err != nil {
-// c.Close()
-// return nil, err
-// }
-// return c, nil
-// },
-// }
-//
-// Use the TestOnBorrow function to check the health of an idle connection
-// before the connection is returned to the application. This example PINGs
-// connections that have been idle more than a minute:
-//
-// pool := &redis.Pool{
-// // Other pool configuration not shown in this example.
-// TestOnBorrow: func(c redis.Conn, t time.Time) error {
-// if time.Since(t) < time.Minute {
-// return nil
-// }
-// _, err := c.Do("PING")
-// return err
-// },
-// }
-//
-type Pool struct {
- // Dial is an application supplied function for creating and configuring a
- // connection.
- //
- // The connection returned from Dial must not be in a special state
- // (subscribed to pubsub channel, transaction started, ...).
- Dial func() (Conn, error)
-
- // TestOnBorrow is an optional application supplied function for checking
- // the health of an idle connection before the connection is used again by
- // the application. Argument t is the time that the connection was returned
- // to the pool. If the function returns an error, then the connection is
- // closed.
- TestOnBorrow func(c Conn, t time.Time) error
-
- // Maximum number of idle connections in the pool.
- MaxIdle int
-
- // Maximum number of connections allocated by the pool at a given time.
- // When zero, there is no limit on the number of connections in the pool.
- MaxActive int
-
- // Close connections after remaining idle for this duration. If the value
- // is zero, then idle connections are not closed. Applications should set
- // the timeout to a value less than the server's timeout.
- IdleTimeout time.Duration
-
- // If Wait is true and the pool is at the MaxActive limit, then Get() waits
- // for a connection to be returned to the pool before returning.
- Wait bool
-
- chInitialized uint32 // set to 1 when field ch is initialized
-
- mu sync.Mutex // mu protects the following fields
- closed bool // set to true when the pool is closed.
- active int // the number of open connections in the pool
- ch chan struct{} // limits open connections when p.Wait is true
- idle idleList // idle connections
-}
-
-// NewPool creates a new pool.
-//
-// Deprecated: Initialize the Pool directory as shown in the example.
-func NewPool(newFn func() (Conn, error), maxIdle int) *Pool {
- return &Pool{Dial: newFn, MaxIdle: maxIdle}
-}
-
-// Get gets a connection. The application must close the returned connection.
-// This method always returns a valid connection so that applications can defer
-// error handling to the first use of the connection. If there is an error
-// getting an underlying connection, then the connection Err, Do, Send, Flush
-// and Receive methods return that error.
-func (p *Pool) Get() Conn {
- c, err := p.get(nil)
- if err != nil {
- return errorConnection{err}
- }
- return &pooledConnection{p: p, c: c}
-}
-
-// PoolStats contains pool statistics.
-type PoolStats struct {
- // ActiveCount is the number of connections in the pool. The count includes
- // idle connections and connections in use.
- ActiveCount int
- // IdleCount is the number of idle connections in the pool.
- IdleCount int
-}
-
-// Stats returns pool's statistics.
-func (p *Pool) Stats() PoolStats {
- p.mu.Lock()
- stats := PoolStats{
- ActiveCount: p.active,
- IdleCount: p.idle.count,
- }
- p.mu.Unlock()
-
- return stats
-}
-
-// ActiveCount returns the number of connections in the pool. The count
-// includes idle connections and connections in use.
-func (p *Pool) ActiveCount() int {
- p.mu.Lock()
- active := p.active
- p.mu.Unlock()
- return active
-}
-
-// IdleCount returns the number of idle connections in the pool.
-func (p *Pool) IdleCount() int {
- p.mu.Lock()
- idle := p.idle.count
- p.mu.Unlock()
- return idle
-}
-
-// Close releases the resources used by the pool.
-func (p *Pool) Close() error {
- p.mu.Lock()
- if p.closed {
- p.mu.Unlock()
- return nil
- }
- p.closed = true
- p.active -= p.idle.count
- ic := p.idle.front
- p.idle.count = 0
- p.idle.front, p.idle.back = nil, nil
- if p.ch != nil {
- close(p.ch)
- }
- p.mu.Unlock()
- for ; ic != nil; ic = ic.next {
- ic.c.Close()
- }
- return nil
-}
-
-func (p *Pool) lazyInit() {
- // Fast path.
- if atomic.LoadUint32(&p.chInitialized) == 1 {
- return
- }
- // Slow path.
- p.mu.Lock()
- if p.chInitialized == 0 {
- p.ch = make(chan struct{}, p.MaxActive)
- if p.closed {
- close(p.ch)
- } else {
- for i := 0; i < p.MaxActive; i++ {
- p.ch <- struct{}{}
- }
- }
- atomic.StoreUint32(&p.chInitialized, 1)
- }
- p.mu.Unlock()
-}
-
-// get prunes stale connections and returns a connection from the idle list or
-// creates a new connection.
-func (p *Pool) get(ctx interface {
- Done() <-chan struct{}
- Err() error
-}) (Conn, error) {
-
- // Handle limit for p.Wait == true.
- if p.Wait && p.MaxActive > 0 {
- p.lazyInit()
- if ctx == nil {
- <-p.ch
- } else {
- select {
- case <-p.ch:
- case <-ctx.Done():
- return nil, ctx.Err()
- }
- }
- }
-
- p.mu.Lock()
-
- // Prune stale connections at the back of the idle list.
- if p.IdleTimeout > 0 {
- n := p.idle.count
- for i := 0; i < n && p.idle.back != nil && p.idle.back.t.Add(p.IdleTimeout).Before(nowFunc()); i++ {
- c := p.idle.back.c
- p.idle.popBack()
- p.mu.Unlock()
- c.Close()
- p.mu.Lock()
- p.active--
- }
- }
-
- // Get idle connection from the front of idle list.
- for p.idle.front != nil {
- ic := p.idle.front
- p.idle.popFront()
- p.mu.Unlock()
- if p.TestOnBorrow == nil || p.TestOnBorrow(ic.c, ic.t) == nil {
- return ic.c, nil
- }
- ic.c.Close()
- p.mu.Lock()
- p.active--
- }
-
- // Check for pool closed before dialing a new connection.
- if p.closed {
- p.mu.Unlock()
- return nil, errors.New("redigo: get on closed pool")
- }
-
- // Handle limit for p.Wait == false.
- if !p.Wait && p.MaxActive > 0 && p.active >= p.MaxActive {
- p.mu.Unlock()
- return nil, ErrPoolExhausted
- }
-
- p.active++
- p.mu.Unlock()
- c, err := p.Dial()
- if err != nil {
- c = nil
- p.mu.Lock()
- p.active--
- if p.ch != nil && !p.closed {
- p.ch <- struct{}{}
- }
- p.mu.Unlock()
- }
- return c, err
-}
-
-func (p *Pool) put(c Conn, forceClose bool) error {
- p.mu.Lock()
- if !p.closed && !forceClose {
- p.idle.pushFront(&idleConn{t: nowFunc(), c: c})
- if p.idle.count > p.MaxIdle {
- c = p.idle.back.c
- p.idle.popBack()
- } else {
- c = nil
- }
- }
-
- if c != nil {
- p.mu.Unlock()
- c.Close()
- p.mu.Lock()
- p.active--
- }
-
- if p.ch != nil && !p.closed {
- p.ch <- struct{}{}
- }
- p.mu.Unlock()
- return nil
-}
-
-type pooledConnection struct {
- p *Pool
- c Conn
- state int
-}
-
-var (
- sentinel []byte
- sentinelOnce sync.Once
-)
-
-func initSentinel() {
- p := make([]byte, 64)
- if _, err := rand.Read(p); err == nil {
- sentinel = p
- } else {
- h := sha1.New()
- io.WriteString(h, "Oops, rand failed. Use time instead.")
- io.WriteString(h, strconv.FormatInt(time.Now().UnixNano(), 10))
- sentinel = h.Sum(nil)
- }
-}
-
-func (pc *pooledConnection) Close() error {
- c := pc.c
- if _, ok := c.(errorConnection); ok {
- return nil
- }
- pc.c = errorConnection{errConnClosed}
-
- if pc.state&internal.MultiState != 0 {
- c.Send("DISCARD")
- pc.state &^= (internal.MultiState | internal.WatchState)
- } else if pc.state&internal.WatchState != 0 {
- c.Send("UNWATCH")
- pc.state &^= internal.WatchState
- }
- if pc.state&internal.SubscribeState != 0 {
- c.Send("UNSUBSCRIBE")
- c.Send("PUNSUBSCRIBE")
- // To detect the end of the message stream, ask the server to echo
- // a sentinel value and read until we see that value.
- sentinelOnce.Do(initSentinel)
- c.Send("ECHO", sentinel)
- c.Flush()
- for {
- p, err := c.Receive()
- if err != nil {
- break
- }
- if p, ok := p.([]byte); ok && bytes.Equal(p, sentinel) {
- pc.state &^= internal.SubscribeState
- break
- }
- }
- }
- c.Do("")
- pc.p.put(c, pc.state != 0 || c.Err() != nil)
- return nil
-}
-
-func (pc *pooledConnection) Err() error {
- return pc.c.Err()
-}
-
-func (pc *pooledConnection) Do(commandName string, args ...interface{}) (reply interface{}, err error) {
- ci := internal.LookupCommandInfo(commandName)
- pc.state = (pc.state | ci.Set) &^ ci.Clear
- return pc.c.Do(commandName, args...)
-}
-
-func (pc *pooledConnection) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (reply interface{}, err error) {
- cwt, ok := pc.c.(ConnWithTimeout)
- if !ok {
- return nil, errTimeoutNotSupported
- }
- ci := internal.LookupCommandInfo(commandName)
- pc.state = (pc.state | ci.Set) &^ ci.Clear
- return cwt.DoWithTimeout(timeout, commandName, args...)
-}
-
-func (pc *pooledConnection) Send(commandName string, args ...interface{}) error {
- ci := internal.LookupCommandInfo(commandName)
- pc.state = (pc.state | ci.Set) &^ ci.Clear
- return pc.c.Send(commandName, args...)
-}
-
-func (pc *pooledConnection) Flush() error {
- return pc.c.Flush()
-}
-
-func (pc *pooledConnection) Receive() (reply interface{}, err error) {
- return pc.c.Receive()
-}
-
-func (pc *pooledConnection) ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error) {
- cwt, ok := pc.c.(ConnWithTimeout)
- if !ok {
- return nil, errTimeoutNotSupported
- }
- return cwt.ReceiveWithTimeout(timeout)
-}
-
-type errorConnection struct{ err error }
-
-func (ec errorConnection) Do(string, ...interface{}) (interface{}, error) { return nil, ec.err }
-func (ec errorConnection) DoWithTimeout(time.Duration, string, ...interface{}) (interface{}, error) {
- return nil, ec.err
-}
-func (ec errorConnection) Send(string, ...interface{}) error { return ec.err }
-func (ec errorConnection) Err() error { return ec.err }
-func (ec errorConnection) Close() error { return nil }
-func (ec errorConnection) Flush() error { return ec.err }
-func (ec errorConnection) Receive() (interface{}, error) { return nil, ec.err }
-func (ec errorConnection) ReceiveWithTimeout(time.Duration) (interface{}, error) { return nil, ec.err }
-
-type idleList struct {
- count int
- front, back *idleConn
-}
-
-type idleConn struct {
- c Conn
- t time.Time
- next, prev *idleConn
-}
-
-func (l *idleList) pushFront(ic *idleConn) {
- ic.next = l.front
- ic.prev = nil
- if l.count == 0 {
- l.back = ic
- } else {
- l.front.prev = ic
- }
- l.front = ic
- l.count++
- return
-}
-
-func (l *idleList) popFront() {
- ic := l.front
- l.count--
- if l.count == 0 {
- l.front, l.back = nil, nil
- } else {
- ic.next.prev = nil
- l.front = ic.next
- }
- ic.next, ic.prev = nil, nil
-}
-
-func (l *idleList) popBack() {
- ic := l.back
- l.count--
- if l.count == 0 {
- l.front, l.back = nil, nil
- } else {
- ic.prev.next = nil
- l.back = ic.prev
- }
- ic.next, ic.prev = nil, nil
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/pool17.go b/vendor/github.com/garyburd/redigo/redis/pool17.go
deleted file mode 100644
index 57a22644f..000000000
--- a/vendor/github.com/garyburd/redigo/redis/pool17.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2018 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-// +build go1.7
-
-package redis
-
-import "context"
-
-// GetContext gets a connection using the provided context.
-//
-// The provided Context must be non-nil. If the context expires before the
-// connection is complete, an error is returned. Any expiration on the context
-// will not affect the returned connection.
-//
-// If the function completes without error, then the application must close the
-// returned connection.
-func (p *Pool) GetContext(ctx context.Context) (Conn, error) {
- c, err := p.get(ctx)
- if err != nil {
- return errorConnection{err}, err
- }
- return &pooledConnection{p: p, c: c}, nil
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/pubsub.go b/vendor/github.com/garyburd/redigo/redis/pubsub.go
deleted file mode 100644
index f0ac82532..000000000
--- a/vendor/github.com/garyburd/redigo/redis/pubsub.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package redis
-
-import (
- "errors"
- "time"
-)
-
-// Subscription represents a subscribe or unsubscribe notification.
-type Subscription struct {
- // Kind is "subscribe", "unsubscribe", "psubscribe" or "punsubscribe"
- Kind string
-
- // The channel that was changed.
- Channel string
-
- // The current number of subscriptions for connection.
- Count int
-}
-
-// Message represents a message notification.
-type Message struct {
- // The originating channel.
- Channel string
-
- // The message data.
- Data []byte
-}
-
-// PMessage represents a pmessage notification.
-type PMessage struct {
- // The matched pattern.
- Pattern string
-
- // The originating channel.
- Channel string
-
- // The message data.
- Data []byte
-}
-
-// Pong represents a pubsub pong notification.
-type Pong struct {
- Data string
-}
-
-// PubSubConn wraps a Conn with convenience methods for subscribers.
-type PubSubConn struct {
- Conn Conn
-}
-
-// Close closes the connection.
-func (c PubSubConn) Close() error {
- return c.Conn.Close()
-}
-
-// Subscribe subscribes the connection to the specified channels.
-func (c PubSubConn) Subscribe(channel ...interface{}) error {
- c.Conn.Send("SUBSCRIBE", channel...)
- return c.Conn.Flush()
-}
-
-// PSubscribe subscribes the connection to the given patterns.
-func (c PubSubConn) PSubscribe(channel ...interface{}) error {
- c.Conn.Send("PSUBSCRIBE", channel...)
- return c.Conn.Flush()
-}
-
-// Unsubscribe unsubscribes the connection from the given channels, or from all
-// of them if none is given.
-func (c PubSubConn) Unsubscribe(channel ...interface{}) error {
- c.Conn.Send("UNSUBSCRIBE", channel...)
- return c.Conn.Flush()
-}
-
-// PUnsubscribe unsubscribes the connection from the given patterns, or from all
-// of them if none is given.
-func (c PubSubConn) PUnsubscribe(channel ...interface{}) error {
- c.Conn.Send("PUNSUBSCRIBE", channel...)
- return c.Conn.Flush()
-}
-
-// Ping sends a PING to the server with the specified data.
-//
-// The connection must be subscribed to at least one channel or pattern when
-// calling this method.
-func (c PubSubConn) Ping(data string) error {
- c.Conn.Send("PING", data)
- return c.Conn.Flush()
-}
-
-// Receive returns a pushed message as a Subscription, Message, PMessage, Pong
-// or error. The return value is intended to be used directly in a type switch
-// as illustrated in the PubSubConn example.
-func (c PubSubConn) Receive() interface{} {
- return c.receiveInternal(c.Conn.Receive())
-}
-
-// ReceiveWithTimeout is like Receive, but it allows the application to
-// override the connection's default timeout.
-func (c PubSubConn) ReceiveWithTimeout(timeout time.Duration) interface{} {
- return c.receiveInternal(ReceiveWithTimeout(c.Conn, timeout))
-}
-
-func (c PubSubConn) receiveInternal(replyArg interface{}, errArg error) interface{} {
- reply, err := Values(replyArg, errArg)
- if err != nil {
- return err
- }
-
- var kind string
- reply, err = Scan(reply, &kind)
- if err != nil {
- return err
- }
-
- switch kind {
- case "message":
- var m Message
- if _, err := Scan(reply, &m.Channel, &m.Data); err != nil {
- return err
- }
- return m
- case "pmessage":
- var pm PMessage
- if _, err := Scan(reply, &pm.Pattern, &pm.Channel, &pm.Data); err != nil {
- return err
- }
- return pm
- case "subscribe", "psubscribe", "unsubscribe", "punsubscribe":
- s := Subscription{Kind: kind}
- if _, err := Scan(reply, &s.Channel, &s.Count); err != nil {
- return err
- }
- return s
- case "pong":
- var p Pong
- if _, err := Scan(reply, &p.Data); err != nil {
- return err
- }
- return p
- }
- return errors.New("redigo: unknown pubsub notification")
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/redis.go b/vendor/github.com/garyburd/redigo/redis/redis.go
deleted file mode 100644
index 141fa4a91..000000000
--- a/vendor/github.com/garyburd/redigo/redis/redis.go
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package redis
-
-import (
- "errors"
- "time"
-)
-
-// Error represents an error returned in a command reply.
-type Error string
-
-func (err Error) Error() string { return string(err) }
-
-// Conn represents a connection to a Redis server.
-type Conn interface {
- // Close closes the connection.
- Close() error
-
- // Err returns a non-nil value when the connection is not usable.
- Err() error
-
- // Do sends a command to the server and returns the received reply.
- Do(commandName string, args ...interface{}) (reply interface{}, err error)
-
- // Send writes the command to the client's output buffer.
- Send(commandName string, args ...interface{}) error
-
- // Flush flushes the output buffer to the Redis server.
- Flush() error
-
- // Receive receives a single reply from the Redis server
- Receive() (reply interface{}, err error)
-}
-
-// Argument is the interface implemented by an object which wants to control how
-// the object is converted to Redis bulk strings.
-type Argument interface {
- // RedisArg returns a value to be encoded as a bulk string per the
- // conversions listed in the section 'Executing Commands'.
- // Implementations should typically return a []byte or string.
- RedisArg() interface{}
-}
-
-// Scanner is implemented by an object which wants to control its value is
-// interpreted when read from Redis.
-type Scanner interface {
- // RedisScan assigns a value from a Redis value. The argument src is one of
- // the reply types listed in the section `Executing Commands`.
- //
- // An error should be returned if the value cannot be stored without
- // loss of information.
- RedisScan(src interface{}) error
-}
-
-// ConnWithTimeout is an optional interface that allows the caller to override
-// a connection's default read timeout. This interface is useful for executing
-// the BLPOP, BRPOP, BRPOPLPUSH, XREAD and other commands that block at the
-// server.
-//
-// A connection's default read timeout is set with the DialReadTimeout dial
-// option. Applications should rely on the default timeout for commands that do
-// not block at the server.
-//
-// All of the Conn implementations in this package satisfy the ConnWithTimeout
-// interface.
-//
-// Use the DoWithTimeout and ReceiveWithTimeout helper functions to simplify
-// use of this interface.
-type ConnWithTimeout interface {
- Conn
-
- // Do sends a command to the server and returns the received reply.
- // The timeout overrides the read timeout set when dialing the
- // connection.
- DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (reply interface{}, err error)
-
- // Receive receives a single reply from the Redis server. The timeout
- // overrides the read timeout set when dialing the connection.
- ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error)
-}
-
-var errTimeoutNotSupported = errors.New("redis: connection does not support ConnWithTimeout")
-
-// DoWithTimeout executes a Redis command with the specified read timeout. If
-// the connection does not satisfy the ConnWithTimeout interface, then an error
-// is returned.
-func DoWithTimeout(c Conn, timeout time.Duration, cmd string, args ...interface{}) (interface{}, error) {
- cwt, ok := c.(ConnWithTimeout)
- if !ok {
- return nil, errTimeoutNotSupported
- }
- return cwt.DoWithTimeout(timeout, cmd, args...)
-}
-
-// ReceiveWithTimeout receives a reply with the specified read timeout. If the
-// connection does not satisfy the ConnWithTimeout interface, then an error is
-// returned.
-func ReceiveWithTimeout(c Conn, timeout time.Duration) (interface{}, error) {
- cwt, ok := c.(ConnWithTimeout)
- if !ok {
- return nil, errTimeoutNotSupported
- }
- return cwt.ReceiveWithTimeout(timeout)
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/reply.go b/vendor/github.com/garyburd/redigo/redis/reply.go
deleted file mode 100644
index c2b3b2b6e..000000000
--- a/vendor/github.com/garyburd/redigo/redis/reply.go
+++ /dev/null
@@ -1,479 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package redis
-
-import (
- "errors"
- "fmt"
- "strconv"
-)
-
-// ErrNil indicates that a reply value is nil.
-var ErrNil = errors.New("redigo: nil returned")
-
-// Int is a helper that converts a command reply to an integer. If err is not
-// equal to nil, then Int returns 0, err. Otherwise, Int converts the
-// reply to an int as follows:
-//
-// Reply type Result
-// integer int(reply), nil
-// bulk string parsed reply, nil
-// nil 0, ErrNil
-// other 0, error
-func Int(reply interface{}, err error) (int, error) {
- if err != nil {
- return 0, err
- }
- switch reply := reply.(type) {
- case int64:
- x := int(reply)
- if int64(x) != reply {
- return 0, strconv.ErrRange
- }
- return x, nil
- case []byte:
- n, err := strconv.ParseInt(string(reply), 10, 0)
- return int(n), err
- case nil:
- return 0, ErrNil
- case Error:
- return 0, reply
- }
- return 0, fmt.Errorf("redigo: unexpected type for Int, got type %T", reply)
-}
-
-// Int64 is a helper that converts a command reply to 64 bit integer. If err is
-// not equal to nil, then Int returns 0, err. Otherwise, Int64 converts the
-// reply to an int64 as follows:
-//
-// Reply type Result
-// integer reply, nil
-// bulk string parsed reply, nil
-// nil 0, ErrNil
-// other 0, error
-func Int64(reply interface{}, err error) (int64, error) {
- if err != nil {
- return 0, err
- }
- switch reply := reply.(type) {
- case int64:
- return reply, nil
- case []byte:
- n, err := strconv.ParseInt(string(reply), 10, 64)
- return n, err
- case nil:
- return 0, ErrNil
- case Error:
- return 0, reply
- }
- return 0, fmt.Errorf("redigo: unexpected type for Int64, got type %T", reply)
-}
-
-var errNegativeInt = errors.New("redigo: unexpected value for Uint64")
-
-// Uint64 is a helper that converts a command reply to 64 bit integer. If err is
-// not equal to nil, then Int returns 0, err. Otherwise, Int64 converts the
-// reply to an int64 as follows:
-//
-// Reply type Result
-// integer reply, nil
-// bulk string parsed reply, nil
-// nil 0, ErrNil
-// other 0, error
-func Uint64(reply interface{}, err error) (uint64, error) {
- if err != nil {
- return 0, err
- }
- switch reply := reply.(type) {
- case int64:
- if reply < 0 {
- return 0, errNegativeInt
- }
- return uint64(reply), nil
- case []byte:
- n, err := strconv.ParseUint(string(reply), 10, 64)
- return n, err
- case nil:
- return 0, ErrNil
- case Error:
- return 0, reply
- }
- return 0, fmt.Errorf("redigo: unexpected type for Uint64, got type %T", reply)
-}
-
-// Float64 is a helper that converts a command reply to 64 bit float. If err is
-// not equal to nil, then Float64 returns 0, err. Otherwise, Float64 converts
-// the reply to an int as follows:
-//
-// Reply type Result
-// bulk string parsed reply, nil
-// nil 0, ErrNil
-// other 0, error
-func Float64(reply interface{}, err error) (float64, error) {
- if err != nil {
- return 0, err
- }
- switch reply := reply.(type) {
- case []byte:
- n, err := strconv.ParseFloat(string(reply), 64)
- return n, err
- case nil:
- return 0, ErrNil
- case Error:
- return 0, reply
- }
- return 0, fmt.Errorf("redigo: unexpected type for Float64, got type %T", reply)
-}
-
-// String is a helper that converts a command reply to a string. If err is not
-// equal to nil, then String returns "", err. Otherwise String converts the
-// reply to a string as follows:
-//
-// Reply type Result
-// bulk string string(reply), nil
-// simple string reply, nil
-// nil "", ErrNil
-// other "", error
-func String(reply interface{}, err error) (string, error) {
- if err != nil {
- return "", err
- }
- switch reply := reply.(type) {
- case []byte:
- return string(reply), nil
- case string:
- return reply, nil
- case nil:
- return "", ErrNil
- case Error:
- return "", reply
- }
- return "", fmt.Errorf("redigo: unexpected type for String, got type %T", reply)
-}
-
-// Bytes is a helper that converts a command reply to a slice of bytes. If err
-// is not equal to nil, then Bytes returns nil, err. Otherwise Bytes converts
-// the reply to a slice of bytes as follows:
-//
-// Reply type Result
-// bulk string reply, nil
-// simple string []byte(reply), nil
-// nil nil, ErrNil
-// other nil, error
-func Bytes(reply interface{}, err error) ([]byte, error) {
- if err != nil {
- return nil, err
- }
- switch reply := reply.(type) {
- case []byte:
- return reply, nil
- case string:
- return []byte(reply), nil
- case nil:
- return nil, ErrNil
- case Error:
- return nil, reply
- }
- return nil, fmt.Errorf("redigo: unexpected type for Bytes, got type %T", reply)
-}
-
-// Bool is a helper that converts a command reply to a boolean. If err is not
-// equal to nil, then Bool returns false, err. Otherwise Bool converts the
-// reply to boolean as follows:
-//
-// Reply type Result
-// integer value != 0, nil
-// bulk string strconv.ParseBool(reply)
-// nil false, ErrNil
-// other false, error
-func Bool(reply interface{}, err error) (bool, error) {
- if err != nil {
- return false, err
- }
- switch reply := reply.(type) {
- case int64:
- return reply != 0, nil
- case []byte:
- return strconv.ParseBool(string(reply))
- case nil:
- return false, ErrNil
- case Error:
- return false, reply
- }
- return false, fmt.Errorf("redigo: unexpected type for Bool, got type %T", reply)
-}
-
-// MultiBulk is a helper that converts an array command reply to a []interface{}.
-//
-// Deprecated: Use Values instead.
-func MultiBulk(reply interface{}, err error) ([]interface{}, error) { return Values(reply, err) }
-
-// Values is a helper that converts an array command reply to a []interface{}.
-// If err is not equal to nil, then Values returns nil, err. Otherwise, Values
-// converts the reply as follows:
-//
-// Reply type Result
-// array reply, nil
-// nil nil, ErrNil
-// other nil, error
-func Values(reply interface{}, err error) ([]interface{}, error) {
- if err != nil {
- return nil, err
- }
- switch reply := reply.(type) {
- case []interface{}:
- return reply, nil
- case nil:
- return nil, ErrNil
- case Error:
- return nil, reply
- }
- return nil, fmt.Errorf("redigo: unexpected type for Values, got type %T", reply)
-}
-
-func sliceHelper(reply interface{}, err error, name string, makeSlice func(int), assign func(int, interface{}) error) error {
- if err != nil {
- return err
- }
- switch reply := reply.(type) {
- case []interface{}:
- makeSlice(len(reply))
- for i := range reply {
- if reply[i] == nil {
- continue
- }
- if err := assign(i, reply[i]); err != nil {
- return err
- }
- }
- return nil
- case nil:
- return ErrNil
- case Error:
- return reply
- }
- return fmt.Errorf("redigo: unexpected type for %s, got type %T", name, reply)
-}
-
-// Float64s is a helper that converts an array command reply to a []float64. If
-// err is not equal to nil, then Float64s returns nil, err. Nil array items are
-// converted to 0 in the output slice. Floats64 returns an error if an array
-// item is not a bulk string or nil.
-func Float64s(reply interface{}, err error) ([]float64, error) {
- var result []float64
- err = sliceHelper(reply, err, "Float64s", func(n int) { result = make([]float64, n) }, func(i int, v interface{}) error {
- p, ok := v.([]byte)
- if !ok {
- return fmt.Errorf("redigo: unexpected element type for Floats64, got type %T", v)
- }
- f, err := strconv.ParseFloat(string(p), 64)
- result[i] = f
- return err
- })
- return result, err
-}
-
-// Strings is a helper that converts an array command reply to a []string. If
-// err is not equal to nil, then Strings returns nil, err. Nil array items are
-// converted to "" in the output slice. Strings returns an error if an array
-// item is not a bulk string or nil.
-func Strings(reply interface{}, err error) ([]string, error) {
- var result []string
- err = sliceHelper(reply, err, "Strings", func(n int) { result = make([]string, n) }, func(i int, v interface{}) error {
- switch v := v.(type) {
- case string:
- result[i] = v
- return nil
- case []byte:
- result[i] = string(v)
- return nil
- default:
- return fmt.Errorf("redigo: unexpected element type for Strings, got type %T", v)
- }
- })
- return result, err
-}
-
-// ByteSlices is a helper that converts an array command reply to a [][]byte.
-// If err is not equal to nil, then ByteSlices returns nil, err. Nil array
-// items are stay nil. ByteSlices returns an error if an array item is not a
-// bulk string or nil.
-func ByteSlices(reply interface{}, err error) ([][]byte, error) {
- var result [][]byte
- err = sliceHelper(reply, err, "ByteSlices", func(n int) { result = make([][]byte, n) }, func(i int, v interface{}) error {
- p, ok := v.([]byte)
- if !ok {
- return fmt.Errorf("redigo: unexpected element type for ByteSlices, got type %T", v)
- }
- result[i] = p
- return nil
- })
- return result, err
-}
-
-// Int64s is a helper that converts an array command reply to a []int64.
-// If err is not equal to nil, then Int64s returns nil, err. Nil array
-// items are stay nil. Int64s returns an error if an array item is not a
-// bulk string or nil.
-func Int64s(reply interface{}, err error) ([]int64, error) {
- var result []int64
- err = sliceHelper(reply, err, "Int64s", func(n int) { result = make([]int64, n) }, func(i int, v interface{}) error {
- switch v := v.(type) {
- case int64:
- result[i] = v
- return nil
- case []byte:
- n, err := strconv.ParseInt(string(v), 10, 64)
- result[i] = n
- return err
- default:
- return fmt.Errorf("redigo: unexpected element type for Int64s, got type %T", v)
- }
- })
- return result, err
-}
-
-// Ints is a helper that converts an array command reply to a []in.
-// If err is not equal to nil, then Ints returns nil, err. Nil array
-// items are stay nil. Ints returns an error if an array item is not a
-// bulk string or nil.
-func Ints(reply interface{}, err error) ([]int, error) {
- var result []int
- err = sliceHelper(reply, err, "Ints", func(n int) { result = make([]int, n) }, func(i int, v interface{}) error {
- switch v := v.(type) {
- case int64:
- n := int(v)
- if int64(n) != v {
- return strconv.ErrRange
- }
- result[i] = n
- return nil
- case []byte:
- n, err := strconv.Atoi(string(v))
- result[i] = n
- return err
- default:
- return fmt.Errorf("redigo: unexpected element type for Ints, got type %T", v)
- }
- })
- return result, err
-}
-
-// StringMap is a helper that converts an array of strings (alternating key, value)
-// into a map[string]string. The HGETALL and CONFIG GET commands return replies in this format.
-// Requires an even number of values in result.
-func StringMap(result interface{}, err error) (map[string]string, error) {
- values, err := Values(result, err)
- if err != nil {
- return nil, err
- }
- if len(values)%2 != 0 {
- return nil, errors.New("redigo: StringMap expects even number of values result")
- }
- m := make(map[string]string, len(values)/2)
- for i := 0; i < len(values); i += 2 {
- key, okKey := values[i].([]byte)
- value, okValue := values[i+1].([]byte)
- if !okKey || !okValue {
- return nil, errors.New("redigo: StringMap key not a bulk string value")
- }
- m[string(key)] = string(value)
- }
- return m, nil
-}
-
-// IntMap is a helper that converts an array of strings (alternating key, value)
-// into a map[string]int. The HGETALL commands return replies in this format.
-// Requires an even number of values in result.
-func IntMap(result interface{}, err error) (map[string]int, error) {
- values, err := Values(result, err)
- if err != nil {
- return nil, err
- }
- if len(values)%2 != 0 {
- return nil, errors.New("redigo: IntMap expects even number of values result")
- }
- m := make(map[string]int, len(values)/2)
- for i := 0; i < len(values); i += 2 {
- key, ok := values[i].([]byte)
- if !ok {
- return nil, errors.New("redigo: IntMap key not a bulk string value")
- }
- value, err := Int(values[i+1], nil)
- if err != nil {
- return nil, err
- }
- m[string(key)] = value
- }
- return m, nil
-}
-
-// Int64Map is a helper that converts an array of strings (alternating key, value)
-// into a map[string]int64. The HGETALL commands return replies in this format.
-// Requires an even number of values in result.
-func Int64Map(result interface{}, err error) (map[string]int64, error) {
- values, err := Values(result, err)
- if err != nil {
- return nil, err
- }
- if len(values)%2 != 0 {
- return nil, errors.New("redigo: Int64Map expects even number of values result")
- }
- m := make(map[string]int64, len(values)/2)
- for i := 0; i < len(values); i += 2 {
- key, ok := values[i].([]byte)
- if !ok {
- return nil, errors.New("redigo: Int64Map key not a bulk string value")
- }
- value, err := Int64(values[i+1], nil)
- if err != nil {
- return nil, err
- }
- m[string(key)] = value
- }
- return m, nil
-}
-
-// Positions is a helper that converts an array of positions (lat, long)
-// into a [][2]float64. The GEOPOS command returns replies in this format.
-func Positions(result interface{}, err error) ([]*[2]float64, error) {
- values, err := Values(result, err)
- if err != nil {
- return nil, err
- }
- positions := make([]*[2]float64, len(values))
- for i := range values {
- if values[i] == nil {
- continue
- }
- p, ok := values[i].([]interface{})
- if !ok {
- return nil, fmt.Errorf("redigo: unexpected element type for interface slice, got type %T", values[i])
- }
- if len(p) != 2 {
- return nil, fmt.Errorf("redigo: unexpected number of values for a member position, got %d", len(p))
- }
- lat, err := Float64(p[0], nil)
- if err != nil {
- return nil, err
- }
- long, err := Float64(p[1], nil)
- if err != nil {
- return nil, err
- }
- positions[i] = &[2]float64{lat, long}
- }
- return positions, nil
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/scan.go b/vendor/github.com/garyburd/redigo/redis/scan.go
deleted file mode 100644
index ef9551bd4..000000000
--- a/vendor/github.com/garyburd/redigo/redis/scan.go
+++ /dev/null
@@ -1,585 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package redis
-
-import (
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "strings"
- "sync"
-)
-
-func ensureLen(d reflect.Value, n int) {
- if n > d.Cap() {
- d.Set(reflect.MakeSlice(d.Type(), n, n))
- } else {
- d.SetLen(n)
- }
-}
-
-func cannotConvert(d reflect.Value, s interface{}) error {
- var sname string
- switch s.(type) {
- case string:
- sname = "Redis simple string"
- case Error:
- sname = "Redis error"
- case int64:
- sname = "Redis integer"
- case []byte:
- sname = "Redis bulk string"
- case []interface{}:
- sname = "Redis array"
- default:
- sname = reflect.TypeOf(s).String()
- }
- return fmt.Errorf("cannot convert from %s to %s", sname, d.Type())
-}
-
-func convertAssignBulkString(d reflect.Value, s []byte) (err error) {
- switch d.Type().Kind() {
- case reflect.Float32, reflect.Float64:
- var x float64
- x, err = strconv.ParseFloat(string(s), d.Type().Bits())
- d.SetFloat(x)
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- var x int64
- x, err = strconv.ParseInt(string(s), 10, d.Type().Bits())
- d.SetInt(x)
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- var x uint64
- x, err = strconv.ParseUint(string(s), 10, d.Type().Bits())
- d.SetUint(x)
- case reflect.Bool:
- var x bool
- x, err = strconv.ParseBool(string(s))
- d.SetBool(x)
- case reflect.String:
- d.SetString(string(s))
- case reflect.Slice:
- if d.Type().Elem().Kind() != reflect.Uint8 {
- err = cannotConvert(d, s)
- } else {
- d.SetBytes(s)
- }
- default:
- err = cannotConvert(d, s)
- }
- return
-}
-
-func convertAssignInt(d reflect.Value, s int64) (err error) {
- switch d.Type().Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- d.SetInt(s)
- if d.Int() != s {
- err = strconv.ErrRange
- d.SetInt(0)
- }
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- if s < 0 {
- err = strconv.ErrRange
- } else {
- x := uint64(s)
- d.SetUint(x)
- if d.Uint() != x {
- err = strconv.ErrRange
- d.SetUint(0)
- }
- }
- case reflect.Bool:
- d.SetBool(s != 0)
- default:
- err = cannotConvert(d, s)
- }
- return
-}
-
-func convertAssignValue(d reflect.Value, s interface{}) (err error) {
- if d.Kind() != reflect.Ptr {
- if d.CanAddr() {
- d2 := d.Addr()
- if d2.CanInterface() {
- if scanner, ok := d2.Interface().(Scanner); ok {
- return scanner.RedisScan(s)
- }
- }
- }
- } else if d.CanInterface() {
- // Already a reflect.Ptr
- if d.IsNil() {
- d.Set(reflect.New(d.Type().Elem()))
- }
- if scanner, ok := d.Interface().(Scanner); ok {
- return scanner.RedisScan(s)
- }
- }
-
- switch s := s.(type) {
- case []byte:
- err = convertAssignBulkString(d, s)
- case int64:
- err = convertAssignInt(d, s)
- default:
- err = cannotConvert(d, s)
- }
- return err
-}
-
-func convertAssignArray(d reflect.Value, s []interface{}) error {
- if d.Type().Kind() != reflect.Slice {
- return cannotConvert(d, s)
- }
- ensureLen(d, len(s))
- for i := 0; i < len(s); i++ {
- if err := convertAssignValue(d.Index(i), s[i]); err != nil {
- return err
- }
- }
- return nil
-}
-
-func convertAssign(d interface{}, s interface{}) (err error) {
- if scanner, ok := d.(Scanner); ok {
- return scanner.RedisScan(s)
- }
-
- // Handle the most common destination types using type switches and
- // fall back to reflection for all other types.
- switch s := s.(type) {
- case nil:
- // ignore
- case []byte:
- switch d := d.(type) {
- case *string:
- *d = string(s)
- case *int:
- *d, err = strconv.Atoi(string(s))
- case *bool:
- *d, err = strconv.ParseBool(string(s))
- case *[]byte:
- *d = s
- case *interface{}:
- *d = s
- case nil:
- // skip value
- default:
- if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr {
- err = cannotConvert(d, s)
- } else {
- err = convertAssignBulkString(d.Elem(), s)
- }
- }
- case int64:
- switch d := d.(type) {
- case *int:
- x := int(s)
- if int64(x) != s {
- err = strconv.ErrRange
- x = 0
- }
- *d = x
- case *bool:
- *d = s != 0
- case *interface{}:
- *d = s
- case nil:
- // skip value
- default:
- if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr {
- err = cannotConvert(d, s)
- } else {
- err = convertAssignInt(d.Elem(), s)
- }
- }
- case string:
- switch d := d.(type) {
- case *string:
- *d = s
- case *interface{}:
- *d = s
- case nil:
- // skip value
- default:
- err = cannotConvert(reflect.ValueOf(d), s)
- }
- case []interface{}:
- switch d := d.(type) {
- case *[]interface{}:
- *d = s
- case *interface{}:
- *d = s
- case nil:
- // skip value
- default:
- if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr {
- err = cannotConvert(d, s)
- } else {
- err = convertAssignArray(d.Elem(), s)
- }
- }
- case Error:
- err = s
- default:
- err = cannotConvert(reflect.ValueOf(d), s)
- }
- return
-}
-
-// Scan copies from src to the values pointed at by dest.
-//
-// Scan uses RedisScan if available otherwise:
-//
-// The values pointed at by dest must be an integer, float, boolean, string,
-// []byte, interface{} or slices of these types. Scan uses the standard strconv
-// package to convert bulk strings to numeric and boolean types.
-//
-// If a dest value is nil, then the corresponding src value is skipped.
-//
-// If a src element is nil, then the corresponding dest value is not modified.
-//
-// To enable easy use of Scan in a loop, Scan returns the slice of src
-// following the copied values.
-func Scan(src []interface{}, dest ...interface{}) ([]interface{}, error) {
- if len(src) < len(dest) {
- return nil, errors.New("redigo.Scan: array short")
- }
- var err error
- for i, d := range dest {
- err = convertAssign(d, src[i])
- if err != nil {
- err = fmt.Errorf("redigo.Scan: cannot assign to dest %d: %v", i, err)
- break
- }
- }
- return src[len(dest):], err
-}
-
-type fieldSpec struct {
- name string
- index []int
- omitEmpty bool
-}
-
-type structSpec struct {
- m map[string]*fieldSpec
- l []*fieldSpec
-}
-
-func (ss *structSpec) fieldSpec(name []byte) *fieldSpec {
- return ss.m[string(name)]
-}
-
-func compileStructSpec(t reflect.Type, depth map[string]int, index []int, ss *structSpec) {
- for i := 0; i < t.NumField(); i++ {
- f := t.Field(i)
- switch {
- case f.PkgPath != "" && !f.Anonymous:
- // Ignore unexported fields.
- case f.Anonymous:
- // TODO: Handle pointers. Requires change to decoder and
- // protection against infinite recursion.
- if f.Type.Kind() == reflect.Struct {
- compileStructSpec(f.Type, depth, append(index, i), ss)
- }
- default:
- fs := &fieldSpec{name: f.Name}
- tag := f.Tag.Get("redis")
- p := strings.Split(tag, ",")
- if len(p) > 0 {
- if p[0] == "-" {
- continue
- }
- if len(p[0]) > 0 {
- fs.name = p[0]
- }
- for _, s := range p[1:] {
- switch s {
- case "omitempty":
- fs.omitEmpty = true
- default:
- panic(fmt.Errorf("redigo: unknown field tag %s for type %s", s, t.Name()))
- }
- }
- }
- d, found := depth[fs.name]
- if !found {
- d = 1 << 30
- }
- switch {
- case len(index) == d:
- // At same depth, remove from result.
- delete(ss.m, fs.name)
- j := 0
- for i := 0; i < len(ss.l); i++ {
- if fs.name != ss.l[i].name {
- ss.l[j] = ss.l[i]
- j += 1
- }
- }
- ss.l = ss.l[:j]
- case len(index) < d:
- fs.index = make([]int, len(index)+1)
- copy(fs.index, index)
- fs.index[len(index)] = i
- depth[fs.name] = len(index)
- ss.m[fs.name] = fs
- ss.l = append(ss.l, fs)
- }
- }
- }
-}
-
-var (
- structSpecMutex sync.RWMutex
- structSpecCache = make(map[reflect.Type]*structSpec)
- defaultFieldSpec = &fieldSpec{}
-)
-
-func structSpecForType(t reflect.Type) *structSpec {
-
- structSpecMutex.RLock()
- ss, found := structSpecCache[t]
- structSpecMutex.RUnlock()
- if found {
- return ss
- }
-
- structSpecMutex.Lock()
- defer structSpecMutex.Unlock()
- ss, found = structSpecCache[t]
- if found {
- return ss
- }
-
- ss = &structSpec{m: make(map[string]*fieldSpec)}
- compileStructSpec(t, make(map[string]int), nil, ss)
- structSpecCache[t] = ss
- return ss
-}
-
-var errScanStructValue = errors.New("redigo.ScanStruct: value must be non-nil pointer to a struct")
-
-// ScanStruct scans alternating names and values from src to a struct. The
-// HGETALL and CONFIG GET commands return replies in this format.
-//
-// ScanStruct uses exported field names to match values in the response. Use
-// 'redis' field tag to override the name:
-//
-// Field int `redis:"myName"`
-//
-// Fields with the tag redis:"-" are ignored.
-//
-// Each field uses RedisScan if available otherwise:
-// Integer, float, boolean, string and []byte fields are supported. Scan uses the
-// standard strconv package to convert bulk string values to numeric and
-// boolean types.
-//
-// If a src element is nil, then the corresponding field is not modified.
-func ScanStruct(src []interface{}, dest interface{}) error {
- d := reflect.ValueOf(dest)
- if d.Kind() != reflect.Ptr || d.IsNil() {
- return errScanStructValue
- }
- d = d.Elem()
- if d.Kind() != reflect.Struct {
- return errScanStructValue
- }
- ss := structSpecForType(d.Type())
-
- if len(src)%2 != 0 {
- return errors.New("redigo.ScanStruct: number of values not a multiple of 2")
- }
-
- for i := 0; i < len(src); i += 2 {
- s := src[i+1]
- if s == nil {
- continue
- }
- name, ok := src[i].([]byte)
- if !ok {
- return fmt.Errorf("redigo.ScanStruct: key %d not a bulk string value", i)
- }
- fs := ss.fieldSpec(name)
- if fs == nil {
- continue
- }
- if err := convertAssignValue(d.FieldByIndex(fs.index), s); err != nil {
- return fmt.Errorf("redigo.ScanStruct: cannot assign field %s: %v", fs.name, err)
- }
- }
- return nil
-}
-
-var (
- errScanSliceValue = errors.New("redigo.ScanSlice: dest must be non-nil pointer to a struct")
-)
-
-// ScanSlice scans src to the slice pointed to by dest. The elements the dest
-// slice must be integer, float, boolean, string, struct or pointer to struct
-// values.
-//
-// Struct fields must be integer, float, boolean or string values. All struct
-// fields are used unless a subset is specified using fieldNames.
-func ScanSlice(src []interface{}, dest interface{}, fieldNames ...string) error {
- d := reflect.ValueOf(dest)
- if d.Kind() != reflect.Ptr || d.IsNil() {
- return errScanSliceValue
- }
- d = d.Elem()
- if d.Kind() != reflect.Slice {
- return errScanSliceValue
- }
-
- isPtr := false
- t := d.Type().Elem()
- if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct {
- isPtr = true
- t = t.Elem()
- }
-
- if t.Kind() != reflect.Struct {
- ensureLen(d, len(src))
- for i, s := range src {
- if s == nil {
- continue
- }
- if err := convertAssignValue(d.Index(i), s); err != nil {
- return fmt.Errorf("redigo.ScanSlice: cannot assign element %d: %v", i, err)
- }
- }
- return nil
- }
-
- ss := structSpecForType(t)
- fss := ss.l
- if len(fieldNames) > 0 {
- fss = make([]*fieldSpec, len(fieldNames))
- for i, name := range fieldNames {
- fss[i] = ss.m[name]
- if fss[i] == nil {
- return fmt.Errorf("redigo.ScanSlice: ScanSlice bad field name %s", name)
- }
- }
- }
-
- if len(fss) == 0 {
- return errors.New("redigo.ScanSlice: no struct fields")
- }
-
- n := len(src) / len(fss)
- if n*len(fss) != len(src) {
- return errors.New("redigo.ScanSlice: length not a multiple of struct field count")
- }
-
- ensureLen(d, n)
- for i := 0; i < n; i++ {
- d := d.Index(i)
- if isPtr {
- if d.IsNil() {
- d.Set(reflect.New(t))
- }
- d = d.Elem()
- }
- for j, fs := range fss {
- s := src[i*len(fss)+j]
- if s == nil {
- continue
- }
- if err := convertAssignValue(d.FieldByIndex(fs.index), s); err != nil {
- return fmt.Errorf("redigo.ScanSlice: cannot assign element %d to field %s: %v", i*len(fss)+j, fs.name, err)
- }
- }
- }
- return nil
-}
-
-// Args is a helper for constructing command arguments from structured values.
-type Args []interface{}
-
-// Add returns the result of appending value to args.
-func (args Args) Add(value ...interface{}) Args {
- return append(args, value...)
-}
-
-// AddFlat returns the result of appending the flattened value of v to args.
-//
-// Maps are flattened by appending the alternating keys and map values to args.
-//
-// Slices are flattened by appending the slice elements to args.
-//
-// Structs are flattened by appending the alternating names and values of
-// exported fields to args. If v is a nil struct pointer, then nothing is
-// appended. The 'redis' field tag overrides struct field names. See ScanStruct
-// for more information on the use of the 'redis' field tag.
-//
-// Other types are appended to args as is.
-func (args Args) AddFlat(v interface{}) Args {
- rv := reflect.ValueOf(v)
- switch rv.Kind() {
- case reflect.Struct:
- args = flattenStruct(args, rv)
- case reflect.Slice:
- for i := 0; i < rv.Len(); i++ {
- args = append(args, rv.Index(i).Interface())
- }
- case reflect.Map:
- for _, k := range rv.MapKeys() {
- args = append(args, k.Interface(), rv.MapIndex(k).Interface())
- }
- case reflect.Ptr:
- if rv.Type().Elem().Kind() == reflect.Struct {
- if !rv.IsNil() {
- args = flattenStruct(args, rv.Elem())
- }
- } else {
- args = append(args, v)
- }
- default:
- args = append(args, v)
- }
- return args
-}
-
-func flattenStruct(args Args, v reflect.Value) Args {
- ss := structSpecForType(v.Type())
- for _, fs := range ss.l {
- fv := v.FieldByIndex(fs.index)
- if fs.omitEmpty {
- var empty = false
- switch fv.Kind() {
- case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
- empty = fv.Len() == 0
- case reflect.Bool:
- empty = !fv.Bool()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- empty = fv.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- empty = fv.Uint() == 0
- case reflect.Float32, reflect.Float64:
- empty = fv.Float() == 0
- case reflect.Interface, reflect.Ptr:
- empty = fv.IsNil()
- }
- if empty {
- continue
- }
- }
- args = append(args, fs.name, fv.Interface())
- }
- return args
-}
diff --git a/vendor/github.com/garyburd/redigo/redis/script.go b/vendor/github.com/garyburd/redigo/redis/script.go
deleted file mode 100644
index 0ef1c821f..000000000
--- a/vendor/github.com/garyburd/redigo/redis/script.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2012 Gary Burd
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package redis
-
-import (
- "crypto/sha1"
- "encoding/hex"
- "io"
- "strings"
-)
-
-// Script encapsulates the source, hash and key count for a Lua script. See
-// http://redis.io/commands/eval for information on scripts in Redis.
-type Script struct {
- keyCount int
- src string
- hash string
-}
-
-// NewScript returns a new script object. If keyCount is greater than or equal
-// to zero, then the count is automatically inserted in the EVAL command
-// argument list. If keyCount is less than zero, then the application supplies
-// the count as the first value in the keysAndArgs argument to the Do, Send and
-// SendHash methods.
-func NewScript(keyCount int, src string) *Script {
- h := sha1.New()
- io.WriteString(h, src)
- return &Script{keyCount, src, hex.EncodeToString(h.Sum(nil))}
-}
-
-func (s *Script) args(spec string, keysAndArgs []interface{}) []interface{} {
- var args []interface{}
- if s.keyCount < 0 {
- args = make([]interface{}, 1+len(keysAndArgs))
- args[0] = spec
- copy(args[1:], keysAndArgs)
- } else {
- args = make([]interface{}, 2+len(keysAndArgs))
- args[0] = spec
- args[1] = s.keyCount
- copy(args[2:], keysAndArgs)
- }
- return args
-}
-
-// Hash returns the script hash.
-func (s *Script) Hash() string {
- return s.hash
-}
-
-// Do evaluates the script. Under the covers, Do optimistically evaluates the
-// script using the EVALSHA command. If the command fails because the script is
-// not loaded, then Do evaluates the script using the EVAL command (thus
-// causing the script to load).
-func (s *Script) Do(c Conn, keysAndArgs ...interface{}) (interface{}, error) {
- v, err := c.Do("EVALSHA", s.args(s.hash, keysAndArgs)...)
- if e, ok := err.(Error); ok && strings.HasPrefix(string(e), "NOSCRIPT ") {
- v, err = c.Do("EVAL", s.args(s.src, keysAndArgs)...)
- }
- return v, err
-}
-
-// SendHash evaluates the script without waiting for the reply. The script is
-// evaluated with the EVALSHA command. The application must ensure that the
-// script is loaded by a previous call to Send, Do or Load methods.
-func (s *Script) SendHash(c Conn, keysAndArgs ...interface{}) error {
- return c.Send("EVALSHA", s.args(s.hash, keysAndArgs)...)
-}
-
-// Send evaluates the script without waiting for the reply.
-func (s *Script) Send(c Conn, keysAndArgs ...interface{}) error {
- return c.Send("EVAL", s.args(s.src, keysAndArgs)...)
-}
-
-// Load loads the script without evaluating it.
-func (s *Script) Load(c Conn) error {
- _, err := c.Do("SCRIPT", "LOAD", s.src)
- return err
-}
diff --git a/vendor/github.com/getsentry/sentry-go/.craft.yml b/vendor/github.com/getsentry/sentry-go/.craft.yml
deleted file mode 100644
index 8880dfec2..000000000
--- a/vendor/github.com/getsentry/sentry-go/.craft.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-minVersion: '0.9.2'
-github:
- owner: getsentry
- repo: sentry-go
-preReleaseCommand: bash scripts/craft-pre-release.sh
-changelogPolicy: simple
-statusProvider:
- name: github
- config:
- contexts:
- - Travis CI - Branch
-targets:
- - name: github
- includeNames: /none/
- tagPrefix: v
- - name: registry
- type: sdk
- config:
- canonical: "github:getsentry/sentry-go"
diff --git a/vendor/github.com/getsentry/sentry-go/.gitignore b/vendor/github.com/getsentry/sentry-go/.gitignore
deleted file mode 100644
index 29bfd6f1b..000000000
--- a/vendor/github.com/getsentry/sentry-go/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-coverage.txt
-
-# Just my personal way of tracking stuff — Kamil
-FIXME.md
-TODO.md
-!NOTES.md
\ No newline at end of file
diff --git a/vendor/github.com/getsentry/sentry-go/.golangci.yml b/vendor/github.com/getsentry/sentry-go/.golangci.yml
deleted file mode 100644
index b1416bc01..000000000
--- a/vendor/github.com/getsentry/sentry-go/.golangci.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-linters:
- disable-all: true
- enable:
- - bodyclose
- - deadcode
- - depguard
- - dogsled
- - dupl
- - errcheck
- - gochecknoglobals
- - gochecknoinits
- - goconst
- - gocritic
- - gocyclo
- - gofmt
- - goimports
- - golint
- - gosec
- - gosimple
- - govet
- - ineffassign
- - interfacer
- - lll
- - maligned
- - misspell
- - nakedret
- - prealloc
- - scopelint
- - staticcheck
- - structcheck
- - typecheck
- - unconvert
- - unparam
- - unused
- - varcheck
-run:
- skip-dirs:
- - echo
- - example/echo
-issues:
- exclude:
- - "not declared by package utf8"
- - "unicode/utf8/utf8.go"
- exclude-rules:
- - path: _test\.go
- linters:
- - prealloc
- - path: errors_test\.go
- linters:
- - unused
diff --git a/vendor/github.com/getsentry/sentry-go/.travis.yml b/vendor/github.com/getsentry/sentry-go/.travis.yml
deleted file mode 100644
index 96f5acafa..000000000
--- a/vendor/github.com/getsentry/sentry-go/.travis.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-language: go
-
-go:
- - 1.12.x
- - 1.13.x
- - 1.14.x
- - master
-
-env:
- - GO111MODULE=on GOFLAGS=-mod=readonly
- - GO111MODULE=off
-
-jobs:
- include:
- - name: "Module support outside of GOPATH"
- go: stable
- before_script: >-
- mv $GOPATH/src/github.com/getsentry/sentry-go ~/sentry-go &&
- cd ~/sentry-go &&
- export GOPATH= &&
- go env GOPATH
- script: >-
- go test ./... &&
- go test ./... -race
- allow_failures:
- - go: master
- fast_finish: true
-
-before_install:
- - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.19.1/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.19.1
- # Fetch origin/master. This is required for `git merge-base` when testing a
- # branch, since Travis clones only the target branch.
- - git fetch origin master:remotes/origin/master
-
-script:
- - golangci-lint run --new-from-rev=$(git merge-base origin/master HEAD)
- - go build ./...
- - go test ./...
- - go test ./... -race
-
-notifications:
- webhooks:
- urls:
- - https://zeus.ci/hooks/befe9810-9285-11e9-b01a-0a580a281808/public/provider/travis/webhook
- on_success: always
- on_failure: always
- on_start: always
- on_cancel: always
- on_error: always
diff --git a/vendor/github.com/getsentry/sentry-go/CHANGELOG.md b/vendor/github.com/getsentry/sentry-go/CHANGELOG.md
deleted file mode 100644
index bd6649c2e..000000000
--- a/vendor/github.com/getsentry/sentry-go/CHANGELOG.md
+++ /dev/null
@@ -1,226 +0,0 @@
-# Changelog
-
-## Unreleased
-
-- "I am running away from my responsibilities. And it feels good." – Michael Scott, Season 4, "Money"
-
-## v0.6.1
-
-- fix: Use NewEvent to init Event struct (#220)
-
-_NOTE:_
-A change introduced in v0.6.0 with the intent of avoiding allocations made a
-pattern used in official examples break in certain circumstances (attempting
-to write to a nil map).
-This release reverts the change such that maps in the Event struct are always
-allocated.
-
-## v0.6.0
-
-- feat: Read module dependencies from runtime/debug (#199)
-- feat: Support chained errors using Unwrap (#206)
-- feat: Report chain of errors when available (#185)
-- **[breaking]** fix: Accept http.RoundTripper to customize transport (#205)
- Before the SDK accepted a concrete value of type `*http.Transport` in
- `ClientOptions`, now it accepts any value implementing the `http.RoundTripper`
- interface. Note that `*http.Transport` implements `http.RoundTripper`, so most
- code bases will continue to work unchanged.
- Users of custom transport gain the ability to pass in other implementations of
- `http.RoundTripper` and may be able to simplify their code bases.
-- fix: Do not panic when scope event processor drops event (#192)
-- **[breaking]** fix: Use time.Time for timestamps (#191)
- Users of sentry-go typically do not need to manipulate timestamps manually.
- For those who do, the field type changed from `int64` to `time.Time`, which
- should be more convenient to use. The recommended way to get the current time
- is `time.Now().UTC()`.
-- fix: Report usage error including stack trace (#189)
-- feat: Add Exception.ThreadID field (#183)
-- ci: Test against Go 1.14, drop 1.11 (#170)
-- feat: Limit reading bytes from request bodies (#168)
-- **[breaking]** fix: Rename fasthttp integration package sentryhttp => sentryfasthttp
- The current recommendation is to use a named import, in which case existing
- code should not require any change:
- ```go
- package main
-
- import (
- "fmt"
-
- "github.com/getsentry/sentry-go"
- sentryfasthttp "github.com/getsentry/sentry-go/fasthttp"
- "github.com/valyala/fasthttp"
- )
- ```
-
-_NOTE:_
-This version includes some new features and a few breaking changes, none of
-which should pose troubles with upgrading. Most code bases should be able to
-upgrade without any changes.
-
-## v0.5.1
-
-- fix: Ignore err.Cause() when it is nil (#160)
-
-## v0.5.0
-
-- fix: Synchronize access to HTTPTransport.disabledUntil (#158)
-- docs: Update Flush documentation (#153)
-- fix: HTTPTransport.Flush panic and data race (#140)
-
-_NOTE:_
-This version changes the implementation of the default transport, modifying the
-behavior of `sentry.Flush`. The previous behavior was to wait until there were
-no buffered events; new concurrent events kept `Flush` from returning. The new
-behavior is to wait until the last event prior to the call to `Flush` has been
-sent or the timeout; new concurrent events have no effect. The new behavior is
-inline with the [Unified API
-Guidelines](https://docs.sentry.io/development/sdk-dev/unified-api/).
-
-We have updated the documentation and examples to clarify that `Flush` is meant
-to be called typically only once before program termination, to wait for
-in-flight events to be sent to Sentry. Calling `Flush` after every event is not
-recommended, as it introduces unnecessary latency to the surrounding function.
-Please verify the usage of `sentry.Flush` in your code base.
-
-## v0.4.0
-
-- fix(stacktrace): Correctly report package names (#127)
-- fix(stacktrace): Do not rely on AbsPath of files (#123)
-- build: Require github.com/ugorji/go@v1.1.7 (#110)
-- fix: Correctly store last event id (#99)
-- fix: Include request body in event payload (#94)
-- build: Reset go.mod version to 1.11 (#109)
-- fix: Eliminate data race in modules integration (#105)
-- feat: Add support for path prefixes in the DSN (#102)
-- feat: Add HTTPClient option (#86)
-- feat: Extract correct type and value from top-most error (#85)
-- feat: Check for broken pipe errors in Gin integration (#82)
-- fix: Client.CaptureMessage accept nil EventModifier (#72)
-
-## v0.3.1
-
-- feat: Send extra information exposed by the Go runtime (#76)
-- fix: Handle new lines in module integration (#65)
-- fix: Make sure that cache is locked when updating for contextifyFramesIntegration
-- ref: Update Iris integration and example to version 12
-- misc: Remove indirect dependencies in order to move them to separate go.mod files
-
-## v0.3.0
-
-- feat: Retry event marshalling without contextual data if the first pass fails
-- fix: Include `url.Parse` error in `DsnParseError`
-- fix: Make more `Scope` methods safe for concurrency
-- fix: Synchronize concurrent access to `Hub.client`
-- ref: Remove mutex from `Scope` exported API
-- ref: Remove mutex from `Hub` exported API
-- ref: Compile regexps for `filterFrames` only once
-- ref: Change `SampleRate` type to `float64`
-- doc: `Scope.Clear` not safe for concurrent use
-- ci: Test sentry-go with `go1.13`, drop `go1.10`
-
-_NOTE:_
-This version removes some of the internal APIs that landed publicly (namely `Hub/Scope` mutex structs) and may require (but shouldn't) some changes to your code.
-It's not done through major version update, as we are still in `0.x` stage.
-
-## v0.2.1
-
-- fix: Run `Contextify` integration on `Threads` as well
-
-## v0.2.0
-
-- feat: Add `SetTransaction()` method on the `Scope`
-- feat: `fasthttp` framework support with `sentryfasthttp` package
-- fix: Add `RWMutex` locks to internal `Hub` and `Scope` changes
-
-## v0.1.3
-
-- feat: Move frames context reading into `contextifyFramesIntegration` (#28)
-
-_NOTE:_
-In case of any performance issues due to source contexts IO, you can let us know and turn off the integration in the meantime with:
-
-```go
-sentry.Init(sentry.ClientOptions{
- Integrations: func(integrations []sentry.Integration) []sentry.Integration {
- var filteredIntegrations []sentry.Integration
- for _, integration := range integrations {
- if integration.Name() == "ContextifyFrames" {
- continue
- }
- filteredIntegrations = append(filteredIntegrations, integration)
- }
- return filteredIntegrations
- },
-})
-```
-
-## v0.1.2
-
-- feat: Better source code location resolution and more useful inapp frames (#26)
-- feat: Use `noopTransport` when no `Dsn` provided (#27)
-- ref: Allow empty `Dsn` instead of returning an error (#22)
-- fix: Use `NewScope` instead of literal struct inside a `scope.Clear` call (#24)
-- fix: Add to `WaitGroup` before the request is put inside a buffer (#25)
-
-## v0.1.1
-
-- fix: Check for initialized `Client` in `AddBreadcrumbs` (#20)
-- build: Bump version when releasing with Craft (#19)
-
-## v0.1.0
-
-- First stable release! \o/
-
-## v0.0.1-beta.5
-
-- feat: **[breaking]** Add `NewHTTPTransport` and `NewHTTPSyncTransport` which accepts all transport options
-- feat: New `HTTPSyncTransport` that blocks after each call
-- feat: New `Echo` integration
-- ref: **[breaking]** Remove `BufferSize` option from `ClientOptions` and move it to `HTTPTransport` instead
-- ref: Export default `HTTPTransport`
-- ref: Export `net/http` integration handler
-- ref: Set `Request` instantly in the package handlers, not in `recoverWithSentry` so it can be accessed later on
-- ci: Add craft config
-
-## v0.0.1-beta.4
-
-- feat: `IgnoreErrors` client option and corresponding integration
-- ref: Reworked `net/http` integration, wrote better example and complete readme
-- ref: Reworked `Gin` integration, wrote better example and complete readme
-- ref: Reworked `Iris` integration, wrote better example and complete readme
-- ref: Reworked `Negroni` integration, wrote better example and complete readme
-- ref: Reworked `Martini` integration, wrote better example and complete readme
-- ref: Remove `Handle()` from frameworks handlers and return it directly from New
-
-## v0.0.1-beta.3
-
-- feat: `Iris` framework support with `sentryiris` package
-- feat: `Gin` framework support with `sentrygin` package
-- feat: `Martini` framework support with `sentrymartini` package
-- feat: `Negroni` framework support with `sentrynegroni` package
-- feat: Add `Hub.Clone()` for easier frameworks integration
-- feat: Return `EventID` from `Recovery` methods
-- feat: Add `NewScope` and `NewEvent` functions and use them in the whole codebase
-- feat: Add `AddEventProcessor` to the `Client`
-- fix: Operate on requests body copy instead of the original
-- ref: Try to read source files from the root directory, based on the filename as well, to make it work on AWS Lambda
-- ref: Remove `gocertifi` dependence and document how to provide your own certificates
-- ref: **[breaking]** Remove `Decorate` and `DecorateFunc` methods in favor of `sentryhttp` package
-- ref: **[breaking]** Allow for integrations to live on the client, by passing client instance in `SetupOnce` method
-- ref: **[breaking]** Remove `GetIntegration` from the `Hub`
-- ref: **[breaking]** Remove `GlobalEventProcessors` getter from the public API
-
-## v0.0.1-beta.2
-
-- feat: Add `AttachStacktrace` client option to include stacktrace for messages
-- feat: Add `BufferSize` client option to configure transport buffer size
-- feat: Add `SetRequest` method on a `Scope` to control `Request` context data
-- feat: Add `FromHTTPRequest` for `Request` type for easier extraction
-- ref: Extract `Request` information more accurately
-- fix: Attach `ServerName`, `Release`, `Dist`, `Environment` options to the event
-- fix: Don't log events dropped due to full transport buffer as sent
-- fix: Don't panic and create an appropriate event when called `CaptureException` or `Recover` with `nil` value
-
-## v0.0.1-beta
-
-- Initial release
diff --git a/vendor/github.com/getsentry/sentry-go/CONTRIBUTING.md b/vendor/github.com/getsentry/sentry-go/CONTRIBUTING.md
deleted file mode 100644
index 04bfafa09..000000000
--- a/vendor/github.com/getsentry/sentry-go/CONTRIBUTING.md
+++ /dev/null
@@ -1,53 +0,0 @@
-## Community
-
-The public-facing channels for support and development of Sentry SDKs can be found on [Discord](https://discord.gg/Ww9hbqr).
-
-## Testing
-
-```console
-$ go test
-```
-
-### Watch mode
-
-Use: https://github.com/cespare/reflex
-
-```console
-$ reflex -g '*.go' -d "none" -- sh -c 'printf "\n"; go test'
-```
-
-### With data race detection
-
-```console
-$ go test -race
-```
-
-### Coverage
-```console
-$ go test -race -coverprofile=coverage.txt -covermode=atomic && go tool cover -html coverage.txt
-```
-
-## Linting
-
-```console
-$ golangci-lint run
-```
-
-## Release
-
-1. Update `CHANGELOG.md` with new version in `vX.X.X` format title and list of changes.
-
- The command below can be used to get a list of changes since the last tag, with the format used in `CHANGELOG.md`:
-
- ```console
- $ git log --no-merges --format=%s $(git describe --abbrev=0).. | sed 's/^/- /'
- ```
-
-2. Commit with `misc: vX.X.X changelog` commit message and push to `master`.
-
-3. Let [`craft`](https://github.com/getsentry/craft) do the rest:
-
- ```console
- $ craft prepare X.X.X
- $ craft publish X.X.X
- ```
diff --git a/vendor/github.com/getsentry/sentry-go/LICENSE b/vendor/github.com/getsentry/sentry-go/LICENSE
deleted file mode 100644
index 3e66f28d2..000000000
--- a/vendor/github.com/getsentry/sentry-go/LICENSE
+++ /dev/null
@@ -1,9 +0,0 @@
-Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/getsentry/sentry-go/MIGRATION.md b/vendor/github.com/getsentry/sentry-go/MIGRATION.md
deleted file mode 100644
index 0be4949eb..000000000
--- a/vendor/github.com/getsentry/sentry-go/MIGRATION.md
+++ /dev/null
@@ -1,392 +0,0 @@
-# `raven-go` to `sentry-go` Migration Guide
-
-## Installation
-
-raven-go
-
-```go
-go get github.com/getsentry/raven-go
-```
-
-sentry-go
-
-```go
-go get github.com/getsentry/sentry-go@v0.0.1
-```
-
-## Configuration
-
-raven-go
-
-```go
-import "github.com/getsentry/raven-go"
-
-func main() {
- raven.SetDSN("___PUBLIC_DSN___")
-}
-```
-
-sentry-go
-
-```go
-import (
- "fmt"
- "github.com/getsentry/sentry-go"
-)
-
-func main() {
- err := sentry.Init(sentry.ClientOptions{
- Dsn: "___PUBLIC_DSN___",
- })
-
- if err != nil {
- fmt.Printf("Sentry initialization failed: %v\n", err)
- }
-}
-```
-
-raven-go
-
-```go
-SetDSN()
-SetDefaultLoggerName()
-SetDebug()
-SetEnvironment()
-SetRelease()
-SetSampleRate()
-SetIgnoreErrors()
-SetIncludePaths()
-```
-
-sentry-go
-
-```go
-sentry.Init(sentry.ClientOptions{
- Dsn: "___PUBLIC_DSN___",
- DebugWriter: os.Stderr,
- Debug: true,
- Environment: "environment",
- Release: "release",
- SampleRate: 0.5,
- // IgnoreErrors: TBD,
- // IncludePaths: TBD
-})
-```
-
-Available options: see [Configuration](https://docs.sentry.io/platforms/go/config/) section.
-
-### Providing SSL Certificates
-
-By default, TLS uses the host's root CA set. If you don't have `ca-certificates` (which should be your go-to way of fixing the issue of missing certificates) and want to use `gocertifi` instead, you can provide pre-loaded cert files as one of the options to the `sentry.Init` call:
-
-```go
-package main
-
-import (
- "log"
-
- "github.com/certifi/gocertifi"
- "github.com/getsentry/sentry-go"
-)
-
-sentryClientOptions := sentry.ClientOptions{
- Dsn: "___PUBLIC_DSN___",
-}
-
-rootCAs, err := gocertifi.CACerts()
-if err != nil {
- log.Println("Couldn't load CA Certificates: %v\n", err)
-} else {
- sentryClientOptions.CaCerts = rootCAs
-}
-
-sentry.Init(sentryClientOptions)
-```
-
-## Usage
-
-### Capturing Errors
-
-raven-go
-
-```go
-f, err := os.Open("filename.ext")
-if err != nil {
- raven.CaptureError(err, nil)
-}
-```
-
-sentry-go
-
-```go
-f, err := os.Open("filename.ext")
-if err != nil {
- sentry.CaptureException(err)
-}
-```
-
-### Capturing Panics
-
-raven-go
-
-```go
-raven.CapturePanic(func() {
- // do all of the scary things here
-}, nil)
-```
-
-sentry-go
-
-```go
-func() {
- defer sentry.Recover()
- // do all of the scary things here
-}()
-```
-
-### Capturing Messages
-
-raven-go
-
-```go
-raven.CaptureMessage("Something bad happened and I would like to know about that")
-```
-
-sentry-go
-
-```go
-sentry.CaptureMessage("Something bad happened and I would like to know about that")
-```
-
-### Capturing Events
-
-raven-go
-
-```go
-packet := &raven.Packet{
- Message: "Hand-crafted event",
- Extra: &raven.Extra{
- "runtime.Version": runtime.Version(),
- "runtime.NumCPU": runtime.NumCPU(),
- },
-}
-raven.Capture(packet)
-```
-
-sentry-go
-
-```go
-event := &sentry.NewEvent()
-event.Message = "Hand-crafted event"
-event.Extra["runtime.Version"] = runtime.Version()
-event.Extra["runtime.NumCPU"] = runtime.NumCPU()
-
-sentry.CaptureEvent(event)
-```
-
-### Additional Data
-
-See Context section.
-
-### Event Sampling
-
-raven-go
-
-```go
-raven.SetSampleRate(0.25)
-```
-
-sentry-go
-
-```go
-sentry.Init(sentry.ClientOptions{
- SampleRate: 0.25,
-})
-```
-
-### Awaiting the response (not recommended)
-
-```go
-raven.CaptureMessageAndWait("Something bad happened and I would like to know about that")
-```
-
-sentry-go
-
-```go
-sentry.CaptureMessage("Something bad happened and I would like to know about that")
-
-if sentry.Flush(time.Second * 2) {
- // event delivered
-} else {
- // timeout reached
-}
-```
-
-## Context
-
-### Per-event
-
-raven-go
-
-```go
-raven.CaptureError(err, map[string]string{"browser": "Firefox"}, &raven.Http{
- Method: "GET",
- URL: "https://example.com/raven-go"
-})
-```
-
-sentry-go
-
-```go
-sentry.WithScope(func(scope *sentry.Scope) {
- scope.SetTag("browser", "Firefox")
- scope.SetContext("Request", map[string]string{
- "Method": "GET",
- "URL": "https://example.com/raven-go",
- })
- sentry.CaptureException(err)
-})
-```
-
-### Globally
-
-#### SetHttpContext
-
-raven-go
-
-```go
-raven.SetHttpContext(&raven.Http{
- Method: "GET",
- URL: "https://example.com/raven-go",
-})
-```
-
-sentry-go
-
-```go
-sentry.ConfigureScope(func(scope *sentry.Scope) {
- scope.SetContext("Request", map[string]string{
- "Method": "GET",
- "URL": "https://example.com/raven-go",
- })
-})
-```
-
-#### SetTagsContext
-
-raven-go
-
-```go
-t := map[string]string{"day": "Friday", "sport": "Weightlifting"}
-raven.SetTagsContext(map[string]string{"day": "Friday", "sport": "Weightlifting"})
-```
-
-sentry-go
-
-```go
-sentry.ConfigureScope(func(scope *sentry.Scope) {
- scope.SetTags(map[string]string{"day": "Friday", "sport": "Weightlifting"})
-})
-```
-
-#### SetUserContext
-
-raven-go
-
-```go
-raven.SetUserContext(&raven.User{
- ID: "1337",
- Username: "kamilogorek",
- Email: "kamil@sentry.io",
- IP: "127.0.0.1",
-})
-```
-
-sentry-go
-
-```go
-sentry.ConfigureScope(func(scope *sentry.Scope) {
- scope.SetUser(sentry.User{
- ID: "1337",
- Username: "kamilogorek",
- Email: "kamil@sentry.io",
- IPAddress: "127.0.0.1",
- })
-})
-```
-
-#### ClearContext
-
-raven-go
-
-```go
-raven.ClearContext()
-```
-
-sentry-go
-
-```go
-sentry.ConfigureScope(func(scope *sentry.Scope) {
- scope.Clear()
-})
-```
-
-#### WrapWithExtra
-
-raven-go
-
-```go
-path := "filename.ext"
-f, err := os.Open(path)
-if err != nil {
- err = raven.WrapWithExtra(err, map[string]string{"path": path, "cwd": os.Getwd()}
- raven.CaptureError(err, nil)
-}
-```
-
-sentry-go
-
-```go
-// use `sentry.WithScope`, see "Context / Per-event Section"
-path := "filename.ext"
-f, err := os.Open(path)
-if err != nil {
- sentry.WithScope(func(scope *sentry.Scope) {
- sentry.SetExtras(map[string]interface{}{"path": path, "cwd": os.Getwd())
- sentry.CaptureException(err)
- })
-}
-```
-
-## Integrations
-
-### net/http
-
-raven-go
-
-```go
-mux := http.NewServeMux
-http.Handle("/", raven.Recoverer(mux))
-
-// or
-
-func root(w http.ResponseWriter, r *http.Request) {}
-http.HandleFunc("/", raven.RecoveryHandler(root))
-```
-
-sentry-go
-
-```go
-sentryHandler := sentryhttp.New(sentryhttp.Options{
- Repanic: false,
- WaitForDelivery: true,
-})
-
-mux := http.NewServeMux
-http.Handle("/", sentryHandler.Handle(mux))
-
-// or
-
-func root(w http.ResponseWriter, r *http.Request) {}
-http.HandleFunc("/", sentryHandler.HandleFunc(root))
-```
diff --git a/vendor/github.com/getsentry/sentry-go/README.md b/vendor/github.com/getsentry/sentry-go/README.md
deleted file mode 100644
index 9cf449e39..000000000
--- a/vendor/github.com/getsentry/sentry-go/README.md
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
-# Official Sentry SDK for Go
-
-[](https://travis-ci.com/getsentry/sentry-go)
-[](https://goreportcard.com/report/github.com/getsentry/sentry-go)
-[](https://discord.gg/Ww9hbqr)
-[](https://godoc.org/github.com/getsentry/sentry-go)
-[](https://pkg.go.dev/github.com/getsentry/sentry-go)
-
-`sentry-go` provides a Sentry client implementation for the Go programming
-language. This is the next line of the Go SDK for [Sentry](https://sentry.io/),
-intended to replace the `raven-go` package.
-
-> Looking for the old `raven-go` SDK documentation? See the Legacy client section [here](https://docs.sentry.io/clients/go/).
-> If you want to start using sentry-go instead, check out the [migration guide](https://docs.sentry.io/platforms/go/migration/).
-
-## Requirements
-
-The only requirement is a Go compiler.
-
-We verify this package against the 3 most recent releases of Go. Those are the
-supported versions. The exact versions are defined in
-[`.travis.yml`](.travis.yml).
-
-In addition, we run tests against the current master branch of the Go toolchain,
-though support for this configuration is best-effort.
-
-## Installation
-
-`sentry-go` can be installed like any other Go library through `go get`:
-
-```console
-$ go get github.com/getsentry/sentry-go
-```
-
-Or, if you are already using
-[Go Modules](https://github.com/golang/go/wiki/Modules), you may specify a
-version number as well:
-
-```console
-$ go get github.com/getsentry/sentry-go@latest
-```
-
-Check out the [list of released versions](https://pkg.go.dev/github.com/getsentry/sentry-go?tab=versions).
-
-## Configuration
-
-To use `sentry-go`, you’ll need to import the `sentry-go` package and initialize
-it with your DSN and other [options](https://godoc.org/github.com/getsentry/sentry-go#ClientOptions).
-
-If not specified in the SDK initialization, the
-[DSN](https://docs.sentry.io/error-reporting/configuration/?platform=go#dsn),
-[Release](https://docs.sentry.io/workflow/releases/?platform=go) and
-[Environment](https://docs.sentry.io/enriching-error-data/environments/?platform=go)
-are read from the environment variables `SENTRY_DSN`, `SENTRY_RELEASE` and
-`SENTRY_ENVIRONMENT`, respectively.
-
-More on this in the [Configuration](https://docs.sentry.io/platforms/go/config/)
-section of the official Sentry documentation.
-
-## Usage
-
-The SDK must be initialized with a call to `sentry.Init`. The default transport
-is asynchronous and thus most programs should call `sentry.Flush` to wait until
-buffered events are sent to Sentry right before the program terminates.
-
-Typically, `sentry.Init` is called in the beginning of `func main` and
-`sentry.Flush` is [deferred](https://golang.org/ref/spec#Defer_statements) right
-after.
-
-> Note that if the program terminates with a call to
-> [`os.Exit`](https://golang.org/pkg/os/#Exit), either directly or indirectly
-> via another function like `log.Fatal`, deferred functions are not run.
->
-> In that case, and if it is important for you to report outstanding events
-> before terminating the program, arrange for `sentry.Flush` to be called before
-> the program terminates.
-
-Example:
-
-```go
-// This is an example program that makes an HTTP request and prints response
-// headers. Whenever a request fails, the error is reported to Sentry.
-//
-// Try it by running:
-//
-// go run main.go
-// go run main.go https://sentry.io
-// go run main.go bad-url
-//
-// To actually report events to Sentry, set the DSN either by editing the
-// appropriate line below or setting the environment variable SENTRY_DSN to
-// match the DSN of your Sentry project.
-package main
-
-import (
- "fmt"
- "log"
- "net/http"
- "os"
- "time"
-
- "github.com/getsentry/sentry-go"
-)
-
-func main() {
- if len(os.Args) < 2 {
- log.Fatalf("usage: %s URL", os.Args[0])
- }
-
- err := sentry.Init(sentry.ClientOptions{
- // Either set your DSN here or set the SENTRY_DSN environment variable.
- Dsn: "",
- // Enable printing of SDK debug messages.
- // Useful when getting started or trying to figure something out.
- Debug: true,
- })
- if err != nil {
- log.Fatalf("sentry.Init: %s", err)
- }
- // Flush buffered events before the program terminates.
- // Set the timeout to the maximum duration the program can afford to wait.
- defer sentry.Flush(2 * time.Second)
-
- resp, err := http.Get(os.Args[1])
- if err != nil {
- sentry.CaptureException(err)
- log.Printf("reported to Sentry: %s", err)
- return
- }
- defer resp.Body.Close()
-
- for header, values := range resp.Header {
- for _, value := range values {
- fmt.Printf("%s=%s\n", header, value)
- }
- }
-}
-```
-
-For your convenience, this example is available at
-[`example/basic/main.go`](example/basic/main.go).
-There are also more examples in the
-[example](example) directory.
-
-For more detailed information about how to get the most out of `sentry-go`,
-checkout the official documentation:
-
-- [Configuration](https://docs.sentry.io/platforms/go/config)
-- [Error Reporting](https://docs.sentry.io/error-reporting/quickstart?platform=go)
-- [Enriching Error Data](https://docs.sentry.io/enriching-error-data/context?platform=go)
-- [Transports](https://docs.sentry.io/platforms/go/transports)
-- [Integrations](https://docs.sentry.io/platforms/go/integrations)
- - [net/http](https://docs.sentry.io/platforms/go/http)
- - [echo](https://docs.sentry.io/platforms/go/echo)
- - [fasthttp](https://docs.sentry.io/platforms/go/fasthttp)
- - [gin](https://docs.sentry.io/platforms/go/gin)
- - [iris](https://docs.sentry.io/platforms/go/iris)
- - [martini](https://docs.sentry.io/platforms/go/martini)
- - [negroni](https://docs.sentry.io/platforms/go/negroni)
-
-## Resources
-
-- [Bug Tracker](https://github.com/getsentry/sentry-go/issues)
-- [GitHub Project](https://github.com/getsentry/sentry-go)
-- [](https://godoc.org/github.com/getsentry/sentry-go)
-- [](https://pkg.go.dev/github.com/getsentry/sentry-go)
-- [](https://docs.sentry.io/platforms/go/)
-- [](https://forum.sentry.io/c/sdks)
-- [](https://discord.gg/Ww9hbqr)
-- [](http://stackoverflow.com/questions/tagged/sentry)
-- [](https://twitter.com/intent/follow?screen_name=getsentry)
-
-
-## License
-
-Licensed under
-[The 2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause), see
-[`LICENSE`](LICENSE).
-
-## Community
-
-Join Sentry's [`#go` channel on Discord](https://discord.gg/Ww9hbqr) to get
-involved and help us improve the SDK!
diff --git a/vendor/github.com/getsentry/sentry-go/client.go b/vendor/github.com/getsentry/sentry-go/client.go
deleted file mode 100644
index aaf9590d9..000000000
--- a/vendor/github.com/getsentry/sentry-go/client.go
+++ /dev/null
@@ -1,487 +0,0 @@
-package sentry
-
-import (
- "context"
- "crypto/x509"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "math/rand"
- "net/http"
- "os"
- "reflect"
- "sort"
- "time"
-)
-
-// maxErrorDepth is the maximum number of errors reported in a chain of errors.
-// This protects the SDK from an arbitrarily long chain of wrapped errors.
-//
-// An additional consideration is that arguably reporting a long chain of errors
-// is of little use when debugging production errors with Sentry. The Sentry UI
-// is not optimized for long chains either. The top-level error together with a
-// stack trace is often the most useful information.
-const maxErrorDepth = 10
-
-// usageError is used to report to Sentry an SDK usage error.
-//
-// It is not exported because it is never returned by any function or method in
-// the exported API.
-type usageError struct {
- error
-}
-
-// Logger is an instance of log.Logger that is use to provide debug information about running Sentry Client
-// can be enabled by either using `Logger.SetOutput` directly or with `Debug` client option
-var Logger = log.New(ioutil.Discard, "[Sentry] ", log.LstdFlags) //nolint: gochecknoglobals
-
-type EventProcessor func(event *Event, hint *EventHint) *Event
-
-type EventModifier interface {
- ApplyToEvent(event *Event, hint *EventHint) *Event
-}
-
-var globalEventProcessors []EventProcessor //nolint: gochecknoglobals
-
-func AddGlobalEventProcessor(processor EventProcessor) {
- globalEventProcessors = append(globalEventProcessors, processor)
-}
-
-// Integration allows for registering a functions that modify or discard captured events.
-type Integration interface {
- Name() string
- SetupOnce(client *Client)
-}
-
-// ClientOptions that configures a SDK Client
-type ClientOptions struct {
- // The DSN to use. If the DSN is not set, the client is effectively disabled.
- Dsn string
- // In debug mode, the debug information is printed to stdout to help you understand what
- // sentry is doing.
- Debug bool
- // Configures whether SDK should generate and attach stacktraces to pure capture message calls.
- AttachStacktrace bool
- // The sample rate for event submission (0.0 - 1.0, defaults to 1.0).
- SampleRate float64
- // List of regexp strings that will be used to match against event's message
- // and if applicable, caught errors type and value.
- // If the match is found, then a whole event will be dropped.
- IgnoreErrors []string
- // Before send callback.
- BeforeSend func(event *Event, hint *EventHint) *Event
- // Before breadcrumb add callback.
- BeforeBreadcrumb func(breadcrumb *Breadcrumb, hint *BreadcrumbHint) *Breadcrumb
- // Integrations to be installed on the current Client, receives default integrations
- Integrations func([]Integration) []Integration
- // io.Writer implementation that should be used with the `Debug` mode
- DebugWriter io.Writer
- // The transport to use.
- // This is an instance of a struct implementing `Transport` interface.
- // Defaults to `httpTransport` from `transport.go`
- Transport Transport
- // The server name to be reported.
- ServerName string
- // The release to be sent with events.
- Release string
- // The dist to be sent with events.
- Dist string
- // The environment to be sent with events.
- Environment string
- // Maximum number of breadcrumbs.
- MaxBreadcrumbs int
- // An optional pointer to `http.Client` that will be used with a default HTTPTransport.
- // Using your own client will make HTTPTransport, HTTPProxy, HTTPSProxy and CaCerts options ignored.
- HTTPClient *http.Client
- // An optional pointer to `http.Transport` that will be used with a default HTTPTransport.
- // Using your own transport will make HTTPProxy, HTTPSProxy and CaCerts options ignored.
- HTTPTransport http.RoundTripper
- // An optional HTTP proxy to use.
- // This will default to the `http_proxy` environment variable.
- // or `https_proxy` if that one exists.
- HTTPProxy string
- // An optional HTTPS proxy to use.
- // This will default to the `HTTPS_PROXY` environment variable
- // or `http_proxy` if that one exists.
- HTTPSProxy string
- // An optional CaCerts to use.
- // Defaults to `gocertifi.CACerts()`.
- CaCerts *x509.CertPool
-}
-
-// Client is the underlying processor that's used by the main API and `Hub` instances.
-type Client struct {
- options ClientOptions
- dsn *Dsn
- eventProcessors []EventProcessor
- integrations []Integration
- Transport Transport
-}
-
-// NewClient creates and returns an instance of `Client` configured using `ClientOptions`.
-func NewClient(options ClientOptions) (*Client, error) {
- if options.Debug {
- debugWriter := options.DebugWriter
- if debugWriter == nil {
- debugWriter = os.Stdout
- }
- Logger.SetOutput(debugWriter)
- }
-
- if options.Dsn == "" {
- options.Dsn = os.Getenv("SENTRY_DSN")
- }
-
- if options.Release == "" {
- options.Release = os.Getenv("SENTRY_RELEASE")
- }
-
- if options.Environment == "" {
- options.Environment = os.Getenv("SENTRY_ENVIRONMENT")
- }
-
- var dsn *Dsn
- if options.Dsn != "" {
- var err error
- dsn, err = NewDsn(options.Dsn)
- if err != nil {
- return nil, err
- }
- }
-
- client := Client{
- options: options,
- dsn: dsn,
- }
-
- client.setupTransport()
- client.setupIntegrations()
-
- return &client, nil
-}
-
-func (client *Client) setupTransport() {
- transport := client.options.Transport
-
- if transport == nil {
- if client.options.Dsn == "" {
- transport = new(noopTransport)
- } else {
- transport = NewHTTPTransport()
- }
- }
-
- transport.Configure(client.options)
- client.Transport = transport
-}
-
-func (client *Client) setupIntegrations() {
- integrations := []Integration{
- new(contextifyFramesIntegration),
- new(environmentIntegration),
- new(modulesIntegration),
- new(ignoreErrorsIntegration),
- }
-
- if client.options.Integrations != nil {
- integrations = client.options.Integrations(integrations)
- }
-
- for _, integration := range integrations {
- if client.integrationAlreadyInstalled(integration.Name()) {
- Logger.Printf("Integration %s is already installed\n", integration.Name())
- continue
- }
- client.integrations = append(client.integrations, integration)
- integration.SetupOnce(client)
- Logger.Printf("Integration installed: %s\n", integration.Name())
- }
-}
-
-// AddEventProcessor adds an event processor to the client.
-func (client *Client) AddEventProcessor(processor EventProcessor) {
- client.eventProcessors = append(client.eventProcessors, processor)
-}
-
-// Options return `ClientOptions` for the current `Client`.
-func (client Client) Options() ClientOptions {
- return client.options
-}
-
-// CaptureMessage captures an arbitrary message.
-func (client *Client) CaptureMessage(message string, hint *EventHint, scope EventModifier) *EventID {
- event := client.eventFromMessage(message, LevelInfo)
- return client.CaptureEvent(event, hint, scope)
-}
-
-// CaptureException captures an error.
-func (client *Client) CaptureException(exception error, hint *EventHint, scope EventModifier) *EventID {
- event := client.eventFromException(exception, LevelError)
- return client.CaptureEvent(event, hint, scope)
-}
-
-// CaptureEvent captures an event on the currently active client if any.
-//
-// The event must already be assembled. Typically code would instead use
-// the utility methods like `CaptureException`. The return value is the
-// event ID. In case Sentry is disabled or event was dropped, the return value will be nil.
-func (client *Client) CaptureEvent(event *Event, hint *EventHint, scope EventModifier) *EventID {
- return client.processEvent(event, hint, scope)
-}
-
-// Recover captures a panic.
-// Returns `EventID` if successfully, or `nil` if there's no error to recover from.
-func (client *Client) Recover(err interface{}, hint *EventHint, scope EventModifier) *EventID {
- if err == nil {
- err = recover()
- }
-
- if err != nil {
- if err, ok := err.(error); ok {
- event := client.eventFromException(err, LevelFatal)
- return client.CaptureEvent(event, hint, scope)
- }
-
- if err, ok := err.(string); ok {
- event := client.eventFromMessage(err, LevelFatal)
- return client.CaptureEvent(event, hint, scope)
- }
- }
-
- return nil
-}
-
-// Recover captures a panic and passes relevant context object.
-// Returns `EventID` if successfully, or `nil` if there's no error to recover from.
-func (client *Client) RecoverWithContext(
- ctx context.Context,
- err interface{},
- hint *EventHint,
- scope EventModifier,
-) *EventID {
- if err == nil {
- err = recover()
- }
-
- if err != nil {
- if hint.Context == nil && ctx != nil {
- hint.Context = ctx
- }
-
- if err, ok := err.(error); ok {
- event := client.eventFromException(err, LevelFatal)
- return client.CaptureEvent(event, hint, scope)
- }
-
- if err, ok := err.(string); ok {
- event := client.eventFromMessage(err, LevelFatal)
- return client.CaptureEvent(event, hint, scope)
- }
- }
-
- return nil
-}
-
-// Flush waits until the underlying Transport sends any buffered events to the
-// Sentry server, blocking for at most the given timeout. It returns false if
-// the timeout was reached. In that case, some events may not have been sent.
-//
-// Flush should be called before terminating the program to avoid
-// unintentionally dropping events.
-//
-// Do not call Flush indiscriminately after every call to CaptureEvent,
-// CaptureException or CaptureMessage. Instead, to have the SDK send events over
-// the network synchronously, configure it to use the HTTPSyncTransport in the
-// call to Init.
-func (client *Client) Flush(timeout time.Duration) bool {
- return client.Transport.Flush(timeout)
-}
-
-func (client *Client) eventFromMessage(message string, level Level) *Event {
- event := NewEvent()
- event.Level = level
- event.Message = message
-
- if client.Options().AttachStacktrace {
- event.Threads = []Thread{{
- Stacktrace: NewStacktrace(),
- Crashed: false,
- Current: true,
- }}
- }
-
- return event
-}
-
-func (client *Client) eventFromException(exception error, level Level) *Event {
- err := exception
- if err == nil {
- err = usageError{fmt.Errorf("%s called with nil error", callerFunctionName())}
- }
-
- event := NewEvent()
- event.Level = level
-
- for i := 0; i < maxErrorDepth && err != nil; i++ {
- event.Exception = append(event.Exception, Exception{
- Value: err.Error(),
- Type: reflect.TypeOf(err).String(),
- Stacktrace: ExtractStacktrace(err),
- })
- switch previous := err.(type) {
- case interface{ Unwrap() error }:
- err = previous.Unwrap()
- case interface{ Cause() error }:
- err = previous.Cause()
- default:
- err = nil
- }
- }
-
- // Add a trace of the current stack to the most recent error in a chain if
- // it doesn't have a stack trace yet.
- // We only add to the most recent error to avoid duplication and because the
- // current stack is most likely unrelated to errors deeper in the chain.
- if event.Exception[0].Stacktrace == nil {
- event.Exception[0].Stacktrace = NewStacktrace()
- }
-
- // event.Exception should be sorted such that the most recent error is last.
- reverse(event.Exception)
-
- return event
-}
-
-// reverse reverses the slice a in place.
-func reverse(a []Exception) {
- for i := len(a)/2 - 1; i >= 0; i-- {
- opp := len(a) - 1 - i
- a[i], a[opp] = a[opp], a[i]
- }
-}
-
-func (client *Client) processEvent(event *Event, hint *EventHint, scope EventModifier) *EventID {
- options := client.Options()
-
- // TODO: Reconsider if its worth going away from default implementation
- // of other SDKs. In Go zero value (default) for float32 is 0.0,
- // which means that if someone uses ClientOptions{} struct directly
- // and we would not check for 0 here, we'd skip all events by default
- if options.SampleRate != 0.0 {
- randomFloat := rand.New(rand.NewSource(time.Now().UnixNano())).Float64()
- if randomFloat > options.SampleRate {
- Logger.Println("Event dropped due to SampleRate hit.")
- return nil
- }
- }
-
- if event = client.prepareEvent(event, hint, scope); event == nil {
- return nil
- }
-
- if options.BeforeSend != nil {
- h := &EventHint{}
- if hint != nil {
- h = hint
- }
- if event = options.BeforeSend(event, h); event == nil {
- Logger.Println("Event dropped due to BeforeSend callback.")
- return nil
- }
- }
-
- client.Transport.SendEvent(event)
-
- return &event.EventID
-}
-
-func (client *Client) prepareEvent(event *Event, hint *EventHint, scope EventModifier) *Event {
- if event.EventID == "" {
- event.EventID = EventID(uuid())
- }
-
- if event.Timestamp.IsZero() {
- event.Timestamp = time.Now().UTC()
- }
-
- if event.Level == "" {
- event.Level = LevelInfo
- }
-
- if event.ServerName == "" {
- if client.Options().ServerName != "" {
- event.ServerName = client.Options().ServerName
- } else if hostname, err := os.Hostname(); err == nil {
- event.ServerName = hostname
- }
- }
-
- if event.Release == "" && client.Options().Release != "" {
- event.Release = client.Options().Release
- }
-
- if event.Dist == "" && client.Options().Dist != "" {
- event.Dist = client.Options().Dist
- }
-
- if event.Environment == "" && client.Options().Environment != "" {
- event.Environment = client.Options().Environment
- }
-
- event.Platform = "go"
- event.Sdk = SdkInfo{
- Name: "sentry.go",
- Version: Version,
- Integrations: client.listIntegrations(),
- Packages: []SdkPackage{{
- Name: "sentry-go",
- Version: Version,
- }},
- }
-
- if scope != nil {
- event = scope.ApplyToEvent(event, hint)
- if event == nil {
- return nil
- }
- }
-
- for _, processor := range client.eventProcessors {
- id := event.EventID
- event = processor(event, hint)
- if event == nil {
- Logger.Printf("Event dropped by one of the Client EventProcessors: %s\n", id)
- return nil
- }
- }
-
- for _, processor := range globalEventProcessors {
- id := event.EventID
- event = processor(event, hint)
- if event == nil {
- Logger.Printf("Event dropped by one of the Global EventProcessors: %s\n", id)
- return nil
- }
- }
-
- return event
-}
-
-func (client Client) listIntegrations() []string {
- integrations := make([]string, 0, len(client.integrations))
- for _, integration := range client.integrations {
- integrations = append(integrations, integration.Name())
- }
- sort.Strings(integrations)
- return integrations
-}
-
-func (client Client) integrationAlreadyInstalled(name string) bool {
- for _, integration := range client.integrations {
- if integration.Name() == name {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/getsentry/sentry-go/dsn.go b/vendor/github.com/getsentry/sentry-go/dsn.go
deleted file mode 100644
index 59946845d..000000000
--- a/vendor/github.com/getsentry/sentry-go/dsn.go
+++ /dev/null
@@ -1,188 +0,0 @@
-package sentry
-
-import (
- "encoding/json"
- "fmt"
- "net/url"
- "strconv"
- "strings"
- "time"
-)
-
-type scheme string
-
-const (
- schemeHTTP scheme = "http"
- schemeHTTPS scheme = "https"
-)
-
-func (scheme scheme) defaultPort() int {
- switch scheme {
- case schemeHTTPS:
- return 443
- case schemeHTTP:
- return 80
- default:
- return 80
- }
-}
-
-type DsnParseError struct {
- Message string
-}
-
-func (e DsnParseError) Error() string {
- return "[Sentry] DsnParseError: " + e.Message
-}
-
-// Dsn is used as the remote address source to client transport.
-type Dsn struct {
- scheme scheme
- publicKey string
- secretKey string
- host string
- port int
- path string
- projectID int
-}
-
-// NewDsn creates an instance of `Dsn` by parsing provided url in a `string` format.
-// If Dsn is not set the client is effectively disabled.
-func NewDsn(rawURL string) (*Dsn, error) {
- // Parse
- parsedURL, err := url.Parse(rawURL)
- if err != nil {
- return nil, &DsnParseError{fmt.Sprintf("invalid url: %v", err)}
- }
-
- // Scheme
- var scheme scheme
- switch parsedURL.Scheme {
- case "http":
- scheme = schemeHTTP
- case "https":
- scheme = schemeHTTPS
- default:
- return nil, &DsnParseError{"invalid scheme"}
- }
-
- // PublicKey
- publicKey := parsedURL.User.Username()
- if publicKey == "" {
- return nil, &DsnParseError{"empty username"}
- }
-
- // SecretKey
- var secretKey string
- if parsedSecretKey, ok := parsedURL.User.Password(); ok {
- secretKey = parsedSecretKey
- }
-
- // Host
- host := parsedURL.Hostname()
- if host == "" {
- return nil, &DsnParseError{"empty host"}
- }
-
- // Port
- var port int
- if parsedURL.Port() != "" {
- parsedPort, err := strconv.Atoi(parsedURL.Port())
- if err != nil {
- return nil, &DsnParseError{"invalid port"}
- }
- port = parsedPort
- } else {
- port = scheme.defaultPort()
- }
-
- // ProjectID
- if len(parsedURL.Path) == 0 || parsedURL.Path == "/" {
- return nil, &DsnParseError{"empty project id"}
- }
- pathSegments := strings.Split(parsedURL.Path[1:], "/")
- projectID, err := strconv.Atoi(pathSegments[len(pathSegments)-1])
- if err != nil {
- return nil, &DsnParseError{"invalid project id"}
- }
-
- // Path
- var path string
- if len(pathSegments) > 1 {
- path = "/" + strings.Join(pathSegments[0:len(pathSegments)-1], "/")
- }
-
- return &Dsn{
- scheme: scheme,
- publicKey: publicKey,
- secretKey: secretKey,
- host: host,
- port: port,
- path: path,
- projectID: projectID,
- }, nil
-}
-
-// String formats Dsn struct into a valid string url
-func (dsn Dsn) String() string {
- var url string
- url += fmt.Sprintf("%s://%s", dsn.scheme, dsn.publicKey)
- if dsn.secretKey != "" {
- url += fmt.Sprintf(":%s", dsn.secretKey)
- }
- url += fmt.Sprintf("@%s", dsn.host)
- if dsn.port != dsn.scheme.defaultPort() {
- url += fmt.Sprintf(":%d", dsn.port)
- }
- if dsn.path != "" {
- url += dsn.path
- }
- url += fmt.Sprintf("/%d", dsn.projectID)
- return url
-}
-
-// StoreAPIURL returns assembled url to be used in the transport.
-// It points to configures Sentry instance.
-func (dsn Dsn) StoreAPIURL() *url.URL {
- var rawURL string
- rawURL += fmt.Sprintf("%s://%s", dsn.scheme, dsn.host)
- if dsn.port != dsn.scheme.defaultPort() {
- rawURL += fmt.Sprintf(":%d", dsn.port)
- }
- if dsn.path != "" {
- rawURL += dsn.path
- }
- rawURL += fmt.Sprintf("/api/%d/store/", dsn.projectID)
- parsedURL, _ := url.Parse(rawURL)
- return parsedURL
-}
-
-// RequestHeaders returns all the necessary headers that have to be used in the transport.
-func (dsn Dsn) RequestHeaders() map[string]string {
- auth := fmt.Sprintf("Sentry sentry_version=%s, sentry_timestamp=%d, "+
- "sentry_client=sentry.go/%s, sentry_key=%s", apiVersion, time.Now().Unix(), Version, dsn.publicKey)
-
- if dsn.secretKey != "" {
- auth = fmt.Sprintf("%s, sentry_secret=%s", auth, dsn.secretKey)
- }
-
- return map[string]string{
- "Content-Type": "application/json",
- "X-Sentry-Auth": auth,
- }
-}
-
-func (dsn Dsn) MarshalJSON() ([]byte, error) {
- return json.Marshal(dsn.String())
-}
-
-func (dsn *Dsn) UnmarshalJSON(data []byte) error {
- var str string
- _ = json.Unmarshal(data, &str)
- newDsn, err := NewDsn(str)
- if err != nil {
- return err
- }
- *dsn = *newDsn
- return nil
-}
diff --git a/vendor/github.com/getsentry/sentry-go/echo/README.md b/vendor/github.com/getsentry/sentry-go/echo/README.md
deleted file mode 100644
index eb8546f26..000000000
--- a/vendor/github.com/getsentry/sentry-go/echo/README.md
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
-# Official Sentry Echo Handler for Sentry-go SDK
-
-**Godoc:** https://godoc.org/github.com/getsentry/sentry-go/echo
-
-**Example:** https://github.com/getsentry/sentry-go/tree/master/example/echo
-
-## Installation
-
-```sh
-go get github.com/getsentry/sentry-go/echo
-```
-
-```go
-import (
- "fmt"
- "net/http"
-
- "github.com/getsentry/sentry-go"
- sentryecho "github.com/getsentry/sentry-go/echo"
- "github.com/labstack/echo/v4"
- "github.com/labstack/echo/v4/middleware"
-)
-
-// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
-if err := sentry.Init(sentry.ClientOptions{
- Dsn: "your-public-dsn",
-}); err != nil {
- fmt.Printf("Sentry initialization failed: %v\n", err)
-}
-
-// Then create your app
-app := echo.New()
-
-app.Use(middleware.Logger())
-app.Use(middleware.Recover())
-
-// Once it's done, you can attach the handler as one of your middleware
-app.Use(sentryecho.New(sentryecho.Options{}))
-
-// Set up routes
-app.GET("/", func(ctx echo.Context) error {
- return ctx.String(http.StatusOK, "Hello, World!")
-})
-
-// And run it
-app.Logger.Fatal(app.Start(":3000"))
-```
-
-## Configuration
-
-`sentryecho` accepts a struct of `Options` that allows you to configure how the handler will behave.
-
-Currently it respects 3 options:
-
-```go
-// Repanic configures whether Sentry should repanic after recovery, in most cases it should be set to true,
-// as echo includes its own Recover middleware that handles http responses.
-Repanic bool
-// WaitForDelivery configures whether you want to block the request before moving forward with the response.
-// Because Echo's `Recover` handler doesn't restart the application,
-// it's safe to either skip this option or set it to `false`.
-WaitForDelivery bool
-// Timeout for the event delivery requests.
-Timeout time.Duration
-```
-
-## Usage
-
-`sentryecho` attaches an instance of `*sentry.Hub` (https://godoc.org/github.com/getsentry/sentry-go#Hub) to the `echo.Context`, which makes it available throughout the rest of the request's lifetime.
-You can access it by using the `sentryecho.GetHubFromContext()` method on the context itself in any of your proceeding middleware and routes.
-And it should be used instead of the global `sentry.CaptureMessage`, `sentry.CaptureException`, or any other calls, as it keeps the separation of data between the requests.
-
-**Keep in mind that `*sentry.Hub` won't be available in middleware attached before to `sentryecho`!**
-
-```go
-app := echo.New()
-
-app.Use(middleware.Logger())
-app.Use(middleware.Recover())
-
-app.Use(sentryecho.New(sentryecho.Options{
- Repanic: true,
-}))
-
-app.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(ctx echo.Context) error {
- if hub := sentryecho.GetHubFromContext(ctx); hub != nil {
- hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
- }
- return next(ctx)
- }
-})
-
-app.GET("/", func(ctx echo.Context) error {
- if hub := sentryecho.GetHubFromContext(ctx); hub != nil {
- hub.WithScope(func(scope *sentry.Scope) {
- scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
- hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
- })
- }
- return ctx.String(http.StatusOK, "Hello, World!")
-})
-
-app.GET("/foo", func(ctx echo.Context) error {
- // sentryecho handler will catch it just fine. Also, because we attached "someRandomTag"
- // in the middleware before, it will be sent through as well
- panic("y tho")
-})
-
-app.Logger.Fatal(app.Start(":3000"))
-```
-
-### Accessing Request in `BeforeSend` callback
-
-```go
-sentry.Init(sentry.ClientOptions{
- Dsn: "your-public-dsn",
- BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
- if hint.Context != nil {
- if req, ok := hint.Context.Value(sentry.RequestContextKey).(*http.Request); ok {
- // You have access to the original Request here
- }
- }
-
- return event
- },
-})
-```
diff --git a/vendor/github.com/getsentry/sentry-go/echo/sentryecho.go b/vendor/github.com/getsentry/sentry-go/echo/sentryecho.go
deleted file mode 100644
index a38521b43..000000000
--- a/vendor/github.com/getsentry/sentry-go/echo/sentryecho.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package sentryecho
-
-import (
- "context"
- "net/http"
- "time"
-
- "github.com/getsentry/sentry-go"
- "github.com/labstack/echo/v4"
-)
-
-const valuesKey = "sentry"
-
-type handler struct {
- repanic bool
- waitForDelivery bool
- timeout time.Duration
-}
-
-type Options struct {
- // Repanic configures whether Sentry should repanic after recovery, in most cases it should be set to true,
- // as echo includes it's own Recover middleware what handles http responses.
- Repanic bool
- // WaitForDelivery configures whether you want to block the request before moving forward with the response.
- // Because Echo's `Recover` handler doesn't restart the application,
- // it's safe to either skip this option or set it to `false`.
- WaitForDelivery bool
- // Timeout for the event delivery requests.
- Timeout time.Duration
-}
-
-// New returns a function that satisfies echo.HandlerFunc interface
-// It can be used with Use() methods.
-func New(options Options) echo.MiddlewareFunc {
- handler := handler{
- repanic: false,
- timeout: time.Second * 2,
- waitForDelivery: false,
- }
-
- if options.Repanic {
- handler.repanic = true
- }
-
- if options.Timeout != 0 {
- handler.timeout = options.Timeout
- }
-
- if options.WaitForDelivery {
- handler.waitForDelivery = true
- }
-
- return handler.handle
-}
-
-func (h *handler) handle(next echo.HandlerFunc) echo.HandlerFunc {
- return func(ctx echo.Context) error {
- hub := sentry.CurrentHub().Clone()
- hub.Scope().SetRequest(ctx.Request())
- ctx.Set(valuesKey, hub)
- defer h.recoverWithSentry(hub, ctx.Request())
- return next(ctx)
- }
-}
-
-func (h *handler) recoverWithSentry(hub *sentry.Hub, r *http.Request) {
- if err := recover(); err != nil {
- eventID := hub.RecoverWithContext(
- context.WithValue(r.Context(), sentry.RequestContextKey, r),
- err,
- )
- if eventID != nil && h.waitForDelivery {
- hub.Flush(h.timeout)
- }
- if h.repanic {
- panic(err)
- }
- }
-}
-
-// GetHubFromContext retrieves attached *sentry.Hub instance from echo.Context.
-func GetHubFromContext(ctx echo.Context) *sentry.Hub {
- if hub, ok := ctx.Get(valuesKey).(*sentry.Hub); ok {
- return hub
- }
- return nil
-}
diff --git a/vendor/github.com/getsentry/sentry-go/go.mod b/vendor/github.com/getsentry/sentry-go/go.mod
deleted file mode 100644
index 15a7a32ee..000000000
--- a/vendor/github.com/getsentry/sentry-go/go.mod
+++ /dev/null
@@ -1,35 +0,0 @@
-module github.com/getsentry/sentry-go
-
-go 1.12
-
-require (
- github.com/ajg/form v1.5.1 // indirect
- github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
- github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 // indirect
- github.com/gin-gonic/gin v1.4.0
- github.com/go-errors/errors v1.0.1
- github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab
- github.com/google/go-cmp v0.4.0
- github.com/google/go-querystring v1.0.0 // indirect
- github.com/imkira/go-interpol v1.1.0 // indirect
- github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
- github.com/kataras/iris/v12 v12.0.1
- github.com/labstack/echo/v4 v4.1.11
- github.com/moul/http2curl v1.0.0 // indirect
- github.com/onsi/ginkgo v1.10.3 // indirect
- github.com/onsi/gomega v1.7.1 // indirect
- github.com/pingcap/errors v0.11.4
- github.com/pkg/errors v0.8.1
- github.com/sergi/go-diff v1.0.0 // indirect
- github.com/smartystreets/goconvey v1.6.4 // indirect
- github.com/ugorji/go v1.1.7 // indirect
- github.com/urfave/negroni v1.0.0
- github.com/valyala/fasthttp v1.6.0
- github.com/xeipuuv/gojsonschema v1.2.0 // indirect
- github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
- github.com/yudai/gojsondiff v1.0.0 // indirect
- github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
- github.com/yudai/pp v2.0.1+incompatible // indirect
-)
-
-replace github.com/ugorji/go v1.1.4 => github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43
diff --git a/vendor/github.com/getsentry/sentry-go/go.sum b/vendor/github.com/getsentry/sentry-go/go.sum
deleted file mode 100644
index 1dd2b6cd4..000000000
--- a/vendor/github.com/getsentry/sentry-go/go.sum
+++ /dev/null
@@ -1,250 +0,0 @@
-github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
-github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a h1:3SgJcK9l5uPdBC/X17wanyJAMxM33+4ZhEIV96MIH8U=
-github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw=
-github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible h1:rZgFj+Gtf3NMi/U5FvCvhzaxzW/TaPYgUYx3bAPz9DE=
-github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w=
-github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc=
-github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
-github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7 h1:mreN1m/5VJ/Zc3b4pzj9qU6D9SRQ6Vm+3KfI328t3S8=
-github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM=
-github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398 h1:WDC6ySpJzbxGWFh4aMxFFC28wwGp5pEuoTtvA4q/qQ4=
-github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
-github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
-github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
-github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
-github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible h1:Ppm0npCCsmuR9oQaBtRuZcmILVE74aXE+AmrJj8L2ns=
-github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
-github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
-github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
-github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
-github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
-github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
-github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
-github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o=
-github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
-github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
-github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 h1:DddqAaWDpywytcG8w/qoQ5sAN8X12d3Z3koB0C3Rxsc=
-github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
-github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
-github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
-github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4 h1:GY1+t5Dr9OKADM64SYnQjw/w99HMYvQ0A8/JoUkxVmc=
-github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA=
-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8=
-github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc=
-github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 h1:t8FVkw33L+wilf2QiWkw0UV77qRpcH/JHPKGpKa2E8g=
-github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
-github.com/gin-gonic/gin v1.4.0 h1:3tMoCCfM7ppqsR0ptz/wi1impNpT7/9wQtMZ8lr1mCQ=
-github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
-github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI=
-github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
-github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
-github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
-github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk=
-github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
-github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
-github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
-github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
-github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
-github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
-github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
-github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
-github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk=
-github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
-github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/iris-contrib/blackfriday v2.0.0+incompatible h1:o5sHQHHm0ToHUlAJSTjW9UWicjJSDDauOOQ2AHuIVp4=
-github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI=
-github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
-github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI=
-github.com/iris-contrib/schema v0.0.1 h1:10g/WnoRR+U+XXHWKBHeNy/+tZmM2kcAVGLOsz+yaDA=
-github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
-github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
-github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
-github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
-github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
-github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 h1:rhqTjzJlm7EbkELJDKMTU7udov+Se0xZkWmugr6zGok=
-github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q=
-github.com/juju/loggo v0.0.0-20180524022052-584905176618 h1:MK144iBQF9hTSwBW/9eJm034bVoG30IshVm688T2hi8=
-github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U=
-github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073 h1:WQM1NildKThwdP7qWrNAFGzp4ijNLw8RlgENkaI4MJs=
-github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA=
-github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM=
-github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
-github.com/kataras/golog v0.0.9 h1:J7Dl82843nbKQDrQM/abbNJZvQjS6PfmkkffhOTXEpM=
-github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk=
-github.com/kataras/iris/v12 v12.0.1 h1:Wo5S7GMWv5OAzJmvFTvss/C4TS1W0uo6LkDlSymT4rM=
-github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U=
-github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw=
-github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d h1:V5Rs9ztEWdp58oayPq/ulmlqJJZeJP6pP79uP3qjcao=
-github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0=
-github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
-github.com/klauspost/compress v1.9.0 h1:GhthINjveNZAdFUD8QoQYfjxnOONZgztK/Yr6M23UTY=
-github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
-github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/labstack/echo/v4 v4.1.11 h1:z0BZoArY4FqdpUEl+wlHp4hnr/oSR6MTmQmv8OHSoww=
-github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
-github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0=
-github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
-github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
-github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
-github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg=
-github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
-github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
-github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg=
-github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ=
-github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s=
-github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
-github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs=
-github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
-github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM=
-github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4=
-github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY=
-github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ=
-github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
-github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
-github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
-github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
-github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s=
-github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
-github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
-github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
-github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
-github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
-github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
-github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
-github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
-github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
-github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
-github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/ugorji/go v1.1.2/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
-github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
-github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
-github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648=
-github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
-github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43 h1:BasDe+IErOQKrMVXab7UayvSlIpiyGwRvuX3EKYY7UA=
-github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43/go.mod h1:iT03XoTwV7xq/+UGwKO3UbC1nNNlopQiY61beSdrtOA=
-github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
-github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
-github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
-github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
-github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
-github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasthttp v1.6.0 h1:uWF8lgKmeaIewWVPwi4GRq2P6+R46IgYZdxWtM+GtEY=
-github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w=
-github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
-github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
-github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
-github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
-github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
-github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
-github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY=
-github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI=
-github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA=
-github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=
-github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M=
-github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
-github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI=
-github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
-golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
-golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
-gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
-gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ=
-gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
-gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU=
-gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/getsentry/sentry-go/hub.go b/vendor/github.com/getsentry/sentry-go/hub.go
deleted file mode 100644
index 9394fc47d..000000000
--- a/vendor/github.com/getsentry/sentry-go/hub.go
+++ /dev/null
@@ -1,364 +0,0 @@
-package sentry
-
-import (
- "context"
- "sync"
- "time"
-)
-
-type contextKey int
-
-// HubContextKey is a context key used to store Hub on any context.Context type
-const HubContextKey = contextKey(1)
-
-// RequestContextKey is a context key used to store http.Request on the context passed to RecoverWithContext
-const RequestContextKey = contextKey(2)
-
-// Default maximum number of breadcrumbs added to an event. Can be overwritten `maxBreadcrumbs` option.
-const defaultMaxBreadcrumbs = 30
-
-// Absolute maximum number of breadcrumbs added to an event.
-// The `maxBreadcrumbs` option cannot be higher than this value.
-const maxBreadcrumbs = 100
-
-// Initial instance of the Hub that has no `Client` bound and an empty `Scope`
-var currentHub = NewHub(nil, NewScope()) //nolint: gochecknoglobals
-
-// Hub is the central object that manages scopes and clients.
-//
-// This can be used to capture events and manage the scope.
-// The default hub that is available automatically.
-//
-// In most situations developers do not need to interface the hub. Instead
-// toplevel convenience functions are exposed that will automatically dispatch
-// to global (`CurrentHub`) hub. In some situations this might not be
-// possible in which case it might become necessary to manually work with the
-// hub. This is for instance the case when working with async code.
-type Hub struct {
- mu sync.RWMutex
- stack *stack
- lastEventID EventID
-}
-
-type layer struct {
- // mu protects concurrent reads and writes to client.
- mu sync.RWMutex
- client *Client
- // scope is read-only, not protected by mu.
- scope *Scope
-}
-
-// Client returns the layer's client. Safe for concurrent use.
-func (l *layer) Client() *Client {
- l.mu.RLock()
- defer l.mu.RUnlock()
- return l.client
-}
-
-// SetClient sets the layer's client. Safe for concurrent use.
-func (l *layer) SetClient(c *Client) {
- l.mu.Lock()
- defer l.mu.Unlock()
- l.client = c
-}
-
-type stack []*layer
-
-// NewHub returns an instance of a `Hub` with provided `Client` and `Scope` bound.
-func NewHub(client *Client, scope *Scope) *Hub {
- hub := Hub{
- stack: &stack{{
- client: client,
- scope: scope,
- }},
- }
- return &hub
-}
-
-// CurrentHub returns an instance of previously initialized `Hub` stored in the global namespace.
-func CurrentHub() *Hub {
- return currentHub
-}
-
-// LastEventID returns an ID of last captured event for the current `Hub`.
-func (hub *Hub) LastEventID() EventID {
- return hub.lastEventID
-}
-
-func (hub *Hub) stackTop() *layer {
- hub.mu.RLock()
- defer hub.mu.RUnlock()
-
- stack := hub.stack
- if stack == nil {
- return nil
- }
-
- stackLen := len(*stack)
- if stackLen == 0 {
- return nil
- }
- top := (*stack)[stackLen-1]
-
- return top
-}
-
-// Clone returns a copy of the current Hub with top-most scope and client copied over.
-func (hub *Hub) Clone() *Hub {
- top := hub.stackTop()
- if top == nil {
- return nil
- }
- scope := top.scope
- if scope != nil {
- scope = scope.Clone()
- }
- return NewHub(top.Client(), scope)
-}
-
-// Scope returns top-level `Scope` of the current `Hub` or `nil` if no `Scope` is bound.
-func (hub *Hub) Scope() *Scope {
- top := hub.stackTop()
- if top == nil {
- return nil
- }
- return top.scope
-}
-
-// Scope returns top-level `Client` of the current `Hub` or `nil` if no `Client` is bound.
-func (hub *Hub) Client() *Client {
- top := hub.stackTop()
- if top == nil {
- return nil
- }
- return top.Client()
-}
-
-// PushScope pushes a new scope for the current `Hub` and reuses previously bound `Client`.
-func (hub *Hub) PushScope() *Scope {
- top := hub.stackTop()
-
- var client *Client
- if top != nil {
- client = top.Client()
- }
-
- var scope *Scope
- if top != nil && top.scope != nil {
- scope = top.scope.Clone()
- } else {
- scope = NewScope()
- }
-
- hub.mu.Lock()
- defer hub.mu.Unlock()
-
- *hub.stack = append(*hub.stack, &layer{
- client: client,
- scope: scope,
- })
-
- return scope
-}
-
-// PushScope pops the most recent scope for the current `Hub`.
-func (hub *Hub) PopScope() {
- hub.mu.Lock()
- defer hub.mu.Unlock()
-
- stack := *hub.stack
- stackLen := len(stack)
- if stackLen > 0 {
- *hub.stack = stack[0 : stackLen-1]
- }
-}
-
-// BindClient binds a new `Client` for the current `Hub`.
-func (hub *Hub) BindClient(client *Client) {
- top := hub.stackTop()
- if top != nil {
- top.SetClient(client)
- }
-}
-
-// WithScope temporarily pushes a scope for a single call.
-//
-// A shorthand for:
-// PushScope()
-// f(scope)
-// PopScope()
-func (hub *Hub) WithScope(f func(scope *Scope)) {
- scope := hub.PushScope()
- defer hub.PopScope()
- f(scope)
-}
-
-// ConfigureScope invokes a function that can modify the current scope.
-//
-// The function is passed a mutable reference to the `Scope` so that modifications
-// can be performed.
-func (hub *Hub) ConfigureScope(f func(scope *Scope)) {
- scope := hub.Scope()
- f(scope)
-}
-
-// CaptureEvent calls the method of a same name on currently bound `Client` instance
-// passing it a top-level `Scope`.
-// Returns `EventID` if successfully, or `nil` if there's no `Scope` or `Client` available.
-func (hub *Hub) CaptureEvent(event *Event) *EventID {
- client, scope := hub.Client(), hub.Scope()
- if client == nil || scope == nil {
- return nil
- }
- eventID := client.CaptureEvent(event, nil, scope)
- if eventID != nil {
- hub.lastEventID = *eventID
- } else {
- hub.lastEventID = ""
- }
- return eventID
-}
-
-// CaptureMessage calls the method of a same name on currently bound `Client` instance
-// passing it a top-level `Scope`.
-// Returns `EventID` if successfully, or `nil` if there's no `Scope` or `Client` available.
-func (hub *Hub) CaptureMessage(message string) *EventID {
- client, scope := hub.Client(), hub.Scope()
- if client == nil || scope == nil {
- return nil
- }
- eventID := client.CaptureMessage(message, nil, scope)
- if eventID != nil {
- hub.lastEventID = *eventID
- } else {
- hub.lastEventID = ""
- }
- return eventID
-}
-
-// CaptureException calls the method of a same name on currently bound `Client` instance
-// passing it a top-level `Scope`.
-// Returns `EventID` if successfully, or `nil` if there's no `Scope` or `Client` available.
-func (hub *Hub) CaptureException(exception error) *EventID {
- client, scope := hub.Client(), hub.Scope()
- if client == nil || scope == nil {
- return nil
- }
- eventID := client.CaptureException(exception, &EventHint{OriginalException: exception}, scope)
- if eventID != nil {
- hub.lastEventID = *eventID
- } else {
- hub.lastEventID = ""
- }
- return eventID
-}
-
-// AddBreadcrumb records a new breadcrumb.
-//
-// The total number of breadcrumbs that can be recorded are limited by the
-// configuration on the client.
-func (hub *Hub) AddBreadcrumb(breadcrumb *Breadcrumb, hint *BreadcrumbHint) {
- client := hub.Client()
-
- // If there's no client, just store it on the scope straight away
- if client == nil {
- hub.Scope().AddBreadcrumb(breadcrumb, maxBreadcrumbs)
- return
- }
-
- options := client.Options()
- max := defaultMaxBreadcrumbs
-
- if options.MaxBreadcrumbs != 0 {
- max = options.MaxBreadcrumbs
- }
-
- if max < 0 {
- return
- }
-
- if options.BeforeBreadcrumb != nil {
- h := &BreadcrumbHint{}
- if hint != nil {
- h = hint
- }
- if breadcrumb = options.BeforeBreadcrumb(breadcrumb, h); breadcrumb == nil {
- Logger.Println("breadcrumb dropped due to BeforeBreadcrumb callback.")
- return
- }
- }
-
- if max > maxBreadcrumbs {
- max = maxBreadcrumbs
- }
- hub.Scope().AddBreadcrumb(breadcrumb, max)
-}
-
-// Recover calls the method of a same name on currently bound `Client` instance
-// passing it a top-level `Scope`.
-// Returns `EventID` if successfully, or `nil` if there's no `Scope` or `Client` available.
-func (hub *Hub) Recover(err interface{}) *EventID {
- if err == nil {
- err = recover()
- }
- client, scope := hub.Client(), hub.Scope()
- if client == nil || scope == nil {
- return nil
- }
- return client.Recover(err, &EventHint{RecoveredException: err}, scope)
-}
-
-// RecoverWithContext calls the method of a same name on currently bound `Client` instance
-// passing it a top-level `Scope`.
-// Returns `EventID` if successfully, or `nil` if there's no `Scope` or `Client` available.
-func (hub *Hub) RecoverWithContext(ctx context.Context, err interface{}) *EventID {
- if err == nil {
- err = recover()
- }
- client, scope := hub.Client(), hub.Scope()
- if client == nil || scope == nil {
- return nil
- }
- return client.RecoverWithContext(ctx, err, &EventHint{RecoveredException: err}, scope)
-}
-
-// Flush waits until the underlying Transport sends any buffered events to the
-// Sentry server, blocking for at most the given timeout. It returns false if
-// the timeout was reached. In that case, some events may not have been sent.
-//
-// Flush should be called before terminating the program to avoid
-// unintentionally dropping events.
-//
-// Do not call Flush indiscriminately after every call to CaptureEvent,
-// CaptureException or CaptureMessage. Instead, to have the SDK send events over
-// the network synchronously, configure it to use the HTTPSyncTransport in the
-// call to Init.
-func (hub *Hub) Flush(timeout time.Duration) bool {
- client := hub.Client()
-
- if client == nil {
- return false
- }
-
- return client.Flush(timeout)
-}
-
-// HasHubOnContext checks whether `Hub` instance is bound to a given `Context` struct.
-func HasHubOnContext(ctx context.Context) bool {
- _, ok := ctx.Value(HubContextKey).(*Hub)
- return ok
-}
-
-// GetHubFromContext tries to retrieve `Hub` instance from the given `Context` struct
-// or return `nil` if one is not found.
-func GetHubFromContext(ctx context.Context) *Hub {
- if hub, ok := ctx.Value(HubContextKey).(*Hub); ok {
- return hub
- }
- return nil
-}
-
-// SetHubOnContext stores given `Hub` instance on the `Context` struct and returns a new `Context`.
-func SetHubOnContext(ctx context.Context, hub *Hub) context.Context {
- return context.WithValue(ctx, HubContextKey, hub)
-}
diff --git a/vendor/github.com/getsentry/sentry-go/integrations.go b/vendor/github.com/getsentry/sentry-go/integrations.go
deleted file mode 100644
index eb11aa977..000000000
--- a/vendor/github.com/getsentry/sentry-go/integrations.go
+++ /dev/null
@@ -1,271 +0,0 @@
-package sentry
-
-import (
- "fmt"
- "regexp"
- "runtime"
- "runtime/debug"
- "strings"
- "sync"
-)
-
-// ================================
-// Modules Integration
-// ================================
-
-type modulesIntegration struct {
- once sync.Once
- modules map[string]string
-}
-
-func (mi *modulesIntegration) Name() string {
- return "Modules"
-}
-
-func (mi *modulesIntegration) SetupOnce(client *Client) {
- client.AddEventProcessor(mi.processor)
-}
-
-func (mi *modulesIntegration) processor(event *Event, hint *EventHint) *Event {
- if len(event.Modules) == 0 {
- mi.once.Do(func() {
- info, ok := debug.ReadBuildInfo()
- if !ok {
- Logger.Print("The Modules integration is not available in binaries built without module support.")
- return
- }
- mi.modules = extractModules(info)
- })
- }
- event.Modules = mi.modules
- return event
-}
-
-func extractModules(info *debug.BuildInfo) map[string]string {
- modules := map[string]string{
- info.Main.Path: info.Main.Version,
- }
- for _, dep := range info.Deps {
- ver := dep.Version
- if dep.Replace != nil {
- ver += fmt.Sprintf(" => %s %s", dep.Replace.Path, dep.Replace.Version)
- }
- modules[dep.Path] = strings.TrimSuffix(ver, " ")
- }
- return modules
-}
-
-// ================================
-// Environment Integration
-// ================================
-
-type environmentIntegration struct{}
-
-func (ei *environmentIntegration) Name() string {
- return "Environment"
-}
-
-func (ei *environmentIntegration) SetupOnce(client *Client) {
- client.AddEventProcessor(ei.processor)
-}
-
-func (ei *environmentIntegration) processor(event *Event, hint *EventHint) *Event {
- if event.Contexts == nil {
- event.Contexts = make(map[string]interface{})
- }
-
- event.Contexts["device"] = map[string]interface{}{
- "arch": runtime.GOARCH,
- "num_cpu": runtime.NumCPU(),
- }
-
- event.Contexts["os"] = map[string]interface{}{
- "name": runtime.GOOS,
- }
-
- event.Contexts["runtime"] = map[string]interface{}{
- "name": "go",
- "version": runtime.Version(),
- "go_numroutines": runtime.NumGoroutine(),
- "go_maxprocs": runtime.GOMAXPROCS(0),
- "go_numcgocalls": runtime.NumCgoCall(),
- }
-
- return event
-}
-
-// ================================
-// Ignore Errors Integration
-// ================================
-
-type ignoreErrorsIntegration struct {
- ignoreErrors []*regexp.Regexp
-}
-
-func (iei *ignoreErrorsIntegration) Name() string {
- return "IgnoreErrors"
-}
-
-func (iei *ignoreErrorsIntegration) SetupOnce(client *Client) {
- iei.ignoreErrors = transformStringsIntoRegexps(client.Options().IgnoreErrors)
- client.AddEventProcessor(iei.processor)
-}
-
-func (iei *ignoreErrorsIntegration) processor(event *Event, hint *EventHint) *Event {
- suspects := getIgnoreErrorsSuspects(event)
-
- for _, suspect := range suspects {
- for _, pattern := range iei.ignoreErrors {
- if pattern.Match([]byte(suspect)) {
- Logger.Printf("Event dropped due to being matched by `IgnoreErrors` option."+
- "| Value matched: %s | Filter used: %s", suspect, pattern)
- return nil
- }
- }
- }
-
- return event
-}
-
-func transformStringsIntoRegexps(strings []string) []*regexp.Regexp {
- var exprs []*regexp.Regexp
-
- for _, s := range strings {
- r, err := regexp.Compile(s)
- if err == nil {
- exprs = append(exprs, r)
- }
- }
-
- return exprs
-}
-
-func getIgnoreErrorsSuspects(event *Event) []string {
- suspects := []string{}
-
- if event.Message != "" {
- suspects = append(suspects, event.Message)
- }
-
- for _, ex := range event.Exception {
- suspects = append(suspects, ex.Type)
- suspects = append(suspects, ex.Value)
- }
-
- return suspects
-}
-
-// ================================
-// Contextify Frames Integration
-// ================================
-
-type contextifyFramesIntegration struct {
- sr sourceReader
- contextLines int
- cachedLocations sync.Map
-}
-
-func (cfi *contextifyFramesIntegration) Name() string {
- return "ContextifyFrames"
-}
-
-func (cfi *contextifyFramesIntegration) SetupOnce(client *Client) {
- cfi.sr = newSourceReader()
- cfi.contextLines = 5
-
- client.AddEventProcessor(cfi.processor)
-}
-
-func (cfi *contextifyFramesIntegration) processor(event *Event, hint *EventHint) *Event {
- // Range over all exceptions
- for _, ex := range event.Exception {
- // If it has no stacktrace, just bail out
- if ex.Stacktrace == nil {
- continue
- }
-
- // If it does, it should have frames, so try to contextify them
- ex.Stacktrace.Frames = cfi.contextify(ex.Stacktrace.Frames)
- }
-
- // Range over all threads
- for _, th := range event.Threads {
- // If it has no stacktrace, just bail out
- if th.Stacktrace == nil {
- continue
- }
-
- // If it does, it should have frames, so try to contextify them
- th.Stacktrace.Frames = cfi.contextify(th.Stacktrace.Frames)
- }
-
- return event
-}
-
-func (cfi *contextifyFramesIntegration) contextify(frames []Frame) []Frame {
- contextifiedFrames := make([]Frame, 0, len(frames))
-
- for _, frame := range frames {
- if !frame.InApp {
- contextifiedFrames = append(contextifiedFrames, frame)
- continue
- }
-
- var path string
-
- if cachedPath, ok := cfi.cachedLocations.Load(frame.AbsPath); ok {
- if p, ok := cachedPath.(string); ok {
- path = p
- }
- } else {
- // Optimize for happy path here
- if fileExists(frame.AbsPath) {
- path = frame.AbsPath
- } else {
- path = cfi.findNearbySourceCodeLocation(frame.AbsPath)
- }
- }
-
- if path == "" {
- contextifiedFrames = append(contextifiedFrames, frame)
- continue
- }
-
- lines, contextLine := cfi.sr.readContextLines(path, frame.Lineno, cfi.contextLines)
- contextifiedFrames = append(contextifiedFrames, cfi.addContextLinesToFrame(frame, lines, contextLine))
- }
-
- return contextifiedFrames
-}
-
-func (cfi *contextifyFramesIntegration) findNearbySourceCodeLocation(originalPath string) string {
- trimmedPath := strings.TrimPrefix(originalPath, "/")
- components := strings.Split(trimmedPath, "/")
-
- for len(components) > 0 {
- components = components[1:]
- possibleLocation := strings.Join(components, "/")
-
- if fileExists(possibleLocation) {
- cfi.cachedLocations.Store(originalPath, possibleLocation)
- return possibleLocation
- }
- }
-
- cfi.cachedLocations.Store(originalPath, "")
- return ""
-}
-
-func (cfi *contextifyFramesIntegration) addContextLinesToFrame(frame Frame, lines [][]byte, contextLine int) Frame {
- for i, line := range lines {
- switch {
- case i < contextLine:
- frame.PreContext = append(frame.PreContext, string(line))
- case i == contextLine:
- frame.ContextLine = string(line)
- default:
- frame.PostContext = append(frame.PostContext, string(line))
- }
- }
- return frame
-}
diff --git a/vendor/github.com/getsentry/sentry-go/interfaces.go b/vendor/github.com/getsentry/sentry-go/interfaces.go
deleted file mode 100644
index 0f7e7b177..000000000
--- a/vendor/github.com/getsentry/sentry-go/interfaces.go
+++ /dev/null
@@ -1,221 +0,0 @@
-package sentry
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net"
- "net/http"
- "strings"
- "time"
-)
-
-// Protocol Docs (kinda)
-// https://github.com/getsentry/rust-sentry-types/blob/master/src/protocol/v7.rs
-
-// Level marks the severity of the event
-type Level string
-
-const (
- LevelDebug Level = "debug"
- LevelInfo Level = "info"
- LevelWarning Level = "warning"
- LevelError Level = "error"
- LevelFatal Level = "fatal"
-)
-
-// https://docs.sentry.io/development/sdk-dev/event-payloads/sdk/
-type SdkInfo struct {
- Name string `json:"name,omitempty"`
- Version string `json:"version,omitempty"`
- Integrations []string `json:"integrations,omitempty"`
- Packages []SdkPackage `json:"packages,omitempty"`
-}
-
-type SdkPackage struct {
- Name string `json:"name,omitempty"`
- Version string `json:"version,omitempty"`
-}
-
-// TODO: This type could be more useful, as map of interface{} is too generic
-// and requires a lot of type assertions in beforeBreadcrumb calls
-// plus it could just be `map[string]interface{}` then
-type BreadcrumbHint map[string]interface{}
-
-// https://docs.sentry.io/development/sdk-dev/event-payloads/breadcrumbs/
-type Breadcrumb struct {
- Category string `json:"category,omitempty"`
- Data map[string]interface{} `json:"data,omitempty"`
- Level Level `json:"level,omitempty"`
- Message string `json:"message,omitempty"`
- Timestamp time.Time `json:"timestamp"`
- Type string `json:"type,omitempty"`
-}
-
-func (b *Breadcrumb) MarshalJSON() ([]byte, error) {
- type alias Breadcrumb
- // encoding/json doesn't support the "omitempty" option for struct types.
- // See https://golang.org/issues/11939.
- // This implementation of MarshalJSON shadows the original Timestamp field
- // forcing it to be omitted when the Timestamp is the zero value of
- // time.Time.
- if b.Timestamp.IsZero() {
- return json.Marshal(&struct {
- *alias
- Timestamp json.RawMessage `json:"timestamp,omitempty"`
- }{
- alias: (*alias)(b),
- })
- }
- return json.Marshal(&struct {
- *alias
- }{
- alias: (*alias)(b),
- })
-}
-
-// https://docs.sentry.io/development/sdk-dev/event-payloads/user/
-type User struct {
- Email string `json:"email,omitempty"`
- ID string `json:"id,omitempty"`
- IPAddress string `json:"ip_address,omitempty"`
- Username string `json:"username,omitempty"`
-}
-
-// https://docs.sentry.io/development/sdk-dev/event-payloads/request/
-type Request struct {
- URL string `json:"url,omitempty"`
- Method string `json:"method,omitempty"`
- Data string `json:"data,omitempty"`
- QueryString string `json:"query_string,omitempty"`
- Cookies string `json:"cookies,omitempty"`
- Headers map[string]string `json:"headers,omitempty"`
- Env map[string]string `json:"env,omitempty"`
-}
-
-// NewRequest returns a new Sentry Request from the given http.Request.
-//
-// NewRequest avoids operations that depend on network access. In particular, it
-// does not read r.Body.
-func NewRequest(r *http.Request) *Request {
- protocol := schemeHTTP
- if r.TLS != nil || r.Header.Get("X-Forwarded-Proto") == "https" {
- protocol = schemeHTTPS
- }
- url := fmt.Sprintf("%s://%s%s", protocol, r.Host, r.URL.Path)
-
- // We read only the first Cookie header because of the specification:
- // https://tools.ietf.org/html/rfc6265#section-5.4
- // When the user agent generates an HTTP request, the user agent MUST NOT
- // attach more than one Cookie header field.
- cookies := r.Header.Get("Cookie")
-
- headers := make(map[string]string, len(r.Header))
- for k, v := range r.Header {
- headers[k] = strings.Join(v, ",")
- }
- headers["Host"] = r.Host
-
- var env map[string]string
- if addr, port, err := net.SplitHostPort(r.RemoteAddr); err == nil {
- env = map[string]string{"REMOTE_ADDR": addr, "REMOTE_PORT": port}
- }
-
- return &Request{
- URL: url,
- Method: r.Method,
- QueryString: r.URL.RawQuery,
- Cookies: cookies,
- Headers: headers,
- Env: env,
- }
-}
-
-// https://docs.sentry.io/development/sdk-dev/event-payloads/exception/
-type Exception struct {
- Type string `json:"type,omitempty"`
- Value string `json:"value,omitempty"`
- Module string `json:"module,omitempty"`
- ThreadID string `json:"thread_id,omitempty"`
- Stacktrace *Stacktrace `json:"stacktrace,omitempty"`
- RawStacktrace *Stacktrace `json:"raw_stacktrace,omitempty"`
-}
-
-type EventID string
-
-// https://docs.sentry.io/development/sdk-dev/event-payloads/
-type Event struct {
- Breadcrumbs []*Breadcrumb `json:"breadcrumbs,omitempty"`
- Contexts map[string]interface{} `json:"contexts,omitempty"`
- Dist string `json:"dist,omitempty"`
- Environment string `json:"environment,omitempty"`
- EventID EventID `json:"event_id,omitempty"`
- Extra map[string]interface{} `json:"extra,omitempty"`
- Fingerprint []string `json:"fingerprint,omitempty"`
- Level Level `json:"level,omitempty"`
- Message string `json:"message,omitempty"`
- Platform string `json:"platform,omitempty"`
- Release string `json:"release,omitempty"`
- Sdk SdkInfo `json:"sdk,omitempty"`
- ServerName string `json:"server_name,omitempty"`
- Threads []Thread `json:"threads,omitempty"`
- Tags map[string]string `json:"tags,omitempty"`
- Timestamp time.Time `json:"timestamp"`
- Transaction string `json:"transaction,omitempty"`
- User User `json:"user,omitempty"`
- Logger string `json:"logger,omitempty"`
- Modules map[string]string `json:"modules,omitempty"`
- Request *Request `json:"request,omitempty"`
- Exception []Exception `json:"exception,omitempty"`
-}
-
-func (e *Event) MarshalJSON() ([]byte, error) {
- type alias Event
- // encoding/json doesn't support the "omitempty" option for struct types.
- // See https://golang.org/issues/11939.
- // This implementation of MarshalJSON shadows the original Timestamp field
- // forcing it to be omitted when the Timestamp is the zero value of
- // time.Time.
- if e.Timestamp.IsZero() {
- return json.Marshal(&struct {
- *alias
- Timestamp json.RawMessage `json:"timestamp,omitempty"`
- }{
- alias: (*alias)(e),
- })
- }
- return json.Marshal(&struct {
- *alias
- }{
- alias: (*alias)(e),
- })
-}
-
-func NewEvent() *Event {
- event := Event{
- Contexts: make(map[string]interface{}),
- Extra: make(map[string]interface{}),
- Tags: make(map[string]string),
- Modules: make(map[string]string),
- }
- return &event
-}
-
-type Thread struct {
- ID string `json:"id,omitempty"`
- Name string `json:"name,omitempty"`
- Stacktrace *Stacktrace `json:"stacktrace,omitempty"`
- RawStacktrace *Stacktrace `json:"raw_stacktrace,omitempty"`
- Crashed bool `json:"crashed,omitempty"`
- Current bool `json:"current,omitempty"`
-}
-
-type EventHint struct {
- Data interface{}
- EventID string
- OriginalException error
- RecoveredException interface{}
- Context context.Context
- Request *http.Request
- Response *http.Response
-}
diff --git a/vendor/github.com/getsentry/sentry-go/scope.go b/vendor/github.com/getsentry/sentry-go/scope.go
deleted file mode 100644
index 600cd81b2..000000000
--- a/vendor/github.com/getsentry/sentry-go/scope.go
+++ /dev/null
@@ -1,416 +0,0 @@
-package sentry
-
-import (
- "bytes"
- "io"
- "net/http"
- "reflect"
- "sync"
- "time"
-)
-
-// Scope holds contextual data for the current scope.
-//
-// The scope is an object that can cloned efficiently and stores data that
-// is locally relevant to an event. For instance the scope will hold recorded
-// breadcrumbs and similar information.
-//
-// The scope can be interacted with in two ways:
-//
-// 1. the scope is routinely updated with information by functions such as
-// `AddBreadcrumb` which will modify the currently top-most scope.
-// 2. the topmost scope can also be configured through the `ConfigureScope`
-// method.
-//
-// Note that the scope can only be modified but not inspected.
-// Only the client can use the scope to extract information currently.
-type Scope struct {
- mu sync.RWMutex
- breadcrumbs []*Breadcrumb
- user User
- tags map[string]string
- contexts map[string]interface{}
- extra map[string]interface{}
- fingerprint []string
- level Level
- transaction string
- request *http.Request
- // requestBody holds a reference to the original request.Body.
- requestBody interface {
- // Bytes returns bytes from the original body, lazily buffered as the
- // original body is read.
- Bytes() []byte
- // Overflow returns true if the body is larger than the maximum buffer
- // size.
- Overflow() bool
- }
- eventProcessors []EventProcessor
-}
-
-func NewScope() *Scope {
- scope := Scope{
- breadcrumbs: make([]*Breadcrumb, 0),
- tags: make(map[string]string),
- contexts: make(map[string]interface{}),
- extra: make(map[string]interface{}),
- fingerprint: make([]string, 0),
- }
-
- return &scope
-}
-
-// AddBreadcrumb adds new breadcrumb to the current scope
-// and optionally throws the old one if limit is reached.
-func (scope *Scope) AddBreadcrumb(breadcrumb *Breadcrumb, limit int) {
- if breadcrumb.Timestamp.IsZero() {
- breadcrumb.Timestamp = time.Now().UTC()
- }
-
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- breadcrumbs := append(scope.breadcrumbs, breadcrumb)
- if len(breadcrumbs) > limit {
- scope.breadcrumbs = breadcrumbs[1 : limit+1]
- } else {
- scope.breadcrumbs = breadcrumbs
- }
-}
-
-// ClearBreadcrumbs clears all breadcrumbs from the current scope.
-func (scope *Scope) ClearBreadcrumbs() {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.breadcrumbs = []*Breadcrumb{}
-}
-
-// SetUser sets the user for the current scope.
-func (scope *Scope) SetUser(user User) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.user = user
-}
-
-// SetRequest sets the request for the current scope.
-func (scope *Scope) SetRequest(r *http.Request) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.request = r
-
- if r == nil {
- return
- }
-
- // Don't buffer request body if we know it is oversized.
- if r.ContentLength > maxRequestBodyBytes {
- return
- }
- // Don't buffer if there is no body.
- if r.Body == nil || r.Body == http.NoBody {
- return
- }
- buf := &limitedBuffer{Capacity: maxRequestBodyBytes}
- r.Body = readCloser{
- Reader: io.TeeReader(r.Body, buf),
- Closer: r.Body,
- }
- scope.requestBody = buf
-}
-
-// SetRequestBody sets the request body for the current scope.
-//
-// This method should only be called when the body bytes are already available
-// in memory. Typically, the request body is buffered lazily from the
-// Request.Body from SetRequest.
-func (scope *Scope) SetRequestBody(b []byte) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- capacity := maxRequestBodyBytes
- overflow := false
- if len(b) > capacity {
- overflow = true
- b = b[:capacity]
- }
- scope.requestBody = &limitedBuffer{
- Capacity: capacity,
- Buffer: *bytes.NewBuffer(b),
- overflow: overflow,
- }
-}
-
-// maxRequestBodyBytes is the default maximum request body size to send to
-// Sentry.
-const maxRequestBodyBytes = 10 * 1024
-
-// A limitedBuffer is like a bytes.Buffer, but limited to store at most Capacity
-// bytes. Any writes past the capacity are silently discarded, similar to
-// ioutil.Discard.
-type limitedBuffer struct {
- Capacity int
-
- bytes.Buffer
- overflow bool
-}
-
-// Write implements io.Writer.
-func (b *limitedBuffer) Write(p []byte) (n int, err error) {
- // Silently ignore writes after overflow.
- if b.overflow {
- return len(p), nil
- }
- left := b.Capacity - b.Len()
- if left < 0 {
- left = 0
- }
- if len(p) > left {
- b.overflow = true
- p = p[:left]
- }
- return b.Buffer.Write(p)
-}
-
-// Overflow returns true if the limitedBuffer discarded bytes written to it.
-func (b *limitedBuffer) Overflow() bool {
- return b.overflow
-}
-
-// readCloser combines an io.Reader and an io.Closer to implement io.ReadCloser.
-type readCloser struct {
- io.Reader
- io.Closer
-}
-
-// SetTag adds a tag to the current scope.
-func (scope *Scope) SetTag(key, value string) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.tags[key] = value
-}
-
-// SetTags assigns multiple tags to the current scope.
-func (scope *Scope) SetTags(tags map[string]string) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- for k, v := range tags {
- scope.tags[k] = v
- }
-}
-
-// RemoveTag removes a tag from the current scope.
-func (scope *Scope) RemoveTag(key string) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- delete(scope.tags, key)
-}
-
-// SetContext adds a context to the current scope.
-func (scope *Scope) SetContext(key string, value interface{}) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.contexts[key] = value
-}
-
-// SetContexts assigns multiple contexts to the current scope.
-func (scope *Scope) SetContexts(contexts map[string]interface{}) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- for k, v := range contexts {
- scope.contexts[k] = v
- }
-}
-
-// RemoveContext removes a context from the current scope.
-func (scope *Scope) RemoveContext(key string) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- delete(scope.contexts, key)
-}
-
-// SetExtra adds an extra to the current scope.
-func (scope *Scope) SetExtra(key string, value interface{}) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.extra[key] = value
-}
-
-// SetExtras assigns multiple extras to the current scope.
-func (scope *Scope) SetExtras(extra map[string]interface{}) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- for k, v := range extra {
- scope.extra[k] = v
- }
-}
-
-// RemoveExtra removes a extra from the current scope.
-func (scope *Scope) RemoveExtra(key string) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- delete(scope.extra, key)
-}
-
-// SetFingerprint sets new fingerprint for the current scope.
-func (scope *Scope) SetFingerprint(fingerprint []string) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.fingerprint = fingerprint
-}
-
-// SetLevel sets new level for the current scope.
-func (scope *Scope) SetLevel(level Level) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.level = level
-}
-
-// SetTransaction sets new transaction name for the current transaction.
-func (scope *Scope) SetTransaction(transactionName string) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.transaction = transactionName
-}
-
-// Clone returns a copy of the current scope with all data copied over.
-func (scope *Scope) Clone() *Scope {
- scope.mu.RLock()
- defer scope.mu.RUnlock()
-
- clone := NewScope()
- clone.user = scope.user
- clone.breadcrumbs = make([]*Breadcrumb, len(scope.breadcrumbs))
- copy(clone.breadcrumbs, scope.breadcrumbs)
- for key, value := range scope.tags {
- clone.tags[key] = value
- }
- for key, value := range scope.contexts {
- clone.contexts[key] = value
- }
- for key, value := range scope.extra {
- clone.extra[key] = value
- }
- clone.fingerprint = make([]string, len(scope.fingerprint))
- copy(clone.fingerprint, scope.fingerprint)
- clone.level = scope.level
- clone.transaction = scope.transaction
- clone.request = scope.request
-
- return clone
-}
-
-// Clear removes the data from the current scope. Not safe for concurrent use.
-func (scope *Scope) Clear() {
- *scope = *NewScope()
-}
-
-// AddEventProcessor adds an event processor to the current scope.
-func (scope *Scope) AddEventProcessor(processor EventProcessor) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
-
- scope.eventProcessors = append(scope.eventProcessors, processor)
-}
-
-// ApplyToEvent takes the data from the current scope and attaches it to the event.
-func (scope *Scope) ApplyToEvent(event *Event, hint *EventHint) *Event {
- scope.mu.RLock()
- defer scope.mu.RUnlock()
-
- if len(scope.breadcrumbs) > 0 {
- if event.Breadcrumbs == nil {
- event.Breadcrumbs = []*Breadcrumb{}
- }
-
- event.Breadcrumbs = append(event.Breadcrumbs, scope.breadcrumbs...)
- }
-
- if len(scope.tags) > 0 {
- if event.Tags == nil {
- event.Tags = make(map[string]string)
- }
-
- for key, value := range scope.tags {
- event.Tags[key] = value
- }
- }
-
- if len(scope.contexts) > 0 {
- if event.Contexts == nil {
- event.Contexts = make(map[string]interface{})
- }
-
- for key, value := range scope.contexts {
- event.Contexts[key] = value
- }
- }
-
- if len(scope.extra) > 0 {
- if event.Extra == nil {
- event.Extra = make(map[string]interface{})
- }
-
- for key, value := range scope.extra {
- event.Extra[key] = value
- }
- }
-
- if (reflect.DeepEqual(event.User, User{})) {
- event.User = scope.user
- }
-
- if (event.Fingerprint == nil || len(event.Fingerprint) == 0) &&
- len(scope.fingerprint) > 0 {
- event.Fingerprint = make([]string, len(scope.fingerprint))
- copy(event.Fingerprint, scope.fingerprint)
- }
-
- if scope.level != "" {
- event.Level = scope.level
- }
-
- if scope.transaction != "" {
- event.Transaction = scope.transaction
- }
-
- if event.Request == nil && scope.request != nil {
- event.Request = NewRequest(scope.request)
- // NOTE: The SDK does not attempt to send partial request body data.
- //
- // The reason being that Sentry's ingest pipeline and UI are optimized
- // to show structured data. Additionally, tooling around PII scrubbing
- // relies on structured data; truncated request bodies would create
- // invalid payloads that are more prone to leaking PII data.
- //
- // Users can still send more data along their events if they want to,
- // for example using Event.Extra.
- if scope.requestBody != nil && !scope.requestBody.Overflow() {
- event.Request.Data = string(scope.requestBody.Bytes())
- }
- }
-
- for _, processor := range scope.eventProcessors {
- id := event.EventID
- event = processor(event, hint)
- if event == nil {
- Logger.Printf("Event dropped by one of the Scope EventProcessors: %s\n", id)
- return nil
- }
- }
-
- return event
-}
diff --git a/vendor/github.com/getsentry/sentry-go/sentry.go b/vendor/github.com/getsentry/sentry-go/sentry.go
deleted file mode 100644
index 8d736ab0e..000000000
--- a/vendor/github.com/getsentry/sentry-go/sentry.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package sentry
-
-import (
- "context"
- "time"
-)
-
-// Version is the version of the sentry-go SDK.
-const Version = "0.6.1"
-
-// apiVersion is the minimum version of the Sentry API compatible with the
-// sentry-go SDK.
-const apiVersion = "7"
-
-// Init initializes whole SDK by creating new `Client` and binding it to the current `Hub`
-func Init(options ClientOptions) error {
- hub := CurrentHub()
- client, err := NewClient(options)
- if err != nil {
- return err
- }
- hub.BindClient(client)
- return nil
-}
-
-// AddBreadcrumb records a new breadcrumb.
-//
-// The total number of breadcrumbs that can be recorded are limited by the
-// configuration on the client.
-func AddBreadcrumb(breadcrumb *Breadcrumb) {
- hub := CurrentHub()
- hub.AddBreadcrumb(breadcrumb, nil)
-}
-
-// CaptureMessage captures an arbitrary message.
-func CaptureMessage(message string) *EventID {
- hub := CurrentHub()
- return hub.CaptureMessage(message)
-}
-
-// CaptureException captures an error.
-func CaptureException(exception error) *EventID {
- hub := CurrentHub()
- return hub.CaptureException(exception)
-}
-
-// CaptureEvent captures an event on the currently active client if any.
-//
-// The event must already be assembled. Typically code would instead use
-// the utility methods like `CaptureException`. The return value is the
-// event ID. In case Sentry is disabled or event was dropped, the return value will be nil.
-func CaptureEvent(event *Event) *EventID {
- hub := CurrentHub()
- return hub.CaptureEvent(event)
-}
-
-// Recover captures a panic.
-func Recover() *EventID {
- if err := recover(); err != nil {
- hub := CurrentHub()
- return hub.Recover(err)
- }
- return nil
-}
-
-// Recover captures a panic and passes relevant context object.
-func RecoverWithContext(ctx context.Context) *EventID {
- if err := recover(); err != nil {
- var hub *Hub
-
- if HasHubOnContext(ctx) {
- hub = GetHubFromContext(ctx)
- } else {
- hub = CurrentHub()
- }
-
- return hub.RecoverWithContext(ctx, err)
- }
- return nil
-}
-
-// WithScope temporarily pushes a scope for a single call.
-//
-// This function takes one argument, a callback that executes
-// in the context of that scope.
-//
-// This is useful when extra data should be send with a single capture call
-// for instance a different level or tags
-func WithScope(f func(scope *Scope)) {
- hub := CurrentHub()
- hub.WithScope(f)
-}
-
-// ConfigureScope invokes a function that can modify the current scope.
-//
-// The function is passed a mutable reference to the `Scope` so that modifications
-// can be performed.
-func ConfigureScope(f func(scope *Scope)) {
- hub := CurrentHub()
- hub.ConfigureScope(f)
-}
-
-// PushScope pushes a new scope.
-func PushScope() {
- hub := CurrentHub()
- hub.PushScope()
-}
-
-// PopScope pushes a new scope.
-func PopScope() {
- hub := CurrentHub()
- hub.PopScope()
-}
-
-// Flush waits until the underlying Transport sends any buffered events to the
-// Sentry server, blocking for at most the given timeout. It returns false if
-// the timeout was reached. In that case, some events may not have been sent.
-//
-// Flush should be called before terminating the program to avoid
-// unintentionally dropping events.
-//
-// Do not call Flush indiscriminately after every call to CaptureEvent,
-// CaptureException or CaptureMessage. Instead, to have the SDK send events over
-// the network synchronously, configure it to use the HTTPSyncTransport in the
-// call to Init.
-func Flush(timeout time.Duration) bool {
- hub := CurrentHub()
- return hub.Flush(timeout)
-}
-
-// LastEventID returns an ID of last captured event.
-func LastEventID() EventID {
- hub := CurrentHub()
- return hub.LastEventID()
-}
diff --git a/vendor/github.com/getsentry/sentry-go/sourcereader.go b/vendor/github.com/getsentry/sentry-go/sourcereader.go
deleted file mode 100644
index 2d357689b..000000000
--- a/vendor/github.com/getsentry/sentry-go/sourcereader.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package sentry
-
-import (
- "bytes"
- "io/ioutil"
- "sync"
-)
-
-type sourceReader struct {
- mu sync.Mutex
- cache map[string][][]byte
-}
-
-func newSourceReader() sourceReader {
- return sourceReader{
- cache: make(map[string][][]byte),
- }
-}
-
-func (sr *sourceReader) readContextLines(filename string, line, context int) ([][]byte, int) {
- sr.mu.Lock()
- defer sr.mu.Unlock()
-
- lines, ok := sr.cache[filename]
-
- if !ok {
- data, err := ioutil.ReadFile(filename)
- if err != nil {
- sr.cache[filename] = nil
- return nil, 0
- }
- lines = bytes.Split(data, []byte{'\n'})
- sr.cache[filename] = lines
- }
-
- return sr.calculateContextLines(lines, line, context)
-}
-
-// `contextLine` points to a line that caused an issue itself, in relation to returned slice
-func (sr *sourceReader) calculateContextLines(lines [][]byte, line, context int) ([][]byte, int) {
- // Stacktrace lines are 1-indexed, slices are 0-indexed
- line--
-
- contextLine := context
-
- if lines == nil || line >= len(lines) || line < 0 {
- return nil, 0
- }
-
- if context < 0 {
- context = 0
- contextLine = 0
- }
-
- start := line - context
-
- if start < 0 {
- contextLine += start
- start = 0
- }
-
- end := line + context + 1
-
- if end > len(lines) {
- end = len(lines)
- }
-
- return lines[start:end], contextLine
-}
diff --git a/vendor/github.com/getsentry/sentry-go/stacktrace.go b/vendor/github.com/getsentry/sentry-go/stacktrace.go
deleted file mode 100644
index 909d8a2a5..000000000
--- a/vendor/github.com/getsentry/sentry-go/stacktrace.go
+++ /dev/null
@@ -1,283 +0,0 @@
-package sentry
-
-import (
- "go/build"
- "path/filepath"
- "reflect"
- "runtime"
- "strings"
-)
-
-const unknown string = "unknown"
-
-// The module download is split into two parts: downloading the go.mod and downloading the actual code.
-// If you have dependencies only needed for tests, then they will show up in your go.mod,
-// and go get will download their go.mods, but it will not download their code.
-// The test-only dependencies get downloaded only when you need it, such as the first time you run go test.
-//
-// https://github.com/golang/go/issues/26913#issuecomment-411976222
-
-// Stacktrace holds information about the frames of the stack.
-type Stacktrace struct {
- Frames []Frame `json:"frames,omitempty"`
- FramesOmitted []uint `json:"frames_omitted,omitempty"`
-}
-
-// NewStacktrace creates a stacktrace using `runtime.Callers`.
-func NewStacktrace() *Stacktrace {
- pcs := make([]uintptr, 100)
- n := runtime.Callers(1, pcs)
-
- if n == 0 {
- return nil
- }
-
- frames := extractFrames(pcs[:n])
- frames = filterFrames(frames)
-
- stacktrace := Stacktrace{
- Frames: frames,
- }
-
- return &stacktrace
-}
-
-// ExtractStacktrace creates a new `Stacktrace` based on the given `error` object.
-// TODO: Make it configurable so that anyone can provide their own implementation?
-// Use of reflection allows us to not have a hard dependency on any given package, so we don't have to import it
-func ExtractStacktrace(err error) *Stacktrace {
- method := extractReflectedStacktraceMethod(err)
-
- if !method.IsValid() {
- return nil
- }
-
- pcs := extractPcs(method)
-
- if len(pcs) == 0 {
- return nil
- }
-
- frames := extractFrames(pcs)
- frames = filterFrames(frames)
-
- stacktrace := Stacktrace{
- Frames: frames,
- }
-
- return &stacktrace
-}
-
-func extractReflectedStacktraceMethod(err error) reflect.Value {
- var method reflect.Value
-
- // https://github.com/pingcap/errors
- methodGetStackTracer := reflect.ValueOf(err).MethodByName("GetStackTracer")
- // https://github.com/pkg/errors
- methodStackTrace := reflect.ValueOf(err).MethodByName("StackTrace")
- // https://github.com/go-errors/errors
- methodStackFrames := reflect.ValueOf(err).MethodByName("StackFrames")
-
- if methodGetStackTracer.IsValid() {
- stacktracer := methodGetStackTracer.Call(make([]reflect.Value, 0))[0]
- stacktracerStackTrace := reflect.ValueOf(stacktracer).MethodByName("StackTrace")
-
- if stacktracerStackTrace.IsValid() {
- method = stacktracerStackTrace
- }
- }
-
- if methodStackTrace.IsValid() {
- method = methodStackTrace
- }
-
- if methodStackFrames.IsValid() {
- method = methodStackFrames
- }
-
- return method
-}
-
-func extractPcs(method reflect.Value) []uintptr {
- var pcs []uintptr
-
- stacktrace := method.Call(make([]reflect.Value, 0))[0]
-
- if stacktrace.Kind() != reflect.Slice {
- return nil
- }
-
- for i := 0; i < stacktrace.Len(); i++ {
- pc := stacktrace.Index(i)
-
- if pc.Kind() == reflect.Uintptr {
- pcs = append(pcs, uintptr(pc.Uint()))
- continue
- }
-
- if pc.Kind() == reflect.Struct {
- field := pc.FieldByName("ProgramCounter")
- if field.IsValid() && field.Kind() == reflect.Uintptr {
- pcs = append(pcs, uintptr(field.Uint()))
- continue
- }
- }
- }
-
- return pcs
-}
-
-// https://docs.sentry.io/development/sdk-dev/event-payloads/stacktrace/
-type Frame struct {
- Function string `json:"function,omitempty"`
- Symbol string `json:"symbol,omitempty"`
- Module string `json:"module,omitempty"`
- Package string `json:"package,omitempty"`
- Filename string `json:"filename,omitempty"`
- AbsPath string `json:"abs_path,omitempty"`
- Lineno int `json:"lineno,omitempty"`
- Colno int `json:"colno,omitempty"`
- PreContext []string `json:"pre_context,omitempty"`
- ContextLine string `json:"context_line,omitempty"`
- PostContext []string `json:"post_context,omitempty"`
- InApp bool `json:"in_app,omitempty"`
- Vars map[string]interface{} `json:"vars,omitempty"`
-}
-
-// NewFrame assembles a stacktrace frame out of `runtime.Frame`.
-func NewFrame(f runtime.Frame) Frame {
- abspath := f.File
- filename := f.File
- function := f.Function
- var pkg string
-
- if filename != "" {
- filename = filepath.Base(filename)
- } else {
- filename = unknown
- }
-
- if abspath == "" {
- abspath = unknown
- }
-
- if function != "" {
- pkg, function = splitQualifiedFunctionName(function)
- }
-
- frame := Frame{
- AbsPath: abspath,
- Filename: filename,
- Lineno: f.Line,
- Module: pkg,
- Function: function,
- }
-
- frame.InApp = isInAppFrame(frame)
-
- return frame
-}
-
-// splitQualifiedFunctionName splits a package path-qualified function name into
-// package name and function name. Such qualified names are found in
-// runtime.Frame.Function values.
-func splitQualifiedFunctionName(name string) (pkg string, fun string) {
- pkg = packageName(name)
- fun = strings.TrimPrefix(name, pkg+".")
- return
-}
-
-func extractFrames(pcs []uintptr) []Frame {
- var frames []Frame
- callersFrames := runtime.CallersFrames(pcs)
-
- for {
- callerFrame, more := callersFrames.Next()
-
- frames = append([]Frame{
- NewFrame(callerFrame),
- }, frames...)
-
- if !more {
- break
- }
- }
-
- return frames
-}
-
-// filterFrames filters out stack frames that are not meant to be reported to
-// Sentry. Those are frames internal to the SDK or Go.
-func filterFrames(frames []Frame) []Frame {
- if len(frames) == 0 {
- return nil
- }
-
- filteredFrames := make([]Frame, 0, len(frames))
-
- for _, frame := range frames {
- // Skip Go internal frames.
- if frame.Module == "runtime" || frame.Module == "testing" {
- continue
- }
- // Skip Sentry internal frames, except for frames in _test packages (for
- // testing).
- if strings.HasPrefix(frame.Module, "github.com/getsentry/sentry-go") &&
- !strings.HasSuffix(frame.Module, "_test") {
- continue
- }
- filteredFrames = append(filteredFrames, frame)
- }
-
- return filteredFrames
-}
-
-func isInAppFrame(frame Frame) bool {
- if strings.HasPrefix(frame.AbsPath, build.Default.GOROOT) ||
- strings.Contains(frame.Module, "vendor") ||
- strings.Contains(frame.Module, "third_party") {
- return false
- }
-
- return true
-}
-
-func callerFunctionName() string {
- pcs := make([]uintptr, 1)
- runtime.Callers(3, pcs)
- callersFrames := runtime.CallersFrames(pcs)
- callerFrame, _ := callersFrames.Next()
- return baseName(callerFrame.Function)
-}
-
-// packageName returns the package part of the symbol name, or the empty string
-// if there is none.
-// It replicates https://golang.org/pkg/debug/gosym/#Sym.PackageName, avoiding a
-// dependency on debug/gosym.
-func packageName(name string) string {
- // A prefix of "type." and "go." is a compiler-generated symbol that doesn't belong to any package.
- // See variable reservedimports in cmd/compile/internal/gc/subr.go
- if strings.HasPrefix(name, "go.") || strings.HasPrefix(name, "type.") {
- return ""
- }
-
- pathend := strings.LastIndex(name, "/")
- if pathend < 0 {
- pathend = 0
- }
-
- if i := strings.Index(name[pathend:], "."); i != -1 {
- return name[:pathend+i]
- }
- return ""
-}
-
-// baseName returns the symbol name without the package or receiver name.
-// It replicates https://golang.org/pkg/debug/gosym/#Sym.BaseName, avoiding a
-// dependency on debug/gosym.
-func baseName(name string) string {
- if i := strings.LastIndex(name, "."); i != -1 {
- return name[i+1:]
- }
- return name
-}
diff --git a/vendor/github.com/getsentry/sentry-go/transport.go b/vendor/github.com/getsentry/sentry-go/transport.go
deleted file mode 100644
index 34ae64594..000000000
--- a/vendor/github.com/getsentry/sentry-go/transport.go
+++ /dev/null
@@ -1,447 +0,0 @@
-package sentry
-
-import (
- "bytes"
- "crypto/tls"
- "encoding/json"
- "net/http"
- "net/url"
- "strconv"
- "sync"
- "time"
-)
-
-const defaultBufferSize = 30
-const defaultRetryAfter = time.Second * 60
-const defaultTimeout = time.Second * 30
-
-// Transport is used by the `Client` to deliver events to remote server.
-type Transport interface {
- Flush(timeout time.Duration) bool
- Configure(options ClientOptions)
- SendEvent(event *Event)
-}
-
-func getProxyConfig(options ClientOptions) func(*http.Request) (*url.URL, error) {
- if options.HTTPSProxy != "" {
- return func(_ *http.Request) (*url.URL, error) {
- return url.Parse(options.HTTPSProxy)
- }
- } else if options.HTTPProxy != "" {
- return func(_ *http.Request) (*url.URL, error) {
- return url.Parse(options.HTTPProxy)
- }
- }
-
- return http.ProxyFromEnvironment
-}
-
-func getTLSConfig(options ClientOptions) *tls.Config {
- if options.CaCerts != nil {
- return &tls.Config{
- RootCAs: options.CaCerts,
- }
- }
-
- return nil
-}
-
-func retryAfter(now time.Time, r *http.Response) time.Duration {
- retryAfterHeader := r.Header["Retry-After"]
-
- if retryAfterHeader == nil {
- return defaultRetryAfter
- }
-
- if date, err := time.Parse(time.RFC1123, retryAfterHeader[0]); err == nil {
- return date.Sub(now)
- }
-
- if seconds, err := strconv.Atoi(retryAfterHeader[0]); err == nil {
- return time.Second * time.Duration(seconds)
- }
-
- return defaultRetryAfter
-}
-
-func getRequestBodyFromEvent(event *Event) []byte {
- body, err := json.Marshal(event)
- if err == nil {
- return body
- }
-
- partialMarshallMessage := "Original event couldn't be marshalled. Succeeded by stripping the data " +
- "that uses interface{} type. Please verify that the data you attach to the scope is serializable."
- // Try to serialize the event, with all the contextual data that allows for interface{} stripped.
- event.Breadcrumbs = nil
- event.Contexts = nil
- event.Extra = map[string]interface{}{
- "info": partialMarshallMessage,
- }
- body, err = json.Marshal(event)
- if err == nil {
- Logger.Println(partialMarshallMessage)
- return body
- }
-
- // This should _only_ happen when Event.Exception[0].Stacktrace.Frames[0].Vars is unserializable
- // Which won't ever happen, as we don't use it now (although it's the part of public interface accepted by Sentry)
- // Juuust in case something, somehow goes utterly wrong.
- Logger.Println("Event couldn't be marshalled, even with stripped contextual data. Skipping delivery. " +
- "Please notify the SDK owners with possibly broken payload.")
- return nil
-}
-
-// ================================
-// HTTPTransport
-// ================================
-
-// A batch groups items that are processed sequentially.
-type batch struct {
- items chan *http.Request
- started chan struct{} // closed to signal items started to be worked on
- done chan struct{} // closed to signal completion of all items
-}
-
-// HTTPTransport is a default implementation of `Transport` interface used by `Client`.
-type HTTPTransport struct {
- dsn *Dsn
- client *http.Client
- transport http.RoundTripper
-
- // buffer is a channel of batches. Calling Flush terminates work on the
- // current in-flight items and starts a new batch for subsequent events.
- buffer chan batch
-
- start sync.Once
-
- // Size of the transport buffer. Defaults to 30.
- BufferSize int
- // HTTP Client request timeout. Defaults to 30 seconds.
- Timeout time.Duration
-
- mu sync.RWMutex
- disabledUntil time.Time
-}
-
-// NewHTTPTransport returns a new pre-configured instance of HTTPTransport
-func NewHTTPTransport() *HTTPTransport {
- transport := HTTPTransport{
- BufferSize: defaultBufferSize,
- Timeout: defaultTimeout,
- }
- return &transport
-}
-
-// Configure is called by the `Client` itself, providing it it's own `ClientOptions`.
-func (t *HTTPTransport) Configure(options ClientOptions) {
- dsn, err := NewDsn(options.Dsn)
- if err != nil {
- Logger.Printf("%v\n", err)
- return
- }
- t.dsn = dsn
-
- // A buffered channel with capacity 1 works like a mutex, ensuring only one
- // goroutine can access the current batch at a given time. Access is
- // synchronized by reading from and writing to the channel.
- t.buffer = make(chan batch, 1)
- t.buffer <- batch{
- items: make(chan *http.Request, t.BufferSize),
- started: make(chan struct{}),
- done: make(chan struct{}),
- }
-
- if options.HTTPTransport != nil {
- t.transport = options.HTTPTransport
- } else {
- t.transport = &http.Transport{
- Proxy: getProxyConfig(options),
- TLSClientConfig: getTLSConfig(options),
- }
- }
-
- if options.HTTPClient != nil {
- t.client = options.HTTPClient
- } else {
- t.client = &http.Client{
- Transport: t.transport,
- Timeout: t.Timeout,
- }
- }
-
- t.start.Do(func() {
- go t.worker()
- })
-}
-
-// SendEvent assembles a new packet out of `Event` and sends it to remote server.
-func (t *HTTPTransport) SendEvent(event *Event) {
- if t.dsn == nil {
- return
- }
- t.mu.RLock()
- disabled := time.Now().Before(t.disabledUntil)
- t.mu.RUnlock()
- if disabled {
- return
- }
-
- body := getRequestBodyFromEvent(event)
- if body == nil {
- return
- }
-
- request, _ := http.NewRequest(
- http.MethodPost,
- t.dsn.StoreAPIURL().String(),
- bytes.NewBuffer(body),
- )
-
- for headerKey, headerValue := range t.dsn.RequestHeaders() {
- request.Header.Set(headerKey, headerValue)
- }
-
- // <-t.buffer is equivalent to acquiring a lock to access the current batch.
- // A few lines below, t.buffer <- b releases the lock.
- //
- // The lock must be held during the select block below to guarantee that
- // b.items is not closed while trying to send to it. Remember that sending
- // on a closed channel panics.
- //
- // Note that the select block takes a bounded amount of CPU time because of
- // the default case that is executed if sending on b.items would block. That
- // is, the event is dropped if it cannot be sent immediately to the b.items
- // channel (used as a queue).
- b := <-t.buffer
-
- select {
- case b.items <- request:
- Logger.Printf(
- "Sending %s event [%s] to %s project: %d\n",
- event.Level,
- event.EventID,
- t.dsn.host,
- t.dsn.projectID,
- )
- default:
- Logger.Println("Event dropped due to transport buffer being full.")
- }
-
- t.buffer <- b
-}
-
-// Flush waits until any buffered events are sent to the Sentry server, blocking
-// for at most the given timeout. It returns false if the timeout was reached.
-// In that case, some events may not have been sent.
-//
-// Flush should be called before terminating the program to avoid
-// unintentionally dropping events.
-//
-// Do not call Flush indiscriminately after every call to SendEvent. Instead, to
-// have the SDK send events over the network synchronously, configure it to use
-// the HTTPSyncTransport in the call to Init.
-func (t *HTTPTransport) Flush(timeout time.Duration) bool {
- toolate := time.After(timeout)
-
- // Wait until processing the current batch has started or the timeout.
- //
- // We must wait until the worker has seen the current batch, because it is
- // the only way b.done will be closed. If we do not wait, there is a
- // possible execution flow in which b.done is never closed, and the only way
- // out of Flush would be waiting for the timeout, which is undesired.
- var b batch
- for {
- select {
- case b = <-t.buffer:
- select {
- case <-b.started:
- goto started
- default:
- t.buffer <- b
- }
- case <-toolate:
- goto fail
- }
- }
-
-started:
- // Signal that there won't be any more items in this batch, so that the
- // worker inner loop can end.
- close(b.items)
- // Start a new batch for subsequent events.
- t.buffer <- batch{
- items: make(chan *http.Request, t.BufferSize),
- started: make(chan struct{}),
- done: make(chan struct{}),
- }
-
- // Wait until the current batch is done or the timeout.
- select {
- case <-b.done:
- Logger.Println("Buffer flushed successfully.")
- return true
- case <-toolate:
- goto fail
- }
-
-fail:
- Logger.Println("Buffer flushing reached the timeout.")
- return false
-}
-
-func (t *HTTPTransport) worker() {
- for b := range t.buffer {
- // Signal that processing of the current batch has started.
- close(b.started)
-
- // Return the batch to the buffer so that other goroutines can use it.
- // Equivalent to releasing a lock.
- t.buffer <- b
-
- // Process all batch items.
- for request := range b.items {
- t.mu.RLock()
- disabled := time.Now().Before(t.disabledUntil)
- t.mu.RUnlock()
- if disabled {
- continue
- }
-
- response, err := t.client.Do(request)
-
- if err != nil {
- Logger.Printf("There was an issue with sending an event: %v", err)
- }
-
- if response != nil && response.StatusCode == http.StatusTooManyRequests {
- deadline := time.Now().Add(retryAfter(time.Now(), response))
- t.mu.Lock()
- t.disabledUntil = deadline
- t.mu.Unlock()
- Logger.Printf("Too many requests, backing off till: %s\n", deadline)
- }
- }
-
- // Signal that processing of the batch is done.
- close(b.done)
- }
-}
-
-// ================================
-// HTTPSyncTransport
-// ================================
-
-// HTTPSyncTransport is an implementation of `Transport` interface which blocks after each captured event.
-type HTTPSyncTransport struct {
- dsn *Dsn
- client *http.Client
- transport http.RoundTripper
- disabledUntil time.Time
-
- // HTTP Client request timeout. Defaults to 30 seconds.
- Timeout time.Duration
-}
-
-// NewHTTPSyncTransport returns a new pre-configured instance of HTTPSyncTransport
-func NewHTTPSyncTransport() *HTTPSyncTransport {
- transport := HTTPSyncTransport{
- Timeout: defaultTimeout,
- }
-
- return &transport
-}
-
-// Configure is called by the `Client` itself, providing it it's own `ClientOptions`.
-func (t *HTTPSyncTransport) Configure(options ClientOptions) {
- dsn, err := NewDsn(options.Dsn)
- if err != nil {
- Logger.Printf("%v\n", err)
- return
- }
- t.dsn = dsn
-
- if options.HTTPTransport != nil {
- t.transport = options.HTTPTransport
- } else {
- t.transport = &http.Transport{
- Proxy: getProxyConfig(options),
- TLSClientConfig: getTLSConfig(options),
- }
- }
-
- if options.HTTPClient != nil {
- t.client = options.HTTPClient
- } else {
- t.client = &http.Client{
- Transport: t.transport,
- Timeout: t.Timeout,
- }
- }
-}
-
-// SendEvent assembles a new packet out of `Event` and sends it to remote server.
-func (t *HTTPSyncTransport) SendEvent(event *Event) {
- if t.dsn == nil || time.Now().Before(t.disabledUntil) {
- return
- }
-
- body := getRequestBodyFromEvent(event)
- if body == nil {
- return
- }
-
- request, _ := http.NewRequest(
- http.MethodPost,
- t.dsn.StoreAPIURL().String(),
- bytes.NewBuffer(body),
- )
-
- for headerKey, headerValue := range t.dsn.RequestHeaders() {
- request.Header.Set(headerKey, headerValue)
- }
-
- Logger.Printf(
- "Sending %s event [%s] to %s project: %d\n",
- event.Level,
- event.EventID,
- t.dsn.host,
- t.dsn.projectID,
- )
-
- response, err := t.client.Do(request)
-
- if err != nil {
- Logger.Printf("There was an issue with sending an event: %v", err)
- }
-
- if response != nil && response.StatusCode == http.StatusTooManyRequests {
- t.disabledUntil = time.Now().Add(retryAfter(time.Now(), response))
- Logger.Printf("Too many requests, backing off till: %s\n", t.disabledUntil)
- }
-}
-
-// Flush is a no-op for HTTPSyncTransport. It always returns true immediately.
-func (t *HTTPSyncTransport) Flush(_ time.Duration) bool {
- return true
-}
-
-// ================================
-// noopTransport
-// ================================
-
-// noopTransport is an implementation of `Transport` interface which drops all the events.
-// Only used internally when an empty DSN is provided, which effectively disables the SDK.
-type noopTransport struct{}
-
-func (t *noopTransport) Configure(options ClientOptions) {
- Logger.Println("Sentry client initialized with an empty DSN. Using noopTransport. No events will be delivered.")
-}
-
-func (t *noopTransport) SendEvent(event *Event) {
- Logger.Println("Event dropped due to noopTransport usage.")
-}
-
-func (t *noopTransport) Flush(_ time.Duration) bool {
- return true
-}
diff --git a/vendor/github.com/getsentry/sentry-go/util.go b/vendor/github.com/getsentry/sentry-go/util.go
deleted file mode 100644
index e9a42e3ea..000000000
--- a/vendor/github.com/getsentry/sentry-go/util.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package sentry
-
-import (
- "crypto/rand"
- "encoding/hex"
- "encoding/json"
- "fmt"
- "io"
- "os"
-)
-
-func uuid() string {
- id := make([]byte, 16)
- _, _ = io.ReadFull(rand.Reader, id)
- id[6] &= 0x0F // clear version
- id[6] |= 0x40 // set version to 4 (random uuid)
- id[8] &= 0x3F // clear variant
- id[8] |= 0x80 // set to IETF variant
- return hex.EncodeToString(id)
-}
-
-func fileExists(fileName string) bool {
- if _, err := os.Stat(fileName); err != nil {
- return false
- }
-
- return true
-}
-
-//nolint: deadcode, unused
-func prettyPrint(data interface{}) {
- dbg, _ := json.MarshalIndent(data, "", " ")
- fmt.Println(string(dbg))
-}
diff --git a/vendor/github.com/ghodss/yaml/.gitignore b/vendor/github.com/ghodss/yaml/.gitignore
deleted file mode 100644
index e256a31e0..000000000
--- a/vendor/github.com/ghodss/yaml/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-# OSX leaves these everywhere on SMB shares
-._*
-
-# Eclipse files
-.classpath
-.project
-.settings/**
-
-# Emacs save files
-*~
-
-# Vim-related files
-[._]*.s[a-w][a-z]
-[._]s[a-w][a-z]
-*.un~
-Session.vim
-.netrwhist
-
-# Go test binaries
-*.test
diff --git a/vendor/github.com/ghodss/yaml/.travis.yml b/vendor/github.com/ghodss/yaml/.travis.yml
deleted file mode 100644
index 0e9d6edc0..000000000
--- a/vendor/github.com/ghodss/yaml/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: go
-go:
- - 1.3
- - 1.4
-script:
- - go test
- - go build
diff --git a/vendor/github.com/ghodss/yaml/LICENSE b/vendor/github.com/ghodss/yaml/LICENSE
deleted file mode 100644
index 7805d36de..000000000
--- a/vendor/github.com/ghodss/yaml/LICENSE
+++ /dev/null
@@ -1,50 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Sam Ghods
-
-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.
-
-
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/ghodss/yaml/README.md b/vendor/github.com/ghodss/yaml/README.md
deleted file mode 100644
index 0200f75b4..000000000
--- a/vendor/github.com/ghodss/yaml/README.md
+++ /dev/null
@@ -1,121 +0,0 @@
-# YAML marshaling and unmarshaling support for Go
-
-[](https://travis-ci.org/ghodss/yaml)
-
-## Introduction
-
-A wrapper around [go-yaml](https://github.com/go-yaml/yaml) designed to enable a better way of handling YAML when marshaling to and from structs.
-
-In short, this library first converts YAML to JSON using go-yaml and then uses `json.Marshal` and `json.Unmarshal` to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods `MarshalJSON` and `UnmarshalJSON` unlike go-yaml. For a detailed overview of the rationale behind this method, [see this blog post](http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/).
-
-## Compatibility
-
-This package uses [go-yaml](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility).
-
-## Caveats
-
-**Caveat #1:** When using `yaml.Marshal` and `yaml.Unmarshal`, binary data should NOT be preceded with the `!!binary` YAML tag. If you do, go-yaml will convert the binary data from base64 to native binary data, which is not compatible with JSON. You can still use binary in your YAML files though - just store them without the `!!binary` tag and decode the base64 in your code (e.g. in the custom JSON methods `MarshalJSON` and `UnmarshalJSON`). This also has the benefit that your YAML and your JSON binary data will be decoded exactly the same way. As an example:
-
-```
-BAD:
- exampleKey: !!binary gIGC
-
-GOOD:
- exampleKey: gIGC
-... and decode the base64 data in your code.
-```
-
-**Caveat #2:** When using `YAMLToJSON` directly, maps with keys that are maps will result in an error since this is not supported by JSON. This error will occur in `Unmarshal` as well since you can't unmarshal map keys anyways since struct fields can't be keys.
-
-## Installation and usage
-
-To install, run:
-
-```
-$ go get github.com/ghodss/yaml
-```
-
-And import using:
-
-```
-import "github.com/ghodss/yaml"
-```
-
-Usage is very similar to the JSON library:
-
-```go
-package main
-
-import (
- "fmt"
-
- "github.com/ghodss/yaml"
-)
-
-type Person struct {
- Name string `json:"name"` // Affects YAML field names too.
- Age int `json:"age"`
-}
-
-func main() {
- // Marshal a Person struct to YAML.
- p := Person{"John", 30}
- y, err := yaml.Marshal(p)
- if err != nil {
- fmt.Printf("err: %v\n", err)
- return
- }
- fmt.Println(string(y))
- /* Output:
- age: 30
- name: John
- */
-
- // Unmarshal the YAML back into a Person struct.
- var p2 Person
- err = yaml.Unmarshal(y, &p2)
- if err != nil {
- fmt.Printf("err: %v\n", err)
- return
- }
- fmt.Println(p2)
- /* Output:
- {John 30}
- */
-}
-```
-
-`yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available:
-
-```go
-package main
-
-import (
- "fmt"
-
- "github.com/ghodss/yaml"
-)
-
-func main() {
- j := []byte(`{"name": "John", "age": 30}`)
- y, err := yaml.JSONToYAML(j)
- if err != nil {
- fmt.Printf("err: %v\n", err)
- return
- }
- fmt.Println(string(y))
- /* Output:
- name: John
- age: 30
- */
- j2, err := yaml.YAMLToJSON(y)
- if err != nil {
- fmt.Printf("err: %v\n", err)
- return
- }
- fmt.Println(string(j2))
- /* Output:
- {"age":30,"name":"John"}
- */
-}
-```
diff --git a/vendor/github.com/ghodss/yaml/fields.go b/vendor/github.com/ghodss/yaml/fields.go
deleted file mode 100644
index 586007402..000000000
--- a/vendor/github.com/ghodss/yaml/fields.go
+++ /dev/null
@@ -1,501 +0,0 @@
-// Copyright 2013 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.
-package yaml
-
-import (
- "bytes"
- "encoding"
- "encoding/json"
- "reflect"
- "sort"
- "strings"
- "sync"
- "unicode"
- "unicode/utf8"
-)
-
-// indirect walks down v allocating pointers as needed,
-// until it gets to a non-pointer.
-// if it encounters an Unmarshaler, indirect stops and returns that.
-// if decodingNull is true, indirect stops at the last pointer so it can be set to nil.
-func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.TextUnmarshaler, reflect.Value) {
- // If v is a named type and is addressable,
- // start with its address, so that if the type has pointer methods,
- // we find them.
- if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() {
- v = v.Addr()
- }
- for {
- // Load value from interface, but only if the result will be
- // usefully addressable.
- if v.Kind() == reflect.Interface && !v.IsNil() {
- e := v.Elem()
- if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) {
- v = e
- continue
- }
- }
-
- if v.Kind() != reflect.Ptr {
- break
- }
-
- if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() {
- break
- }
- if v.IsNil() {
- if v.CanSet() {
- v.Set(reflect.New(v.Type().Elem()))
- } else {
- v = reflect.New(v.Type().Elem())
- }
- }
- if v.Type().NumMethod() > 0 {
- if u, ok := v.Interface().(json.Unmarshaler); ok {
- return u, nil, reflect.Value{}
- }
- if u, ok := v.Interface().(encoding.TextUnmarshaler); ok {
- return nil, u, reflect.Value{}
- }
- }
- v = v.Elem()
- }
- return nil, nil, v
-}
-
-// A field represents a single field found in a struct.
-type field struct {
- name string
- nameBytes []byte // []byte(name)
- equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent
-
- tag bool
- index []int
- typ reflect.Type
- omitEmpty bool
- quoted bool
-}
-
-func fillField(f field) field {
- f.nameBytes = []byte(f.name)
- f.equalFold = foldFunc(f.nameBytes)
- return f
-}
-
-// byName sorts field by name, breaking ties with depth,
-// then breaking ties with "name came from json tag", then
-// breaking ties with index sequence.
-type byName []field
-
-func (x byName) Len() int { return len(x) }
-
-func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byName) Less(i, j int) bool {
- if x[i].name != x[j].name {
- return x[i].name < x[j].name
- }
- if len(x[i].index) != len(x[j].index) {
- return len(x[i].index) < len(x[j].index)
- }
- if x[i].tag != x[j].tag {
- return x[i].tag
- }
- return byIndex(x).Less(i, j)
-}
-
-// byIndex sorts field by index sequence.
-type byIndex []field
-
-func (x byIndex) Len() int { return len(x) }
-
-func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byIndex) Less(i, j int) bool {
- for k, xik := range x[i].index {
- if k >= len(x[j].index) {
- return false
- }
- if xik != x[j].index[k] {
- return xik < x[j].index[k]
- }
- }
- return len(x[i].index) < len(x[j].index)
-}
-
-// typeFields returns a list of fields that JSON should recognize for the given type.
-// The algorithm is breadth-first search over the set of structs to include - the top struct
-// and then any reachable anonymous structs.
-func typeFields(t reflect.Type) []field {
- // Anonymous fields to explore at the current level and the next.
- current := []field{}
- next := []field{{typ: t}}
-
- // Count of queued names for current level and the next.
- count := map[reflect.Type]int{}
- nextCount := map[reflect.Type]int{}
-
- // Types already visited at an earlier level.
- visited := map[reflect.Type]bool{}
-
- // Fields found.
- var fields []field
-
- for len(next) > 0 {
- current, next = next, current[:0]
- count, nextCount = nextCount, map[reflect.Type]int{}
-
- for _, f := range current {
- if visited[f.typ] {
- continue
- }
- visited[f.typ] = true
-
- // Scan f.typ for fields to include.
- for i := 0; i < f.typ.NumField(); i++ {
- sf := f.typ.Field(i)
- if sf.PkgPath != "" { // unexported
- continue
- }
- tag := sf.Tag.Get("json")
- if tag == "-" {
- continue
- }
- name, opts := parseTag(tag)
- if !isValidTag(name) {
- name = ""
- }
- index := make([]int, len(f.index)+1)
- copy(index, f.index)
- index[len(f.index)] = i
-
- ft := sf.Type
- if ft.Name() == "" && ft.Kind() == reflect.Ptr {
- // Follow pointer.
- ft = ft.Elem()
- }
-
- // Record found field and index sequence.
- if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
- tagged := name != ""
- if name == "" {
- name = sf.Name
- }
- fields = append(fields, fillField(field{
- name: name,
- tag: tagged,
- index: index,
- typ: ft,
- omitEmpty: opts.Contains("omitempty"),
- quoted: opts.Contains("string"),
- }))
- if count[f.typ] > 1 {
- // If there were multiple instances, add a second,
- // so that the annihilation code will see a duplicate.
- // It only cares about the distinction between 1 or 2,
- // so don't bother generating any more copies.
- fields = append(fields, fields[len(fields)-1])
- }
- continue
- }
-
- // Record new anonymous struct to explore in next round.
- nextCount[ft]++
- if nextCount[ft] == 1 {
- next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft}))
- }
- }
- }
- }
-
- sort.Sort(byName(fields))
-
- // Delete all fields that are hidden by the Go rules for embedded fields,
- // except that fields with JSON tags are promoted.
-
- // The fields are sorted in primary order of name, secondary order
- // of field index length. Loop over names; for each name, delete
- // hidden fields by choosing the one dominant field that survives.
- out := fields[:0]
- for advance, i := 0, 0; i < len(fields); i += advance {
- // One iteration per name.
- // Find the sequence of fields with the name of this first field.
- fi := fields[i]
- name := fi.name
- for advance = 1; i+advance < len(fields); advance++ {
- fj := fields[i+advance]
- if fj.name != name {
- break
- }
- }
- if advance == 1 { // Only one field with this name
- out = append(out, fi)
- continue
- }
- dominant, ok := dominantField(fields[i : i+advance])
- if ok {
- out = append(out, dominant)
- }
- }
-
- fields = out
- sort.Sort(byIndex(fields))
-
- return fields
-}
-
-// dominantField looks through the fields, all of which are known to
-// have the same name, to find the single field that dominates the
-// others using Go's embedding rules, modified by the presence of
-// JSON tags. If there are multiple top-level fields, the boolean
-// will be false: This condition is an error in Go and we skip all
-// the fields.
-func dominantField(fields []field) (field, bool) {
- // The fields are sorted in increasing index-length order. The winner
- // must therefore be one with the shortest index length. Drop all
- // longer entries, which is easy: just truncate the slice.
- length := len(fields[0].index)
- tagged := -1 // Index of first tagged field.
- for i, f := range fields {
- if len(f.index) > length {
- fields = fields[:i]
- break
- }
- if f.tag {
- if tagged >= 0 {
- // Multiple tagged fields at the same level: conflict.
- // Return no field.
- return field{}, false
- }
- tagged = i
- }
- }
- if tagged >= 0 {
- return fields[tagged], true
- }
- // All remaining fields have the same length. If there's more than one,
- // we have a conflict (two fields named "X" at the same level) and we
- // return no field.
- if len(fields) > 1 {
- return field{}, false
- }
- return fields[0], true
-}
-
-var fieldCache struct {
- sync.RWMutex
- m map[reflect.Type][]field
-}
-
-// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
-func cachedTypeFields(t reflect.Type) []field {
- fieldCache.RLock()
- f := fieldCache.m[t]
- fieldCache.RUnlock()
- if f != nil {
- return f
- }
-
- // Compute fields without lock.
- // Might duplicate effort but won't hold other computations back.
- f = typeFields(t)
- if f == nil {
- f = []field{}
- }
-
- fieldCache.Lock()
- if fieldCache.m == nil {
- fieldCache.m = map[reflect.Type][]field{}
- }
- fieldCache.m[t] = f
- fieldCache.Unlock()
- return f
-}
-
-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
-}
-
-const (
- caseMask = ^byte(0x20) // Mask to ignore case in ASCII.
- kelvin = '\u212a'
- smallLongEss = '\u017f'
-)
-
-// foldFunc returns one of four different case folding equivalence
-// functions, from most general (and slow) to fastest:
-//
-// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8
-// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S')
-// 3) asciiEqualFold, no special, but includes non-letters (including _)
-// 4) simpleLetterEqualFold, no specials, no non-letters.
-//
-// The letters S and K are special because they map to 3 runes, not just 2:
-// * S maps to s and to U+017F 'ſ' Latin small letter long s
-// * k maps to K and to U+212A 'K' Kelvin sign
-// See http://play.golang.org/p/tTxjOc0OGo
-//
-// The returned function is specialized for matching against s and
-// should only be given s. It's not curried for performance reasons.
-func foldFunc(s []byte) func(s, t []byte) bool {
- nonLetter := false
- special := false // special letter
- for _, b := range s {
- if b >= utf8.RuneSelf {
- return bytes.EqualFold
- }
- upper := b & caseMask
- if upper < 'A' || upper > 'Z' {
- nonLetter = true
- } else if upper == 'K' || upper == 'S' {
- // See above for why these letters are special.
- special = true
- }
- }
- if special {
- return equalFoldRight
- }
- if nonLetter {
- return asciiEqualFold
- }
- return simpleLetterEqualFold
-}
-
-// equalFoldRight is a specialization of bytes.EqualFold when s is
-// known to be all ASCII (including punctuation), but contains an 's',
-// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t.
-// See comments on foldFunc.
-func equalFoldRight(s, t []byte) bool {
- for _, sb := range s {
- if len(t) == 0 {
- return false
- }
- tb := t[0]
- if tb < utf8.RuneSelf {
- if sb != tb {
- sbUpper := sb & caseMask
- if 'A' <= sbUpper && sbUpper <= 'Z' {
- if sbUpper != tb&caseMask {
- return false
- }
- } else {
- return false
- }
- }
- t = t[1:]
- continue
- }
- // sb is ASCII and t is not. t must be either kelvin
- // sign or long s; sb must be s, S, k, or K.
- tr, size := utf8.DecodeRune(t)
- switch sb {
- case 's', 'S':
- if tr != smallLongEss {
- return false
- }
- case 'k', 'K':
- if tr != kelvin {
- return false
- }
- default:
- return false
- }
- t = t[size:]
-
- }
- if len(t) > 0 {
- return false
- }
- return true
-}
-
-// asciiEqualFold is a specialization of bytes.EqualFold for use when
-// s is all ASCII (but may contain non-letters) and contains no
-// special-folding letters.
-// See comments on foldFunc.
-func asciiEqualFold(s, t []byte) bool {
- if len(s) != len(t) {
- return false
- }
- for i, sb := range s {
- tb := t[i]
- if sb == tb {
- continue
- }
- if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') {
- if sb&caseMask != tb&caseMask {
- return false
- }
- } else {
- return false
- }
- }
- return true
-}
-
-// simpleLetterEqualFold is a specialization of bytes.EqualFold for
-// use when s is all ASCII letters (no underscores, etc) and also
-// doesn't contain 'k', 'K', 's', or 'S'.
-// See comments on foldFunc.
-func simpleLetterEqualFold(s, t []byte) bool {
- if len(s) != len(t) {
- return false
- }
- for i, b := range s {
- if b&caseMask != t[i]&caseMask {
- return false
- }
- }
- return true
-}
-
-// tagOptions is the string following a comma in a struct field's "json"
-// tag, or the empty string. It does not include the leading comma.
-type tagOptions string
-
-// parseTag splits a struct field's json tag into its name and
-// comma-separated options.
-func parseTag(tag string) (string, tagOptions) {
- if idx := strings.Index(tag, ","); idx != -1 {
- return tag[:idx], tagOptions(tag[idx+1:])
- }
- return tag, tagOptions("")
-}
-
-// Contains reports whether a comma-separated list of options
-// contains a particular substr flag. substr must be surrounded by a
-// string boundary or commas.
-func (o tagOptions) Contains(optionName string) bool {
- if len(o) == 0 {
- return false
- }
- s := string(o)
- for s != "" {
- var next string
- i := strings.Index(s, ",")
- if i >= 0 {
- s, next = s[:i], s[i+1:]
- }
- if s == optionName {
- return true
- }
- s = next
- }
- return false
-}
diff --git a/vendor/github.com/ghodss/yaml/yaml.go b/vendor/github.com/ghodss/yaml/yaml.go
deleted file mode 100644
index 4fb4054a8..000000000
--- a/vendor/github.com/ghodss/yaml/yaml.go
+++ /dev/null
@@ -1,277 +0,0 @@
-package yaml
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "reflect"
- "strconv"
-
- "gopkg.in/yaml.v2"
-)
-
-// Marshals the object into JSON then converts JSON to YAML and returns the
-// YAML.
-func Marshal(o interface{}) ([]byte, error) {
- j, err := json.Marshal(o)
- if err != nil {
- return nil, fmt.Errorf("error marshaling into JSON: %v", err)
- }
-
- y, err := JSONToYAML(j)
- if err != nil {
- return nil, fmt.Errorf("error converting JSON to YAML: %v", err)
- }
-
- return y, nil
-}
-
-// Converts YAML to JSON then uses JSON to unmarshal into an object.
-func Unmarshal(y []byte, o interface{}) error {
- vo := reflect.ValueOf(o)
- j, err := yamlToJSON(y, &vo)
- if err != nil {
- return fmt.Errorf("error converting YAML to JSON: %v", err)
- }
-
- err = json.Unmarshal(j, o)
- if err != nil {
- return fmt.Errorf("error unmarshaling JSON: %v", err)
- }
-
- return nil
-}
-
-// Convert JSON to YAML.
-func JSONToYAML(j []byte) ([]byte, error) {
- // Convert the JSON to an object.
- var jsonObj interface{}
- // We are using yaml.Unmarshal here (instead of json.Unmarshal) because the
- // Go JSON library doesn't try to pick the right number type (int, float,
- // etc.) when unmarshalling to interface{}, it just picks float64
- // universally. go-yaml does go through the effort of picking the right
- // number type, so we can preserve number type throughout this process.
- err := yaml.Unmarshal(j, &jsonObj)
- if err != nil {
- return nil, err
- }
-
- // Marshal this object into YAML.
- return yaml.Marshal(jsonObj)
-}
-
-// Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through
-// this method should be a no-op.
-//
-// Things YAML can do that are not supported by JSON:
-// * In YAML you can have binary and null keys in your maps. These are invalid
-// in JSON. (int and float keys are converted to strings.)
-// * Binary data in YAML with the !!binary tag is not supported. If you want to
-// use binary data with this library, encode the data as base64 as usual but do
-// not use the !!binary tag in your YAML. This will ensure the original base64
-// encoded data makes it all the way through to the JSON.
-func YAMLToJSON(y []byte) ([]byte, error) {
- return yamlToJSON(y, nil)
-}
-
-func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) {
- // Convert the YAML to an object.
- var yamlObj interface{}
- err := yaml.Unmarshal(y, &yamlObj)
- if err != nil {
- return nil, err
- }
-
- // YAML objects are not completely compatible with JSON objects (e.g. you
- // can have non-string keys in YAML). So, convert the YAML-compatible object
- // to a JSON-compatible object, failing with an error if irrecoverable
- // incompatibilties happen along the way.
- jsonObj, err := convertToJSONableObject(yamlObj, jsonTarget)
- if err != nil {
- return nil, err
- }
-
- // Convert this object to JSON and return the data.
- return json.Marshal(jsonObj)
-}
-
-func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (interface{}, error) {
- var err error
-
- // Resolve jsonTarget to a concrete value (i.e. not a pointer or an
- // interface). We pass decodingNull as false because we're not actually
- // decoding into the value, we're just checking if the ultimate target is a
- // string.
- if jsonTarget != nil {
- ju, tu, pv := indirect(*jsonTarget, false)
- // We have a JSON or Text Umarshaler at this level, so we can't be trying
- // to decode into a string.
- if ju != nil || tu != nil {
- jsonTarget = nil
- } else {
- jsonTarget = &pv
- }
- }
-
- // If yamlObj is a number or a boolean, check if jsonTarget is a string -
- // if so, coerce. Else return normal.
- // If yamlObj is a map or array, find the field that each key is
- // unmarshaling to, and when you recurse pass the reflect.Value for that
- // field back into this function.
- switch typedYAMLObj := yamlObj.(type) {
- case map[interface{}]interface{}:
- // JSON does not support arbitrary keys in a map, so we must convert
- // these keys to strings.
- //
- // From my reading of go-yaml v2 (specifically the resolve function),
- // keys can only have the types string, int, int64, float64, binary
- // (unsupported), or null (unsupported).
- strMap := make(map[string]interface{})
- for k, v := range typedYAMLObj {
- // Resolve the key to a string first.
- var keyString string
- switch typedKey := k.(type) {
- case string:
- keyString = typedKey
- case int:
- keyString = strconv.Itoa(typedKey)
- case int64:
- // go-yaml will only return an int64 as a key if the system
- // architecture is 32-bit and the key's value is between 32-bit
- // and 64-bit. Otherwise the key type will simply be int.
- keyString = strconv.FormatInt(typedKey, 10)
- case float64:
- // Stolen from go-yaml to use the same conversion to string as
- // the go-yaml library uses to convert float to string when
- // Marshaling.
- s := strconv.FormatFloat(typedKey, 'g', -1, 32)
- switch s {
- case "+Inf":
- s = ".inf"
- case "-Inf":
- s = "-.inf"
- case "NaN":
- s = ".nan"
- }
- keyString = s
- case bool:
- if typedKey {
- keyString = "true"
- } else {
- keyString = "false"
- }
- default:
- return nil, fmt.Errorf("Unsupported map key of type: %s, key: %+#v, value: %+#v",
- reflect.TypeOf(k), k, v)
- }
-
- // jsonTarget should be a struct or a map. If it's a struct, find
- // the field it's going to map to and pass its reflect.Value. If
- // it's a map, find the element type of the map and pass the
- // reflect.Value created from that type. If it's neither, just pass
- // nil - JSON conversion will error for us if it's a real issue.
- if jsonTarget != nil {
- t := *jsonTarget
- if t.Kind() == reflect.Struct {
- keyBytes := []byte(keyString)
- // Find the field that the JSON library would use.
- var f *field
- fields := cachedTypeFields(t.Type())
- for i := range fields {
- ff := &fields[i]
- if bytes.Equal(ff.nameBytes, keyBytes) {
- f = ff
- break
- }
- // Do case-insensitive comparison.
- if f == nil && ff.equalFold(ff.nameBytes, keyBytes) {
- f = ff
- }
- }
- if f != nil {
- // Find the reflect.Value of the most preferential
- // struct field.
- jtf := t.Field(f.index[0])
- strMap[keyString], err = convertToJSONableObject(v, &jtf)
- if err != nil {
- return nil, err
- }
- continue
- }
- } else if t.Kind() == reflect.Map {
- // Create a zero value of the map's element type to use as
- // the JSON target.
- jtv := reflect.Zero(t.Type().Elem())
- strMap[keyString], err = convertToJSONableObject(v, &jtv)
- if err != nil {
- return nil, err
- }
- continue
- }
- }
- strMap[keyString], err = convertToJSONableObject(v, nil)
- if err != nil {
- return nil, err
- }
- }
- return strMap, nil
- case []interface{}:
- // We need to recurse into arrays in case there are any
- // map[interface{}]interface{}'s inside and to convert any
- // numbers to strings.
-
- // If jsonTarget is a slice (which it really should be), find the
- // thing it's going to map to. If it's not a slice, just pass nil
- // - JSON conversion will error for us if it's a real issue.
- var jsonSliceElemValue *reflect.Value
- if jsonTarget != nil {
- t := *jsonTarget
- if t.Kind() == reflect.Slice {
- // By default slices point to nil, but we need a reflect.Value
- // pointing to a value of the slice type, so we create one here.
- ev := reflect.Indirect(reflect.New(t.Type().Elem()))
- jsonSliceElemValue = &ev
- }
- }
-
- // Make and use a new array.
- arr := make([]interface{}, len(typedYAMLObj))
- for i, v := range typedYAMLObj {
- arr[i], err = convertToJSONableObject(v, jsonSliceElemValue)
- if err != nil {
- return nil, err
- }
- }
- return arr, nil
- default:
- // If the target type is a string and the YAML type is a number,
- // convert the YAML type to a string.
- if jsonTarget != nil && (*jsonTarget).Kind() == reflect.String {
- // Based on my reading of go-yaml, it may return int, int64,
- // float64, or uint64.
- var s string
- switch typedVal := typedYAMLObj.(type) {
- case int:
- s = strconv.FormatInt(int64(typedVal), 10)
- case int64:
- s = strconv.FormatInt(typedVal, 10)
- case float64:
- s = strconv.FormatFloat(typedVal, 'g', -1, 32)
- case uint64:
- s = strconv.FormatUint(typedVal, 10)
- case bool:
- if typedVal {
- s = "true"
- } else {
- s = "false"
- }
- }
- if len(s) > 0 {
- yamlObj = interface{}(s)
- }
- }
- return yamlObj, nil
- }
-
- return nil, nil
-}
diff --git a/vendor/github.com/go-openapi/jsonpointer/.editorconfig b/vendor/github.com/go-openapi/jsonpointer/.editorconfig
deleted file mode 100644
index 3152da69a..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/.editorconfig
+++ /dev/null
@@ -1,26 +0,0 @@
-# top-most EditorConfig file
-root = true
-
-# Unix-style newlines with a newline ending every file
-[*]
-end_of_line = lf
-insert_final_newline = true
-indent_style = space
-indent_size = 2
-trim_trailing_whitespace = true
-
-# Set default charset
-[*.{js,py,go,scala,rb,java,html,css,less,sass,md}]
-charset = utf-8
-
-# Tab indentation (no size specified)
-[*.go]
-indent_style = tab
-
-[*.md]
-trim_trailing_whitespace = false
-
-# Matches the exact files either package.json or .travis.yml
-[{package.json,.travis.yml}]
-indent_style = space
-indent_size = 2
diff --git a/vendor/github.com/go-openapi/jsonpointer/.gitignore b/vendor/github.com/go-openapi/jsonpointer/.gitignore
deleted file mode 100644
index 769c24400..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-secrets.yml
diff --git a/vendor/github.com/go-openapi/jsonpointer/.travis.yml b/vendor/github.com/go-openapi/jsonpointer/.travis.yml
deleted file mode 100644
index 9aef9184e..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-after_success:
-- bash <(curl -s https://codecov.io/bash)
-go:
-- 1.11.x
-- 1.12.x
-install:
-- GO111MODULE=off go get -u gotest.tools/gotestsum
-env:
-- GO111MODULE=on
-language: go
-notifications:
- slack:
- secure: a5VgoiwB1G/AZqzmephPZIhEB9avMlsWSlVnM1dSAtYAwdrQHGTQxAmpOxYIoSPDhWNN5bfZmjd29++UlTwLcHSR+e0kJhH6IfDlsHj/HplNCJ9tyI0zYc7XchtdKgeMxMzBKCzgwFXGSbQGydXTliDNBo0HOzmY3cou/daMFTP60K+offcjS+3LRAYb1EroSRXZqrk1nuF/xDL3792DZUdPMiFR/L/Df6y74D6/QP4sTkTDFQitz4Wy/7jbsfj8dG6qK2zivgV6/l+w4OVjFkxVpPXogDWY10vVXNVynqxfJ7to2d1I9lNCHE2ilBCkWMIPdyJF7hjF8pKW+82yP4EzRh0vu8Xn0HT5MZpQxdRY/YMxNrWaG7SxsoEaO4q5uhgdzAqLYY3TRa7MjIK+7Ur+aqOeTXn6OKwVi0CjvZ6mIU3WUKSwiwkFZMbjRAkSb5CYwMEfGFO/z964xz83qGt6WAtBXNotqCQpTIiKtDHQeLOMfksHImCg6JLhQcWBVxamVgu0G3Pdh8Y6DyPnxraXY95+QDavbjqv7TeYT9T/FNnrkXaTTK0s4iWE5H4ACU0Qvz0wUYgfQrZv0/Hp7V17+rabUwnzYySHCy9SWX/7OV9Cfh31iMp9ZIffr76xmmThtOEqs8TrTtU6BWI3rWwvA9cXQipZTVtL0oswrGw=
-script:
-- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
diff --git a/vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md
deleted file mode 100644
index 9322b065e..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
-advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at ivan+abuse@flanders.co.nz. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/go-openapi/jsonpointer/LICENSE b/vendor/github.com/go-openapi/jsonpointer/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/go-openapi/jsonpointer/README.md b/vendor/github.com/go-openapi/jsonpointer/README.md
deleted file mode 100644
index 813788aff..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# gojsonpointer [](https://travis-ci.org/go-openapi/jsonpointer) [](https://codecov.io/gh/go-openapi/jsonpointer) [](https://slackin.goswagger.io)
-
-[](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [](http://godoc.org/github.com/go-openapi/jsonpointer)
-An implementation of JSON Pointer - Go language
-
-## Status
-Completed YES
-
-Tested YES
-
-## References
-http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07
-
-### Note
-The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented.
diff --git a/vendor/github.com/go-openapi/jsonpointer/go.mod b/vendor/github.com/go-openapi/jsonpointer/go.mod
deleted file mode 100644
index 3e45e225b..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/go.mod
+++ /dev/null
@@ -1,9 +0,0 @@
-module github.com/go-openapi/jsonpointer
-
-require (
- github.com/go-openapi/swag v0.19.5
- github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect
- github.com/stretchr/testify v1.3.0
-)
-
-go 1.13
diff --git a/vendor/github.com/go-openapi/jsonpointer/go.sum b/vendor/github.com/go-openapi/jsonpointer/go.sum
deleted file mode 100644
index 953d4f354..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/go.sum
+++ /dev/null
@@ -1,24 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=
-github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go
deleted file mode 100644
index b284eb77a..000000000
--- a/vendor/github.com/go-openapi/jsonpointer/pointer.go
+++ /dev/null
@@ -1,390 +0,0 @@
-// Copyright 2013 sigu-399 ( https://github.com/sigu-399 )
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// author sigu-399
-// author-github https://github.com/sigu-399
-// author-mail sigu.399@gmail.com
-//
-// repository-name jsonpointer
-// repository-desc An implementation of JSON Pointer - Go language
-//
-// description Main and unique file.
-//
-// created 25-02-2013
-
-package jsonpointer
-
-import (
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "strings"
-
- "github.com/go-openapi/swag"
-)
-
-const (
- emptyPointer = ``
- pointerSeparator = `/`
-
- invalidStart = `JSON pointer must be empty or start with a "` + pointerSeparator
-)
-
-var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem()
-var jsonSetableType = reflect.TypeOf(new(JSONSetable)).Elem()
-
-// JSONPointable is an interface for structs to implement when they need to customize the
-// json pointer process
-type JSONPointable interface {
- JSONLookup(string) (interface{}, error)
-}
-
-// JSONSetable is an interface for structs to implement when they need to customize the
-// json pointer process
-type JSONSetable interface {
- JSONSet(string, interface{}) error
-}
-
-// New creates a new json pointer for the given string
-func New(jsonPointerString string) (Pointer, error) {
-
- var p Pointer
- err := p.parse(jsonPointerString)
- return p, err
-
-}
-
-// Pointer the json pointer reprsentation
-type Pointer struct {
- referenceTokens []string
-}
-
-// "Constructor", parses the given string JSON pointer
-func (p *Pointer) parse(jsonPointerString string) error {
-
- var err error
-
- if jsonPointerString != emptyPointer {
- if !strings.HasPrefix(jsonPointerString, pointerSeparator) {
- err = errors.New(invalidStart)
- } else {
- referenceTokens := strings.Split(jsonPointerString, pointerSeparator)
- for _, referenceToken := range referenceTokens[1:] {
- p.referenceTokens = append(p.referenceTokens, referenceToken)
- }
- }
- }
-
- return err
-}
-
-// Get uses the pointer to retrieve a value from a JSON document
-func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) {
- return p.get(document, swag.DefaultJSONNameProvider)
-}
-
-// Set uses the pointer to set a value from a JSON document
-func (p *Pointer) Set(document interface{}, value interface{}) (interface{}, error) {
- return document, p.set(document, value, swag.DefaultJSONNameProvider)
-}
-
-// GetForToken gets a value for a json pointer token 1 level deep
-func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error) {
- return getSingleImpl(document, decodedToken, swag.DefaultJSONNameProvider)
-}
-
-// SetForToken gets a value for a json pointer token 1 level deep
-func SetForToken(document interface{}, decodedToken string, value interface{}) (interface{}, error) {
- return document, setSingleImpl(document, value, decodedToken, swag.DefaultJSONNameProvider)
-}
-
-func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) {
- rValue := reflect.Indirect(reflect.ValueOf(node))
- kind := rValue.Kind()
-
- switch kind {
-
- case reflect.Struct:
- if rValue.Type().Implements(jsonPointableType) {
- r, err := node.(JSONPointable).JSONLookup(decodedToken)
- if err != nil {
- return nil, kind, err
- }
- return r, kind, nil
- }
- nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
- if !ok {
- return nil, kind, fmt.Errorf("object has no field %q", decodedToken)
- }
- fld := rValue.FieldByName(nm)
- return fld.Interface(), kind, nil
-
- case reflect.Map:
- kv := reflect.ValueOf(decodedToken)
- mv := rValue.MapIndex(kv)
-
- if mv.IsValid() {
- return mv.Interface(), kind, nil
- }
- return nil, kind, fmt.Errorf("object has no key %q", decodedToken)
-
- case reflect.Slice:
- tokenIndex, err := strconv.Atoi(decodedToken)
- if err != nil {
- return nil, kind, err
- }
- sLength := rValue.Len()
- if tokenIndex < 0 || tokenIndex >= sLength {
- return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength-1, tokenIndex)
- }
-
- elem := rValue.Index(tokenIndex)
- return elem.Interface(), kind, nil
-
- default:
- return nil, kind, fmt.Errorf("invalid token reference %q", decodedToken)
- }
-
-}
-
-func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error {
- rValue := reflect.Indirect(reflect.ValueOf(node))
- switch rValue.Kind() {
-
- case reflect.Struct:
- if ns, ok := node.(JSONSetable); ok { // pointer impl
- return ns.JSONSet(decodedToken, data)
- }
-
- if rValue.Type().Implements(jsonSetableType) {
- return node.(JSONSetable).JSONSet(decodedToken, data)
- }
-
- nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
- if !ok {
- return fmt.Errorf("object has no field %q", decodedToken)
- }
- fld := rValue.FieldByName(nm)
- if fld.IsValid() {
- fld.Set(reflect.ValueOf(data))
- }
- return nil
-
- case reflect.Map:
- kv := reflect.ValueOf(decodedToken)
- rValue.SetMapIndex(kv, reflect.ValueOf(data))
- return nil
-
- case reflect.Slice:
- tokenIndex, err := strconv.Atoi(decodedToken)
- if err != nil {
- return err
- }
- sLength := rValue.Len()
- if tokenIndex < 0 || tokenIndex >= sLength {
- return fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex)
- }
-
- elem := rValue.Index(tokenIndex)
- if !elem.CanSet() {
- return fmt.Errorf("can't set slice index %s to %v", decodedToken, data)
- }
- elem.Set(reflect.ValueOf(data))
- return nil
-
- default:
- return fmt.Errorf("invalid token reference %q", decodedToken)
- }
-
-}
-
-func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) {
-
- if nameProvider == nil {
- nameProvider = swag.DefaultJSONNameProvider
- }
-
- kind := reflect.Invalid
-
- // Full document when empty
- if len(p.referenceTokens) == 0 {
- return node, kind, nil
- }
-
- for _, token := range p.referenceTokens {
-
- decodedToken := Unescape(token)
-
- r, knd, err := getSingleImpl(node, decodedToken, nameProvider)
- if err != nil {
- return nil, knd, err
- }
- node, kind = r, knd
-
- }
-
- rValue := reflect.ValueOf(node)
- kind = rValue.Kind()
-
- return node, kind, nil
-}
-
-func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) error {
- knd := reflect.ValueOf(node).Kind()
-
- if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array {
- return fmt.Errorf("only structs, pointers, maps and slices are supported for setting values")
- }
-
- if nameProvider == nil {
- nameProvider = swag.DefaultJSONNameProvider
- }
-
- // Full document when empty
- if len(p.referenceTokens) == 0 {
- return nil
- }
-
- lastI := len(p.referenceTokens) - 1
- for i, token := range p.referenceTokens {
- isLastToken := i == lastI
- decodedToken := Unescape(token)
-
- if isLastToken {
-
- return setSingleImpl(node, data, decodedToken, nameProvider)
- }
-
- rValue := reflect.Indirect(reflect.ValueOf(node))
- kind := rValue.Kind()
-
- switch kind {
-
- case reflect.Struct:
- if rValue.Type().Implements(jsonPointableType) {
- r, err := node.(JSONPointable).JSONLookup(decodedToken)
- if err != nil {
- return err
- }
- fld := reflect.ValueOf(r)
- if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr {
- node = fld.Addr().Interface()
- continue
- }
- node = r
- continue
- }
- nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
- if !ok {
- return fmt.Errorf("object has no field %q", decodedToken)
- }
- fld := rValue.FieldByName(nm)
- if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr {
- node = fld.Addr().Interface()
- continue
- }
- node = fld.Interface()
-
- case reflect.Map:
- kv := reflect.ValueOf(decodedToken)
- mv := rValue.MapIndex(kv)
-
- if !mv.IsValid() {
- return fmt.Errorf("object has no key %q", decodedToken)
- }
- if mv.CanAddr() && mv.Kind() != reflect.Interface && mv.Kind() != reflect.Map && mv.Kind() != reflect.Slice && mv.Kind() != reflect.Ptr {
- node = mv.Addr().Interface()
- continue
- }
- node = mv.Interface()
-
- case reflect.Slice:
- tokenIndex, err := strconv.Atoi(decodedToken)
- if err != nil {
- return err
- }
- sLength := rValue.Len()
- if tokenIndex < 0 || tokenIndex >= sLength {
- return fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex)
- }
-
- elem := rValue.Index(tokenIndex)
- if elem.CanAddr() && elem.Kind() != reflect.Interface && elem.Kind() != reflect.Map && elem.Kind() != reflect.Slice && elem.Kind() != reflect.Ptr {
- node = elem.Addr().Interface()
- continue
- }
- node = elem.Interface()
-
- default:
- return fmt.Errorf("invalid token reference %q", decodedToken)
- }
-
- }
-
- return nil
-}
-
-// DecodedTokens returns the decoded tokens
-func (p *Pointer) DecodedTokens() []string {
- result := make([]string, 0, len(p.referenceTokens))
- for _, t := range p.referenceTokens {
- result = append(result, Unescape(t))
- }
- return result
-}
-
-// IsEmpty returns true if this is an empty json pointer
-// this indicates that it points to the root document
-func (p *Pointer) IsEmpty() bool {
- return len(p.referenceTokens) == 0
-}
-
-// Pointer to string representation function
-func (p *Pointer) String() string {
-
- if len(p.referenceTokens) == 0 {
- return emptyPointer
- }
-
- pointerString := pointerSeparator + strings.Join(p.referenceTokens, pointerSeparator)
-
- return pointerString
-}
-
-// Specific JSON pointer encoding here
-// ~0 => ~
-// ~1 => /
-// ... and vice versa
-
-const (
- encRefTok0 = `~0`
- encRefTok1 = `~1`
- decRefTok0 = `~`
- decRefTok1 = `/`
-)
-
-// Unescape unescapes a json pointer reference token string to the original representation
-func Unescape(token string) string {
- step1 := strings.Replace(token, encRefTok1, decRefTok1, -1)
- step2 := strings.Replace(step1, encRefTok0, decRefTok0, -1)
- return step2
-}
-
-// Escape escapes a pointer reference token string
-func Escape(token string) string {
- step1 := strings.Replace(token, decRefTok0, encRefTok0, -1)
- step2 := strings.Replace(step1, decRefTok1, encRefTok1, -1)
- return step2
-}
diff --git a/vendor/github.com/go-openapi/jsonreference/.gitignore b/vendor/github.com/go-openapi/jsonreference/.gitignore
deleted file mode 100644
index 769c24400..000000000
--- a/vendor/github.com/go-openapi/jsonreference/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-secrets.yml
diff --git a/vendor/github.com/go-openapi/jsonreference/.travis.yml b/vendor/github.com/go-openapi/jsonreference/.travis.yml
deleted file mode 100644
index 40b90757d..000000000
--- a/vendor/github.com/go-openapi/jsonreference/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-after_success:
-- bash <(curl -s https://codecov.io/bash)
-go:
-- 1.11.x
-- 1.12.x
-install:
-- GO111MODULE=off go get -u gotest.tools/gotestsum
-env:
-- GO111MODULE=on
-language: go
-notifications:
- slack:
- secure: OpQG/36F7DSF00HLm9WZMhyqFCYYyYTsVDObW226cWiR8PWYiNfLZiSEvIzT1Gx4dDjhigKTIqcLhG34CkL5iNXDjm9Yyo2RYhQPlK8NErNqUEXuBqn4RqYHW48VGhEhOyDd4Ei0E2FN5ZbgpvHgtpkdZ6XDi64r3Ac89isP9aPHXQTuv2Jog6b4/OKKiUTftLcTIst0p4Cp3gqOJWf1wnoj+IadWiECNVQT6zb47IYjtyw6+uV8iUjTzdKcRB6Zc6b4Dq7JAg1Zd7Jfxkql3hlKp4PNlRf9Cy7y5iA3G7MLyg3FcPX5z2kmcyPt2jOTRMBWUJ5zIQpOxizAcN8WsT3WWBL5KbuYK6k0PzujrIDLqdxGpNmjkkMfDBT9cKmZpm2FdW+oZgPFJP+oKmAo4u4KJz/vjiPTXgQlN5bmrLuRMCp+AwC5wkIohTqWZVPE2TK6ZSnMYcg/W39s+RP/9mJoyryAvPSpBOLTI+biCgaUCTOAZxNTWpMFc3tPYntc41WWkdKcooZ9JA5DwfcaVFyTGQ3YXz+HvX6G1z/gW0Q/A4dBi9mj2iE1xm7tRTT+4VQ2AXFvSEI1HJpfPgYnwAtwOD1v3Qm2EUHk9sCdtEDR4wVGEPIVn44GnwFMnGKx9JWppMPYwFu3SVDdHt+E+LOlhZUply11Aa+IVrT2KUQ=
-script:
-- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
diff --git a/vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md
deleted file mode 100644
index 9322b065e..000000000
--- a/vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
-advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at ivan+abuse@flanders.co.nz. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/go-openapi/jsonreference/LICENSE b/vendor/github.com/go-openapi/jsonreference/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/github.com/go-openapi/jsonreference/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/go-openapi/jsonreference/README.md b/vendor/github.com/go-openapi/jsonreference/README.md
deleted file mode 100644
index 66345f4c6..000000000
--- a/vendor/github.com/go-openapi/jsonreference/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# gojsonreference [](https://travis-ci.org/go-openapi/jsonreference) [](https://codecov.io/gh/go-openapi/jsonreference) [](https://slackin.goswagger.io)
-
-[](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) [](http://godoc.org/github.com/go-openapi/jsonreference)
-An implementation of JSON Reference - Go language
-
-## Status
-Work in progress ( 90% done )
-
-## Dependencies
-https://github.com/go-openapi/jsonpointer
-
-## References
-http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07
-
-http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03
diff --git a/vendor/github.com/go-openapi/jsonreference/go.mod b/vendor/github.com/go-openapi/jsonreference/go.mod
deleted file mode 100644
index aff1d0163..000000000
--- a/vendor/github.com/go-openapi/jsonreference/go.mod
+++ /dev/null
@@ -1,12 +0,0 @@
-module github.com/go-openapi/jsonreference
-
-require (
- github.com/PuerkitoBio/purell v1.1.1
- github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
- github.com/go-openapi/jsonpointer v0.19.3
- github.com/stretchr/testify v1.3.0
- golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect
- golang.org/x/text v0.3.2 // indirect
-)
-
-go 1.13
diff --git a/vendor/github.com/go-openapi/jsonreference/go.sum b/vendor/github.com/go-openapi/jsonreference/go.sum
deleted file mode 100644
index c7ceab580..000000000
--- a/vendor/github.com/go-openapi/jsonreference/go.sum
+++ /dev/null
@@ -1,44 +0,0 @@
-github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
-github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0=
-github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
-github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
-github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
-github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE=
-github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=
-github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
-golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/go-openapi/jsonreference/reference.go b/vendor/github.com/go-openapi/jsonreference/reference.go
deleted file mode 100644
index 3bc0a6e26..000000000
--- a/vendor/github.com/go-openapi/jsonreference/reference.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2013 sigu-399 ( https://github.com/sigu-399 )
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// author sigu-399
-// author-github https://github.com/sigu-399
-// author-mail sigu.399@gmail.com
-//
-// repository-name jsonreference
-// repository-desc An implementation of JSON Reference - Go language
-//
-// description Main and unique file.
-//
-// created 26-02-2013
-
-package jsonreference
-
-import (
- "errors"
- "net/url"
- "strings"
-
- "github.com/PuerkitoBio/purell"
- "github.com/go-openapi/jsonpointer"
-)
-
-const (
- fragmentRune = `#`
-)
-
-// New creates a new reference for the given string
-func New(jsonReferenceString string) (Ref, error) {
-
- var r Ref
- err := r.parse(jsonReferenceString)
- return r, err
-
-}
-
-// MustCreateRef parses the ref string and panics when it's invalid.
-// Use the New method for a version that returns an error
-func MustCreateRef(ref string) Ref {
- r, err := New(ref)
- if err != nil {
- panic(err)
- }
- return r
-}
-
-// Ref represents a json reference object
-type Ref struct {
- referenceURL *url.URL
- referencePointer jsonpointer.Pointer
-
- HasFullURL bool
- HasURLPathOnly bool
- HasFragmentOnly bool
- HasFileScheme bool
- HasFullFilePath bool
-}
-
-// GetURL gets the URL for this reference
-func (r *Ref) GetURL() *url.URL {
- return r.referenceURL
-}
-
-// GetPointer gets the json pointer for this reference
-func (r *Ref) GetPointer() *jsonpointer.Pointer {
- return &r.referencePointer
-}
-
-// String returns the best version of the url for this reference
-func (r *Ref) String() string {
-
- if r.referenceURL != nil {
- return r.referenceURL.String()
- }
-
- if r.HasFragmentOnly {
- return fragmentRune + r.referencePointer.String()
- }
-
- return r.referencePointer.String()
-}
-
-// IsRoot returns true if this reference is a root document
-func (r *Ref) IsRoot() bool {
- return r.referenceURL != nil &&
- !r.IsCanonical() &&
- !r.HasURLPathOnly &&
- r.referenceURL.Fragment == ""
-}
-
-// IsCanonical returns true when this pointer starts with http(s):// or file://
-func (r *Ref) IsCanonical() bool {
- return (r.HasFileScheme && r.HasFullFilePath) || (!r.HasFileScheme && r.HasFullURL)
-}
-
-// "Constructor", parses the given string JSON reference
-func (r *Ref) parse(jsonReferenceString string) error {
-
- parsed, err := url.Parse(jsonReferenceString)
- if err != nil {
- return err
- }
-
- r.referenceURL, _ = url.Parse(purell.NormalizeURL(parsed, purell.FlagsSafe|purell.FlagRemoveDuplicateSlashes))
- refURL := r.referenceURL
-
- if refURL.Scheme != "" && refURL.Host != "" {
- r.HasFullURL = true
- } else {
- if refURL.Path != "" {
- r.HasURLPathOnly = true
- } else if refURL.RawQuery == "" && refURL.Fragment != "" {
- r.HasFragmentOnly = true
- }
- }
-
- r.HasFileScheme = refURL.Scheme == "file"
- r.HasFullFilePath = strings.HasPrefix(refURL.Path, "/")
-
- // invalid json-pointer error means url has no json-pointer fragment. simply ignore error
- r.referencePointer, _ = jsonpointer.New(refURL.Fragment)
-
- return nil
-}
-
-// Inherits creates a new reference from a parent and a child
-// If the child cannot inherit from the parent, an error is returned
-func (r *Ref) Inherits(child Ref) (*Ref, error) {
- childURL := child.GetURL()
- parentURL := r.GetURL()
- if childURL == nil {
- return nil, errors.New("child url is nil")
- }
- if parentURL == nil {
- return &child, nil
- }
-
- ref, err := New(parentURL.ResolveReference(childURL).String())
- if err != nil {
- return nil, err
- }
- return &ref, nil
-}
diff --git a/vendor/github.com/go-openapi/spec/.editorconfig b/vendor/github.com/go-openapi/spec/.editorconfig
deleted file mode 100644
index 3152da69a..000000000
--- a/vendor/github.com/go-openapi/spec/.editorconfig
+++ /dev/null
@@ -1,26 +0,0 @@
-# top-most EditorConfig file
-root = true
-
-# Unix-style newlines with a newline ending every file
-[*]
-end_of_line = lf
-insert_final_newline = true
-indent_style = space
-indent_size = 2
-trim_trailing_whitespace = true
-
-# Set default charset
-[*.{js,py,go,scala,rb,java,html,css,less,sass,md}]
-charset = utf-8
-
-# Tab indentation (no size specified)
-[*.go]
-indent_style = tab
-
-[*.md]
-trim_trailing_whitespace = false
-
-# Matches the exact files either package.json or .travis.yml
-[{package.json,.travis.yml}]
-indent_style = space
-indent_size = 2
diff --git a/vendor/github.com/go-openapi/spec/.gitignore b/vendor/github.com/go-openapi/spec/.gitignore
deleted file mode 100644
index dd91ed6a0..000000000
--- a/vendor/github.com/go-openapi/spec/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-secrets.yml
-coverage.out
diff --git a/vendor/github.com/go-openapi/spec/.golangci.yml b/vendor/github.com/go-openapi/spec/.golangci.yml
deleted file mode 100644
index 3e33f9f2e..000000000
--- a/vendor/github.com/go-openapi/spec/.golangci.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-linters-settings:
- govet:
- check-shadowing: true
- golint:
- min-confidence: 0
- gocyclo:
- min-complexity: 45
- maligned:
- suggest-new: true
- dupl:
- threshold: 200
- goconst:
- min-len: 2
- min-occurrences: 2
-
-linters:
- enable-all: true
- disable:
- - maligned
- - unparam
- - lll
- - gochecknoinits
- - gochecknoglobals
diff --git a/vendor/github.com/go-openapi/spec/.travis.yml b/vendor/github.com/go-openapi/spec/.travis.yml
deleted file mode 100644
index aa26d8763..000000000
--- a/vendor/github.com/go-openapi/spec/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-after_success:
-- bash <(curl -s https://codecov.io/bash)
-go:
-- 1.11.x
-- 1.12.x
-install:
-- GO111MODULE=off go get -u gotest.tools/gotestsum
-env:
-- GO111MODULE=on
-language: go
-notifications:
- slack:
- secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E=
-script:
-- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
diff --git a/vendor/github.com/go-openapi/spec/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/spec/CODE_OF_CONDUCT.md
deleted file mode 100644
index 9322b065e..000000000
--- a/vendor/github.com/go-openapi/spec/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
-advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at ivan+abuse@flanders.co.nz. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/go-openapi/spec/LICENSE b/vendor/github.com/go-openapi/spec/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/github.com/go-openapi/spec/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/go-openapi/spec/README.md b/vendor/github.com/go-openapi/spec/README.md
deleted file mode 100644
index 6354742cb..000000000
--- a/vendor/github.com/go-openapi/spec/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# OAI object model [](https://travis-ci.org/go-openapi/spec) [](https://codecov.io/gh/go-openapi/spec) [](https://slackin.goswagger.io)
-
-[](https://raw.githubusercontent.com/go-openapi/spec/master/LICENSE)
-[](http://godoc.org/github.com/go-openapi/spec)
-[](https://golangci.com)
-[](https://goreportcard.com/report/github.com/go-openapi/spec)
-
-The object model for OpenAPI specification documents.
-
-Currently supports Swagger 2.0.
diff --git a/vendor/github.com/go-openapi/spec/bindata.go b/vendor/github.com/go-openapi/spec/bindata.go
deleted file mode 100644
index 66b1f3263..000000000
--- a/vendor/github.com/go-openapi/spec/bindata.go
+++ /dev/null
@@ -1,297 +0,0 @@
-// Code generated by go-bindata. DO NOT EDIT.
-// sources:
-// schemas/jsonschema-draft-04.json (4.357kB)
-// schemas/v2/schema.json (40.248kB)
-
-package spec
-
-import (
- "bytes"
- "compress/gzip"
- "crypto/sha256"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
- "time"
-)
-
-func bindataRead(data []byte, name string) ([]byte, error) {
- gz, err := gzip.NewReader(bytes.NewBuffer(data))
- if err != nil {
- return nil, fmt.Errorf("read %q: %v", name, err)
- }
-
- var buf bytes.Buffer
- _, err = io.Copy(&buf, gz)
- clErr := gz.Close()
-
- if err != nil {
- return nil, fmt.Errorf("read %q: %v", name, err)
- }
- if clErr != nil {
- return nil, err
- }
-
- return buf.Bytes(), nil
-}
-
-type asset struct {
- bytes []byte
- info os.FileInfo
- digest [sha256.Size]byte
-}
-
-type bindataFileInfo struct {
- name string
- size int64
- mode os.FileMode
- modTime time.Time
-}
-
-func (fi bindataFileInfo) Name() string {
- return fi.name
-}
-func (fi bindataFileInfo) Size() int64 {
- return fi.size
-}
-func (fi bindataFileInfo) Mode() os.FileMode {
- return fi.mode
-}
-func (fi bindataFileInfo) ModTime() time.Time {
- return fi.modTime
-}
-func (fi bindataFileInfo) IsDir() bool {
- return false
-}
-func (fi bindataFileInfo) Sys() interface{} {
- return nil
-}
-
-var _jsonschemaDraft04Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x57\x3d\x6f\xdb\x3c\x10\xde\xf3\x2b\x08\x26\x63\xf2\x2a\x2f\xd0\xc9\x5b\xd1\x2e\x01\x5a\x34\x43\x37\x23\x03\x6d\x9d\x6c\x06\x14\xa9\x50\x54\x60\xc3\xd0\x7f\x2f\x28\x4a\x14\x29\x91\x92\x2d\xa7\x8d\x97\x28\xbc\xaf\xe7\x8e\xf7\xc5\xd3\x0d\x42\x08\x61\x9a\xe2\x15\xc2\x7b\xa5\x8a\x55\x92\xbc\x96\x82\x3f\x94\xdb\x3d\xe4\xe4\x3f\x21\x77\x49\x2a\x49\xa6\x1e\x1e\xbf\x24\xe6\xec\x16\xdf\x1b\xa1\x3b\xf3\xff\x02\xc9\x14\xca\xad\xa4\x85\xa2\x82\x6b\xe9\x6f\x42\x02\x32\x2c\x28\x07\x45\x5a\x15\x3d\x77\x46\x39\xd5\xcc\x25\x5e\x21\x83\xb8\x21\x18\xb6\xaf\x52\x92\xa3\x47\x68\x88\xea\x58\x80\x56\x4e\x1a\xf2\xbd\x4f\xcc\x29\x7f\x52\x90\x6b\x7d\xff\x0f\x48\xb4\x3d\x3f\x21\x7c\x27\x21\xd3\x2a\x6e\x31\xaa\x2d\x53\xdd\xf3\xe3\x42\x94\x54\xd1\x77\x78\xe2\x0a\x76\x20\xe3\x20\x68\xcb\x30\x86\x41\xf3\x2a\xc7\x2b\xf4\x78\x8e\xfe\xef\x90\x91\x8a\xa9\xc7\xb1\x1d\xc2\xd8\x2f\x0d\x75\xed\xc1\x4e\x9c\xc8\x25\x43\xac\xa8\xbe\xd7\xcc\xa9\xd1\xa9\x21\xa0\x1a\xbd\x04\x61\x94\x34\x2f\x18\xfc\x3e\x16\x50\x8e\x4d\x03\x6f\x1c\x58\xdb\x48\x23\xbc\x11\x82\x01\xe1\xfa\xd3\x3a\x8e\x30\xaf\x18\x33\x7f\xf3\x8d\x39\x11\x9b\x57\xd8\x2a\xfd\x55\x2a\x49\xf9\x0e\xc7\xec\x37\xd4\x25\xf7\xec\x5c\x66\xc7\xd7\x99\xaa\xcf\x4f\x89\x8a\xd3\xb7\x0a\x3a\xaa\x92\x15\xf4\x30\x6f\x1c\xb0\xd6\x46\xe7\x98\x39\x2d\xa4\x28\x40\x2a\x3a\x88\x9e\x29\xba\x88\x37\x2d\xca\x60\x38\xfa\xba\x5b\x20\xac\xa8\x62\xb0\x4c\xd4\xaf\xda\x45\x0a\xba\x5c\x3b\xb9\xc7\x79\xc5\x14\x2d\x18\x34\x19\x1c\x51\xdb\x25\x4d\xb4\x7e\x06\x14\x38\x6c\x59\x55\xd2\x77\xf8\x69\x59\xfc\x7b\x73\xed\x93\x43\xcb\x32\x6d\x3c\x28\xdc\x1b\x9a\xd3\x62\xab\xc2\x27\xf7\x41\xc9\x08\x2b\x23\x08\xad\x13\x57\x21\x9c\xd3\x72\x0d\x42\x72\xf8\x01\x7c\xa7\xf6\x83\xce\x39\xd7\x82\x3c\x1f\x2f\xd6\x60\x1b\xa2\xdf\x35\x89\x52\x20\xe7\x73\x74\xe0\x66\x26\x64\x4e\xb4\x97\x58\xc2\x0e\x0e\xe1\x60\x92\x34\x6d\xa0\x10\xd6\xb5\x83\x61\x27\xe6\x47\xd3\x89\xbd\x63\xfd\x3b\x8d\x03\x3d\x6c\x42\x2d\x5b\x70\xee\xe8\xdf\x4b\xf4\x66\x4e\xe1\x01\x45\x17\x80\x74\xad\x4f\xc3\xf3\xae\xc6\x1d\xc6\xd7\xc2\xce\xc9\xe1\x29\x30\x86\x2f\x4a\xa6\x4b\x15\x84\x73\xc9\x6f\xfd\x7f\xa5\x6e\x9e\xbd\xf1\xb0\xd4\xdd\x45\x5a\xc2\x3e\x4b\x78\xab\xa8\x84\x74\x4a\x91\x3b\x92\x23\x05\xf2\x1c\x1e\x7b\xf3\x09\xf8\xcf\xab\x24\xb6\x60\xa2\xe8\x4c\x9f\x75\x77\xaa\x8c\xe6\x01\x45\x36\x86\xcf\xc3\x63\x3a\xea\xd4\x8d\x7e\x06\xac\x14\x0a\xe0\x29\xf0\xed\x07\x22\x1a\x65\xda\x44\xae\xa2\x73\x1a\xe6\x90\x69\xa2\x8c\x46\xb2\x2f\xde\x49\x38\x08\xed\xfe\xfd\x41\xaf\x9f\xa9\x55\xd7\xdd\x22\x8d\xfa\x45\x63\xc5\x0f\x80\xf3\xb4\x08\xd6\x79\x30\x9e\x93\xee\x59\xa6\xd0\x4b\xee\x22\xe3\x33\xc1\x3a\x27\x68\x36\x78\x7e\x87\x0a\x06\xd5\x2e\x20\xd3\xaf\x15\xfb\xd8\x3b\x73\x14\xbb\x92\xed\x05\x5d\x2e\x29\x38\x2c\x94\xe4\x42\x45\x5e\xd3\xb5\x7d\xdf\x47\xca\x38\xb4\x5c\xaf\xfb\x7d\xdd\x6d\xf4\xa1\x2d\x77\xdd\x2f\xce\x6d\xc4\x7b\x8b\x4e\x67\xa9\x6f\xfe\x04\x00\x00\xff\xff\xb1\xd1\x27\x78\x05\x11\x00\x00")
-
-func jsonschemaDraft04JsonBytes() ([]byte, error) {
- return bindataRead(
- _jsonschemaDraft04Json,
- "jsonschema-draft-04.json",
- )
-}
-
-func jsonschemaDraft04Json() (*asset, error) {
- bytes, err := jsonschemaDraft04JsonBytes()
- if err != nil {
- return nil, err
- }
-
- info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(0640), modTime: time.Unix(1568963823, 0)}
- a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe1, 0x48, 0x9d, 0xb, 0x47, 0x55, 0xf0, 0x27, 0x93, 0x30, 0x25, 0x91, 0xd3, 0xfc, 0xb8, 0xf0, 0x7b, 0x68, 0x93, 0xa8, 0x2a, 0x94, 0xf2, 0x48, 0x95, 0xf8, 0xe4, 0xed, 0xf1, 0x1b, 0x82, 0xe2}}
- return a, nil
-}
-
-var _v2SchemaJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5d\x4f\x93\xdb\x36\xb2\xbf\xfb\x53\xa0\x14\x57\xd9\xae\xd8\x92\xe3\xf7\x2e\xcf\x97\xd4\xbc\xd8\x49\x66\x37\x5e\x4f\x79\x26\xbb\x87\x78\x5c\x05\x91\x2d\x09\x09\x09\x30\x00\x38\x33\x5a\xef\x7c\xf7\x2d\xf0\x9f\x08\x02\x20\x41\x8a\xd2\xc8\x0e\x0f\xa9\x78\x28\xa0\xd1\xdd\x68\x34\x7e\xdd\xf8\xf7\xf9\x11\x42\x33\x49\x64\x04\xb3\xd7\x68\x76\x86\xfe\x76\xf9\xfe\x1f\xe8\x32\xd8\x40\x8c\xd1\x8a\x71\x74\x79\x8b\xd7\x6b\xe0\xe8\xd5\xfc\x25\x3a\xbb\x38\x9f\xcf\x9e\xab\x0a\x24\x54\xa5\x37\x52\x26\xaf\x17\x0b\x91\x17\x99\x13\xb6\xb8\x79\xb5\x10\x59\xdd\xf9\xef\x82\xd1\x6f\xf2\xc2\x8f\xf3\x4f\xb5\x1a\xea\xc7\x17\x45\x41\xc6\xd7\x8b\x90\xe3\x95\x7c\xf1\xf2\x7f\x8b\xca\x45\x3d\xb9\x4d\x32\xa6\xd8\xf2\x77\x08\x64\xfe\x8d\xc3\x9f\x29\xe1\xa0\x9a\xff\xed\x11\x42\x08\xcd\x8a\xd6\xb3\x9f\x15\x67\x74\xc5\xca\x7f\x27\x58\x6e\xc4\xec\x11\x42\xd7\x59\x5d\x1c\x86\x44\x12\x46\x71\x74\xc1\x59\x02\x5c\x12\x10\xb3\xd7\x68\x85\x23\x01\x59\x81\x04\x4b\x09\x9c\x6a\xbf\x7e\xce\x49\x7d\xba\x7b\x51\xfd\xa1\x44\xe2\xb0\x52\xac\x7d\xb3\x08\x61\x45\x68\x46\x56\x2c\x6e\x80\x86\x8c\xbf\xbd\x93\x40\x05\x61\x74\x96\x95\xbe\x7f\x84\xd0\x7d\x4e\xde\x42\xb7\xe4\xbe\x46\xbb\x14\x5b\x48\x4e\xe8\xba\x90\x05\xa1\x19\xd0\x34\xae\xc4\xce\xbe\xbc\x9a\xbf\x9c\x15\x7f\x5d\x57\xc5\x42\x10\x01\x27\x89\xe2\x48\x51\xb9\xda\x40\xd5\x87\x37\xc0\x15\x5f\x88\xad\x90\xdc\x10\x81\x42\x16\xa4\x31\x50\x39\x2f\x38\xad\xab\xb0\x53\xd8\xac\x94\x56\x6f\xc3\x84\xf4\x11\xa4\x50\xb3\xfa\xe9\xd3\x6f\x9f\x3e\xdf\x2f\xd0\xeb\x8f\x1f\x3f\x7e\xbc\xfe\xf6\xe9\xf7\xaf\x5f\x7f\xfc\x18\x7e\xfb\xec\xfb\xc7\xb3\x36\x79\x54\x43\xe8\x29\xc5\x31\x20\xc6\x11\x49\x9e\xe5\x12\x41\x66\xa0\xe8\xed\x1d\x8e\x93\x08\x5e\xa3\x27\x3b\xc3\x7c\xa2\x73\xba\xc4\x02\x2e\xb0\xdc\xf4\xe5\x76\xd1\xca\x96\xa2\x8a\x94\xcd\x21\xc9\x6c\xec\x2c\x70\x42\x9e\x34\x74\x9d\x19\x7c\xcd\x20\x9c\xea\x2e\x0a\xfe\x42\x84\xd4\x29\x04\x8c\x8a\xb4\x41\xa2\xc1\xdc\x19\x8a\x88\x90\x4a\x49\xef\xce\xdf\xbd\x45\x4a\x52\x81\x70\x10\x40\x22\x21\x44\xcb\x6d\xc5\xec\x4e\x3c\x1c\x45\xef\x57\x9a\xb5\x7d\xae\xfe\xe5\xe4\x31\x86\x90\xe0\xab\x6d\x02\x3b\x2e\xcb\x11\x90\xd9\xa8\xc6\x77\xc2\x59\x98\x06\xfd\xf9\x2e\x78\x45\x01\xa6\xa8\xa0\x71\x5c\xbe\x33\xa7\xd2\xd9\x5f\x95\xef\xd9\xd5\xac\xfd\xdc\x5d\xbf\x5e\xb8\xd1\x3e\xc7\x31\x48\xe0\x5e\x4c\x14\x65\xdf\xb8\xa8\x71\x10\x09\xa3\xc2\xc7\x02\xcb\xa2\x4e\x5a\x02\x82\x94\x13\xb9\xf5\x30\xe6\xb2\xa4\xb5\xfe\x9b\x3e\x7a\xb2\x55\xd2\xa8\x4a\xbc\x16\xb6\x71\x8e\x39\xc7\xdb\x9d\xe1\x10\x09\x71\xbd\x9c\xb3\x41\x89\xd7\xa5\x89\xdc\x57\xb5\x53\x4a\xfe\x4c\xe1\xbc\xa0\x21\x79\x0a\x1a\x0f\x70\xa7\x5c\x08\x8e\xde\xb0\xc0\x43\x24\xad\x74\x63\x0e\xb1\xd9\x90\xe1\xb0\x2d\x13\xa7\x6d\x78\xfd\x04\x14\x38\x8e\x90\xaa\xce\x63\xac\x3e\x23\xbc\x64\xa9\xb4\xf8\x03\x63\xde\xcd\xbe\x16\x13\x4a\x55\xac\x82\x12\xc6\xac\xd4\x35\xf7\x22\xd4\x3a\xff\x22\x73\x0e\x6e\x51\xa0\x75\x1e\xae\x8f\xe8\x5d\xc7\x59\xe6\xe4\x9a\x18\x8d\xd6\x1c\x53\x84\x4d\xb7\x67\x28\x37\x09\x84\x69\x88\x12\x0e\x01\x11\x80\x32\xa2\xf5\xb9\xaa\xc6\xd9\x73\x53\xab\xfb\xb4\x2e\x20\xc6\x54\x92\xa0\x9a\xf3\x69\x1a\x2f\x81\x77\x37\xae\x53\x1a\xce\x40\xc4\xa8\x82\x1c\xb5\xef\xda\x24\x7d\xb9\x61\x69\x14\xa2\x25\xa0\x90\xac\x56\xc0\x81\x4a\xb4\xe2\x2c\xce\x4a\x64\x7a\x9a\x23\xf4\x13\x91\x3f\xa7\x4b\xf4\x63\x84\x6f\x18\x87\x10\xbd\xc3\xfc\x8f\x90\xdd\x52\x44\x04\xc2\x51\xc4\x6e\x21\x74\x48\x21\x81\xc7\xe2\xfd\xea\x12\xf8\x0d\x09\xf6\xe9\x47\x35\xaf\x67\xc4\x14\xf7\x22\x27\x97\xe1\xe2\x76\x2d\x06\x8c\x4a\x1c\x48\x3f\x73\x2d\x0b\x5b\x29\x45\x24\x00\x2a\x0c\x11\xec\x94\xca\xc2\xa6\xc1\x37\x21\x43\x83\x3b\x5f\x97\xf1\x43\x5e\x53\x73\x19\xa5\x36\xd8\x2d\x05\x2e\x34\x0b\xeb\x39\xfc\x1d\x63\x51\x01\xbd\x3d\xbb\x90\x84\x40\x25\x59\x6d\x09\x5d\xa3\x1c\x37\xe6\x5c\x16\x9a\x40\x09\x70\xc1\xe8\x82\xf1\x35\xa6\xe4\xdf\x99\x5c\x8e\x9e\x4d\x79\xb4\x27\x2f\xbf\x7e\xf8\x05\x25\x8c\x50\xa9\x98\x29\x90\x62\x60\xea\x75\xae\x13\xca\xbf\x2b\x1a\x29\x27\x76\xd6\x20\xc6\x64\x5f\xe6\x32\x1a\x08\x87\x21\x07\x21\xbc\xb4\xe4\xe0\x32\x67\xa6\xcd\xf3\x1e\xcd\xd9\x6b\xb6\x6f\x8e\x27\xa7\xed\xdb\xe7\xbc\xcc\x1a\x07\xce\x6f\x87\x33\xf0\xba\x51\x17\x22\x66\x78\x79\x8e\xce\xe5\x13\x81\x80\x06\x2c\xe5\x78\x0d\xa1\xb2\xb8\x54\xa8\x79\x09\xbd\xbf\x3c\x47\x01\x8b\x13\x2c\xc9\x32\xaa\xaa\x1d\xd5\xee\xab\x36\xbd\x6c\xfd\x54\x6c\xc8\x08\x01\x3c\xbd\xe7\x07\x88\xb0\x24\x37\x79\x90\x28\x4a\x1d\x10\x1a\x92\x1b\x12\xa6\x38\x42\x40\xc3\x4c\x43\x62\x8e\xae\x36\xb0\x45\x71\x2a\xa4\x9a\x23\x79\x59\xb1\xa8\xf2\xa4\x0c\x60\x9f\xcc\x8d\x40\xf5\x80\xca\xa8\x99\xc3\xa7\x85\x1f\x31\x25\xa9\x82\xc5\x6d\xbd\xd8\x36\x76\x7c\x02\x28\x97\xf6\x1d\x74\x3b\x11\x7e\x91\xae\x32\xf8\x6c\xf4\xe6\x7b\x9a\xa5\x1f\x62\xc6\x21\xcf\x9a\xe5\xed\x8b\x02\xf3\x2c\x33\x33\xdf\x00\xca\xc9\x09\xb4\x04\xf5\xa5\x08\xd7\xc3\x02\x18\x66\xf1\xab\x1e\x83\x37\x4c\xcd\x12\xc1\x1d\x50\xf6\xaa\xbd\xfe\xe2\x73\x48\x38\x08\xa0\x32\x9b\x18\x44\x86\x0b\x6a\xc1\xaa\x26\x96\x2d\x96\x3c\xa0\x54\x65\x73\xe3\x08\xb5\x8b\x99\xbd\x82\xbc\x9e\xc2\xe8\x53\x46\x83\x3f\x33\x54\x2b\x5b\xad\x92\x79\xd9\x8f\x5d\x93\x98\xf2\xe6\xc6\x1c\xe6\x9a\x9e\xfc\x43\x82\x31\x66\x8e\x53\x77\xfe\x90\xe7\xf3\xf6\xe9\x62\x23\x3f\x10\x93\x18\xae\x72\x1a\x9d\xf9\x48\xcb\xcc\x5a\x65\xc7\x4a\x04\xf0\xf3\xd5\xd5\x05\x8a\x41\x08\xbc\x86\x86\x43\x51\x6c\xe0\x46\x57\xf6\x44\x40\x0d\xfb\xff\xa2\xc3\x7c\x3d\x39\x84\xdc\x09\x22\x64\x4f\x12\xd9\xba\xaa\xf6\xe3\xbd\x56\xdd\x91\x25\x6a\x14\x9c\x89\x34\x8e\x31\xdf\xee\x15\x7e\x2f\x39\x81\x15\x2a\x28\x95\x66\x51\xf5\xfd\x83\xc5\xfe\x15\x07\xcf\xf7\x08\xee\x1d\x8e\xb6\xc5\x52\xcc\x8c\x5a\x93\x66\xc5\xd8\x79\x38\x46\xd6\xa7\x88\x37\xc9\x2e\xe3\xd2\xa5\x7b\x4b\x3a\xdc\xa1\xdc\x9e\x29\xf1\x8c\x8a\x99\x16\x47\x8d\xd4\x78\x8b\xf6\x1c\xe9\x71\x54\x1b\x69\xa8\x4a\x93\x37\xe5\xb2\x2c\x4f\x0c\x92\xab\xa0\x73\x32\x72\x59\xd3\xf0\x2d\x8d\xed\xca\x37\x16\x19\x9e\xdb\x1c\xab\x17\x49\xc3\x0f\x37\xdc\x88\xb1\xb4\xd4\x42\xcb\x58\x5e\x6a\x52\x0b\x15\x10\x0a\xb0\x04\xe7\xf8\x58\x32\x16\x01\xa6\xcd\x01\xb2\xc2\x69\x24\x35\x38\x6f\x30\x6a\xae\x1b\xb4\x71\xaa\xad\x1d\xa0\xd6\x20\x2d\x8b\x3c\xc6\x82\x62\x27\x34\x6d\x15\x84\x7b\x43\xb1\x35\x78\xa6\x24\x77\x28\xc1\x6e\xfc\xe9\x48\x74\xf4\x15\xe3\xe1\x84\x42\x88\x40\x7a\x26\x49\x3b\x48\xb1\xa4\x19\x8e\x0c\xa7\xb5\x01\x6c\x0c\x97\x61\x8a\xc2\x32\xd8\x8c\x44\x69\x24\xbf\x65\x1d\x74\xd6\xe5\x44\xef\xec\x48\x5e\xb7\x8a\xa3\x29\x8e\x41\x64\xce\x1f\x88\xdc\x00\x47\x4b\x40\x98\x6e\xd1\x0d\x8e\x48\x98\x63\x5c\x21\xb1\x4c\x05\x0a\x58\x98\xc5\x6d\x4f\x0a\x77\x53\x4f\x8b\xc4\x44\x1f\xb2\xdf\x8d\x3b\xea\x9f\xfe\xf6\xf2\xc5\xff\x5d\x7f\xfe\x9f\xfb\x67\x8f\xff\xf3\xe9\x69\xd1\xfe\xb3\xc7\xfd\x3c\xf8\x3f\x71\x94\x82\x23\xd1\x72\x00\xb7\x42\x99\x6c\xc0\x60\x7b\x0f\x79\xea\xa8\x53\x4b\x56\x31\xfa\x0b\x52\x9f\x96\xdb\xcd\x2f\xd7\x67\xcd\x04\x19\x85\xfe\xdb\x02\x9a\x59\x03\xad\x63\x3c\xea\xff\x2e\x18\xfd\x00\xd9\xe2\x56\x60\x59\x93\xb9\xb6\xb2\x3e\x3c\x2c\xab\x0f\xa7\xb2\x89\x43\xc7\xf6\xd5\xce\x2e\xad\xa6\xa9\xed\xa6\xc6\x5a\xb4\xa6\x67\xdf\x8c\x26\x7b\x50\x5a\x91\x08\x2e\x6d\xd4\x3a\xc1\x9d\xf2\xdb\xde\x1e\xb2\x2c\x6c\xa5\x64\xc9\x16\xb4\x90\xaa\x4a\xb7\x0c\xde\x13\xc3\x2a\x9a\x11\x9b\x7a\x1b\x3d\x95\x97\x37\x31\x6b\x69\x7e\x34\xc0\x67\x1f\x66\x19\x49\xef\xf1\x25\xf5\xac\x0e\xea\x0a\x28\x8d\x4d\x7e\xd9\x57\x4b\x49\xe5\xc6\xb3\x25\xfd\xe6\x57\x42\x25\xac\xcd\xcf\x36\x74\x8e\xca\x24\x47\xe7\x80\xa8\x92\x72\xbd\x3d\x84\x2d\x65\xe2\x82\x1a\x9c\xc4\x44\x92\x1b\x10\x79\x8a\xc4\x4a\x2f\x60\x51\x04\x81\xaa\xf0\xa3\x95\x27\xd7\x12\x7b\xa3\x96\x03\x45\x96\xc1\x8a\x07\xc9\xb2\xb0\x95\x52\x8c\xef\x48\x9c\xc6\x7e\x94\xca\xc2\x0e\x07\x12\x44\xa9\x20\x37\xf0\xae\x0f\x49\xa3\x96\x9d\x4b\x42\x7b\x70\x59\x14\xee\xe0\xb2\x0f\x49\xa3\x96\x4b\x97\xbf\x00\x5d\x4b\x4f\xfc\xbb\x2b\xee\x92\xb9\x17\xb5\xaa\xb8\x0b\x97\x17\x9b\x43\xfd\xd6\xc2\xb2\xc2\x2e\x29\xcf\xfd\x87\x4a\x55\xda\x25\x63\x1f\x5a\x65\x69\x2b\x2d\x3d\x67\xe9\x41\xae\x5e\xc1\x6e\x2b\xd4\xdb\x3e\xa8\xd3\x26\xd2\x48\x92\x24\xca\x61\x86\x8f\x8c\xbb\xf2\x8e\x91\xdf\x1f\x06\x19\x33\xf3\x03\x4d\xba\xcd\xe2\x2d\xfb\x69\xe9\x16\x15\x13\xd5\x56\x85\x4e\x3c\x5b\x8a\xbf\x25\x72\x83\xee\x5e\x20\x22\xf2\xc8\xaa\x7b\xdb\x8e\xe4\x29\x58\xca\x38\xb7\x3f\x2e\x59\xb8\xbd\xa8\x16\x16\xf7\xdb\x79\x51\x9f\x5a\xb4\x8d\x87\x3a\x6e\xbc\x3e\xc5\xb4\xcd\x58\xf9\xf5\x3c\xb9\x6f\x49\xaf\x57\xc1\xfa\x1c\x5d\x6d\x88\x8a\x8b\xd3\x28\xcc\xb7\xef\x10\x8a\x4a\x74\xa9\x4a\xa7\x62\xbf\x0d\x76\x23\x6f\x59\xd9\x31\xee\x40\x11\xfb\x28\xec\x8d\x22\x1c\x13\x5a\x64\x94\x23\x16\x60\xbb\xd2\x7c\xa0\x98\xb2\xe5\x6e\xbc\x54\x33\xe0\x3e\xb9\x52\x17\xdb\xb7\x1b\xc8\x12\x20\x8c\x23\xca\x64\x7e\x78\xa3\x62\x5b\x75\x56\xd9\x9e\x2a\x91\x27\xb0\x70\x34\x1f\x90\x89\xb5\x86\x73\x7e\x71\xda\x1e\xfb\x3a\x72\xdc\x5e\x79\x88\xcb\x74\x79\xd9\x64\xe4\xd4\xc2\x9e\xce\xb1\xfe\x85\x5a\xc0\xe9\x0c\x34\x3d\xd0\x43\xce\xa1\x36\x39\xd5\xa1\x4e\xf5\xf8\xb1\xa9\x23\x08\x75\x84\xac\x53\x6c\x3a\xc5\xa6\x53\x6c\x3a\xc5\xa6\x7f\xc5\xd8\xf4\x51\xfd\xff\x25\x4e\xfa\x33\x05\xbe\x9d\x60\xd2\x04\x93\x6a\x5f\x33\x9b\x98\x50\xd2\xe1\x50\x52\xc6\xcc\xdb\x38\x91\xdb\xe6\xaa\xa2\x8f\xa1\x6a\xa6\xd4\xc6\x56\xd6\x8c\x40\x02\x68\x48\xe8\x1a\xe1\x9a\xd9\x2e\xb7\x05\xc3\x34\xda\x2a\xbb\xcd\x12\x36\x98\x22\x50\x4c\xa1\x1b\xc5\xd5\x84\xf0\xbe\x24\x84\xf7\x2f\x22\x37\xef\x94\xd7\x9f\xa0\xde\x04\xf5\x26\xa8\x37\x41\x3d\x64\x40\x3d\xe5\xf2\xde\x60\x89\x27\xb4\x37\xa1\xbd\xda\xd7\xd2\x2c\x26\xc0\x37\x01\x3e\x1b\xef\x5f\x06\xe0\x6b\x7c\x5c\x91\x08\x26\x10\x38\x81\xc0\x09\x04\x76\x4a\x3d\x81\xc0\xbf\x12\x08\x4c\xb0\xdc\x7c\x99\x00\xd0\x75\x70\xb4\xf8\x5a\x7c\xea\xde\x3e\x39\x08\x30\x5a\x27\x35\xed\xb4\x65\xad\x69\x74\x10\x88\x79\xe2\x30\x52\x19\xd6\x04\x21\xa7\x95\xd5\x0e\x03\xf8\xda\x20\xd7\x84\xb4\x26\xa4\x35\x21\xad\x09\x69\x21\x03\x69\x51\x46\xff\xff\x18\x9b\x54\xed\x87\x47\x06\x9d\x4e\x73\x6e\x9a\xb3\xa9\xce\x83\x5e\x4b\xc6\x71\x20\x45\xd7\x72\xf5\x40\x72\x0e\x34\x6c\xf4\x6c\xf3\xba\x5e\x4b\x97\x0e\x52\xb8\xbe\x8b\x79\xa0\x10\x86\xa1\x75\xb0\x6f\xec\xc8\xf4\x3d\x4d\x7b\x86\xc2\x02\x31\x12\x51\xbf\x07\x94\xad\x10\xd6\x2e\x79\xcf\xe9\x1c\xf5\x1e\x31\x23\x5c\x18\xfb\x9c\xfb\x70\xe0\x62\xbd\xf7\xb5\x94\xcf\xf3\xf6\xfa\xc5\x4e\x9c\x85\x76\x1d\xae\x37\xbc\xde\xa3\x41\xcb\x29\xd0\x5e\x70\x67\x50\x93\x6d\x98\xa8\xd3\x67\x0f\x68\xb1\xeb\x38\x47\x07\x10\x1b\xd2\xe2\x18\x68\x6d\x40\xbb\xa3\x40\xba\x21\xf2\x8e\x81\xfb\xf6\x92\x77\x2f\x70\xe8\xdb\xb2\x36\xbf\x30\x91\xc5\x21\xe7\x45\xcc\x34\x0c\x48\x8e\xd0\xf2\x9b\x7c\x3c\xbd\x1c\x04\x3e\x07\xe8\x7c\x2f\x84\x7a\x48\x4d\x1f\xba\xe1\x76\x45\x7b\x60\xe0\x01\xca\xee\x04\xca\x31\xbe\x73\x5f\xa3\x70\x0c\xad\x1f\xa5\xf5\x76\xd5\xbb\xd2\x7e\xfb\x30\x90\xcf\xfa\x67\x7a\xe6\xc3\x37\x42\x19\xe2\xc9\x9c\x61\x4c\xe7\xd1\x77\x55\x86\x6e\x8f\x7b\x85\x42\x33\xa3\xaa\x57\xae\xfd\xd5\xcc\x9c\x56\x68\xe2\xde\x0e\xa8\x2c\xa9\xb0\x7d\xf0\x54\x2d\x80\xf2\x48\x39\x3d\x98\x1a\x6d\x0b\x9d\xba\x53\xfb\xce\xf8\xd1\x7e\xbb\x60\x4f\x06\xf5\xce\xda\xab\xeb\xca\xcb\xd5\xac\x20\xda\x72\x3b\xa2\x4b\x38\xd7\xb5\x89\xbe\x42\xd9\xb9\x73\xc4\x0c\x6d\xb7\xd9\xf8\x8d\xbd\x3e\x9c\xf5\x53\x68\x48\x14\x36\x8f\x09\xc5\x92\xf1\x21\xd1\x09\x07\x1c\xbe\xa7\x91\xf3\x6a\xc8\xc1\x57\xb0\xdd\xc5\xc6\x1d\xad\x76\x1d\xa8\x82\x0e\x4c\x38\xfe\xa5\x8c\xc5\x0a\x40\x5d\xa1\xbb\x98\xd1\xfb\x74\x61\xed\x1a\x98\xaf\x3c\x8c\x1e\xe3\xc2\x92\x29\x74\x3e\x99\xd0\xf9\x41\x50\xd0\x38\x4b\x57\x7e\x5b\x7a\x0e\xe6\xce\x4e\xd7\x19\x35\x57\xbb\x3c\x3c\xd2\x5e\x4f\x4b\x4c\xf7\x0f\x4d\x2b\x91\x5d\x94\xa6\x95\xc8\x69\x25\x72\x5a\x89\x7c\xb8\x95\xc8\x07\x80\x8c\xda\x9c\x64\x7b\xb7\x71\xdf\x57\x12\x4b\x9a\x1f\x72\x0c\x13\x03\xad\x3c\xd5\x4e\xde\x8e\x57\x13\x6d\x34\x86\xcf\x97\xe6\xa4\x68\xc4\xb0\xf6\xc9\xc2\xeb\x8d\x0b\xd7\xcd\xfe\xba\xa6\xf5\x30\xeb\x30\x33\xbe\xc7\x56\x27\xab\x08\xd9\x6d\xbb\x09\xee\x7c\x2d\xcf\xee\x87\x38\xac\xc8\xdd\x90\x9a\x58\x4a\x4e\x96\xa9\x79\x79\xf3\xde\x20\xf0\x96\xe3\x24\x19\xeb\xba\xf2\x53\x19\xab\x12\xaf\x47\xb3\xa0\x3e\xef\x9b\x8d\x6d\x6d\x7b\xde\x3b\x3b\x1a\xc0\x3f\x95\x7e\xed\x78\xfb\x76\xb8\xaf\xb3\xdd\xc5\xeb\x95\xed\x5a\x62\x41\x82\xb3\x54\x6e\x80\x4a\x92\x6f\x36\xbd\x34\xae\xde\x6f\xa4\xc0\xbc\x08\xe3\x84\xfc\x1d\xb6\xe3\xd0\x62\x38\x95\x9b\x57\xe7\x71\x12\x91\x80\xc8\x31\x69\x5e\x60\x21\x6e\x19\x0f\xc7\xa4\x79\x96\x28\x3e\x47\x54\x65\x41\x36\x08\x40\x88\x1f\x58\x08\x56\xaa\xd5\xbf\xaf\xad\x96\xd7\xd6\xcf\x87\xf5\x34\x0f\x71\x93\x6e\x26\xed\x98\x5b\x9f\x4f\xcf\x95\x34\xc6\xd7\x11\xfa\xb0\x81\x22\x1a\xdb\xdf\x8e\xdc\xc3\xb9\xf8\xdd\x5d\x3c\x74\xe6\xea\xb7\x8b\xbf\xf5\x6e\xb3\x46\x2e\x64\xf4\xab\x3c\x4e\xcf\x36\x1d\xfe\xfa\xb8\x36\xba\x8a\xd8\xad\xf6\xc6\x41\x2a\x37\x8c\x17\x0f\xda\xfe\xda\xe7\x65\xbc\x71\x2c\x36\x57\x8a\x47\x12\x4c\xf1\xbd\x77\x6b\xa4\x50\x7e\x77\x7b\x22\x60\x89\xef\xcd\xf5\xb9\x0c\x97\x79\x0d\x2b\x35\x43\xcb\x3d\x24\xf1\x78\xfc\xf8\xcb\x1f\x15\x06\xe2\x78\xd8\x51\x21\xd9\x1f\xf0\xf5\x8f\x86\xa4\x50\xfa\xb1\x47\x43\xa5\xdd\x69\x14\xe8\xa3\xc0\x86\x91\xa7\x81\x50\xb4\x7c\xc0\x81\x80\x77\x7a\x9f\xc6\xc2\xa9\x8c\x05\x33\xb0\x3b\x31\xa4\xf4\xd7\x1b\x26\x55\x97\x7c\x65\xf8\x69\x1a\x84\x8e\x41\x78\xd9\xec\xc5\x11\x16\x1e\x74\x91\xf5\x56\xf5\x57\x49\x47\x5c\x92\xa9\x1e\x99\x36\xf4\xdb\xb1\x0e\xd3\x78\x02\xb0\x9b\x25\xcb\xe9\xe9\x1d\x0d\x44\x01\x42\x08\x91\x64\xd9\xdd\x37\x08\x17\xef\xf9\xe5\x0f\xbd\x46\x91\xf5\xf9\x89\x92\x37\xdd\x89\x59\x44\x1f\x9c\xee\x34\x1e\xbe\x47\x83\x32\x72\x8e\x37\xdf\xac\x69\x38\xef\x75\xb0\xda\xdb\xac\x83\x94\x2f\x39\xa6\x62\x05\x1c\x25\x9c\x49\x16\xb0\xa8\x3c\xc7\x7e\x76\x71\x3e\x6f\xb5\x24\xe7\xe8\xb7\xb9\xc7\x6c\x43\x92\xee\x21\xd4\x17\xa1\x7f\xba\x35\xfe\xae\x39\xbc\xde\xba\x69\xd9\x8e\xe1\x62\xde\x64\x7d\x16\x88\x1b\xed\x29\x11\xfd\x4f\xa9\xff\x99\x90\xc4\xf6\xf4\xf9\x6e\xe9\x28\x23\xd7\xca\xe5\xee\xee\x9f\x63\xb1\x5b\xfb\x10\xd7\x2f\x1d\xf2\xe3\xbf\xb9\xb5\x6f\xa4\x6d\x7d\x25\x79\xfb\x24\x31\xea\x56\xbe\x5d\x53\xcd\x2d\x36\xa3\x6d\xdf\xab\x1c\xb8\x6d\x6f\xc0\x98\xa7\xdd\xaa\x86\x8c\x1d\x39\xa3\x9d\x70\x2b\x9b\x68\xd9\xfd\x33\xfe\xa9\xb6\x4a\x2e\x63\x0f\xcf\x68\x27\xd9\x4c\xb9\x46\x6d\xcb\xbe\xa1\xa8\xd6\x5f\xc6\xd6\x9f\xf1\x4f\xf4\xd4\xb4\x78\xd0\xd6\xf4\x13\x3c\x3b\xac\xd0\xdc\x90\x34\xda\xc9\xb4\x9a\x1a\x8d\xbd\x93\x87\xd4\xe2\x21\x1b\xb3\x2b\xd1\xbe\xe7\x69\xd4\x53\x67\xd5\x40\xa0\xe3\x19\x3f\x6d\x1a\xbc\x0e\x86\x3c\x10\xb4\x3d\x2a\xcd\x78\x32\xe6\xab\xbd\x36\xc9\xf4\x3a\x58\xae\xc3\xf4\x47\xea\xbf\xfb\x47\xff\x0d\x00\x00\xff\xff\xd2\x32\x5a\x28\x38\x9d\x00\x00")
-
-func v2SchemaJsonBytes() ([]byte, error) {
- return bindataRead(
- _v2SchemaJson,
- "v2/schema.json",
- )
-}
-
-func v2SchemaJson() (*asset, error) {
- bytes, err := v2SchemaJsonBytes()
- if err != nil {
- return nil, err
- }
-
- info := bindataFileInfo{name: "v2/schema.json", size: 40248, mode: os.FileMode(0640), modTime: time.Unix(1568964748, 0)}
- a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xab, 0x88, 0x5e, 0xf, 0xbf, 0x17, 0x74, 0x0, 0xb2, 0x5a, 0x7f, 0xbc, 0x58, 0xcd, 0xc, 0x25, 0x73, 0xd5, 0x29, 0x1c, 0x7a, 0xd0, 0xce, 0x79, 0xd4, 0x89, 0x31, 0x27, 0x90, 0xf2, 0xff, 0xe6}}
- return a, nil
-}
-
-// Asset loads and returns the asset for the given name.
-// It returns an error if the asset could not be found or
-// could not be loaded.
-func Asset(name string) ([]byte, error) {
- canonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[canonicalName]; ok {
- a, err := f()
- if err != nil {
- return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
- }
- return a.bytes, nil
- }
- return nil, fmt.Errorf("Asset %s not found", name)
-}
-
-// AssetString returns the asset contents as a string (instead of a []byte).
-func AssetString(name string) (string, error) {
- data, err := Asset(name)
- return string(data), err
-}
-
-// MustAsset is like Asset but panics when Asset would return an error.
-// It simplifies safe initialization of global variables.
-func MustAsset(name string) []byte {
- a, err := Asset(name)
- if err != nil {
- panic("asset: Asset(" + name + "): " + err.Error())
- }
-
- return a
-}
-
-// MustAssetString is like AssetString but panics when Asset would return an
-// error. It simplifies safe initialization of global variables.
-func MustAssetString(name string) string {
- return string(MustAsset(name))
-}
-
-// AssetInfo loads and returns the asset info for the given name.
-// It returns an error if the asset could not be found or
-// could not be loaded.
-func AssetInfo(name string) (os.FileInfo, error) {
- canonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[canonicalName]; ok {
- a, err := f()
- if err != nil {
- return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
- }
- return a.info, nil
- }
- return nil, fmt.Errorf("AssetInfo %s not found", name)
-}
-
-// AssetDigest returns the digest of the file with the given name. It returns an
-// error if the asset could not be found or the digest could not be loaded.
-func AssetDigest(name string) ([sha256.Size]byte, error) {
- canonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[canonicalName]; ok {
- a, err := f()
- if err != nil {
- return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err)
- }
- return a.digest, nil
- }
- return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name)
-}
-
-// Digests returns a map of all known files and their checksums.
-func Digests() (map[string][sha256.Size]byte, error) {
- mp := make(map[string][sha256.Size]byte, len(_bindata))
- for name := range _bindata {
- a, err := _bindata[name]()
- if err != nil {
- return nil, err
- }
- mp[name] = a.digest
- }
- return mp, nil
-}
-
-// AssetNames returns the names of the assets.
-func AssetNames() []string {
- names := make([]string, 0, len(_bindata))
- for name := range _bindata {
- names = append(names, name)
- }
- return names
-}
-
-// _bindata is a table, holding each asset generator, mapped to its name.
-var _bindata = map[string]func() (*asset, error){
- "jsonschema-draft-04.json": jsonschemaDraft04Json,
-
- "v2/schema.json": v2SchemaJson,
-}
-
-// AssetDir returns the file names below a certain
-// directory embedded in the file by go-bindata.
-// For example if you run go-bindata on data/... and data contains the
-// following hierarchy:
-// data/
-// foo.txt
-// img/
-// a.png
-// b.png
-// then AssetDir("data") would return []string{"foo.txt", "img"},
-// AssetDir("data/img") would return []string{"a.png", "b.png"},
-// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
-// AssetDir("") will return []string{"data"}.
-func AssetDir(name string) ([]string, error) {
- node := _bintree
- if len(name) != 0 {
- canonicalName := strings.Replace(name, "\\", "/", -1)
- pathList := strings.Split(canonicalName, "/")
- for _, p := range pathList {
- node = node.Children[p]
- if node == nil {
- return nil, fmt.Errorf("Asset %s not found", name)
- }
- }
- }
- if node.Func != nil {
- return nil, fmt.Errorf("Asset %s not found", name)
- }
- rv := make([]string, 0, len(node.Children))
- for childName := range node.Children {
- rv = append(rv, childName)
- }
- return rv, nil
-}
-
-type bintree struct {
- Func func() (*asset, error)
- Children map[string]*bintree
-}
-
-var _bintree = &bintree{nil, map[string]*bintree{
- "jsonschema-draft-04.json": &bintree{jsonschemaDraft04Json, map[string]*bintree{}},
- "v2": &bintree{nil, map[string]*bintree{
- "schema.json": &bintree{v2SchemaJson, map[string]*bintree{}},
- }},
-}}
-
-// RestoreAsset restores an asset under the given directory.
-func RestoreAsset(dir, name string) error {
- data, err := Asset(name)
- if err != nil {
- return err
- }
- info, err := AssetInfo(name)
- if err != nil {
- return err
- }
- err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
- if err != nil {
- return err
- }
- err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
- if err != nil {
- return err
- }
- return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
-}
-
-// RestoreAssets restores an asset under the given directory recursively.
-func RestoreAssets(dir, name string) error {
- children, err := AssetDir(name)
- // File
- if err != nil {
- return RestoreAsset(dir, name)
- }
- // Dir
- for _, child := range children {
- err = RestoreAssets(dir, filepath.Join(name, child))
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func _filePath(dir, name string) string {
- canonicalName := strings.Replace(name, "\\", "/", -1)
- return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
-}
diff --git a/vendor/github.com/go-openapi/spec/cache.go b/vendor/github.com/go-openapi/spec/cache.go
deleted file mode 100644
index 3fada0dae..000000000
--- a/vendor/github.com/go-openapi/spec/cache.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import "sync"
-
-// ResolutionCache a cache for resolving urls
-type ResolutionCache interface {
- Get(string) (interface{}, bool)
- Set(string, interface{})
-}
-
-type simpleCache struct {
- lock sync.RWMutex
- store map[string]interface{}
-}
-
-// Get retrieves a cached URI
-func (s *simpleCache) Get(uri string) (interface{}, bool) {
- debugLog("getting %q from resolution cache", uri)
- s.lock.RLock()
- v, ok := s.store[uri]
- debugLog("got %q from resolution cache: %t", uri, ok)
-
- s.lock.RUnlock()
- return v, ok
-}
-
-// Set caches a URI
-func (s *simpleCache) Set(uri string, data interface{}) {
- s.lock.Lock()
- s.store[uri] = data
- s.lock.Unlock()
-}
-
-var resCache ResolutionCache
-
-func init() {
- resCache = initResolutionCache()
-}
-
-// initResolutionCache initializes the URI resolution cache
-func initResolutionCache() ResolutionCache {
- return &simpleCache{store: map[string]interface{}{
- "http://swagger.io/v2/schema.json": MustLoadSwagger20Schema(),
- "http://json-schema.org/draft-04/schema": MustLoadJSONSchemaDraft04(),
- }}
-}
diff --git a/vendor/github.com/go-openapi/spec/contact_info.go b/vendor/github.com/go-openapi/spec/contact_info.go
deleted file mode 100644
index f285970aa..000000000
--- a/vendor/github.com/go-openapi/spec/contact_info.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-// ContactInfo contact information for the exposed API.
-//
-// For more information: http://goo.gl/8us55a#contactObject
-type ContactInfo struct {
- Name string `json:"name,omitempty"`
- URL string `json:"url,omitempty"`
- Email string `json:"email,omitempty"`
-}
diff --git a/vendor/github.com/go-openapi/spec/debug.go b/vendor/github.com/go-openapi/spec/debug.go
deleted file mode 100644
index 389c528ff..000000000
--- a/vendor/github.com/go-openapi/spec/debug.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "fmt"
- "log"
- "os"
- "path/filepath"
- "runtime"
-)
-
-var (
- // Debug is true when the SWAGGER_DEBUG env var is not empty.
- // It enables a more verbose logging of this package.
- Debug = os.Getenv("SWAGGER_DEBUG") != ""
- // specLogger is a debug logger for this package
- specLogger *log.Logger
-)
-
-func init() {
- debugOptions()
-}
-
-func debugOptions() {
- specLogger = log.New(os.Stdout, "spec:", log.LstdFlags)
-}
-
-func debugLog(msg string, args ...interface{}) {
- // A private, trivial trace logger, based on go-openapi/spec/expander.go:debugLog()
- if Debug {
- _, file1, pos1, _ := runtime.Caller(1)
- specLogger.Printf("%s:%d: %s", filepath.Base(file1), pos1, fmt.Sprintf(msg, args...))
- }
-}
diff --git a/vendor/github.com/go-openapi/spec/expander.go b/vendor/github.com/go-openapi/spec/expander.go
deleted file mode 100644
index 1e7fc8c49..000000000
--- a/vendor/github.com/go-openapi/spec/expander.go
+++ /dev/null
@@ -1,650 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "fmt"
- "strings"
-)
-
-// ExpandOptions provides options for spec expand
-type ExpandOptions struct {
- RelativeBase string
- SkipSchemas bool
- ContinueOnError bool
- AbsoluteCircularRef bool
-}
-
-// ResolveRefWithBase resolves a reference against a context root with preservation of base path
-func ResolveRefWithBase(root interface{}, ref *Ref, opts *ExpandOptions) (*Schema, error) {
- resolver, err := defaultSchemaLoader(root, opts, nil, nil)
- if err != nil {
- return nil, err
- }
- specBasePath := ""
- if opts != nil && opts.RelativeBase != "" {
- specBasePath, _ = absPath(opts.RelativeBase)
- }
-
- result := new(Schema)
- if err := resolver.Resolve(ref, result, specBasePath); err != nil {
- return nil, err
- }
- return result, nil
-}
-
-// ResolveRef resolves a reference against a context root
-// ref is guaranteed to be in root (no need to go to external files)
-// ResolveRef is ONLY called from the code generation module
-func ResolveRef(root interface{}, ref *Ref) (*Schema, error) {
- res, _, err := ref.GetPointer().Get(root)
- if err != nil {
- panic(err)
- }
- switch sch := res.(type) {
- case Schema:
- return &sch, nil
- case *Schema:
- return sch, nil
- case map[string]interface{}:
- b, _ := json.Marshal(sch)
- newSch := new(Schema)
- _ = json.Unmarshal(b, newSch)
- return newSch, nil
- default:
- return nil, fmt.Errorf("unknown type for the resolved reference")
- }
-}
-
-// ResolveParameter resolves a parameter reference against a context root
-func ResolveParameter(root interface{}, ref Ref) (*Parameter, error) {
- return ResolveParameterWithBase(root, ref, nil)
-}
-
-// ResolveParameterWithBase resolves a parameter reference against a context root and base path
-func ResolveParameterWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*Parameter, error) {
- resolver, err := defaultSchemaLoader(root, opts, nil, nil)
- if err != nil {
- return nil, err
- }
-
- result := new(Parameter)
- if err := resolver.Resolve(&ref, result, ""); err != nil {
- return nil, err
- }
- return result, nil
-}
-
-// ResolveResponse resolves response a reference against a context root
-func ResolveResponse(root interface{}, ref Ref) (*Response, error) {
- return ResolveResponseWithBase(root, ref, nil)
-}
-
-// ResolveResponseWithBase resolves response a reference against a context root and base path
-func ResolveResponseWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*Response, error) {
- resolver, err := defaultSchemaLoader(root, opts, nil, nil)
- if err != nil {
- return nil, err
- }
-
- result := new(Response)
- if err := resolver.Resolve(&ref, result, ""); err != nil {
- return nil, err
- }
- return result, nil
-}
-
-// ResolveItems resolves parameter items reference against a context root and base path.
-//
-// NOTE: stricly speaking, this construct is not supported by Swagger 2.0.
-// Similarly, $ref are forbidden in response headers.
-func ResolveItems(root interface{}, ref Ref, opts *ExpandOptions) (*Items, error) {
- resolver, err := defaultSchemaLoader(root, opts, nil, nil)
- if err != nil {
- return nil, err
- }
- basePath := ""
- if opts.RelativeBase != "" {
- basePath = opts.RelativeBase
- }
- result := new(Items)
- if err := resolver.Resolve(&ref, result, basePath); err != nil {
- return nil, err
- }
- return result, nil
-}
-
-// ResolvePathItem resolves response a path item against a context root and base path
-func ResolvePathItem(root interface{}, ref Ref, opts *ExpandOptions) (*PathItem, error) {
- resolver, err := defaultSchemaLoader(root, opts, nil, nil)
- if err != nil {
- return nil, err
- }
- basePath := ""
- if opts.RelativeBase != "" {
- basePath = opts.RelativeBase
- }
- result := new(PathItem)
- if err := resolver.Resolve(&ref, result, basePath); err != nil {
- return nil, err
- }
- return result, nil
-}
-
-// ExpandSpec expands the references in a swagger spec
-func ExpandSpec(spec *Swagger, options *ExpandOptions) error {
- resolver, err := defaultSchemaLoader(spec, options, nil, nil)
- // Just in case this ever returns an error.
- if resolver.shouldStopOnError(err) {
- return err
- }
-
- // getting the base path of the spec to adjust all subsequent reference resolutions
- specBasePath := ""
- if options != nil && options.RelativeBase != "" {
- specBasePath, _ = absPath(options.RelativeBase)
- }
-
- if options == nil || !options.SkipSchemas {
- for key, definition := range spec.Definitions {
- var def *Schema
- var err error
- if def, err = expandSchema(definition, []string{fmt.Sprintf("#/definitions/%s", key)}, resolver, specBasePath); resolver.shouldStopOnError(err) {
- return err
- }
- if def != nil {
- spec.Definitions[key] = *def
- }
- }
- }
-
- for key := range spec.Parameters {
- parameter := spec.Parameters[key]
- if err := expandParameterOrResponse(¶meter, resolver, specBasePath); resolver.shouldStopOnError(err) {
- return err
- }
- spec.Parameters[key] = parameter
- }
-
- for key := range spec.Responses {
- response := spec.Responses[key]
- if err := expandParameterOrResponse(&response, resolver, specBasePath); resolver.shouldStopOnError(err) {
- return err
- }
- spec.Responses[key] = response
- }
-
- if spec.Paths != nil {
- for key := range spec.Paths.Paths {
- path := spec.Paths.Paths[key]
- if err := expandPathItem(&path, resolver, specBasePath); resolver.shouldStopOnError(err) {
- return err
- }
- spec.Paths.Paths[key] = path
- }
- }
-
- return nil
-}
-
-// baseForRoot loads in the cache the root document and produces a fake "root" base path entry
-// for further $ref resolution
-func baseForRoot(root interface{}, cache ResolutionCache) string {
- // cache the root document to resolve $ref's
- const rootBase = "root"
- if root != nil {
- base, _ := absPath(rootBase)
- normalizedBase := normalizeAbsPath(base)
- debugLog("setting root doc in cache at: %s", normalizedBase)
- if cache == nil {
- cache = resCache
- }
- cache.Set(normalizedBase, root)
- return rootBase
- }
- return ""
-}
-
-// ExpandSchema expands the refs in the schema object with reference to the root object
-// go-openapi/validate uses this function
-// notice that it is impossible to reference a json schema in a different file other than root
-func ExpandSchema(schema *Schema, root interface{}, cache ResolutionCache) error {
- opts := &ExpandOptions{
- // when a root is specified, cache the root as an in-memory document for $ref retrieval
- RelativeBase: baseForRoot(root, cache),
- SkipSchemas: false,
- ContinueOnError: false,
- // when no base path is specified, remaining $ref (circular) are rendered with an absolute path
- AbsoluteCircularRef: true,
- }
- return ExpandSchemaWithBasePath(schema, cache, opts)
-}
-
-// ExpandSchemaWithBasePath expands the refs in the schema object, base path configured through expand options
-func ExpandSchemaWithBasePath(schema *Schema, cache ResolutionCache, opts *ExpandOptions) error {
- if schema == nil {
- return nil
- }
-
- var basePath string
- if opts.RelativeBase != "" {
- basePath, _ = absPath(opts.RelativeBase)
- }
-
- resolver, err := defaultSchemaLoader(nil, opts, cache, nil)
- if err != nil {
- return err
- }
-
- refs := []string{""}
- var s *Schema
- if s, err = expandSchema(*schema, refs, resolver, basePath); err != nil {
- return err
- }
- *schema = *s
- return nil
-}
-
-func expandItems(target Schema, parentRefs []string, resolver *schemaLoader, basePath string) (*Schema, error) {
- if target.Items != nil {
- if target.Items.Schema != nil {
- t, err := expandSchema(*target.Items.Schema, parentRefs, resolver, basePath)
- if err != nil {
- return nil, err
- }
- *target.Items.Schema = *t
- }
- for i := range target.Items.Schemas {
- t, err := expandSchema(target.Items.Schemas[i], parentRefs, resolver, basePath)
- if err != nil {
- return nil, err
- }
- target.Items.Schemas[i] = *t
- }
- }
- return &target, nil
-}
-
-func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader, basePath string) (*Schema, error) {
- if target.Ref.String() == "" && target.Ref.IsRoot() {
- // normalizing is important
- newRef := normalizeFileRef(&target.Ref, basePath)
- target.Ref = *newRef
- return &target, nil
-
- }
-
- // change the base path of resolution when an ID is encountered
- // otherwise the basePath should inherit the parent's
- // important: ID can be relative path
- if target.ID != "" {
- debugLog("schema has ID: %s", target.ID)
- // handling the case when id is a folder
- // remember that basePath has to be a file
- refPath := target.ID
- if strings.HasSuffix(target.ID, "/") {
- // path.Clean here would not work correctly if basepath is http
- refPath = fmt.Sprintf("%s%s", refPath, "placeholder.json")
- }
- basePath = normalizePaths(refPath, basePath)
- }
-
- var t *Schema
- // if Ref is found, everything else doesn't matter
- // Ref also changes the resolution scope of children expandSchema
- if target.Ref.String() != "" {
- // here the resolution scope is changed because a $ref was encountered
- normalizedRef := normalizeFileRef(&target.Ref, basePath)
- normalizedBasePath := normalizedRef.RemoteURI()
-
- if resolver.isCircular(normalizedRef, basePath, parentRefs...) {
- // this means there is a cycle in the recursion tree: return the Ref
- // - circular refs cannot be expanded. We leave them as ref.
- // - denormalization means that a new local file ref is set relative to the original basePath
- debugLog("shortcut circular ref: basePath: %s, normalizedPath: %s, normalized ref: %s",
- basePath, normalizedBasePath, normalizedRef.String())
- if !resolver.options.AbsoluteCircularRef {
- target.Ref = *denormalizeFileRef(normalizedRef, normalizedBasePath, resolver.context.basePath)
- } else {
- target.Ref = *normalizedRef
- }
- return &target, nil
- }
-
- debugLog("basePath: %s: calling Resolve with target: %#v", basePath, target)
- if err := resolver.Resolve(&target.Ref, &t, basePath); resolver.shouldStopOnError(err) {
- return nil, err
- }
-
- if t != nil {
- parentRefs = append(parentRefs, normalizedRef.String())
- var err error
- transitiveResolver, err := resolver.transitiveResolver(basePath, target.Ref)
- if transitiveResolver.shouldStopOnError(err) {
- return nil, err
- }
-
- basePath = resolver.updateBasePath(transitiveResolver, normalizedBasePath)
-
- return expandSchema(*t, parentRefs, transitiveResolver, basePath)
- }
- }
-
- t, err := expandItems(target, parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- target = *t
- }
-
- for i := range target.AllOf {
- t, err := expandSchema(target.AllOf[i], parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- target.AllOf[i] = *t
- }
- for i := range target.AnyOf {
- t, err := expandSchema(target.AnyOf[i], parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- target.AnyOf[i] = *t
- }
- for i := range target.OneOf {
- t, err := expandSchema(target.OneOf[i], parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- target.OneOf[i] = *t
- }
- }
- if target.Not != nil {
- t, err := expandSchema(*target.Not, parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- *target.Not = *t
- }
- }
- for k := range target.Properties {
- t, err := expandSchema(target.Properties[k], parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- target.Properties[k] = *t
- }
- }
- if target.AdditionalProperties != nil && target.AdditionalProperties.Schema != nil {
- t, err := expandSchema(*target.AdditionalProperties.Schema, parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- *target.AdditionalProperties.Schema = *t
- }
- }
- for k := range target.PatternProperties {
- t, err := expandSchema(target.PatternProperties[k], parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- target.PatternProperties[k] = *t
- }
- }
- for k := range target.Dependencies {
- if target.Dependencies[k].Schema != nil {
- t, err := expandSchema(*target.Dependencies[k].Schema, parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- *target.Dependencies[k].Schema = *t
- }
- }
- }
- if target.AdditionalItems != nil && target.AdditionalItems.Schema != nil {
- t, err := expandSchema(*target.AdditionalItems.Schema, parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- *target.AdditionalItems.Schema = *t
- }
- }
- for k := range target.Definitions {
- t, err := expandSchema(target.Definitions[k], parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return &target, err
- }
- if t != nil {
- target.Definitions[k] = *t
- }
- }
- return &target, nil
-}
-
-func expandPathItem(pathItem *PathItem, resolver *schemaLoader, basePath string) error {
- if pathItem == nil {
- return nil
- }
-
- parentRefs := []string{}
- if err := resolver.deref(pathItem, parentRefs, basePath); resolver.shouldStopOnError(err) {
- return err
- }
- if pathItem.Ref.String() != "" {
- var err error
- resolver, err = resolver.transitiveResolver(basePath, pathItem.Ref)
- if resolver.shouldStopOnError(err) {
- return err
- }
- }
- pathItem.Ref = Ref{}
-
- for idx := range pathItem.Parameters {
- if err := expandParameterOrResponse(&(pathItem.Parameters[idx]), resolver, basePath); resolver.shouldStopOnError(err) {
- return err
- }
- }
- ops := []*Operation{
- pathItem.Get,
- pathItem.Head,
- pathItem.Options,
- pathItem.Put,
- pathItem.Post,
- pathItem.Patch,
- pathItem.Delete,
- }
- for _, op := range ops {
- if err := expandOperation(op, resolver, basePath); resolver.shouldStopOnError(err) {
- return err
- }
- }
- return nil
-}
-
-func expandOperation(op *Operation, resolver *schemaLoader, basePath string) error {
- if op == nil {
- return nil
- }
-
- for i := range op.Parameters {
- param := op.Parameters[i]
- if err := expandParameterOrResponse(¶m, resolver, basePath); resolver.shouldStopOnError(err) {
- return err
- }
- op.Parameters[i] = param
- }
-
- if op.Responses != nil {
- responses := op.Responses
- if err := expandParameterOrResponse(responses.Default, resolver, basePath); resolver.shouldStopOnError(err) {
- return err
- }
- for code := range responses.StatusCodeResponses {
- response := responses.StatusCodeResponses[code]
- if err := expandParameterOrResponse(&response, resolver, basePath); resolver.shouldStopOnError(err) {
- return err
- }
- responses.StatusCodeResponses[code] = response
- }
- }
- return nil
-}
-
-// ExpandResponseWithRoot expands a response based on a root document, not a fetchable document
-func ExpandResponseWithRoot(response *Response, root interface{}, cache ResolutionCache) error {
- opts := &ExpandOptions{
- RelativeBase: baseForRoot(root, cache),
- SkipSchemas: false,
- ContinueOnError: false,
- // when no base path is specified, remaining $ref (circular) are rendered with an absolute path
- AbsoluteCircularRef: true,
- }
- resolver, err := defaultSchemaLoader(root, opts, nil, nil)
- if err != nil {
- return err
- }
-
- return expandParameterOrResponse(response, resolver, opts.RelativeBase)
-}
-
-// ExpandResponse expands a response based on a basepath
-// This is the exported version of expandResponse
-// all refs inside response will be resolved relative to basePath
-func ExpandResponse(response *Response, basePath string) error {
- var specBasePath string
- if basePath != "" {
- specBasePath, _ = absPath(basePath)
- }
- opts := &ExpandOptions{
- RelativeBase: specBasePath,
- }
- resolver, err := defaultSchemaLoader(nil, opts, nil, nil)
- if err != nil {
- return err
- }
-
- return expandParameterOrResponse(response, resolver, opts.RelativeBase)
-}
-
-// ExpandParameterWithRoot expands a parameter based on a root document, not a fetchable document
-func ExpandParameterWithRoot(parameter *Parameter, root interface{}, cache ResolutionCache) error {
- opts := &ExpandOptions{
- RelativeBase: baseForRoot(root, cache),
- SkipSchemas: false,
- ContinueOnError: false,
- // when no base path is specified, remaining $ref (circular) are rendered with an absolute path
- AbsoluteCircularRef: true,
- }
- resolver, err := defaultSchemaLoader(root, opts, nil, nil)
- if err != nil {
- return err
- }
-
- return expandParameterOrResponse(parameter, resolver, opts.RelativeBase)
-}
-
-// ExpandParameter expands a parameter based on a basepath.
-// This is the exported version of expandParameter
-// all refs inside parameter will be resolved relative to basePath
-func ExpandParameter(parameter *Parameter, basePath string) error {
- var specBasePath string
- if basePath != "" {
- specBasePath, _ = absPath(basePath)
- }
- opts := &ExpandOptions{
- RelativeBase: specBasePath,
- }
- resolver, err := defaultSchemaLoader(nil, opts, nil, nil)
- if err != nil {
- return err
- }
-
- return expandParameterOrResponse(parameter, resolver, opts.RelativeBase)
-}
-
-func getRefAndSchema(input interface{}) (*Ref, *Schema, error) {
- var ref *Ref
- var sch *Schema
- switch refable := input.(type) {
- case *Parameter:
- if refable == nil {
- return nil, nil, nil
- }
- ref = &refable.Ref
- sch = refable.Schema
- case *Response:
- if refable == nil {
- return nil, nil, nil
- }
- ref = &refable.Ref
- sch = refable.Schema
- default:
- return nil, nil, fmt.Errorf("expand: unsupported type %T. Input should be of type *Parameter or *Response", input)
- }
- return ref, sch, nil
-}
-
-func expandParameterOrResponse(input interface{}, resolver *schemaLoader, basePath string) error {
- ref, _, err := getRefAndSchema(input)
- if err != nil {
- return err
- }
- if ref == nil {
- return nil
- }
- parentRefs := []string{}
- if err := resolver.deref(input, parentRefs, basePath); resolver.shouldStopOnError(err) {
- return err
- }
- ref, sch, _ := getRefAndSchema(input)
- if ref.String() != "" {
- transitiveResolver, err := resolver.transitiveResolver(basePath, *ref)
- if transitiveResolver.shouldStopOnError(err) {
- return err
- }
- basePath = resolver.updateBasePath(transitiveResolver, basePath)
- resolver = transitiveResolver
- }
-
- if sch != nil && sch.Ref.String() != "" {
- // schema expanded to a $ref in another root
- var ern error
- sch.Ref, ern = NewRef(normalizePaths(sch.Ref.String(), ref.RemoteURI()))
- if ern != nil {
- return ern
- }
- }
- if ref != nil {
- *ref = Ref{}
- }
-
- if !resolver.options.SkipSchemas && sch != nil {
- s, err := expandSchema(*sch, parentRefs, resolver, basePath)
- if resolver.shouldStopOnError(err) {
- return err
- }
- *sch = *s
- }
- return nil
-}
diff --git a/vendor/github.com/go-openapi/spec/external_docs.go b/vendor/github.com/go-openapi/spec/external_docs.go
deleted file mode 100644
index 88add91b2..000000000
--- a/vendor/github.com/go-openapi/spec/external_docs.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-// ExternalDocumentation allows referencing an external resource for
-// extended documentation.
-//
-// For more information: http://goo.gl/8us55a#externalDocumentationObject
-type ExternalDocumentation struct {
- Description string `json:"description,omitempty"`
- URL string `json:"url,omitempty"`
-}
diff --git a/vendor/github.com/go-openapi/spec/go.mod b/vendor/github.com/go-openapi/spec/go.mod
deleted file mode 100644
index 02a142c03..000000000
--- a/vendor/github.com/go-openapi/spec/go.mod
+++ /dev/null
@@ -1,17 +0,0 @@
-module github.com/go-openapi/spec
-
-require (
- github.com/go-openapi/jsonpointer v0.19.3
- github.com/go-openapi/jsonreference v0.19.2
- github.com/go-openapi/swag v0.19.5
- github.com/kr/pty v1.1.5 // indirect
- github.com/stretchr/objx v0.2.0 // indirect
- github.com/stretchr/testify v1.3.0
- golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
- golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect
- golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f // indirect
- golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 // indirect
- gopkg.in/yaml.v2 v2.2.2
-)
-
-go 1.13
diff --git a/vendor/github.com/go-openapi/spec/go.sum b/vendor/github.com/go-openapi/spec/go.sum
deleted file mode 100644
index 86db601c9..000000000
--- a/vendor/github.com/go-openapi/spec/go.sum
+++ /dev/null
@@ -1,74 +0,0 @@
-github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4=
-github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
-github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/go-openapi/jsonpointer v0.17.0 h1:nH6xp8XdXHx8dqveo0ZuJBluCO2qGrPbDNZ0dwoRHP0=
-github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
-github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8=
-github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
-github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0=
-github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
-github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
-github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
-github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk=
-github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
-github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w=
-github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
-github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880=
-github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
-github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE=
-github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=
-github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic=
-github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
-github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE=
-golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
-golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/go-openapi/spec/header.go b/vendor/github.com/go-openapi/spec/header.go
deleted file mode 100644
index 39efe452b..000000000
--- a/vendor/github.com/go-openapi/spec/header.go
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "strings"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-const (
- jsonArray = "array"
-)
-
-// HeaderProps describes a response header
-type HeaderProps struct {
- Description string `json:"description,omitempty"`
-}
-
-// Header describes a header for a response of the API
-//
-// For more information: http://goo.gl/8us55a#headerObject
-type Header struct {
- CommonValidations
- SimpleSchema
- VendorExtensible
- HeaderProps
-}
-
-// ResponseHeader creates a new header instance for use in a response
-func ResponseHeader() *Header {
- return new(Header)
-}
-
-// WithDescription sets the description on this response, allows for chaining
-func (h *Header) WithDescription(description string) *Header {
- h.Description = description
- return h
-}
-
-// Typed a fluent builder method for the type of parameter
-func (h *Header) Typed(tpe, format string) *Header {
- h.Type = tpe
- h.Format = format
- return h
-}
-
-// CollectionOf a fluent builder method for an array item
-func (h *Header) CollectionOf(items *Items, format string) *Header {
- h.Type = jsonArray
- h.Items = items
- h.CollectionFormat = format
- return h
-}
-
-// WithDefault sets the default value on this item
-func (h *Header) WithDefault(defaultValue interface{}) *Header {
- h.Default = defaultValue
- return h
-}
-
-// WithMaxLength sets a max length value
-func (h *Header) WithMaxLength(max int64) *Header {
- h.MaxLength = &max
- return h
-}
-
-// WithMinLength sets a min length value
-func (h *Header) WithMinLength(min int64) *Header {
- h.MinLength = &min
- return h
-}
-
-// WithPattern sets a pattern value
-func (h *Header) WithPattern(pattern string) *Header {
- h.Pattern = pattern
- return h
-}
-
-// WithMultipleOf sets a multiple of value
-func (h *Header) WithMultipleOf(number float64) *Header {
- h.MultipleOf = &number
- return h
-}
-
-// WithMaximum sets a maximum number value
-func (h *Header) WithMaximum(max float64, exclusive bool) *Header {
- h.Maximum = &max
- h.ExclusiveMaximum = exclusive
- return h
-}
-
-// WithMinimum sets a minimum number value
-func (h *Header) WithMinimum(min float64, exclusive bool) *Header {
- h.Minimum = &min
- h.ExclusiveMinimum = exclusive
- return h
-}
-
-// WithEnum sets a the enum values (replace)
-func (h *Header) WithEnum(values ...interface{}) *Header {
- h.Enum = append([]interface{}{}, values...)
- return h
-}
-
-// WithMaxItems sets the max items
-func (h *Header) WithMaxItems(size int64) *Header {
- h.MaxItems = &size
- return h
-}
-
-// WithMinItems sets the min items
-func (h *Header) WithMinItems(size int64) *Header {
- h.MinItems = &size
- return h
-}
-
-// UniqueValues dictates that this array can only have unique items
-func (h *Header) UniqueValues() *Header {
- h.UniqueItems = true
- return h
-}
-
-// AllowDuplicates this array can have duplicates
-func (h *Header) AllowDuplicates() *Header {
- h.UniqueItems = false
- return h
-}
-
-// MarshalJSON marshal this to JSON
-func (h Header) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(h.CommonValidations)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(h.SimpleSchema)
- if err != nil {
- return nil, err
- }
- b3, err := json.Marshal(h.HeaderProps)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b1, b2, b3), nil
-}
-
-// UnmarshalJSON unmarshals this header from JSON
-func (h *Header) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &h.CommonValidations); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &h.SimpleSchema); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &h.VendorExtensible); err != nil {
- return err
- }
- return json.Unmarshal(data, &h.HeaderProps)
-}
-
-// JSONLookup look up a value by the json property name
-func (h Header) JSONLookup(token string) (interface{}, error) {
- if ex, ok := h.Extensions[token]; ok {
- return &ex, nil
- }
-
- r, _, err := jsonpointer.GetForToken(h.CommonValidations, token)
- if err != nil && !strings.HasPrefix(err.Error(), "object has no field") {
- return nil, err
- }
- if r != nil {
- return r, nil
- }
- r, _, err = jsonpointer.GetForToken(h.SimpleSchema, token)
- if err != nil && !strings.HasPrefix(err.Error(), "object has no field") {
- return nil, err
- }
- if r != nil {
- return r, nil
- }
- r, _, err = jsonpointer.GetForToken(h.HeaderProps, token)
- return r, err
-}
diff --git a/vendor/github.com/go-openapi/spec/info.go b/vendor/github.com/go-openapi/spec/info.go
deleted file mode 100644
index c458b49b2..000000000
--- a/vendor/github.com/go-openapi/spec/info.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "strings"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-// Extensions vendor specific extensions
-type Extensions map[string]interface{}
-
-// Add adds a value to these extensions
-func (e Extensions) Add(key string, value interface{}) {
- realKey := strings.ToLower(key)
- e[realKey] = value
-}
-
-// GetString gets a string value from the extensions
-func (e Extensions) GetString(key string) (string, bool) {
- if v, ok := e[strings.ToLower(key)]; ok {
- str, ok := v.(string)
- return str, ok
- }
- return "", false
-}
-
-// GetBool gets a string value from the extensions
-func (e Extensions) GetBool(key string) (bool, bool) {
- if v, ok := e[strings.ToLower(key)]; ok {
- str, ok := v.(bool)
- return str, ok
- }
- return false, false
-}
-
-// GetStringSlice gets a string value from the extensions
-func (e Extensions) GetStringSlice(key string) ([]string, bool) {
- if v, ok := e[strings.ToLower(key)]; ok {
- arr, isSlice := v.([]interface{})
- if !isSlice {
- return nil, false
- }
- var strs []string
- for _, iface := range arr {
- str, isString := iface.(string)
- if !isString {
- return nil, false
- }
- strs = append(strs, str)
- }
- return strs, ok
- }
- return nil, false
-}
-
-// VendorExtensible composition block.
-type VendorExtensible struct {
- Extensions Extensions
-}
-
-// AddExtension adds an extension to this extensible object
-func (v *VendorExtensible) AddExtension(key string, value interface{}) {
- if value == nil {
- return
- }
- if v.Extensions == nil {
- v.Extensions = make(map[string]interface{})
- }
- v.Extensions.Add(key, value)
-}
-
-// MarshalJSON marshals the extensions to json
-func (v VendorExtensible) MarshalJSON() ([]byte, error) {
- toser := make(map[string]interface{})
- for k, v := range v.Extensions {
- lk := strings.ToLower(k)
- if strings.HasPrefix(lk, "x-") {
- toser[k] = v
- }
- }
- return json.Marshal(toser)
-}
-
-// UnmarshalJSON for this extensible object
-func (v *VendorExtensible) UnmarshalJSON(data []byte) error {
- var d map[string]interface{}
- if err := json.Unmarshal(data, &d); err != nil {
- return err
- }
- for k, vv := range d {
- lk := strings.ToLower(k)
- if strings.HasPrefix(lk, "x-") {
- if v.Extensions == nil {
- v.Extensions = map[string]interface{}{}
- }
- v.Extensions[k] = vv
- }
- }
- return nil
-}
-
-// InfoProps the properties for an info definition
-type InfoProps struct {
- Description string `json:"description,omitempty"`
- Title string `json:"title,omitempty"`
- TermsOfService string `json:"termsOfService,omitempty"`
- Contact *ContactInfo `json:"contact,omitempty"`
- License *License `json:"license,omitempty"`
- Version string `json:"version,omitempty"`
-}
-
-// Info object provides metadata about the API.
-// The metadata can be used by the clients if needed, and can be presented in the Swagger-UI for convenience.
-//
-// For more information: http://goo.gl/8us55a#infoObject
-type Info struct {
- VendorExtensible
- InfoProps
-}
-
-// JSONLookup look up a value by the json property name
-func (i Info) JSONLookup(token string) (interface{}, error) {
- if ex, ok := i.Extensions[token]; ok {
- return &ex, nil
- }
- r, _, err := jsonpointer.GetForToken(i.InfoProps, token)
- return r, err
-}
-
-// MarshalJSON marshal this to JSON
-func (i Info) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(i.InfoProps)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(i.VendorExtensible)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b1, b2), nil
-}
-
-// UnmarshalJSON marshal this from JSON
-func (i *Info) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &i.InfoProps); err != nil {
- return err
- }
- return json.Unmarshal(data, &i.VendorExtensible)
-}
diff --git a/vendor/github.com/go-openapi/spec/items.go b/vendor/github.com/go-openapi/spec/items.go
deleted file mode 100644
index 365d16315..000000000
--- a/vendor/github.com/go-openapi/spec/items.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "strings"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-const (
- jsonRef = "$ref"
-)
-
-// SimpleSchema describe swagger simple schemas for parameters and headers
-type SimpleSchema struct {
- Type string `json:"type,omitempty"`
- Nullable bool `json:"nullable,omitempty"`
- Format string `json:"format,omitempty"`
- Items *Items `json:"items,omitempty"`
- CollectionFormat string `json:"collectionFormat,omitempty"`
- Default interface{} `json:"default,omitempty"`
- Example interface{} `json:"example,omitempty"`
-}
-
-// TypeName return the type (or format) of a simple schema
-func (s *SimpleSchema) TypeName() string {
- if s.Format != "" {
- return s.Format
- }
- return s.Type
-}
-
-// ItemsTypeName yields the type of items in a simple schema array
-func (s *SimpleSchema) ItemsTypeName() string {
- if s.Items == nil {
- return ""
- }
- return s.Items.TypeName()
-}
-
-// CommonValidations describe common JSON-schema validations
-type CommonValidations struct {
- Maximum *float64 `json:"maximum,omitempty"`
- ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"`
- Minimum *float64 `json:"minimum,omitempty"`
- ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"`
- MaxLength *int64 `json:"maxLength,omitempty"`
- MinLength *int64 `json:"minLength,omitempty"`
- Pattern string `json:"pattern,omitempty"`
- MaxItems *int64 `json:"maxItems,omitempty"`
- MinItems *int64 `json:"minItems,omitempty"`
- UniqueItems bool `json:"uniqueItems,omitempty"`
- MultipleOf *float64 `json:"multipleOf,omitempty"`
- Enum []interface{} `json:"enum,omitempty"`
-}
-
-// Items a limited subset of JSON-Schema's items object.
-// It is used by parameter definitions that are not located in "body".
-//
-// For more information: http://goo.gl/8us55a#items-object
-type Items struct {
- Refable
- CommonValidations
- SimpleSchema
- VendorExtensible
-}
-
-// NewItems creates a new instance of items
-func NewItems() *Items {
- return &Items{}
-}
-
-// Typed a fluent builder method for the type of item
-func (i *Items) Typed(tpe, format string) *Items {
- i.Type = tpe
- i.Format = format
- return i
-}
-
-// AsNullable flags this schema as nullable.
-func (i *Items) AsNullable() *Items {
- i.Nullable = true
- return i
-}
-
-// CollectionOf a fluent builder method for an array item
-func (i *Items) CollectionOf(items *Items, format string) *Items {
- i.Type = jsonArray
- i.Items = items
- i.CollectionFormat = format
- return i
-}
-
-// WithDefault sets the default value on this item
-func (i *Items) WithDefault(defaultValue interface{}) *Items {
- i.Default = defaultValue
- return i
-}
-
-// WithMaxLength sets a max length value
-func (i *Items) WithMaxLength(max int64) *Items {
- i.MaxLength = &max
- return i
-}
-
-// WithMinLength sets a min length value
-func (i *Items) WithMinLength(min int64) *Items {
- i.MinLength = &min
- return i
-}
-
-// WithPattern sets a pattern value
-func (i *Items) WithPattern(pattern string) *Items {
- i.Pattern = pattern
- return i
-}
-
-// WithMultipleOf sets a multiple of value
-func (i *Items) WithMultipleOf(number float64) *Items {
- i.MultipleOf = &number
- return i
-}
-
-// WithMaximum sets a maximum number value
-func (i *Items) WithMaximum(max float64, exclusive bool) *Items {
- i.Maximum = &max
- i.ExclusiveMaximum = exclusive
- return i
-}
-
-// WithMinimum sets a minimum number value
-func (i *Items) WithMinimum(min float64, exclusive bool) *Items {
- i.Minimum = &min
- i.ExclusiveMinimum = exclusive
- return i
-}
-
-// WithEnum sets a the enum values (replace)
-func (i *Items) WithEnum(values ...interface{}) *Items {
- i.Enum = append([]interface{}{}, values...)
- return i
-}
-
-// WithMaxItems sets the max items
-func (i *Items) WithMaxItems(size int64) *Items {
- i.MaxItems = &size
- return i
-}
-
-// WithMinItems sets the min items
-func (i *Items) WithMinItems(size int64) *Items {
- i.MinItems = &size
- return i
-}
-
-// UniqueValues dictates that this array can only have unique items
-func (i *Items) UniqueValues() *Items {
- i.UniqueItems = true
- return i
-}
-
-// AllowDuplicates this array can have duplicates
-func (i *Items) AllowDuplicates() *Items {
- i.UniqueItems = false
- return i
-}
-
-// UnmarshalJSON hydrates this items instance with the data from JSON
-func (i *Items) UnmarshalJSON(data []byte) error {
- var validations CommonValidations
- if err := json.Unmarshal(data, &validations); err != nil {
- return err
- }
- var ref Refable
- if err := json.Unmarshal(data, &ref); err != nil {
- return err
- }
- var simpleSchema SimpleSchema
- if err := json.Unmarshal(data, &simpleSchema); err != nil {
- return err
- }
- var vendorExtensible VendorExtensible
- if err := json.Unmarshal(data, &vendorExtensible); err != nil {
- return err
- }
- i.Refable = ref
- i.CommonValidations = validations
- i.SimpleSchema = simpleSchema
- i.VendorExtensible = vendorExtensible
- return nil
-}
-
-// MarshalJSON converts this items object to JSON
-func (i Items) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(i.CommonValidations)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(i.SimpleSchema)
- if err != nil {
- return nil, err
- }
- b3, err := json.Marshal(i.Refable)
- if err != nil {
- return nil, err
- }
- b4, err := json.Marshal(i.VendorExtensible)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b4, b3, b1, b2), nil
-}
-
-// JSONLookup look up a value by the json property name
-func (i Items) JSONLookup(token string) (interface{}, error) {
- if token == jsonRef {
- return &i.Ref, nil
- }
-
- r, _, err := jsonpointer.GetForToken(i.CommonValidations, token)
- if err != nil && !strings.HasPrefix(err.Error(), "object has no field") {
- return nil, err
- }
- if r != nil {
- return r, nil
- }
- r, _, err = jsonpointer.GetForToken(i.SimpleSchema, token)
- return r, err
-}
diff --git a/vendor/github.com/go-openapi/spec/license.go b/vendor/github.com/go-openapi/spec/license.go
deleted file mode 100644
index f20961b4f..000000000
--- a/vendor/github.com/go-openapi/spec/license.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-// License information for the exposed API.
-//
-// For more information: http://goo.gl/8us55a#licenseObject
-type License struct {
- Name string `json:"name,omitempty"`
- URL string `json:"url,omitempty"`
-}
diff --git a/vendor/github.com/go-openapi/spec/normalizer.go b/vendor/github.com/go-openapi/spec/normalizer.go
deleted file mode 100644
index b8957e7c0..000000000
--- a/vendor/github.com/go-openapi/spec/normalizer.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "fmt"
- "net/url"
- "os"
- "path"
- "path/filepath"
- "strings"
-)
-
-// normalize absolute path for cache.
-// on Windows, drive letters should be converted to lower as scheme in net/url.URL
-func normalizeAbsPath(path string) string {
- u, err := url.Parse(path)
- if err != nil {
- debugLog("normalize absolute path failed: %s", err)
- return path
- }
- return u.String()
-}
-
-// base or refPath could be a file path or a URL
-// given a base absolute path and a ref path, return the absolute path of refPath
-// 1) if refPath is absolute, return it
-// 2) if refPath is relative, join it with basePath keeping the scheme, hosts, and ports if exists
-// base could be a directory or a full file path
-func normalizePaths(refPath, base string) string {
- refURL, _ := url.Parse(refPath)
- if path.IsAbs(refURL.Path) || filepath.IsAbs(refPath) {
- // refPath is actually absolute
- if refURL.Host != "" {
- return refPath
- }
- parts := strings.Split(refPath, "#")
- result := filepath.FromSlash(parts[0])
- if len(parts) == 2 {
- result += "#" + parts[1]
- }
- return result
- }
-
- // relative refPath
- baseURL, _ := url.Parse(base)
- if !strings.HasPrefix(refPath, "#") {
- // combining paths
- if baseURL.Host != "" {
- baseURL.Path = path.Join(path.Dir(baseURL.Path), refURL.Path)
- } else { // base is a file
- newBase := fmt.Sprintf("%s#%s", filepath.Join(filepath.Dir(base), filepath.FromSlash(refURL.Path)), refURL.Fragment)
- return newBase
- }
-
- }
- // copying fragment from ref to base
- baseURL.Fragment = refURL.Fragment
- return baseURL.String()
-}
-
-// denormalizePaths returns to simplest notation on file $ref,
-// i.e. strips the absolute path and sets a path relative to the base path.
-//
-// This is currently used when we rewrite ref after a circular ref has been detected
-func denormalizeFileRef(ref *Ref, relativeBase, originalRelativeBase string) *Ref {
- debugLog("denormalizeFileRef for: %s", ref.String())
-
- if ref.String() == "" || ref.IsRoot() || ref.HasFragmentOnly {
- return ref
- }
- // strip relativeBase from URI
- relativeBaseURL, _ := url.Parse(relativeBase)
- relativeBaseURL.Fragment = ""
-
- if relativeBaseURL.IsAbs() && strings.HasPrefix(ref.String(), relativeBase) {
- // this should work for absolute URI (e.g. http://...): we have an exact match, just trim prefix
- r, _ := NewRef(strings.TrimPrefix(ref.String(), relativeBase))
- return &r
- }
-
- if relativeBaseURL.IsAbs() {
- // other absolute URL get unchanged (i.e. with a non-empty scheme)
- return ref
- }
-
- // for relative file URIs:
- originalRelativeBaseURL, _ := url.Parse(originalRelativeBase)
- originalRelativeBaseURL.Fragment = ""
- if strings.HasPrefix(ref.String(), originalRelativeBaseURL.String()) {
- // the resulting ref is in the expanded spec: return a local ref
- r, _ := NewRef(strings.TrimPrefix(ref.String(), originalRelativeBaseURL.String()))
- return &r
- }
-
- // check if we may set a relative path, considering the original base path for this spec.
- // Example:
- // spec is located at /mypath/spec.json
- // my normalized ref points to: /mypath/item.json#/target
- // expected result: item.json#/target
- parts := strings.Split(ref.String(), "#")
- relativePath, err := filepath.Rel(path.Dir(originalRelativeBaseURL.String()), parts[0])
- if err != nil {
- // there is no common ancestor (e.g. different drives on windows)
- // leaves the ref unchanged
- return ref
- }
- if len(parts) == 2 {
- relativePath += "#" + parts[1]
- }
- r, _ := NewRef(relativePath)
- return &r
-}
-
-// relativeBase could be an ABSOLUTE file path or an ABSOLUTE URL
-func normalizeFileRef(ref *Ref, relativeBase string) *Ref {
- // This is important for when the reference is pointing to the root schema
- if ref.String() == "" {
- r, _ := NewRef(relativeBase)
- return &r
- }
-
- debugLog("normalizing %s against %s", ref.String(), relativeBase)
-
- s := normalizePaths(ref.String(), relativeBase)
- r, _ := NewRef(s)
- return &r
-}
-
-// absPath returns the absolute path of a file
-func absPath(fname string) (string, error) {
- if strings.HasPrefix(fname, "http") {
- return fname, nil
- }
- if filepath.IsAbs(fname) {
- return fname, nil
- }
- wd, err := os.Getwd()
- return filepath.Join(wd, fname), err
-}
diff --git a/vendor/github.com/go-openapi/spec/operation.go b/vendor/github.com/go-openapi/spec/operation.go
deleted file mode 100644
index b1ebd5994..000000000
--- a/vendor/github.com/go-openapi/spec/operation.go
+++ /dev/null
@@ -1,398 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "bytes"
- "encoding/gob"
- "encoding/json"
- "sort"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-func init() {
- //gob.Register(map[string][]interface{}{})
- gob.Register(map[string]interface{}{})
- gob.Register([]interface{}{})
-}
-
-// OperationProps describes an operation
-//
-// NOTES:
-// - schemes, when present must be from [http, https, ws, wss]: see validate
-// - Security is handled as a special case: see MarshalJSON function
-type OperationProps struct {
- Description string `json:"description,omitempty"`
- Consumes []string `json:"consumes,omitempty"`
- Produces []string `json:"produces,omitempty"`
- Schemes []string `json:"schemes,omitempty"`
- Tags []string `json:"tags,omitempty"`
- Summary string `json:"summary,omitempty"`
- ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
- ID string `json:"operationId,omitempty"`
- Deprecated bool `json:"deprecated,omitempty"`
- Security []map[string][]string `json:"security,omitempty"`
- Parameters []Parameter `json:"parameters,omitempty"`
- Responses *Responses `json:"responses,omitempty"`
-}
-
-// MarshalJSON takes care of serializing operation properties to JSON
-//
-// We use a custom marhaller here to handle a special cases related to
-// the Security field. We need to preserve zero length slice
-// while omitting the field when the value is nil/unset.
-func (op OperationProps) MarshalJSON() ([]byte, error) {
- type Alias OperationProps
- if op.Security == nil {
- return json.Marshal(&struct {
- Security []map[string][]string `json:"security,omitempty"`
- *Alias
- }{
- Security: op.Security,
- Alias: (*Alias)(&op),
- })
- }
- return json.Marshal(&struct {
- Security []map[string][]string `json:"security"`
- *Alias
- }{
- Security: op.Security,
- Alias: (*Alias)(&op),
- })
-}
-
-// Operation describes a single API operation on a path.
-//
-// For more information: http://goo.gl/8us55a#operationObject
-type Operation struct {
- VendorExtensible
- OperationProps
-}
-
-// SuccessResponse gets a success response model
-func (o *Operation) SuccessResponse() (*Response, int, bool) {
- if o.Responses == nil {
- return nil, 0, false
- }
-
- responseCodes := make([]int, 0, len(o.Responses.StatusCodeResponses))
- for k := range o.Responses.StatusCodeResponses {
- if k >= 200 && k < 300 {
- responseCodes = append(responseCodes, k)
- }
- }
- if len(responseCodes) > 0 {
- sort.Ints(responseCodes)
- v := o.Responses.StatusCodeResponses[responseCodes[0]]
- return &v, responseCodes[0], true
- }
-
- return o.Responses.Default, 0, false
-}
-
-// JSONLookup look up a value by the json property name
-func (o Operation) JSONLookup(token string) (interface{}, error) {
- if ex, ok := o.Extensions[token]; ok {
- return &ex, nil
- }
- r, _, err := jsonpointer.GetForToken(o.OperationProps, token)
- return r, err
-}
-
-// UnmarshalJSON hydrates this items instance with the data from JSON
-func (o *Operation) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &o.OperationProps); err != nil {
- return err
- }
- return json.Unmarshal(data, &o.VendorExtensible)
-}
-
-// MarshalJSON converts this items object to JSON
-func (o Operation) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(o.OperationProps)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(o.VendorExtensible)
- if err != nil {
- return nil, err
- }
- concated := swag.ConcatJSON(b1, b2)
- return concated, nil
-}
-
-// NewOperation creates a new operation instance.
-// It expects an ID as parameter but not passing an ID is also valid.
-func NewOperation(id string) *Operation {
- op := new(Operation)
- op.ID = id
- return op
-}
-
-// WithID sets the ID property on this operation, allows for chaining.
-func (o *Operation) WithID(id string) *Operation {
- o.ID = id
- return o
-}
-
-// WithDescription sets the description on this operation, allows for chaining
-func (o *Operation) WithDescription(description string) *Operation {
- o.Description = description
- return o
-}
-
-// WithSummary sets the summary on this operation, allows for chaining
-func (o *Operation) WithSummary(summary string) *Operation {
- o.Summary = summary
- return o
-}
-
-// WithExternalDocs sets/removes the external docs for/from this operation.
-// When you pass empty strings as params the external documents will be removed.
-// When you pass non-empty string as one value then those values will be used on the external docs object.
-// So when you pass a non-empty description, you should also pass the url and vice versa.
-func (o *Operation) WithExternalDocs(description, url string) *Operation {
- if description == "" && url == "" {
- o.ExternalDocs = nil
- return o
- }
-
- if o.ExternalDocs == nil {
- o.ExternalDocs = &ExternalDocumentation{}
- }
- o.ExternalDocs.Description = description
- o.ExternalDocs.URL = url
- return o
-}
-
-// Deprecate marks the operation as deprecated
-func (o *Operation) Deprecate() *Operation {
- o.Deprecated = true
- return o
-}
-
-// Undeprecate marks the operation as not deprected
-func (o *Operation) Undeprecate() *Operation {
- o.Deprecated = false
- return o
-}
-
-// WithConsumes adds media types for incoming body values
-func (o *Operation) WithConsumes(mediaTypes ...string) *Operation {
- o.Consumes = append(o.Consumes, mediaTypes...)
- return o
-}
-
-// WithProduces adds media types for outgoing body values
-func (o *Operation) WithProduces(mediaTypes ...string) *Operation {
- o.Produces = append(o.Produces, mediaTypes...)
- return o
-}
-
-// WithTags adds tags for this operation
-func (o *Operation) WithTags(tags ...string) *Operation {
- o.Tags = append(o.Tags, tags...)
- return o
-}
-
-// AddParam adds a parameter to this operation, when a parameter for that location
-// and with that name already exists it will be replaced
-func (o *Operation) AddParam(param *Parameter) *Operation {
- if param == nil {
- return o
- }
-
- for i, p := range o.Parameters {
- if p.Name == param.Name && p.In == param.In {
- params := append(o.Parameters[:i], *param)
- params = append(params, o.Parameters[i+1:]...)
- o.Parameters = params
- return o
- }
- }
-
- o.Parameters = append(o.Parameters, *param)
- return o
-}
-
-// RemoveParam removes a parameter from the operation
-func (o *Operation) RemoveParam(name, in string) *Operation {
- for i, p := range o.Parameters {
- if p.Name == name && p.In == in {
- o.Parameters = append(o.Parameters[:i], o.Parameters[i+1:]...)
- return o
- }
- }
- return o
-}
-
-// SecuredWith adds a security scope to this operation.
-func (o *Operation) SecuredWith(name string, scopes ...string) *Operation {
- o.Security = append(o.Security, map[string][]string{name: scopes})
- return o
-}
-
-// WithDefaultResponse adds a default response to the operation.
-// Passing a nil value will remove the response
-func (o *Operation) WithDefaultResponse(response *Response) *Operation {
- return o.RespondsWith(0, response)
-}
-
-// RespondsWith adds a status code response to the operation.
-// When the code is 0 the value of the response will be used as default response value.
-// When the value of the response is nil it will be removed from the operation
-func (o *Operation) RespondsWith(code int, response *Response) *Operation {
- if o.Responses == nil {
- o.Responses = new(Responses)
- }
- if code == 0 {
- o.Responses.Default = response
- return o
- }
- if response == nil {
- delete(o.Responses.StatusCodeResponses, code)
- return o
- }
- if o.Responses.StatusCodeResponses == nil {
- o.Responses.StatusCodeResponses = make(map[int]Response)
- }
- o.Responses.StatusCodeResponses[code] = *response
- return o
-}
-
-type opsAlias OperationProps
-
-type gobAlias struct {
- Security []map[string]struct {
- List []string
- Pad bool
- }
- Alias *opsAlias
- SecurityIsEmpty bool
-}
-
-// GobEncode provides a safe gob encoder for Operation, including empty security requirements
-func (o Operation) GobEncode() ([]byte, error) {
- raw := struct {
- Ext VendorExtensible
- Props OperationProps
- }{
- Ext: o.VendorExtensible,
- Props: o.OperationProps,
- }
- var b bytes.Buffer
- err := gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
-}
-
-// GobDecode provides a safe gob decoder for Operation, including empty security requirements
-func (o *Operation) GobDecode(b []byte) error {
- var raw struct {
- Ext VendorExtensible
- Props OperationProps
- }
-
- buf := bytes.NewBuffer(b)
- err := gob.NewDecoder(buf).Decode(&raw)
- if err != nil {
- return err
- }
- o.VendorExtensible = raw.Ext
- o.OperationProps = raw.Props
- return nil
-}
-
-// GobEncode provides a safe gob encoder for Operation, including empty security requirements
-func (op OperationProps) GobEncode() ([]byte, error) {
- raw := gobAlias{
- Alias: (*opsAlias)(&op),
- }
-
- var b bytes.Buffer
- if op.Security == nil {
- // nil security requirement
- err := gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
- }
-
- if len(op.Security) == 0 {
- // empty, but non-nil security requirement
- raw.SecurityIsEmpty = true
- raw.Alias.Security = nil
- err := gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
- }
-
- raw.Security = make([]map[string]struct {
- List []string
- Pad bool
- }, 0, len(op.Security))
- for _, req := range op.Security {
- v := make(map[string]struct {
- List []string
- Pad bool
- }, len(req))
- for k, val := range req {
- v[k] = struct {
- List []string
- Pad bool
- }{
- List: val,
- }
- }
- raw.Security = append(raw.Security, v)
- }
-
- err := gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
-}
-
-// GobDecode provides a safe gob decoder for Operation, including empty security requirements
-func (op *OperationProps) GobDecode(b []byte) error {
- var raw gobAlias
-
- buf := bytes.NewBuffer(b)
- err := gob.NewDecoder(buf).Decode(&raw)
- if err != nil {
- return err
- }
- if raw.Alias == nil {
- return nil
- }
-
- switch {
- case raw.SecurityIsEmpty:
- // empty, but non-nil security requirement
- raw.Alias.Security = []map[string][]string{}
- case len(raw.Alias.Security) == 0:
- // nil security requirement
- raw.Alias.Security = nil
- default:
- raw.Alias.Security = make([]map[string][]string, 0, len(raw.Security))
- for _, req := range raw.Security {
- v := make(map[string][]string, len(req))
- for k, val := range req {
- v[k] = make([]string, 0, len(val.List))
- v[k] = append(v[k], val.List...)
- }
- raw.Alias.Security = append(raw.Alias.Security, v)
- }
- }
-
- *op = *(*OperationProps)(raw.Alias)
- return nil
-}
diff --git a/vendor/github.com/go-openapi/spec/parameter.go b/vendor/github.com/go-openapi/spec/parameter.go
deleted file mode 100644
index cecdff545..000000000
--- a/vendor/github.com/go-openapi/spec/parameter.go
+++ /dev/null
@@ -1,321 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "strings"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-// QueryParam creates a query parameter
-func QueryParam(name string) *Parameter {
- return &Parameter{ParamProps: ParamProps{Name: name, In: "query"}}
-}
-
-// HeaderParam creates a header parameter, this is always required by default
-func HeaderParam(name string) *Parameter {
- return &Parameter{ParamProps: ParamProps{Name: name, In: "header", Required: true}}
-}
-
-// PathParam creates a path parameter, this is always required
-func PathParam(name string) *Parameter {
- return &Parameter{ParamProps: ParamProps{Name: name, In: "path", Required: true}}
-}
-
-// BodyParam creates a body parameter
-func BodyParam(name string, schema *Schema) *Parameter {
- return &Parameter{ParamProps: ParamProps{Name: name, In: "body", Schema: schema},
- SimpleSchema: SimpleSchema{Type: "object"}}
-}
-
-// FormDataParam creates a body parameter
-func FormDataParam(name string) *Parameter {
- return &Parameter{ParamProps: ParamProps{Name: name, In: "formData"}}
-}
-
-// FileParam creates a body parameter
-func FileParam(name string) *Parameter {
- return &Parameter{ParamProps: ParamProps{Name: name, In: "formData"},
- SimpleSchema: SimpleSchema{Type: "file"}}
-}
-
-// SimpleArrayParam creates a param for a simple array (string, int, date etc)
-func SimpleArrayParam(name, tpe, fmt string) *Parameter {
- return &Parameter{ParamProps: ParamProps{Name: name},
- SimpleSchema: SimpleSchema{Type: jsonArray, CollectionFormat: "csv",
- Items: &Items{SimpleSchema: SimpleSchema{Type: "string", Format: fmt}}}}
-}
-
-// ParamRef creates a parameter that's a json reference
-func ParamRef(uri string) *Parameter {
- p := new(Parameter)
- p.Ref = MustCreateRef(uri)
- return p
-}
-
-// ParamProps describes the specific attributes of an operation parameter
-//
-// NOTE:
-// - Schema is defined when "in" == "body": see validate
-// - AllowEmptyValue is allowed where "in" == "query" || "formData"
-type ParamProps struct {
- Description string `json:"description,omitempty"`
- Name string `json:"name,omitempty"`
- In string `json:"in,omitempty"`
- Required bool `json:"required,omitempty"`
- Schema *Schema `json:"schema,omitempty"`
- AllowEmptyValue bool `json:"allowEmptyValue,omitempty"`
-}
-
-// Parameter a unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn).
-//
-// There are five possible parameter types.
-// * Path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part
-// of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`,
-// the path parameter is `itemId`.
-// * Query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`.
-// * Header - Custom headers that are expected as part of the request.
-// * Body - The payload that's appended to the HTTP request. Since there can only be one payload, there can only be
-// _one_ body parameter. The name of the body parameter has no effect on the parameter itself and is used for
-// documentation purposes only. Since Form parameters are also in the payload, body and form parameters cannot exist
-// together for the same operation.
-// * Form - Used to describe the payload of an HTTP request when either `application/x-www-form-urlencoded` or
-// `multipart/form-data` are used as the content type of the request (in Swagger's definition,
-// the [`consumes`](#operationConsumes) property of an operation). This is the only parameter type that can be used
-// to send files, thus supporting the `file` type. Since form parameters are sent in the payload, they cannot be
-// declared together with a body parameter for the same operation. Form parameters have a different format based on
-// the content-type used (for further details, consult http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4).
-// * `application/x-www-form-urlencoded` - Similar to the format of Query parameters but as a payload.
-// For example, `foo=1&bar=swagger` - both `foo` and `bar` are form parameters. This is normally used for simple
-// parameters that are being transferred.
-// * `multipart/form-data` - each parameter takes a section in the payload with an internal header.
-// For example, for the header `Content-Disposition: form-data; name="submit-name"` the name of the parameter is
-// `submit-name`. This type of form parameters is more commonly used for file transfers.
-//
-// For more information: http://goo.gl/8us55a#parameterObject
-type Parameter struct {
- Refable
- CommonValidations
- SimpleSchema
- VendorExtensible
- ParamProps
-}
-
-// JSONLookup look up a value by the json property name
-func (p Parameter) JSONLookup(token string) (interface{}, error) {
- if ex, ok := p.Extensions[token]; ok {
- return &ex, nil
- }
- if token == jsonRef {
- return &p.Ref, nil
- }
-
- r, _, err := jsonpointer.GetForToken(p.CommonValidations, token)
- if err != nil && !strings.HasPrefix(err.Error(), "object has no field") {
- return nil, err
- }
- if r != nil {
- return r, nil
- }
- r, _, err = jsonpointer.GetForToken(p.SimpleSchema, token)
- if err != nil && !strings.HasPrefix(err.Error(), "object has no field") {
- return nil, err
- }
- if r != nil {
- return r, nil
- }
- r, _, err = jsonpointer.GetForToken(p.ParamProps, token)
- return r, err
-}
-
-// WithDescription a fluent builder method for the description of the parameter
-func (p *Parameter) WithDescription(description string) *Parameter {
- p.Description = description
- return p
-}
-
-// Named a fluent builder method to override the name of the parameter
-func (p *Parameter) Named(name string) *Parameter {
- p.Name = name
- return p
-}
-
-// WithLocation a fluent builder method to override the location of the parameter
-func (p *Parameter) WithLocation(in string) *Parameter {
- p.In = in
- return p
-}
-
-// Typed a fluent builder method for the type of the parameter value
-func (p *Parameter) Typed(tpe, format string) *Parameter {
- p.Type = tpe
- p.Format = format
- return p
-}
-
-// CollectionOf a fluent builder method for an array parameter
-func (p *Parameter) CollectionOf(items *Items, format string) *Parameter {
- p.Type = jsonArray
- p.Items = items
- p.CollectionFormat = format
- return p
-}
-
-// WithDefault sets the default value on this parameter
-func (p *Parameter) WithDefault(defaultValue interface{}) *Parameter {
- p.AsOptional() // with default implies optional
- p.Default = defaultValue
- return p
-}
-
-// AllowsEmptyValues flags this parameter as being ok with empty values
-func (p *Parameter) AllowsEmptyValues() *Parameter {
- p.AllowEmptyValue = true
- return p
-}
-
-// NoEmptyValues flags this parameter as not liking empty values
-func (p *Parameter) NoEmptyValues() *Parameter {
- p.AllowEmptyValue = false
- return p
-}
-
-// AsOptional flags this parameter as optional
-func (p *Parameter) AsOptional() *Parameter {
- p.Required = false
- return p
-}
-
-// AsRequired flags this parameter as required
-func (p *Parameter) AsRequired() *Parameter {
- if p.Default != nil { // with a default required makes no sense
- return p
- }
- p.Required = true
- return p
-}
-
-// WithMaxLength sets a max length value
-func (p *Parameter) WithMaxLength(max int64) *Parameter {
- p.MaxLength = &max
- return p
-}
-
-// WithMinLength sets a min length value
-func (p *Parameter) WithMinLength(min int64) *Parameter {
- p.MinLength = &min
- return p
-}
-
-// WithPattern sets a pattern value
-func (p *Parameter) WithPattern(pattern string) *Parameter {
- p.Pattern = pattern
- return p
-}
-
-// WithMultipleOf sets a multiple of value
-func (p *Parameter) WithMultipleOf(number float64) *Parameter {
- p.MultipleOf = &number
- return p
-}
-
-// WithMaximum sets a maximum number value
-func (p *Parameter) WithMaximum(max float64, exclusive bool) *Parameter {
- p.Maximum = &max
- p.ExclusiveMaximum = exclusive
- return p
-}
-
-// WithMinimum sets a minimum number value
-func (p *Parameter) WithMinimum(min float64, exclusive bool) *Parameter {
- p.Minimum = &min
- p.ExclusiveMinimum = exclusive
- return p
-}
-
-// WithEnum sets a the enum values (replace)
-func (p *Parameter) WithEnum(values ...interface{}) *Parameter {
- p.Enum = append([]interface{}{}, values...)
- return p
-}
-
-// WithMaxItems sets the max items
-func (p *Parameter) WithMaxItems(size int64) *Parameter {
- p.MaxItems = &size
- return p
-}
-
-// WithMinItems sets the min items
-func (p *Parameter) WithMinItems(size int64) *Parameter {
- p.MinItems = &size
- return p
-}
-
-// UniqueValues dictates that this array can only have unique items
-func (p *Parameter) UniqueValues() *Parameter {
- p.UniqueItems = true
- return p
-}
-
-// AllowDuplicates this array can have duplicates
-func (p *Parameter) AllowDuplicates() *Parameter {
- p.UniqueItems = false
- return p
-}
-
-// UnmarshalJSON hydrates this items instance with the data from JSON
-func (p *Parameter) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &p.CommonValidations); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &p.Refable); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &p.SimpleSchema); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &p.VendorExtensible); err != nil {
- return err
- }
- return json.Unmarshal(data, &p.ParamProps)
-}
-
-// MarshalJSON converts this items object to JSON
-func (p Parameter) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(p.CommonValidations)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(p.SimpleSchema)
- if err != nil {
- return nil, err
- }
- b3, err := json.Marshal(p.Refable)
- if err != nil {
- return nil, err
- }
- b4, err := json.Marshal(p.VendorExtensible)
- if err != nil {
- return nil, err
- }
- b5, err := json.Marshal(p.ParamProps)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b3, b1, b2, b4, b5), nil
-}
diff --git a/vendor/github.com/go-openapi/spec/path_item.go b/vendor/github.com/go-openapi/spec/path_item.go
deleted file mode 100644
index 68fc8e901..000000000
--- a/vendor/github.com/go-openapi/spec/path_item.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-// PathItemProps the path item specific properties
-type PathItemProps struct {
- Get *Operation `json:"get,omitempty"`
- Put *Operation `json:"put,omitempty"`
- Post *Operation `json:"post,omitempty"`
- Delete *Operation `json:"delete,omitempty"`
- Options *Operation `json:"options,omitempty"`
- Head *Operation `json:"head,omitempty"`
- Patch *Operation `json:"patch,omitempty"`
- Parameters []Parameter `json:"parameters,omitempty"`
-}
-
-// PathItem describes the operations available on a single path.
-// A Path Item may be empty, due to [ACL constraints](http://goo.gl/8us55a#securityFiltering).
-// The path itself is still exposed to the documentation viewer but they will
-// not know which operations and parameters are available.
-//
-// For more information: http://goo.gl/8us55a#pathItemObject
-type PathItem struct {
- Refable
- VendorExtensible
- PathItemProps
-}
-
-// JSONLookup look up a value by the json property name
-func (p PathItem) JSONLookup(token string) (interface{}, error) {
- if ex, ok := p.Extensions[token]; ok {
- return &ex, nil
- }
- if token == jsonRef {
- return &p.Ref, nil
- }
- r, _, err := jsonpointer.GetForToken(p.PathItemProps, token)
- return r, err
-}
-
-// UnmarshalJSON hydrates this items instance with the data from JSON
-func (p *PathItem) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &p.Refable); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &p.VendorExtensible); err != nil {
- return err
- }
- return json.Unmarshal(data, &p.PathItemProps)
-}
-
-// MarshalJSON converts this items object to JSON
-func (p PathItem) MarshalJSON() ([]byte, error) {
- b3, err := json.Marshal(p.Refable)
- if err != nil {
- return nil, err
- }
- b4, err := json.Marshal(p.VendorExtensible)
- if err != nil {
- return nil, err
- }
- b5, err := json.Marshal(p.PathItemProps)
- if err != nil {
- return nil, err
- }
- concated := swag.ConcatJSON(b3, b4, b5)
- return concated, nil
-}
diff --git a/vendor/github.com/go-openapi/spec/paths.go b/vendor/github.com/go-openapi/spec/paths.go
deleted file mode 100644
index 9dc82a290..000000000
--- a/vendor/github.com/go-openapi/spec/paths.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "fmt"
- "strings"
-
- "github.com/go-openapi/swag"
-)
-
-// Paths holds the relative paths to the individual endpoints.
-// The path is appended to the [`basePath`](http://goo.gl/8us55a#swaggerBasePath) in order
-// to construct the full URL.
-// The Paths may be empty, due to [ACL constraints](http://goo.gl/8us55a#securityFiltering).
-//
-// For more information: http://goo.gl/8us55a#pathsObject
-type Paths struct {
- VendorExtensible
- Paths map[string]PathItem `json:"-"` // custom serializer to flatten this, each entry must start with "/"
-}
-
-// JSONLookup look up a value by the json property name
-func (p Paths) JSONLookup(token string) (interface{}, error) {
- if pi, ok := p.Paths[token]; ok {
- return &pi, nil
- }
- if ex, ok := p.Extensions[token]; ok {
- return &ex, nil
- }
- return nil, fmt.Errorf("object has no field %q", token)
-}
-
-// UnmarshalJSON hydrates this items instance with the data from JSON
-func (p *Paths) UnmarshalJSON(data []byte) error {
- var res map[string]json.RawMessage
- if err := json.Unmarshal(data, &res); err != nil {
- return err
- }
- for k, v := range res {
- if strings.HasPrefix(strings.ToLower(k), "x-") {
- if p.Extensions == nil {
- p.Extensions = make(map[string]interface{})
- }
- var d interface{}
- if err := json.Unmarshal(v, &d); err != nil {
- return err
- }
- p.Extensions[k] = d
- }
- if strings.HasPrefix(k, "/") {
- if p.Paths == nil {
- p.Paths = make(map[string]PathItem)
- }
- var pi PathItem
- if err := json.Unmarshal(v, &pi); err != nil {
- return err
- }
- p.Paths[k] = pi
- }
- }
- return nil
-}
-
-// MarshalJSON converts this items object to JSON
-func (p Paths) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(p.VendorExtensible)
- if err != nil {
- return nil, err
- }
-
- pths := make(map[string]PathItem)
- for k, v := range p.Paths {
- if strings.HasPrefix(k, "/") {
- pths[k] = v
- }
- }
- b2, err := json.Marshal(pths)
- if err != nil {
- return nil, err
- }
- concated := swag.ConcatJSON(b1, b2)
- return concated, nil
-}
diff --git a/vendor/github.com/go-openapi/spec/ref.go b/vendor/github.com/go-openapi/spec/ref.go
deleted file mode 100644
index 813dfe71b..000000000
--- a/vendor/github.com/go-openapi/spec/ref.go
+++ /dev/null
@@ -1,192 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "bytes"
- "encoding/gob"
- "encoding/json"
- "net/http"
- "os"
- "path/filepath"
-
- "github.com/go-openapi/jsonreference"
-)
-
-// Refable is a struct for things that accept a $ref property
-type Refable struct {
- Ref Ref
-}
-
-// MarshalJSON marshals the ref to json
-func (r Refable) MarshalJSON() ([]byte, error) {
- return r.Ref.MarshalJSON()
-}
-
-// UnmarshalJSON unmarshalss the ref from json
-func (r *Refable) UnmarshalJSON(d []byte) error {
- return json.Unmarshal(d, &r.Ref)
-}
-
-// Ref represents a json reference that is potentially resolved
-type Ref struct {
- jsonreference.Ref
-}
-
-// RemoteURI gets the remote uri part of the ref
-func (r *Ref) RemoteURI() string {
- if r.String() == "" {
- return r.String()
- }
-
- u := *r.GetURL()
- u.Fragment = ""
- return u.String()
-}
-
-// IsValidURI returns true when the url the ref points to can be found
-func (r *Ref) IsValidURI(basepaths ...string) bool {
- if r.String() == "" {
- return true
- }
-
- v := r.RemoteURI()
- if v == "" {
- return true
- }
-
- if r.HasFullURL {
- rr, err := http.Get(v)
- if err != nil {
- return false
- }
- defer rr.Body.Close()
-
- return rr.StatusCode/100 == 2
- }
-
- if !(r.HasFileScheme || r.HasFullFilePath || r.HasURLPathOnly) {
- return false
- }
-
- // check for local file
- pth := v
- if r.HasURLPathOnly {
- base := "."
- if len(basepaths) > 0 {
- base = filepath.Dir(filepath.Join(basepaths...))
- }
- p, e := filepath.Abs(filepath.ToSlash(filepath.Join(base, pth)))
- if e != nil {
- return false
- }
- pth = p
- }
-
- fi, err := os.Stat(filepath.ToSlash(pth))
- if err != nil {
- return false
- }
-
- return !fi.IsDir()
-}
-
-// Inherits creates a new reference from a parent and a child
-// If the child cannot inherit from the parent, an error is returned
-func (r *Ref) Inherits(child Ref) (*Ref, error) {
- ref, err := r.Ref.Inherits(child.Ref)
- if err != nil {
- return nil, err
- }
- return &Ref{Ref: *ref}, nil
-}
-
-// NewRef creates a new instance of a ref object
-// returns an error when the reference uri is an invalid uri
-func NewRef(refURI string) (Ref, error) {
- ref, err := jsonreference.New(refURI)
- if err != nil {
- return Ref{}, err
- }
- return Ref{Ref: ref}, nil
-}
-
-// MustCreateRef creates a ref object but panics when refURI is invalid.
-// Use the NewRef method for a version that returns an error.
-func MustCreateRef(refURI string) Ref {
- return Ref{Ref: jsonreference.MustCreateRef(refURI)}
-}
-
-// MarshalJSON marshals this ref into a JSON object
-func (r Ref) MarshalJSON() ([]byte, error) {
- str := r.String()
- if str == "" {
- if r.IsRoot() {
- return []byte(`{"$ref":""}`), nil
- }
- return []byte("{}"), nil
- }
- v := map[string]interface{}{"$ref": str}
- return json.Marshal(v)
-}
-
-// UnmarshalJSON unmarshals this ref from a JSON object
-func (r *Ref) UnmarshalJSON(d []byte) error {
- var v map[string]interface{}
- if err := json.Unmarshal(d, &v); err != nil {
- return err
- }
- return r.fromMap(v)
-}
-
-// GobEncode provides a safe gob encoder for Ref
-func (r Ref) GobEncode() ([]byte, error) {
- var b bytes.Buffer
- raw, err := r.MarshalJSON()
- if err != nil {
- return nil, err
- }
- err = gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
-}
-
-// GobDecode provides a safe gob decoder for Ref
-func (r *Ref) GobDecode(b []byte) error {
- var raw []byte
- buf := bytes.NewBuffer(b)
- err := gob.NewDecoder(buf).Decode(&raw)
- if err != nil {
- return err
- }
- return json.Unmarshal(raw, r)
-}
-
-func (r *Ref) fromMap(v map[string]interface{}) error {
- if v == nil {
- return nil
- }
-
- if vv, ok := v["$ref"]; ok {
- if str, ok := vv.(string); ok {
- ref, err := jsonreference.New(str)
- if err != nil {
- return err
- }
- *r = Ref{Ref: ref}
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/go-openapi/spec/response.go b/vendor/github.com/go-openapi/spec/response.go
deleted file mode 100644
index 27729c1d9..000000000
--- a/vendor/github.com/go-openapi/spec/response.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-// ResponseProps properties specific to a response
-type ResponseProps struct {
- Description string `json:"description,omitempty"`
- Schema *Schema `json:"schema,omitempty"`
- Headers map[string]Header `json:"headers,omitempty"`
- Examples map[string]interface{} `json:"examples,omitempty"`
-}
-
-// Response describes a single response from an API Operation.
-//
-// For more information: http://goo.gl/8us55a#responseObject
-type Response struct {
- Refable
- ResponseProps
- VendorExtensible
-}
-
-// JSONLookup look up a value by the json property name
-func (r Response) JSONLookup(token string) (interface{}, error) {
- if ex, ok := r.Extensions[token]; ok {
- return &ex, nil
- }
- if token == "$ref" {
- return &r.Ref, nil
- }
- ptr, _, err := jsonpointer.GetForToken(r.ResponseProps, token)
- return ptr, err
-}
-
-// UnmarshalJSON hydrates this items instance with the data from JSON
-func (r *Response) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &r.ResponseProps); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &r.Refable); err != nil {
- return err
- }
- return json.Unmarshal(data, &r.VendorExtensible)
-}
-
-// MarshalJSON converts this items object to JSON
-func (r Response) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(r.ResponseProps)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(r.Refable)
- if err != nil {
- return nil, err
- }
- b3, err := json.Marshal(r.VendorExtensible)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b1, b2, b3), nil
-}
-
-// NewResponse creates a new response instance
-func NewResponse() *Response {
- return new(Response)
-}
-
-// ResponseRef creates a response as a json reference
-func ResponseRef(url string) *Response {
- resp := NewResponse()
- resp.Ref = MustCreateRef(url)
- return resp
-}
-
-// WithDescription sets the description on this response, allows for chaining
-func (r *Response) WithDescription(description string) *Response {
- r.Description = description
- return r
-}
-
-// WithSchema sets the schema on this response, allows for chaining.
-// Passing a nil argument removes the schema from this response
-func (r *Response) WithSchema(schema *Schema) *Response {
- r.Schema = schema
- return r
-}
-
-// AddHeader adds a header to this response
-func (r *Response) AddHeader(name string, header *Header) *Response {
- if header == nil {
- return r.RemoveHeader(name)
- }
- if r.Headers == nil {
- r.Headers = make(map[string]Header)
- }
- r.Headers[name] = *header
- return r
-}
-
-// RemoveHeader removes a header from this response
-func (r *Response) RemoveHeader(name string) *Response {
- delete(r.Headers, name)
- return r
-}
-
-// AddExample adds an example to this response
-func (r *Response) AddExample(mediaType string, example interface{}) *Response {
- if r.Examples == nil {
- r.Examples = make(map[string]interface{})
- }
- r.Examples[mediaType] = example
- return r
-}
diff --git a/vendor/github.com/go-openapi/spec/responses.go b/vendor/github.com/go-openapi/spec/responses.go
deleted file mode 100644
index 4efb6f868..000000000
--- a/vendor/github.com/go-openapi/spec/responses.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "fmt"
- "reflect"
- "strconv"
-
- "github.com/go-openapi/swag"
-)
-
-// Responses is a container for the expected responses of an operation.
-// The container maps a HTTP response code to the expected response.
-// It is not expected from the documentation to necessarily cover all possible HTTP response codes,
-// since they may not be known in advance. However, it is expected from the documentation to cover
-// a successful operation response and any known errors.
-//
-// The `default` can be used a default response object for all HTTP codes that are not covered
-// individually by the specification.
-//
-// The `Responses Object` MUST contain at least one response code, and it SHOULD be the response
-// for a successful operation call.
-//
-// For more information: http://goo.gl/8us55a#responsesObject
-type Responses struct {
- VendorExtensible
- ResponsesProps
-}
-
-// JSONLookup implements an interface to customize json pointer lookup
-func (r Responses) JSONLookup(token string) (interface{}, error) {
- if token == "default" {
- return r.Default, nil
- }
- if ex, ok := r.Extensions[token]; ok {
- return &ex, nil
- }
- if i, err := strconv.Atoi(token); err == nil {
- if scr, ok := r.StatusCodeResponses[i]; ok {
- return scr, nil
- }
- }
- return nil, fmt.Errorf("object has no field %q", token)
-}
-
-// UnmarshalJSON hydrates this items instance with the data from JSON
-func (r *Responses) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &r.ResponsesProps); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &r.VendorExtensible); err != nil {
- return err
- }
- if reflect.DeepEqual(ResponsesProps{}, r.ResponsesProps) {
- r.ResponsesProps = ResponsesProps{}
- }
- return nil
-}
-
-// MarshalJSON converts this items object to JSON
-func (r Responses) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(r.ResponsesProps)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(r.VendorExtensible)
- if err != nil {
- return nil, err
- }
- concated := swag.ConcatJSON(b1, b2)
- return concated, nil
-}
-
-// ResponsesProps describes all responses for an operation.
-// It tells what is the default response and maps all responses with a
-// HTTP status code.
-type ResponsesProps struct {
- Default *Response
- StatusCodeResponses map[int]Response
-}
-
-// MarshalJSON marshals responses as JSON
-func (r ResponsesProps) MarshalJSON() ([]byte, error) {
- toser := map[string]Response{}
- if r.Default != nil {
- toser["default"] = *r.Default
- }
- for k, v := range r.StatusCodeResponses {
- toser[strconv.Itoa(k)] = v
- }
- return json.Marshal(toser)
-}
-
-// UnmarshalJSON unmarshals responses from JSON
-func (r *ResponsesProps) UnmarshalJSON(data []byte) error {
- var res map[string]Response
- if err := json.Unmarshal(data, &res); err != nil {
- return nil
- }
- if v, ok := res["default"]; ok {
- r.Default = &v
- delete(res, "default")
- }
- for k, v := range res {
- if nk, err := strconv.Atoi(k); err == nil {
- if r.StatusCodeResponses == nil {
- r.StatusCodeResponses = map[int]Response{}
- }
- r.StatusCodeResponses[nk] = v
- }
- }
- return nil
-}
diff --git a/vendor/github.com/go-openapi/spec/schema.go b/vendor/github.com/go-openapi/spec/schema.go
deleted file mode 100644
index 37858ece9..000000000
--- a/vendor/github.com/go-openapi/spec/schema.go
+++ /dev/null
@@ -1,596 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "fmt"
- "net/url"
- "strings"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-// BooleanProperty creates a boolean property
-func BooleanProperty() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"boolean"}}}
-}
-
-// BoolProperty creates a boolean property
-func BoolProperty() *Schema { return BooleanProperty() }
-
-// StringProperty creates a string property
-func StringProperty() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}
-}
-
-// CharProperty creates a string property
-func CharProperty() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}
-}
-
-// Float64Property creates a float64/double property
-func Float64Property() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"number"}, Format: "double"}}
-}
-
-// Float32Property creates a float32/float property
-func Float32Property() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"number"}, Format: "float"}}
-}
-
-// Int8Property creates an int8 property
-func Int8Property() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int8"}}
-}
-
-// Int16Property creates an int16 property
-func Int16Property() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int16"}}
-}
-
-// Int32Property creates an int32 property
-func Int32Property() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int32"}}
-}
-
-// Int64Property creates an int64 property
-func Int64Property() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int64"}}
-}
-
-// StrFmtProperty creates a property for the named string format
-func StrFmtProperty(format string) *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}, Format: format}}
-}
-
-// DateProperty creates a date property
-func DateProperty() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}, Format: "date"}}
-}
-
-// DateTimeProperty creates a date time property
-func DateTimeProperty() *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}, Format: "date-time"}}
-}
-
-// MapProperty creates a map property
-func MapProperty(property *Schema) *Schema {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"object"},
- AdditionalProperties: &SchemaOrBool{Allows: true, Schema: property}}}
-}
-
-// RefProperty creates a ref property
-func RefProperty(name string) *Schema {
- return &Schema{SchemaProps: SchemaProps{Ref: MustCreateRef(name)}}
-}
-
-// RefSchema creates a ref property
-func RefSchema(name string) *Schema {
- return &Schema{SchemaProps: SchemaProps{Ref: MustCreateRef(name)}}
-}
-
-// ArrayProperty creates an array property
-func ArrayProperty(items *Schema) *Schema {
- if items == nil {
- return &Schema{SchemaProps: SchemaProps{Type: []string{"array"}}}
- }
- return &Schema{SchemaProps: SchemaProps{Items: &SchemaOrArray{Schema: items}, Type: []string{"array"}}}
-}
-
-// ComposedSchema creates a schema with allOf
-func ComposedSchema(schemas ...Schema) *Schema {
- s := new(Schema)
- s.AllOf = schemas
- return s
-}
-
-// SchemaURL represents a schema url
-type SchemaURL string
-
-// MarshalJSON marshal this to JSON
-func (r SchemaURL) MarshalJSON() ([]byte, error) {
- if r == "" {
- return []byte("{}"), nil
- }
- v := map[string]interface{}{"$schema": string(r)}
- return json.Marshal(v)
-}
-
-// UnmarshalJSON unmarshal this from JSON
-func (r *SchemaURL) UnmarshalJSON(data []byte) error {
- var v map[string]interface{}
- if err := json.Unmarshal(data, &v); err != nil {
- return err
- }
- return r.fromMap(v)
-}
-
-func (r *SchemaURL) fromMap(v map[string]interface{}) error {
- if v == nil {
- return nil
- }
- if vv, ok := v["$schema"]; ok {
- if str, ok := vv.(string); ok {
- u, err := url.Parse(str)
- if err != nil {
- return err
- }
-
- *r = SchemaURL(u.String())
- }
- }
- return nil
-}
-
-// SchemaProps describes a JSON schema (draft 4)
-type SchemaProps struct {
- ID string `json:"id,omitempty"`
- Ref Ref `json:"-"`
- Schema SchemaURL `json:"-"`
- Description string `json:"description,omitempty"`
- Type StringOrArray `json:"type,omitempty"`
- Nullable bool `json:"nullable,omitempty"`
- Format string `json:"format,omitempty"`
- Title string `json:"title,omitempty"`
- Default interface{} `json:"default,omitempty"`
- Maximum *float64 `json:"maximum,omitempty"`
- ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"`
- Minimum *float64 `json:"minimum,omitempty"`
- ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"`
- MaxLength *int64 `json:"maxLength,omitempty"`
- MinLength *int64 `json:"minLength,omitempty"`
- Pattern string `json:"pattern,omitempty"`
- MaxItems *int64 `json:"maxItems,omitempty"`
- MinItems *int64 `json:"minItems,omitempty"`
- UniqueItems bool `json:"uniqueItems,omitempty"`
- MultipleOf *float64 `json:"multipleOf,omitempty"`
- Enum []interface{} `json:"enum,omitempty"`
- MaxProperties *int64 `json:"maxProperties,omitempty"`
- MinProperties *int64 `json:"minProperties,omitempty"`
- Required []string `json:"required,omitempty"`
- Items *SchemaOrArray `json:"items,omitempty"`
- AllOf []Schema `json:"allOf,omitempty"`
- OneOf []Schema `json:"oneOf,omitempty"`
- AnyOf []Schema `json:"anyOf,omitempty"`
- Not *Schema `json:"not,omitempty"`
- Properties map[string]Schema `json:"properties,omitempty"`
- AdditionalProperties *SchemaOrBool `json:"additionalProperties,omitempty"`
- PatternProperties map[string]Schema `json:"patternProperties,omitempty"`
- Dependencies Dependencies `json:"dependencies,omitempty"`
- AdditionalItems *SchemaOrBool `json:"additionalItems,omitempty"`
- Definitions Definitions `json:"definitions,omitempty"`
-}
-
-// SwaggerSchemaProps are additional properties supported by swagger schemas, but not JSON-schema (draft 4)
-type SwaggerSchemaProps struct {
- Discriminator string `json:"discriminator,omitempty"`
- ReadOnly bool `json:"readOnly,omitempty"`
- XML *XMLObject `json:"xml,omitempty"`
- ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
- Example interface{} `json:"example,omitempty"`
-}
-
-// Schema the schema object allows the definition of input and output data types.
-// These types can be objects, but also primitives and arrays.
-// This object is based on the [JSON Schema Specification Draft 4](http://json-schema.org/)
-// and uses a predefined subset of it.
-// On top of this subset, there are extensions provided by this specification to allow for more complete documentation.
-//
-// For more information: http://goo.gl/8us55a#schemaObject
-type Schema struct {
- VendorExtensible
- SchemaProps
- SwaggerSchemaProps
- ExtraProps map[string]interface{} `json:"-"`
-}
-
-// JSONLookup implements an interface to customize json pointer lookup
-func (s Schema) JSONLookup(token string) (interface{}, error) {
- if ex, ok := s.Extensions[token]; ok {
- return &ex, nil
- }
-
- if ex, ok := s.ExtraProps[token]; ok {
- return &ex, nil
- }
-
- r, _, err := jsonpointer.GetForToken(s.SchemaProps, token)
- if r != nil || (err != nil && !strings.HasPrefix(err.Error(), "object has no field")) {
- return r, err
- }
- r, _, err = jsonpointer.GetForToken(s.SwaggerSchemaProps, token)
- return r, err
-}
-
-// WithID sets the id for this schema, allows for chaining
-func (s *Schema) WithID(id string) *Schema {
- s.ID = id
- return s
-}
-
-// WithTitle sets the title for this schema, allows for chaining
-func (s *Schema) WithTitle(title string) *Schema {
- s.Title = title
- return s
-}
-
-// WithDescription sets the description for this schema, allows for chaining
-func (s *Schema) WithDescription(description string) *Schema {
- s.Description = description
- return s
-}
-
-// WithProperties sets the properties for this schema
-func (s *Schema) WithProperties(schemas map[string]Schema) *Schema {
- s.Properties = schemas
- return s
-}
-
-// SetProperty sets a property on this schema
-func (s *Schema) SetProperty(name string, schema Schema) *Schema {
- if s.Properties == nil {
- s.Properties = make(map[string]Schema)
- }
- s.Properties[name] = schema
- return s
-}
-
-// WithAllOf sets the all of property
-func (s *Schema) WithAllOf(schemas ...Schema) *Schema {
- s.AllOf = schemas
- return s
-}
-
-// WithMaxProperties sets the max number of properties an object can have
-func (s *Schema) WithMaxProperties(max int64) *Schema {
- s.MaxProperties = &max
- return s
-}
-
-// WithMinProperties sets the min number of properties an object must have
-func (s *Schema) WithMinProperties(min int64) *Schema {
- s.MinProperties = &min
- return s
-}
-
-// Typed sets the type of this schema for a single value item
-func (s *Schema) Typed(tpe, format string) *Schema {
- s.Type = []string{tpe}
- s.Format = format
- return s
-}
-
-// AddType adds a type with potential format to the types for this schema
-func (s *Schema) AddType(tpe, format string) *Schema {
- s.Type = append(s.Type, tpe)
- if format != "" {
- s.Format = format
- }
- return s
-}
-
-// AsNullable flags this schema as nullable.
-func (s *Schema) AsNullable() *Schema {
- s.Nullable = true
- return s
-}
-
-// CollectionOf a fluent builder method for an array parameter
-func (s *Schema) CollectionOf(items Schema) *Schema {
- s.Type = []string{jsonArray}
- s.Items = &SchemaOrArray{Schema: &items}
- return s
-}
-
-// WithDefault sets the default value on this parameter
-func (s *Schema) WithDefault(defaultValue interface{}) *Schema {
- s.Default = defaultValue
- return s
-}
-
-// WithRequired flags this parameter as required
-func (s *Schema) WithRequired(items ...string) *Schema {
- s.Required = items
- return s
-}
-
-// AddRequired adds field names to the required properties array
-func (s *Schema) AddRequired(items ...string) *Schema {
- s.Required = append(s.Required, items...)
- return s
-}
-
-// WithMaxLength sets a max length value
-func (s *Schema) WithMaxLength(max int64) *Schema {
- s.MaxLength = &max
- return s
-}
-
-// WithMinLength sets a min length value
-func (s *Schema) WithMinLength(min int64) *Schema {
- s.MinLength = &min
- return s
-}
-
-// WithPattern sets a pattern value
-func (s *Schema) WithPattern(pattern string) *Schema {
- s.Pattern = pattern
- return s
-}
-
-// WithMultipleOf sets a multiple of value
-func (s *Schema) WithMultipleOf(number float64) *Schema {
- s.MultipleOf = &number
- return s
-}
-
-// WithMaximum sets a maximum number value
-func (s *Schema) WithMaximum(max float64, exclusive bool) *Schema {
- s.Maximum = &max
- s.ExclusiveMaximum = exclusive
- return s
-}
-
-// WithMinimum sets a minimum number value
-func (s *Schema) WithMinimum(min float64, exclusive bool) *Schema {
- s.Minimum = &min
- s.ExclusiveMinimum = exclusive
- return s
-}
-
-// WithEnum sets a the enum values (replace)
-func (s *Schema) WithEnum(values ...interface{}) *Schema {
- s.Enum = append([]interface{}{}, values...)
- return s
-}
-
-// WithMaxItems sets the max items
-func (s *Schema) WithMaxItems(size int64) *Schema {
- s.MaxItems = &size
- return s
-}
-
-// WithMinItems sets the min items
-func (s *Schema) WithMinItems(size int64) *Schema {
- s.MinItems = &size
- return s
-}
-
-// UniqueValues dictates that this array can only have unique items
-func (s *Schema) UniqueValues() *Schema {
- s.UniqueItems = true
- return s
-}
-
-// AllowDuplicates this array can have duplicates
-func (s *Schema) AllowDuplicates() *Schema {
- s.UniqueItems = false
- return s
-}
-
-// AddToAllOf adds a schema to the allOf property
-func (s *Schema) AddToAllOf(schemas ...Schema) *Schema {
- s.AllOf = append(s.AllOf, schemas...)
- return s
-}
-
-// WithDiscriminator sets the name of the discriminator field
-func (s *Schema) WithDiscriminator(discriminator string) *Schema {
- s.Discriminator = discriminator
- return s
-}
-
-// AsReadOnly flags this schema as readonly
-func (s *Schema) AsReadOnly() *Schema {
- s.ReadOnly = true
- return s
-}
-
-// AsWritable flags this schema as writeable (not read-only)
-func (s *Schema) AsWritable() *Schema {
- s.ReadOnly = false
- return s
-}
-
-// WithExample sets the example for this schema
-func (s *Schema) WithExample(example interface{}) *Schema {
- s.Example = example
- return s
-}
-
-// WithExternalDocs sets/removes the external docs for/from this schema.
-// When you pass empty strings as params the external documents will be removed.
-// When you pass non-empty string as one value then those values will be used on the external docs object.
-// So when you pass a non-empty description, you should also pass the url and vice versa.
-func (s *Schema) WithExternalDocs(description, url string) *Schema {
- if description == "" && url == "" {
- s.ExternalDocs = nil
- return s
- }
-
- if s.ExternalDocs == nil {
- s.ExternalDocs = &ExternalDocumentation{}
- }
- s.ExternalDocs.Description = description
- s.ExternalDocs.URL = url
- return s
-}
-
-// WithXMLName sets the xml name for the object
-func (s *Schema) WithXMLName(name string) *Schema {
- if s.XML == nil {
- s.XML = new(XMLObject)
- }
- s.XML.Name = name
- return s
-}
-
-// WithXMLNamespace sets the xml namespace for the object
-func (s *Schema) WithXMLNamespace(namespace string) *Schema {
- if s.XML == nil {
- s.XML = new(XMLObject)
- }
- s.XML.Namespace = namespace
- return s
-}
-
-// WithXMLPrefix sets the xml prefix for the object
-func (s *Schema) WithXMLPrefix(prefix string) *Schema {
- if s.XML == nil {
- s.XML = new(XMLObject)
- }
- s.XML.Prefix = prefix
- return s
-}
-
-// AsXMLAttribute flags this object as xml attribute
-func (s *Schema) AsXMLAttribute() *Schema {
- if s.XML == nil {
- s.XML = new(XMLObject)
- }
- s.XML.Attribute = true
- return s
-}
-
-// AsXMLElement flags this object as an xml node
-func (s *Schema) AsXMLElement() *Schema {
- if s.XML == nil {
- s.XML = new(XMLObject)
- }
- s.XML.Attribute = false
- return s
-}
-
-// AsWrappedXML flags this object as wrapped, this is mostly useful for array types
-func (s *Schema) AsWrappedXML() *Schema {
- if s.XML == nil {
- s.XML = new(XMLObject)
- }
- s.XML.Wrapped = true
- return s
-}
-
-// AsUnwrappedXML flags this object as an xml node
-func (s *Schema) AsUnwrappedXML() *Schema {
- if s.XML == nil {
- s.XML = new(XMLObject)
- }
- s.XML.Wrapped = false
- return s
-}
-
-// MarshalJSON marshal this to JSON
-func (s Schema) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(s.SchemaProps)
- if err != nil {
- return nil, fmt.Errorf("schema props %v", err)
- }
- b2, err := json.Marshal(s.VendorExtensible)
- if err != nil {
- return nil, fmt.Errorf("vendor props %v", err)
- }
- b3, err := s.Ref.MarshalJSON()
- if err != nil {
- return nil, fmt.Errorf("ref prop %v", err)
- }
- b4, err := s.Schema.MarshalJSON()
- if err != nil {
- return nil, fmt.Errorf("schema prop %v", err)
- }
- b5, err := json.Marshal(s.SwaggerSchemaProps)
- if err != nil {
- return nil, fmt.Errorf("common validations %v", err)
- }
- var b6 []byte
- if s.ExtraProps != nil {
- jj, err := json.Marshal(s.ExtraProps)
- if err != nil {
- return nil, fmt.Errorf("extra props %v", err)
- }
- b6 = jj
- }
- return swag.ConcatJSON(b1, b2, b3, b4, b5, b6), nil
-}
-
-// UnmarshalJSON marshal this from JSON
-func (s *Schema) UnmarshalJSON(data []byte) error {
- props := struct {
- SchemaProps
- SwaggerSchemaProps
- }{}
- if err := json.Unmarshal(data, &props); err != nil {
- return err
- }
-
- sch := Schema{
- SchemaProps: props.SchemaProps,
- SwaggerSchemaProps: props.SwaggerSchemaProps,
- }
-
- var d map[string]interface{}
- if err := json.Unmarshal(data, &d); err != nil {
- return err
- }
-
- _ = sch.Ref.fromMap(d)
- _ = sch.Schema.fromMap(d)
-
- delete(d, "$ref")
- delete(d, "$schema")
- for _, pn := range swag.DefaultJSONNameProvider.GetJSONNames(s) {
- delete(d, pn)
- }
-
- for k, vv := range d {
- lk := strings.ToLower(k)
- if strings.HasPrefix(lk, "x-") {
- if sch.Extensions == nil {
- sch.Extensions = map[string]interface{}{}
- }
- sch.Extensions[k] = vv
- continue
- }
- if sch.ExtraProps == nil {
- sch.ExtraProps = map[string]interface{}{}
- }
- sch.ExtraProps[k] = vv
- }
-
- *s = sch
-
- return nil
-}
diff --git a/vendor/github.com/go-openapi/spec/schema_loader.go b/vendor/github.com/go-openapi/spec/schema_loader.go
deleted file mode 100644
index 9e20e96c2..000000000
--- a/vendor/github.com/go-openapi/spec/schema_loader.go
+++ /dev/null
@@ -1,276 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
- "fmt"
- "log"
- "net/url"
- "reflect"
- "strings"
-
- "github.com/go-openapi/swag"
-)
-
-// PathLoader function to use when loading remote refs
-var PathLoader func(string) (json.RawMessage, error)
-
-func init() {
- PathLoader = func(path string) (json.RawMessage, error) {
- data, err := swag.LoadFromFileOrHTTP(path)
- if err != nil {
- return nil, err
- }
- return json.RawMessage(data), nil
- }
-}
-
-// resolverContext allows to share a context during spec processing.
-// At the moment, it just holds the index of circular references found.
-type resolverContext struct {
- // circulars holds all visited circular references, which allows shortcuts.
- // NOTE: this is not just a performance improvement: it is required to figure out
- // circular references which participate several cycles.
- // This structure is privately instantiated and needs not be locked against
- // concurrent access, unless we chose to implement a parallel spec walking.
- circulars map[string]bool
- basePath string
-}
-
-func newResolverContext(originalBasePath string) *resolverContext {
- return &resolverContext{
- circulars: make(map[string]bool),
- basePath: originalBasePath, // keep the root base path in context
- }
-}
-
-type schemaLoader struct {
- root interface{}
- options *ExpandOptions
- cache ResolutionCache
- context *resolverContext
- loadDoc func(string) (json.RawMessage, error)
-}
-
-func (r *schemaLoader) transitiveResolver(basePath string, ref Ref) (*schemaLoader, error) {
- if ref.IsRoot() || ref.HasFragmentOnly {
- return r, nil
- }
-
- baseRef, _ := NewRef(basePath)
- currentRef := normalizeFileRef(&ref, basePath)
- if strings.HasPrefix(currentRef.String(), baseRef.String()) {
- return r, nil
- }
-
- // Set a new root to resolve against
- rootURL := currentRef.GetURL()
- rootURL.Fragment = ""
- root, _ := r.cache.Get(rootURL.String())
-
- // shallow copy of resolver options to set a new RelativeBase when
- // traversing multiple documents
- newOptions := r.options
- newOptions.RelativeBase = rootURL.String()
- debugLog("setting new root: %s", newOptions.RelativeBase)
- resolver, err := defaultSchemaLoader(root, newOptions, r.cache, r.context)
- if err != nil {
- return nil, err
- }
-
- return resolver, nil
-}
-
-func (r *schemaLoader) updateBasePath(transitive *schemaLoader, basePath string) string {
- if transitive != r {
- debugLog("got a new resolver")
- if transitive.options != nil && transitive.options.RelativeBase != "" {
- basePath, _ = absPath(transitive.options.RelativeBase)
- debugLog("new basePath = %s", basePath)
- }
- }
- return basePath
-}
-
-func (r *schemaLoader) resolveRef(ref *Ref, target interface{}, basePath string) error {
- tgt := reflect.ValueOf(target)
- if tgt.Kind() != reflect.Ptr {
- return fmt.Errorf("resolve ref: target needs to be a pointer")
- }
-
- refURL := ref.GetURL()
- if refURL == nil {
- return nil
- }
-
- var res interface{}
- var data interface{}
- var err error
- // Resolve against the root if it isn't nil, and if ref is pointing at the root, or has a fragment only which means
- // it is pointing somewhere in the root.
- root := r.root
- if (ref.IsRoot() || ref.HasFragmentOnly) && root == nil && basePath != "" {
- if baseRef, erb := NewRef(basePath); erb == nil {
- root, _, _, _ = r.load(baseRef.GetURL())
- }
- }
- if (ref.IsRoot() || ref.HasFragmentOnly) && root != nil {
- data = root
- } else {
- baseRef := normalizeFileRef(ref, basePath)
- debugLog("current ref is: %s", ref.String())
- debugLog("current ref normalized file: %s", baseRef.String())
- data, _, _, err = r.load(baseRef.GetURL())
- if err != nil {
- return err
- }
- }
-
- res = data
- if ref.String() != "" {
- res, _, err = ref.GetPointer().Get(data)
- if err != nil {
- return err
- }
- }
- return swag.DynamicJSONToStruct(res, target)
-}
-
-func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) {
- debugLog("loading schema from url: %s", refURL)
- toFetch := *refURL
- toFetch.Fragment = ""
-
- normalized := normalizeAbsPath(toFetch.String())
-
- data, fromCache := r.cache.Get(normalized)
- if !fromCache {
- b, err := r.loadDoc(normalized)
- if err != nil {
- debugLog("unable to load the document: %v", err)
- return nil, url.URL{}, false, err
- }
-
- if err := json.Unmarshal(b, &data); err != nil {
- return nil, url.URL{}, false, err
- }
- r.cache.Set(normalized, data)
- }
-
- return data, toFetch, fromCache, nil
-}
-
-// isCircular detects cycles in sequences of $ref.
-// It relies on a private context (which needs not be locked).
-func (r *schemaLoader) isCircular(ref *Ref, basePath string, parentRefs ...string) (foundCycle bool) {
- normalizedRef := normalizePaths(ref.String(), basePath)
- if _, ok := r.context.circulars[normalizedRef]; ok {
- // circular $ref has been already detected in another explored cycle
- foundCycle = true
- return
- }
- foundCycle = swag.ContainsStringsCI(parentRefs, normalizedRef)
- if foundCycle {
- r.context.circulars[normalizedRef] = true
- }
- return
-}
-
-// Resolve resolves a reference against basePath and stores the result in target
-// Resolve is not in charge of following references, it only resolves ref by following its URL
-// if the schema that ref is referring to has more refs in it. Resolve doesn't resolve them
-// if basePath is an empty string, ref is resolved against the root schema stored in the schemaLoader struct
-func (r *schemaLoader) Resolve(ref *Ref, target interface{}, basePath string) error {
- return r.resolveRef(ref, target, basePath)
-}
-
-func (r *schemaLoader) deref(input interface{}, parentRefs []string, basePath string) error {
- var ref *Ref
- switch refable := input.(type) {
- case *Schema:
- ref = &refable.Ref
- case *Parameter:
- ref = &refable.Ref
- case *Response:
- ref = &refable.Ref
- case *PathItem:
- ref = &refable.Ref
- default:
- return fmt.Errorf("deref: unsupported type %T", input)
- }
-
- curRef := ref.String()
- if curRef != "" {
- normalizedRef := normalizeFileRef(ref, basePath)
- normalizedBasePath := normalizedRef.RemoteURI()
-
- if r.isCircular(normalizedRef, basePath, parentRefs...) {
- return nil
- }
-
- if err := r.resolveRef(ref, input, basePath); r.shouldStopOnError(err) {
- return err
- }
-
- // NOTE(fredbi): removed basePath check => needs more testing
- if ref.String() != "" && ref.String() != curRef {
- parentRefs = append(parentRefs, normalizedRef.String())
- return r.deref(input, parentRefs, normalizedBasePath)
- }
- }
-
- return nil
-}
-
-func (r *schemaLoader) shouldStopOnError(err error) bool {
- if err != nil && !r.options.ContinueOnError {
- return true
- }
-
- if err != nil {
- log.Println(err)
- }
-
- return false
-}
-
-func defaultSchemaLoader(
- root interface{},
- expandOptions *ExpandOptions,
- cache ResolutionCache,
- context *resolverContext) (*schemaLoader, error) {
-
- if cache == nil {
- cache = resCache
- }
- if expandOptions == nil {
- expandOptions = &ExpandOptions{}
- }
- absBase, _ := absPath(expandOptions.RelativeBase)
- if context == nil {
- context = newResolverContext(absBase)
- }
- return &schemaLoader{
- root: root,
- options: expandOptions,
- cache: cache,
- context: context,
- loadDoc: func(path string) (json.RawMessage, error) {
- debugLog("fetching document at %q", path)
- return PathLoader(path)
- },
- }, nil
-}
diff --git a/vendor/github.com/go-openapi/spec/security_scheme.go b/vendor/github.com/go-openapi/spec/security_scheme.go
deleted file mode 100644
index fe353842a..000000000
--- a/vendor/github.com/go-openapi/spec/security_scheme.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-const (
- basic = "basic"
- apiKey = "apiKey"
- oauth2 = "oauth2"
- implicit = "implicit"
- password = "password"
- application = "application"
- accessCode = "accessCode"
-)
-
-// BasicAuth creates a basic auth security scheme
-func BasicAuth() *SecurityScheme {
- return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{Type: basic}}
-}
-
-// APIKeyAuth creates an api key auth security scheme
-func APIKeyAuth(fieldName, valueSource string) *SecurityScheme {
- return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{Type: apiKey, Name: fieldName, In: valueSource}}
-}
-
-// OAuth2Implicit creates an implicit flow oauth2 security scheme
-func OAuth2Implicit(authorizationURL string) *SecurityScheme {
- return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{
- Type: oauth2,
- Flow: implicit,
- AuthorizationURL: authorizationURL,
- }}
-}
-
-// OAuth2Password creates a password flow oauth2 security scheme
-func OAuth2Password(tokenURL string) *SecurityScheme {
- return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{
- Type: oauth2,
- Flow: password,
- TokenURL: tokenURL,
- }}
-}
-
-// OAuth2Application creates an application flow oauth2 security scheme
-func OAuth2Application(tokenURL string) *SecurityScheme {
- return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{
- Type: oauth2,
- Flow: application,
- TokenURL: tokenURL,
- }}
-}
-
-// OAuth2AccessToken creates an access token flow oauth2 security scheme
-func OAuth2AccessToken(authorizationURL, tokenURL string) *SecurityScheme {
- return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{
- Type: oauth2,
- Flow: accessCode,
- AuthorizationURL: authorizationURL,
- TokenURL: tokenURL,
- }}
-}
-
-// SecuritySchemeProps describes a swagger security scheme in the securityDefinitions section
-type SecuritySchemeProps struct {
- Description string `json:"description,omitempty"`
- Type string `json:"type"`
- Name string `json:"name,omitempty"` // api key
- In string `json:"in,omitempty"` // api key
- Flow string `json:"flow,omitempty"` // oauth2
- AuthorizationURL string `json:"authorizationUrl,omitempty"` // oauth2
- TokenURL string `json:"tokenUrl,omitempty"` // oauth2
- Scopes map[string]string `json:"scopes,omitempty"` // oauth2
-}
-
-// AddScope adds a scope to this security scheme
-func (s *SecuritySchemeProps) AddScope(scope, description string) {
- if s.Scopes == nil {
- s.Scopes = make(map[string]string)
- }
- s.Scopes[scope] = description
-}
-
-// SecurityScheme allows the definition of a security scheme that can be used by the operations.
-// Supported schemes are basic authentication, an API key (either as a header or as a query parameter)
-// and OAuth2's common flows (implicit, password, application and access code).
-//
-// For more information: http://goo.gl/8us55a#securitySchemeObject
-type SecurityScheme struct {
- VendorExtensible
- SecuritySchemeProps
-}
-
-// JSONLookup implements an interface to customize json pointer lookup
-func (s SecurityScheme) JSONLookup(token string) (interface{}, error) {
- if ex, ok := s.Extensions[token]; ok {
- return &ex, nil
- }
-
- r, _, err := jsonpointer.GetForToken(s.SecuritySchemeProps, token)
- return r, err
-}
-
-// MarshalJSON marshal this to JSON
-func (s SecurityScheme) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(s.SecuritySchemeProps)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(s.VendorExtensible)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b1, b2), nil
-}
-
-// UnmarshalJSON marshal this from JSON
-func (s *SecurityScheme) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &s.SecuritySchemeProps); err != nil {
- return err
- }
- return json.Unmarshal(data, &s.VendorExtensible)
-}
diff --git a/vendor/github.com/go-openapi/spec/spec.go b/vendor/github.com/go-openapi/spec/spec.go
deleted file mode 100644
index 0bb045bc0..000000000
--- a/vendor/github.com/go-openapi/spec/spec.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import "encoding/json"
-
-//go:generate curl -L --progress -o ./schemas/v2/schema.json http://swagger.io/v2/schema.json
-//go:generate curl -L --progress -o ./schemas/jsonschema-draft-04.json http://json-schema.org/draft-04/schema
-//go:generate go-bindata -pkg=spec -prefix=./schemas -ignore=.*\.md ./schemas/...
-//go:generate perl -pi -e s,Json,JSON,g bindata.go
-
-const (
- // SwaggerSchemaURL the url for the swagger 2.0 schema to validate specs
- SwaggerSchemaURL = "http://swagger.io/v2/schema.json#"
- // JSONSchemaURL the url for the json schema schema
- JSONSchemaURL = "http://json-schema.org/draft-04/schema#"
-)
-
-var (
- jsonSchema *Schema
- swaggerSchema *Schema
-)
-
-func init() {
- jsonSchema = MustLoadJSONSchemaDraft04()
- swaggerSchema = MustLoadSwagger20Schema()
-}
-
-// MustLoadJSONSchemaDraft04 panics when Swagger20Schema returns an error
-func MustLoadJSONSchemaDraft04() *Schema {
- d, e := JSONSchemaDraft04()
- if e != nil {
- panic(e)
- }
- return d
-}
-
-// JSONSchemaDraft04 loads the json schema document for json shema draft04
-func JSONSchemaDraft04() (*Schema, error) {
- b, err := Asset("jsonschema-draft-04.json")
- if err != nil {
- return nil, err
- }
-
- schema := new(Schema)
- if err := json.Unmarshal(b, schema); err != nil {
- return nil, err
- }
- return schema, nil
-}
-
-// MustLoadSwagger20Schema panics when Swagger20Schema returns an error
-func MustLoadSwagger20Schema() *Schema {
- d, e := Swagger20Schema()
- if e != nil {
- panic(e)
- }
- return d
-}
-
-// Swagger20Schema loads the swagger 2.0 schema from the embedded assets
-func Swagger20Schema() (*Schema, error) {
-
- b, err := Asset("v2/schema.json")
- if err != nil {
- return nil, err
- }
-
- schema := new(Schema)
- if err := json.Unmarshal(b, schema); err != nil {
- return nil, err
- }
- return schema, nil
-}
diff --git a/vendor/github.com/go-openapi/spec/swagger.go b/vendor/github.com/go-openapi/spec/swagger.go
deleted file mode 100644
index 44722ffd5..000000000
--- a/vendor/github.com/go-openapi/spec/swagger.go
+++ /dev/null
@@ -1,448 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "bytes"
- "encoding/gob"
- "encoding/json"
- "fmt"
- "strconv"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-// Swagger this is the root document object for the API specification.
-// It combines what previously was the Resource Listing and API Declaration (version 1.2 and earlier)
-// together into one document.
-//
-// For more information: http://goo.gl/8us55a#swagger-object-
-type Swagger struct {
- VendorExtensible
- SwaggerProps
-}
-
-// JSONLookup look up a value by the json property name
-func (s Swagger) JSONLookup(token string) (interface{}, error) {
- if ex, ok := s.Extensions[token]; ok {
- return &ex, nil
- }
- r, _, err := jsonpointer.GetForToken(s.SwaggerProps, token)
- return r, err
-}
-
-// MarshalJSON marshals this swagger structure to json
-func (s Swagger) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(s.SwaggerProps)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(s.VendorExtensible)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b1, b2), nil
-}
-
-// UnmarshalJSON unmarshals a swagger spec from json
-func (s *Swagger) UnmarshalJSON(data []byte) error {
- var sw Swagger
- if err := json.Unmarshal(data, &sw.SwaggerProps); err != nil {
- return err
- }
- if err := json.Unmarshal(data, &sw.VendorExtensible); err != nil {
- return err
- }
- *s = sw
- return nil
-}
-
-// GobEncode provides a safe gob encoder for Swagger, including extensions
-func (s Swagger) GobEncode() ([]byte, error) {
- var b bytes.Buffer
- raw := struct {
- Props SwaggerProps
- Ext VendorExtensible
- }{
- Props: s.SwaggerProps,
- Ext: s.VendorExtensible,
- }
- err := gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
-}
-
-// GobDecode provides a safe gob decoder for Swagger, including extensions
-func (s *Swagger) GobDecode(b []byte) error {
- var raw struct {
- Props SwaggerProps
- Ext VendorExtensible
- }
- buf := bytes.NewBuffer(b)
- err := gob.NewDecoder(buf).Decode(&raw)
- if err != nil {
- return err
- }
- s.SwaggerProps = raw.Props
- s.VendorExtensible = raw.Ext
- return nil
-}
-
-// SwaggerProps captures the top-level properties of an Api specification
-//
-// NOTE: validation rules
-// - the scheme, when present must be from [http, https, ws, wss]
-// - BasePath must start with a leading "/"
-// - Paths is required
-type SwaggerProps struct {
- ID string `json:"id,omitempty"`
- Consumes []string `json:"consumes,omitempty"`
- Produces []string `json:"produces,omitempty"`
- Schemes []string `json:"schemes,omitempty"`
- Swagger string `json:"swagger,omitempty"`
- Info *Info `json:"info,omitempty"`
- Host string `json:"host,omitempty"`
- BasePath string `json:"basePath,omitempty"`
- Paths *Paths `json:"paths"`
- Definitions Definitions `json:"definitions,omitempty"`
- Parameters map[string]Parameter `json:"parameters,omitempty"`
- Responses map[string]Response `json:"responses,omitempty"`
- SecurityDefinitions SecurityDefinitions `json:"securityDefinitions,omitempty"`
- Security []map[string][]string `json:"security,omitempty"`
- Tags []Tag `json:"tags,omitempty"`
- ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
-}
-
-type swaggerPropsAlias SwaggerProps
-
-type gobSwaggerPropsAlias struct {
- Security []map[string]struct {
- List []string
- Pad bool
- }
- Alias *swaggerPropsAlias
- SecurityIsEmpty bool
-}
-
-// GobEncode provides a safe gob encoder for SwaggerProps, including empty security requirements
-func (o SwaggerProps) GobEncode() ([]byte, error) {
- raw := gobSwaggerPropsAlias{
- Alias: (*swaggerPropsAlias)(&o),
- }
-
- var b bytes.Buffer
- if o.Security == nil {
- // nil security requirement
- err := gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
- }
-
- if len(o.Security) == 0 {
- // empty, but non-nil security requirement
- raw.SecurityIsEmpty = true
- raw.Alias.Security = nil
- err := gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
- }
-
- raw.Security = make([]map[string]struct {
- List []string
- Pad bool
- }, 0, len(o.Security))
- for _, req := range o.Security {
- v := make(map[string]struct {
- List []string
- Pad bool
- }, len(req))
- for k, val := range req {
- v[k] = struct {
- List []string
- Pad bool
- }{
- List: val,
- }
- }
- raw.Security = append(raw.Security, v)
- }
-
- err := gob.NewEncoder(&b).Encode(raw)
- return b.Bytes(), err
-}
-
-// GobDecode provides a safe gob decoder for SwaggerProps, including empty security requirements
-func (o *SwaggerProps) GobDecode(b []byte) error {
- var raw gobSwaggerPropsAlias
-
- buf := bytes.NewBuffer(b)
- err := gob.NewDecoder(buf).Decode(&raw)
- if err != nil {
- return err
- }
- if raw.Alias == nil {
- return nil
- }
-
- switch {
- case raw.SecurityIsEmpty:
- // empty, but non-nil security requirement
- raw.Alias.Security = []map[string][]string{}
- case len(raw.Alias.Security) == 0:
- // nil security requirement
- raw.Alias.Security = nil
- default:
- raw.Alias.Security = make([]map[string][]string, 0, len(raw.Security))
- for _, req := range raw.Security {
- v := make(map[string][]string, len(req))
- for k, val := range req {
- v[k] = make([]string, 0, len(val.List))
- v[k] = append(v[k], val.List...)
- }
- raw.Alias.Security = append(raw.Alias.Security, v)
- }
- }
-
- *o = *(*SwaggerProps)(raw.Alias)
- return nil
-}
-
-// Dependencies represent a dependencies property
-type Dependencies map[string]SchemaOrStringArray
-
-// SchemaOrBool represents a schema or boolean value, is biased towards true for the boolean property
-type SchemaOrBool struct {
- Allows bool
- Schema *Schema
-}
-
-// JSONLookup implements an interface to customize json pointer lookup
-func (s SchemaOrBool) JSONLookup(token string) (interface{}, error) {
- if token == "allows" {
- return s.Allows, nil
- }
- r, _, err := jsonpointer.GetForToken(s.Schema, token)
- return r, err
-}
-
-var jsTrue = []byte("true")
-var jsFalse = []byte("false")
-
-// MarshalJSON convert this object to JSON
-func (s SchemaOrBool) MarshalJSON() ([]byte, error) {
- if s.Schema != nil {
- return json.Marshal(s.Schema)
- }
-
- if s.Schema == nil && !s.Allows {
- return jsFalse, nil
- }
- return jsTrue, nil
-}
-
-// UnmarshalJSON converts this bool or schema object from a JSON structure
-func (s *SchemaOrBool) UnmarshalJSON(data []byte) error {
- var nw SchemaOrBool
- if len(data) >= 4 {
- if data[0] == '{' {
- var sch Schema
- if err := json.Unmarshal(data, &sch); err != nil {
- return err
- }
- nw.Schema = &sch
- }
- nw.Allows = !(data[0] == 'f' && data[1] == 'a' && data[2] == 'l' && data[3] == 's' && data[4] == 'e')
- }
- *s = nw
- return nil
-}
-
-// SchemaOrStringArray represents a schema or a string array
-type SchemaOrStringArray struct {
- Schema *Schema
- Property []string
-}
-
-// JSONLookup implements an interface to customize json pointer lookup
-func (s SchemaOrStringArray) JSONLookup(token string) (interface{}, error) {
- r, _, err := jsonpointer.GetForToken(s.Schema, token)
- return r, err
-}
-
-// MarshalJSON converts this schema object or array into JSON structure
-func (s SchemaOrStringArray) MarshalJSON() ([]byte, error) {
- if len(s.Property) > 0 {
- return json.Marshal(s.Property)
- }
- if s.Schema != nil {
- return json.Marshal(s.Schema)
- }
- return []byte("null"), nil
-}
-
-// UnmarshalJSON converts this schema object or array from a JSON structure
-func (s *SchemaOrStringArray) UnmarshalJSON(data []byte) error {
- var first byte
- if len(data) > 1 {
- first = data[0]
- }
- var nw SchemaOrStringArray
- if first == '{' {
- var sch Schema
- if err := json.Unmarshal(data, &sch); err != nil {
- return err
- }
- nw.Schema = &sch
- }
- if first == '[' {
- if err := json.Unmarshal(data, &nw.Property); err != nil {
- return err
- }
- }
- *s = nw
- return nil
-}
-
-// Definitions contains the models explicitly defined in this spec
-// An object to hold data types that can be consumed and produced by operations.
-// These data types can be primitives, arrays or models.
-//
-// For more information: http://goo.gl/8us55a#definitionsObject
-type Definitions map[string]Schema
-
-// SecurityDefinitions a declaration of the security schemes available to be used in the specification.
-// This does not enforce the security schemes on the operations and only serves to provide
-// the relevant details for each scheme.
-//
-// For more information: http://goo.gl/8us55a#securityDefinitionsObject
-type SecurityDefinitions map[string]*SecurityScheme
-
-// StringOrArray represents a value that can either be a string
-// or an array of strings. Mainly here for serialization purposes
-type StringOrArray []string
-
-// Contains returns true when the value is contained in the slice
-func (s StringOrArray) Contains(value string) bool {
- for _, str := range s {
- if str == value {
- return true
- }
- }
- return false
-}
-
-// JSONLookup implements an interface to customize json pointer lookup
-func (s SchemaOrArray) JSONLookup(token string) (interface{}, error) {
- if _, err := strconv.Atoi(token); err == nil {
- r, _, err := jsonpointer.GetForToken(s.Schemas, token)
- return r, err
- }
- r, _, err := jsonpointer.GetForToken(s.Schema, token)
- return r, err
-}
-
-// UnmarshalJSON unmarshals this string or array object from a JSON array or JSON string
-func (s *StringOrArray) UnmarshalJSON(data []byte) error {
- var first byte
- if len(data) > 1 {
- first = data[0]
- }
-
- if first == '[' {
- var parsed []string
- if err := json.Unmarshal(data, &parsed); err != nil {
- return err
- }
- *s = StringOrArray(parsed)
- return nil
- }
-
- var single interface{}
- if err := json.Unmarshal(data, &single); err != nil {
- return err
- }
- if single == nil {
- return nil
- }
- switch v := single.(type) {
- case string:
- *s = StringOrArray([]string{v})
- return nil
- default:
- return fmt.Errorf("only string or array is allowed, not %T", single)
- }
-}
-
-// MarshalJSON converts this string or array to a JSON array or JSON string
-func (s StringOrArray) MarshalJSON() ([]byte, error) {
- if len(s) == 1 {
- return json.Marshal([]string(s)[0])
- }
- return json.Marshal([]string(s))
-}
-
-// SchemaOrArray represents a value that can either be a Schema
-// or an array of Schema. Mainly here for serialization purposes
-type SchemaOrArray struct {
- Schema *Schema
- Schemas []Schema
-}
-
-// Len returns the number of schemas in this property
-func (s SchemaOrArray) Len() int {
- if s.Schema != nil {
- return 1
- }
- return len(s.Schemas)
-}
-
-// ContainsType returns true when one of the schemas is of the specified type
-func (s *SchemaOrArray) ContainsType(name string) bool {
- if s.Schema != nil {
- return s.Schema.Type != nil && s.Schema.Type.Contains(name)
- }
- return false
-}
-
-// MarshalJSON converts this schema object or array into JSON structure
-func (s SchemaOrArray) MarshalJSON() ([]byte, error) {
- if len(s.Schemas) > 0 {
- return json.Marshal(s.Schemas)
- }
- return json.Marshal(s.Schema)
-}
-
-// UnmarshalJSON converts this schema object or array from a JSON structure
-func (s *SchemaOrArray) UnmarshalJSON(data []byte) error {
- var nw SchemaOrArray
- var first byte
- if len(data) > 1 {
- first = data[0]
- }
- if first == '{' {
- var sch Schema
- if err := json.Unmarshal(data, &sch); err != nil {
- return err
- }
- nw.Schema = &sch
- }
- if first == '[' {
- if err := json.Unmarshal(data, &nw.Schemas); err != nil {
- return err
- }
- }
- *s = nw
- return nil
-}
-
-// vim:set ft=go noet sts=2 sw=2 ts=2:
diff --git a/vendor/github.com/go-openapi/spec/tag.go b/vendor/github.com/go-openapi/spec/tag.go
deleted file mode 100644
index faa3d3de1..000000000
--- a/vendor/github.com/go-openapi/spec/tag.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-import (
- "encoding/json"
-
- "github.com/go-openapi/jsonpointer"
- "github.com/go-openapi/swag"
-)
-
-// TagProps describe a tag entry in the top level tags section of a swagger spec
-type TagProps struct {
- Description string `json:"description,omitempty"`
- Name string `json:"name,omitempty"`
- ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
-}
-
-// NewTag creates a new tag
-func NewTag(name, description string, externalDocs *ExternalDocumentation) Tag {
- return Tag{TagProps: TagProps{Description: description, Name: name, ExternalDocs: externalDocs}}
-}
-
-// Tag allows adding meta data to a single tag that is used by the
-// [Operation Object](http://goo.gl/8us55a#operationObject).
-// It is not mandatory to have a Tag Object per tag used there.
-//
-// For more information: http://goo.gl/8us55a#tagObject
-type Tag struct {
- VendorExtensible
- TagProps
-}
-
-// JSONLookup implements an interface to customize json pointer lookup
-func (t Tag) JSONLookup(token string) (interface{}, error) {
- if ex, ok := t.Extensions[token]; ok {
- return &ex, nil
- }
-
- r, _, err := jsonpointer.GetForToken(t.TagProps, token)
- return r, err
-}
-
-// MarshalJSON marshal this to JSON
-func (t Tag) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(t.TagProps)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(t.VendorExtensible)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b1, b2), nil
-}
-
-// UnmarshalJSON marshal this from JSON
-func (t *Tag) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &t.TagProps); err != nil {
- return err
- }
- return json.Unmarshal(data, &t.VendorExtensible)
-}
diff --git a/vendor/github.com/go-openapi/spec/unused.go b/vendor/github.com/go-openapi/spec/unused.go
deleted file mode 100644
index aa12b56f6..000000000
--- a/vendor/github.com/go-openapi/spec/unused.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-/*
-
-import (
- "net/url"
- "os"
- "path"
- "path/filepath"
-
- "github.com/go-openapi/jsonpointer"
-)
-
- // Some currently unused functions and definitions that
- // used to be part of the expander.
-
- // Moved here for the record and possible future reuse
-
-var (
- idPtr, _ = jsonpointer.New("/id")
- refPtr, _ = jsonpointer.New("/$ref")
-)
-
-func idFromNode(node interface{}) (*Ref, error) {
- if idValue, _, err := idPtr.Get(node); err == nil {
- if refStr, ok := idValue.(string); ok && refStr != "" {
- idRef, err := NewRef(refStr)
- if err != nil {
- return nil, err
- }
- return &idRef, nil
- }
- }
- return nil, nil
-}
-
-func nextRef(startingNode interface{}, startingRef *Ref, ptr *jsonpointer.Pointer) *Ref {
- if startingRef == nil {
- return nil
- }
-
- if ptr == nil {
- return startingRef
- }
-
- ret := startingRef
- var idRef *Ref
- node := startingNode
-
- for _, tok := range ptr.DecodedTokens() {
- node, _, _ = jsonpointer.GetForToken(node, tok)
- if node == nil {
- break
- }
-
- idRef, _ = idFromNode(node)
- if idRef != nil {
- nw, err := ret.Inherits(*idRef)
- if err != nil {
- break
- }
- ret = nw
- }
-
- refRef, _, _ := refPtr.Get(node)
- if refRef != nil {
- var rf Ref
- switch value := refRef.(type) {
- case string:
- rf, _ = NewRef(value)
- }
- nw, err := ret.Inherits(rf)
- if err != nil {
- break
- }
- nwURL := nw.GetURL()
- if nwURL.Scheme == "file" || (nwURL.Scheme == "" && nwURL.Host == "") {
- nwpt := filepath.ToSlash(nwURL.Path)
- if filepath.IsAbs(nwpt) {
- _, err := os.Stat(nwpt)
- if err != nil {
- nwURL.Path = filepath.Join(".", nwpt)
- }
- }
- }
-
- ret = nw
- }
-
- }
-
- return ret
-}
-
-// basePathFromSchemaID returns a new basePath based on an existing basePath and a schema ID
-func basePathFromSchemaID(oldBasePath, id string) string {
- u, err := url.Parse(oldBasePath)
- if err != nil {
- panic(err)
- }
- uid, err := url.Parse(id)
- if err != nil {
- panic(err)
- }
-
- if path.IsAbs(uid.Path) {
- return id
- }
- u.Path = path.Join(path.Dir(u.Path), uid.Path)
- return u.String()
-}
-*/
-
-// type ExtraSchemaProps map[string]interface{}
-
-// // JSONSchema represents a structure that is a json schema draft 04
-// type JSONSchema struct {
-// SchemaProps
-// ExtraSchemaProps
-// }
-
-// // MarshalJSON marshal this to JSON
-// func (s JSONSchema) MarshalJSON() ([]byte, error) {
-// b1, err := json.Marshal(s.SchemaProps)
-// if err != nil {
-// return nil, err
-// }
-// b2, err := s.Ref.MarshalJSON()
-// if err != nil {
-// return nil, err
-// }
-// b3, err := s.Schema.MarshalJSON()
-// if err != nil {
-// return nil, err
-// }
-// b4, err := json.Marshal(s.ExtraSchemaProps)
-// if err != nil {
-// return nil, err
-// }
-// return swag.ConcatJSON(b1, b2, b3, b4), nil
-// }
-
-// // UnmarshalJSON marshal this from JSON
-// func (s *JSONSchema) UnmarshalJSON(data []byte) error {
-// var sch JSONSchema
-// if err := json.Unmarshal(data, &sch.SchemaProps); err != nil {
-// return err
-// }
-// if err := json.Unmarshal(data, &sch.Ref); err != nil {
-// return err
-// }
-// if err := json.Unmarshal(data, &sch.Schema); err != nil {
-// return err
-// }
-// if err := json.Unmarshal(data, &sch.ExtraSchemaProps); err != nil {
-// return err
-// }
-// *s = sch
-// return nil
-// }
diff --git a/vendor/github.com/go-openapi/spec/xml_object.go b/vendor/github.com/go-openapi/spec/xml_object.go
deleted file mode 100644
index 945a46703..000000000
--- a/vendor/github.com/go-openapi/spec/xml_object.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package spec
-
-// XMLObject a metadata object that allows for more fine-tuned XML model definitions.
-//
-// For more information: http://goo.gl/8us55a#xmlObject
-type XMLObject struct {
- Name string `json:"name,omitempty"`
- Namespace string `json:"namespace,omitempty"`
- Prefix string `json:"prefix,omitempty"`
- Attribute bool `json:"attribute,omitempty"`
- Wrapped bool `json:"wrapped,omitempty"`
-}
-
-// WithName sets the xml name for the object
-func (x *XMLObject) WithName(name string) *XMLObject {
- x.Name = name
- return x
-}
-
-// WithNamespace sets the xml namespace for the object
-func (x *XMLObject) WithNamespace(namespace string) *XMLObject {
- x.Namespace = namespace
- return x
-}
-
-// WithPrefix sets the xml prefix for the object
-func (x *XMLObject) WithPrefix(prefix string) *XMLObject {
- x.Prefix = prefix
- return x
-}
-
-// AsAttribute flags this object as xml attribute
-func (x *XMLObject) AsAttribute() *XMLObject {
- x.Attribute = true
- return x
-}
-
-// AsElement flags this object as an xml node
-func (x *XMLObject) AsElement() *XMLObject {
- x.Attribute = false
- return x
-}
-
-// AsWrapped flags this object as wrapped, this is mostly useful for array types
-func (x *XMLObject) AsWrapped() *XMLObject {
- x.Wrapped = true
- return x
-}
-
-// AsUnwrapped flags this object as an xml node
-func (x *XMLObject) AsUnwrapped() *XMLObject {
- x.Wrapped = false
- return x
-}
diff --git a/vendor/github.com/go-openapi/swag/.editorconfig b/vendor/github.com/go-openapi/swag/.editorconfig
deleted file mode 100644
index 3152da69a..000000000
--- a/vendor/github.com/go-openapi/swag/.editorconfig
+++ /dev/null
@@ -1,26 +0,0 @@
-# top-most EditorConfig file
-root = true
-
-# Unix-style newlines with a newline ending every file
-[*]
-end_of_line = lf
-insert_final_newline = true
-indent_style = space
-indent_size = 2
-trim_trailing_whitespace = true
-
-# Set default charset
-[*.{js,py,go,scala,rb,java,html,css,less,sass,md}]
-charset = utf-8
-
-# Tab indentation (no size specified)
-[*.go]
-indent_style = tab
-
-[*.md]
-trim_trailing_whitespace = false
-
-# Matches the exact files either package.json or .travis.yml
-[{package.json,.travis.yml}]
-indent_style = space
-indent_size = 2
diff --git a/vendor/github.com/go-openapi/swag/.gitignore b/vendor/github.com/go-openapi/swag/.gitignore
deleted file mode 100644
index d69b53acc..000000000
--- a/vendor/github.com/go-openapi/swag/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-secrets.yml
-vendor
-Godeps
-.idea
diff --git a/vendor/github.com/go-openapi/swag/.golangci.yml b/vendor/github.com/go-openapi/swag/.golangci.yml
deleted file mode 100644
index 625c3d6af..000000000
--- a/vendor/github.com/go-openapi/swag/.golangci.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-linters-settings:
- govet:
- check-shadowing: true
- golint:
- min-confidence: 0
- gocyclo:
- min-complexity: 25
- maligned:
- suggest-new: true
- dupl:
- threshold: 100
- goconst:
- min-len: 3
- min-occurrences: 2
-
-linters:
- enable-all: true
- disable:
- - maligned
- - lll
- - gochecknoinits
- - gochecknoglobals
diff --git a/vendor/github.com/go-openapi/swag/.travis.yml b/vendor/github.com/go-openapi/swag/.travis.yml
deleted file mode 100644
index aa26d8763..000000000
--- a/vendor/github.com/go-openapi/swag/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-after_success:
-- bash <(curl -s https://codecov.io/bash)
-go:
-- 1.11.x
-- 1.12.x
-install:
-- GO111MODULE=off go get -u gotest.tools/gotestsum
-env:
-- GO111MODULE=on
-language: go
-notifications:
- slack:
- secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E=
-script:
-- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
diff --git a/vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.md
deleted file mode 100644
index 9322b065e..000000000
--- a/vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
-advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at ivan+abuse@flanders.co.nz. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/go-openapi/swag/LICENSE b/vendor/github.com/go-openapi/swag/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/vendor/github.com/go-openapi/swag/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md
deleted file mode 100644
index eb60ae80a..000000000
--- a/vendor/github.com/go-openapi/swag/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Swag [](https://travis-ci.org/go-openapi/swag) [](https://codecov.io/gh/go-openapi/swag) [](https://slackin.goswagger.io)
-
-[](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE)
-[](http://godoc.org/github.com/go-openapi/swag)
-[](https://golangci.com)
-[](https://goreportcard.com/report/github.com/go-openapi/swag)
-
-Contains a bunch of helper functions for go-openapi and go-swagger projects.
-
-You may also use it standalone for your projects.
-
-* convert between value and pointers for builtin types
-* convert from string to builtin types (wraps strconv)
-* fast json concatenation
-* search in path
-* load from file or http
-* name mangling
-
-
-This repo has only few dependencies outside of the standard library:
-
-* YAML utilities depend on gopkg.in/yaml.v2
diff --git a/vendor/github.com/go-openapi/swag/convert.go b/vendor/github.com/go-openapi/swag/convert.go
deleted file mode 100644
index 7da35c316..000000000
--- a/vendor/github.com/go-openapi/swag/convert.go
+++ /dev/null
@@ -1,208 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import (
- "math"
- "strconv"
- "strings"
-)
-
-// same as ECMA Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER
-const (
- maxJSONFloat = float64(1<<53 - 1) // 9007199254740991.0 2^53 - 1
- minJSONFloat = -float64(1<<53 - 1) //-9007199254740991.0 -2^53 - 1
- epsilon float64 = 1e-9
-)
-
-// IsFloat64AJSONInteger allow for integers [-2^53, 2^53-1] inclusive
-func IsFloat64AJSONInteger(f float64) bool {
- if math.IsNaN(f) || math.IsInf(f, 0) || f < minJSONFloat || f > maxJSONFloat {
- return false
- }
- fa := math.Abs(f)
- g := float64(uint64(f))
- ga := math.Abs(g)
-
- diff := math.Abs(f - g)
-
- // more info: https://floating-point-gui.de/errors/comparison/#look-out-for-edge-cases
- switch {
- case f == g: // best case
- return true
- case f == float64(int64(f)) || f == float64(uint64(f)): // optimistic case
- return true
- case f == 0 || g == 0 || diff < math.SmallestNonzeroFloat64: // very close to 0 values
- return diff < (epsilon * math.SmallestNonzeroFloat64)
- }
- // check the relative error
- return diff/math.Min(fa+ga, math.MaxFloat64) < epsilon
-}
-
-var evaluatesAsTrue map[string]struct{}
-
-func init() {
- evaluatesAsTrue = map[string]struct{}{
- "true": {},
- "1": {},
- "yes": {},
- "ok": {},
- "y": {},
- "on": {},
- "selected": {},
- "checked": {},
- "t": {},
- "enabled": {},
- }
-}
-
-// ConvertBool turn a string into a boolean
-func ConvertBool(str string) (bool, error) {
- _, ok := evaluatesAsTrue[strings.ToLower(str)]
- return ok, nil
-}
-
-// ConvertFloat32 turn a string into a float32
-func ConvertFloat32(str string) (float32, error) {
- f, err := strconv.ParseFloat(str, 32)
- if err != nil {
- return 0, err
- }
- return float32(f), nil
-}
-
-// ConvertFloat64 turn a string into a float64
-func ConvertFloat64(str string) (float64, error) {
- return strconv.ParseFloat(str, 64)
-}
-
-// ConvertInt8 turn a string into int8 boolean
-func ConvertInt8(str string) (int8, error) {
- i, err := strconv.ParseInt(str, 10, 8)
- if err != nil {
- return 0, err
- }
- return int8(i), nil
-}
-
-// ConvertInt16 turn a string into a int16
-func ConvertInt16(str string) (int16, error) {
- i, err := strconv.ParseInt(str, 10, 16)
- if err != nil {
- return 0, err
- }
- return int16(i), nil
-}
-
-// ConvertInt32 turn a string into a int32
-func ConvertInt32(str string) (int32, error) {
- i, err := strconv.ParseInt(str, 10, 32)
- if err != nil {
- return 0, err
- }
- return int32(i), nil
-}
-
-// ConvertInt64 turn a string into a int64
-func ConvertInt64(str string) (int64, error) {
- return strconv.ParseInt(str, 10, 64)
-}
-
-// ConvertUint8 turn a string into a uint8
-func ConvertUint8(str string) (uint8, error) {
- i, err := strconv.ParseUint(str, 10, 8)
- if err != nil {
- return 0, err
- }
- return uint8(i), nil
-}
-
-// ConvertUint16 turn a string into a uint16
-func ConvertUint16(str string) (uint16, error) {
- i, err := strconv.ParseUint(str, 10, 16)
- if err != nil {
- return 0, err
- }
- return uint16(i), nil
-}
-
-// ConvertUint32 turn a string into a uint32
-func ConvertUint32(str string) (uint32, error) {
- i, err := strconv.ParseUint(str, 10, 32)
- if err != nil {
- return 0, err
- }
- return uint32(i), nil
-}
-
-// ConvertUint64 turn a string into a uint64
-func ConvertUint64(str string) (uint64, error) {
- return strconv.ParseUint(str, 10, 64)
-}
-
-// FormatBool turns a boolean into a string
-func FormatBool(value bool) string {
- return strconv.FormatBool(value)
-}
-
-// FormatFloat32 turns a float32 into a string
-func FormatFloat32(value float32) string {
- return strconv.FormatFloat(float64(value), 'f', -1, 32)
-}
-
-// FormatFloat64 turns a float64 into a string
-func FormatFloat64(value float64) string {
- return strconv.FormatFloat(value, 'f', -1, 64)
-}
-
-// FormatInt8 turns an int8 into a string
-func FormatInt8(value int8) string {
- return strconv.FormatInt(int64(value), 10)
-}
-
-// FormatInt16 turns an int16 into a string
-func FormatInt16(value int16) string {
- return strconv.FormatInt(int64(value), 10)
-}
-
-// FormatInt32 turns an int32 into a string
-func FormatInt32(value int32) string {
- return strconv.Itoa(int(value))
-}
-
-// FormatInt64 turns an int64 into a string
-func FormatInt64(value int64) string {
- return strconv.FormatInt(value, 10)
-}
-
-// FormatUint8 turns an uint8 into a string
-func FormatUint8(value uint8) string {
- return strconv.FormatUint(uint64(value), 10)
-}
-
-// FormatUint16 turns an uint16 into a string
-func FormatUint16(value uint16) string {
- return strconv.FormatUint(uint64(value), 10)
-}
-
-// FormatUint32 turns an uint32 into a string
-func FormatUint32(value uint32) string {
- return strconv.FormatUint(uint64(value), 10)
-}
-
-// FormatUint64 turns an uint64 into a string
-func FormatUint64(value uint64) string {
- return strconv.FormatUint(value, 10)
-}
diff --git a/vendor/github.com/go-openapi/swag/convert_types.go b/vendor/github.com/go-openapi/swag/convert_types.go
deleted file mode 100644
index c95e4e78b..000000000
--- a/vendor/github.com/go-openapi/swag/convert_types.go
+++ /dev/null
@@ -1,595 +0,0 @@
-package swag
-
-import "time"
-
-// This file was taken from the aws go sdk
-
-// String returns a pointer to of the string value passed in.
-func String(v string) *string {
- return &v
-}
-
-// StringValue returns the value of the string pointer passed in or
-// "" if the pointer is nil.
-func StringValue(v *string) string {
- if v != nil {
- return *v
- }
- return ""
-}
-
-// StringSlice converts a slice of string values into a slice of
-// string pointers
-func StringSlice(src []string) []*string {
- dst := make([]*string, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// StringValueSlice converts a slice of string pointers into a slice of
-// string values
-func StringValueSlice(src []*string) []string {
- dst := make([]string, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// StringMap converts a string map of string values into a string
-// map of string pointers
-func StringMap(src map[string]string) map[string]*string {
- dst := make(map[string]*string)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// StringValueMap converts a string map of string pointers into a string
-// map of string values
-func StringValueMap(src map[string]*string) map[string]string {
- dst := make(map[string]string)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Bool returns a pointer to of the bool value passed in.
-func Bool(v bool) *bool {
- return &v
-}
-
-// BoolValue returns the value of the bool pointer passed in or
-// false if the pointer is nil.
-func BoolValue(v *bool) bool {
- if v != nil {
- return *v
- }
- return false
-}
-
-// BoolSlice converts a slice of bool values into a slice of
-// bool pointers
-func BoolSlice(src []bool) []*bool {
- dst := make([]*bool, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// BoolValueSlice converts a slice of bool pointers into a slice of
-// bool values
-func BoolValueSlice(src []*bool) []bool {
- dst := make([]bool, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// BoolMap converts a string map of bool values into a string
-// map of bool pointers
-func BoolMap(src map[string]bool) map[string]*bool {
- dst := make(map[string]*bool)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// BoolValueMap converts a string map of bool pointers into a string
-// map of bool values
-func BoolValueMap(src map[string]*bool) map[string]bool {
- dst := make(map[string]bool)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int returns a pointer to of the int value passed in.
-func Int(v int) *int {
- return &v
-}
-
-// IntValue returns the value of the int pointer passed in or
-// 0 if the pointer is nil.
-func IntValue(v *int) int {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// IntSlice converts a slice of int values into a slice of
-// int pointers
-func IntSlice(src []int) []*int {
- dst := make([]*int, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// IntValueSlice converts a slice of int pointers into a slice of
-// int values
-func IntValueSlice(src []*int) []int {
- dst := make([]int, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// IntMap converts a string map of int values into a string
-// map of int pointers
-func IntMap(src map[string]int) map[string]*int {
- dst := make(map[string]*int)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// IntValueMap converts a string map of int pointers into a string
-// map of int values
-func IntValueMap(src map[string]*int) map[string]int {
- dst := make(map[string]int)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int32 returns a pointer to of the int64 value passed in.
-func Int32(v int32) *int32 {
- return &v
-}
-
-// Int32Value returns the value of the int64 pointer passed in or
-// 0 if the pointer is nil.
-func Int32Value(v *int32) int32 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int32Slice converts a slice of int64 values into a slice of
-// int32 pointers
-func Int32Slice(src []int32) []*int32 {
- dst := make([]*int32, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int32ValueSlice converts a slice of int32 pointers into a slice of
-// int32 values
-func Int32ValueSlice(src []*int32) []int32 {
- dst := make([]int32, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int32Map converts a string map of int32 values into a string
-// map of int32 pointers
-func Int32Map(src map[string]int32) map[string]*int32 {
- dst := make(map[string]*int32)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int32ValueMap converts a string map of int32 pointers into a string
-// map of int32 values
-func Int32ValueMap(src map[string]*int32) map[string]int32 {
- dst := make(map[string]int32)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int64 returns a pointer to of the int64 value passed in.
-func Int64(v int64) *int64 {
- return &v
-}
-
-// Int64Value returns the value of the int64 pointer passed in or
-// 0 if the pointer is nil.
-func Int64Value(v *int64) int64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int64Slice converts a slice of int64 values into a slice of
-// int64 pointers
-func Int64Slice(src []int64) []*int64 {
- dst := make([]*int64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int64ValueSlice converts a slice of int64 pointers into a slice of
-// int64 values
-func Int64ValueSlice(src []*int64) []int64 {
- dst := make([]int64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int64Map converts a string map of int64 values into a string
-// map of int64 pointers
-func Int64Map(src map[string]int64) map[string]*int64 {
- dst := make(map[string]*int64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int64ValueMap converts a string map of int64 pointers into a string
-// map of int64 values
-func Int64ValueMap(src map[string]*int64) map[string]int64 {
- dst := make(map[string]int64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint returns a pouinter to of the uint value passed in.
-func Uint(v uint) *uint {
- return &v
-}
-
-// UintValue returns the value of the uint pouinter passed in or
-// 0 if the pouinter is nil.
-func UintValue(v *uint) uint {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// UintSlice converts a slice of uint values uinto a slice of
-// uint pouinters
-func UintSlice(src []uint) []*uint {
- dst := make([]*uint, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// UintValueSlice converts a slice of uint pouinters uinto a slice of
-// uint values
-func UintValueSlice(src []*uint) []uint {
- dst := make([]uint, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// UintMap converts a string map of uint values uinto a string
-// map of uint pouinters
-func UintMap(src map[string]uint) map[string]*uint {
- dst := make(map[string]*uint)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// UintValueMap converts a string map of uint pouinters uinto a string
-// map of uint values
-func UintValueMap(src map[string]*uint) map[string]uint {
- dst := make(map[string]uint)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint32 returns a pouinter to of the uint64 value passed in.
-func Uint32(v uint32) *uint32 {
- return &v
-}
-
-// Uint32Value returns the value of the uint64 pouinter passed in or
-// 0 if the pouinter is nil.
-func Uint32Value(v *uint32) uint32 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint32Slice converts a slice of uint64 values uinto a slice of
-// uint32 pouinters
-func Uint32Slice(src []uint32) []*uint32 {
- dst := make([]*uint32, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint32ValueSlice converts a slice of uint32 pouinters uinto a slice of
-// uint32 values
-func Uint32ValueSlice(src []*uint32) []uint32 {
- dst := make([]uint32, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint32Map converts a string map of uint32 values uinto a string
-// map of uint32 pouinters
-func Uint32Map(src map[string]uint32) map[string]*uint32 {
- dst := make(map[string]*uint32)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint32ValueMap converts a string map of uint32 pouinters uinto a string
-// map of uint32 values
-func Uint32ValueMap(src map[string]*uint32) map[string]uint32 {
- dst := make(map[string]uint32)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint64 returns a pouinter to of the uint64 value passed in.
-func Uint64(v uint64) *uint64 {
- return &v
-}
-
-// Uint64Value returns the value of the uint64 pouinter passed in or
-// 0 if the pouinter is nil.
-func Uint64Value(v *uint64) uint64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint64Slice converts a slice of uint64 values uinto a slice of
-// uint64 pouinters
-func Uint64Slice(src []uint64) []*uint64 {
- dst := make([]*uint64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint64ValueSlice converts a slice of uint64 pouinters uinto a slice of
-// uint64 values
-func Uint64ValueSlice(src []*uint64) []uint64 {
- dst := make([]uint64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint64Map converts a string map of uint64 values uinto a string
-// map of uint64 pouinters
-func Uint64Map(src map[string]uint64) map[string]*uint64 {
- dst := make(map[string]*uint64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint64ValueMap converts a string map of uint64 pouinters uinto a string
-// map of uint64 values
-func Uint64ValueMap(src map[string]*uint64) map[string]uint64 {
- dst := make(map[string]uint64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Float64 returns a pointer to of the float64 value passed in.
-func Float64(v float64) *float64 {
- return &v
-}
-
-// Float64Value returns the value of the float64 pointer passed in or
-// 0 if the pointer is nil.
-func Float64Value(v *float64) float64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Float64Slice converts a slice of float64 values into a slice of
-// float64 pointers
-func Float64Slice(src []float64) []*float64 {
- dst := make([]*float64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Float64ValueSlice converts a slice of float64 pointers into a slice of
-// float64 values
-func Float64ValueSlice(src []*float64) []float64 {
- dst := make([]float64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Float64Map converts a string map of float64 values into a string
-// map of float64 pointers
-func Float64Map(src map[string]float64) map[string]*float64 {
- dst := make(map[string]*float64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Float64ValueMap converts a string map of float64 pointers into a string
-// map of float64 values
-func Float64ValueMap(src map[string]*float64) map[string]float64 {
- dst := make(map[string]float64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Time returns a pointer to of the time.Time value passed in.
-func Time(v time.Time) *time.Time {
- return &v
-}
-
-// TimeValue returns the value of the time.Time pointer passed in or
-// time.Time{} if the pointer is nil.
-func TimeValue(v *time.Time) time.Time {
- if v != nil {
- return *v
- }
- return time.Time{}
-}
-
-// TimeSlice converts a slice of time.Time values into a slice of
-// time.Time pointers
-func TimeSlice(src []time.Time) []*time.Time {
- dst := make([]*time.Time, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// TimeValueSlice converts a slice of time.Time pointers into a slice of
-// time.Time values
-func TimeValueSlice(src []*time.Time) []time.Time {
- dst := make([]time.Time, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// TimeMap converts a string map of time.Time values into a string
-// map of time.Time pointers
-func TimeMap(src map[string]time.Time) map[string]*time.Time {
- dst := make(map[string]*time.Time)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// TimeValueMap converts a string map of time.Time pointers into a string
-// map of time.Time values
-func TimeValueMap(src map[string]*time.Time) map[string]time.Time {
- dst := make(map[string]time.Time)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
diff --git a/vendor/github.com/go-openapi/swag/doc.go b/vendor/github.com/go-openapi/swag/doc.go
deleted file mode 100644
index 8d2c8c501..000000000
--- a/vendor/github.com/go-openapi/swag/doc.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/*
-Package swag contains a bunch of helper functions for go-openapi and go-swagger projects.
-
-You may also use it standalone for your projects.
-
- * convert between value and pointers for builtin types
- * convert from string to builtin types (wraps strconv)
- * fast json concatenation
- * search in path
- * load from file or http
- * name mangling
-
-
-This repo has only few dependencies outside of the standard library:
-
- * YAML utilities depend on gopkg.in/yaml.v2
-*/
-package swag
diff --git a/vendor/github.com/go-openapi/swag/go.mod b/vendor/github.com/go-openapi/swag/go.mod
deleted file mode 100644
index 15bbb0822..000000000
--- a/vendor/github.com/go-openapi/swag/go.mod
+++ /dev/null
@@ -1,14 +0,0 @@
-module github.com/go-openapi/swag
-
-require (
- github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/kr/pretty v0.1.0 // indirect
- github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63
- github.com/stretchr/testify v1.3.0
- gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
- gopkg.in/yaml.v2 v2.2.2
-)
-
-replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422
-
-replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1
diff --git a/vendor/github.com/go-openapi/swag/go.sum b/vendor/github.com/go-openapi/swag/go.sum
deleted file mode 100644
index 33469f54a..000000000
--- a/vendor/github.com/go-openapi/swag/go.sum
+++ /dev/null
@@ -1,20 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/go-openapi/swag/json.go b/vendor/github.com/go-openapi/swag/json.go
deleted file mode 100644
index edf93d84c..000000000
--- a/vendor/github.com/go-openapi/swag/json.go
+++ /dev/null
@@ -1,312 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import (
- "bytes"
- "encoding/json"
- "log"
- "reflect"
- "strings"
- "sync"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// nullJSON represents a JSON object with null type
-var nullJSON = []byte("null")
-
-// DefaultJSONNameProvider the default cache for types
-var DefaultJSONNameProvider = NewNameProvider()
-
-const comma = byte(',')
-
-var closers map[byte]byte
-
-func init() {
- closers = map[byte]byte{
- '{': '}',
- '[': ']',
- }
-}
-
-type ejMarshaler interface {
- MarshalEasyJSON(w *jwriter.Writer)
-}
-
-type ejUnmarshaler interface {
- UnmarshalEasyJSON(w *jlexer.Lexer)
-}
-
-// WriteJSON writes json data, prefers finding an appropriate interface to short-circuit the marshaller
-// so it takes the fastest option available.
-func WriteJSON(data interface{}) ([]byte, error) {
- if d, ok := data.(ejMarshaler); ok {
- jw := new(jwriter.Writer)
- d.MarshalEasyJSON(jw)
- return jw.BuildBytes()
- }
- if d, ok := data.(json.Marshaler); ok {
- return d.MarshalJSON()
- }
- return json.Marshal(data)
-}
-
-// ReadJSON reads json data, prefers finding an appropriate interface to short-circuit the unmarshaller
-// so it takes the fastes option available
-func ReadJSON(data []byte, value interface{}) error {
- trimmedData := bytes.Trim(data, "\x00")
- if d, ok := value.(ejUnmarshaler); ok {
- jl := &jlexer.Lexer{Data: trimmedData}
- d.UnmarshalEasyJSON(jl)
- return jl.Error()
- }
- if d, ok := value.(json.Unmarshaler); ok {
- return d.UnmarshalJSON(trimmedData)
- }
- return json.Unmarshal(trimmedData, value)
-}
-
-// DynamicJSONToStruct converts an untyped json structure into a struct
-func DynamicJSONToStruct(data interface{}, target interface{}) error {
- // TODO: convert straight to a json typed map (mergo + iterate?)
- b, err := WriteJSON(data)
- if err != nil {
- return err
- }
- return ReadJSON(b, target)
-}
-
-// ConcatJSON concatenates multiple json objects efficiently
-func ConcatJSON(blobs ...[]byte) []byte {
- if len(blobs) == 0 {
- return nil
- }
-
- last := len(blobs) - 1
- for blobs[last] == nil || bytes.Equal(blobs[last], nullJSON) {
- // strips trailing null objects
- last--
- if last < 0 {
- // there was nothing but "null"s or nil...
- return nil
- }
- }
- if last == 0 {
- return blobs[0]
- }
-
- var opening, closing byte
- var idx, a int
- buf := bytes.NewBuffer(nil)
-
- for i, b := range blobs[:last+1] {
- if b == nil || bytes.Equal(b, nullJSON) {
- // a null object is in the list: skip it
- continue
- }
- if len(b) > 0 && opening == 0 { // is this an array or an object?
- opening, closing = b[0], closers[b[0]]
- }
-
- if opening != '{' && opening != '[' {
- continue // don't know how to concatenate non container objects
- }
-
- if len(b) < 3 { // yep empty but also the last one, so closing this thing
- if i == last && a > 0 {
- if err := buf.WriteByte(closing); err != nil {
- log.Println(err)
- }
- }
- continue
- }
-
- idx = 0
- if a > 0 { // we need to join with a comma for everything beyond the first non-empty item
- if err := buf.WriteByte(comma); err != nil {
- log.Println(err)
- }
- idx = 1 // this is not the first or the last so we want to drop the leading bracket
- }
-
- if i != last { // not the last one, strip brackets
- if _, err := buf.Write(b[idx : len(b)-1]); err != nil {
- log.Println(err)
- }
- } else { // last one, strip only the leading bracket
- if _, err := buf.Write(b[idx:]); err != nil {
- log.Println(err)
- }
- }
- a++
- }
- // somehow it ended up being empty, so provide a default value
- if buf.Len() == 0 {
- if err := buf.WriteByte(opening); err != nil {
- log.Println(err)
- }
- if err := buf.WriteByte(closing); err != nil {
- log.Println(err)
- }
- }
- return buf.Bytes()
-}
-
-// ToDynamicJSON turns an object into a properly JSON typed structure
-func ToDynamicJSON(data interface{}) interface{} {
- // TODO: convert straight to a json typed map (mergo + iterate?)
- b, err := json.Marshal(data)
- if err != nil {
- log.Println(err)
- }
- var res interface{}
- if err := json.Unmarshal(b, &res); err != nil {
- log.Println(err)
- }
- return res
-}
-
-// FromDynamicJSON turns an object into a properly JSON typed structure
-func FromDynamicJSON(data, target interface{}) error {
- b, err := json.Marshal(data)
- if err != nil {
- log.Println(err)
- }
- return json.Unmarshal(b, target)
-}
-
-// NameProvider represents an object capabale of translating from go property names
-// to json property names
-// This type is thread-safe.
-type NameProvider struct {
- lock *sync.Mutex
- index map[reflect.Type]nameIndex
-}
-
-type nameIndex struct {
- jsonNames map[string]string
- goNames map[string]string
-}
-
-// NewNameProvider creates a new name provider
-func NewNameProvider() *NameProvider {
- return &NameProvider{
- lock: &sync.Mutex{},
- index: make(map[reflect.Type]nameIndex),
- }
-}
-
-func buildnameIndex(tpe reflect.Type, idx, reverseIdx map[string]string) {
- for i := 0; i < tpe.NumField(); i++ {
- targetDes := tpe.Field(i)
-
- if targetDes.PkgPath != "" { // unexported
- continue
- }
-
- if targetDes.Anonymous { // walk embedded structures tree down first
- buildnameIndex(targetDes.Type, idx, reverseIdx)
- continue
- }
-
- if tag := targetDes.Tag.Get("json"); tag != "" {
-
- parts := strings.Split(tag, ",")
- if len(parts) == 0 {
- continue
- }
-
- nm := parts[0]
- if nm == "-" {
- continue
- }
- if nm == "" { // empty string means we want to use the Go name
- nm = targetDes.Name
- }
-
- idx[nm] = targetDes.Name
- reverseIdx[targetDes.Name] = nm
- }
- }
-}
-
-func newNameIndex(tpe reflect.Type) nameIndex {
- var idx = make(map[string]string, tpe.NumField())
- var reverseIdx = make(map[string]string, tpe.NumField())
-
- buildnameIndex(tpe, idx, reverseIdx)
- return nameIndex{jsonNames: idx, goNames: reverseIdx}
-}
-
-// GetJSONNames gets all the json property names for a type
-func (n *NameProvider) GetJSONNames(subject interface{}) []string {
- n.lock.Lock()
- defer n.lock.Unlock()
- tpe := reflect.Indirect(reflect.ValueOf(subject)).Type()
- names, ok := n.index[tpe]
- if !ok {
- names = n.makeNameIndex(tpe)
- }
-
- res := make([]string, 0, len(names.jsonNames))
- for k := range names.jsonNames {
- res = append(res, k)
- }
- return res
-}
-
-// GetJSONName gets the json name for a go property name
-func (n *NameProvider) GetJSONName(subject interface{}, name string) (string, bool) {
- tpe := reflect.Indirect(reflect.ValueOf(subject)).Type()
- return n.GetJSONNameForType(tpe, name)
-}
-
-// GetJSONNameForType gets the json name for a go property name on a given type
-func (n *NameProvider) GetJSONNameForType(tpe reflect.Type, name string) (string, bool) {
- n.lock.Lock()
- defer n.lock.Unlock()
- names, ok := n.index[tpe]
- if !ok {
- names = n.makeNameIndex(tpe)
- }
- nme, ok := names.goNames[name]
- return nme, ok
-}
-
-func (n *NameProvider) makeNameIndex(tpe reflect.Type) nameIndex {
- names := newNameIndex(tpe)
- n.index[tpe] = names
- return names
-}
-
-// GetGoName gets the go name for a json property name
-func (n *NameProvider) GetGoName(subject interface{}, name string) (string, bool) {
- tpe := reflect.Indirect(reflect.ValueOf(subject)).Type()
- return n.GetGoNameForType(tpe, name)
-}
-
-// GetGoNameForType gets the go name for a given type for a json property name
-func (n *NameProvider) GetGoNameForType(tpe reflect.Type, name string) (string, bool) {
- n.lock.Lock()
- defer n.lock.Unlock()
- names, ok := n.index[tpe]
- if !ok {
- names = n.makeNameIndex(tpe)
- }
- nme, ok := names.jsonNames[name]
- return nme, ok
-}
diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go
deleted file mode 100644
index 70f4fb361..000000000
--- a/vendor/github.com/go-openapi/swag/loading.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import (
- "fmt"
- "io/ioutil"
- "log"
- "net/http"
- "path/filepath"
- "strings"
- "time"
-)
-
-// LoadHTTPTimeout the default timeout for load requests
-var LoadHTTPTimeout = 30 * time.Second
-
-// LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in
-func LoadFromFileOrHTTP(path string) ([]byte, error) {
- return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path)
-}
-
-// LoadFromFileOrHTTPWithTimeout loads the bytes from a file or a remote http server based on the path passed in
-// timeout arg allows for per request overriding of the request timeout
-func LoadFromFileOrHTTPWithTimeout(path string, timeout time.Duration) ([]byte, error) {
- return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(timeout))(path)
-}
-
-// LoadStrategy returns a loader function for a given path or uri
-func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(string) ([]byte, error) {
- if strings.HasPrefix(path, "http") {
- return remote
- }
- return func(pth string) ([]byte, error) {
- upth, err := pathUnescape(pth)
- if err != nil {
- return nil, err
- }
- return local(filepath.FromSlash(upth))
- }
-}
-
-func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) {
- return func(path string) ([]byte, error) {
- client := &http.Client{Timeout: timeout}
- req, err := http.NewRequest("GET", path, nil)
- if err != nil {
- return nil, err
- }
- resp, err := client.Do(req)
- defer func() {
- if resp != nil {
- if e := resp.Body.Close(); e != nil {
- log.Println(e)
- }
- }
- }()
- if err != nil {
- return nil, err
- }
-
- if resp.StatusCode != http.StatusOK {
- return nil, fmt.Errorf("could not access document at %q [%s] ", path, resp.Status)
- }
-
- return ioutil.ReadAll(resp.Body)
- }
-}
diff --git a/vendor/github.com/go-openapi/swag/name_lexem.go b/vendor/github.com/go-openapi/swag/name_lexem.go
deleted file mode 100644
index aa7f6a9bb..000000000
--- a/vendor/github.com/go-openapi/swag/name_lexem.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import "unicode"
-
-type (
- nameLexem interface {
- GetUnsafeGoName() string
- GetOriginal() string
- IsInitialism() bool
- }
-
- initialismNameLexem struct {
- original string
- matchedInitialism string
- }
-
- casualNameLexem struct {
- original string
- }
-)
-
-func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem {
- return &initialismNameLexem{
- original: original,
- matchedInitialism: matchedInitialism,
- }
-}
-
-func newCasualNameLexem(original string) *casualNameLexem {
- return &casualNameLexem{
- original: original,
- }
-}
-
-func (l *initialismNameLexem) GetUnsafeGoName() string {
- return l.matchedInitialism
-}
-
-func (l *casualNameLexem) GetUnsafeGoName() string {
- var first rune
- var rest string
- for i, orig := range l.original {
- if i == 0 {
- first = orig
- continue
- }
- if i > 0 {
- rest = l.original[i:]
- break
- }
- }
- if len(l.original) > 1 {
- return string(unicode.ToUpper(first)) + lower(rest)
- }
-
- return l.original
-}
-
-func (l *initialismNameLexem) GetOriginal() string {
- return l.original
-}
-
-func (l *casualNameLexem) GetOriginal() string {
- return l.original
-}
-
-func (l *initialismNameLexem) IsInitialism() bool {
- return true
-}
-
-func (l *casualNameLexem) IsInitialism() bool {
- return false
-}
diff --git a/vendor/github.com/go-openapi/swag/net.go b/vendor/github.com/go-openapi/swag/net.go
deleted file mode 100644
index 821235f84..000000000
--- a/vendor/github.com/go-openapi/swag/net.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import (
- "net"
- "strconv"
-)
-
-// SplitHostPort splits a network address into a host and a port.
-// The port is -1 when there is no port to be found
-func SplitHostPort(addr string) (host string, port int, err error) {
- h, p, err := net.SplitHostPort(addr)
- if err != nil {
- return "", -1, err
- }
- if p == "" {
- return "", -1, &net.AddrError{Err: "missing port in address", Addr: addr}
- }
-
- pi, err := strconv.Atoi(p)
- if err != nil {
- return "", -1, err
- }
- return h, pi, nil
-}
diff --git a/vendor/github.com/go-openapi/swag/path.go b/vendor/github.com/go-openapi/swag/path.go
deleted file mode 100644
index 941bd0176..000000000
--- a/vendor/github.com/go-openapi/swag/path.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import (
- "os"
- "path/filepath"
- "runtime"
- "strings"
-)
-
-const (
- // GOPATHKey represents the env key for gopath
- GOPATHKey = "GOPATH"
-)
-
-// FindInSearchPath finds a package in a provided lists of paths
-func FindInSearchPath(searchPath, pkg string) string {
- pathsList := filepath.SplitList(searchPath)
- for _, path := range pathsList {
- if evaluatedPath, err := filepath.EvalSymlinks(filepath.Join(path, "src", pkg)); err == nil {
- if _, err := os.Stat(evaluatedPath); err == nil {
- return evaluatedPath
- }
- }
- }
- return ""
-}
-
-// FindInGoSearchPath finds a package in the $GOPATH:$GOROOT
-func FindInGoSearchPath(pkg string) string {
- return FindInSearchPath(FullGoSearchPath(), pkg)
-}
-
-// FullGoSearchPath gets the search paths for finding packages
-func FullGoSearchPath() string {
- allPaths := os.Getenv(GOPATHKey)
- if allPaths == "" {
- allPaths = filepath.Join(os.Getenv("HOME"), "go")
- }
- if allPaths != "" {
- allPaths = strings.Join([]string{allPaths, runtime.GOROOT()}, ":")
- } else {
- allPaths = runtime.GOROOT()
- }
- return allPaths
-}
diff --git a/vendor/github.com/go-openapi/swag/post_go18.go b/vendor/github.com/go-openapi/swag/post_go18.go
deleted file mode 100644
index c2e686d31..000000000
--- a/vendor/github.com/go-openapi/swag/post_go18.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// +build go1.8
-
-package swag
-
-import "net/url"
-
-func pathUnescape(path string) (string, error) {
- return url.PathUnescape(path)
-}
diff --git a/vendor/github.com/go-openapi/swag/post_go19.go b/vendor/github.com/go-openapi/swag/post_go19.go
deleted file mode 100644
index eb2f2d8bc..000000000
--- a/vendor/github.com/go-openapi/swag/post_go19.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// +build go1.9
-
-package swag
-
-import (
- "sort"
- "sync"
-)
-
-// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms.
-// Since go1.9, this may be implemented with sync.Map.
-type indexOfInitialisms struct {
- sortMutex *sync.Mutex
- index *sync.Map
-}
-
-func newIndexOfInitialisms() *indexOfInitialisms {
- return &indexOfInitialisms{
- sortMutex: new(sync.Mutex),
- index: new(sync.Map),
- }
-}
-
-func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms {
- m.sortMutex.Lock()
- defer m.sortMutex.Unlock()
- for k, v := range initial {
- m.index.Store(k, v)
- }
- return m
-}
-
-func (m *indexOfInitialisms) isInitialism(key string) bool {
- _, ok := m.index.Load(key)
- return ok
-}
-
-func (m *indexOfInitialisms) add(key string) *indexOfInitialisms {
- m.index.Store(key, true)
- return m
-}
-
-func (m *indexOfInitialisms) sorted() (result []string) {
- m.sortMutex.Lock()
- defer m.sortMutex.Unlock()
- m.index.Range(func(key, value interface{}) bool {
- k := key.(string)
- result = append(result, k)
- return true
- })
- sort.Sort(sort.Reverse(byInitialism(result)))
- return
-}
diff --git a/vendor/github.com/go-openapi/swag/pre_go18.go b/vendor/github.com/go-openapi/swag/pre_go18.go
deleted file mode 100644
index 6607f3393..000000000
--- a/vendor/github.com/go-openapi/swag/pre_go18.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// +build !go1.8
-
-package swag
-
-import "net/url"
-
-func pathUnescape(path string) (string, error) {
- return url.QueryUnescape(path)
-}
diff --git a/vendor/github.com/go-openapi/swag/pre_go19.go b/vendor/github.com/go-openapi/swag/pre_go19.go
deleted file mode 100644
index 4bae187d1..000000000
--- a/vendor/github.com/go-openapi/swag/pre_go19.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// +build !go1.9
-
-package swag
-
-import (
- "sort"
- "sync"
-)
-
-// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms.
-// Before go1.9, this may be implemented with a mutex on the map.
-type indexOfInitialisms struct {
- getMutex *sync.Mutex
- index map[string]bool
-}
-
-func newIndexOfInitialisms() *indexOfInitialisms {
- return &indexOfInitialisms{
- getMutex: new(sync.Mutex),
- index: make(map[string]bool, 50),
- }
-}
-
-func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms {
- m.getMutex.Lock()
- defer m.getMutex.Unlock()
- for k, v := range initial {
- m.index[k] = v
- }
- return m
-}
-
-func (m *indexOfInitialisms) isInitialism(key string) bool {
- m.getMutex.Lock()
- defer m.getMutex.Unlock()
- _, ok := m.index[key]
- return ok
-}
-
-func (m *indexOfInitialisms) add(key string) *indexOfInitialisms {
- m.getMutex.Lock()
- defer m.getMutex.Unlock()
- m.index[key] = true
- return m
-}
-
-func (m *indexOfInitialisms) sorted() (result []string) {
- m.getMutex.Lock()
- defer m.getMutex.Unlock()
- for k := range m.index {
- result = append(result, k)
- }
- sort.Sort(sort.Reverse(byInitialism(result)))
- return
-}
diff --git a/vendor/github.com/go-openapi/swag/split.go b/vendor/github.com/go-openapi/swag/split.go
deleted file mode 100644
index a1825fb7d..000000000
--- a/vendor/github.com/go-openapi/swag/split.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import (
- "unicode"
-)
-
-var nameReplaceTable = map[rune]string{
- '@': "At ",
- '&': "And ",
- '|': "Pipe ",
- '$': "Dollar ",
- '!': "Bang ",
- '-': "",
- '_': "",
-}
-
-type (
- splitter struct {
- postSplitInitialismCheck bool
- initialisms []string
- }
-
- splitterOption func(*splitter) *splitter
-)
-
-// split calls the splitter; splitter provides more control and post options
-func split(str string) []string {
- lexems := newSplitter().split(str)
- result := make([]string, 0, len(lexems))
-
- for _, lexem := range lexems {
- result = append(result, lexem.GetOriginal())
- }
-
- return result
-
-}
-
-func (s *splitter) split(str string) []nameLexem {
- return s.toNameLexems(str)
-}
-
-func newSplitter(options ...splitterOption) *splitter {
- splitter := &splitter{
- postSplitInitialismCheck: false,
- initialisms: initialisms,
- }
-
- for _, option := range options {
- splitter = option(splitter)
- }
-
- return splitter
-}
-
-// withPostSplitInitialismCheck allows to catch initialisms after main split process
-func withPostSplitInitialismCheck(s *splitter) *splitter {
- s.postSplitInitialismCheck = true
- return s
-}
-
-type (
- initialismMatch struct {
- start, end int
- body []rune
- complete bool
- }
- initialismMatches []*initialismMatch
-)
-
-func (s *splitter) toNameLexems(name string) []nameLexem {
- nameRunes := []rune(name)
- matches := s.gatherInitialismMatches(nameRunes)
- return s.mapMatchesToNameLexems(nameRunes, matches)
-}
-
-func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches {
- matches := make(initialismMatches, 0)
-
- for currentRunePosition, currentRune := range nameRunes {
- newMatches := make(initialismMatches, 0, len(matches))
-
- // check current initialism matches
- for _, match := range matches {
- if keepCompleteMatch := match.complete; keepCompleteMatch {
- newMatches = append(newMatches, match)
- continue
- }
-
- // drop failed match
- currentMatchRune := match.body[currentRunePosition-match.start]
- if !s.initialismRuneEqual(currentMatchRune, currentRune) {
- continue
- }
-
- // try to complete ongoing match
- if currentRunePosition-match.start == len(match.body)-1 {
- // we are close; the next step is to check the symbol ahead
- // if it is a small letter, then it is not the end of match
- // but beginning of the next word
-
- if currentRunePosition < len(nameRunes)-1 {
- nextRune := nameRunes[currentRunePosition+1]
- if newWord := unicode.IsLower(nextRune); newWord {
- // oh ok, it was the start of a new word
- continue
- }
- }
-
- match.complete = true
- match.end = currentRunePosition
- }
-
- newMatches = append(newMatches, match)
- }
-
- // check for new initialism matches
- for _, initialism := range s.initialisms {
- initialismRunes := []rune(initialism)
- if s.initialismRuneEqual(initialismRunes[0], currentRune) {
- newMatches = append(newMatches, &initialismMatch{
- start: currentRunePosition,
- body: initialismRunes,
- complete: false,
- })
- }
- }
-
- matches = newMatches
- }
-
- return matches
-}
-
-func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem {
- nameLexems := make([]nameLexem, 0)
-
- var lastAcceptedMatch *initialismMatch
- for _, match := range matches {
- if !match.complete {
- continue
- }
-
- if firstMatch := lastAcceptedMatch == nil; firstMatch {
- nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...)
- nameLexems = append(nameLexems, s.breakInitialism(string(match.body)))
-
- lastAcceptedMatch = match
-
- continue
- }
-
- if overlappedMatch := match.start <= lastAcceptedMatch.end; overlappedMatch {
- continue
- }
-
- middle := nameRunes[lastAcceptedMatch.end+1 : match.start]
- nameLexems = append(nameLexems, s.breakCasualString(middle)...)
- nameLexems = append(nameLexems, s.breakInitialism(string(match.body)))
-
- lastAcceptedMatch = match
- }
-
- // we have not found any accepted matches
- if lastAcceptedMatch == nil {
- return s.breakCasualString(nameRunes)
- }
-
- if lastAcceptedMatch.end+1 != len(nameRunes) {
- rest := nameRunes[lastAcceptedMatch.end+1:]
- nameLexems = append(nameLexems, s.breakCasualString(rest)...)
- }
-
- return nameLexems
-}
-
-func (s *splitter) initialismRuneEqual(a, b rune) bool {
- return a == b
-}
-
-func (s *splitter) breakInitialism(original string) nameLexem {
- return newInitialismNameLexem(original, original)
-}
-
-func (s *splitter) breakCasualString(str []rune) []nameLexem {
- segments := make([]nameLexem, 0)
- currentSegment := ""
-
- addCasualNameLexem := func(original string) {
- segments = append(segments, newCasualNameLexem(original))
- }
-
- addInitialismNameLexem := func(original, match string) {
- segments = append(segments, newInitialismNameLexem(original, match))
- }
-
- addNameLexem := func(original string) {
- if s.postSplitInitialismCheck {
- for _, initialism := range s.initialisms {
- if upper(initialism) == upper(original) {
- addInitialismNameLexem(original, initialism)
- return
- }
- }
- }
-
- addCasualNameLexem(original)
- }
-
- for _, rn := range string(str) {
- if replace, found := nameReplaceTable[rn]; found {
- if currentSegment != "" {
- addNameLexem(currentSegment)
- currentSegment = ""
- }
-
- if replace != "" {
- addNameLexem(replace)
- }
-
- continue
- }
-
- if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) {
- if currentSegment != "" {
- addNameLexem(currentSegment)
- currentSegment = ""
- }
-
- continue
- }
-
- if unicode.IsUpper(rn) {
- if currentSegment != "" {
- addNameLexem(currentSegment)
- }
- currentSegment = ""
- }
-
- currentSegment += string(rn)
- }
-
- if currentSegment != "" {
- addNameLexem(currentSegment)
- }
-
- return segments
-}
diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go
deleted file mode 100644
index 9eac16afb..000000000
--- a/vendor/github.com/go-openapi/swag/util.go
+++ /dev/null
@@ -1,385 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import (
- "reflect"
- "strings"
- "unicode"
-)
-
-// commonInitialisms are common acronyms that are kept as whole uppercased words.
-var commonInitialisms *indexOfInitialisms
-
-// initialisms is a slice of sorted initialisms
-var initialisms []string
-
-var isInitialism func(string) bool
-
-// GoNamePrefixFunc sets an optional rule to prefix go names
-// which do not start with a letter.
-//
-// e.g. to help converting "123" into "{prefix}123"
-//
-// The default is to prefix with "X"
-var GoNamePrefixFunc func(string) string
-
-func init() {
- // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769
- var configuredInitialisms = map[string]bool{
- "ACL": true,
- "API": true,
- "ASCII": true,
- "CPU": true,
- "CSS": true,
- "DNS": true,
- "EOF": true,
- "GUID": true,
- "HTML": true,
- "HTTPS": true,
- "HTTP": true,
- "ID": true,
- "IP": true,
- "IPv4": true,
- "IPv6": true,
- "JSON": true,
- "LHS": true,
- "OAI": true,
- "QPS": true,
- "RAM": true,
- "RHS": true,
- "RPC": true,
- "SLA": true,
- "SMTP": true,
- "SQL": true,
- "SSH": true,
- "TCP": true,
- "TLS": true,
- "TTL": true,
- "UDP": true,
- "UI": true,
- "UID": true,
- "UUID": true,
- "URI": true,
- "URL": true,
- "UTF8": true,
- "VM": true,
- "XML": true,
- "XMPP": true,
- "XSRF": true,
- "XSS": true,
- }
-
- // a thread-safe index of initialisms
- commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms)
- initialisms = commonInitialisms.sorted()
-
- // a test function
- isInitialism = commonInitialisms.isInitialism
-}
-
-const (
- //collectionFormatComma = "csv"
- collectionFormatSpace = "ssv"
- collectionFormatTab = "tsv"
- collectionFormatPipe = "pipes"
- collectionFormatMulti = "multi"
-)
-
-// JoinByFormat joins a string array by a known format (e.g. swagger's collectionFormat attribute):
-// ssv: space separated value
-// tsv: tab separated value
-// pipes: pipe (|) separated value
-// csv: comma separated value (default)
-func JoinByFormat(data []string, format string) []string {
- if len(data) == 0 {
- return data
- }
- var sep string
- switch format {
- case collectionFormatSpace:
- sep = " "
- case collectionFormatTab:
- sep = "\t"
- case collectionFormatPipe:
- sep = "|"
- case collectionFormatMulti:
- return data
- default:
- sep = ","
- }
- return []string{strings.Join(data, sep)}
-}
-
-// SplitByFormat splits a string by a known format:
-// ssv: space separated value
-// tsv: tab separated value
-// pipes: pipe (|) separated value
-// csv: comma separated value (default)
-//
-func SplitByFormat(data, format string) []string {
- if data == "" {
- return nil
- }
- var sep string
- switch format {
- case collectionFormatSpace:
- sep = " "
- case collectionFormatTab:
- sep = "\t"
- case collectionFormatPipe:
- sep = "|"
- case collectionFormatMulti:
- return nil
- default:
- sep = ","
- }
- var result []string
- for _, s := range strings.Split(data, sep) {
- if ts := strings.TrimSpace(s); ts != "" {
- result = append(result, ts)
- }
- }
- return result
-}
-
-type byInitialism []string
-
-func (s byInitialism) Len() int {
- return len(s)
-}
-func (s byInitialism) Swap(i, j int) {
- s[i], s[j] = s[j], s[i]
-}
-func (s byInitialism) Less(i, j int) bool {
- if len(s[i]) != len(s[j]) {
- return len(s[i]) < len(s[j])
- }
-
- return strings.Compare(s[i], s[j]) > 0
-}
-
-// Removes leading whitespaces
-func trim(str string) string {
- return strings.Trim(str, " ")
-}
-
-// Shortcut to strings.ToUpper()
-func upper(str string) string {
- return strings.ToUpper(trim(str))
-}
-
-// Shortcut to strings.ToLower()
-func lower(str string) string {
- return strings.ToLower(trim(str))
-}
-
-// Camelize an uppercased word
-func Camelize(word string) (camelized string) {
- for pos, ru := range []rune(word) {
- if pos > 0 {
- camelized += string(unicode.ToLower(ru))
- } else {
- camelized += string(unicode.ToUpper(ru))
- }
- }
- return
-}
-
-// ToFileName lowercases and underscores a go type name
-func ToFileName(name string) string {
- in := split(name)
- out := make([]string, 0, len(in))
-
- for _, w := range in {
- out = append(out, lower(w))
- }
-
- return strings.Join(out, "_")
-}
-
-// ToCommandName lowercases and underscores a go type name
-func ToCommandName(name string) string {
- in := split(name)
- out := make([]string, 0, len(in))
-
- for _, w := range in {
- out = append(out, lower(w))
- }
- return strings.Join(out, "-")
-}
-
-// ToHumanNameLower represents a code name as a human series of words
-func ToHumanNameLower(name string) string {
- in := newSplitter(withPostSplitInitialismCheck).split(name)
- out := make([]string, 0, len(in))
-
- for _, w := range in {
- if !w.IsInitialism() {
- out = append(out, lower(w.GetOriginal()))
- } else {
- out = append(out, w.GetOriginal())
- }
- }
-
- return strings.Join(out, " ")
-}
-
-// ToHumanNameTitle represents a code name as a human series of words with the first letters titleized
-func ToHumanNameTitle(name string) string {
- in := newSplitter(withPostSplitInitialismCheck).split(name)
-
- out := make([]string, 0, len(in))
- for _, w := range in {
- original := w.GetOriginal()
- if !w.IsInitialism() {
- out = append(out, Camelize(original))
- } else {
- out = append(out, original)
- }
- }
- return strings.Join(out, " ")
-}
-
-// ToJSONName camelcases a name which can be underscored or pascal cased
-func ToJSONName(name string) string {
- in := split(name)
- out := make([]string, 0, len(in))
-
- for i, w := range in {
- if i == 0 {
- out = append(out, lower(w))
- continue
- }
- out = append(out, Camelize(w))
- }
- return strings.Join(out, "")
-}
-
-// ToVarName camelcases a name which can be underscored or pascal cased
-func ToVarName(name string) string {
- res := ToGoName(name)
- if isInitialism(res) {
- return lower(res)
- }
- if len(res) <= 1 {
- return lower(res)
- }
- return lower(res[:1]) + res[1:]
-}
-
-// ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes
-func ToGoName(name string) string {
- lexems := newSplitter(withPostSplitInitialismCheck).split(name)
-
- result := ""
- for _, lexem := range lexems {
- goName := lexem.GetUnsafeGoName()
-
- // to support old behavior
- if lexem.IsInitialism() {
- goName = upper(goName)
- }
- result += goName
- }
-
- if len(result) > 0 {
- // Only prefix with X when the first character isn't an ascii letter
- first := []rune(result)[0]
- if !unicode.IsLetter(first) || (first > unicode.MaxASCII && !unicode.IsUpper(first)) {
- if GoNamePrefixFunc == nil {
- return "X" + result
- }
- result = GoNamePrefixFunc(name) + result
- }
- first = []rune(result)[0]
- if unicode.IsLetter(first) && !unicode.IsUpper(first) {
- result = string(append([]rune{unicode.ToUpper(first)}, []rune(result)[1:]...))
- }
- }
-
- return result
-}
-
-// ContainsStrings searches a slice of strings for a case-sensitive match
-func ContainsStrings(coll []string, item string) bool {
- for _, a := range coll {
- if a == item {
- return true
- }
- }
- return false
-}
-
-// ContainsStringsCI searches a slice of strings for a case-insensitive match
-func ContainsStringsCI(coll []string, item string) bool {
- for _, a := range coll {
- if strings.EqualFold(a, item) {
- return true
- }
- }
- return false
-}
-
-type zeroable interface {
- IsZero() bool
-}
-
-// IsZero returns true when the value passed into the function is a zero value.
-// This allows for safer checking of interface values.
-func IsZero(data interface{}) bool {
- // check for things that have an IsZero method instead
- if vv, ok := data.(zeroable); ok {
- return vv.IsZero()
- }
- // continue with slightly more complex reflection
- v := reflect.ValueOf(data)
- switch v.Kind() {
- case reflect.String:
- return v.Len() == 0
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
- return v.IsNil()
- case reflect.Struct, reflect.Array:
- return reflect.DeepEqual(data, reflect.Zero(v.Type()).Interface())
- case reflect.Invalid:
- return true
- }
- return false
-}
-
-// AddInitialisms add additional initialisms
-func AddInitialisms(words ...string) {
- for _, word := range words {
- //commonInitialisms[upper(word)] = true
- commonInitialisms.add(upper(word))
- }
- // sort again
- initialisms = commonInitialisms.sorted()
-}
-
-// CommandLineOptionsGroup represents a group of user-defined command line options
-type CommandLineOptionsGroup struct {
- ShortDescription string
- LongDescription string
- Options interface{}
-}
diff --git a/vendor/github.com/go-openapi/swag/yaml.go b/vendor/github.com/go-openapi/swag/yaml.go
deleted file mode 100644
index ec9691440..000000000
--- a/vendor/github.com/go-openapi/swag/yaml.go
+++ /dev/null
@@ -1,246 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package swag
-
-import (
- "encoding/json"
- "fmt"
- "path/filepath"
- "strconv"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
- yaml "gopkg.in/yaml.v2"
-)
-
-// YAMLMatcher matches yaml
-func YAMLMatcher(path string) bool {
- ext := filepath.Ext(path)
- return ext == ".yaml" || ext == ".yml"
-}
-
-// YAMLToJSON converts YAML unmarshaled data into json compatible data
-func YAMLToJSON(data interface{}) (json.RawMessage, error) {
- jm, err := transformData(data)
- if err != nil {
- return nil, err
- }
- b, err := WriteJSON(jm)
- return json.RawMessage(b), err
-}
-
-// BytesToYAMLDoc converts a byte slice into a YAML document
-func BytesToYAMLDoc(data []byte) (interface{}, error) {
- var canary map[interface{}]interface{} // validate this is an object and not a different type
- if err := yaml.Unmarshal(data, &canary); err != nil {
- return nil, err
- }
-
- var document yaml.MapSlice // preserve order that is present in the document
- if err := yaml.Unmarshal(data, &document); err != nil {
- return nil, err
- }
- return document, nil
-}
-
-// JSONMapSlice represent a JSON object, with the order of keys maintained
-type JSONMapSlice []JSONMapItem
-
-// MarshalJSON renders a JSONMapSlice as JSON
-func (s JSONMapSlice) MarshalJSON() ([]byte, error) {
- w := &jwriter.Writer{Flags: jwriter.NilMapAsEmpty | jwriter.NilSliceAsEmpty}
- s.MarshalEasyJSON(w)
- return w.BuildBytes()
-}
-
-// MarshalEasyJSON renders a JSONMapSlice as JSON, using easyJSON
-func (s JSONMapSlice) MarshalEasyJSON(w *jwriter.Writer) {
- w.RawByte('{')
-
- ln := len(s)
- last := ln - 1
- for i := 0; i < ln; i++ {
- s[i].MarshalEasyJSON(w)
- if i != last { // last item
- w.RawByte(',')
- }
- }
-
- w.RawByte('}')
-}
-
-// UnmarshalJSON makes a JSONMapSlice from JSON
-func (s *JSONMapSlice) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- s.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// UnmarshalEasyJSON makes a JSONMapSlice from JSON, using easyJSON
-func (s *JSONMapSlice) UnmarshalEasyJSON(in *jlexer.Lexer) {
- if in.IsNull() {
- in.Skip()
- return
- }
-
- var result JSONMapSlice
- in.Delim('{')
- for !in.IsDelim('}') {
- var mi JSONMapItem
- mi.UnmarshalEasyJSON(in)
- result = append(result, mi)
- }
- *s = result
-}
-
-// JSONMapItem represents the value of a key in a JSON object held by JSONMapSlice
-type JSONMapItem struct {
- Key string
- Value interface{}
-}
-
-// MarshalJSON renders a JSONMapItem as JSON
-func (s JSONMapItem) MarshalJSON() ([]byte, error) {
- w := &jwriter.Writer{Flags: jwriter.NilMapAsEmpty | jwriter.NilSliceAsEmpty}
- s.MarshalEasyJSON(w)
- return w.BuildBytes()
-}
-
-// MarshalEasyJSON renders a JSONMapItem as JSON, using easyJSON
-func (s JSONMapItem) MarshalEasyJSON(w *jwriter.Writer) {
- w.String(s.Key)
- w.RawByte(':')
- w.Raw(WriteJSON(s.Value))
-}
-
-// UnmarshalJSON makes a JSONMapItem from JSON
-func (s *JSONMapItem) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- s.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// UnmarshalEasyJSON makes a JSONMapItem from JSON, using easyJSON
-func (s *JSONMapItem) UnmarshalEasyJSON(in *jlexer.Lexer) {
- key := in.UnsafeString()
- in.WantColon()
- value := in.Interface()
- in.WantComma()
- s.Key = key
- s.Value = value
-}
-
-func transformData(input interface{}) (out interface{}, err error) {
- format := func(t interface{}) (string, error) {
- switch k := t.(type) {
- case string:
- return k, nil
- case uint:
- return strconv.FormatUint(uint64(k), 10), nil
- case uint8:
- return strconv.FormatUint(uint64(k), 10), nil
- case uint16:
- return strconv.FormatUint(uint64(k), 10), nil
- case uint32:
- return strconv.FormatUint(uint64(k), 10), nil
- case uint64:
- return strconv.FormatUint(k, 10), nil
- case int:
- return strconv.Itoa(k), nil
- case int8:
- return strconv.FormatInt(int64(k), 10), nil
- case int16:
- return strconv.FormatInt(int64(k), 10), nil
- case int32:
- return strconv.FormatInt(int64(k), 10), nil
- case int64:
- return strconv.FormatInt(k, 10), nil
- default:
- return "", fmt.Errorf("unexpected map key type, got: %T", k)
- }
- }
-
- switch in := input.(type) {
- case yaml.MapSlice:
-
- o := make(JSONMapSlice, len(in))
- for i, mi := range in {
- var nmi JSONMapItem
- if nmi.Key, err = format(mi.Key); err != nil {
- return nil, err
- }
-
- v, ert := transformData(mi.Value)
- if ert != nil {
- return nil, ert
- }
- nmi.Value = v
- o[i] = nmi
- }
- return o, nil
- case map[interface{}]interface{}:
- o := make(JSONMapSlice, 0, len(in))
- for ke, va := range in {
- var nmi JSONMapItem
- if nmi.Key, err = format(ke); err != nil {
- return nil, err
- }
-
- v, ert := transformData(va)
- if ert != nil {
- return nil, ert
- }
- nmi.Value = v
- o = append(o, nmi)
- }
- return o, nil
- case []interface{}:
- len1 := len(in)
- o := make([]interface{}, len1)
- for i := 0; i < len1; i++ {
- o[i], err = transformData(in[i])
- if err != nil {
- return nil, err
- }
- }
- return o, nil
- }
- return input, nil
-}
-
-// YAMLDoc loads a yaml document from either http or a file and converts it to json
-func YAMLDoc(path string) (json.RawMessage, error) {
- yamlDoc, err := YAMLData(path)
- if err != nil {
- return nil, err
- }
-
- data, err := YAMLToJSON(yamlDoc)
- if err != nil {
- return nil, err
- }
-
- return data, nil
-}
-
-// YAMLData loads a yaml document from either http or a file
-func YAMLData(path string) (interface{}, error) {
- data, err := LoadFromFileOrHTTP(path)
- if err != nil {
- return nil, err
- }
-
- return BytesToYAMLDoc(data)
-}
diff --git a/vendor/github.com/go-redis/redis/v7/.gitignore b/vendor/github.com/go-redis/redis/v7/.gitignore
deleted file mode 100644
index ebfe903bc..000000000
--- a/vendor/github.com/go-redis/redis/v7/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.rdb
-testdata/*/
diff --git a/vendor/github.com/go-redis/redis/v7/.golangci.yml b/vendor/github.com/go-redis/redis/v7/.golangci.yml
deleted file mode 100644
index 912dab1ef..000000000
--- a/vendor/github.com/go-redis/redis/v7/.golangci.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-run:
- concurrency: 8
- deadline: 5m
- tests: false
-linters:
- enable-all: true
- disable:
- - funlen
- - gochecknoglobals
- - gocognit
- - goconst
- - godox
- - gosec
- - maligned
- - wsl
diff --git a/vendor/github.com/go-redis/redis/v7/.travis.yml b/vendor/github.com/go-redis/redis/v7/.travis.yml
deleted file mode 100644
index 3f93932bc..000000000
--- a/vendor/github.com/go-redis/redis/v7/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-dist: xenial
-language: go
-
-services:
- - redis-server
-
-go:
- - 1.12.x
- - 1.13.x
- - tip
-
-matrix:
- allow_failures:
- - go: tip
-
-env:
- - GO111MODULE=on
-
-go_import_path: github.com/go-redis/redis
-
-before_install:
- - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
diff --git a/vendor/github.com/go-redis/redis/v7/CHANGELOG.md b/vendor/github.com/go-redis/redis/v7/CHANGELOG.md
deleted file mode 100644
index bd4eccff2..000000000
--- a/vendor/github.com/go-redis/redis/v7/CHANGELOG.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Changelog
-
-## v7.2
-
-- Existing `HMSet` is renamed to `HSet` and old deprecated `HMSet` is restored for Redis 3 users.
-
-## v7.1
-
-- Existing `Cmd.String` is renamed to `Cmd.Text`. New `Cmd.String` implements `fmt.Stringer` interface.
-
-## v7
-
-- *Important*. Tx.Pipeline now returns a non-transactional pipeline. Use Tx.TxPipeline for a transactional pipeline.
-- WrapProcess is replaced with more convenient AddHook that has access to context.Context.
-- WithContext now can not be used to create a shallow copy of the client.
-- New methods ProcessContext, DoContext, and ExecContext.
-- Client respects Context.Deadline when setting net.Conn deadline.
-- Client listens on Context.Done while waiting for a connection from the pool and returns an error when context context is cancelled.
-- Add PubSub.ChannelWithSubscriptions that sends `*Subscription` in addition to `*Message` to allow detecting reconnections.
-- `time.Time` is now marshalled in RFC3339 format. `rdb.Get("foo").Time()` helper is added to parse the time.
-- `SetLimiter` is removed and added `Options.Limiter` instead.
-- `HMSet` is deprecated as of Redis v4.
-
-## v6.15
-
-- Cluster and Ring pipelines process commands for each node in its own goroutine.
-
-## 6.14
-
-- Added Options.MinIdleConns.
-- Added Options.MaxConnAge.
-- PoolStats.FreeConns is renamed to PoolStats.IdleConns.
-- Add Client.Do to simplify creating custom commands.
-- Add Cmd.String, Cmd.Int, Cmd.Int64, Cmd.Uint64, Cmd.Float64, and Cmd.Bool helpers.
-- Lower memory usage.
-
-## v6.13
-
-- Ring got new options called `HashReplicas` and `Hash`. It is recommended to set `HashReplicas = 1000` for better keys distribution between shards.
-- Cluster client was optimized to use much less memory when reloading cluster state.
-- PubSub.ReceiveMessage is re-worked to not use ReceiveTimeout so it does not lose data when timeout occurres. In most cases it is recommended to use PubSub.Channel instead.
-- Dialer.KeepAlive is set to 5 minutes by default.
-
-## v6.12
-
-- ClusterClient got new option called `ClusterSlots` which allows to build cluster of normal Redis Servers that don't have cluster mode enabled. See https://godoc.org/github.com/go-redis/redis#example-NewClusterClient--ManualSetup
diff --git a/vendor/github.com/go-redis/redis/v7/LICENSE b/vendor/github.com/go-redis/redis/v7/LICENSE
deleted file mode 100644
index 298bed9be..000000000
--- a/vendor/github.com/go-redis/redis/v7/LICENSE
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2013 The github.com/go-redis/redis Authors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/go-redis/redis/v7/Makefile b/vendor/github.com/go-redis/redis/v7/Makefile
deleted file mode 100644
index 86609c6e0..000000000
--- a/vendor/github.com/go-redis/redis/v7/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-all: testdeps
- go test ./...
- go test ./... -short -race
- go test ./... -run=NONE -bench=. -benchmem
- env GOOS=linux GOARCH=386 go test ./...
- golangci-lint run
-
-testdeps: testdata/redis/src/redis-server
-
-bench: testdeps
- go test ./... -test.run=NONE -test.bench=. -test.benchmem
-
-.PHONY: all test testdeps bench
-
-testdata/redis:
- mkdir -p $@
- wget -qO- http://download.redis.io/redis-stable.tar.gz | tar xvz --strip-components=1 -C $@
-
-testdata/redis/src/redis-server: testdata/redis
- cd $< && make all
diff --git a/vendor/github.com/go-redis/redis/v7/README.md b/vendor/github.com/go-redis/redis/v7/README.md
deleted file mode 100644
index 0fbb506ea..000000000
--- a/vendor/github.com/go-redis/redis/v7/README.md
+++ /dev/null
@@ -1,128 +0,0 @@
-# Redis client for Golang
-
-[](https://travis-ci.org/go-redis/redis)
-[](https://godoc.org/github.com/go-redis/redis)
-[](https://airbrake.io)
-
-Supports:
-
-- Redis 3 commands except QUIT, MONITOR, SLOWLOG and SYNC.
-- Automatic connection pooling with [circuit breaker](https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern) support.
-- [Pub/Sub](https://godoc.org/github.com/go-redis/redis#PubSub).
-- [Transactions](https://godoc.org/github.com/go-redis/redis#example-Client-TxPipeline).
-- [Pipeline](https://godoc.org/github.com/go-redis/redis#example-Client-Pipeline) and [TxPipeline](https://godoc.org/github.com/go-redis/redis#example-Client-TxPipeline).
-- [Scripting](https://godoc.org/github.com/go-redis/redis#Script).
-- [Timeouts](https://godoc.org/github.com/go-redis/redis#Options).
-- [Redis Sentinel](https://godoc.org/github.com/go-redis/redis#NewFailoverClient).
-- [Redis Cluster](https://godoc.org/github.com/go-redis/redis#NewClusterClient).
-- [Cluster of Redis Servers](https://godoc.org/github.com/go-redis/redis#example-NewClusterClient--ManualSetup) without using cluster mode and Redis Sentinel.
-- [Ring](https://godoc.org/github.com/go-redis/redis#NewRing).
-- [Instrumentation](https://godoc.org/github.com/go-redis/redis#ex-package--Instrumentation).
-- [Cache friendly](https://github.com/go-redis/cache).
-- [Rate limiting](https://github.com/go-redis/redis_rate).
-- [Distributed Locks](https://github.com/bsm/redislock).
-
-API docs: https://godoc.org/github.com/go-redis/redis.
-Examples: https://godoc.org/github.com/go-redis/redis#pkg-examples.
-
-## Installation
-
-go-redis requires a Go version with [Modules](https://github.com/golang/go/wiki/Modules) support and uses import versioning. So please make sure to initialize a Go module before installing go-redis:
-
-``` shell
-go mod init github.com/my/repo
-go get github.com/go-redis/redis/v7
-```
-
-Import:
-
-``` go
-import "github.com/go-redis/redis/v7"
-```
-
-## Quickstart
-
-``` go
-func ExampleNewClient() {
- client := redis.NewClient(&redis.Options{
- Addr: "localhost:6379",
- Password: "", // no password set
- DB: 0, // use default DB
- })
-
- pong, err := client.Ping().Result()
- fmt.Println(pong, err)
- // Output: PONG
-}
-
-func ExampleClient() {
- client := redis.NewClient(&redis.Options{
- Addr: "localhost:6379",
- Password: "", // no password set
- DB: 0, // use default DB
- })
- err := client.Set("key", "value", 0).Err()
- if err != nil {
- panic(err)
- }
-
- val, err := client.Get("key").Result()
- if err != nil {
- panic(err)
- }
- fmt.Println("key", val)
-
- val2, err := client.Get("key2").Result()
- if err == redis.Nil {
- fmt.Println("key2 does not exist")
- } else if err != nil {
- panic(err)
- } else {
- fmt.Println("key2", val2)
- }
- // Output: key value
- // key2 does not exist
-}
-```
-
-## Howto
-
-Please go through [examples](https://godoc.org/github.com/go-redis/redis#pkg-examples) to get an idea how to use this package.
-
-## Look and feel
-
-Some corner cases:
-
-``` go
-// SET key value EX 10 NX
-set, err := client.SetNX("key", "value", 10*time.Second).Result()
-
-// SORT list LIMIT 0 2 ASC
-vals, err := client.Sort("list", &redis.Sort{Offset: 0, Count: 2, Order: "ASC"}).Result()
-
-// ZRANGEBYSCORE zset -inf +inf WITHSCORES LIMIT 0 2
-vals, err := client.ZRangeByScoreWithScores("zset", &redis.ZRangeBy{
- Min: "-inf",
- Max: "+inf",
- Offset: 0,
- Count: 2,
-}).Result()
-
-// ZINTERSTORE out 2 zset1 zset2 WEIGHTS 2 3 AGGREGATE SUM
-vals, err := client.ZInterStore("out", &redis.ZStore{
- Keys: []string{"zset1", "zset2"},
- Weights: []int64{2, 3}
-}).Result()
-
-// EVAL "return {KEYS[1],ARGV[1]}" 1 "key" "hello"
-vals, err := client.Eval("return {KEYS[1],ARGV[1]}", []string{"key"}, "hello").Result()
-
-// custom command
-res, err := client.Do("set", "key", "value").Result()
-```
-
-## See also
-
-- [Golang PostgreSQL ORM](https://github.com/go-pg/pg)
-- [Golang msgpack](https://github.com/vmihailenco/msgpack)
-- [Golang message task queue](https://github.com/vmihailenco/taskq)
diff --git a/vendor/github.com/go-redis/redis/v7/cluster.go b/vendor/github.com/go-redis/redis/v7/cluster.go
deleted file mode 100644
index 1907de6c4..000000000
--- a/vendor/github.com/go-redis/redis/v7/cluster.go
+++ /dev/null
@@ -1,1669 +0,0 @@
-package redis
-
-import (
- "context"
- "crypto/tls"
- "fmt"
- "math"
- "math/rand"
- "net"
- "runtime"
- "sort"
- "sync"
- "sync/atomic"
- "time"
-
- "github.com/go-redis/redis/v7/internal"
- "github.com/go-redis/redis/v7/internal/hashtag"
- "github.com/go-redis/redis/v7/internal/pool"
- "github.com/go-redis/redis/v7/internal/proto"
-)
-
-var errClusterNoNodes = fmt.Errorf("redis: cluster has no nodes")
-
-// ClusterOptions are used to configure a cluster client and should be
-// passed to NewClusterClient.
-type ClusterOptions struct {
- // A seed list of host:port addresses of cluster nodes.
- Addrs []string
-
- // The maximum number of retries before giving up. Command is retried
- // on network errors and MOVED/ASK redirects.
- // Default is 8 retries.
- MaxRedirects int
-
- // Enables read-only commands on slave nodes.
- ReadOnly bool
- // Allows routing read-only commands to the closest master or slave node.
- // It automatically enables ReadOnly.
- RouteByLatency bool
- // Allows routing read-only commands to the random master or slave node.
- // It automatically enables ReadOnly.
- RouteRandomly bool
-
- // Optional function that returns cluster slots information.
- // It is useful to manually create cluster of standalone Redis servers
- // and load-balance read/write operations between master and slaves.
- // It can use service like ZooKeeper to maintain configuration information
- // and Cluster.ReloadState to manually trigger state reloading.
- ClusterSlots func() ([]ClusterSlot, error)
-
- // Optional hook that is called when a new node is created.
- OnNewNode func(*Client)
-
- // Following options are copied from Options struct.
-
- Dialer func(ctx context.Context, network, addr string) (net.Conn, error)
-
- OnConnect func(*Conn) error
-
- Username string
- Password string
-
- MaxRetries int
- MinRetryBackoff time.Duration
- MaxRetryBackoff time.Duration
-
- DialTimeout time.Duration
- ReadTimeout time.Duration
- WriteTimeout time.Duration
-
- // NewClient creates a cluster node client with provided name and options.
- NewClient func(opt *Options) *Client
-
- // PoolSize applies per cluster node and not for the whole cluster.
- PoolSize int
- MinIdleConns int
- MaxConnAge time.Duration
- PoolTimeout time.Duration
- IdleTimeout time.Duration
- IdleCheckFrequency time.Duration
-
- TLSConfig *tls.Config
-}
-
-func (opt *ClusterOptions) init() {
- if opt.MaxRedirects == -1 {
- opt.MaxRedirects = 0
- } else if opt.MaxRedirects == 0 {
- opt.MaxRedirects = 8
- }
-
- if (opt.RouteByLatency || opt.RouteRandomly) && opt.ClusterSlots == nil {
- opt.ReadOnly = true
- }
-
- if opt.PoolSize == 0 {
- opt.PoolSize = 5 * runtime.NumCPU()
- }
-
- switch opt.ReadTimeout {
- case -1:
- opt.ReadTimeout = 0
- case 0:
- opt.ReadTimeout = 3 * time.Second
- }
- switch opt.WriteTimeout {
- case -1:
- opt.WriteTimeout = 0
- case 0:
- opt.WriteTimeout = opt.ReadTimeout
- }
-
- switch opt.MinRetryBackoff {
- case -1:
- opt.MinRetryBackoff = 0
- case 0:
- opt.MinRetryBackoff = 8 * time.Millisecond
- }
- switch opt.MaxRetryBackoff {
- case -1:
- opt.MaxRetryBackoff = 0
- case 0:
- opt.MaxRetryBackoff = 512 * time.Millisecond
- }
-
- if opt.NewClient == nil {
- opt.NewClient = NewClient
- }
-}
-
-func (opt *ClusterOptions) clientOptions() *Options {
- const disableIdleCheck = -1
-
- return &Options{
- Dialer: opt.Dialer,
- OnConnect: opt.OnConnect,
-
- MaxRetries: opt.MaxRetries,
- MinRetryBackoff: opt.MinRetryBackoff,
- MaxRetryBackoff: opt.MaxRetryBackoff,
- Username: opt.Username,
- Password: opt.Password,
- readOnly: opt.ReadOnly,
-
- DialTimeout: opt.DialTimeout,
- ReadTimeout: opt.ReadTimeout,
- WriteTimeout: opt.WriteTimeout,
-
- PoolSize: opt.PoolSize,
- MinIdleConns: opt.MinIdleConns,
- MaxConnAge: opt.MaxConnAge,
- PoolTimeout: opt.PoolTimeout,
- IdleTimeout: opt.IdleTimeout,
- IdleCheckFrequency: disableIdleCheck,
-
- TLSConfig: opt.TLSConfig,
- }
-}
-
-//------------------------------------------------------------------------------
-
-type clusterNode struct {
- Client *Client
-
- latency uint32 // atomic
- generation uint32 // atomic
- failing uint32 // atomic
-}
-
-func newClusterNode(clOpt *ClusterOptions, addr string) *clusterNode {
- opt := clOpt.clientOptions()
- opt.Addr = addr
- node := clusterNode{
- Client: clOpt.NewClient(opt),
- }
-
- node.latency = math.MaxUint32
- if clOpt.RouteByLatency {
- go node.updateLatency()
- }
-
- if clOpt.OnNewNode != nil {
- clOpt.OnNewNode(node.Client)
- }
-
- return &node
-}
-
-func (n *clusterNode) String() string {
- return n.Client.String()
-}
-
-func (n *clusterNode) Close() error {
- return n.Client.Close()
-}
-
-func (n *clusterNode) updateLatency() {
- const probes = 10
-
- var latency uint32
- for i := 0; i < probes; i++ {
- start := time.Now()
- n.Client.Ping()
- probe := uint32(time.Since(start) / time.Microsecond)
- latency = (latency + probe) / 2
- }
- atomic.StoreUint32(&n.latency, latency)
-}
-
-func (n *clusterNode) Latency() time.Duration {
- latency := atomic.LoadUint32(&n.latency)
- return time.Duration(latency) * time.Microsecond
-}
-
-func (n *clusterNode) MarkAsFailing() {
- atomic.StoreUint32(&n.failing, uint32(time.Now().Unix()))
-}
-
-func (n *clusterNode) Failing() bool {
- const timeout = 15 // 15 seconds
-
- failing := atomic.LoadUint32(&n.failing)
- if failing == 0 {
- return false
- }
- if time.Now().Unix()-int64(failing) < timeout {
- return true
- }
- atomic.StoreUint32(&n.failing, 0)
- return false
-}
-
-func (n *clusterNode) Generation() uint32 {
- return atomic.LoadUint32(&n.generation)
-}
-
-func (n *clusterNode) SetGeneration(gen uint32) {
- for {
- v := atomic.LoadUint32(&n.generation)
- if gen < v || atomic.CompareAndSwapUint32(&n.generation, v, gen) {
- break
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-type clusterNodes struct {
- opt *ClusterOptions
-
- mu sync.RWMutex
- allAddrs []string
- allNodes map[string]*clusterNode
- clusterAddrs []string
- closed bool
-
- _generation uint32 // atomic
-}
-
-func newClusterNodes(opt *ClusterOptions) *clusterNodes {
- return &clusterNodes{
- opt: opt,
-
- allAddrs: opt.Addrs,
- allNodes: make(map[string]*clusterNode),
- }
-}
-
-func (c *clusterNodes) Close() error {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- if c.closed {
- return nil
- }
- c.closed = true
-
- var firstErr error
- for _, node := range c.allNodes {
- if err := node.Client.Close(); err != nil && firstErr == nil {
- firstErr = err
- }
- }
-
- c.allNodes = nil
- c.clusterAddrs = nil
-
- return firstErr
-}
-
-func (c *clusterNodes) Addrs() ([]string, error) {
- var addrs []string
- c.mu.RLock()
- closed := c.closed
- if !closed {
- if len(c.clusterAddrs) > 0 {
- addrs = c.clusterAddrs
- } else {
- addrs = c.allAddrs
- }
- }
- c.mu.RUnlock()
-
- if closed {
- return nil, pool.ErrClosed
- }
- if len(addrs) == 0 {
- return nil, errClusterNoNodes
- }
- return addrs, nil
-}
-
-func (c *clusterNodes) NextGeneration() uint32 {
- return atomic.AddUint32(&c._generation, 1)
-}
-
-// GC removes unused nodes.
-func (c *clusterNodes) GC(generation uint32) {
- //nolint:prealloc
- var collected []*clusterNode
- c.mu.Lock()
- for addr, node := range c.allNodes {
- if node.Generation() >= generation {
- continue
- }
-
- c.clusterAddrs = remove(c.clusterAddrs, addr)
- delete(c.allNodes, addr)
- collected = append(collected, node)
- }
- c.mu.Unlock()
-
- for _, node := range collected {
- _ = node.Client.Close()
- }
-}
-
-func (c *clusterNodes) Get(addr string) (*clusterNode, error) {
- node, err := c.get(addr)
- if err != nil {
- return nil, err
- }
- if node != nil {
- return node, nil
- }
-
- c.mu.Lock()
- defer c.mu.Unlock()
-
- if c.closed {
- return nil, pool.ErrClosed
- }
-
- node, ok := c.allNodes[addr]
- if ok {
- return node, err
- }
-
- node = newClusterNode(c.opt, addr)
-
- c.allAddrs = appendIfNotExists(c.allAddrs, addr)
- c.clusterAddrs = append(c.clusterAddrs, addr)
- c.allNodes[addr] = node
-
- return node, err
-}
-
-func (c *clusterNodes) get(addr string) (*clusterNode, error) {
- var node *clusterNode
- var err error
- c.mu.RLock()
- if c.closed {
- err = pool.ErrClosed
- } else {
- node = c.allNodes[addr]
- }
- c.mu.RUnlock()
- return node, err
-}
-
-func (c *clusterNodes) All() ([]*clusterNode, error) {
- c.mu.RLock()
- defer c.mu.RUnlock()
-
- if c.closed {
- return nil, pool.ErrClosed
- }
-
- cp := make([]*clusterNode, 0, len(c.allNodes))
- for _, node := range c.allNodes {
- cp = append(cp, node)
- }
- return cp, nil
-}
-
-func (c *clusterNodes) Random() (*clusterNode, error) {
- addrs, err := c.Addrs()
- if err != nil {
- return nil, err
- }
-
- n := rand.Intn(len(addrs))
- return c.Get(addrs[n])
-}
-
-//------------------------------------------------------------------------------
-
-type clusterSlot struct {
- start, end int
- nodes []*clusterNode
-}
-
-type clusterSlotSlice []*clusterSlot
-
-func (p clusterSlotSlice) Len() int {
- return len(p)
-}
-
-func (p clusterSlotSlice) Less(i, j int) bool {
- return p[i].start < p[j].start
-}
-
-func (p clusterSlotSlice) Swap(i, j int) {
- p[i], p[j] = p[j], p[i]
-}
-
-type clusterState struct {
- nodes *clusterNodes
- Masters []*clusterNode
- Slaves []*clusterNode
-
- slots []*clusterSlot
-
- generation uint32
- createdAt time.Time
-}
-
-func newClusterState(
- nodes *clusterNodes, slots []ClusterSlot, origin string,
-) (*clusterState, error) {
- c := clusterState{
- nodes: nodes,
-
- slots: make([]*clusterSlot, 0, len(slots)),
-
- generation: nodes.NextGeneration(),
- createdAt: time.Now(),
- }
-
- originHost, _, _ := net.SplitHostPort(origin)
- isLoopbackOrigin := isLoopback(originHost)
-
- for _, slot := range slots {
- var nodes []*clusterNode
- for i, slotNode := range slot.Nodes {
- addr := slotNode.Addr
- if !isLoopbackOrigin {
- addr = replaceLoopbackHost(addr, originHost)
- }
-
- node, err := c.nodes.Get(addr)
- if err != nil {
- return nil, err
- }
-
- node.SetGeneration(c.generation)
- nodes = append(nodes, node)
-
- if i == 0 {
- c.Masters = appendUniqueNode(c.Masters, node)
- } else {
- c.Slaves = appendUniqueNode(c.Slaves, node)
- }
- }
-
- c.slots = append(c.slots, &clusterSlot{
- start: slot.Start,
- end: slot.End,
- nodes: nodes,
- })
- }
-
- sort.Sort(clusterSlotSlice(c.slots))
-
- time.AfterFunc(time.Minute, func() {
- nodes.GC(c.generation)
- })
-
- return &c, nil
-}
-
-func replaceLoopbackHost(nodeAddr, originHost string) string {
- nodeHost, nodePort, err := net.SplitHostPort(nodeAddr)
- if err != nil {
- return nodeAddr
- }
-
- nodeIP := net.ParseIP(nodeHost)
- if nodeIP == nil {
- return nodeAddr
- }
-
- if !nodeIP.IsLoopback() {
- return nodeAddr
- }
-
- // Use origin host which is not loopback and node port.
- return net.JoinHostPort(originHost, nodePort)
-}
-
-func isLoopback(host string) bool {
- ip := net.ParseIP(host)
- if ip == nil {
- return true
- }
- return ip.IsLoopback()
-}
-
-func (c *clusterState) slotMasterNode(slot int) (*clusterNode, error) {
- nodes := c.slotNodes(slot)
- if len(nodes) > 0 {
- return nodes[0], nil
- }
- return c.nodes.Random()
-}
-
-func (c *clusterState) slotSlaveNode(slot int) (*clusterNode, error) {
- nodes := c.slotNodes(slot)
- switch len(nodes) {
- case 0:
- return c.nodes.Random()
- case 1:
- return nodes[0], nil
- case 2:
- if slave := nodes[1]; !slave.Failing() {
- return slave, nil
- }
- return nodes[0], nil
- default:
- var slave *clusterNode
- for i := 0; i < 10; i++ {
- n := rand.Intn(len(nodes)-1) + 1
- slave = nodes[n]
- if !slave.Failing() {
- return slave, nil
- }
- }
-
- // All slaves are loading - use master.
- return nodes[0], nil
- }
-}
-
-func (c *clusterState) slotClosestNode(slot int) (*clusterNode, error) {
- const threshold = time.Millisecond
-
- nodes := c.slotNodes(slot)
- if len(nodes) == 0 {
- return c.nodes.Random()
- }
-
- var node *clusterNode
- for _, n := range nodes {
- if n.Failing() {
- continue
- }
- if node == nil || node.Latency()-n.Latency() > threshold {
- node = n
- }
- }
- return node, nil
-}
-
-func (c *clusterState) slotRandomNode(slot int) (*clusterNode, error) {
- nodes := c.slotNodes(slot)
- if len(nodes) == 0 {
- return c.nodes.Random()
- }
- n := rand.Intn(len(nodes))
- return nodes[n], nil
-}
-
-func (c *clusterState) slotNodes(slot int) []*clusterNode {
- i := sort.Search(len(c.slots), func(i int) bool {
- return c.slots[i].end >= slot
- })
- if i >= len(c.slots) {
- return nil
- }
- x := c.slots[i]
- if slot >= x.start && slot <= x.end {
- return x.nodes
- }
- return nil
-}
-
-//------------------------------------------------------------------------------
-
-type clusterStateHolder struct {
- load func() (*clusterState, error)
-
- state atomic.Value
- reloading uint32 // atomic
-}
-
-func newClusterStateHolder(fn func() (*clusterState, error)) *clusterStateHolder {
- return &clusterStateHolder{
- load: fn,
- }
-}
-
-func (c *clusterStateHolder) Reload() (*clusterState, error) {
- state, err := c.load()
- if err != nil {
- return nil, err
- }
- c.state.Store(state)
- return state, nil
-}
-
-func (c *clusterStateHolder) LazyReload() {
- if !atomic.CompareAndSwapUint32(&c.reloading, 0, 1) {
- return
- }
- go func() {
- defer atomic.StoreUint32(&c.reloading, 0)
-
- _, err := c.Reload()
- if err != nil {
- return
- }
- time.Sleep(100 * time.Millisecond)
- }()
-}
-
-func (c *clusterStateHolder) Get() (*clusterState, error) {
- v := c.state.Load()
- if v != nil {
- state := v.(*clusterState)
- if time.Since(state.createdAt) > time.Minute {
- c.LazyReload()
- }
- return state, nil
- }
- return c.Reload()
-}
-
-func (c *clusterStateHolder) ReloadOrGet() (*clusterState, error) {
- state, err := c.Reload()
- if err == nil {
- return state, nil
- }
- return c.Get()
-}
-
-//------------------------------------------------------------------------------
-
-type clusterClient struct {
- opt *ClusterOptions
- nodes *clusterNodes
- state *clusterStateHolder //nolint:structcheck
- cmdsInfoCache *cmdsInfoCache //nolint:structcheck
-}
-
-// ClusterClient is a Redis Cluster client representing a pool of zero
-// or more underlying connections. It's safe for concurrent use by
-// multiple goroutines.
-type ClusterClient struct {
- *clusterClient
- cmdable
- hooks
- ctx context.Context
-}
-
-// NewClusterClient returns a Redis Cluster client as described in
-// http://redis.io/topics/cluster-spec.
-func NewClusterClient(opt *ClusterOptions) *ClusterClient {
- opt.init()
-
- c := &ClusterClient{
- clusterClient: &clusterClient{
- opt: opt,
- nodes: newClusterNodes(opt),
- },
- ctx: context.Background(),
- }
- c.state = newClusterStateHolder(c.loadState)
- c.cmdsInfoCache = newCmdsInfoCache(c.cmdsInfo)
- c.cmdable = c.Process
-
- if opt.IdleCheckFrequency > 0 {
- go c.reaper(opt.IdleCheckFrequency)
- }
-
- return c
-}
-
-func (c *ClusterClient) Context() context.Context {
- return c.ctx
-}
-
-func (c *ClusterClient) WithContext(ctx context.Context) *ClusterClient {
- if ctx == nil {
- panic("nil context")
- }
- clone := *c
- clone.cmdable = clone.Process
- clone.hooks.lock()
- clone.ctx = ctx
- return &clone
-}
-
-// Options returns read-only Options that were used to create the client.
-func (c *ClusterClient) Options() *ClusterOptions {
- return c.opt
-}
-
-// ReloadState reloads cluster state. If available it calls ClusterSlots func
-// to get cluster slots information.
-func (c *ClusterClient) ReloadState() error {
- _, err := c.state.Reload()
- return err
-}
-
-// Close closes the cluster client, releasing any open resources.
-//
-// It is rare to Close a ClusterClient, as the ClusterClient is meant
-// to be long-lived and shared between many goroutines.
-func (c *ClusterClient) Close() error {
- return c.nodes.Close()
-}
-
-// Do creates a Cmd from the args and processes the cmd.
-func (c *ClusterClient) Do(args ...interface{}) *Cmd {
- return c.DoContext(c.ctx, args...)
-}
-
-func (c *ClusterClient) DoContext(ctx context.Context, args ...interface{}) *Cmd {
- cmd := NewCmd(args...)
- _ = c.ProcessContext(ctx, cmd)
- return cmd
-}
-
-func (c *ClusterClient) Process(cmd Cmder) error {
- return c.ProcessContext(c.ctx, cmd)
-}
-
-func (c *ClusterClient) ProcessContext(ctx context.Context, cmd Cmder) error {
- return c.hooks.process(ctx, cmd, c.process)
-}
-
-func (c *ClusterClient) process(ctx context.Context, cmd Cmder) error {
- err := c._process(ctx, cmd)
- if err != nil {
- cmd.SetErr(err)
- return err
- }
- return nil
-}
-
-func (c *ClusterClient) _process(ctx context.Context, cmd Cmder) error {
- cmdInfo := c.cmdInfo(cmd.Name())
- slot := c.cmdSlot(cmd)
-
- var node *clusterNode
- var ask bool
- var lastErr error
- for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ {
- if attempt > 0 {
- if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil {
- return err
- }
- }
-
- if node == nil {
- var err error
- node, err = c.cmdNode(cmdInfo, slot)
- if err != nil {
- return err
- }
- }
-
- if ask {
- pipe := node.Client.Pipeline()
- _ = pipe.Process(NewCmd("asking"))
- _ = pipe.Process(cmd)
- _, lastErr = pipe.ExecContext(ctx)
- _ = pipe.Close()
- ask = false
- } else {
- lastErr = node.Client.ProcessContext(ctx, cmd)
- }
-
- // If there is no error - we are done.
- if lastErr == nil {
- return nil
- }
- if lastErr != Nil {
- c.state.LazyReload()
- }
- if lastErr == pool.ErrClosed || isReadOnlyError(lastErr) {
- node = nil
- continue
- }
-
- // If slave is loading - pick another node.
- if c.opt.ReadOnly && isLoadingError(lastErr) {
- node.MarkAsFailing()
- node = nil
- continue
- }
-
- var moved bool
- var addr string
- moved, ask, addr = isMovedError(lastErr)
- if moved || ask {
- var err error
- node, err = c.nodes.Get(addr)
- if err != nil {
- return err
- }
- continue
- }
-
- if isRetryableError(lastErr, cmd.readTimeout() == nil) {
- // First retry the same node.
- if attempt == 0 {
- continue
- }
-
- // Second try another node.
- node.MarkAsFailing()
- node = nil
- continue
- }
-
- return lastErr
- }
- return lastErr
-}
-
-// ForEachMaster concurrently calls the fn on each master node in the cluster.
-// It returns the first error if any.
-func (c *ClusterClient) ForEachMaster(fn func(client *Client) error) error {
- state, err := c.state.ReloadOrGet()
- if err != nil {
- return err
- }
-
- var wg sync.WaitGroup
- errCh := make(chan error, 1)
-
- for _, master := range state.Masters {
- wg.Add(1)
- go func(node *clusterNode) {
- defer wg.Done()
- err := fn(node.Client)
- if err != nil {
- select {
- case errCh <- err:
- default:
- }
- }
- }(master)
- }
-
- wg.Wait()
-
- select {
- case err := <-errCh:
- return err
- default:
- return nil
- }
-}
-
-// ForEachSlave concurrently calls the fn on each slave node in the cluster.
-// It returns the first error if any.
-func (c *ClusterClient) ForEachSlave(fn func(client *Client) error) error {
- state, err := c.state.ReloadOrGet()
- if err != nil {
- return err
- }
-
- var wg sync.WaitGroup
- errCh := make(chan error, 1)
-
- for _, slave := range state.Slaves {
- wg.Add(1)
- go func(node *clusterNode) {
- defer wg.Done()
- err := fn(node.Client)
- if err != nil {
- select {
- case errCh <- err:
- default:
- }
- }
- }(slave)
- }
-
- wg.Wait()
-
- select {
- case err := <-errCh:
- return err
- default:
- return nil
- }
-}
-
-// ForEachNode concurrently calls the fn on each known node in the cluster.
-// It returns the first error if any.
-func (c *ClusterClient) ForEachNode(fn func(client *Client) error) error {
- state, err := c.state.ReloadOrGet()
- if err != nil {
- return err
- }
-
- var wg sync.WaitGroup
- errCh := make(chan error, 1)
-
- worker := func(node *clusterNode) {
- defer wg.Done()
- err := fn(node.Client)
- if err != nil {
- select {
- case errCh <- err:
- default:
- }
- }
- }
-
- for _, node := range state.Masters {
- wg.Add(1)
- go worker(node)
- }
- for _, node := range state.Slaves {
- wg.Add(1)
- go worker(node)
- }
-
- wg.Wait()
-
- select {
- case err := <-errCh:
- return err
- default:
- return nil
- }
-}
-
-// PoolStats returns accumulated connection pool stats.
-func (c *ClusterClient) PoolStats() *PoolStats {
- var acc PoolStats
-
- state, _ := c.state.Get()
- if state == nil {
- return &acc
- }
-
- for _, node := range state.Masters {
- s := node.Client.connPool.Stats()
- acc.Hits += s.Hits
- acc.Misses += s.Misses
- acc.Timeouts += s.Timeouts
-
- acc.TotalConns += s.TotalConns
- acc.IdleConns += s.IdleConns
- acc.StaleConns += s.StaleConns
- }
-
- for _, node := range state.Slaves {
- s := node.Client.connPool.Stats()
- acc.Hits += s.Hits
- acc.Misses += s.Misses
- acc.Timeouts += s.Timeouts
-
- acc.TotalConns += s.TotalConns
- acc.IdleConns += s.IdleConns
- acc.StaleConns += s.StaleConns
- }
-
- return &acc
-}
-
-func (c *ClusterClient) loadState() (*clusterState, error) {
- if c.opt.ClusterSlots != nil {
- slots, err := c.opt.ClusterSlots()
- if err != nil {
- return nil, err
- }
- return newClusterState(c.nodes, slots, "")
- }
-
- addrs, err := c.nodes.Addrs()
- if err != nil {
- return nil, err
- }
-
- var firstErr error
- for _, addr := range addrs {
- node, err := c.nodes.Get(addr)
- if err != nil {
- if firstErr == nil {
- firstErr = err
- }
- continue
- }
-
- slots, err := node.Client.ClusterSlots().Result()
- if err != nil {
- if firstErr == nil {
- firstErr = err
- }
- continue
- }
-
- return newClusterState(c.nodes, slots, node.Client.opt.Addr)
- }
-
- return nil, firstErr
-}
-
-// reaper closes idle connections to the cluster.
-func (c *ClusterClient) reaper(idleCheckFrequency time.Duration) {
- ticker := time.NewTicker(idleCheckFrequency)
- defer ticker.Stop()
-
- for range ticker.C {
- nodes, err := c.nodes.All()
- if err != nil {
- break
- }
-
- for _, node := range nodes {
- _, err := node.Client.connPool.(*pool.ConnPool).ReapStaleConns()
- if err != nil {
- internal.Logger.Printf("ReapStaleConns failed: %s", err)
- }
- }
- }
-}
-
-func (c *ClusterClient) Pipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: c.processPipeline,
- }
- pipe.init()
- return &pipe
-}
-
-func (c *ClusterClient) Pipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.Pipeline().Pipelined(fn)
-}
-
-func (c *ClusterClient) processPipeline(ctx context.Context, cmds []Cmder) error {
- return c.hooks.processPipeline(ctx, cmds, c._processPipeline)
-}
-
-func (c *ClusterClient) _processPipeline(ctx context.Context, cmds []Cmder) error {
- cmdsMap := newCmdsMap()
- err := c.mapCmdsByNode(cmdsMap, cmds)
- if err != nil {
- setCmdsErr(cmds, err)
- return err
- }
-
- for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ {
- if attempt > 0 {
- if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil {
- setCmdsErr(cmds, err)
- return err
- }
- }
-
- failedCmds := newCmdsMap()
- var wg sync.WaitGroup
-
- for node, cmds := range cmdsMap.m {
- wg.Add(1)
- go func(node *clusterNode, cmds []Cmder) {
- defer wg.Done()
-
- err := c._processPipelineNode(ctx, node, cmds, failedCmds)
- if err == nil {
- return
- }
- if attempt < c.opt.MaxRedirects {
- if err := c.mapCmdsByNode(failedCmds, cmds); err != nil {
- setCmdsErr(cmds, err)
- }
- } else {
- setCmdsErr(cmds, err)
- }
- }(node, cmds)
- }
-
- wg.Wait()
- if len(failedCmds.m) == 0 {
- break
- }
- cmdsMap = failedCmds
- }
-
- return cmdsFirstErr(cmds)
-}
-
-func (c *ClusterClient) mapCmdsByNode(cmdsMap *cmdsMap, cmds []Cmder) error {
- state, err := c.state.Get()
- if err != nil {
- return err
- }
-
- if c.opt.ReadOnly && c.cmdsAreReadOnly(cmds) {
- for _, cmd := range cmds {
- slot := c.cmdSlot(cmd)
- node, err := c.slotReadOnlyNode(state, slot)
- if err != nil {
- return err
- }
- cmdsMap.Add(node, cmd)
- }
- return nil
- }
-
- for _, cmd := range cmds {
- slot := c.cmdSlot(cmd)
- node, err := state.slotMasterNode(slot)
- if err != nil {
- return err
- }
- cmdsMap.Add(node, cmd)
- }
- return nil
-}
-
-func (c *ClusterClient) cmdsAreReadOnly(cmds []Cmder) bool {
- for _, cmd := range cmds {
- cmdInfo := c.cmdInfo(cmd.Name())
- if cmdInfo == nil || !cmdInfo.ReadOnly {
- return false
- }
- }
- return true
-}
-
-func (c *ClusterClient) _processPipelineNode(
- ctx context.Context, node *clusterNode, cmds []Cmder, failedCmds *cmdsMap,
-) error {
- return node.Client.hooks.processPipeline(ctx, cmds, func(ctx context.Context, cmds []Cmder) error {
- return node.Client.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error {
- err := cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error {
- return writeCmds(wr, cmds)
- })
- if err != nil {
- return err
- }
-
- return cn.WithReader(ctx, c.opt.ReadTimeout, func(rd *proto.Reader) error {
- return c.pipelineReadCmds(node, rd, cmds, failedCmds)
- })
- })
- })
-}
-
-func (c *ClusterClient) pipelineReadCmds(
- node *clusterNode, rd *proto.Reader, cmds []Cmder, failedCmds *cmdsMap,
-) error {
- for _, cmd := range cmds {
- err := cmd.readReply(rd)
- if err == nil {
- continue
- }
- if c.checkMovedErr(cmd, err, failedCmds) {
- continue
- }
-
- if c.opt.ReadOnly && isLoadingError(err) {
- node.MarkAsFailing()
- return err
- }
- if isRedisError(err) {
- continue
- }
- return err
- }
- return nil
-}
-
-func (c *ClusterClient) checkMovedErr(
- cmd Cmder, err error, failedCmds *cmdsMap,
-) bool {
- moved, ask, addr := isMovedError(err)
- if !moved && !ask {
- return false
- }
-
- node, err := c.nodes.Get(addr)
- if err != nil {
- return false
- }
-
- if moved {
- c.state.LazyReload()
- failedCmds.Add(node, cmd)
- return true
- }
-
- if ask {
- failedCmds.Add(node, NewCmd("asking"), cmd)
- return true
- }
-
- panic("not reached")
-}
-
-// TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
-func (c *ClusterClient) TxPipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: c.processTxPipeline,
- }
- pipe.init()
- return &pipe
-}
-
-func (c *ClusterClient) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.TxPipeline().Pipelined(fn)
-}
-
-func (c *ClusterClient) processTxPipeline(ctx context.Context, cmds []Cmder) error {
- return c.hooks.processPipeline(ctx, cmds, c._processTxPipeline)
-}
-
-func (c *ClusterClient) _processTxPipeline(ctx context.Context, cmds []Cmder) error {
- state, err := c.state.Get()
- if err != nil {
- setCmdsErr(cmds, err)
- return err
- }
-
- cmdsMap := c.mapCmdsBySlot(cmds)
- for slot, cmds := range cmdsMap {
- node, err := state.slotMasterNode(slot)
- if err != nil {
- setCmdsErr(cmds, err)
- continue
- }
-
- cmdsMap := map[*clusterNode][]Cmder{node: cmds}
- for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ {
- if attempt > 0 {
- if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil {
- setCmdsErr(cmds, err)
- return err
- }
- }
-
- failedCmds := newCmdsMap()
- var wg sync.WaitGroup
-
- for node, cmds := range cmdsMap {
- wg.Add(1)
- go func(node *clusterNode, cmds []Cmder) {
- defer wg.Done()
-
- err := c._processTxPipelineNode(ctx, node, cmds, failedCmds)
- if err == nil {
- return
- }
- if attempt < c.opt.MaxRedirects {
- if err := c.mapCmdsByNode(failedCmds, cmds); err != nil {
- setCmdsErr(cmds, err)
- }
- } else {
- setCmdsErr(cmds, err)
- }
- }(node, cmds)
- }
-
- wg.Wait()
- if len(failedCmds.m) == 0 {
- break
- }
- cmdsMap = failedCmds.m
- }
- }
-
- return cmdsFirstErr(cmds)
-}
-
-func (c *ClusterClient) mapCmdsBySlot(cmds []Cmder) map[int][]Cmder {
- cmdsMap := make(map[int][]Cmder)
- for _, cmd := range cmds {
- slot := c.cmdSlot(cmd)
- cmdsMap[slot] = append(cmdsMap[slot], cmd)
- }
- return cmdsMap
-}
-
-func (c *ClusterClient) _processTxPipelineNode(
- ctx context.Context, node *clusterNode, cmds []Cmder, failedCmds *cmdsMap,
-) error {
- return node.Client.hooks.processTxPipeline(ctx, cmds, func(ctx context.Context, cmds []Cmder) error {
- return node.Client.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error {
- err := cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error {
- return writeCmds(wr, cmds)
- })
- if err != nil {
- return err
- }
-
- return cn.WithReader(ctx, c.opt.ReadTimeout, func(rd *proto.Reader) error {
- statusCmd := cmds[0].(*StatusCmd)
- // Trim multi and exec.
- cmds = cmds[1 : len(cmds)-1]
-
- err := c.txPipelineReadQueued(rd, statusCmd, cmds, failedCmds)
- if err != nil {
- moved, ask, addr := isMovedError(err)
- if moved || ask {
- return c.cmdsMoved(cmds, moved, ask, addr, failedCmds)
- }
- return err
- }
-
- return pipelineReadCmds(rd, cmds)
- })
- })
- })
-}
-
-func (c *ClusterClient) txPipelineReadQueued(
- rd *proto.Reader, statusCmd *StatusCmd, cmds []Cmder, failedCmds *cmdsMap,
-) error {
- // Parse queued replies.
- if err := statusCmd.readReply(rd); err != nil {
- return err
- }
-
- for _, cmd := range cmds {
- err := statusCmd.readReply(rd)
- if err == nil || c.checkMovedErr(cmd, err, failedCmds) || isRedisError(err) {
- continue
- }
- return err
- }
-
- // Parse number of replies.
- line, err := rd.ReadLine()
- if err != nil {
- if err == Nil {
- err = TxFailedErr
- }
- return err
- }
-
- switch line[0] {
- case proto.ErrorReply:
- return proto.ParseErrorReply(line)
- case proto.ArrayReply:
- // ok
- default:
- return fmt.Errorf("redis: expected '*', but got line %q", line)
- }
-
- return nil
-}
-
-func (c *ClusterClient) cmdsMoved(
- cmds []Cmder, moved, ask bool, addr string, failedCmds *cmdsMap,
-) error {
- node, err := c.nodes.Get(addr)
- if err != nil {
- return err
- }
-
- if moved {
- c.state.LazyReload()
- for _, cmd := range cmds {
- failedCmds.Add(node, cmd)
- }
- return nil
- }
-
- if ask {
- for _, cmd := range cmds {
- failedCmds.Add(node, NewCmd("asking"), cmd)
- }
- return nil
- }
-
- return nil
-}
-
-func (c *ClusterClient) Watch(fn func(*Tx) error, keys ...string) error {
- return c.WatchContext(c.ctx, fn, keys...)
-}
-
-func (c *ClusterClient) WatchContext(ctx context.Context, fn func(*Tx) error, keys ...string) error {
- if len(keys) == 0 {
- return fmt.Errorf("redis: Watch requires at least one key")
- }
-
- slot := hashtag.Slot(keys[0])
- for _, key := range keys[1:] {
- if hashtag.Slot(key) != slot {
- err := fmt.Errorf("redis: Watch requires all keys to be in the same slot")
- return err
- }
- }
-
- node, err := c.slotMasterNode(slot)
- if err != nil {
- return err
- }
-
- for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ {
- if attempt > 0 {
- if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil {
- return err
- }
- }
-
- err = node.Client.WatchContext(ctx, fn, keys...)
- if err == nil {
- break
- }
- if err != Nil {
- c.state.LazyReload()
- }
-
- moved, ask, addr := isMovedError(err)
- if moved || ask {
- node, err = c.nodes.Get(addr)
- if err != nil {
- return err
- }
- continue
- }
-
- if err == pool.ErrClosed || isReadOnlyError(err) {
- node, err = c.slotMasterNode(slot)
- if err != nil {
- return err
- }
- continue
- }
-
- if isRetryableError(err, true) {
- continue
- }
-
- return err
- }
-
- return err
-}
-
-func (c *ClusterClient) pubSub() *PubSub {
- var node *clusterNode
- pubsub := &PubSub{
- opt: c.opt.clientOptions(),
-
- newConn: func(channels []string) (*pool.Conn, error) {
- if node != nil {
- panic("node != nil")
- }
-
- var err error
- if len(channels) > 0 {
- slot := hashtag.Slot(channels[0])
- node, err = c.slotMasterNode(slot)
- } else {
- node, err = c.nodes.Random()
- }
- if err != nil {
- return nil, err
- }
-
- cn, err := node.Client.newConn(context.TODO())
- if err != nil {
- node = nil
-
- return nil, err
- }
-
- return cn, nil
- },
- closeConn: func(cn *pool.Conn) error {
- err := node.Client.connPool.CloseConn(cn)
- node = nil
- return err
- },
- }
- pubsub.init()
-
- return pubsub
-}
-
-// Subscribe subscribes the client to the specified channels.
-// Channels can be omitted to create empty subscription.
-func (c *ClusterClient) Subscribe(channels ...string) *PubSub {
- pubsub := c.pubSub()
- if len(channels) > 0 {
- _ = pubsub.Subscribe(channels...)
- }
- return pubsub
-}
-
-// PSubscribe subscribes the client to the given patterns.
-// Patterns can be omitted to create empty subscription.
-func (c *ClusterClient) PSubscribe(channels ...string) *PubSub {
- pubsub := c.pubSub()
- if len(channels) > 0 {
- _ = pubsub.PSubscribe(channels...)
- }
- return pubsub
-}
-
-func (c *ClusterClient) retryBackoff(attempt int) time.Duration {
- return internal.RetryBackoff(attempt, c.opt.MinRetryBackoff, c.opt.MaxRetryBackoff)
-}
-
-func (c *ClusterClient) cmdsInfo() (map[string]*CommandInfo, error) {
- addrs, err := c.nodes.Addrs()
- if err != nil {
- return nil, err
- }
-
- var firstErr error
- for _, addr := range addrs {
- node, err := c.nodes.Get(addr)
- if err != nil {
- return nil, err
- }
- if node == nil {
- continue
- }
-
- info, err := node.Client.Command().Result()
- if err == nil {
- return info, nil
- }
- if firstErr == nil {
- firstErr = err
- }
- }
- return nil, firstErr
-}
-
-func (c *ClusterClient) cmdInfo(name string) *CommandInfo {
- cmdsInfo, err := c.cmdsInfoCache.Get()
- if err != nil {
- return nil
- }
-
- info := cmdsInfo[name]
- if info == nil {
- internal.Logger.Printf("info for cmd=%s not found", name)
- }
- return info
-}
-
-func (c *ClusterClient) cmdSlot(cmd Cmder) int {
- args := cmd.Args()
- if args[0] == "cluster" && args[1] == "getkeysinslot" {
- return args[2].(int)
- }
-
- cmdInfo := c.cmdInfo(cmd.Name())
- return cmdSlot(cmd, cmdFirstKeyPos(cmd, cmdInfo))
-}
-
-func cmdSlot(cmd Cmder, pos int) int {
- if pos == 0 {
- return hashtag.RandomSlot()
- }
- firstKey := cmd.stringArg(pos)
- return hashtag.Slot(firstKey)
-}
-
-func (c *ClusterClient) cmdNode(cmdInfo *CommandInfo, slot int) (*clusterNode, error) {
- state, err := c.state.Get()
- if err != nil {
- return nil, err
- }
-
- if c.opt.ReadOnly && cmdInfo != nil && cmdInfo.ReadOnly {
- return c.slotReadOnlyNode(state, slot)
- }
- return state.slotMasterNode(slot)
-}
-
-func (c *clusterClient) slotReadOnlyNode(state *clusterState, slot int) (*clusterNode, error) {
- if c.opt.RouteByLatency {
- return state.slotClosestNode(slot)
- }
- if c.opt.RouteRandomly {
- return state.slotRandomNode(slot)
- }
- return state.slotSlaveNode(slot)
-}
-
-func (c *ClusterClient) slotMasterNode(slot int) (*clusterNode, error) {
- state, err := c.state.Get()
- if err != nil {
- return nil, err
- }
- return state.slotMasterNode(slot)
-}
-
-func appendUniqueNode(nodes []*clusterNode, node *clusterNode) []*clusterNode {
- for _, n := range nodes {
- if n == node {
- return nodes
- }
- }
- return append(nodes, node)
-}
-
-func appendIfNotExists(ss []string, es ...string) []string {
-loop:
- for _, e := range es {
- for _, s := range ss {
- if s == e {
- continue loop
- }
- }
- ss = append(ss, e)
- }
- return ss
-}
-
-func remove(ss []string, es ...string) []string {
- if len(es) == 0 {
- return ss[:0]
- }
- for _, e := range es {
- for i, s := range ss {
- if s == e {
- ss = append(ss[:i], ss[i+1:]...)
- break
- }
- }
- }
- return ss
-}
-
-//------------------------------------------------------------------------------
-
-type cmdsMap struct {
- mu sync.Mutex
- m map[*clusterNode][]Cmder
-}
-
-func newCmdsMap() *cmdsMap {
- return &cmdsMap{
- m: make(map[*clusterNode][]Cmder),
- }
-}
-
-func (m *cmdsMap) Add(node *clusterNode, cmds ...Cmder) {
- m.mu.Lock()
- m.m[node] = append(m.m[node], cmds...)
- m.mu.Unlock()
-}
diff --git a/vendor/github.com/go-redis/redis/v7/cluster_commands.go b/vendor/github.com/go-redis/redis/v7/cluster_commands.go
deleted file mode 100644
index c9b9b9de2..000000000
--- a/vendor/github.com/go-redis/redis/v7/cluster_commands.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package redis
-
-import "sync/atomic"
-
-func (c *ClusterClient) DBSize() *IntCmd {
- cmd := NewIntCmd("dbsize")
- var size int64
- err := c.ForEachMaster(func(master *Client) error {
- n, err := master.DBSize().Result()
- if err != nil {
- return err
- }
- atomic.AddInt64(&size, n)
- return nil
- })
- if err != nil {
- cmd.SetErr(err)
- return cmd
- }
- cmd.val = size
- return cmd
-}
diff --git a/vendor/github.com/go-redis/redis/v7/command.go b/vendor/github.com/go-redis/redis/v7/command.go
deleted file mode 100644
index dd7fe4a91..000000000
--- a/vendor/github.com/go-redis/redis/v7/command.go
+++ /dev/null
@@ -1,2064 +0,0 @@
-package redis
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
- "time"
-
- "github.com/go-redis/redis/v7/internal"
- "github.com/go-redis/redis/v7/internal/proto"
- "github.com/go-redis/redis/v7/internal/util"
-)
-
-type Cmder interface {
- Name() string
- Args() []interface{}
- String() string
- stringArg(int) string
-
- readTimeout() *time.Duration
- readReply(rd *proto.Reader) error
-
- SetErr(error)
- Err() error
-}
-
-func setCmdsErr(cmds []Cmder, e error) {
- for _, cmd := range cmds {
- if cmd.Err() == nil {
- cmd.SetErr(e)
- }
- }
-}
-
-func cmdsFirstErr(cmds []Cmder) error {
- for _, cmd := range cmds {
- if err := cmd.Err(); err != nil {
- return err
- }
- }
- return nil
-}
-
-func writeCmds(wr *proto.Writer, cmds []Cmder) error {
- for _, cmd := range cmds {
- if err := writeCmd(wr, cmd); err != nil {
- return err
- }
- }
- return nil
-}
-
-func writeCmd(wr *proto.Writer, cmd Cmder) error {
- return wr.WriteArgs(cmd.Args())
-}
-
-func cmdString(cmd Cmder, val interface{}) string {
- ss := make([]string, 0, len(cmd.Args()))
- for _, arg := range cmd.Args() {
- ss = append(ss, fmt.Sprint(arg))
- }
- s := strings.Join(ss, " ")
- if err := cmd.Err(); err != nil {
- return s + ": " + err.Error()
- }
- if val != nil {
- switch vv := val.(type) {
- case []byte:
- return s + ": " + string(vv)
- default:
- return s + ": " + fmt.Sprint(val)
- }
- }
- return s
-}
-
-func cmdFirstKeyPos(cmd Cmder, info *CommandInfo) int {
- switch cmd.Name() {
- case "eval", "evalsha":
- if cmd.stringArg(2) != "0" {
- return 3
- }
-
- return 0
- case "publish":
- return 1
- }
- if info == nil {
- return 0
- }
- return int(info.FirstKeyPos)
-}
-
-//------------------------------------------------------------------------------
-
-type baseCmd struct {
- args []interface{}
- err error
-
- _readTimeout *time.Duration
-}
-
-var _ Cmder = (*Cmd)(nil)
-
-func (cmd *baseCmd) Name() string {
- if len(cmd.args) == 0 {
- return ""
- }
- // Cmd name must be lower cased.
- return internal.ToLower(cmd.stringArg(0))
-}
-
-func (cmd *baseCmd) Args() []interface{} {
- return cmd.args
-}
-
-func (cmd *baseCmd) stringArg(pos int) string {
- if pos < 0 || pos >= len(cmd.args) {
- return ""
- }
- s, _ := cmd.args[pos].(string)
- return s
-}
-
-func (cmd *baseCmd) SetErr(e error) {
- cmd.err = e
-}
-
-func (cmd *baseCmd) Err() error {
- return cmd.err
-}
-
-func (cmd *baseCmd) readTimeout() *time.Duration {
- return cmd._readTimeout
-}
-
-func (cmd *baseCmd) setReadTimeout(d time.Duration) {
- cmd._readTimeout = &d
-}
-
-//------------------------------------------------------------------------------
-
-type Cmd struct {
- baseCmd
-
- val interface{}
-}
-
-func NewCmd(args ...interface{}) *Cmd {
- return &Cmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *Cmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *Cmd) Val() interface{} {
- return cmd.val
-}
-
-func (cmd *Cmd) Result() (interface{}, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *Cmd) Text() (string, error) {
- if cmd.err != nil {
- return "", cmd.err
- }
- switch val := cmd.val.(type) {
- case string:
- return val, nil
- default:
- err := fmt.Errorf("redis: unexpected type=%T for String", val)
- return "", err
- }
-}
-
-func (cmd *Cmd) Int() (int, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- switch val := cmd.val.(type) {
- case int64:
- return int(val), nil
- case string:
- return strconv.Atoi(val)
- default:
- err := fmt.Errorf("redis: unexpected type=%T for Int", val)
- return 0, err
- }
-}
-
-func (cmd *Cmd) Int64() (int64, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- switch val := cmd.val.(type) {
- case int64:
- return val, nil
- case string:
- return strconv.ParseInt(val, 10, 64)
- default:
- err := fmt.Errorf("redis: unexpected type=%T for Int64", val)
- return 0, err
- }
-}
-
-func (cmd *Cmd) Uint64() (uint64, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- switch val := cmd.val.(type) {
- case int64:
- return uint64(val), nil
- case string:
- return strconv.ParseUint(val, 10, 64)
- default:
- err := fmt.Errorf("redis: unexpected type=%T for Uint64", val)
- return 0, err
- }
-}
-
-func (cmd *Cmd) Float32() (float32, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- switch val := cmd.val.(type) {
- case int64:
- return float32(val), nil
- case string:
- f, err := strconv.ParseFloat(val, 32)
- if err != nil {
- return 0, err
- }
- return float32(f), nil
- default:
- err := fmt.Errorf("redis: unexpected type=%T for Float32", val)
- return 0, err
- }
-}
-
-func (cmd *Cmd) Float64() (float64, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- switch val := cmd.val.(type) {
- case int64:
- return float64(val), nil
- case string:
- return strconv.ParseFloat(val, 64)
- default:
- err := fmt.Errorf("redis: unexpected type=%T for Float64", val)
- return 0, err
- }
-}
-
-func (cmd *Cmd) Bool() (bool, error) {
- if cmd.err != nil {
- return false, cmd.err
- }
- switch val := cmd.val.(type) {
- case int64:
- return val != 0, nil
- case string:
- return strconv.ParseBool(val)
- default:
- err := fmt.Errorf("redis: unexpected type=%T for Bool", val)
- return false, err
- }
-}
-
-func (cmd *Cmd) readReply(rd *proto.Reader) error {
- cmd.val, cmd.err = rd.ReadReply(sliceParser)
- return cmd.err
-}
-
-// Implements proto.MultiBulkParse
-func sliceParser(rd *proto.Reader, n int64) (interface{}, error) {
- vals := make([]interface{}, n)
- for i := 0; i < len(vals); i++ {
- v, err := rd.ReadReply(sliceParser)
- if err != nil {
- if err == Nil {
- vals[i] = nil
- continue
- }
- if err, ok := err.(proto.RedisError); ok {
- vals[i] = err
- continue
- }
- return nil, err
- }
- vals[i] = v
- }
- return vals, nil
-}
-
-//------------------------------------------------------------------------------
-
-type SliceCmd struct {
- baseCmd
-
- val []interface{}
-}
-
-var _ Cmder = (*SliceCmd)(nil)
-
-func NewSliceCmd(args ...interface{}) *SliceCmd {
- return &SliceCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *SliceCmd) Val() []interface{} {
- return cmd.val
-}
-
-func (cmd *SliceCmd) Result() ([]interface{}, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *SliceCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *SliceCmd) readReply(rd *proto.Reader) error {
- var v interface{}
- v, cmd.err = rd.ReadArrayReply(sliceParser)
- if cmd.err != nil {
- return cmd.err
- }
- cmd.val = v.([]interface{})
- return nil
-}
-
-//------------------------------------------------------------------------------
-
-type StatusCmd struct {
- baseCmd
-
- val string
-}
-
-var _ Cmder = (*StatusCmd)(nil)
-
-func NewStatusCmd(args ...interface{}) *StatusCmd {
- return &StatusCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *StatusCmd) Val() string {
- return cmd.val
-}
-
-func (cmd *StatusCmd) Result() (string, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *StatusCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *StatusCmd) readReply(rd *proto.Reader) error {
- cmd.val, cmd.err = rd.ReadString()
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type IntCmd struct {
- baseCmd
-
- val int64
-}
-
-var _ Cmder = (*IntCmd)(nil)
-
-func NewIntCmd(args ...interface{}) *IntCmd {
- return &IntCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *IntCmd) Val() int64 {
- return cmd.val
-}
-
-func (cmd *IntCmd) Result() (int64, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *IntCmd) Uint64() (uint64, error) {
- return uint64(cmd.val), cmd.err
-}
-
-func (cmd *IntCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *IntCmd) readReply(rd *proto.Reader) error {
- cmd.val, cmd.err = rd.ReadIntReply()
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type IntSliceCmd struct {
- baseCmd
-
- val []int64
-}
-
-var _ Cmder = (*IntSliceCmd)(nil)
-
-func NewIntSliceCmd(args ...interface{}) *IntSliceCmd {
- return &IntSliceCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *IntSliceCmd) Val() []int64 {
- return cmd.val
-}
-
-func (cmd *IntSliceCmd) Result() ([]int64, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *IntSliceCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *IntSliceCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make([]int64, n)
- for i := 0; i < len(cmd.val); i++ {
- num, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
- cmd.val[i] = num
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type DurationCmd struct {
- baseCmd
-
- val time.Duration
- precision time.Duration
-}
-
-var _ Cmder = (*DurationCmd)(nil)
-
-func NewDurationCmd(precision time.Duration, args ...interface{}) *DurationCmd {
- return &DurationCmd{
- baseCmd: baseCmd{args: args},
- precision: precision,
- }
-}
-
-func (cmd *DurationCmd) Val() time.Duration {
- return cmd.val
-}
-
-func (cmd *DurationCmd) Result() (time.Duration, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *DurationCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *DurationCmd) readReply(rd *proto.Reader) error {
- var n int64
- n, cmd.err = rd.ReadIntReply()
- if cmd.err != nil {
- return cmd.err
- }
- switch n {
- // -2 if the key does not exist
- // -1 if the key exists but has no associated expire
- case -2, -1:
- cmd.val = time.Duration(n)
- default:
- cmd.val = time.Duration(n) * cmd.precision
- }
- return nil
-}
-
-//------------------------------------------------------------------------------
-
-type TimeCmd struct {
- baseCmd
-
- val time.Time
-}
-
-var _ Cmder = (*TimeCmd)(nil)
-
-func NewTimeCmd(args ...interface{}) *TimeCmd {
- return &TimeCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *TimeCmd) Val() time.Time {
- return cmd.val
-}
-
-func (cmd *TimeCmd) Result() (time.Time, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *TimeCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *TimeCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- if n != 2 {
- return nil, fmt.Errorf("got %d elements, expected 2", n)
- }
-
- sec, err := rd.ReadInt()
- if err != nil {
- return nil, err
- }
-
- microsec, err := rd.ReadInt()
- if err != nil {
- return nil, err
- }
-
- cmd.val = time.Unix(sec, microsec*1000)
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type BoolCmd struct {
- baseCmd
-
- val bool
-}
-
-var _ Cmder = (*BoolCmd)(nil)
-
-func NewBoolCmd(args ...interface{}) *BoolCmd {
- return &BoolCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *BoolCmd) Val() bool {
- return cmd.val
-}
-
-func (cmd *BoolCmd) Result() (bool, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *BoolCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *BoolCmd) readReply(rd *proto.Reader) error {
- var v interface{}
- v, cmd.err = rd.ReadReply(nil)
- // `SET key value NX` returns nil when key already exists. But
- // `SETNX key value` returns bool (0/1). So convert nil to bool.
- if cmd.err == Nil {
- cmd.val = false
- cmd.err = nil
- return nil
- }
- if cmd.err != nil {
- return cmd.err
- }
- switch v := v.(type) {
- case int64:
- cmd.val = v == 1
- return nil
- case string:
- cmd.val = v == "OK"
- return nil
- default:
- cmd.err = fmt.Errorf("got %T, wanted int64 or string", v)
- return cmd.err
- }
-}
-
-//------------------------------------------------------------------------------
-
-type StringCmd struct {
- baseCmd
-
- val string
-}
-
-var _ Cmder = (*StringCmd)(nil)
-
-func NewStringCmd(args ...interface{}) *StringCmd {
- return &StringCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *StringCmd) Val() string {
- return cmd.val
-}
-
-func (cmd *StringCmd) Result() (string, error) {
- return cmd.Val(), cmd.err
-}
-
-func (cmd *StringCmd) Bytes() ([]byte, error) {
- return util.StringToBytes(cmd.val), cmd.err
-}
-
-func (cmd *StringCmd) Int() (int, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- return strconv.Atoi(cmd.Val())
-}
-
-func (cmd *StringCmd) Int64() (int64, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- return strconv.ParseInt(cmd.Val(), 10, 64)
-}
-
-func (cmd *StringCmd) Uint64() (uint64, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- return strconv.ParseUint(cmd.Val(), 10, 64)
-}
-
-func (cmd *StringCmd) Float32() (float32, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- f, err := strconv.ParseFloat(cmd.Val(), 32)
- if err != nil {
- return 0, err
- }
- return float32(f), nil
-}
-
-func (cmd *StringCmd) Float64() (float64, error) {
- if cmd.err != nil {
- return 0, cmd.err
- }
- return strconv.ParseFloat(cmd.Val(), 64)
-}
-
-func (cmd *StringCmd) Time() (time.Time, error) {
- if cmd.err != nil {
- return time.Time{}, cmd.err
- }
- return time.Parse(time.RFC3339Nano, cmd.Val())
-}
-
-func (cmd *StringCmd) Scan(val interface{}) error {
- if cmd.err != nil {
- return cmd.err
- }
- return proto.Scan([]byte(cmd.val), val)
-}
-
-func (cmd *StringCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *StringCmd) readReply(rd *proto.Reader) error {
- cmd.val, cmd.err = rd.ReadString()
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type FloatCmd struct {
- baseCmd
-
- val float64
-}
-
-var _ Cmder = (*FloatCmd)(nil)
-
-func NewFloatCmd(args ...interface{}) *FloatCmd {
- return &FloatCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *FloatCmd) Val() float64 {
- return cmd.val
-}
-
-func (cmd *FloatCmd) Result() (float64, error) {
- return cmd.Val(), cmd.Err()
-}
-
-func (cmd *FloatCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *FloatCmd) readReply(rd *proto.Reader) error {
- cmd.val, cmd.err = rd.ReadFloatReply()
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type StringSliceCmd struct {
- baseCmd
-
- val []string
-}
-
-var _ Cmder = (*StringSliceCmd)(nil)
-
-func NewStringSliceCmd(args ...interface{}) *StringSliceCmd {
- return &StringSliceCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *StringSliceCmd) Val() []string {
- return cmd.val
-}
-
-func (cmd *StringSliceCmd) Result() ([]string, error) {
- return cmd.Val(), cmd.Err()
-}
-
-func (cmd *StringSliceCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *StringSliceCmd) ScanSlice(container interface{}) error {
- return proto.ScanSlice(cmd.Val(), container)
-}
-
-func (cmd *StringSliceCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make([]string, n)
- for i := 0; i < len(cmd.val); i++ {
- switch s, err := rd.ReadString(); {
- case err == Nil:
- cmd.val[i] = ""
- case err != nil:
- return nil, err
- default:
- cmd.val[i] = s
- }
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type BoolSliceCmd struct {
- baseCmd
-
- val []bool
-}
-
-var _ Cmder = (*BoolSliceCmd)(nil)
-
-func NewBoolSliceCmd(args ...interface{}) *BoolSliceCmd {
- return &BoolSliceCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *BoolSliceCmd) Val() []bool {
- return cmd.val
-}
-
-func (cmd *BoolSliceCmd) Result() ([]bool, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *BoolSliceCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *BoolSliceCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make([]bool, n)
- for i := 0; i < len(cmd.val); i++ {
- n, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
- cmd.val[i] = n == 1
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type StringStringMapCmd struct {
- baseCmd
-
- val map[string]string
-}
-
-var _ Cmder = (*StringStringMapCmd)(nil)
-
-func NewStringStringMapCmd(args ...interface{}) *StringStringMapCmd {
- return &StringStringMapCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *StringStringMapCmd) Val() map[string]string {
- return cmd.val
-}
-
-func (cmd *StringStringMapCmd) Result() (map[string]string, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *StringStringMapCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *StringStringMapCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make(map[string]string, n/2)
- for i := int64(0); i < n; i += 2 {
- key, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- value, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- cmd.val[key] = value
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type StringIntMapCmd struct {
- baseCmd
-
- val map[string]int64
-}
-
-var _ Cmder = (*StringIntMapCmd)(nil)
-
-func NewStringIntMapCmd(args ...interface{}) *StringIntMapCmd {
- return &StringIntMapCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *StringIntMapCmd) Val() map[string]int64 {
- return cmd.val
-}
-
-func (cmd *StringIntMapCmd) Result() (map[string]int64, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *StringIntMapCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *StringIntMapCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make(map[string]int64, n/2)
- for i := int64(0); i < n; i += 2 {
- key, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- n, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
-
- cmd.val[key] = n
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type StringStructMapCmd struct {
- baseCmd
-
- val map[string]struct{}
-}
-
-var _ Cmder = (*StringStructMapCmd)(nil)
-
-func NewStringStructMapCmd(args ...interface{}) *StringStructMapCmd {
- return &StringStructMapCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *StringStructMapCmd) Val() map[string]struct{} {
- return cmd.val
-}
-
-func (cmd *StringStructMapCmd) Result() (map[string]struct{}, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *StringStructMapCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *StringStructMapCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make(map[string]struct{}, n)
- for i := int64(0); i < n; i++ {
- key, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
- cmd.val[key] = struct{}{}
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type XMessage struct {
- ID string
- Values map[string]interface{}
-}
-
-type XMessageSliceCmd struct {
- baseCmd
-
- val []XMessage
-}
-
-var _ Cmder = (*XMessageSliceCmd)(nil)
-
-func NewXMessageSliceCmd(args ...interface{}) *XMessageSliceCmd {
- return &XMessageSliceCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *XMessageSliceCmd) Val() []XMessage {
- return cmd.val
-}
-
-func (cmd *XMessageSliceCmd) Result() ([]XMessage, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *XMessageSliceCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *XMessageSliceCmd) readReply(rd *proto.Reader) error {
- var v interface{}
- v, cmd.err = rd.ReadArrayReply(xMessageSliceParser)
- if cmd.err != nil {
- return cmd.err
- }
- cmd.val = v.([]XMessage)
- return nil
-}
-
-// Implements proto.MultiBulkParse
-func xMessageSliceParser(rd *proto.Reader, n int64) (interface{}, error) {
- msgs := make([]XMessage, n)
- for i := 0; i < len(msgs); i++ {
- i := i
- _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- id, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- var values map[string]interface{}
-
- v, err := rd.ReadArrayReply(stringInterfaceMapParser)
- if err != nil {
- if err != proto.Nil {
- return nil, err
- }
- } else {
- values = v.(map[string]interface{})
- }
-
- msgs[i] = XMessage{
- ID: id,
- Values: values,
- }
- return nil, nil
- })
- if err != nil {
- return nil, err
- }
- }
- return msgs, nil
-}
-
-// Implements proto.MultiBulkParse
-func stringInterfaceMapParser(rd *proto.Reader, n int64) (interface{}, error) {
- m := make(map[string]interface{}, n/2)
- for i := int64(0); i < n; i += 2 {
- key, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- value, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- m[key] = value
- }
- return m, nil
-}
-
-//------------------------------------------------------------------------------
-
-type XStream struct {
- Stream string
- Messages []XMessage
-}
-
-type XStreamSliceCmd struct {
- baseCmd
-
- val []XStream
-}
-
-var _ Cmder = (*XStreamSliceCmd)(nil)
-
-func NewXStreamSliceCmd(args ...interface{}) *XStreamSliceCmd {
- return &XStreamSliceCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *XStreamSliceCmd) Val() []XStream {
- return cmd.val
-}
-
-func (cmd *XStreamSliceCmd) Result() ([]XStream, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *XStreamSliceCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *XStreamSliceCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make([]XStream, n)
- for i := 0; i < len(cmd.val); i++ {
- i := i
- _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- if n != 2 {
- return nil, fmt.Errorf("got %d, wanted 2", n)
- }
-
- stream, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- v, err := rd.ReadArrayReply(xMessageSliceParser)
- if err != nil {
- return nil, err
- }
-
- cmd.val[i] = XStream{
- Stream: stream,
- Messages: v.([]XMessage),
- }
- return nil, nil
- })
- if err != nil {
- return nil, err
- }
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type XPending struct {
- Count int64
- Lower string
- Higher string
- Consumers map[string]int64
-}
-
-type XPendingCmd struct {
- baseCmd
- val *XPending
-}
-
-var _ Cmder = (*XPendingCmd)(nil)
-
-func NewXPendingCmd(args ...interface{}) *XPendingCmd {
- return &XPendingCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *XPendingCmd) Val() *XPending {
- return cmd.val
-}
-
-func (cmd *XPendingCmd) Result() (*XPending, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *XPendingCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *XPendingCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- if n != 4 {
- return nil, fmt.Errorf("got %d, wanted 4", n)
- }
-
- count, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
-
- lower, err := rd.ReadString()
- if err != nil && err != Nil {
- return nil, err
- }
-
- higher, err := rd.ReadString()
- if err != nil && err != Nil {
- return nil, err
- }
-
- cmd.val = &XPending{
- Count: count,
- Lower: lower,
- Higher: higher,
- }
- _, err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- for i := int64(0); i < n; i++ {
- _, err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- if n != 2 {
- return nil, fmt.Errorf("got %d, wanted 2", n)
- }
-
- consumerName, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- consumerPending, err := rd.ReadInt()
- if err != nil {
- return nil, err
- }
-
- if cmd.val.Consumers == nil {
- cmd.val.Consumers = make(map[string]int64)
- }
- cmd.val.Consumers[consumerName] = consumerPending
-
- return nil, nil
- })
- if err != nil {
- return nil, err
- }
- }
- return nil, nil
- })
- if err != nil && err != Nil {
- return nil, err
- }
-
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type XPendingExt struct {
- ID string
- Consumer string
- Idle time.Duration
- RetryCount int64
-}
-
-type XPendingExtCmd struct {
- baseCmd
- val []XPendingExt
-}
-
-var _ Cmder = (*XPendingExtCmd)(nil)
-
-func NewXPendingExtCmd(args ...interface{}) *XPendingExtCmd {
- return &XPendingExtCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *XPendingExtCmd) Val() []XPendingExt {
- return cmd.val
-}
-
-func (cmd *XPendingExtCmd) Result() ([]XPendingExt, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *XPendingExtCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *XPendingExtCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make([]XPendingExt, 0, n)
- for i := int64(0); i < n; i++ {
- _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- if n != 4 {
- return nil, fmt.Errorf("got %d, wanted 4", n)
- }
-
- id, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- consumer, err := rd.ReadString()
- if err != nil && err != Nil {
- return nil, err
- }
-
- idle, err := rd.ReadIntReply()
- if err != nil && err != Nil {
- return nil, err
- }
-
- retryCount, err := rd.ReadIntReply()
- if err != nil && err != Nil {
- return nil, err
- }
-
- cmd.val = append(cmd.val, XPendingExt{
- ID: id,
- Consumer: consumer,
- Idle: time.Duration(idle) * time.Millisecond,
- RetryCount: retryCount,
- })
- return nil, nil
- })
- if err != nil {
- return nil, err
- }
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type XInfoGroupsCmd struct {
- baseCmd
- val []XInfoGroups
-}
-
-type XInfoGroups struct {
- Name string
- Consumers int64
- Pending int64
- LastDeliveredID string
-}
-
-var _ Cmder = (*XInfoGroupsCmd)(nil)
-
-func NewXInfoGroupsCmd(stream string) *XInfoGroupsCmd {
- return &XInfoGroupsCmd{
- baseCmd: baseCmd{args: []interface{}{"xinfo", "groups", stream}},
- }
-}
-
-func (cmd *XInfoGroupsCmd) Val() []XInfoGroups {
- return cmd.val
-}
-
-func (cmd *XInfoGroupsCmd) Result() ([]XInfoGroups, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *XInfoGroupsCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *XInfoGroupsCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(
- func(rd *proto.Reader, n int64) (interface{}, error) {
- for i := int64(0); i < n; i++ {
- v, err := rd.ReadReply(xGroupInfoParser)
- if err != nil {
- return nil, err
- }
- cmd.val = append(cmd.val, v.(XInfoGroups))
- }
- return nil, nil
- })
- return nil
-}
-
-func xGroupInfoParser(rd *proto.Reader, n int64) (interface{}, error) {
- if n != 8 {
- return nil, fmt.Errorf("redis: got %d elements in XINFO GROUPS reply,"+
- "wanted 8", n)
- }
- var (
- err error
- grp XInfoGroups
- key string
- val string
- )
-
- for i := 0; i < 4; i++ {
- key, err = rd.ReadString()
- if err != nil {
- return nil, err
- }
- val, err = rd.ReadString()
- if err != nil {
- return nil, err
- }
- switch key {
- case "name":
- grp.Name = val
- case "consumers":
- grp.Consumers, err = strconv.ParseInt(val, 0, 64)
- case "pending":
- grp.Pending, err = strconv.ParseInt(val, 0, 64)
- case "last-delivered-id":
- grp.LastDeliveredID = val
- default:
- return nil, fmt.Errorf("redis: unexpected content %s "+
- "in XINFO GROUPS reply", key)
- }
- if err != nil {
- return nil, err
- }
- }
- return grp, err
-}
-
-//------------------------------------------------------------------------------
-
-type ZSliceCmd struct {
- baseCmd
-
- val []Z
-}
-
-var _ Cmder = (*ZSliceCmd)(nil)
-
-func NewZSliceCmd(args ...interface{}) *ZSliceCmd {
- return &ZSliceCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *ZSliceCmd) Val() []Z {
- return cmd.val
-}
-
-func (cmd *ZSliceCmd) Result() ([]Z, error) {
- return cmd.val, cmd.err
-}
-
-func (cmd *ZSliceCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *ZSliceCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make([]Z, n/2)
- for i := 0; i < len(cmd.val); i++ {
- member, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- score, err := rd.ReadFloatReply()
- if err != nil {
- return nil, err
- }
-
- cmd.val[i] = Z{
- Member: member,
- Score: score,
- }
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type ZWithKeyCmd struct {
- baseCmd
-
- val *ZWithKey
-}
-
-var _ Cmder = (*ZWithKeyCmd)(nil)
-
-func NewZWithKeyCmd(args ...interface{}) *ZWithKeyCmd {
- return &ZWithKeyCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *ZWithKeyCmd) Val() *ZWithKey {
- return cmd.val
-}
-
-func (cmd *ZWithKeyCmd) Result() (*ZWithKey, error) {
- return cmd.Val(), cmd.Err()
-}
-
-func (cmd *ZWithKeyCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *ZWithKeyCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- if n != 3 {
- return nil, fmt.Errorf("got %d elements, expected 3", n)
- }
-
- cmd.val = &ZWithKey{}
- var err error
-
- cmd.val.Key, err = rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- cmd.val.Member, err = rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- cmd.val.Score, err = rd.ReadFloatReply()
- if err != nil {
- return nil, err
- }
-
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type ScanCmd struct {
- baseCmd
-
- page []string
- cursor uint64
-
- process func(cmd Cmder) error
-}
-
-var _ Cmder = (*ScanCmd)(nil)
-
-func NewScanCmd(process func(cmd Cmder) error, args ...interface{}) *ScanCmd {
- return &ScanCmd{
- baseCmd: baseCmd{args: args},
- process: process,
- }
-}
-
-func (cmd *ScanCmd) Val() (keys []string, cursor uint64) {
- return cmd.page, cmd.cursor
-}
-
-func (cmd *ScanCmd) Result() (keys []string, cursor uint64, err error) {
- return cmd.page, cmd.cursor, cmd.err
-}
-
-func (cmd *ScanCmd) String() string {
- return cmdString(cmd, cmd.page)
-}
-
-func (cmd *ScanCmd) readReply(rd *proto.Reader) error {
- cmd.page, cmd.cursor, cmd.err = rd.ReadScanReply()
- return cmd.err
-}
-
-// Iterator creates a new ScanIterator.
-func (cmd *ScanCmd) Iterator() *ScanIterator {
- return &ScanIterator{
- cmd: cmd,
- }
-}
-
-//------------------------------------------------------------------------------
-
-type ClusterNode struct {
- ID string
- Addr string
-}
-
-type ClusterSlot struct {
- Start int
- End int
- Nodes []ClusterNode
-}
-
-type ClusterSlotsCmd struct {
- baseCmd
-
- val []ClusterSlot
-}
-
-var _ Cmder = (*ClusterSlotsCmd)(nil)
-
-func NewClusterSlotsCmd(args ...interface{}) *ClusterSlotsCmd {
- return &ClusterSlotsCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *ClusterSlotsCmd) Val() []ClusterSlot {
- return cmd.val
-}
-
-func (cmd *ClusterSlotsCmd) Result() ([]ClusterSlot, error) {
- return cmd.Val(), cmd.Err()
-}
-
-func (cmd *ClusterSlotsCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *ClusterSlotsCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make([]ClusterSlot, n)
- for i := 0; i < len(cmd.val); i++ {
- n, err := rd.ReadArrayLen()
- if err != nil {
- return nil, err
- }
- if n < 2 {
- err := fmt.Errorf("redis: got %d elements in cluster info, expected at least 2", n)
- return nil, err
- }
-
- start, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
-
- end, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
-
- nodes := make([]ClusterNode, n-2)
- for j := 0; j < len(nodes); j++ {
- n, err := rd.ReadArrayLen()
- if err != nil {
- return nil, err
- }
- if n != 2 && n != 3 {
- err := fmt.Errorf("got %d elements in cluster info address, expected 2 or 3", n)
- return nil, err
- }
-
- ip, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- port, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- nodes[j].Addr = net.JoinHostPort(ip, port)
-
- if n == 3 {
- id, err := rd.ReadString()
- if err != nil {
- return nil, err
- }
- nodes[j].ID = id
- }
- }
-
- cmd.val[i] = ClusterSlot{
- Start: int(start),
- End: int(end),
- Nodes: nodes,
- }
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-// GeoLocation is used with GeoAdd to add geospatial location.
-type GeoLocation struct {
- Name string
- Longitude, Latitude, Dist float64
- GeoHash int64
-}
-
-// GeoRadiusQuery is used with GeoRadius to query geospatial index.
-type GeoRadiusQuery struct {
- Radius float64
- // Can be m, km, ft, or mi. Default is km.
- Unit string
- WithCoord bool
- WithDist bool
- WithGeoHash bool
- Count int
- // Can be ASC or DESC. Default is no sort order.
- Sort string
- Store string
- StoreDist string
-}
-
-type GeoLocationCmd struct {
- baseCmd
-
- q *GeoRadiusQuery
- locations []GeoLocation
-}
-
-var _ Cmder = (*GeoLocationCmd)(nil)
-
-func NewGeoLocationCmd(q *GeoRadiusQuery, args ...interface{}) *GeoLocationCmd {
- return &GeoLocationCmd{
- baseCmd: baseCmd{args: geoLocationArgs(q, args...)},
- q: q,
- }
-}
-
-func geoLocationArgs(q *GeoRadiusQuery, args ...interface{}) []interface{} {
- args = append(args, q.Radius)
- if q.Unit != "" {
- args = append(args, q.Unit)
- } else {
- args = append(args, "km")
- }
- if q.WithCoord {
- args = append(args, "withcoord")
- }
- if q.WithDist {
- args = append(args, "withdist")
- }
- if q.WithGeoHash {
- args = append(args, "withhash")
- }
- if q.Count > 0 {
- args = append(args, "count", q.Count)
- }
- if q.Sort != "" {
- args = append(args, q.Sort)
- }
- if q.Store != "" {
- args = append(args, "store")
- args = append(args, q.Store)
- }
- if q.StoreDist != "" {
- args = append(args, "storedist")
- args = append(args, q.StoreDist)
- }
- return args
-}
-
-func (cmd *GeoLocationCmd) Val() []GeoLocation {
- return cmd.locations
-}
-
-func (cmd *GeoLocationCmd) Result() ([]GeoLocation, error) {
- return cmd.locations, cmd.err
-}
-
-func (cmd *GeoLocationCmd) String() string {
- return cmdString(cmd, cmd.locations)
-}
-
-func (cmd *GeoLocationCmd) readReply(rd *proto.Reader) error {
- var v interface{}
- v, cmd.err = rd.ReadArrayReply(newGeoLocationSliceParser(cmd.q))
- if cmd.err != nil {
- return cmd.err
- }
- cmd.locations = v.([]GeoLocation)
- return nil
-}
-
-func newGeoLocationSliceParser(q *GeoRadiusQuery) proto.MultiBulkParse {
- return func(rd *proto.Reader, n int64) (interface{}, error) {
- locs := make([]GeoLocation, 0, n)
- for i := int64(0); i < n; i++ {
- v, err := rd.ReadReply(newGeoLocationParser(q))
- if err != nil {
- return nil, err
- }
- switch vv := v.(type) {
- case string:
- locs = append(locs, GeoLocation{
- Name: vv,
- })
- case *GeoLocation:
- //TODO: avoid copying
- locs = append(locs, *vv)
- default:
- return nil, fmt.Errorf("got %T, expected string or *GeoLocation", v)
- }
- }
- return locs, nil
- }
-}
-
-func newGeoLocationParser(q *GeoRadiusQuery) proto.MultiBulkParse {
- return func(rd *proto.Reader, n int64) (interface{}, error) {
- var loc GeoLocation
- var err error
-
- loc.Name, err = rd.ReadString()
- if err != nil {
- return nil, err
- }
- if q.WithDist {
- loc.Dist, err = rd.ReadFloatReply()
- if err != nil {
- return nil, err
- }
- }
- if q.WithGeoHash {
- loc.GeoHash, err = rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
- }
- if q.WithCoord {
- n, err := rd.ReadArrayLen()
- if err != nil {
- return nil, err
- }
- if n != 2 {
- return nil, fmt.Errorf("got %d coordinates, expected 2", n)
- }
-
- loc.Longitude, err = rd.ReadFloatReply()
- if err != nil {
- return nil, err
- }
- loc.Latitude, err = rd.ReadFloatReply()
- if err != nil {
- return nil, err
- }
- }
-
- return &loc, nil
- }
-}
-
-//------------------------------------------------------------------------------
-
-type GeoPos struct {
- Longitude, Latitude float64
-}
-
-type GeoPosCmd struct {
- baseCmd
-
- val []*GeoPos
-}
-
-var _ Cmder = (*GeoPosCmd)(nil)
-
-func NewGeoPosCmd(args ...interface{}) *GeoPosCmd {
- return &GeoPosCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *GeoPosCmd) Val() []*GeoPos {
- return cmd.val
-}
-
-func (cmd *GeoPosCmd) Result() ([]*GeoPos, error) {
- return cmd.Val(), cmd.Err()
-}
-
-func (cmd *GeoPosCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *GeoPosCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make([]*GeoPos, n)
- for i := 0; i < len(cmd.val); i++ {
- i := i
- _, err := rd.ReadReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- longitude, err := rd.ReadFloatReply()
- if err != nil {
- return nil, err
- }
-
- latitude, err := rd.ReadFloatReply()
- if err != nil {
- return nil, err
- }
-
- cmd.val[i] = &GeoPos{
- Longitude: longitude,
- Latitude: latitude,
- }
- return nil, nil
- })
- if err != nil {
- if err == Nil {
- cmd.val[i] = nil
- continue
- }
- return nil, err
- }
- }
- return nil, nil
- })
- return cmd.err
-}
-
-//------------------------------------------------------------------------------
-
-type CommandInfo struct {
- Name string
- Arity int8
- Flags []string
- ACLFlags []string
- FirstKeyPos int8
- LastKeyPos int8
- StepCount int8
- ReadOnly bool
-}
-
-type CommandsInfoCmd struct {
- baseCmd
-
- val map[string]*CommandInfo
-}
-
-var _ Cmder = (*CommandsInfoCmd)(nil)
-
-func NewCommandsInfoCmd(args ...interface{}) *CommandsInfoCmd {
- return &CommandsInfoCmd{
- baseCmd: baseCmd{args: args},
- }
-}
-
-func (cmd *CommandsInfoCmd) Val() map[string]*CommandInfo {
- return cmd.val
-}
-
-func (cmd *CommandsInfoCmd) Result() (map[string]*CommandInfo, error) {
- return cmd.Val(), cmd.Err()
-}
-
-func (cmd *CommandsInfoCmd) String() string {
- return cmdString(cmd, cmd.val)
-}
-
-func (cmd *CommandsInfoCmd) readReply(rd *proto.Reader) error {
- _, cmd.err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.val = make(map[string]*CommandInfo, n)
- for i := int64(0); i < n; i++ {
- v, err := rd.ReadReply(commandInfoParser)
- if err != nil {
- return nil, err
- }
- vv := v.(*CommandInfo)
- cmd.val[vv.Name] = vv
- }
- return nil, nil
- })
- return cmd.err
-}
-
-func commandInfoParser(rd *proto.Reader, n int64) (interface{}, error) {
- const numArgRedis5 = 6
- const numArgRedis6 = 7
-
- switch n {
- case numArgRedis5, numArgRedis6:
- // continue
- default:
- return nil, fmt.Errorf("redis: got %d elements in COMMAND reply, wanted 7", n)
- }
-
- var cmd CommandInfo
- var err error
-
- cmd.Name, err = rd.ReadString()
- if err != nil {
- return nil, err
- }
-
- arity, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
- cmd.Arity = int8(arity)
-
- _, err = rd.ReadReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.Flags = make([]string, n)
- for i := 0; i < len(cmd.Flags); i++ {
- switch s, err := rd.ReadString(); {
- case err == Nil:
- cmd.Flags[i] = ""
- case err != nil:
- return nil, err
- default:
- cmd.Flags[i] = s
- }
- }
- return nil, nil
- })
- if err != nil {
- return nil, err
- }
-
- firstKeyPos, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
- cmd.FirstKeyPos = int8(firstKeyPos)
-
- lastKeyPos, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
- cmd.LastKeyPos = int8(lastKeyPos)
-
- stepCount, err := rd.ReadIntReply()
- if err != nil {
- return nil, err
- }
- cmd.StepCount = int8(stepCount)
-
- for _, flag := range cmd.Flags {
- if flag == "readonly" {
- cmd.ReadOnly = true
- break
- }
- }
-
- if n == numArgRedis5 {
- return &cmd, nil
- }
-
- _, err = rd.ReadReply(func(rd *proto.Reader, n int64) (interface{}, error) {
- cmd.ACLFlags = make([]string, n)
- for i := 0; i < len(cmd.ACLFlags); i++ {
- switch s, err := rd.ReadString(); {
- case err == Nil:
- cmd.ACLFlags[i] = ""
- case err != nil:
- return nil, err
- default:
- cmd.ACLFlags[i] = s
- }
- }
- return nil, nil
- })
- if err != nil {
- return nil, err
- }
-
- return &cmd, nil
-}
-
-//------------------------------------------------------------------------------
-
-type cmdsInfoCache struct {
- fn func() (map[string]*CommandInfo, error)
-
- once internal.Once
- cmds map[string]*CommandInfo
-}
-
-func newCmdsInfoCache(fn func() (map[string]*CommandInfo, error)) *cmdsInfoCache {
- return &cmdsInfoCache{
- fn: fn,
- }
-}
-
-func (c *cmdsInfoCache) Get() (map[string]*CommandInfo, error) {
- err := c.once.Do(func() error {
- cmds, err := c.fn()
- if err != nil {
- return err
- }
-
- // Extensions have cmd names in upper case. Convert them to lower case.
- for k, v := range cmds {
- lower := internal.ToLower(k)
- if lower != k {
- cmds[lower] = v
- }
- }
-
- c.cmds = cmds
- return nil
- })
- return c.cmds, err
-}
diff --git a/vendor/github.com/go-redis/redis/v7/commands.go b/vendor/github.com/go-redis/redis/v7/commands.go
deleted file mode 100644
index da5ceda13..000000000
--- a/vendor/github.com/go-redis/redis/v7/commands.go
+++ /dev/null
@@ -1,2643 +0,0 @@
-package redis
-
-import (
- "errors"
- "io"
- "time"
-
- "github.com/go-redis/redis/v7/internal"
-)
-
-func usePrecise(dur time.Duration) bool {
- return dur < time.Second || dur%time.Second != 0
-}
-
-func formatMs(dur time.Duration) int64 {
- if dur > 0 && dur < time.Millisecond {
- internal.Logger.Printf(
- "specified duration is %s, but minimal supported value is %s",
- dur, time.Millisecond,
- )
- }
- return int64(dur / time.Millisecond)
-}
-
-func formatSec(dur time.Duration) int64 {
- if dur > 0 && dur < time.Second {
- internal.Logger.Printf(
- "specified duration is %s, but minimal supported value is %s",
- dur, time.Second,
- )
- }
- return int64(dur / time.Second)
-}
-
-func appendArgs(dst, src []interface{}) []interface{} {
- if len(src) == 1 {
- switch v := src[0].(type) {
- case []string:
- for _, s := range v {
- dst = append(dst, s)
- }
- return dst
- case map[string]interface{}:
- for k, v := range v {
- dst = append(dst, k, v)
- }
- return dst
- }
- }
-
- dst = append(dst, src...)
- return dst
-}
-
-type Cmdable interface {
- Pipeline() Pipeliner
- Pipelined(fn func(Pipeliner) error) ([]Cmder, error)
-
- TxPipelined(fn func(Pipeliner) error) ([]Cmder, error)
- TxPipeline() Pipeliner
-
- Command() *CommandsInfoCmd
- ClientGetName() *StringCmd
- Echo(message interface{}) *StringCmd
- Ping() *StatusCmd
- Quit() *StatusCmd
- Del(keys ...string) *IntCmd
- Unlink(keys ...string) *IntCmd
- Dump(key string) *StringCmd
- Exists(keys ...string) *IntCmd
- Expire(key string, expiration time.Duration) *BoolCmd
- ExpireAt(key string, tm time.Time) *BoolCmd
- Keys(pattern string) *StringSliceCmd
- Migrate(host, port, key string, db int, timeout time.Duration) *StatusCmd
- Move(key string, db int) *BoolCmd
- ObjectRefCount(key string) *IntCmd
- ObjectEncoding(key string) *StringCmd
- ObjectIdleTime(key string) *DurationCmd
- Persist(key string) *BoolCmd
- PExpire(key string, expiration time.Duration) *BoolCmd
- PExpireAt(key string, tm time.Time) *BoolCmd
- PTTL(key string) *DurationCmd
- RandomKey() *StringCmd
- Rename(key, newkey string) *StatusCmd
- RenameNX(key, newkey string) *BoolCmd
- Restore(key string, ttl time.Duration, value string) *StatusCmd
- RestoreReplace(key string, ttl time.Duration, value string) *StatusCmd
- Sort(key string, sort *Sort) *StringSliceCmd
- SortStore(key, store string, sort *Sort) *IntCmd
- SortInterfaces(key string, sort *Sort) *SliceCmd
- Touch(keys ...string) *IntCmd
- TTL(key string) *DurationCmd
- Type(key string) *StatusCmd
- Scan(cursor uint64, match string, count int64) *ScanCmd
- SScan(key string, cursor uint64, match string, count int64) *ScanCmd
- HScan(key string, cursor uint64, match string, count int64) *ScanCmd
- ZScan(key string, cursor uint64, match string, count int64) *ScanCmd
- Append(key, value string) *IntCmd
- BitCount(key string, bitCount *BitCount) *IntCmd
- BitOpAnd(destKey string, keys ...string) *IntCmd
- BitOpOr(destKey string, keys ...string) *IntCmd
- BitOpXor(destKey string, keys ...string) *IntCmd
- BitOpNot(destKey string, key string) *IntCmd
- BitPos(key string, bit int64, pos ...int64) *IntCmd
- BitField(key string, args ...interface{}) *IntSliceCmd
- Decr(key string) *IntCmd
- DecrBy(key string, decrement int64) *IntCmd
- Get(key string) *StringCmd
- GetBit(key string, offset int64) *IntCmd
- GetRange(key string, start, end int64) *StringCmd
- GetSet(key string, value interface{}) *StringCmd
- Incr(key string) *IntCmd
- IncrBy(key string, value int64) *IntCmd
- IncrByFloat(key string, value float64) *FloatCmd
- MGet(keys ...string) *SliceCmd
- MSet(values ...interface{}) *StatusCmd
- MSetNX(values ...interface{}) *BoolCmd
- Set(key string, value interface{}, expiration time.Duration) *StatusCmd
- SetBit(key string, offset int64, value int) *IntCmd
- SetNX(key string, value interface{}, expiration time.Duration) *BoolCmd
- SetXX(key string, value interface{}, expiration time.Duration) *BoolCmd
- SetRange(key string, offset int64, value string) *IntCmd
- StrLen(key string) *IntCmd
- HDel(key string, fields ...string) *IntCmd
- HExists(key, field string) *BoolCmd
- HGet(key, field string) *StringCmd
- HGetAll(key string) *StringStringMapCmd
- HIncrBy(key, field string, incr int64) *IntCmd
- HIncrByFloat(key, field string, incr float64) *FloatCmd
- HKeys(key string) *StringSliceCmd
- HLen(key string) *IntCmd
- HMGet(key string, fields ...string) *SliceCmd
- HSet(key string, values ...interface{}) *IntCmd
- HMSet(key string, values ...interface{}) *BoolCmd
- HSetNX(key, field string, value interface{}) *BoolCmd
- HVals(key string) *StringSliceCmd
- BLPop(timeout time.Duration, keys ...string) *StringSliceCmd
- BRPop(timeout time.Duration, keys ...string) *StringSliceCmd
- BRPopLPush(source, destination string, timeout time.Duration) *StringCmd
- LIndex(key string, index int64) *StringCmd
- LInsert(key, op string, pivot, value interface{}) *IntCmd
- LInsertBefore(key string, pivot, value interface{}) *IntCmd
- LInsertAfter(key string, pivot, value interface{}) *IntCmd
- LLen(key string) *IntCmd
- LPop(key string) *StringCmd
- LPush(key string, values ...interface{}) *IntCmd
- LPushX(key string, values ...interface{}) *IntCmd
- LRange(key string, start, stop int64) *StringSliceCmd
- LRem(key string, count int64, value interface{}) *IntCmd
- LSet(key string, index int64, value interface{}) *StatusCmd
- LTrim(key string, start, stop int64) *StatusCmd
- RPop(key string) *StringCmd
- RPopLPush(source, destination string) *StringCmd
- RPush(key string, values ...interface{}) *IntCmd
- RPushX(key string, values ...interface{}) *IntCmd
- SAdd(key string, members ...interface{}) *IntCmd
- SCard(key string) *IntCmd
- SDiff(keys ...string) *StringSliceCmd
- SDiffStore(destination string, keys ...string) *IntCmd
- SInter(keys ...string) *StringSliceCmd
- SInterStore(destination string, keys ...string) *IntCmd
- SIsMember(key string, member interface{}) *BoolCmd
- SMembers(key string) *StringSliceCmd
- SMembersMap(key string) *StringStructMapCmd
- SMove(source, destination string, member interface{}) *BoolCmd
- SPop(key string) *StringCmd
- SPopN(key string, count int64) *StringSliceCmd
- SRandMember(key string) *StringCmd
- SRandMemberN(key string, count int64) *StringSliceCmd
- SRem(key string, members ...interface{}) *IntCmd
- SUnion(keys ...string) *StringSliceCmd
- SUnionStore(destination string, keys ...string) *IntCmd
- XAdd(a *XAddArgs) *StringCmd
- XDel(stream string, ids ...string) *IntCmd
- XLen(stream string) *IntCmd
- XRange(stream, start, stop string) *XMessageSliceCmd
- XRangeN(stream, start, stop string, count int64) *XMessageSliceCmd
- XRevRange(stream string, start, stop string) *XMessageSliceCmd
- XRevRangeN(stream string, start, stop string, count int64) *XMessageSliceCmd
- XRead(a *XReadArgs) *XStreamSliceCmd
- XReadStreams(streams ...string) *XStreamSliceCmd
- XGroupCreate(stream, group, start string) *StatusCmd
- XGroupCreateMkStream(stream, group, start string) *StatusCmd
- XGroupSetID(stream, group, start string) *StatusCmd
- XGroupDestroy(stream, group string) *IntCmd
- XGroupDelConsumer(stream, group, consumer string) *IntCmd
- XReadGroup(a *XReadGroupArgs) *XStreamSliceCmd
- XAck(stream, group string, ids ...string) *IntCmd
- XPending(stream, group string) *XPendingCmd
- XPendingExt(a *XPendingExtArgs) *XPendingExtCmd
- XClaim(a *XClaimArgs) *XMessageSliceCmd
- XClaimJustID(a *XClaimArgs) *StringSliceCmd
- XTrim(key string, maxLen int64) *IntCmd
- XTrimApprox(key string, maxLen int64) *IntCmd
- XInfoGroups(key string) *XInfoGroupsCmd
- BZPopMax(timeout time.Duration, keys ...string) *ZWithKeyCmd
- BZPopMin(timeout time.Duration, keys ...string) *ZWithKeyCmd
- ZAdd(key string, members ...*Z) *IntCmd
- ZAddNX(key string, members ...*Z) *IntCmd
- ZAddXX(key string, members ...*Z) *IntCmd
- ZAddCh(key string, members ...*Z) *IntCmd
- ZAddNXCh(key string, members ...*Z) *IntCmd
- ZAddXXCh(key string, members ...*Z) *IntCmd
- ZIncr(key string, member *Z) *FloatCmd
- ZIncrNX(key string, member *Z) *FloatCmd
- ZIncrXX(key string, member *Z) *FloatCmd
- ZCard(key string) *IntCmd
- ZCount(key, min, max string) *IntCmd
- ZLexCount(key, min, max string) *IntCmd
- ZIncrBy(key string, increment float64, member string) *FloatCmd
- ZInterStore(destination string, store *ZStore) *IntCmd
- ZPopMax(key string, count ...int64) *ZSliceCmd
- ZPopMin(key string, count ...int64) *ZSliceCmd
- ZRange(key string, start, stop int64) *StringSliceCmd
- ZRangeWithScores(key string, start, stop int64) *ZSliceCmd
- ZRangeByScore(key string, opt *ZRangeBy) *StringSliceCmd
- ZRangeByLex(key string, opt *ZRangeBy) *StringSliceCmd
- ZRangeByScoreWithScores(key string, opt *ZRangeBy) *ZSliceCmd
- ZRank(key, member string) *IntCmd
- ZRem(key string, members ...interface{}) *IntCmd
- ZRemRangeByRank(key string, start, stop int64) *IntCmd
- ZRemRangeByScore(key, min, max string) *IntCmd
- ZRemRangeByLex(key, min, max string) *IntCmd
- ZRevRange(key string, start, stop int64) *StringSliceCmd
- ZRevRangeWithScores(key string, start, stop int64) *ZSliceCmd
- ZRevRangeByScore(key string, opt *ZRangeBy) *StringSliceCmd
- ZRevRangeByLex(key string, opt *ZRangeBy) *StringSliceCmd
- ZRevRangeByScoreWithScores(key string, opt *ZRangeBy) *ZSliceCmd
- ZRevRank(key, member string) *IntCmd
- ZScore(key, member string) *FloatCmd
- ZUnionStore(dest string, store *ZStore) *IntCmd
- PFAdd(key string, els ...interface{}) *IntCmd
- PFCount(keys ...string) *IntCmd
- PFMerge(dest string, keys ...string) *StatusCmd
- BgRewriteAOF() *StatusCmd
- BgSave() *StatusCmd
- ClientKill(ipPort string) *StatusCmd
- ClientKillByFilter(keys ...string) *IntCmd
- ClientList() *StringCmd
- ClientPause(dur time.Duration) *BoolCmd
- ClientID() *IntCmd
- ConfigGet(parameter string) *SliceCmd
- ConfigResetStat() *StatusCmd
- ConfigSet(parameter, value string) *StatusCmd
- ConfigRewrite() *StatusCmd
- DBSize() *IntCmd
- FlushAll() *StatusCmd
- FlushAllAsync() *StatusCmd
- FlushDB() *StatusCmd
- FlushDBAsync() *StatusCmd
- Info(section ...string) *StringCmd
- LastSave() *IntCmd
- Save() *StatusCmd
- Shutdown() *StatusCmd
- ShutdownSave() *StatusCmd
- ShutdownNoSave() *StatusCmd
- SlaveOf(host, port string) *StatusCmd
- Time() *TimeCmd
- Eval(script string, keys []string, args ...interface{}) *Cmd
- EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd
- ScriptExists(hashes ...string) *BoolSliceCmd
- ScriptFlush() *StatusCmd
- ScriptKill() *StatusCmd
- ScriptLoad(script string) *StringCmd
- DebugObject(key string) *StringCmd
- Publish(channel string, message interface{}) *IntCmd
- PubSubChannels(pattern string) *StringSliceCmd
- PubSubNumSub(channels ...string) *StringIntMapCmd
- PubSubNumPat() *IntCmd
- ClusterSlots() *ClusterSlotsCmd
- ClusterNodes() *StringCmd
- ClusterMeet(host, port string) *StatusCmd
- ClusterForget(nodeID string) *StatusCmd
- ClusterReplicate(nodeID string) *StatusCmd
- ClusterResetSoft() *StatusCmd
- ClusterResetHard() *StatusCmd
- ClusterInfo() *StringCmd
- ClusterKeySlot(key string) *IntCmd
- ClusterGetKeysInSlot(slot int, count int) *StringSliceCmd
- ClusterCountFailureReports(nodeID string) *IntCmd
- ClusterCountKeysInSlot(slot int) *IntCmd
- ClusterDelSlots(slots ...int) *StatusCmd
- ClusterDelSlotsRange(min, max int) *StatusCmd
- ClusterSaveConfig() *StatusCmd
- ClusterSlaves(nodeID string) *StringSliceCmd
- ClusterFailover() *StatusCmd
- ClusterAddSlots(slots ...int) *StatusCmd
- ClusterAddSlotsRange(min, max int) *StatusCmd
- GeoAdd(key string, geoLocation ...*GeoLocation) *IntCmd
- GeoPos(key string, members ...string) *GeoPosCmd
- GeoRadius(key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd
- GeoRadiusStore(key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd
- GeoRadiusByMember(key, member string, query *GeoRadiusQuery) *GeoLocationCmd
- GeoRadiusByMemberStore(key, member string, query *GeoRadiusQuery) *IntCmd
- GeoDist(key string, member1, member2, unit string) *FloatCmd
- GeoHash(key string, members ...string) *StringSliceCmd
- ReadOnly() *StatusCmd
- ReadWrite() *StatusCmd
- MemoryUsage(key string, samples ...int) *IntCmd
-}
-
-type StatefulCmdable interface {
- Cmdable
- Auth(password string) *StatusCmd
- AuthACL(username, password string) *StatusCmd
- Select(index int) *StatusCmd
- SwapDB(index1, index2 int) *StatusCmd
- ClientSetName(name string) *BoolCmd
-}
-
-var _ Cmdable = (*Client)(nil)
-var _ Cmdable = (*Tx)(nil)
-var _ Cmdable = (*Ring)(nil)
-var _ Cmdable = (*ClusterClient)(nil)
-
-type cmdable func(cmd Cmder) error
-
-type statefulCmdable func(cmd Cmder) error
-
-//------------------------------------------------------------------------------
-
-func (c statefulCmdable) Auth(password string) *StatusCmd {
- cmd := NewStatusCmd("auth", password)
- _ = c(cmd)
- return cmd
-}
-
-// Perform an AUTH command, using the given user and pass.
-// Should be used to authenticate the current connection with one of the connections defined in the ACL list
-// when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
-func (c statefulCmdable) AuthACL(username, password string) *StatusCmd {
- cmd := NewStatusCmd("auth", username, password)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Echo(message interface{}) *StringCmd {
- cmd := NewStringCmd("echo", message)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Ping() *StatusCmd {
- cmd := NewStatusCmd("ping")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Wait(numSlaves int, timeout time.Duration) *IntCmd {
- cmd := NewIntCmd("wait", numSlaves, int(timeout/time.Millisecond))
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Quit() *StatusCmd {
- panic("not implemented")
-}
-
-func (c statefulCmdable) Select(index int) *StatusCmd {
- cmd := NewStatusCmd("select", index)
- _ = c(cmd)
- return cmd
-}
-
-func (c statefulCmdable) SwapDB(index1, index2 int) *StatusCmd {
- cmd := NewStatusCmd("swapdb", index1, index2)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) Command() *CommandsInfoCmd {
- cmd := NewCommandsInfoCmd("command")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Del(keys ...string) *IntCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "del"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Unlink(keys ...string) *IntCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "unlink"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Dump(key string) *StringCmd {
- cmd := NewStringCmd("dump", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Exists(keys ...string) *IntCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "exists"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Expire(key string, expiration time.Duration) *BoolCmd {
- cmd := NewBoolCmd("expire", key, formatSec(expiration))
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ExpireAt(key string, tm time.Time) *BoolCmd {
- cmd := NewBoolCmd("expireat", key, tm.Unix())
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Keys(pattern string) *StringSliceCmd {
- cmd := NewStringSliceCmd("keys", pattern)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Migrate(host, port, key string, db int, timeout time.Duration) *StatusCmd {
- cmd := NewStatusCmd(
- "migrate",
- host,
- port,
- key,
- db,
- formatMs(timeout),
- )
- cmd.setReadTimeout(timeout)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Move(key string, db int) *BoolCmd {
- cmd := NewBoolCmd("move", key, db)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ObjectRefCount(key string) *IntCmd {
- cmd := NewIntCmd("object", "refcount", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ObjectEncoding(key string) *StringCmd {
- cmd := NewStringCmd("object", "encoding", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ObjectIdleTime(key string) *DurationCmd {
- cmd := NewDurationCmd(time.Second, "object", "idletime", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Persist(key string) *BoolCmd {
- cmd := NewBoolCmd("persist", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) PExpire(key string, expiration time.Duration) *BoolCmd {
- cmd := NewBoolCmd("pexpire", key, formatMs(expiration))
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) PExpireAt(key string, tm time.Time) *BoolCmd {
- cmd := NewBoolCmd(
- "pexpireat",
- key,
- tm.UnixNano()/int64(time.Millisecond),
- )
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) PTTL(key string) *DurationCmd {
- cmd := NewDurationCmd(time.Millisecond, "pttl", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) RandomKey() *StringCmd {
- cmd := NewStringCmd("randomkey")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Rename(key, newkey string) *StatusCmd {
- cmd := NewStatusCmd("rename", key, newkey)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) RenameNX(key, newkey string) *BoolCmd {
- cmd := NewBoolCmd("renamenx", key, newkey)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Restore(key string, ttl time.Duration, value string) *StatusCmd {
- cmd := NewStatusCmd(
- "restore",
- key,
- formatMs(ttl),
- value,
- )
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) RestoreReplace(key string, ttl time.Duration, value string) *StatusCmd {
- cmd := NewStatusCmd(
- "restore",
- key,
- formatMs(ttl),
- value,
- "replace",
- )
- _ = c(cmd)
- return cmd
-}
-
-type Sort struct {
- By string
- Offset, Count int64
- Get []string
- Order string
- Alpha bool
-}
-
-func (sort *Sort) args(key string) []interface{} {
- args := []interface{}{"sort", key}
- if sort.By != "" {
- args = append(args, "by", sort.By)
- }
- if sort.Offset != 0 || sort.Count != 0 {
- args = append(args, "limit", sort.Offset, sort.Count)
- }
- for _, get := range sort.Get {
- args = append(args, "get", get)
- }
- if sort.Order != "" {
- args = append(args, sort.Order)
- }
- if sort.Alpha {
- args = append(args, "alpha")
- }
- return args
-}
-
-func (c cmdable) Sort(key string, sort *Sort) *StringSliceCmd {
- cmd := NewStringSliceCmd(sort.args(key)...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SortStore(key, store string, sort *Sort) *IntCmd {
- args := sort.args(key)
- if store != "" {
- args = append(args, "store", store)
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SortInterfaces(key string, sort *Sort) *SliceCmd {
- cmd := NewSliceCmd(sort.args(key)...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Touch(keys ...string) *IntCmd {
- args := make([]interface{}, len(keys)+1)
- args[0] = "touch"
- for i, key := range keys {
- args[i+1] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) TTL(key string) *DurationCmd {
- cmd := NewDurationCmd(time.Second, "ttl", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Type(key string) *StatusCmd {
- cmd := NewStatusCmd("type", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Scan(cursor uint64, match string, count int64) *ScanCmd {
- args := []interface{}{"scan", cursor}
- if match != "" {
- args = append(args, "match", match)
- }
- if count > 0 {
- args = append(args, "count", count)
- }
- cmd := NewScanCmd(c, args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SScan(key string, cursor uint64, match string, count int64) *ScanCmd {
- args := []interface{}{"sscan", key, cursor}
- if match != "" {
- args = append(args, "match", match)
- }
- if count > 0 {
- args = append(args, "count", count)
- }
- cmd := NewScanCmd(c, args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HScan(key string, cursor uint64, match string, count int64) *ScanCmd {
- args := []interface{}{"hscan", key, cursor}
- if match != "" {
- args = append(args, "match", match)
- }
- if count > 0 {
- args = append(args, "count", count)
- }
- cmd := NewScanCmd(c, args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZScan(key string, cursor uint64, match string, count int64) *ScanCmd {
- args := []interface{}{"zscan", key, cursor}
- if match != "" {
- args = append(args, "match", match)
- }
- if count > 0 {
- args = append(args, "count", count)
- }
- cmd := NewScanCmd(c, args...)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) Append(key, value string) *IntCmd {
- cmd := NewIntCmd("append", key, value)
- _ = c(cmd)
- return cmd
-}
-
-type BitCount struct {
- Start, End int64
-}
-
-func (c cmdable) BitCount(key string, bitCount *BitCount) *IntCmd {
- args := []interface{}{"bitcount", key}
- if bitCount != nil {
- args = append(
- args,
- bitCount.Start,
- bitCount.End,
- )
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) bitOp(op, destKey string, keys ...string) *IntCmd {
- args := make([]interface{}, 3+len(keys))
- args[0] = "bitop"
- args[1] = op
- args[2] = destKey
- for i, key := range keys {
- args[3+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) BitOpAnd(destKey string, keys ...string) *IntCmd {
- return c.bitOp("and", destKey, keys...)
-}
-
-func (c cmdable) BitOpOr(destKey string, keys ...string) *IntCmd {
- return c.bitOp("or", destKey, keys...)
-}
-
-func (c cmdable) BitOpXor(destKey string, keys ...string) *IntCmd {
- return c.bitOp("xor", destKey, keys...)
-}
-
-func (c cmdable) BitOpNot(destKey string, key string) *IntCmd {
- return c.bitOp("not", destKey, key)
-}
-
-func (c cmdable) BitPos(key string, bit int64, pos ...int64) *IntCmd {
- args := make([]interface{}, 3+len(pos))
- args[0] = "bitpos"
- args[1] = key
- args[2] = bit
- switch len(pos) {
- case 0:
- case 1:
- args[3] = pos[0]
- case 2:
- args[3] = pos[0]
- args[4] = pos[1]
- default:
- panic("too many arguments")
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) BitField(key string, args ...interface{}) *IntSliceCmd {
- a := make([]interface{}, 0, 2+len(args))
- a = append(a, "bitfield")
- a = append(a, key)
- a = append(a, args...)
- cmd := NewIntSliceCmd(a...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Decr(key string) *IntCmd {
- cmd := NewIntCmd("decr", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) DecrBy(key string, decrement int64) *IntCmd {
- cmd := NewIntCmd("decrby", key, decrement)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `GET key` command. It returns redis.Nil error when key does not exist.
-func (c cmdable) Get(key string) *StringCmd {
- cmd := NewStringCmd("get", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) GetBit(key string, offset int64) *IntCmd {
- cmd := NewIntCmd("getbit", key, offset)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) GetRange(key string, start, end int64) *StringCmd {
- cmd := NewStringCmd("getrange", key, start, end)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) GetSet(key string, value interface{}) *StringCmd {
- cmd := NewStringCmd("getset", key, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Incr(key string) *IntCmd {
- cmd := NewIntCmd("incr", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) IncrBy(key string, value int64) *IntCmd {
- cmd := NewIntCmd("incrby", key, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) IncrByFloat(key string, value float64) *FloatCmd {
- cmd := NewFloatCmd("incrbyfloat", key, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) MGet(keys ...string) *SliceCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "mget"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-// MSet is like Set but accepts multiple values:
-// - MSet("key1", "value1", "key2", "value2")
-// - MSet([]string{"key1", "value1", "key2", "value2"})
-// - MSet(map[string]interface{}{"key1": "value1", "key2": "value2"})
-func (c cmdable) MSet(values ...interface{}) *StatusCmd {
- args := make([]interface{}, 1, 1+len(values))
- args[0] = "mset"
- args = appendArgs(args, values)
- cmd := NewStatusCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-// MSetNX is like SetNX but accepts multiple values:
-// - MSetNX("key1", "value1", "key2", "value2")
-// - MSetNX([]string{"key1", "value1", "key2", "value2"})
-// - MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"})
-func (c cmdable) MSetNX(values ...interface{}) *BoolCmd {
- args := make([]interface{}, 1, 1+len(values))
- args[0] = "msetnx"
- args = appendArgs(args, values)
- cmd := NewBoolCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SET key value [expiration]` command.
-//
-// Use expiration for `SETEX`-like behavior.
-// Zero expiration means the key has no expiration time.
-func (c cmdable) Set(key string, value interface{}, expiration time.Duration) *StatusCmd {
- args := make([]interface{}, 3, 5)
- args[0] = "set"
- args[1] = key
- args[2] = value
- if expiration > 0 {
- if usePrecise(expiration) {
- args = append(args, "px", formatMs(expiration))
- } else {
- args = append(args, "ex", formatSec(expiration))
- }
- }
- cmd := NewStatusCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SetBit(key string, offset int64, value int) *IntCmd {
- cmd := NewIntCmd(
- "setbit",
- key,
- offset,
- value,
- )
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SET key value [expiration] NX` command.
-//
-// Zero expiration means the key has no expiration time.
-func (c cmdable) SetNX(key string, value interface{}, expiration time.Duration) *BoolCmd {
- var cmd *BoolCmd
- if expiration == 0 {
- // Use old `SETNX` to support old Redis versions.
- cmd = NewBoolCmd("setnx", key, value)
- } else {
- if usePrecise(expiration) {
- cmd = NewBoolCmd("set", key, value, "px", formatMs(expiration), "nx")
- } else {
- cmd = NewBoolCmd("set", key, value, "ex", formatSec(expiration), "nx")
- }
- }
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SET key value [expiration] XX` command.
-//
-// Zero expiration means the key has no expiration time.
-func (c cmdable) SetXX(key string, value interface{}, expiration time.Duration) *BoolCmd {
- var cmd *BoolCmd
- if expiration == 0 {
- cmd = NewBoolCmd("set", key, value, "xx")
- } else {
- if usePrecise(expiration) {
- cmd = NewBoolCmd("set", key, value, "px", formatMs(expiration), "xx")
- } else {
- cmd = NewBoolCmd("set", key, value, "ex", formatSec(expiration), "xx")
- }
- }
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SetRange(key string, offset int64, value string) *IntCmd {
- cmd := NewIntCmd("setrange", key, offset, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) StrLen(key string) *IntCmd {
- cmd := NewIntCmd("strlen", key)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) HDel(key string, fields ...string) *IntCmd {
- args := make([]interface{}, 2+len(fields))
- args[0] = "hdel"
- args[1] = key
- for i, field := range fields {
- args[2+i] = field
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HExists(key, field string) *BoolCmd {
- cmd := NewBoolCmd("hexists", key, field)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HGet(key, field string) *StringCmd {
- cmd := NewStringCmd("hget", key, field)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HGetAll(key string) *StringStringMapCmd {
- cmd := NewStringStringMapCmd("hgetall", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HIncrBy(key, field string, incr int64) *IntCmd {
- cmd := NewIntCmd("hincrby", key, field, incr)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HIncrByFloat(key, field string, incr float64) *FloatCmd {
- cmd := NewFloatCmd("hincrbyfloat", key, field, incr)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HKeys(key string) *StringSliceCmd {
- cmd := NewStringSliceCmd("hkeys", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HLen(key string) *IntCmd {
- cmd := NewIntCmd("hlen", key)
- _ = c(cmd)
- return cmd
-}
-
-// HMGet returns the values for the specified fields in the hash stored at key.
-// It returns an interface{} to distinguish between empty string and nil value.
-func (c cmdable) HMGet(key string, fields ...string) *SliceCmd {
- args := make([]interface{}, 2+len(fields))
- args[0] = "hmget"
- args[1] = key
- for i, field := range fields {
- args[2+i] = field
- }
- cmd := NewSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-// HSet accepts values in following formats:
-// - HMSet("myhash", "key1", "value1", "key2", "value2")
-// - HMSet("myhash", []string{"key1", "value1", "key2", "value2"})
-// - HMSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
-//
-// Note that it requires Redis v4 for multiple field/value pairs support.
-func (c cmdable) HSet(key string, values ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(values))
- args[0] = "hset"
- args[1] = key
- args = appendArgs(args, values)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-// HMSet is a deprecated version of HSet left for compatibility with Redis 3.
-func (c cmdable) HMSet(key string, values ...interface{}) *BoolCmd {
- args := make([]interface{}, 2, 2+len(values))
- args[0] = "hmset"
- args[1] = key
- args = appendArgs(args, values)
- cmd := NewBoolCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HSetNX(key, field string, value interface{}) *BoolCmd {
- cmd := NewBoolCmd("hsetnx", key, field, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) HVals(key string) *StringSliceCmd {
- cmd := NewStringSliceCmd("hvals", key)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) BLPop(timeout time.Duration, keys ...string) *StringSliceCmd {
- args := make([]interface{}, 1+len(keys)+1)
- args[0] = "blpop"
- for i, key := range keys {
- args[1+i] = key
- }
- args[len(args)-1] = formatSec(timeout)
- cmd := NewStringSliceCmd(args...)
- cmd.setReadTimeout(timeout)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) BRPop(timeout time.Duration, keys ...string) *StringSliceCmd {
- args := make([]interface{}, 1+len(keys)+1)
- args[0] = "brpop"
- for i, key := range keys {
- args[1+i] = key
- }
- args[len(keys)+1] = formatSec(timeout)
- cmd := NewStringSliceCmd(args...)
- cmd.setReadTimeout(timeout)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) BRPopLPush(source, destination string, timeout time.Duration) *StringCmd {
- cmd := NewStringCmd(
- "brpoplpush",
- source,
- destination,
- formatSec(timeout),
- )
- cmd.setReadTimeout(timeout)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LIndex(key string, index int64) *StringCmd {
- cmd := NewStringCmd("lindex", key, index)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LInsert(key, op string, pivot, value interface{}) *IntCmd {
- cmd := NewIntCmd("linsert", key, op, pivot, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LInsertBefore(key string, pivot, value interface{}) *IntCmd {
- cmd := NewIntCmd("linsert", key, "before", pivot, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LInsertAfter(key string, pivot, value interface{}) *IntCmd {
- cmd := NewIntCmd("linsert", key, "after", pivot, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LLen(key string) *IntCmd {
- cmd := NewIntCmd("llen", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LPop(key string) *StringCmd {
- cmd := NewStringCmd("lpop", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LPush(key string, values ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(values))
- args[0] = "lpush"
- args[1] = key
- args = appendArgs(args, values)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LPushX(key string, values ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(values))
- args[0] = "lpushx"
- args[1] = key
- args = appendArgs(args, values)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LRange(key string, start, stop int64) *StringSliceCmd {
- cmd := NewStringSliceCmd(
- "lrange",
- key,
- start,
- stop,
- )
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LRem(key string, count int64, value interface{}) *IntCmd {
- cmd := NewIntCmd("lrem", key, count, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LSet(key string, index int64, value interface{}) *StatusCmd {
- cmd := NewStatusCmd("lset", key, index, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LTrim(key string, start, stop int64) *StatusCmd {
- cmd := NewStatusCmd(
- "ltrim",
- key,
- start,
- stop,
- )
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) RPop(key string) *StringCmd {
- cmd := NewStringCmd("rpop", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) RPopLPush(source, destination string) *StringCmd {
- cmd := NewStringCmd("rpoplpush", source, destination)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) RPush(key string, values ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(values))
- args[0] = "rpush"
- args[1] = key
- args = appendArgs(args, values)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) RPushX(key string, values ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(values))
- args[0] = "rpushx"
- args[1] = key
- args = appendArgs(args, values)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) SAdd(key string, members ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(members))
- args[0] = "sadd"
- args[1] = key
- args = appendArgs(args, members)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SCard(key string) *IntCmd {
- cmd := NewIntCmd("scard", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SDiff(keys ...string) *StringSliceCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "sdiff"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SDiffStore(destination string, keys ...string) *IntCmd {
- args := make([]interface{}, 2+len(keys))
- args[0] = "sdiffstore"
- args[1] = destination
- for i, key := range keys {
- args[2+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SInter(keys ...string) *StringSliceCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "sinter"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SInterStore(destination string, keys ...string) *IntCmd {
- args := make([]interface{}, 2+len(keys))
- args[0] = "sinterstore"
- args[1] = destination
- for i, key := range keys {
- args[2+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SIsMember(key string, member interface{}) *BoolCmd {
- cmd := NewBoolCmd("sismember", key, member)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SMEMBERS key` command output as a slice
-func (c cmdable) SMembers(key string) *StringSliceCmd {
- cmd := NewStringSliceCmd("smembers", key)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SMEMBERS key` command output as a map
-func (c cmdable) SMembersMap(key string) *StringStructMapCmd {
- cmd := NewStringStructMapCmd("smembers", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SMove(source, destination string, member interface{}) *BoolCmd {
- cmd := NewBoolCmd("smove", source, destination, member)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SPOP key` command.
-func (c cmdable) SPop(key string) *StringCmd {
- cmd := NewStringCmd("spop", key)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SPOP key count` command.
-func (c cmdable) SPopN(key string, count int64) *StringSliceCmd {
- cmd := NewStringSliceCmd("spop", key, count)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SRANDMEMBER key` command.
-func (c cmdable) SRandMember(key string) *StringCmd {
- cmd := NewStringCmd("srandmember", key)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `SRANDMEMBER key count` command.
-func (c cmdable) SRandMemberN(key string, count int64) *StringSliceCmd {
- cmd := NewStringSliceCmd("srandmember", key, count)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SRem(key string, members ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(members))
- args[0] = "srem"
- args[1] = key
- args = appendArgs(args, members)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SUnion(keys ...string) *StringSliceCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "sunion"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SUnionStore(destination string, keys ...string) *IntCmd {
- args := make([]interface{}, 2+len(keys))
- args[0] = "sunionstore"
- args[1] = destination
- for i, key := range keys {
- args[2+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-type XAddArgs struct {
- Stream string
- MaxLen int64 // MAXLEN N
- MaxLenApprox int64 // MAXLEN ~ N
- ID string
- Values map[string]interface{}
-}
-
-func (c cmdable) XAdd(a *XAddArgs) *StringCmd {
- args := make([]interface{}, 0, 6+len(a.Values)*2)
- args = append(args, "xadd")
- args = append(args, a.Stream)
- if a.MaxLen > 0 {
- args = append(args, "maxlen", a.MaxLen)
- } else if a.MaxLenApprox > 0 {
- args = append(args, "maxlen", "~", a.MaxLenApprox)
- }
- if a.ID != "" {
- args = append(args, a.ID)
- } else {
- args = append(args, "*")
- }
- for k, v := range a.Values {
- args = append(args, k)
- args = append(args, v)
- }
-
- cmd := NewStringCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XDel(stream string, ids ...string) *IntCmd {
- args := []interface{}{"xdel", stream}
- for _, id := range ids {
- args = append(args, id)
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XLen(stream string) *IntCmd {
- cmd := NewIntCmd("xlen", stream)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XRange(stream, start, stop string) *XMessageSliceCmd {
- cmd := NewXMessageSliceCmd("xrange", stream, start, stop)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XRangeN(stream, start, stop string, count int64) *XMessageSliceCmd {
- cmd := NewXMessageSliceCmd("xrange", stream, start, stop, "count", count)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XRevRange(stream, start, stop string) *XMessageSliceCmd {
- cmd := NewXMessageSliceCmd("xrevrange", stream, start, stop)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XRevRangeN(stream, start, stop string, count int64) *XMessageSliceCmd {
- cmd := NewXMessageSliceCmd("xrevrange", stream, start, stop, "count", count)
- _ = c(cmd)
- return cmd
-}
-
-type XReadArgs struct {
- Streams []string // list of streams and ids, e.g. stream1 stream2 id1 id2
- Count int64
- Block time.Duration
-}
-
-func (c cmdable) XRead(a *XReadArgs) *XStreamSliceCmd {
- args := make([]interface{}, 0, 5+len(a.Streams))
- args = append(args, "xread")
- if a.Count > 0 {
- args = append(args, "count")
- args = append(args, a.Count)
- }
- if a.Block >= 0 {
- args = append(args, "block")
- args = append(args, int64(a.Block/time.Millisecond))
- }
-
- args = append(args, "streams")
- for _, s := range a.Streams {
- args = append(args, s)
- }
-
- cmd := NewXStreamSliceCmd(args...)
- if a.Block >= 0 {
- cmd.setReadTimeout(a.Block)
- }
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XReadStreams(streams ...string) *XStreamSliceCmd {
- return c.XRead(&XReadArgs{
- Streams: streams,
- Block: -1,
- })
-}
-
-func (c cmdable) XGroupCreate(stream, group, start string) *StatusCmd {
- cmd := NewStatusCmd("xgroup", "create", stream, group, start)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XGroupCreateMkStream(stream, group, start string) *StatusCmd {
- cmd := NewStatusCmd("xgroup", "create", stream, group, start, "mkstream")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XGroupSetID(stream, group, start string) *StatusCmd {
- cmd := NewStatusCmd("xgroup", "setid", stream, group, start)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XGroupDestroy(stream, group string) *IntCmd {
- cmd := NewIntCmd("xgroup", "destroy", stream, group)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XGroupDelConsumer(stream, group, consumer string) *IntCmd {
- cmd := NewIntCmd("xgroup", "delconsumer", stream, group, consumer)
- _ = c(cmd)
- return cmd
-}
-
-type XReadGroupArgs struct {
- Group string
- Consumer string
- Streams []string // list of streams and ids, e.g. stream1 stream2 id1 id2
- Count int64
- Block time.Duration
- NoAck bool
-}
-
-func (c cmdable) XReadGroup(a *XReadGroupArgs) *XStreamSliceCmd {
- args := make([]interface{}, 0, 8+len(a.Streams))
- args = append(args, "xreadgroup", "group", a.Group, a.Consumer)
- if a.Count > 0 {
- args = append(args, "count", a.Count)
- }
- if a.Block >= 0 {
- args = append(args, "block", int64(a.Block/time.Millisecond))
- }
- if a.NoAck {
- args = append(args, "noack")
- }
- args = append(args, "streams")
- for _, s := range a.Streams {
- args = append(args, s)
- }
-
- cmd := NewXStreamSliceCmd(args...)
- if a.Block >= 0 {
- cmd.setReadTimeout(a.Block)
- }
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XAck(stream, group string, ids ...string) *IntCmd {
- args := []interface{}{"xack", stream, group}
- for _, id := range ids {
- args = append(args, id)
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XPending(stream, group string) *XPendingCmd {
- cmd := NewXPendingCmd("xpending", stream, group)
- _ = c(cmd)
- return cmd
-}
-
-type XPendingExtArgs struct {
- Stream string
- Group string
- Start string
- End string
- Count int64
- Consumer string
-}
-
-func (c cmdable) XPendingExt(a *XPendingExtArgs) *XPendingExtCmd {
- args := make([]interface{}, 0, 7)
- args = append(args, "xpending", a.Stream, a.Group, a.Start, a.End, a.Count)
- if a.Consumer != "" {
- args = append(args, a.Consumer)
- }
- cmd := NewXPendingExtCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-type XClaimArgs struct {
- Stream string
- Group string
- Consumer string
- MinIdle time.Duration
- Messages []string
-}
-
-func (c cmdable) XClaim(a *XClaimArgs) *XMessageSliceCmd {
- args := xClaimArgs(a)
- cmd := NewXMessageSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XClaimJustID(a *XClaimArgs) *StringSliceCmd {
- args := xClaimArgs(a)
- args = append(args, "justid")
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func xClaimArgs(a *XClaimArgs) []interface{} {
- args := make([]interface{}, 0, 4+len(a.Messages))
- args = append(args,
- "xclaim",
- a.Stream,
- a.Group, a.Consumer,
- int64(a.MinIdle/time.Millisecond))
- for _, id := range a.Messages {
- args = append(args, id)
- }
- return args
-}
-
-func (c cmdable) XTrim(key string, maxLen int64) *IntCmd {
- cmd := NewIntCmd("xtrim", key, "maxlen", maxLen)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XTrimApprox(key string, maxLen int64) *IntCmd {
- cmd := NewIntCmd("xtrim", key, "maxlen", "~", maxLen)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) XInfoGroups(key string) *XInfoGroupsCmd {
- cmd := NewXInfoGroupsCmd(key)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-// Z represents sorted set member.
-type Z struct {
- Score float64
- Member interface{}
-}
-
-// ZWithKey represents sorted set member including the name of the key where it was popped.
-type ZWithKey struct {
- Z
- Key string
-}
-
-// ZStore is used as an arg to ZInterStore and ZUnionStore.
-type ZStore struct {
- Keys []string
- Weights []float64
- // Can be SUM, MIN or MAX.
- Aggregate string
-}
-
-// Redis `BZPOPMAX key [key ...] timeout` command.
-func (c cmdable) BZPopMax(timeout time.Duration, keys ...string) *ZWithKeyCmd {
- args := make([]interface{}, 1+len(keys)+1)
- args[0] = "bzpopmax"
- for i, key := range keys {
- args[1+i] = key
- }
- args[len(args)-1] = formatSec(timeout)
- cmd := NewZWithKeyCmd(args...)
- cmd.setReadTimeout(timeout)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `BZPOPMIN key [key ...] timeout` command.
-func (c cmdable) BZPopMin(timeout time.Duration, keys ...string) *ZWithKeyCmd {
- args := make([]interface{}, 1+len(keys)+1)
- args[0] = "bzpopmin"
- for i, key := range keys {
- args[1+i] = key
- }
- args[len(args)-1] = formatSec(timeout)
- cmd := NewZWithKeyCmd(args...)
- cmd.setReadTimeout(timeout)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) zAdd(a []interface{}, n int, members ...*Z) *IntCmd {
- for i, m := range members {
- a[n+2*i] = m.Score
- a[n+2*i+1] = m.Member
- }
- cmd := NewIntCmd(a...)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `ZADD key score member [score member ...]` command.
-func (c cmdable) ZAdd(key string, members ...*Z) *IntCmd {
- const n = 2
- a := make([]interface{}, n+2*len(members))
- a[0], a[1] = "zadd", key
- return c.zAdd(a, n, members...)
-}
-
-// Redis `ZADD key NX score member [score member ...]` command.
-func (c cmdable) ZAddNX(key string, members ...*Z) *IntCmd {
- const n = 3
- a := make([]interface{}, n+2*len(members))
- a[0], a[1], a[2] = "zadd", key, "nx"
- return c.zAdd(a, n, members...)
-}
-
-// Redis `ZADD key XX score member [score member ...]` command.
-func (c cmdable) ZAddXX(key string, members ...*Z) *IntCmd {
- const n = 3
- a := make([]interface{}, n+2*len(members))
- a[0], a[1], a[2] = "zadd", key, "xx"
- return c.zAdd(a, n, members...)
-}
-
-// Redis `ZADD key CH score member [score member ...]` command.
-func (c cmdable) ZAddCh(key string, members ...*Z) *IntCmd {
- const n = 3
- a := make([]interface{}, n+2*len(members))
- a[0], a[1], a[2] = "zadd", key, "ch"
- return c.zAdd(a, n, members...)
-}
-
-// Redis `ZADD key NX CH score member [score member ...]` command.
-func (c cmdable) ZAddNXCh(key string, members ...*Z) *IntCmd {
- const n = 4
- a := make([]interface{}, n+2*len(members))
- a[0], a[1], a[2], a[3] = "zadd", key, "nx", "ch"
- return c.zAdd(a, n, members...)
-}
-
-// Redis `ZADD key XX CH score member [score member ...]` command.
-func (c cmdable) ZAddXXCh(key string, members ...*Z) *IntCmd {
- const n = 4
- a := make([]interface{}, n+2*len(members))
- a[0], a[1], a[2], a[3] = "zadd", key, "xx", "ch"
- return c.zAdd(a, n, members...)
-}
-
-func (c cmdable) zIncr(a []interface{}, n int, members ...*Z) *FloatCmd {
- for i, m := range members {
- a[n+2*i] = m.Score
- a[n+2*i+1] = m.Member
- }
- cmd := NewFloatCmd(a...)
- _ = c(cmd)
- return cmd
-}
-
-// Redis `ZADD key INCR score member` command.
-func (c cmdable) ZIncr(key string, member *Z) *FloatCmd {
- const n = 3
- a := make([]interface{}, n+2)
- a[0], a[1], a[2] = "zadd", key, "incr"
- return c.zIncr(a, n, member)
-}
-
-// Redis `ZADD key NX INCR score member` command.
-func (c cmdable) ZIncrNX(key string, member *Z) *FloatCmd {
- const n = 4
- a := make([]interface{}, n+2)
- a[0], a[1], a[2], a[3] = "zadd", key, "incr", "nx"
- return c.zIncr(a, n, member)
-}
-
-// Redis `ZADD key XX INCR score member` command.
-func (c cmdable) ZIncrXX(key string, member *Z) *FloatCmd {
- const n = 4
- a := make([]interface{}, n+2)
- a[0], a[1], a[2], a[3] = "zadd", key, "incr", "xx"
- return c.zIncr(a, n, member)
-}
-
-func (c cmdable) ZCard(key string) *IntCmd {
- cmd := NewIntCmd("zcard", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZCount(key, min, max string) *IntCmd {
- cmd := NewIntCmd("zcount", key, min, max)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZLexCount(key, min, max string) *IntCmd {
- cmd := NewIntCmd("zlexcount", key, min, max)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZIncrBy(key string, increment float64, member string) *FloatCmd {
- cmd := NewFloatCmd("zincrby", key, increment, member)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZInterStore(destination string, store *ZStore) *IntCmd {
- args := make([]interface{}, 3+len(store.Keys))
- args[0] = "zinterstore"
- args[1] = destination
- args[2] = len(store.Keys)
- for i, key := range store.Keys {
- args[3+i] = key
- }
- if len(store.Weights) > 0 {
- args = append(args, "weights")
- for _, weight := range store.Weights {
- args = append(args, weight)
- }
- }
- if store.Aggregate != "" {
- args = append(args, "aggregate", store.Aggregate)
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZPopMax(key string, count ...int64) *ZSliceCmd {
- args := []interface{}{
- "zpopmax",
- key,
- }
-
- switch len(count) {
- case 0:
- break
- case 1:
- args = append(args, count[0])
- default:
- panic("too many arguments")
- }
-
- cmd := NewZSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZPopMin(key string, count ...int64) *ZSliceCmd {
- args := []interface{}{
- "zpopmin",
- key,
- }
-
- switch len(count) {
- case 0:
- break
- case 1:
- args = append(args, count[0])
- default:
- panic("too many arguments")
- }
-
- cmd := NewZSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) zRange(key string, start, stop int64, withScores bool) *StringSliceCmd {
- args := []interface{}{
- "zrange",
- key,
- start,
- stop,
- }
- if withScores {
- args = append(args, "withscores")
- }
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRange(key string, start, stop int64) *StringSliceCmd {
- return c.zRange(key, start, stop, false)
-}
-
-func (c cmdable) ZRangeWithScores(key string, start, stop int64) *ZSliceCmd {
- cmd := NewZSliceCmd("zrange", key, start, stop, "withscores")
- _ = c(cmd)
- return cmd
-}
-
-type ZRangeBy struct {
- Min, Max string
- Offset, Count int64
-}
-
-func (c cmdable) zRangeBy(zcmd, key string, opt *ZRangeBy, withScores bool) *StringSliceCmd {
- args := []interface{}{zcmd, key, opt.Min, opt.Max}
- if withScores {
- args = append(args, "withscores")
- }
- if opt.Offset != 0 || opt.Count != 0 {
- args = append(
- args,
- "limit",
- opt.Offset,
- opt.Count,
- )
- }
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRangeByScore(key string, opt *ZRangeBy) *StringSliceCmd {
- return c.zRangeBy("zrangebyscore", key, opt, false)
-}
-
-func (c cmdable) ZRangeByLex(key string, opt *ZRangeBy) *StringSliceCmd {
- return c.zRangeBy("zrangebylex", key, opt, false)
-}
-
-func (c cmdable) ZRangeByScoreWithScores(key string, opt *ZRangeBy) *ZSliceCmd {
- args := []interface{}{"zrangebyscore", key, opt.Min, opt.Max, "withscores"}
- if opt.Offset != 0 || opt.Count != 0 {
- args = append(
- args,
- "limit",
- opt.Offset,
- opt.Count,
- )
- }
- cmd := NewZSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRank(key, member string) *IntCmd {
- cmd := NewIntCmd("zrank", key, member)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRem(key string, members ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(members))
- args[0] = "zrem"
- args[1] = key
- args = appendArgs(args, members)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRemRangeByRank(key string, start, stop int64) *IntCmd {
- cmd := NewIntCmd(
- "zremrangebyrank",
- key,
- start,
- stop,
- )
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRemRangeByScore(key, min, max string) *IntCmd {
- cmd := NewIntCmd("zremrangebyscore", key, min, max)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRemRangeByLex(key, min, max string) *IntCmd {
- cmd := NewIntCmd("zremrangebylex", key, min, max)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRevRange(key string, start, stop int64) *StringSliceCmd {
- cmd := NewStringSliceCmd("zrevrange", key, start, stop)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRevRangeWithScores(key string, start, stop int64) *ZSliceCmd {
- cmd := NewZSliceCmd("zrevrange", key, start, stop, "withscores")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) zRevRangeBy(zcmd, key string, opt *ZRangeBy) *StringSliceCmd {
- args := []interface{}{zcmd, key, opt.Max, opt.Min}
- if opt.Offset != 0 || opt.Count != 0 {
- args = append(
- args,
- "limit",
- opt.Offset,
- opt.Count,
- )
- }
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRevRangeByScore(key string, opt *ZRangeBy) *StringSliceCmd {
- return c.zRevRangeBy("zrevrangebyscore", key, opt)
-}
-
-func (c cmdable) ZRevRangeByLex(key string, opt *ZRangeBy) *StringSliceCmd {
- return c.zRevRangeBy("zrevrangebylex", key, opt)
-}
-
-func (c cmdable) ZRevRangeByScoreWithScores(key string, opt *ZRangeBy) *ZSliceCmd {
- args := []interface{}{"zrevrangebyscore", key, opt.Max, opt.Min, "withscores"}
- if opt.Offset != 0 || opt.Count != 0 {
- args = append(
- args,
- "limit",
- opt.Offset,
- opt.Count,
- )
- }
- cmd := NewZSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZRevRank(key, member string) *IntCmd {
- cmd := NewIntCmd("zrevrank", key, member)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZScore(key, member string) *FloatCmd {
- cmd := NewFloatCmd("zscore", key, member)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ZUnionStore(dest string, store *ZStore) *IntCmd {
- args := make([]interface{}, 3+len(store.Keys))
- args[0] = "zunionstore"
- args[1] = dest
- args[2] = len(store.Keys)
- for i, key := range store.Keys {
- args[3+i] = key
- }
- if len(store.Weights) > 0 {
- args = append(args, "weights")
- for _, weight := range store.Weights {
- args = append(args, weight)
- }
- }
- if store.Aggregate != "" {
- args = append(args, "aggregate", store.Aggregate)
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) PFAdd(key string, els ...interface{}) *IntCmd {
- args := make([]interface{}, 2, 2+len(els))
- args[0] = "pfadd"
- args[1] = key
- args = appendArgs(args, els)
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) PFCount(keys ...string) *IntCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "pfcount"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) PFMerge(dest string, keys ...string) *StatusCmd {
- args := make([]interface{}, 2+len(keys))
- args[0] = "pfmerge"
- args[1] = dest
- for i, key := range keys {
- args[2+i] = key
- }
- cmd := NewStatusCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) BgRewriteAOF() *StatusCmd {
- cmd := NewStatusCmd("bgrewriteaof")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) BgSave() *StatusCmd {
- cmd := NewStatusCmd("bgsave")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClientKill(ipPort string) *StatusCmd {
- cmd := NewStatusCmd("client", "kill", ipPort)
- _ = c(cmd)
- return cmd
-}
-
-// ClientKillByFilter is new style synx, while the ClientKill is old
-// CLIENT KILL [value] ... [value]
-func (c cmdable) ClientKillByFilter(keys ...string) *IntCmd {
- args := make([]interface{}, 2+len(keys))
- args[0] = "client"
- args[1] = "kill"
- for i, key := range keys {
- args[2+i] = key
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClientList() *StringCmd {
- cmd := NewStringCmd("client", "list")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClientPause(dur time.Duration) *BoolCmd {
- cmd := NewBoolCmd("client", "pause", formatMs(dur))
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClientID() *IntCmd {
- cmd := NewIntCmd("client", "id")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClientUnblock(id int64) *IntCmd {
- cmd := NewIntCmd("client", "unblock", id)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClientUnblockWithError(id int64) *IntCmd {
- cmd := NewIntCmd("client", "unblock", id, "error")
- _ = c(cmd)
- return cmd
-}
-
-// ClientSetName assigns a name to the connection.
-func (c statefulCmdable) ClientSetName(name string) *BoolCmd {
- cmd := NewBoolCmd("client", "setname", name)
- _ = c(cmd)
- return cmd
-}
-
-// ClientGetName returns the name of the connection.
-func (c cmdable) ClientGetName() *StringCmd {
- cmd := NewStringCmd("client", "getname")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ConfigGet(parameter string) *SliceCmd {
- cmd := NewSliceCmd("config", "get", parameter)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ConfigResetStat() *StatusCmd {
- cmd := NewStatusCmd("config", "resetstat")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ConfigSet(parameter, value string) *StatusCmd {
- cmd := NewStatusCmd("config", "set", parameter, value)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ConfigRewrite() *StatusCmd {
- cmd := NewStatusCmd("config", "rewrite")
- _ = c(cmd)
- return cmd
-}
-
-// Deperecated. Use DBSize instead.
-func (c cmdable) DbSize() *IntCmd {
- return c.DBSize()
-}
-
-func (c cmdable) DBSize() *IntCmd {
- cmd := NewIntCmd("dbsize")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) FlushAll() *StatusCmd {
- cmd := NewStatusCmd("flushall")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) FlushAllAsync() *StatusCmd {
- cmd := NewStatusCmd("flushall", "async")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) FlushDB() *StatusCmd {
- cmd := NewStatusCmd("flushdb")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) FlushDBAsync() *StatusCmd {
- cmd := NewStatusCmd("flushdb", "async")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Info(section ...string) *StringCmd {
- args := []interface{}{"info"}
- if len(section) > 0 {
- args = append(args, section[0])
- }
- cmd := NewStringCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) LastSave() *IntCmd {
- cmd := NewIntCmd("lastsave")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) Save() *StatusCmd {
- cmd := NewStatusCmd("save")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) shutdown(modifier string) *StatusCmd {
- var args []interface{}
- if modifier == "" {
- args = []interface{}{"shutdown"}
- } else {
- args = []interface{}{"shutdown", modifier}
- }
- cmd := NewStatusCmd(args...)
- _ = c(cmd)
- if err := cmd.Err(); err != nil {
- if err == io.EOF {
- // Server quit as expected.
- cmd.err = nil
- }
- } else {
- // Server did not quit. String reply contains the reason.
- cmd.err = errors.New(cmd.val)
- cmd.val = ""
- }
- return cmd
-}
-
-func (c cmdable) Shutdown() *StatusCmd {
- return c.shutdown("")
-}
-
-func (c cmdable) ShutdownSave() *StatusCmd {
- return c.shutdown("save")
-}
-
-func (c cmdable) ShutdownNoSave() *StatusCmd {
- return c.shutdown("nosave")
-}
-
-func (c cmdable) SlaveOf(host, port string) *StatusCmd {
- cmd := NewStatusCmd("slaveof", host, port)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) SlowLog() {
- panic("not implemented")
-}
-
-func (c cmdable) Sync() {
- panic("not implemented")
-}
-
-func (c cmdable) Time() *TimeCmd {
- cmd := NewTimeCmd("time")
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) Eval(script string, keys []string, args ...interface{}) *Cmd {
- cmdArgs := make([]interface{}, 3+len(keys), 3+len(keys)+len(args))
- cmdArgs[0] = "eval"
- cmdArgs[1] = script
- cmdArgs[2] = len(keys)
- for i, key := range keys {
- cmdArgs[3+i] = key
- }
- cmdArgs = appendArgs(cmdArgs, args)
- cmd := NewCmd(cmdArgs...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd {
- cmdArgs := make([]interface{}, 3+len(keys), 3+len(keys)+len(args))
- cmdArgs[0] = "evalsha"
- cmdArgs[1] = sha1
- cmdArgs[2] = len(keys)
- for i, key := range keys {
- cmdArgs[3+i] = key
- }
- cmdArgs = appendArgs(cmdArgs, args)
- cmd := NewCmd(cmdArgs...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ScriptExists(hashes ...string) *BoolSliceCmd {
- args := make([]interface{}, 2+len(hashes))
- args[0] = "script"
- args[1] = "exists"
- for i, hash := range hashes {
- args[2+i] = hash
- }
- cmd := NewBoolSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ScriptFlush() *StatusCmd {
- cmd := NewStatusCmd("script", "flush")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ScriptKill() *StatusCmd {
- cmd := NewStatusCmd("script", "kill")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ScriptLoad(script string) *StringCmd {
- cmd := NewStringCmd("script", "load", script)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) DebugObject(key string) *StringCmd {
- cmd := NewStringCmd("debug", "object", key)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-// Publish posts the message to the channel.
-func (c cmdable) Publish(channel string, message interface{}) *IntCmd {
- cmd := NewIntCmd("publish", channel, message)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) PubSubChannels(pattern string) *StringSliceCmd {
- args := []interface{}{"pubsub", "channels"}
- if pattern != "*" {
- args = append(args, pattern)
- }
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) PubSubNumSub(channels ...string) *StringIntMapCmd {
- args := make([]interface{}, 2+len(channels))
- args[0] = "pubsub"
- args[1] = "numsub"
- for i, channel := range channels {
- args[2+i] = channel
- }
- cmd := NewStringIntMapCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) PubSubNumPat() *IntCmd {
- cmd := NewIntCmd("pubsub", "numpat")
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) ClusterSlots() *ClusterSlotsCmd {
- cmd := NewClusterSlotsCmd("cluster", "slots")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterNodes() *StringCmd {
- cmd := NewStringCmd("cluster", "nodes")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterMeet(host, port string) *StatusCmd {
- cmd := NewStatusCmd("cluster", "meet", host, port)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterForget(nodeID string) *StatusCmd {
- cmd := NewStatusCmd("cluster", "forget", nodeID)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterReplicate(nodeID string) *StatusCmd {
- cmd := NewStatusCmd("cluster", "replicate", nodeID)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterResetSoft() *StatusCmd {
- cmd := NewStatusCmd("cluster", "reset", "soft")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterResetHard() *StatusCmd {
- cmd := NewStatusCmd("cluster", "reset", "hard")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterInfo() *StringCmd {
- cmd := NewStringCmd("cluster", "info")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterKeySlot(key string) *IntCmd {
- cmd := NewIntCmd("cluster", "keyslot", key)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterGetKeysInSlot(slot int, count int) *StringSliceCmd {
- cmd := NewStringSliceCmd("cluster", "getkeysinslot", slot, count)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterCountFailureReports(nodeID string) *IntCmd {
- cmd := NewIntCmd("cluster", "count-failure-reports", nodeID)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterCountKeysInSlot(slot int) *IntCmd {
- cmd := NewIntCmd("cluster", "countkeysinslot", slot)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterDelSlots(slots ...int) *StatusCmd {
- args := make([]interface{}, 2+len(slots))
- args[0] = "cluster"
- args[1] = "delslots"
- for i, slot := range slots {
- args[2+i] = slot
- }
- cmd := NewStatusCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterDelSlotsRange(min, max int) *StatusCmd {
- size := max - min + 1
- slots := make([]int, size)
- for i := 0; i < size; i++ {
- slots[i] = min + i
- }
- return c.ClusterDelSlots(slots...)
-}
-
-func (c cmdable) ClusterSaveConfig() *StatusCmd {
- cmd := NewStatusCmd("cluster", "saveconfig")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterSlaves(nodeID string) *StringSliceCmd {
- cmd := NewStringSliceCmd("cluster", "slaves", nodeID)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ReadOnly() *StatusCmd {
- cmd := NewStatusCmd("readonly")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ReadWrite() *StatusCmd {
- cmd := NewStatusCmd("readwrite")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterFailover() *StatusCmd {
- cmd := NewStatusCmd("cluster", "failover")
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterAddSlots(slots ...int) *StatusCmd {
- args := make([]interface{}, 2+len(slots))
- args[0] = "cluster"
- args[1] = "addslots"
- for i, num := range slots {
- args[2+i] = num
- }
- cmd := NewStatusCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) ClusterAddSlotsRange(min, max int) *StatusCmd {
- size := max - min + 1
- slots := make([]int, size)
- for i := 0; i < size; i++ {
- slots[i] = min + i
- }
- return c.ClusterAddSlots(slots...)
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) GeoAdd(key string, geoLocation ...*GeoLocation) *IntCmd {
- args := make([]interface{}, 2+3*len(geoLocation))
- args[0] = "geoadd"
- args[1] = key
- for i, eachLoc := range geoLocation {
- args[2+3*i] = eachLoc.Longitude
- args[2+3*i+1] = eachLoc.Latitude
- args[2+3*i+2] = eachLoc.Name
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-// GeoRadius is a read-only GEORADIUS_RO command.
-func (c cmdable) GeoRadius(key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd {
- cmd := NewGeoLocationCmd(query, "georadius_ro", key, longitude, latitude)
- if query.Store != "" || query.StoreDist != "" {
- cmd.SetErr(errors.New("GeoRadius does not support Store or StoreDist"))
- return cmd
- }
- _ = c(cmd)
- return cmd
-}
-
-// GeoRadiusStore is a writing GEORADIUS command.
-func (c cmdable) GeoRadiusStore(key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd {
- args := geoLocationArgs(query, "georadius", key, longitude, latitude)
- cmd := NewIntCmd(args...)
- if query.Store == "" && query.StoreDist == "" {
- cmd.SetErr(errors.New("GeoRadiusStore requires Store or StoreDist"))
- return cmd
- }
- _ = c(cmd)
- return cmd
-}
-
-// GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
-func (c cmdable) GeoRadiusByMember(key, member string, query *GeoRadiusQuery) *GeoLocationCmd {
- cmd := NewGeoLocationCmd(query, "georadiusbymember_ro", key, member)
- if query.Store != "" || query.StoreDist != "" {
- cmd.SetErr(errors.New("GeoRadiusByMember does not support Store or StoreDist"))
- return cmd
- }
- _ = c(cmd)
- return cmd
-}
-
-// GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
-func (c cmdable) GeoRadiusByMemberStore(key, member string, query *GeoRadiusQuery) *IntCmd {
- args := geoLocationArgs(query, "georadiusbymember", key, member)
- cmd := NewIntCmd(args...)
- if query.Store == "" && query.StoreDist == "" {
- cmd.SetErr(errors.New("GeoRadiusByMemberStore requires Store or StoreDist"))
- return cmd
- }
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) GeoDist(key string, member1, member2, unit string) *FloatCmd {
- if unit == "" {
- unit = "km"
- }
- cmd := NewFloatCmd("geodist", key, member1, member2, unit)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) GeoHash(key string, members ...string) *StringSliceCmd {
- args := make([]interface{}, 2+len(members))
- args[0] = "geohash"
- args[1] = key
- for i, member := range members {
- args[2+i] = member
- }
- cmd := NewStringSliceCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-func (c cmdable) GeoPos(key string, members ...string) *GeoPosCmd {
- args := make([]interface{}, 2+len(members))
- args[0] = "geopos"
- args[1] = key
- for i, member := range members {
- args[2+i] = member
- }
- cmd := NewGeoPosCmd(args...)
- _ = c(cmd)
- return cmd
-}
-
-//------------------------------------------------------------------------------
-
-func (c cmdable) MemoryUsage(key string, samples ...int) *IntCmd {
- args := []interface{}{"memory", "usage", key}
- if len(samples) > 0 {
- if len(samples) != 1 {
- panic("MemoryUsage expects single sample count")
- }
- args = append(args, "SAMPLES", samples[0])
- }
- cmd := NewIntCmd(args...)
- _ = c(cmd)
- return cmd
-}
diff --git a/vendor/github.com/go-redis/redis/v7/doc.go b/vendor/github.com/go-redis/redis/v7/doc.go
deleted file mode 100644
index 55262533a..000000000
--- a/vendor/github.com/go-redis/redis/v7/doc.go
+++ /dev/null
@@ -1,4 +0,0 @@
-/*
-Package redis implements a Redis client.
-*/
-package redis
diff --git a/vendor/github.com/go-redis/redis/v7/error.go b/vendor/github.com/go-redis/redis/v7/error.go
deleted file mode 100644
index 0ffaca9f8..000000000
--- a/vendor/github.com/go-redis/redis/v7/error.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package redis
-
-import (
- "context"
- "io"
- "net"
- "strings"
-
- "github.com/go-redis/redis/v7/internal/pool"
- "github.com/go-redis/redis/v7/internal/proto"
-)
-
-var ErrClosed = pool.ErrClosed
-
-type Error interface {
- error
-
- // RedisError is a no-op function but
- // serves to distinguish types that are Redis
- // errors from ordinary errors: a type is a
- // Redis error if it has a RedisError method.
- RedisError()
-}
-
-var _ Error = proto.RedisError("")
-
-func isRetryableError(err error, retryTimeout bool) bool {
- switch err {
- case nil, context.Canceled, context.DeadlineExceeded:
- return false
- case io.EOF:
- return true
- }
- if netErr, ok := err.(net.Error); ok {
- if netErr.Timeout() {
- return retryTimeout
- }
- return true
- }
-
- s := err.Error()
- if s == "ERR max number of clients reached" {
- return true
- }
- if strings.HasPrefix(s, "LOADING ") {
- return true
- }
- if strings.HasPrefix(s, "READONLY ") {
- return true
- }
- if strings.HasPrefix(s, "CLUSTERDOWN ") {
- return true
- }
- return false
-}
-
-func isRedisError(err error) bool {
- _, ok := err.(proto.RedisError)
- return ok
-}
-
-func isBadConn(err error, allowTimeout bool) bool {
- if err == nil {
- return false
- }
- if isRedisError(err) {
- // Close connections in read only state in case domain addr is used
- // and domain resolves to a different Redis Server. See #790.
- return isReadOnlyError(err)
- }
- if allowTimeout {
- if netErr, ok := err.(net.Error); ok && netErr.Timeout() {
- return false
- }
- }
- return true
-}
-
-func isMovedError(err error) (moved bool, ask bool, addr string) {
- if !isRedisError(err) {
- return
- }
-
- s := err.Error()
- switch {
- case strings.HasPrefix(s, "MOVED "):
- moved = true
- case strings.HasPrefix(s, "ASK "):
- ask = true
- default:
- return
- }
-
- ind := strings.LastIndex(s, " ")
- if ind == -1 {
- return false, false, ""
- }
- addr = s[ind+1:]
- return
-}
-
-func isLoadingError(err error) bool {
- return strings.HasPrefix(err.Error(), "LOADING ")
-}
-
-func isReadOnlyError(err error) bool {
- return strings.HasPrefix(err.Error(), "READONLY ")
-}
diff --git a/vendor/github.com/go-redis/redis/v7/go.mod b/vendor/github.com/go-redis/redis/v7/go.mod
deleted file mode 100644
index e3a4dec54..000000000
--- a/vendor/github.com/go-redis/redis/v7/go.mod
+++ /dev/null
@@ -1,15 +0,0 @@
-module github.com/go-redis/redis/v7
-
-require (
- github.com/golang/protobuf v1.3.2 // indirect
- github.com/kr/pretty v0.1.0 // indirect
- github.com/onsi/ginkgo v1.10.1
- github.com/onsi/gomega v1.7.0
- golang.org/x/net v0.0.0-20190923162816-aa69164e4478 // indirect
- golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect
- golang.org/x/text v0.3.2 // indirect
- gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
- gopkg.in/yaml.v2 v2.2.4 // indirect
-)
-
-go 1.11
diff --git a/vendor/github.com/go-redis/redis/v7/go.sum b/vendor/github.com/go-redis/redis/v7/go.sum
deleted file mode 100644
index 6a04dbb63..000000000
--- a/vendor/github.com/go-redis/redis/v7/go.sum
+++ /dev/null
@@ -1,47 +0,0 @@
-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
-github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
-github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g=
-golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20191010194322-b09406accb47 h1:/XfQ9z7ib8eEJX2hdgFTZJ/ntt0swNk5oYBziWeTCvY=
-golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/go-redis/redis/v7/internal/consistenthash/consistenthash.go b/vendor/github.com/go-redis/redis/v7/internal/consistenthash/consistenthash.go
deleted file mode 100644
index a9c56f076..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/consistenthash/consistenthash.go
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-Copyright 2013 Google Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Package consistenthash provides an implementation of a ring hash.
-package consistenthash
-
-import (
- "hash/crc32"
- "sort"
- "strconv"
-)
-
-type Hash func(data []byte) uint32
-
-type Map struct {
- hash Hash
- replicas int
- keys []int // Sorted
- hashMap map[int]string
-}
-
-func New(replicas int, fn Hash) *Map {
- m := &Map{
- replicas: replicas,
- hash: fn,
- hashMap: make(map[int]string),
- }
- if m.hash == nil {
- m.hash = crc32.ChecksumIEEE
- }
- return m
-}
-
-// Returns true if there are no items available.
-func (m *Map) IsEmpty() bool {
- return len(m.keys) == 0
-}
-
-// Adds some keys to the hash.
-func (m *Map) Add(keys ...string) {
- for _, key := range keys {
- for i := 0; i < m.replicas; i++ {
- hash := int(m.hash([]byte(strconv.Itoa(i) + key)))
- m.keys = append(m.keys, hash)
- m.hashMap[hash] = key
- }
- }
- sort.Ints(m.keys)
-}
-
-// Gets the closest item in the hash to the provided key.
-func (m *Map) Get(key string) string {
- if m.IsEmpty() {
- return ""
- }
-
- hash := int(m.hash([]byte(key)))
-
- // Binary search for appropriate replica.
- idx := sort.Search(len(m.keys), func(i int) bool { return m.keys[i] >= hash })
-
- // Means we have cycled back to the first replica.
- if idx == len(m.keys) {
- idx = 0
- }
-
- return m.hashMap[m.keys[idx]]
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/hashtag/hashtag.go b/vendor/github.com/go-redis/redis/v7/internal/hashtag/hashtag.go
deleted file mode 100644
index 22f5b3981..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/hashtag/hashtag.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package hashtag
-
-import (
- "math/rand"
- "strings"
-)
-
-const slotNumber = 16384
-
-// CRC16 implementation according to CCITT standards.
-// Copyright 2001-2010 Georges Menie (www.menie.org)
-// Copyright 2013 The Go Authors. All rights reserved.
-// http://redis.io/topics/cluster-spec#appendix-a-crc16-reference-implementation-in-ansi-c
-var crc16tab = [256]uint16{
- 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
- 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
- 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,
- 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de,
- 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485,
- 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d,
- 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4,
- 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc,
- 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823,
- 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b,
- 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12,
- 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a,
- 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41,
- 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49,
- 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70,
- 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78,
- 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f,
- 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067,
- 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e,
- 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256,
- 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d,
- 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
- 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c,
- 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634,
- 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab,
- 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3,
- 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a,
- 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92,
- 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9,
- 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1,
- 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8,
- 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0,
-}
-
-func Key(key string) string {
- if s := strings.IndexByte(key, '{'); s > -1 {
- if e := strings.IndexByte(key[s+1:], '}'); e > 0 {
- return key[s+1 : s+e+1]
- }
- }
- return key
-}
-
-func RandomSlot() int {
- return rand.Intn(slotNumber)
-}
-
-// hashSlot returns a consistent slot number between 0 and 16383
-// for any given string key.
-func Slot(key string) int {
- if key == "" {
- return RandomSlot()
- }
- key = Key(key)
- return int(crc16sum(key)) % slotNumber
-}
-
-func crc16sum(key string) (crc uint16) {
- for i := 0; i < len(key); i++ {
- crc = (crc << 8) ^ crc16tab[(byte(crc>>8)^key[i])&0x00ff]
- }
- return
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/internal.go b/vendor/github.com/go-redis/redis/v7/internal/internal.go
deleted file mode 100644
index ad3fc3c9f..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/internal.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package internal
-
-import (
- "math/rand"
- "time"
-)
-
-// Retry backoff with jitter sleep to prevent overloaded conditions during intervals
-// https://www.awsarchitectureblog.com/2015/03/backoff.html
-func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration {
- if retry < 0 {
- retry = 0
- }
-
- backoff := minBackoff << uint(retry)
- if backoff > maxBackoff || backoff < minBackoff {
- backoff = maxBackoff
- }
-
- if backoff == 0 {
- return 0
- }
- return time.Duration(rand.Int63n(int64(backoff)))
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/log.go b/vendor/github.com/go-redis/redis/v7/internal/log.go
deleted file mode 100644
index 405a2728d..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/log.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package internal
-
-import (
- "log"
- "os"
-)
-
-var Logger = log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile)
diff --git a/vendor/github.com/go-redis/redis/v7/internal/once.go b/vendor/github.com/go-redis/redis/v7/internal/once.go
deleted file mode 100644
index 64f46272a..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/once.go
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-Copyright 2014 The Camlistore Authors
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package internal
-
-import (
- "sync"
- "sync/atomic"
-)
-
-// A Once will perform a successful action exactly once.
-//
-// Unlike a sync.Once, this Once's func returns an error
-// and is re-armed on failure.
-type Once struct {
- m sync.Mutex
- done uint32
-}
-
-// Do calls the function f if and only if Do has not been invoked
-// without error for this instance of Once. In other words, given
-// var once Once
-// if once.Do(f) is called multiple times, only the first call will
-// invoke f, even if f has a different value in each invocation unless
-// f returns an error. A new instance of Once is required for each
-// function to execute.
-//
-// Do is intended for initialization that must be run exactly once. Since f
-// is niladic, it may be necessary to use a function literal to capture the
-// arguments to a function to be invoked by Do:
-// err := config.once.Do(func() error { return config.init(filename) })
-func (o *Once) Do(f func() error) error {
- if atomic.LoadUint32(&o.done) == 1 {
- return nil
- }
- // Slow-path.
- o.m.Lock()
- defer o.m.Unlock()
- var err error
- if o.done == 0 {
- err = f()
- if err == nil {
- atomic.StoreUint32(&o.done, 1)
- }
- }
- return err
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/pool/conn.go b/vendor/github.com/go-redis/redis/v7/internal/pool/conn.go
deleted file mode 100644
index e9a258546..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/pool/conn.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package pool
-
-import (
- "context"
- "net"
- "sync/atomic"
- "time"
-
- "github.com/go-redis/redis/v7/internal/proto"
-)
-
-var noDeadline = time.Time{}
-
-type Conn struct {
- netConn net.Conn
-
- rd *proto.Reader
- wr *proto.Writer
-
- Inited bool
- pooled bool
- createdAt time.Time
- usedAt int64 // atomic
-}
-
-func NewConn(netConn net.Conn) *Conn {
- cn := &Conn{
- netConn: netConn,
- createdAt: time.Now(),
- }
- cn.rd = proto.NewReader(netConn)
- cn.wr = proto.NewWriter(netConn)
- cn.SetUsedAt(time.Now())
- return cn
-}
-
-func (cn *Conn) UsedAt() time.Time {
- unix := atomic.LoadInt64(&cn.usedAt)
- return time.Unix(unix, 0)
-}
-
-func (cn *Conn) SetUsedAt(tm time.Time) {
- atomic.StoreInt64(&cn.usedAt, tm.Unix())
-}
-
-func (cn *Conn) SetNetConn(netConn net.Conn) {
- cn.netConn = netConn
- cn.rd.Reset(netConn)
- cn.wr.Reset(netConn)
-}
-
-func (cn *Conn) Write(b []byte) (int, error) {
- return cn.netConn.Write(b)
-}
-
-func (cn *Conn) RemoteAddr() net.Addr {
- return cn.netConn.RemoteAddr()
-}
-
-func (cn *Conn) WithReader(ctx context.Context, timeout time.Duration, fn func(rd *proto.Reader) error) error {
- err := cn.netConn.SetReadDeadline(cn.deadline(ctx, timeout))
- if err != nil {
- return err
- }
- return fn(cn.rd)
-}
-
-func (cn *Conn) WithWriter(
- ctx context.Context, timeout time.Duration, fn func(wr *proto.Writer) error,
-) error {
- err := cn.netConn.SetWriteDeadline(cn.deadline(ctx, timeout))
- if err != nil {
- return err
- }
-
- if cn.wr.Buffered() > 0 {
- cn.wr.Reset(cn.netConn)
- }
-
- err = fn(cn.wr)
- if err != nil {
- return err
- }
-
- return cn.wr.Flush()
-}
-
-func (cn *Conn) Close() error {
- return cn.netConn.Close()
-}
-
-func (cn *Conn) deadline(ctx context.Context, timeout time.Duration) time.Time {
- tm := time.Now()
- cn.SetUsedAt(tm)
-
- if timeout > 0 {
- tm = tm.Add(timeout)
- }
-
- if ctx != nil {
- deadline, ok := ctx.Deadline()
- if ok {
- if timeout == 0 {
- return deadline
- }
- if deadline.Before(tm) {
- return deadline
- }
- return tm
- }
- }
-
- if timeout > 0 {
- return tm
- }
-
- return noDeadline
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/pool/pool.go b/vendor/github.com/go-redis/redis/v7/internal/pool/pool.go
deleted file mode 100644
index a8d8276a9..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/pool/pool.go
+++ /dev/null
@@ -1,517 +0,0 @@
-package pool
-
-import (
- "context"
- "errors"
- "net"
- "sync"
- "sync/atomic"
- "time"
-
- "github.com/go-redis/redis/v7/internal"
-)
-
-var ErrClosed = errors.New("redis: client is closed")
-var ErrPoolTimeout = errors.New("redis: connection pool timeout")
-
-var timers = sync.Pool{
- New: func() interface{} {
- t := time.NewTimer(time.Hour)
- t.Stop()
- return t
- },
-}
-
-// Stats contains pool state information and accumulated stats.
-type Stats struct {
- Hits uint32 // number of times free connection was found in the pool
- Misses uint32 // number of times free connection was NOT found in the pool
- Timeouts uint32 // number of times a wait timeout occurred
-
- TotalConns uint32 // number of total connections in the pool
- IdleConns uint32 // number of idle connections in the pool
- StaleConns uint32 // number of stale connections removed from the pool
-}
-
-type Pooler interface {
- NewConn(context.Context) (*Conn, error)
- CloseConn(*Conn) error
-
- Get(context.Context) (*Conn, error)
- Put(*Conn)
- Remove(*Conn, error)
-
- Len() int
- IdleLen() int
- Stats() *Stats
-
- Close() error
-}
-
-type Options struct {
- Dialer func(context.Context) (net.Conn, error)
- OnClose func(*Conn) error
-
- PoolSize int
- MinIdleConns int
- MaxConnAge time.Duration
- PoolTimeout time.Duration
- IdleTimeout time.Duration
- IdleCheckFrequency time.Duration
-}
-
-type ConnPool struct {
- opt *Options
-
- dialErrorsNum uint32 // atomic
-
- lastDialErrorMu sync.RWMutex
- lastDialError error
-
- queue chan struct{}
-
- connsMu sync.Mutex
- conns []*Conn
- idleConns []*Conn
- poolSize int
- idleConnsLen int
-
- stats Stats
-
- _closed uint32 // atomic
- closedCh chan struct{}
-}
-
-var _ Pooler = (*ConnPool)(nil)
-
-func NewConnPool(opt *Options) *ConnPool {
- p := &ConnPool{
- opt: opt,
-
- queue: make(chan struct{}, opt.PoolSize),
- conns: make([]*Conn, 0, opt.PoolSize),
- idleConns: make([]*Conn, 0, opt.PoolSize),
- closedCh: make(chan struct{}),
- }
-
- p.connsMu.Lock()
- p.checkMinIdleConns()
- p.connsMu.Unlock()
-
- if opt.IdleTimeout > 0 && opt.IdleCheckFrequency > 0 {
- go p.reaper(opt.IdleCheckFrequency)
- }
-
- return p
-}
-
-func (p *ConnPool) checkMinIdleConns() {
- if p.opt.MinIdleConns == 0 {
- return
- }
- for p.poolSize < p.opt.PoolSize && p.idleConnsLen < p.opt.MinIdleConns {
- p.poolSize++
- p.idleConnsLen++
- go func() {
- err := p.addIdleConn()
- if err != nil {
- p.connsMu.Lock()
- p.poolSize--
- p.idleConnsLen--
- p.connsMu.Unlock()
- }
- }()
- }
-}
-
-func (p *ConnPool) addIdleConn() error {
- cn, err := p.dialConn(context.TODO(), true)
- if err != nil {
- return err
- }
-
- p.connsMu.Lock()
- p.conns = append(p.conns, cn)
- p.idleConns = append(p.idleConns, cn)
- p.connsMu.Unlock()
- return nil
-}
-
-func (p *ConnPool) NewConn(ctx context.Context) (*Conn, error) {
- return p.newConn(ctx, false)
-}
-
-func (p *ConnPool) newConn(ctx context.Context, pooled bool) (*Conn, error) {
- cn, err := p.dialConn(ctx, pooled)
- if err != nil {
- return nil, err
- }
-
- p.connsMu.Lock()
- p.conns = append(p.conns, cn)
- if pooled {
- // If pool is full remove the cn on next Put.
- if p.poolSize >= p.opt.PoolSize {
- cn.pooled = false
- } else {
- p.poolSize++
- }
- }
- p.connsMu.Unlock()
- return cn, nil
-}
-
-func (p *ConnPool) dialConn(ctx context.Context, pooled bool) (*Conn, error) {
- if p.closed() {
- return nil, ErrClosed
- }
-
- if atomic.LoadUint32(&p.dialErrorsNum) >= uint32(p.opt.PoolSize) {
- return nil, p.getLastDialError()
- }
-
- netConn, err := p.opt.Dialer(ctx)
- if err != nil {
- p.setLastDialError(err)
- if atomic.AddUint32(&p.dialErrorsNum, 1) == uint32(p.opt.PoolSize) {
- go p.tryDial()
- }
- return nil, err
- }
-
- cn := NewConn(netConn)
- cn.pooled = pooled
- return cn, nil
-}
-
-func (p *ConnPool) tryDial() {
- for {
- if p.closed() {
- return
- }
-
- conn, err := p.opt.Dialer(context.Background())
- if err != nil {
- p.setLastDialError(err)
- time.Sleep(time.Second)
- continue
- }
-
- atomic.StoreUint32(&p.dialErrorsNum, 0)
- _ = conn.Close()
- return
- }
-}
-
-func (p *ConnPool) setLastDialError(err error) {
- p.lastDialErrorMu.Lock()
- p.lastDialError = err
- p.lastDialErrorMu.Unlock()
-}
-
-func (p *ConnPool) getLastDialError() error {
- p.lastDialErrorMu.RLock()
- err := p.lastDialError
- p.lastDialErrorMu.RUnlock()
- return err
-}
-
-// Get returns existed connection from the pool or creates a new one.
-func (p *ConnPool) Get(ctx context.Context) (*Conn, error) {
- if p.closed() {
- return nil, ErrClosed
- }
-
- err := p.waitTurn(ctx)
- if err != nil {
- return nil, err
- }
-
- for {
- p.connsMu.Lock()
- cn := p.popIdle()
- p.connsMu.Unlock()
-
- if cn == nil {
- break
- }
-
- if p.isStaleConn(cn) {
- _ = p.CloseConn(cn)
- continue
- }
-
- atomic.AddUint32(&p.stats.Hits, 1)
- return cn, nil
- }
-
- atomic.AddUint32(&p.stats.Misses, 1)
-
- newcn, err := p.newConn(ctx, true)
- if err != nil {
- p.freeTurn()
- return nil, err
- }
-
- return newcn, nil
-}
-
-func (p *ConnPool) getTurn() {
- p.queue <- struct{}{}
-}
-
-func (p *ConnPool) waitTurn(ctx context.Context) error {
- select {
- case <-ctx.Done():
- return ctx.Err()
- default:
- }
-
- select {
- case p.queue <- struct{}{}:
- return nil
- default:
- }
-
- timer := timers.Get().(*time.Timer)
- timer.Reset(p.opt.PoolTimeout)
-
- select {
- case <-ctx.Done():
- if !timer.Stop() {
- <-timer.C
- }
- timers.Put(timer)
- return ctx.Err()
- case p.queue <- struct{}{}:
- if !timer.Stop() {
- <-timer.C
- }
- timers.Put(timer)
- return nil
- case <-timer.C:
- timers.Put(timer)
- atomic.AddUint32(&p.stats.Timeouts, 1)
- return ErrPoolTimeout
- }
-}
-
-func (p *ConnPool) freeTurn() {
- <-p.queue
-}
-
-func (p *ConnPool) popIdle() *Conn {
- if len(p.idleConns) == 0 {
- return nil
- }
-
- idx := len(p.idleConns) - 1
- cn := p.idleConns[idx]
- p.idleConns = p.idleConns[:idx]
- p.idleConnsLen--
- p.checkMinIdleConns()
- return cn
-}
-
-func (p *ConnPool) Put(cn *Conn) {
- if cn.rd.Buffered() > 0 {
- internal.Logger.Printf("Conn has unread data")
- p.Remove(cn, BadConnError{})
- return
- }
-
- if !cn.pooled {
- p.Remove(cn, nil)
- return
- }
-
- p.connsMu.Lock()
- p.idleConns = append(p.idleConns, cn)
- p.idleConnsLen++
- p.connsMu.Unlock()
- p.freeTurn()
-}
-
-func (p *ConnPool) Remove(cn *Conn, reason error) {
- p.removeConnWithLock(cn)
- p.freeTurn()
- _ = p.closeConn(cn)
-}
-
-func (p *ConnPool) CloseConn(cn *Conn) error {
- p.removeConnWithLock(cn)
- return p.closeConn(cn)
-}
-
-func (p *ConnPool) removeConnWithLock(cn *Conn) {
- p.connsMu.Lock()
- p.removeConn(cn)
- p.connsMu.Unlock()
-}
-
-func (p *ConnPool) removeConn(cn *Conn) {
- for i, c := range p.conns {
- if c == cn {
- p.conns = append(p.conns[:i], p.conns[i+1:]...)
- if cn.pooled {
- p.poolSize--
- p.checkMinIdleConns()
- }
- return
- }
- }
-}
-
-func (p *ConnPool) closeConn(cn *Conn) error {
- if p.opt.OnClose != nil {
- _ = p.opt.OnClose(cn)
- }
- return cn.Close()
-}
-
-// Len returns total number of connections.
-func (p *ConnPool) Len() int {
- p.connsMu.Lock()
- n := len(p.conns)
- p.connsMu.Unlock()
- return n
-}
-
-// IdleLen returns number of idle connections.
-func (p *ConnPool) IdleLen() int {
- p.connsMu.Lock()
- n := p.idleConnsLen
- p.connsMu.Unlock()
- return n
-}
-
-func (p *ConnPool) Stats() *Stats {
- idleLen := p.IdleLen()
- return &Stats{
- Hits: atomic.LoadUint32(&p.stats.Hits),
- Misses: atomic.LoadUint32(&p.stats.Misses),
- Timeouts: atomic.LoadUint32(&p.stats.Timeouts),
-
- TotalConns: uint32(p.Len()),
- IdleConns: uint32(idleLen),
- StaleConns: atomic.LoadUint32(&p.stats.StaleConns),
- }
-}
-
-func (p *ConnPool) closed() bool {
- return atomic.LoadUint32(&p._closed) == 1
-}
-
-func (p *ConnPool) Filter(fn func(*Conn) bool) error {
- var firstErr error
- p.connsMu.Lock()
- for _, cn := range p.conns {
- if fn(cn) {
- if err := p.closeConn(cn); err != nil && firstErr == nil {
- firstErr = err
- }
- }
- }
- p.connsMu.Unlock()
- return firstErr
-}
-
-func (p *ConnPool) Close() error {
- if !atomic.CompareAndSwapUint32(&p._closed, 0, 1) {
- return ErrClosed
- }
- close(p.closedCh)
-
- var firstErr error
- p.connsMu.Lock()
- for _, cn := range p.conns {
- if err := p.closeConn(cn); err != nil && firstErr == nil {
- firstErr = err
- }
- }
- p.conns = nil
- p.poolSize = 0
- p.idleConns = nil
- p.idleConnsLen = 0
- p.connsMu.Unlock()
-
- return firstErr
-}
-
-func (p *ConnPool) reaper(frequency time.Duration) {
- ticker := time.NewTicker(frequency)
- defer ticker.Stop()
-
- for {
- select {
- case <-ticker.C:
- // It is possible that ticker and closedCh arrive together,
- // and select pseudo-randomly pick ticker case, we double
- // check here to prevent being executed after closed.
- if p.closed() {
- return
- }
- _, err := p.ReapStaleConns()
- if err != nil {
- internal.Logger.Printf("ReapStaleConns failed: %s", err)
- continue
- }
- case <-p.closedCh:
- return
- }
- }
-}
-
-func (p *ConnPool) ReapStaleConns() (int, error) {
- var n int
- for {
- p.getTurn()
-
- p.connsMu.Lock()
- cn := p.reapStaleConn()
- p.connsMu.Unlock()
- p.freeTurn()
-
- if cn != nil {
- _ = p.closeConn(cn)
- n++
- } else {
- break
- }
- }
- atomic.AddUint32(&p.stats.StaleConns, uint32(n))
- return n, nil
-}
-
-func (p *ConnPool) reapStaleConn() *Conn {
- if len(p.idleConns) == 0 {
- return nil
- }
-
- cn := p.idleConns[0]
- if !p.isStaleConn(cn) {
- return nil
- }
-
- p.idleConns = append(p.idleConns[:0], p.idleConns[1:]...)
- p.idleConnsLen--
- p.removeConn(cn)
-
- return cn
-}
-
-func (p *ConnPool) isStaleConn(cn *Conn) bool {
- if p.opt.IdleTimeout == 0 && p.opt.MaxConnAge == 0 {
- return false
- }
-
- now := time.Now()
- if p.opt.IdleTimeout > 0 && now.Sub(cn.UsedAt()) >= p.opt.IdleTimeout {
- return true
- }
- if p.opt.MaxConnAge > 0 && now.Sub(cn.createdAt) >= p.opt.MaxConnAge {
- return true
- }
-
- return false
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/pool/pool_single.go b/vendor/github.com/go-redis/redis/v7/internal/pool/pool_single.go
deleted file mode 100644
index 04758a00d..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/pool/pool_single.go
+++ /dev/null
@@ -1,208 +0,0 @@
-package pool
-
-import (
- "context"
- "fmt"
- "sync/atomic"
-)
-
-const (
- stateDefault = 0
- stateInited = 1
- stateClosed = 2
-)
-
-type BadConnError struct {
- wrapped error
-}
-
-var _ error = (*BadConnError)(nil)
-
-func (e BadConnError) Error() string {
- s := "redis: Conn is in a bad state"
- if e.wrapped != nil {
- s += ": " + e.wrapped.Error()
- }
- return s
-}
-
-func (e BadConnError) Unwrap() error {
- return e.wrapped
-}
-
-type SingleConnPool struct {
- pool Pooler
- level int32 // atomic
-
- state uint32 // atomic
- ch chan *Conn
-
- _badConnError atomic.Value
-}
-
-var _ Pooler = (*SingleConnPool)(nil)
-
-func NewSingleConnPool(pool Pooler) *SingleConnPool {
- p, ok := pool.(*SingleConnPool)
- if !ok {
- p = &SingleConnPool{
- pool: pool,
- ch: make(chan *Conn, 1),
- }
- }
- atomic.AddInt32(&p.level, 1)
- return p
-}
-
-func (p *SingleConnPool) SetConn(cn *Conn) {
- if atomic.CompareAndSwapUint32(&p.state, stateDefault, stateInited) {
- p.ch <- cn
- } else {
- panic("not reached")
- }
-}
-
-func (p *SingleConnPool) NewConn(ctx context.Context) (*Conn, error) {
- return p.pool.NewConn(ctx)
-}
-
-func (p *SingleConnPool) CloseConn(cn *Conn) error {
- return p.pool.CloseConn(cn)
-}
-
-func (p *SingleConnPool) Get(ctx context.Context) (*Conn, error) {
- // In worst case this races with Close which is not a very common operation.
- for i := 0; i < 1000; i++ {
- switch atomic.LoadUint32(&p.state) {
- case stateDefault:
- cn, err := p.pool.Get(ctx)
- if err != nil {
- return nil, err
- }
- if atomic.CompareAndSwapUint32(&p.state, stateDefault, stateInited) {
- return cn, nil
- }
- p.pool.Remove(cn, ErrClosed)
- case stateInited:
- if err := p.badConnError(); err != nil {
- return nil, err
- }
- cn, ok := <-p.ch
- if !ok {
- return nil, ErrClosed
- }
- return cn, nil
- case stateClosed:
- return nil, ErrClosed
- default:
- panic("not reached")
- }
- }
- return nil, fmt.Errorf("redis: SingleConnPool.Get: infinite loop")
-}
-
-func (p *SingleConnPool) Put(cn *Conn) {
- defer func() {
- if recover() != nil {
- p.freeConn(cn)
- }
- }()
- p.ch <- cn
-}
-
-func (p *SingleConnPool) freeConn(cn *Conn) {
- if err := p.badConnError(); err != nil {
- p.pool.Remove(cn, err)
- } else {
- p.pool.Put(cn)
- }
-}
-
-func (p *SingleConnPool) Remove(cn *Conn, reason error) {
- defer func() {
- if recover() != nil {
- p.pool.Remove(cn, ErrClosed)
- }
- }()
- p._badConnError.Store(BadConnError{wrapped: reason})
- p.ch <- cn
-}
-
-func (p *SingleConnPool) Len() int {
- switch atomic.LoadUint32(&p.state) {
- case stateDefault:
- return 0
- case stateInited:
- return 1
- case stateClosed:
- return 0
- default:
- panic("not reached")
- }
-}
-
-func (p *SingleConnPool) IdleLen() int {
- return len(p.ch)
-}
-
-func (p *SingleConnPool) Stats() *Stats {
- return &Stats{}
-}
-
-func (p *SingleConnPool) Close() error {
- level := atomic.AddInt32(&p.level, -1)
- if level > 0 {
- return nil
- }
-
- for i := 0; i < 1000; i++ {
- state := atomic.LoadUint32(&p.state)
- if state == stateClosed {
- return ErrClosed
- }
- if atomic.CompareAndSwapUint32(&p.state, state, stateClosed) {
- close(p.ch)
- cn, ok := <-p.ch
- if ok {
- p.freeConn(cn)
- }
- return nil
- }
- }
-
- return fmt.Errorf("redis: SingleConnPool.Close: infinite loop")
-}
-
-func (p *SingleConnPool) Reset() error {
- if p.badConnError() == nil {
- return nil
- }
-
- select {
- case cn, ok := <-p.ch:
- if !ok {
- return ErrClosed
- }
- p.pool.Remove(cn, ErrClosed)
- p._badConnError.Store(BadConnError{wrapped: nil})
- default:
- return fmt.Errorf("redis: SingleConnPool does not have a Conn")
- }
-
- if !atomic.CompareAndSwapUint32(&p.state, stateInited, stateDefault) {
- state := atomic.LoadUint32(&p.state)
- return fmt.Errorf("redis: invalid SingleConnPool state: %d", state)
- }
-
- return nil
-}
-
-func (p *SingleConnPool) badConnError() error {
- if v := p._badConnError.Load(); v != nil {
- err := v.(BadConnError)
- if err.wrapped != nil {
- return err
- }
- }
- return nil
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/pool/pool_sticky.go b/vendor/github.com/go-redis/redis/v7/internal/pool/pool_sticky.go
deleted file mode 100644
index d4a355a44..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/pool/pool_sticky.go
+++ /dev/null
@@ -1,112 +0,0 @@
-package pool
-
-import (
- "context"
- "sync"
-)
-
-type StickyConnPool struct {
- pool *ConnPool
- reusable bool
-
- cn *Conn
- closed bool
- mu sync.Mutex
-}
-
-var _ Pooler = (*StickyConnPool)(nil)
-
-func NewStickyConnPool(pool *ConnPool, reusable bool) *StickyConnPool {
- return &StickyConnPool{
- pool: pool,
- reusable: reusable,
- }
-}
-
-func (p *StickyConnPool) NewConn(context.Context) (*Conn, error) {
- panic("not implemented")
-}
-
-func (p *StickyConnPool) CloseConn(*Conn) error {
- panic("not implemented")
-}
-
-func (p *StickyConnPool) Get(ctx context.Context) (*Conn, error) {
- p.mu.Lock()
- defer p.mu.Unlock()
-
- if p.closed {
- return nil, ErrClosed
- }
- if p.cn != nil {
- return p.cn, nil
- }
-
- cn, err := p.pool.Get(ctx)
- if err != nil {
- return nil, err
- }
-
- p.cn = cn
- return cn, nil
-}
-
-func (p *StickyConnPool) putUpstream() {
- p.pool.Put(p.cn)
- p.cn = nil
-}
-
-func (p *StickyConnPool) Put(cn *Conn) {}
-
-func (p *StickyConnPool) removeUpstream(reason error) {
- p.pool.Remove(p.cn, reason)
- p.cn = nil
-}
-
-func (p *StickyConnPool) Remove(cn *Conn, reason error) {
- p.removeUpstream(reason)
-}
-
-func (p *StickyConnPool) Len() int {
- p.mu.Lock()
- defer p.mu.Unlock()
-
- if p.cn == nil {
- return 0
- }
- return 1
-}
-
-func (p *StickyConnPool) IdleLen() int {
- p.mu.Lock()
- defer p.mu.Unlock()
-
- if p.cn == nil {
- return 1
- }
- return 0
-}
-
-func (p *StickyConnPool) Stats() *Stats {
- return nil
-}
-
-func (p *StickyConnPool) Close() error {
- p.mu.Lock()
- defer p.mu.Unlock()
-
- if p.closed {
- return ErrClosed
- }
- p.closed = true
-
- if p.cn != nil {
- if p.reusable {
- p.putUpstream()
- } else {
- p.removeUpstream(ErrClosed)
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/proto/reader.go b/vendor/github.com/go-redis/redis/v7/internal/proto/reader.go
deleted file mode 100644
index d3f646e98..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/proto/reader.go
+++ /dev/null
@@ -1,314 +0,0 @@
-package proto
-
-import (
- "bufio"
- "fmt"
- "io"
-
- "github.com/go-redis/redis/v7/internal/util"
-)
-
-const (
- ErrorReply = '-'
- StatusReply = '+'
- IntReply = ':'
- StringReply = '$'
- ArrayReply = '*'
-)
-
-//------------------------------------------------------------------------------
-
-const Nil = RedisError("redis: nil")
-
-type RedisError string
-
-func (e RedisError) Error() string { return string(e) }
-
-func (RedisError) RedisError() {}
-
-//------------------------------------------------------------------------------
-
-type MultiBulkParse func(*Reader, int64) (interface{}, error)
-
-type Reader struct {
- rd *bufio.Reader
- _buf []byte
-}
-
-func NewReader(rd io.Reader) *Reader {
- return &Reader{
- rd: bufio.NewReader(rd),
- _buf: make([]byte, 64),
- }
-}
-
-func (r *Reader) Buffered() int {
- return r.rd.Buffered()
-}
-
-func (r *Reader) Peek(n int) ([]byte, error) {
- return r.rd.Peek(n)
-}
-
-func (r *Reader) Reset(rd io.Reader) {
- r.rd.Reset(rd)
-}
-
-func (r *Reader) ReadLine() ([]byte, error) {
- line, err := r.readLine()
- if err != nil {
- return nil, err
- }
- if isNilReply(line) {
- return nil, Nil
- }
- return line, nil
-}
-
-// readLine that returns an error if:
-// - there is a pending read error;
-// - or line does not end with \r\n.
-func (r *Reader) readLine() ([]byte, error) {
- b, err := r.rd.ReadSlice('\n')
- if err != nil {
- return nil, err
- }
- if len(b) <= 2 || b[len(b)-1] != '\n' || b[len(b)-2] != '\r' {
- return nil, fmt.Errorf("redis: invalid reply: %q", b)
- }
- b = b[:len(b)-2]
- return b, nil
-}
-
-func (r *Reader) ReadReply(m MultiBulkParse) (interface{}, error) {
- line, err := r.ReadLine()
- if err != nil {
- return nil, err
- }
-
- switch line[0] {
- case ErrorReply:
- return nil, ParseErrorReply(line)
- case StatusReply:
- return string(line[1:]), nil
- case IntReply:
- return util.ParseInt(line[1:], 10, 64)
- case StringReply:
- return r.readStringReply(line)
- case ArrayReply:
- n, err := parseArrayLen(line)
- if err != nil {
- return nil, err
- }
- if m == nil {
- err := fmt.Errorf("redis: got %.100q, but multi bulk parser is nil", line)
- return nil, err
- }
- return m(r, n)
- }
- return nil, fmt.Errorf("redis: can't parse %.100q", line)
-}
-
-func (r *Reader) ReadIntReply() (int64, error) {
- line, err := r.ReadLine()
- if err != nil {
- return 0, err
- }
- switch line[0] {
- case ErrorReply:
- return 0, ParseErrorReply(line)
- case IntReply:
- return util.ParseInt(line[1:], 10, 64)
- default:
- return 0, fmt.Errorf("redis: can't parse int reply: %.100q", line)
- }
-}
-
-func (r *Reader) ReadString() (string, error) {
- line, err := r.ReadLine()
- if err != nil {
- return "", err
- }
- switch line[0] {
- case ErrorReply:
- return "", ParseErrorReply(line)
- case StringReply:
- return r.readStringReply(line)
- case StatusReply:
- return string(line[1:]), nil
- case IntReply:
- return string(line[1:]), nil
- default:
- return "", fmt.Errorf("redis: can't parse reply=%.100q reading string", line)
- }
-}
-
-func (r *Reader) readStringReply(line []byte) (string, error) {
- if isNilReply(line) {
- return "", Nil
- }
-
- replyLen, err := util.Atoi(line[1:])
- if err != nil {
- return "", err
- }
-
- b := make([]byte, replyLen+2)
- _, err = io.ReadFull(r.rd, b)
- if err != nil {
- return "", err
- }
-
- return util.BytesToString(b[:replyLen]), nil
-}
-
-func (r *Reader) ReadArrayReply(m MultiBulkParse) (interface{}, error) {
- line, err := r.ReadLine()
- if err != nil {
- return nil, err
- }
- switch line[0] {
- case ErrorReply:
- return nil, ParseErrorReply(line)
- case ArrayReply:
- n, err := parseArrayLen(line)
- if err != nil {
- return nil, err
- }
- return m(r, n)
- default:
- return nil, fmt.Errorf("redis: can't parse array reply: %.100q", line)
- }
-}
-
-func (r *Reader) ReadArrayLen() (int64, error) {
- line, err := r.ReadLine()
- if err != nil {
- return 0, err
- }
- switch line[0] {
- case ErrorReply:
- return 0, ParseErrorReply(line)
- case ArrayReply:
- return parseArrayLen(line)
- default:
- return 0, fmt.Errorf("redis: can't parse array reply: %.100q", line)
- }
-}
-
-func (r *Reader) ReadScanReply() ([]string, uint64, error) {
- n, err := r.ReadArrayLen()
- if err != nil {
- return nil, 0, err
- }
- if n != 2 {
- return nil, 0, fmt.Errorf("redis: got %d elements in scan reply, expected 2", n)
- }
-
- cursor, err := r.ReadUint()
- if err != nil {
- return nil, 0, err
- }
-
- n, err = r.ReadArrayLen()
- if err != nil {
- return nil, 0, err
- }
-
- keys := make([]string, n)
- for i := int64(0); i < n; i++ {
- key, err := r.ReadString()
- if err != nil {
- return nil, 0, err
- }
- keys[i] = key
- }
-
- return keys, cursor, err
-}
-
-func (r *Reader) ReadInt() (int64, error) {
- b, err := r.readTmpBytesReply()
- if err != nil {
- return 0, err
- }
- return util.ParseInt(b, 10, 64)
-}
-
-func (r *Reader) ReadUint() (uint64, error) {
- b, err := r.readTmpBytesReply()
- if err != nil {
- return 0, err
- }
- return util.ParseUint(b, 10, 64)
-}
-
-func (r *Reader) ReadFloatReply() (float64, error) {
- b, err := r.readTmpBytesReply()
- if err != nil {
- return 0, err
- }
- return util.ParseFloat(b, 64)
-}
-
-func (r *Reader) readTmpBytesReply() ([]byte, error) {
- line, err := r.ReadLine()
- if err != nil {
- return nil, err
- }
- switch line[0] {
- case ErrorReply:
- return nil, ParseErrorReply(line)
- case StringReply:
- return r._readTmpBytesReply(line)
- case StatusReply:
- return line[1:], nil
- default:
- return nil, fmt.Errorf("redis: can't parse string reply: %.100q", line)
- }
-}
-
-func (r *Reader) _readTmpBytesReply(line []byte) ([]byte, error) {
- if isNilReply(line) {
- return nil, Nil
- }
-
- replyLen, err := util.Atoi(line[1:])
- if err != nil {
- return nil, err
- }
-
- buf := r.buf(replyLen + 2)
- _, err = io.ReadFull(r.rd, buf)
- if err != nil {
- return nil, err
- }
-
- return buf[:replyLen], nil
-}
-
-func (r *Reader) buf(n int) []byte {
- if n <= cap(r._buf) {
- return r._buf[:n]
- }
- d := n - cap(r._buf)
- r._buf = append(r._buf, make([]byte, d)...)
- return r._buf
-}
-
-func isNilReply(b []byte) bool {
- return len(b) == 3 &&
- (b[0] == StringReply || b[0] == ArrayReply) &&
- b[1] == '-' && b[2] == '1'
-}
-
-func ParseErrorReply(line []byte) error {
- return RedisError(string(line[1:]))
-}
-
-func parseArrayLen(line []byte) (int64, error) {
- if isNilReply(line) {
- return 0, Nil
- }
- return util.ParseInt(line[1:], 10, 64)
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/proto/scan.go b/vendor/github.com/go-redis/redis/v7/internal/proto/scan.go
deleted file mode 100644
index 90c1e4ae6..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/proto/scan.go
+++ /dev/null
@@ -1,166 +0,0 @@
-package proto
-
-import (
- "encoding"
- "fmt"
- "reflect"
-
- "github.com/go-redis/redis/v7/internal/util"
-)
-
-func Scan(b []byte, v interface{}) error {
- switch v := v.(type) {
- case nil:
- return fmt.Errorf("redis: Scan(nil)")
- case *string:
- *v = util.BytesToString(b)
- return nil
- case *[]byte:
- *v = b
- return nil
- case *int:
- var err error
- *v, err = util.Atoi(b)
- return err
- case *int8:
- n, err := util.ParseInt(b, 10, 8)
- if err != nil {
- return err
- }
- *v = int8(n)
- return nil
- case *int16:
- n, err := util.ParseInt(b, 10, 16)
- if err != nil {
- return err
- }
- *v = int16(n)
- return nil
- case *int32:
- n, err := util.ParseInt(b, 10, 32)
- if err != nil {
- return err
- }
- *v = int32(n)
- return nil
- case *int64:
- n, err := util.ParseInt(b, 10, 64)
- if err != nil {
- return err
- }
- *v = n
- return nil
- case *uint:
- n, err := util.ParseUint(b, 10, 64)
- if err != nil {
- return err
- }
- *v = uint(n)
- return nil
- case *uint8:
- n, err := util.ParseUint(b, 10, 8)
- if err != nil {
- return err
- }
- *v = uint8(n)
- return nil
- case *uint16:
- n, err := util.ParseUint(b, 10, 16)
- if err != nil {
- return err
- }
- *v = uint16(n)
- return nil
- case *uint32:
- n, err := util.ParseUint(b, 10, 32)
- if err != nil {
- return err
- }
- *v = uint32(n)
- return nil
- case *uint64:
- n, err := util.ParseUint(b, 10, 64)
- if err != nil {
- return err
- }
- *v = n
- return nil
- case *float32:
- n, err := util.ParseFloat(b, 32)
- if err != nil {
- return err
- }
- *v = float32(n)
- return err
- case *float64:
- var err error
- *v, err = util.ParseFloat(b, 64)
- return err
- case *bool:
- *v = len(b) == 1 && b[0] == '1'
- return nil
- case encoding.BinaryUnmarshaler:
- return v.UnmarshalBinary(b)
- default:
- return fmt.Errorf(
- "redis: can't unmarshal %T (consider implementing BinaryUnmarshaler)", v)
- }
-}
-
-func ScanSlice(data []string, slice interface{}) error {
- v := reflect.ValueOf(slice)
- if !v.IsValid() {
- return fmt.Errorf("redis: ScanSlice(nil)")
- }
- if v.Kind() != reflect.Ptr {
- return fmt.Errorf("redis: ScanSlice(non-pointer %T)", slice)
- }
- v = v.Elem()
- if v.Kind() != reflect.Slice {
- return fmt.Errorf("redis: ScanSlice(non-slice %T)", slice)
- }
-
- next := makeSliceNextElemFunc(v)
- for i, s := range data {
- elem := next()
- if err := Scan([]byte(s), elem.Addr().Interface()); err != nil {
- err = fmt.Errorf("redis: ScanSlice index=%d value=%q failed: %s", i, s, err)
- return err
- }
- }
-
- return nil
-}
-
-func makeSliceNextElemFunc(v reflect.Value) func() reflect.Value {
- elemType := v.Type().Elem()
-
- if elemType.Kind() == reflect.Ptr {
- elemType = elemType.Elem()
- return func() reflect.Value {
- if v.Len() < v.Cap() {
- v.Set(v.Slice(0, v.Len()+1))
- elem := v.Index(v.Len() - 1)
- if elem.IsNil() {
- elem.Set(reflect.New(elemType))
- }
- return elem.Elem()
- }
-
- elem := reflect.New(elemType)
- v.Set(reflect.Append(v, elem))
- return elem.Elem()
- }
- }
-
- zero := reflect.Zero(elemType)
- return func() reflect.Value {
- if v.Len() < v.Cap() {
- v.Set(v.Slice(0, v.Len()+1))
- return v.Index(v.Len() - 1)
- }
-
- v.Set(reflect.Append(v, zero))
- return v.Index(v.Len() - 1)
- }
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/proto/writer.go b/vendor/github.com/go-redis/redis/v7/internal/proto/writer.go
deleted file mode 100644
index d552f1e84..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/proto/writer.go
+++ /dev/null
@@ -1,165 +0,0 @@
-package proto
-
-import (
- "bufio"
- "encoding"
- "fmt"
- "io"
- "strconv"
- "time"
-
- "github.com/go-redis/redis/v7/internal/util"
-)
-
-type Writer struct {
- wr *bufio.Writer
-
- lenBuf []byte
- numBuf []byte
-}
-
-func NewWriter(wr io.Writer) *Writer {
- return &Writer{
- wr: bufio.NewWriter(wr),
-
- lenBuf: make([]byte, 64),
- numBuf: make([]byte, 64),
- }
-}
-
-func (w *Writer) WriteArgs(args []interface{}) error {
- err := w.wr.WriteByte(ArrayReply)
- if err != nil {
- return err
- }
-
- err = w.writeLen(len(args))
- if err != nil {
- return err
- }
-
- for _, arg := range args {
- err := w.writeArg(arg)
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (w *Writer) writeLen(n int) error {
- w.lenBuf = strconv.AppendUint(w.lenBuf[:0], uint64(n), 10)
- w.lenBuf = append(w.lenBuf, '\r', '\n')
- _, err := w.wr.Write(w.lenBuf)
- return err
-}
-
-func (w *Writer) writeArg(v interface{}) error {
- switch v := v.(type) {
- case nil:
- return w.string("")
- case string:
- return w.string(v)
- case []byte:
- return w.bytes(v)
- case int:
- return w.int(int64(v))
- case int8:
- return w.int(int64(v))
- case int16:
- return w.int(int64(v))
- case int32:
- return w.int(int64(v))
- case int64:
- return w.int(v)
- case uint:
- return w.uint(uint64(v))
- case uint8:
- return w.uint(uint64(v))
- case uint16:
- return w.uint(uint64(v))
- case uint32:
- return w.uint(uint64(v))
- case uint64:
- return w.uint(v)
- case float32:
- return w.float(float64(v))
- case float64:
- return w.float(v)
- case bool:
- if v {
- return w.int(1)
- }
- return w.int(0)
- case time.Time:
- return w.string(v.Format(time.RFC3339Nano))
- case encoding.BinaryMarshaler:
- b, err := v.MarshalBinary()
- if err != nil {
- return err
- }
- return w.bytes(b)
- default:
- return fmt.Errorf(
- "redis: can't marshal %T (implement encoding.BinaryMarshaler)", v)
- }
-}
-
-func (w *Writer) bytes(b []byte) error {
- err := w.wr.WriteByte(StringReply)
- if err != nil {
- return err
- }
-
- err = w.writeLen(len(b))
- if err != nil {
- return err
- }
-
- _, err = w.wr.Write(b)
- if err != nil {
- return err
- }
-
- return w.crlf()
-}
-
-func (w *Writer) string(s string) error {
- return w.bytes(util.StringToBytes(s))
-}
-
-func (w *Writer) uint(n uint64) error {
- w.numBuf = strconv.AppendUint(w.numBuf[:0], n, 10)
- return w.bytes(w.numBuf)
-}
-
-func (w *Writer) int(n int64) error {
- w.numBuf = strconv.AppendInt(w.numBuf[:0], n, 10)
- return w.bytes(w.numBuf)
-}
-
-func (w *Writer) float(f float64) error {
- w.numBuf = strconv.AppendFloat(w.numBuf[:0], f, 'f', -1, 64)
- return w.bytes(w.numBuf)
-}
-
-func (w *Writer) crlf() error {
- err := w.wr.WriteByte('\r')
- if err != nil {
- return err
- }
- return w.wr.WriteByte('\n')
-}
-
-func (w *Writer) Buffered() int {
- return w.wr.Buffered()
-}
-
-func (w *Writer) Reset(wr io.Writer) {
- w.wr.Reset(wr)
-}
-
-func (w *Writer) Flush() error {
- return w.wr.Flush()
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/util.go b/vendor/github.com/go-redis/redis/v7/internal/util.go
deleted file mode 100644
index 844f34bad..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/util.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package internal
-
-import (
- "context"
- "time"
-
- "github.com/go-redis/redis/v7/internal/util"
-)
-
-func Sleep(ctx context.Context, dur time.Duration) error {
- t := time.NewTimer(dur)
- defer t.Stop()
-
- select {
- case <-t.C:
- return nil
- case <-ctx.Done():
- return ctx.Err()
- }
-}
-
-func ToLower(s string) string {
- if isLower(s) {
- return s
- }
-
- b := make([]byte, len(s))
- for i := range b {
- c := s[i]
- if c >= 'A' && c <= 'Z' {
- c += 'a' - 'A'
- }
- b[i] = c
- }
- return util.BytesToString(b)
-}
-
-func isLower(s string) bool {
- for i := 0; i < len(s); i++ {
- c := s[i]
- if c >= 'A' && c <= 'Z' {
- return false
- }
- }
- return true
-}
-
-func Unwrap(err error) error {
- u, ok := err.(interface {
- Unwrap() error
- })
- if !ok {
- return nil
- }
- return u.Unwrap()
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/util/safe.go b/vendor/github.com/go-redis/redis/v7/internal/util/safe.go
deleted file mode 100644
index 1b3060ebc..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/util/safe.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build appengine
-
-package util
-
-func BytesToString(b []byte) string {
- return string(b)
-}
-
-func StringToBytes(s string) []byte {
- return []byte(s)
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/util/strconv.go b/vendor/github.com/go-redis/redis/v7/internal/util/strconv.go
deleted file mode 100644
index db5033802..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/util/strconv.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package util
-
-import "strconv"
-
-func Atoi(b []byte) (int, error) {
- return strconv.Atoi(BytesToString(b))
-}
-
-func ParseInt(b []byte, base int, bitSize int) (int64, error) {
- return strconv.ParseInt(BytesToString(b), base, bitSize)
-}
-
-func ParseUint(b []byte, base int, bitSize int) (uint64, error) {
- return strconv.ParseUint(BytesToString(b), base, bitSize)
-}
-
-func ParseFloat(b []byte, bitSize int) (float64, error) {
- return strconv.ParseFloat(BytesToString(b), bitSize)
-}
diff --git a/vendor/github.com/go-redis/redis/v7/internal/util/unsafe.go b/vendor/github.com/go-redis/redis/v7/internal/util/unsafe.go
deleted file mode 100644
index c9868aac2..000000000
--- a/vendor/github.com/go-redis/redis/v7/internal/util/unsafe.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// +build !appengine
-
-package util
-
-import (
- "unsafe"
-)
-
-// BytesToString converts byte slice to string.
-func BytesToString(b []byte) string {
- return *(*string)(unsafe.Pointer(&b))
-}
-
-// StringToBytes converts string to byte slice.
-func StringToBytes(s string) []byte {
- return *(*[]byte)(unsafe.Pointer(
- &struct {
- string
- Cap int
- }{s, len(s)},
- ))
-}
diff --git a/vendor/github.com/go-redis/redis/v7/iterator.go b/vendor/github.com/go-redis/redis/v7/iterator.go
deleted file mode 100644
index f9d3aab6d..000000000
--- a/vendor/github.com/go-redis/redis/v7/iterator.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package redis
-
-import (
- "sync"
-)
-
-// ScanIterator is used to incrementally iterate over a collection of elements.
-// It's safe for concurrent use by multiple goroutines.
-type ScanIterator struct {
- mu sync.Mutex // protects Scanner and pos
- cmd *ScanCmd
- pos int
-}
-
-// Err returns the last iterator error, if any.
-func (it *ScanIterator) Err() error {
- it.mu.Lock()
- err := it.cmd.Err()
- it.mu.Unlock()
- return err
-}
-
-// Next advances the cursor and returns true if more values can be read.
-func (it *ScanIterator) Next() bool {
- it.mu.Lock()
- defer it.mu.Unlock()
-
- // Instantly return on errors.
- if it.cmd.Err() != nil {
- return false
- }
-
- // Advance cursor, check if we are still within range.
- if it.pos < len(it.cmd.page) {
- it.pos++
- return true
- }
-
- for {
- // Return if there is no more data to fetch.
- if it.cmd.cursor == 0 {
- return false
- }
-
- // Fetch next page.
- if it.cmd.args[0] == "scan" {
- it.cmd.args[1] = it.cmd.cursor
- } else {
- it.cmd.args[2] = it.cmd.cursor
- }
-
- err := it.cmd.process(it.cmd)
- if err != nil {
- return false
- }
-
- it.pos = 1
-
- // Redis can occasionally return empty page.
- if len(it.cmd.page) > 0 {
- return true
- }
- }
-}
-
-// Val returns the key/field at the current cursor position.
-func (it *ScanIterator) Val() string {
- var v string
- it.mu.Lock()
- if it.cmd.Err() == nil && it.pos > 0 && it.pos <= len(it.cmd.page) {
- v = it.cmd.page[it.pos-1]
- }
- it.mu.Unlock()
- return v
-}
diff --git a/vendor/github.com/go-redis/redis/v7/options.go b/vendor/github.com/go-redis/redis/v7/options.go
deleted file mode 100644
index 47dcc29bf..000000000
--- a/vendor/github.com/go-redis/redis/v7/options.go
+++ /dev/null
@@ -1,249 +0,0 @@
-package redis
-
-import (
- "context"
- "crypto/tls"
- "errors"
- "fmt"
- "net"
- "net/url"
- "runtime"
- "strconv"
- "strings"
- "time"
-
- "github.com/go-redis/redis/v7/internal/pool"
-)
-
-// Limiter is the interface of a rate limiter or a circuit breaker.
-type Limiter interface {
- // Allow returns nil if operation is allowed or an error otherwise.
- // If operation is allowed client must ReportResult of the operation
- // whether it is a success or a failure.
- Allow() error
- // ReportResult reports the result of the previously allowed operation.
- // nil indicates a success, non-nil error usually indicates a failure.
- ReportResult(result error)
-}
-
-type Options struct {
- // The network type, either tcp or unix.
- // Default is tcp.
- Network string
- // host:port address.
- Addr string
-
- // Dialer creates new network connection and has priority over
- // Network and Addr options.
- Dialer func(ctx context.Context, network, addr string) (net.Conn, error)
-
- // Hook that is called when new connection is established.
- OnConnect func(*Conn) error
-
- // Use the specified Username to authenticate the current connection with one of the connections defined in the ACL
- // list when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
- Username string
-
- // Optional password. Must match the password specified in the
- // requirepass server configuration option (if connecting to a Redis 5.0 instance, or lower),
- // or the User Password when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
- Password string
- // Database to be selected after connecting to the server.
- DB int
-
- // Maximum number of retries before giving up.
- // Default is to not retry failed commands.
- MaxRetries int
- // Minimum backoff between each retry.
- // Default is 8 milliseconds; -1 disables backoff.
- MinRetryBackoff time.Duration
- // Maximum backoff between each retry.
- // Default is 512 milliseconds; -1 disables backoff.
- MaxRetryBackoff time.Duration
-
- // Dial timeout for establishing new connections.
- // Default is 5 seconds.
- DialTimeout time.Duration
- // Timeout for socket reads. If reached, commands will fail
- // with a timeout instead of blocking. Use value -1 for no timeout and 0 for default.
- // Default is 3 seconds.
- ReadTimeout time.Duration
- // Timeout for socket writes. If reached, commands will fail
- // with a timeout instead of blocking.
- // Default is ReadTimeout.
- WriteTimeout time.Duration
-
- // Maximum number of socket connections.
- // Default is 10 connections per every CPU as reported by runtime.NumCPU.
- PoolSize int
- // Minimum number of idle connections which is useful when establishing
- // new connection is slow.
- MinIdleConns int
- // Connection age at which client retires (closes) the connection.
- // Default is to not close aged connections.
- MaxConnAge time.Duration
- // Amount of time client waits for connection if all connections
- // are busy before returning an error.
- // Default is ReadTimeout + 1 second.
- PoolTimeout time.Duration
- // Amount of time after which client closes idle connections.
- // Should be less than server's timeout.
- // Default is 5 minutes. -1 disables idle timeout check.
- IdleTimeout time.Duration
- // Frequency of idle checks made by idle connections reaper.
- // Default is 1 minute. -1 disables idle connections reaper,
- // but idle connections are still discarded by the client
- // if IdleTimeout is set.
- IdleCheckFrequency time.Duration
-
- // Enables read only queries on slave nodes.
- readOnly bool
-
- // TLS Config to use. When set TLS will be negotiated.
- TLSConfig *tls.Config
-
- // Limiter interface used to implemented circuit breaker or rate limiter.
- Limiter Limiter
-}
-
-func (opt *Options) init() {
- if opt.Addr == "" {
- opt.Addr = "localhost:6379"
- }
- if opt.Network == "" {
- if strings.HasPrefix(opt.Addr, "/") {
- opt.Network = "unix"
- } else {
- opt.Network = "tcp"
- }
- }
- if opt.Dialer == nil {
- opt.Dialer = func(ctx context.Context, network, addr string) (net.Conn, error) {
- netDialer := &net.Dialer{
- Timeout: opt.DialTimeout,
- KeepAlive: 5 * time.Minute,
- }
- if opt.TLSConfig == nil {
- return netDialer.DialContext(ctx, network, addr)
- }
- return tls.DialWithDialer(netDialer, network, addr, opt.TLSConfig)
- }
- }
- if opt.PoolSize == 0 {
- opt.PoolSize = 10 * runtime.NumCPU()
- }
- if opt.DialTimeout == 0 {
- opt.DialTimeout = 5 * time.Second
- }
- switch opt.ReadTimeout {
- case -1:
- opt.ReadTimeout = 0
- case 0:
- opt.ReadTimeout = 3 * time.Second
- }
- switch opt.WriteTimeout {
- case -1:
- opt.WriteTimeout = 0
- case 0:
- opt.WriteTimeout = opt.ReadTimeout
- }
- if opt.PoolTimeout == 0 {
- opt.PoolTimeout = opt.ReadTimeout + time.Second
- }
- if opt.IdleTimeout == 0 {
- opt.IdleTimeout = 5 * time.Minute
- }
- if opt.IdleCheckFrequency == 0 {
- opt.IdleCheckFrequency = time.Minute
- }
-
- if opt.MaxRetries == -1 {
- opt.MaxRetries = 0
- }
- switch opt.MinRetryBackoff {
- case -1:
- opt.MinRetryBackoff = 0
- case 0:
- opt.MinRetryBackoff = 8 * time.Millisecond
- }
- switch opt.MaxRetryBackoff {
- case -1:
- opt.MaxRetryBackoff = 0
- case 0:
- opt.MaxRetryBackoff = 512 * time.Millisecond
- }
-}
-
-func (opt *Options) clone() *Options {
- clone := *opt
- return &clone
-}
-
-// ParseURL parses an URL into Options that can be used to connect to Redis.
-func ParseURL(redisURL string) (*Options, error) {
- o := &Options{Network: "tcp"}
- u, err := url.Parse(redisURL)
- if err != nil {
- return nil, err
- }
-
- if u.Scheme != "redis" && u.Scheme != "rediss" {
- return nil, errors.New("invalid redis URL scheme: " + u.Scheme)
- }
-
- if u.User != nil {
- o.Username = u.User.Username()
- if p, ok := u.User.Password(); ok {
- o.Password = p
- }
- }
-
- if len(u.Query()) > 0 {
- return nil, errors.New("no options supported")
- }
-
- h, p, err := net.SplitHostPort(u.Host)
- if err != nil {
- h = u.Host
- }
- if h == "" {
- h = "localhost"
- }
- if p == "" {
- p = "6379"
- }
- o.Addr = net.JoinHostPort(h, p)
-
- f := strings.FieldsFunc(u.Path, func(r rune) bool {
- return r == '/'
- })
- switch len(f) {
- case 0:
- o.DB = 0
- case 1:
- if o.DB, err = strconv.Atoi(f[0]); err != nil {
- return nil, fmt.Errorf("invalid redis database number: %q", f[0])
- }
- default:
- return nil, errors.New("invalid redis URL path: " + u.Path)
- }
-
- if u.Scheme == "rediss" {
- o.TLSConfig = &tls.Config{ServerName: h}
- }
- return o, nil
-}
-
-func newConnPool(opt *Options) *pool.ConnPool {
- return pool.NewConnPool(&pool.Options{
- Dialer: func(ctx context.Context) (net.Conn, error) {
- return opt.Dialer(ctx, opt.Network, opt.Addr)
- },
- PoolSize: opt.PoolSize,
- MinIdleConns: opt.MinIdleConns,
- MaxConnAge: opt.MaxConnAge,
- PoolTimeout: opt.PoolTimeout,
- IdleTimeout: opt.IdleTimeout,
- IdleCheckFrequency: opt.IdleCheckFrequency,
- })
-}
diff --git a/vendor/github.com/go-redis/redis/v7/pipeline.go b/vendor/github.com/go-redis/redis/v7/pipeline.go
deleted file mode 100644
index d48566a78..000000000
--- a/vendor/github.com/go-redis/redis/v7/pipeline.go
+++ /dev/null
@@ -1,142 +0,0 @@
-package redis
-
-import (
- "context"
- "sync"
-
- "github.com/go-redis/redis/v7/internal/pool"
-)
-
-type pipelineExecer func(context.Context, []Cmder) error
-
-// Pipeliner is an mechanism to realise Redis Pipeline technique.
-//
-// Pipelining is a technique to extremely speed up processing by packing
-// operations to batches, send them at once to Redis and read a replies in a
-// singe step.
-// See https://redis.io/topics/pipelining
-//
-// Pay attention, that Pipeline is not a transaction, so you can get unexpected
-// results in case of big pipelines and small read/write timeouts.
-// Redis client has retransmission logic in case of timeouts, pipeline
-// can be retransmitted and commands can be executed more then once.
-// To avoid this: it is good idea to use reasonable bigger read/write timeouts
-// depends of your batch size and/or use TxPipeline.
-type Pipeliner interface {
- StatefulCmdable
- Do(args ...interface{}) *Cmd
- Process(cmd Cmder) error
- Close() error
- Discard() error
- Exec() ([]Cmder, error)
- ExecContext(ctx context.Context) ([]Cmder, error)
-}
-
-var _ Pipeliner = (*Pipeline)(nil)
-
-// Pipeline implements pipelining as described in
-// http://redis.io/topics/pipelining. It's safe for concurrent use
-// by multiple goroutines.
-type Pipeline struct {
- cmdable
- statefulCmdable
-
- ctx context.Context
- exec pipelineExecer
-
- mu sync.Mutex
- cmds []Cmder
- closed bool
-}
-
-func (c *Pipeline) init() {
- c.cmdable = c.Process
- c.statefulCmdable = c.Process
-}
-
-func (c *Pipeline) Do(args ...interface{}) *Cmd {
- cmd := NewCmd(args...)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Process queues the cmd for later execution.
-func (c *Pipeline) Process(cmd Cmder) error {
- c.mu.Lock()
- c.cmds = append(c.cmds, cmd)
- c.mu.Unlock()
- return nil
-}
-
-// Close closes the pipeline, releasing any open resources.
-func (c *Pipeline) Close() error {
- c.mu.Lock()
- _ = c.discard()
- c.closed = true
- c.mu.Unlock()
- return nil
-}
-
-// Discard resets the pipeline and discards queued commands.
-func (c *Pipeline) Discard() error {
- c.mu.Lock()
- err := c.discard()
- c.mu.Unlock()
- return err
-}
-
-func (c *Pipeline) discard() error {
- if c.closed {
- return pool.ErrClosed
- }
- c.cmds = c.cmds[:0]
- return nil
-}
-
-// Exec executes all previously queued commands using one
-// client-server roundtrip.
-//
-// Exec always returns list of commands and error of the first failed
-// command if any.
-func (c *Pipeline) Exec() ([]Cmder, error) {
- return c.ExecContext(c.ctx)
-}
-
-func (c *Pipeline) ExecContext(ctx context.Context) ([]Cmder, error) {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- if c.closed {
- return nil, pool.ErrClosed
- }
-
- if len(c.cmds) == 0 {
- return nil, nil
- }
-
- cmds := c.cmds
- c.cmds = nil
-
- return cmds, c.exec(ctx, cmds)
-}
-
-func (c *Pipeline) Pipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- if err := fn(c); err != nil {
- return nil, err
- }
- cmds, err := c.Exec()
- _ = c.Close()
- return cmds, err
-}
-
-func (c *Pipeline) Pipeline() Pipeliner {
- return c
-}
-
-func (c *Pipeline) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.Pipelined(fn)
-}
-
-func (c *Pipeline) TxPipeline() Pipeliner {
- return c
-}
diff --git a/vendor/github.com/go-redis/redis/v7/pubsub.go b/vendor/github.com/go-redis/redis/v7/pubsub.go
deleted file mode 100644
index 26cde242b..000000000
--- a/vendor/github.com/go-redis/redis/v7/pubsub.go
+++ /dev/null
@@ -1,595 +0,0 @@
-package redis
-
-import (
- "context"
- "errors"
- "fmt"
- "strings"
- "sync"
- "time"
-
- "github.com/go-redis/redis/v7/internal"
- "github.com/go-redis/redis/v7/internal/pool"
- "github.com/go-redis/redis/v7/internal/proto"
-)
-
-const pingTimeout = 30 * time.Second
-
-var errPingTimeout = errors.New("redis: ping timeout")
-
-// PubSub implements Pub/Sub commands as described in
-// http://redis.io/topics/pubsub. Message receiving is NOT safe
-// for concurrent use by multiple goroutines.
-//
-// PubSub automatically reconnects to Redis Server and resubscribes
-// to the channels in case of network errors.
-type PubSub struct {
- opt *Options
-
- newConn func([]string) (*pool.Conn, error)
- closeConn func(*pool.Conn) error
-
- mu sync.Mutex
- cn *pool.Conn
- channels map[string]struct{}
- patterns map[string]struct{}
-
- closed bool
- exit chan struct{}
-
- cmd *Cmd
-
- chOnce sync.Once
- msgCh chan *Message
- allCh chan interface{}
- ping chan struct{}
-}
-
-func (c *PubSub) String() string {
- channels := mapKeys(c.channels)
- channels = append(channels, mapKeys(c.patterns)...)
- return fmt.Sprintf("PubSub(%s)", strings.Join(channels, ", "))
-}
-
-func (c *PubSub) init() {
- c.exit = make(chan struct{})
-}
-
-func (c *PubSub) connWithLock() (*pool.Conn, error) {
- c.mu.Lock()
- cn, err := c.conn(nil)
- c.mu.Unlock()
- return cn, err
-}
-
-func (c *PubSub) conn(newChannels []string) (*pool.Conn, error) {
- if c.closed {
- return nil, pool.ErrClosed
- }
- if c.cn != nil {
- return c.cn, nil
- }
-
- channels := mapKeys(c.channels)
- channels = append(channels, newChannels...)
-
- cn, err := c.newConn(channels)
- if err != nil {
- return nil, err
- }
-
- if err := c.resubscribe(cn); err != nil {
- _ = c.closeConn(cn)
- return nil, err
- }
-
- c.cn = cn
- return cn, nil
-}
-
-func (c *PubSub) writeCmd(ctx context.Context, cn *pool.Conn, cmd Cmder) error {
- return cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error {
- return writeCmd(wr, cmd)
- })
-}
-
-func (c *PubSub) resubscribe(cn *pool.Conn) error {
- var firstErr error
-
- if len(c.channels) > 0 {
- firstErr = c._subscribe(cn, "subscribe", mapKeys(c.channels))
- }
-
- if len(c.patterns) > 0 {
- err := c._subscribe(cn, "psubscribe", mapKeys(c.patterns))
- if err != nil && firstErr == nil {
- firstErr = err
- }
- }
-
- return firstErr
-}
-
-func mapKeys(m map[string]struct{}) []string {
- s := make([]string, len(m))
- i := 0
- for k := range m {
- s[i] = k
- i++
- }
- return s
-}
-
-func (c *PubSub) _subscribe(
- cn *pool.Conn, redisCmd string, channels []string,
-) error {
- args := make([]interface{}, 0, 1+len(channels))
- args = append(args, redisCmd)
- for _, channel := range channels {
- args = append(args, channel)
- }
- cmd := NewSliceCmd(args...)
- return c.writeCmd(context.TODO(), cn, cmd)
-}
-
-func (c *PubSub) releaseConnWithLock(cn *pool.Conn, err error, allowTimeout bool) {
- c.mu.Lock()
- c.releaseConn(cn, err, allowTimeout)
- c.mu.Unlock()
-}
-
-func (c *PubSub) releaseConn(cn *pool.Conn, err error, allowTimeout bool) {
- if c.cn != cn {
- return
- }
- if isBadConn(err, allowTimeout) {
- c.reconnect(err)
- }
-}
-
-func (c *PubSub) reconnect(reason error) {
- _ = c.closeTheCn(reason)
- _, _ = c.conn(nil)
-}
-
-func (c *PubSub) closeTheCn(reason error) error {
- if c.cn == nil {
- return nil
- }
- if !c.closed {
- internal.Logger.Printf("redis: discarding bad PubSub connection: %s", reason)
- }
- err := c.closeConn(c.cn)
- c.cn = nil
- return err
-}
-
-func (c *PubSub) Close() error {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- if c.closed {
- return pool.ErrClosed
- }
- c.closed = true
- close(c.exit)
-
- return c.closeTheCn(pool.ErrClosed)
-}
-
-// Subscribe the client to the specified channels. It returns
-// empty subscription if there are no channels.
-func (c *PubSub) Subscribe(channels ...string) error {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- err := c.subscribe("subscribe", channels...)
- if c.channels == nil {
- c.channels = make(map[string]struct{})
- }
- for _, s := range channels {
- c.channels[s] = struct{}{}
- }
- return err
-}
-
-// PSubscribe the client to the given patterns. It returns
-// empty subscription if there are no patterns.
-func (c *PubSub) PSubscribe(patterns ...string) error {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- err := c.subscribe("psubscribe", patterns...)
- if c.patterns == nil {
- c.patterns = make(map[string]struct{})
- }
- for _, s := range patterns {
- c.patterns[s] = struct{}{}
- }
- return err
-}
-
-// Unsubscribe the client from the given channels, or from all of
-// them if none is given.
-func (c *PubSub) Unsubscribe(channels ...string) error {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- for _, channel := range channels {
- delete(c.channels, channel)
- }
- err := c.subscribe("unsubscribe", channels...)
- return err
-}
-
-// PUnsubscribe the client from the given patterns, or from all of
-// them if none is given.
-func (c *PubSub) PUnsubscribe(patterns ...string) error {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- for _, pattern := range patterns {
- delete(c.patterns, pattern)
- }
- err := c.subscribe("punsubscribe", patterns...)
- return err
-}
-
-func (c *PubSub) subscribe(redisCmd string, channels ...string) error {
- cn, err := c.conn(channels)
- if err != nil {
- return err
- }
-
- err = c._subscribe(cn, redisCmd, channels)
- c.releaseConn(cn, err, false)
- return err
-}
-
-func (c *PubSub) Ping(payload ...string) error {
- args := []interface{}{"ping"}
- if len(payload) == 1 {
- args = append(args, payload[0])
- }
- cmd := NewCmd(args...)
-
- cn, err := c.connWithLock()
- if err != nil {
- return err
- }
-
- err = c.writeCmd(context.TODO(), cn, cmd)
- c.releaseConnWithLock(cn, err, false)
- return err
-}
-
-// Subscription received after a successful subscription to channel.
-type Subscription struct {
- // Can be "subscribe", "unsubscribe", "psubscribe" or "punsubscribe".
- Kind string
- // Channel name we have subscribed to.
- Channel string
- // Number of channels we are currently subscribed to.
- Count int
-}
-
-func (m *Subscription) String() string {
- return fmt.Sprintf("%s: %s", m.Kind, m.Channel)
-}
-
-// Message received as result of a PUBLISH command issued by another client.
-type Message struct {
- Channel string
- Pattern string
- Payload string
-}
-
-func (m *Message) String() string {
- return fmt.Sprintf("Message<%s: %s>", m.Channel, m.Payload)
-}
-
-// Pong received as result of a PING command issued by another client.
-type Pong struct {
- Payload string
-}
-
-func (p *Pong) String() string {
- if p.Payload != "" {
- return fmt.Sprintf("Pong<%s>", p.Payload)
- }
- return "Pong"
-}
-
-func (c *PubSub) newMessage(reply interface{}) (interface{}, error) {
- switch reply := reply.(type) {
- case string:
- return &Pong{
- Payload: reply,
- }, nil
- case []interface{}:
- switch kind := reply[0].(string); kind {
- case "subscribe", "unsubscribe", "psubscribe", "punsubscribe":
- // Can be nil in case of "unsubscribe".
- channel, _ := reply[1].(string)
- return &Subscription{
- Kind: kind,
- Channel: channel,
- Count: int(reply[2].(int64)),
- }, nil
- case "message":
- return &Message{
- Channel: reply[1].(string),
- Payload: reply[2].(string),
- }, nil
- case "pmessage":
- return &Message{
- Pattern: reply[1].(string),
- Channel: reply[2].(string),
- Payload: reply[3].(string),
- }, nil
- case "pong":
- return &Pong{
- Payload: reply[1].(string),
- }, nil
- default:
- return nil, fmt.Errorf("redis: unsupported pubsub message: %q", kind)
- }
- default:
- return nil, fmt.Errorf("redis: unsupported pubsub message: %#v", reply)
- }
-}
-
-// ReceiveTimeout acts like Receive but returns an error if message
-// is not received in time. This is low-level API and in most cases
-// Channel should be used instead.
-func (c *PubSub) ReceiveTimeout(timeout time.Duration) (interface{}, error) {
- if c.cmd == nil {
- c.cmd = NewCmd()
- }
-
- cn, err := c.connWithLock()
- if err != nil {
- return nil, err
- }
-
- err = cn.WithReader(context.TODO(), timeout, func(rd *proto.Reader) error {
- return c.cmd.readReply(rd)
- })
-
- c.releaseConnWithLock(cn, err, timeout > 0)
- if err != nil {
- return nil, err
- }
-
- return c.newMessage(c.cmd.Val())
-}
-
-// Receive returns a message as a Subscription, Message, Pong or error.
-// See PubSub example for details. This is low-level API and in most cases
-// Channel should be used instead.
-func (c *PubSub) Receive() (interface{}, error) {
- return c.ReceiveTimeout(0)
-}
-
-// ReceiveMessage returns a Message or error ignoring Subscription and Pong
-// messages. This is low-level API and in most cases Channel should be used
-// instead.
-func (c *PubSub) ReceiveMessage() (*Message, error) {
- for {
- msg, err := c.Receive()
- if err != nil {
- return nil, err
- }
-
- switch msg := msg.(type) {
- case *Subscription:
- // Ignore.
- case *Pong:
- // Ignore.
- case *Message:
- return msg, nil
- default:
- err := fmt.Errorf("redis: unknown message: %T", msg)
- return nil, err
- }
- }
-}
-
-// Channel returns a Go channel for concurrently receiving messages.
-// The channel is closed together with the PubSub. If the Go channel
-// is blocked full for 30 seconds the message is dropped.
-// Receive* APIs can not be used after channel is created.
-//
-// go-redis periodically sends ping messages to test connection health
-// and re-subscribes if ping can not not received for 30 seconds.
-func (c *PubSub) Channel() <-chan *Message {
- return c.ChannelSize(100)
-}
-
-// ChannelSize is like Channel, but creates a Go channel
-// with specified buffer size.
-func (c *PubSub) ChannelSize(size int) <-chan *Message {
- c.chOnce.Do(func() {
- c.initPing()
- c.initMsgChan(size)
- })
- if c.msgCh == nil {
- err := fmt.Errorf("redis: Channel can't be called after ChannelWithSubscriptions")
- panic(err)
- }
- if cap(c.msgCh) != size {
- err := fmt.Errorf("redis: PubSub.Channel size can not be changed once created")
- panic(err)
- }
- return c.msgCh
-}
-
-// ChannelWithSubscriptions is like Channel, but message type can be either
-// *Subscription or *Message. Subscription messages can be used to detect
-// reconnections.
-//
-// ChannelWithSubscriptions can not be used together with Channel or ChannelSize.
-func (c *PubSub) ChannelWithSubscriptions(size int) <-chan interface{} {
- c.chOnce.Do(func() {
- c.initPing()
- c.initAllChan(size)
- })
- if c.allCh == nil {
- err := fmt.Errorf("redis: ChannelWithSubscriptions can't be called after Channel")
- panic(err)
- }
- if cap(c.allCh) != size {
- err := fmt.Errorf("redis: PubSub.Channel size can not be changed once created")
- panic(err)
- }
- return c.allCh
-}
-
-func (c *PubSub) initPing() {
- c.ping = make(chan struct{}, 1)
- go func() {
- timer := time.NewTimer(pingTimeout)
- timer.Stop()
-
- healthy := true
- for {
- timer.Reset(pingTimeout)
- select {
- case <-c.ping:
- healthy = true
- if !timer.Stop() {
- <-timer.C
- }
- case <-timer.C:
- pingErr := c.Ping()
- if healthy {
- healthy = false
- } else {
- if pingErr == nil {
- pingErr = errPingTimeout
- }
- c.mu.Lock()
- c.reconnect(pingErr)
- healthy = true
- c.mu.Unlock()
- }
- case <-c.exit:
- return
- }
- }
- }()
-}
-
-// initMsgChan must be in sync with initAllChan.
-func (c *PubSub) initMsgChan(size int) {
- c.msgCh = make(chan *Message, size)
- go func() {
- timer := time.NewTimer(pingTimeout)
- timer.Stop()
-
- var errCount int
- for {
- msg, err := c.Receive()
- if err != nil {
- if err == pool.ErrClosed {
- close(c.msgCh)
- return
- }
- if errCount > 0 {
- time.Sleep(c.retryBackoff(errCount))
- }
- errCount++
- continue
- }
-
- errCount = 0
-
- // Any message is as good as a ping.
- select {
- case c.ping <- struct{}{}:
- default:
- }
-
- switch msg := msg.(type) {
- case *Subscription:
- // Ignore.
- case *Pong:
- // Ignore.
- case *Message:
- timer.Reset(pingTimeout)
- select {
- case c.msgCh <- msg:
- if !timer.Stop() {
- <-timer.C
- }
- case <-timer.C:
- internal.Logger.Printf(
- "redis: %s channel is full for %s (message is dropped)", c, pingTimeout)
- }
- default:
- internal.Logger.Printf("redis: unknown message type: %T", msg)
- }
- }
- }()
-}
-
-// initAllChan must be in sync with initMsgChan.
-func (c *PubSub) initAllChan(size int) {
- c.allCh = make(chan interface{}, size)
- go func() {
- timer := time.NewTimer(pingTimeout)
- timer.Stop()
-
- var errCount int
- for {
- msg, err := c.Receive()
- if err != nil {
- if err == pool.ErrClosed {
- close(c.allCh)
- return
- }
- if errCount > 0 {
- time.Sleep(c.retryBackoff(errCount))
- }
- errCount++
- continue
- }
-
- errCount = 0
-
- // Any message is as good as a ping.
- select {
- case c.ping <- struct{}{}:
- default:
- }
-
- switch msg := msg.(type) {
- case *Subscription:
- c.sendMessage(msg, timer)
- case *Pong:
- // Ignore.
- case *Message:
- c.sendMessage(msg, timer)
- default:
- internal.Logger.Printf("redis: unknown message type: %T", msg)
- }
- }
- }()
-}
-
-func (c *PubSub) sendMessage(msg interface{}, timer *time.Timer) {
- timer.Reset(pingTimeout)
- select {
- case c.allCh <- msg:
- if !timer.Stop() {
- <-timer.C
- }
- case <-timer.C:
- internal.Logger.Printf(
- "redis: %s channel is full for %s (message is dropped)", c, pingTimeout)
- }
-}
-
-func (c *PubSub) retryBackoff(attempt int) time.Duration {
- return internal.RetryBackoff(attempt, c.opt.MinRetryBackoff, c.opt.MaxRetryBackoff)
-}
diff --git a/vendor/github.com/go-redis/redis/v7/redis.go b/vendor/github.com/go-redis/redis/v7/redis.go
deleted file mode 100644
index 3d9dfed7d..000000000
--- a/vendor/github.com/go-redis/redis/v7/redis.go
+++ /dev/null
@@ -1,758 +0,0 @@
-package redis
-
-import (
- "context"
- "fmt"
- "log"
- "time"
-
- "github.com/go-redis/redis/v7/internal"
- "github.com/go-redis/redis/v7/internal/pool"
- "github.com/go-redis/redis/v7/internal/proto"
-)
-
-// Nil reply returned by Redis when key does not exist.
-const Nil = proto.Nil
-
-func SetLogger(logger *log.Logger) {
- internal.Logger = logger
-}
-
-//------------------------------------------------------------------------------
-
-type Hook interface {
- BeforeProcess(ctx context.Context, cmd Cmder) (context.Context, error)
- AfterProcess(ctx context.Context, cmd Cmder) error
-
- BeforeProcessPipeline(ctx context.Context, cmds []Cmder) (context.Context, error)
- AfterProcessPipeline(ctx context.Context, cmds []Cmder) error
-}
-
-type hooks struct {
- hooks []Hook
-}
-
-func (hs *hooks) lock() {
- hs.hooks = hs.hooks[:len(hs.hooks):len(hs.hooks)]
-}
-
-func (hs hooks) clone() hooks {
- clone := hs
- clone.lock()
- return clone
-}
-
-func (hs *hooks) AddHook(hook Hook) {
- hs.hooks = append(hs.hooks, hook)
-}
-
-func (hs hooks) process(
- ctx context.Context, cmd Cmder, fn func(context.Context, Cmder) error,
-) error {
- ctx, err := hs.beforeProcess(ctx, cmd)
- if err != nil {
- cmd.SetErr(err)
- return err
- }
-
- cmdErr := fn(ctx, cmd)
-
- if err := hs.afterProcess(ctx, cmd); err != nil {
- cmd.SetErr(err)
- return err
- }
-
- return cmdErr
-}
-
-func (hs hooks) beforeProcess(ctx context.Context, cmd Cmder) (context.Context, error) {
- for _, h := range hs.hooks {
- var err error
- ctx, err = h.BeforeProcess(ctx, cmd)
- if err != nil {
- return nil, err
- }
- }
- return ctx, nil
-}
-
-func (hs hooks) afterProcess(ctx context.Context, cmd Cmder) error {
- var firstErr error
- for _, h := range hs.hooks {
- err := h.AfterProcess(ctx, cmd)
- if err != nil && firstErr == nil {
- firstErr = err
- }
- }
- return firstErr
-}
-
-func (hs hooks) processPipeline(
- ctx context.Context, cmds []Cmder, fn func(context.Context, []Cmder) error,
-) error {
- ctx, err := hs.beforeProcessPipeline(ctx, cmds)
- if err != nil {
- setCmdsErr(cmds, err)
- return err
- }
-
- cmdsErr := fn(ctx, cmds)
-
- if err := hs.afterProcessPipeline(ctx, cmds); err != nil {
- setCmdsErr(cmds, err)
- return err
- }
-
- return cmdsErr
-}
-
-func (hs hooks) beforeProcessPipeline(ctx context.Context, cmds []Cmder) (context.Context, error) {
- for _, h := range hs.hooks {
- var err error
- ctx, err = h.BeforeProcessPipeline(ctx, cmds)
- if err != nil {
- return nil, err
- }
- }
- return ctx, nil
-}
-
-func (hs hooks) afterProcessPipeline(ctx context.Context, cmds []Cmder) error {
- var firstErr error
- for _, h := range hs.hooks {
- err := h.AfterProcessPipeline(ctx, cmds)
- if err != nil && firstErr == nil {
- firstErr = err
- }
- }
- return firstErr
-}
-
-func (hs hooks) processTxPipeline(
- ctx context.Context, cmds []Cmder, fn func(context.Context, []Cmder) error,
-) error {
- cmds = wrapMultiExec(cmds)
- return hs.processPipeline(ctx, cmds, fn)
-}
-
-//------------------------------------------------------------------------------
-
-type baseClient struct {
- opt *Options
- connPool pool.Pooler
-
- onClose func() error // hook called when client is closed
-}
-
-func newBaseClient(opt *Options, connPool pool.Pooler) *baseClient {
- return &baseClient{
- opt: opt,
- connPool: connPool,
- }
-}
-
-func (c *baseClient) clone() *baseClient {
- clone := *c
- return &clone
-}
-
-func (c *baseClient) withTimeout(timeout time.Duration) *baseClient {
- opt := c.opt.clone()
- opt.ReadTimeout = timeout
- opt.WriteTimeout = timeout
-
- clone := c.clone()
- clone.opt = opt
-
- return clone
-}
-
-func (c *baseClient) String() string {
- return fmt.Sprintf("Redis<%s db:%d>", c.getAddr(), c.opt.DB)
-}
-
-func (c *baseClient) newConn(ctx context.Context) (*pool.Conn, error) {
- cn, err := c.connPool.NewConn(ctx)
- if err != nil {
- return nil, err
- }
-
- err = c.initConn(ctx, cn)
- if err != nil {
- _ = c.connPool.CloseConn(cn)
- return nil, err
- }
-
- return cn, nil
-}
-
-func (c *baseClient) getConn(ctx context.Context) (*pool.Conn, error) {
- if c.opt.Limiter != nil {
- err := c.opt.Limiter.Allow()
- if err != nil {
- return nil, err
- }
- }
-
- cn, err := c._getConn(ctx)
- if err != nil {
- if c.opt.Limiter != nil {
- c.opt.Limiter.ReportResult(err)
- }
- return nil, err
- }
- return cn, nil
-}
-
-func (c *baseClient) _getConn(ctx context.Context) (*pool.Conn, error) {
- cn, err := c.connPool.Get(ctx)
- if err != nil {
- return nil, err
- }
-
- err = c.initConn(ctx, cn)
- if err != nil {
- c.connPool.Remove(cn, err)
- if err := internal.Unwrap(err); err != nil {
- return nil, err
- }
- return nil, err
- }
-
- return cn, nil
-}
-
-func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
- if cn.Inited {
- return nil
- }
- cn.Inited = true
-
- if c.opt.Password == "" &&
- c.opt.DB == 0 &&
- !c.opt.readOnly &&
- c.opt.OnConnect == nil {
- return nil
- }
-
- connPool := pool.NewSingleConnPool(nil)
- connPool.SetConn(cn)
- conn := newConn(ctx, c.opt, connPool)
-
- _, err := conn.Pipelined(func(pipe Pipeliner) error {
- if c.opt.Password != "" {
- if c.opt.Username != "" {
- pipe.AuthACL(c.opt.Username, c.opt.Password)
- } else {
- pipe.Auth(c.opt.Password)
- }
- }
-
- if c.opt.DB > 0 {
- pipe.Select(c.opt.DB)
- }
-
- if c.opt.readOnly {
- pipe.ReadOnly()
- }
-
- return nil
- })
- if err != nil {
- return err
- }
-
- if c.opt.OnConnect != nil {
- return c.opt.OnConnect(conn)
- }
- return nil
-}
-
-func (c *baseClient) releaseConn(cn *pool.Conn, err error) {
- if c.opt.Limiter != nil {
- c.opt.Limiter.ReportResult(err)
- }
-
- if isBadConn(err, false) {
- c.connPool.Remove(cn, err)
- } else {
- c.connPool.Put(cn)
- }
-}
-
-func (c *baseClient) withConn(
- ctx context.Context, fn func(context.Context, *pool.Conn) error,
-) error {
- cn, err := c.getConn(ctx)
- if err != nil {
- return err
- }
- defer func() {
- c.releaseConn(cn, err)
- }()
-
- err = fn(ctx, cn)
- return err
-}
-
-func (c *baseClient) process(ctx context.Context, cmd Cmder) error {
- err := c._process(ctx, cmd)
- if err != nil {
- cmd.SetErr(err)
- return err
- }
- return nil
-}
-
-func (c *baseClient) _process(ctx context.Context, cmd Cmder) error {
- var lastErr error
- for attempt := 0; attempt <= c.opt.MaxRetries; attempt++ {
- if attempt > 0 {
- if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil {
- return err
- }
- }
-
- retryTimeout := true
- lastErr = c.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error {
- err := cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error {
- return writeCmd(wr, cmd)
- })
- if err != nil {
- return err
- }
-
- err = cn.WithReader(ctx, c.cmdTimeout(cmd), cmd.readReply)
- if err != nil {
- retryTimeout = cmd.readTimeout() == nil
- return err
- }
-
- return nil
- })
- if lastErr == nil || !isRetryableError(lastErr, retryTimeout) {
- return lastErr
- }
- }
- return lastErr
-}
-
-func (c *baseClient) retryBackoff(attempt int) time.Duration {
- return internal.RetryBackoff(attempt, c.opt.MinRetryBackoff, c.opt.MaxRetryBackoff)
-}
-
-func (c *baseClient) cmdTimeout(cmd Cmder) time.Duration {
- if timeout := cmd.readTimeout(); timeout != nil {
- t := *timeout
- if t == 0 {
- return 0
- }
- return t + 10*time.Second
- }
- return c.opt.ReadTimeout
-}
-
-// Close closes the client, releasing any open resources.
-//
-// It is rare to Close a Client, as the Client is meant to be
-// long-lived and shared between many goroutines.
-func (c *baseClient) Close() error {
- var firstErr error
- if c.onClose != nil {
- if err := c.onClose(); err != nil {
- firstErr = err
- }
- }
- if err := c.connPool.Close(); err != nil && firstErr == nil {
- firstErr = err
- }
- return firstErr
-}
-
-func (c *baseClient) getAddr() string {
- return c.opt.Addr
-}
-
-func (c *baseClient) processPipeline(ctx context.Context, cmds []Cmder) error {
- return c.generalProcessPipeline(ctx, cmds, c.pipelineProcessCmds)
-}
-
-func (c *baseClient) processTxPipeline(ctx context.Context, cmds []Cmder) error {
- return c.generalProcessPipeline(ctx, cmds, c.txPipelineProcessCmds)
-}
-
-type pipelineProcessor func(context.Context, *pool.Conn, []Cmder) (bool, error)
-
-func (c *baseClient) generalProcessPipeline(
- ctx context.Context, cmds []Cmder, p pipelineProcessor,
-) error {
- err := c._generalProcessPipeline(ctx, cmds, p)
- if err != nil {
- setCmdsErr(cmds, err)
- return err
- }
- return cmdsFirstErr(cmds)
-}
-
-func (c *baseClient) _generalProcessPipeline(
- ctx context.Context, cmds []Cmder, p pipelineProcessor,
-) error {
- var lastErr error
- for attempt := 0; attempt <= c.opt.MaxRetries; attempt++ {
- if attempt > 0 {
- if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil {
- return err
- }
- }
-
- var canRetry bool
- lastErr = c.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error {
- var err error
- canRetry, err = p(ctx, cn, cmds)
- return err
- })
- if lastErr == nil || !canRetry || !isRetryableError(lastErr, true) {
- return lastErr
- }
- }
- return lastErr
-}
-
-func (c *baseClient) pipelineProcessCmds(
- ctx context.Context, cn *pool.Conn, cmds []Cmder,
-) (bool, error) {
- err := cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error {
- return writeCmds(wr, cmds)
- })
- if err != nil {
- return true, err
- }
-
- err = cn.WithReader(ctx, c.opt.ReadTimeout, func(rd *proto.Reader) error {
- return pipelineReadCmds(rd, cmds)
- })
- return true, err
-}
-
-func pipelineReadCmds(rd *proto.Reader, cmds []Cmder) error {
- for _, cmd := range cmds {
- err := cmd.readReply(rd)
- if err != nil && !isRedisError(err) {
- return err
- }
- }
- return nil
-}
-
-func (c *baseClient) txPipelineProcessCmds(
- ctx context.Context, cn *pool.Conn, cmds []Cmder,
-) (bool, error) {
- err := cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error {
- return writeCmds(wr, cmds)
- })
- if err != nil {
- return true, err
- }
-
- err = cn.WithReader(ctx, c.opt.ReadTimeout, func(rd *proto.Reader) error {
- statusCmd := cmds[0].(*StatusCmd)
- // Trim multi and exec.
- cmds = cmds[1 : len(cmds)-1]
-
- err := txPipelineReadQueued(rd, statusCmd, cmds)
- if err != nil {
- return err
- }
-
- return pipelineReadCmds(rd, cmds)
- })
- return false, err
-}
-
-func wrapMultiExec(cmds []Cmder) []Cmder {
- if len(cmds) == 0 {
- panic("not reached")
- }
- cmds = append(cmds, make([]Cmder, 2)...)
- copy(cmds[1:], cmds[:len(cmds)-2])
- cmds[0] = NewStatusCmd("multi")
- cmds[len(cmds)-1] = NewSliceCmd("exec")
- return cmds
-}
-
-func txPipelineReadQueued(rd *proto.Reader, statusCmd *StatusCmd, cmds []Cmder) error {
- // Parse queued replies.
- if err := statusCmd.readReply(rd); err != nil {
- return err
- }
-
- for range cmds {
- if err := statusCmd.readReply(rd); err != nil && !isRedisError(err) {
- return err
- }
- }
-
- // Parse number of replies.
- line, err := rd.ReadLine()
- if err != nil {
- if err == Nil {
- err = TxFailedErr
- }
- return err
- }
-
- switch line[0] {
- case proto.ErrorReply:
- return proto.ParseErrorReply(line)
- case proto.ArrayReply:
- // ok
- default:
- err := fmt.Errorf("redis: expected '*', but got line %q", line)
- return err
- }
-
- return nil
-}
-
-//------------------------------------------------------------------------------
-
-// Client is a Redis client representing a pool of zero or more
-// underlying connections. It's safe for concurrent use by multiple
-// goroutines.
-type Client struct {
- *baseClient
- cmdable
- hooks
- ctx context.Context
-}
-
-// NewClient returns a client to the Redis Server specified by Options.
-func NewClient(opt *Options) *Client {
- opt.init()
-
- c := Client{
- baseClient: newBaseClient(opt, newConnPool(opt)),
- ctx: context.Background(),
- }
- c.cmdable = c.Process
-
- return &c
-}
-
-func (c *Client) clone() *Client {
- clone := *c
- clone.cmdable = clone.Process
- clone.hooks.lock()
- return &clone
-}
-
-func (c *Client) WithTimeout(timeout time.Duration) *Client {
- clone := c.clone()
- clone.baseClient = c.baseClient.withTimeout(timeout)
- return clone
-}
-
-func (c *Client) Context() context.Context {
- return c.ctx
-}
-
-func (c *Client) WithContext(ctx context.Context) *Client {
- if ctx == nil {
- panic("nil context")
- }
- clone := c.clone()
- clone.ctx = ctx
- return clone
-}
-
-func (c *Client) Conn() *Conn {
- return newConn(c.ctx, c.opt, pool.NewSingleConnPool(c.connPool))
-}
-
-// Do creates a Cmd from the args and processes the cmd.
-func (c *Client) Do(args ...interface{}) *Cmd {
- return c.DoContext(c.ctx, args...)
-}
-
-func (c *Client) DoContext(ctx context.Context, args ...interface{}) *Cmd {
- cmd := NewCmd(args...)
- _ = c.ProcessContext(ctx, cmd)
- return cmd
-}
-
-func (c *Client) Process(cmd Cmder) error {
- return c.ProcessContext(c.ctx, cmd)
-}
-
-func (c *Client) ProcessContext(ctx context.Context, cmd Cmder) error {
- return c.hooks.process(ctx, cmd, c.baseClient.process)
-}
-
-func (c *Client) processPipeline(ctx context.Context, cmds []Cmder) error {
- return c.hooks.processPipeline(ctx, cmds, c.baseClient.processPipeline)
-}
-
-func (c *Client) processTxPipeline(ctx context.Context, cmds []Cmder) error {
- return c.hooks.processTxPipeline(ctx, cmds, c.baseClient.processTxPipeline)
-}
-
-// Options returns read-only Options that were used to create the client.
-func (c *Client) Options() *Options {
- return c.opt
-}
-
-type PoolStats pool.Stats
-
-// PoolStats returns connection pool stats.
-func (c *Client) PoolStats() *PoolStats {
- stats := c.connPool.Stats()
- return (*PoolStats)(stats)
-}
-
-func (c *Client) Pipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.Pipeline().Pipelined(fn)
-}
-
-func (c *Client) Pipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: c.processPipeline,
- }
- pipe.init()
- return &pipe
-}
-
-func (c *Client) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.TxPipeline().Pipelined(fn)
-}
-
-// TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
-func (c *Client) TxPipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: c.processTxPipeline,
- }
- pipe.init()
- return &pipe
-}
-
-func (c *Client) pubSub() *PubSub {
- pubsub := &PubSub{
- opt: c.opt,
-
- newConn: func(channels []string) (*pool.Conn, error) {
- return c.newConn(context.TODO())
- },
- closeConn: c.connPool.CloseConn,
- }
- pubsub.init()
- return pubsub
-}
-
-// Subscribe subscribes the client to the specified channels.
-// Channels can be omitted to create empty subscription.
-// Note that this method does not wait on a response from Redis, so the
-// subscription may not be active immediately. To force the connection to wait,
-// you may call the Receive() method on the returned *PubSub like so:
-//
-// sub := client.Subscribe(queryResp)
-// iface, err := sub.Receive()
-// if err != nil {
-// // handle error
-// }
-//
-// // Should be *Subscription, but others are possible if other actions have been
-// // taken on sub since it was created.
-// switch iface.(type) {
-// case *Subscription:
-// // subscribe succeeded
-// case *Message:
-// // received first message
-// case *Pong:
-// // pong received
-// default:
-// // handle error
-// }
-//
-// ch := sub.Channel()
-func (c *Client) Subscribe(channels ...string) *PubSub {
- pubsub := c.pubSub()
- if len(channels) > 0 {
- _ = pubsub.Subscribe(channels...)
- }
- return pubsub
-}
-
-// PSubscribe subscribes the client to the given patterns.
-// Patterns can be omitted to create empty subscription.
-func (c *Client) PSubscribe(channels ...string) *PubSub {
- pubsub := c.pubSub()
- if len(channels) > 0 {
- _ = pubsub.PSubscribe(channels...)
- }
- return pubsub
-}
-
-//------------------------------------------------------------------------------
-
-type conn struct {
- baseClient
- cmdable
- statefulCmdable
-}
-
-// Conn is like Client, but its pool contains single connection.
-type Conn struct {
- *conn
- ctx context.Context
-}
-
-func newConn(ctx context.Context, opt *Options, connPool pool.Pooler) *Conn {
- c := Conn{
- conn: &conn{
- baseClient: baseClient{
- opt: opt,
- connPool: connPool,
- },
- },
- ctx: ctx,
- }
- c.cmdable = c.Process
- c.statefulCmdable = c.Process
- return &c
-}
-
-func (c *Conn) Process(cmd Cmder) error {
- return c.ProcessContext(c.ctx, cmd)
-}
-
-func (c *Conn) ProcessContext(ctx context.Context, cmd Cmder) error {
- return c.baseClient.process(ctx, cmd)
-}
-
-func (c *Conn) Pipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.Pipeline().Pipelined(fn)
-}
-
-func (c *Conn) Pipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: c.processPipeline,
- }
- pipe.init()
- return &pipe
-}
-
-func (c *Conn) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.TxPipeline().Pipelined(fn)
-}
-
-// TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
-func (c *Conn) TxPipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: c.processTxPipeline,
- }
- pipe.init()
- return &pipe
-}
diff --git a/vendor/github.com/go-redis/redis/v7/result.go b/vendor/github.com/go-redis/redis/v7/result.go
deleted file mode 100644
index 5bec26ca9..000000000
--- a/vendor/github.com/go-redis/redis/v7/result.go
+++ /dev/null
@@ -1,180 +0,0 @@
-package redis
-
-import "time"
-
-// NewCmdResult returns a Cmd initialised with val and err for testing
-func NewCmdResult(val interface{}, err error) *Cmd {
- var cmd Cmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewSliceResult returns a SliceCmd initialised with val and err for testing
-func NewSliceResult(val []interface{}, err error) *SliceCmd {
- var cmd SliceCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewStatusResult returns a StatusCmd initialised with val and err for testing
-func NewStatusResult(val string, err error) *StatusCmd {
- var cmd StatusCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewIntResult returns an IntCmd initialised with val and err for testing
-func NewIntResult(val int64, err error) *IntCmd {
- var cmd IntCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewDurationResult returns a DurationCmd initialised with val and err for testing
-func NewDurationResult(val time.Duration, err error) *DurationCmd {
- var cmd DurationCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewBoolResult returns a BoolCmd initialised with val and err for testing
-func NewBoolResult(val bool, err error) *BoolCmd {
- var cmd BoolCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewStringResult returns a StringCmd initialised with val and err for testing
-func NewStringResult(val string, err error) *StringCmd {
- var cmd StringCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewFloatResult returns a FloatCmd initialised with val and err for testing
-func NewFloatResult(val float64, err error) *FloatCmd {
- var cmd FloatCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewStringSliceResult returns a StringSliceCmd initialised with val and err for testing
-func NewStringSliceResult(val []string, err error) *StringSliceCmd {
- var cmd StringSliceCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewBoolSliceResult returns a BoolSliceCmd initialised with val and err for testing
-func NewBoolSliceResult(val []bool, err error) *BoolSliceCmd {
- var cmd BoolSliceCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewStringStringMapResult returns a StringStringMapCmd initialised with val and err for testing
-func NewStringStringMapResult(val map[string]string, err error) *StringStringMapCmd {
- var cmd StringStringMapCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewStringIntMapCmdResult returns a StringIntMapCmd initialised with val and err for testing
-func NewStringIntMapCmdResult(val map[string]int64, err error) *StringIntMapCmd {
- var cmd StringIntMapCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewTimeCmdResult returns a TimeCmd initialised with val and err for testing
-func NewTimeCmdResult(val time.Time, err error) *TimeCmd {
- var cmd TimeCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewZSliceCmdResult returns a ZSliceCmd initialised with val and err for testing
-func NewZSliceCmdResult(val []Z, err error) *ZSliceCmd {
- var cmd ZSliceCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewZWithKeyCmdResult returns a NewZWithKeyCmd initialised with val and err for testing
-func NewZWithKeyCmdResult(val *ZWithKey, err error) *ZWithKeyCmd {
- var cmd ZWithKeyCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewScanCmdResult returns a ScanCmd initialised with val and err for testing
-func NewScanCmdResult(keys []string, cursor uint64, err error) *ScanCmd {
- var cmd ScanCmd
- cmd.page = keys
- cmd.cursor = cursor
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewClusterSlotsCmdResult returns a ClusterSlotsCmd initialised with val and err for testing
-func NewClusterSlotsCmdResult(val []ClusterSlot, err error) *ClusterSlotsCmd {
- var cmd ClusterSlotsCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewGeoLocationCmdResult returns a GeoLocationCmd initialised with val and err for testing
-func NewGeoLocationCmdResult(val []GeoLocation, err error) *GeoLocationCmd {
- var cmd GeoLocationCmd
- cmd.locations = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewGeoPosCmdResult returns a GeoPosCmd initialised with val and err for testing
-func NewGeoPosCmdResult(val []*GeoPos, err error) *GeoPosCmd {
- var cmd GeoPosCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewCommandsInfoCmdResult returns a CommandsInfoCmd initialised with val and err for testing
-func NewCommandsInfoCmdResult(val map[string]*CommandInfo, err error) *CommandsInfoCmd {
- var cmd CommandsInfoCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewXMessageSliceCmdResult returns a XMessageSliceCmd initialised with val and err for testing
-func NewXMessageSliceCmdResult(val []XMessage, err error) *XMessageSliceCmd {
- var cmd XMessageSliceCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
-
-// NewXStreamSliceCmdResult returns a XStreamSliceCmd initialised with val and err for testing
-func NewXStreamSliceCmdResult(val []XStream, err error) *XStreamSliceCmd {
- var cmd XStreamSliceCmd
- cmd.val = val
- cmd.SetErr(err)
- return &cmd
-}
diff --git a/vendor/github.com/go-redis/redis/v7/ring.go b/vendor/github.com/go-redis/redis/v7/ring.go
deleted file mode 100644
index 44fc623f8..000000000
--- a/vendor/github.com/go-redis/redis/v7/ring.go
+++ /dev/null
@@ -1,726 +0,0 @@
-package redis
-
-import (
- "context"
- "errors"
- "fmt"
- "math/rand"
- "strconv"
- "sync"
- "sync/atomic"
- "time"
-
- "github.com/go-redis/redis/v7/internal"
- "github.com/go-redis/redis/v7/internal/consistenthash"
- "github.com/go-redis/redis/v7/internal/hashtag"
- "github.com/go-redis/redis/v7/internal/pool"
-)
-
-// Hash is type of hash function used in consistent hash.
-type Hash consistenthash.Hash
-
-var errRingShardsDown = errors.New("redis: all ring shards are down")
-
-// RingOptions are used to configure a ring client and should be
-// passed to NewRing.
-type RingOptions struct {
- // Map of name => host:port addresses of ring shards.
- Addrs map[string]string
-
- // Map of name => password of ring shards, to allow different shards to have
- // different passwords. It will be ignored if the Password field is set.
- Passwords map[string]string
-
- // Frequency of PING commands sent to check shards availability.
- // Shard is considered down after 3 subsequent failed checks.
- HeartbeatFrequency time.Duration
-
- // Hash function used in consistent hash.
- // Default is crc32.ChecksumIEEE.
- Hash Hash
-
- // Number of replicas in consistent hash.
- // Default is 100 replicas.
- //
- // Higher number of replicas will provide less deviation, that is keys will be
- // distributed to nodes more evenly.
- //
- // Following is deviation for common nreplicas:
- // --------------------------------------------------------
- // | nreplicas | standard error | 99% confidence interval |
- // | 10 | 0.3152 | (0.37, 1.98) |
- // | 100 | 0.0997 | (0.76, 1.28) |
- // | 1000 | 0.0316 | (0.92, 1.09) |
- // --------------------------------------------------------
- //
- // See https://arxiv.org/abs/1406.2294 for reference
- HashReplicas int
-
- // NewClient creates a shard client with provided name and options.
- NewClient func(name string, opt *Options) *Client
-
- // Optional hook that is called when a new shard is created.
- OnNewShard func(*Client)
-
- // Following options are copied from Options struct.
-
- OnConnect func(*Conn) error
-
- DB int
- Password string
-
- MaxRetries int
- MinRetryBackoff time.Duration
- MaxRetryBackoff time.Duration
-
- DialTimeout time.Duration
- ReadTimeout time.Duration
- WriteTimeout time.Duration
-
- PoolSize int
- MinIdleConns int
- MaxConnAge time.Duration
- PoolTimeout time.Duration
- IdleTimeout time.Duration
- IdleCheckFrequency time.Duration
-}
-
-func (opt *RingOptions) init() {
- if opt.HeartbeatFrequency == 0 {
- opt.HeartbeatFrequency = 500 * time.Millisecond
- }
-
- if opt.HashReplicas == 0 {
- opt.HashReplicas = 100
- }
-
- switch opt.MinRetryBackoff {
- case -1:
- opt.MinRetryBackoff = 0
- case 0:
- opt.MinRetryBackoff = 8 * time.Millisecond
- }
- switch opt.MaxRetryBackoff {
- case -1:
- opt.MaxRetryBackoff = 0
- case 0:
- opt.MaxRetryBackoff = 512 * time.Millisecond
- }
-}
-
-func (opt *RingOptions) clientOptions(shard string) *Options {
- return &Options{
- OnConnect: opt.OnConnect,
-
- DB: opt.DB,
- Password: opt.getPassword(shard),
-
- DialTimeout: opt.DialTimeout,
- ReadTimeout: opt.ReadTimeout,
- WriteTimeout: opt.WriteTimeout,
-
- PoolSize: opt.PoolSize,
- MinIdleConns: opt.MinIdleConns,
- MaxConnAge: opt.MaxConnAge,
- PoolTimeout: opt.PoolTimeout,
- IdleTimeout: opt.IdleTimeout,
- IdleCheckFrequency: opt.IdleCheckFrequency,
- }
-}
-
-func (opt *RingOptions) getPassword(shard string) string {
- if opt.Password == "" {
- return opt.Passwords[shard]
- }
- return opt.Password
-}
-
-//------------------------------------------------------------------------------
-
-type ringShard struct {
- Client *Client
- down int32
-}
-
-func (shard *ringShard) String() string {
- var state string
- if shard.IsUp() {
- state = "up"
- } else {
- state = "down"
- }
- return fmt.Sprintf("%s is %s", shard.Client, state)
-}
-
-func (shard *ringShard) IsDown() bool {
- const threshold = 3
- return atomic.LoadInt32(&shard.down) >= threshold
-}
-
-func (shard *ringShard) IsUp() bool {
- return !shard.IsDown()
-}
-
-// Vote votes to set shard state and returns true if state was changed.
-func (shard *ringShard) Vote(up bool) bool {
- if up {
- changed := shard.IsDown()
- atomic.StoreInt32(&shard.down, 0)
- return changed
- }
-
- if shard.IsDown() {
- return false
- }
-
- atomic.AddInt32(&shard.down, 1)
- return shard.IsDown()
-}
-
-//------------------------------------------------------------------------------
-
-type ringShards struct {
- opt *RingOptions
-
- mu sync.RWMutex
- hash *consistenthash.Map
- shards map[string]*ringShard // read only
- list []*ringShard // read only
- len int
- closed bool
-}
-
-func newRingShards(opt *RingOptions) *ringShards {
- return &ringShards{
- opt: opt,
-
- hash: newConsistentHash(opt),
- shards: make(map[string]*ringShard),
- }
-}
-
-func (c *ringShards) Add(name string, cl *Client) {
- shard := &ringShard{Client: cl}
- c.hash.Add(name)
- c.shards[name] = shard
- c.list = append(c.list, shard)
-}
-
-func (c *ringShards) List() []*ringShard {
- c.mu.RLock()
- list := c.list
- c.mu.RUnlock()
- return list
-}
-
-func (c *ringShards) Hash(key string) string {
- c.mu.RLock()
- hash := c.hash.Get(key)
- c.mu.RUnlock()
- return hash
-}
-
-func (c *ringShards) GetByKey(key string) (*ringShard, error) {
- key = hashtag.Key(key)
-
- c.mu.RLock()
-
- if c.closed {
- c.mu.RUnlock()
- return nil, pool.ErrClosed
- }
-
- hash := c.hash.Get(key)
- if hash == "" {
- c.mu.RUnlock()
- return nil, errRingShardsDown
- }
-
- shard := c.shards[hash]
- c.mu.RUnlock()
-
- return shard, nil
-}
-
-func (c *ringShards) GetByHash(name string) (*ringShard, error) {
- if name == "" {
- return c.Random()
- }
-
- c.mu.RLock()
- shard := c.shards[name]
- c.mu.RUnlock()
- return shard, nil
-}
-
-func (c *ringShards) Random() (*ringShard, error) {
- return c.GetByKey(strconv.Itoa(rand.Int()))
-}
-
-// heartbeat monitors state of each shard in the ring.
-func (c *ringShards) Heartbeat(frequency time.Duration) {
- ticker := time.NewTicker(frequency)
- defer ticker.Stop()
- for range ticker.C {
- var rebalance bool
-
- c.mu.RLock()
-
- if c.closed {
- c.mu.RUnlock()
- break
- }
-
- shards := c.list
- c.mu.RUnlock()
-
- for _, shard := range shards {
- err := shard.Client.Ping().Err()
- if shard.Vote(err == nil || err == pool.ErrPoolTimeout) {
- internal.Logger.Printf("ring shard state changed: %s", shard)
- rebalance = true
- }
- }
-
- if rebalance {
- c.rebalance()
- }
- }
-}
-
-// rebalance removes dead shards from the Ring.
-func (c *ringShards) rebalance() {
- c.mu.RLock()
- shards := c.shards
- c.mu.RUnlock()
-
- hash := newConsistentHash(c.opt)
- var shardsNum int
- for name, shard := range shards {
- if shard.IsUp() {
- hash.Add(name)
- shardsNum++
- }
- }
-
- c.mu.Lock()
- c.hash = hash
- c.len = shardsNum
- c.mu.Unlock()
-}
-
-func (c *ringShards) Len() int {
- c.mu.RLock()
- l := c.len
- c.mu.RUnlock()
- return l
-}
-
-func (c *ringShards) Close() error {
- c.mu.Lock()
- defer c.mu.Unlock()
-
- if c.closed {
- return nil
- }
- c.closed = true
-
- var firstErr error
- for _, shard := range c.shards {
- if err := shard.Client.Close(); err != nil && firstErr == nil {
- firstErr = err
- }
- }
- c.hash = nil
- c.shards = nil
- c.list = nil
-
- return firstErr
-}
-
-//------------------------------------------------------------------------------
-
-type ring struct {
- opt *RingOptions
- shards *ringShards
- cmdsInfoCache *cmdsInfoCache //nolint:structcheck
-}
-
-// Ring is a Redis client that uses consistent hashing to distribute
-// keys across multiple Redis servers (shards). It's safe for
-// concurrent use by multiple goroutines.
-//
-// Ring monitors the state of each shard and removes dead shards from
-// the ring. When a shard comes online it is added back to the ring. This
-// gives you maximum availability and partition tolerance, but no
-// consistency between different shards or even clients. Each client
-// uses shards that are available to the client and does not do any
-// coordination when shard state is changed.
-//
-// Ring should be used when you need multiple Redis servers for caching
-// and can tolerate losing data when one of the servers dies.
-// Otherwise you should use Redis Cluster.
-type Ring struct {
- *ring
- cmdable
- hooks
- ctx context.Context
-}
-
-func NewRing(opt *RingOptions) *Ring {
- opt.init()
-
- ring := Ring{
- ring: &ring{
- opt: opt,
- shards: newRingShards(opt),
- },
- ctx: context.Background(),
- }
- ring.cmdsInfoCache = newCmdsInfoCache(ring.cmdsInfo)
- ring.cmdable = ring.Process
-
- for name, addr := range opt.Addrs {
- shard := newRingShard(opt, name, addr)
- ring.shards.Add(name, shard)
- }
-
- go ring.shards.Heartbeat(opt.HeartbeatFrequency)
-
- return &ring
-}
-
-func newRingShard(opt *RingOptions, name, addr string) *Client {
- clopt := opt.clientOptions(name)
- clopt.Addr = addr
- var shard *Client
- if opt.NewClient != nil {
- shard = opt.NewClient(name, clopt)
- } else {
- shard = NewClient(clopt)
- }
- if opt.OnNewShard != nil {
- opt.OnNewShard(shard)
- }
- return shard
-}
-
-func (c *Ring) Context() context.Context {
- return c.ctx
-}
-
-func (c *Ring) WithContext(ctx context.Context) *Ring {
- if ctx == nil {
- panic("nil context")
- }
- clone := *c
- clone.cmdable = clone.Process
- clone.hooks.lock()
- clone.ctx = ctx
- return &clone
-}
-
-// Do creates a Cmd from the args and processes the cmd.
-func (c *Ring) Do(args ...interface{}) *Cmd {
- return c.DoContext(c.ctx, args...)
-}
-
-func (c *Ring) DoContext(ctx context.Context, args ...interface{}) *Cmd {
- cmd := NewCmd(args...)
- _ = c.ProcessContext(ctx, cmd)
- return cmd
-}
-
-func (c *Ring) Process(cmd Cmder) error {
- return c.ProcessContext(c.ctx, cmd)
-}
-
-func (c *Ring) ProcessContext(ctx context.Context, cmd Cmder) error {
- return c.hooks.process(ctx, cmd, c.process)
-}
-
-// Options returns read-only Options that were used to create the client.
-func (c *Ring) Options() *RingOptions {
- return c.opt
-}
-
-func (c *Ring) retryBackoff(attempt int) time.Duration {
- return internal.RetryBackoff(attempt, c.opt.MinRetryBackoff, c.opt.MaxRetryBackoff)
-}
-
-// PoolStats returns accumulated connection pool stats.
-func (c *Ring) PoolStats() *PoolStats {
- shards := c.shards.List()
- var acc PoolStats
- for _, shard := range shards {
- s := shard.Client.connPool.Stats()
- acc.Hits += s.Hits
- acc.Misses += s.Misses
- acc.Timeouts += s.Timeouts
- acc.TotalConns += s.TotalConns
- acc.IdleConns += s.IdleConns
- }
- return &acc
-}
-
-// Len returns the current number of shards in the ring.
-func (c *Ring) Len() int {
- return c.shards.Len()
-}
-
-// Subscribe subscribes the client to the specified channels.
-func (c *Ring) Subscribe(channels ...string) *PubSub {
- if len(channels) == 0 {
- panic("at least one channel is required")
- }
-
- shard, err := c.shards.GetByKey(channels[0])
- if err != nil {
- //TODO: return PubSub with sticky error
- panic(err)
- }
- return shard.Client.Subscribe(channels...)
-}
-
-// PSubscribe subscribes the client to the given patterns.
-func (c *Ring) PSubscribe(channels ...string) *PubSub {
- if len(channels) == 0 {
- panic("at least one channel is required")
- }
-
- shard, err := c.shards.GetByKey(channels[0])
- if err != nil {
- //TODO: return PubSub with sticky error
- panic(err)
- }
- return shard.Client.PSubscribe(channels...)
-}
-
-// ForEachShard concurrently calls the fn on each live shard in the ring.
-// It returns the first error if any.
-func (c *Ring) ForEachShard(fn func(client *Client) error) error {
- shards := c.shards.List()
- var wg sync.WaitGroup
- errCh := make(chan error, 1)
- for _, shard := range shards {
- if shard.IsDown() {
- continue
- }
-
- wg.Add(1)
- go func(shard *ringShard) {
- defer wg.Done()
- err := fn(shard.Client)
- if err != nil {
- select {
- case errCh <- err:
- default:
- }
- }
- }(shard)
- }
- wg.Wait()
-
- select {
- case err := <-errCh:
- return err
- default:
- return nil
- }
-}
-
-func (c *Ring) cmdsInfo() (map[string]*CommandInfo, error) {
- shards := c.shards.List()
- firstErr := errRingShardsDown
- for _, shard := range shards {
- cmdsInfo, err := shard.Client.Command().Result()
- if err == nil {
- return cmdsInfo, nil
- }
- if firstErr == nil {
- firstErr = err
- }
- }
- return nil, firstErr
-}
-
-func (c *Ring) cmdInfo(name string) *CommandInfo {
- cmdsInfo, err := c.cmdsInfoCache.Get()
- if err != nil {
- return nil
- }
- info := cmdsInfo[name]
- if info == nil {
- internal.Logger.Printf("info for cmd=%s not found", name)
- }
- return info
-}
-
-func (c *Ring) cmdShard(cmd Cmder) (*ringShard, error) {
- cmdInfo := c.cmdInfo(cmd.Name())
- pos := cmdFirstKeyPos(cmd, cmdInfo)
- if pos == 0 {
- return c.shards.Random()
- }
- firstKey := cmd.stringArg(pos)
- return c.shards.GetByKey(firstKey)
-}
-
-func (c *Ring) process(ctx context.Context, cmd Cmder) error {
- err := c._process(ctx, cmd)
- if err != nil {
- cmd.SetErr(err)
- return err
- }
- return nil
-}
-
-func (c *Ring) _process(ctx context.Context, cmd Cmder) error {
- var lastErr error
- for attempt := 0; attempt <= c.opt.MaxRetries; attempt++ {
- if attempt > 0 {
- if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil {
- return err
- }
- }
-
- shard, err := c.cmdShard(cmd)
- if err != nil {
- return err
- }
-
- lastErr = shard.Client.ProcessContext(ctx, cmd)
- if lastErr == nil || !isRetryableError(lastErr, cmd.readTimeout() == nil) {
- return lastErr
- }
- }
- return lastErr
-}
-
-func (c *Ring) Pipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.Pipeline().Pipelined(fn)
-}
-
-func (c *Ring) Pipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: c.processPipeline,
- }
- pipe.init()
- return &pipe
-}
-
-func (c *Ring) processPipeline(ctx context.Context, cmds []Cmder) error {
- return c.hooks.processPipeline(ctx, cmds, func(ctx context.Context, cmds []Cmder) error {
- return c.generalProcessPipeline(ctx, cmds, false)
- })
-}
-
-func (c *Ring) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.TxPipeline().Pipelined(fn)
-}
-
-func (c *Ring) TxPipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: c.processTxPipeline,
- }
- pipe.init()
- return &pipe
-}
-
-func (c *Ring) processTxPipeline(ctx context.Context, cmds []Cmder) error {
- return c.hooks.processPipeline(ctx, cmds, func(ctx context.Context, cmds []Cmder) error {
- return c.generalProcessPipeline(ctx, cmds, true)
- })
-}
-
-func (c *Ring) generalProcessPipeline(
- ctx context.Context, cmds []Cmder, tx bool,
-) error {
- cmdsMap := make(map[string][]Cmder)
- for _, cmd := range cmds {
- cmdInfo := c.cmdInfo(cmd.Name())
- hash := cmd.stringArg(cmdFirstKeyPos(cmd, cmdInfo))
- if hash != "" {
- hash = c.shards.Hash(hashtag.Key(hash))
- }
- cmdsMap[hash] = append(cmdsMap[hash], cmd)
- }
-
- var wg sync.WaitGroup
- for hash, cmds := range cmdsMap {
- wg.Add(1)
- go func(hash string, cmds []Cmder) {
- defer wg.Done()
-
- _ = c.processShardPipeline(ctx, hash, cmds, tx)
- }(hash, cmds)
- }
-
- wg.Wait()
- return cmdsFirstErr(cmds)
-}
-
-func (c *Ring) processShardPipeline(
- ctx context.Context, hash string, cmds []Cmder, tx bool,
-) error {
- //TODO: retry?
- shard, err := c.shards.GetByHash(hash)
- if err != nil {
- setCmdsErr(cmds, err)
- return err
- }
-
- if tx {
- err = shard.Client.processTxPipeline(ctx, cmds)
- } else {
- err = shard.Client.processPipeline(ctx, cmds)
- }
- return err
-}
-
-// Close closes the ring client, releasing any open resources.
-//
-// It is rare to Close a Ring, as the Ring is meant to be long-lived
-// and shared between many goroutines.
-func (c *Ring) Close() error {
- return c.shards.Close()
-}
-
-func (c *Ring) Watch(fn func(*Tx) error, keys ...string) error {
- if len(keys) == 0 {
- return fmt.Errorf("redis: Watch requires at least one key")
- }
-
- var shards []*ringShard
- for _, key := range keys {
- if key != "" {
- shard, err := c.shards.GetByKey(hashtag.Key(key))
- if err != nil {
- return err
- }
-
- shards = append(shards, shard)
- }
- }
-
- if len(shards) == 0 {
- return fmt.Errorf("redis: Watch requires at least one shard")
- }
-
- if len(shards) > 1 {
- for _, shard := range shards[1:] {
- if shard.Client != shards[0].Client {
- err := fmt.Errorf("redis: Watch requires all keys to be in the same shard")
- return err
- }
- }
- }
-
- return shards[0].Client.Watch(fn, keys...)
-}
-
-func newConsistentHash(opt *RingOptions) *consistenthash.Map {
- return consistenthash.New(opt.HashReplicas, consistenthash.Hash(opt.Hash))
-}
diff --git a/vendor/github.com/go-redis/redis/v7/script.go b/vendor/github.com/go-redis/redis/v7/script.go
deleted file mode 100644
index 88b7d0a2e..000000000
--- a/vendor/github.com/go-redis/redis/v7/script.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package redis
-
-import (
- "crypto/sha1"
- "encoding/hex"
- "io"
- "strings"
-)
-
-type scripter interface {
- Eval(script string, keys []string, args ...interface{}) *Cmd
- EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd
- ScriptExists(hashes ...string) *BoolSliceCmd
- ScriptLoad(script string) *StringCmd
-}
-
-var _ scripter = (*Client)(nil)
-var _ scripter = (*Ring)(nil)
-var _ scripter = (*ClusterClient)(nil)
-
-type Script struct {
- src, hash string
-}
-
-func NewScript(src string) *Script {
- h := sha1.New()
- _, _ = io.WriteString(h, src)
- return &Script{
- src: src,
- hash: hex.EncodeToString(h.Sum(nil)),
- }
-}
-
-func (s *Script) Hash() string {
- return s.hash
-}
-
-func (s *Script) Load(c scripter) *StringCmd {
- return c.ScriptLoad(s.src)
-}
-
-func (s *Script) Exists(c scripter) *BoolSliceCmd {
- return c.ScriptExists(s.hash)
-}
-
-func (s *Script) Eval(c scripter, keys []string, args ...interface{}) *Cmd {
- return c.Eval(s.src, keys, args...)
-}
-
-func (s *Script) EvalSha(c scripter, keys []string, args ...interface{}) *Cmd {
- return c.EvalSha(s.hash, keys, args...)
-}
-
-// Run optimistically uses EVALSHA to run the script. If script does not exist
-// it is retried using EVAL.
-func (s *Script) Run(c scripter, keys []string, args ...interface{}) *Cmd {
- r := s.EvalSha(c, keys, args...)
- if err := r.Err(); err != nil && strings.HasPrefix(err.Error(), "NOSCRIPT ") {
- return s.Eval(c, keys, args...)
- }
- return r
-}
diff --git a/vendor/github.com/go-redis/redis/v7/sentinel.go b/vendor/github.com/go-redis/redis/v7/sentinel.go
deleted file mode 100644
index 8aa40ef79..000000000
--- a/vendor/github.com/go-redis/redis/v7/sentinel.go
+++ /dev/null
@@ -1,509 +0,0 @@
-package redis
-
-import (
- "context"
- "crypto/tls"
- "errors"
- "net"
- "strings"
- "sync"
- "time"
-
- "github.com/go-redis/redis/v7/internal"
- "github.com/go-redis/redis/v7/internal/pool"
-)
-
-//------------------------------------------------------------------------------
-
-// FailoverOptions are used to configure a failover client and should
-// be passed to NewFailoverClient.
-type FailoverOptions struct {
- // The master name.
- MasterName string
- // A seed list of host:port addresses of sentinel nodes.
- SentinelAddrs []string
- SentinelUsername string
- SentinelPassword string
-
- // Following options are copied from Options struct.
-
- Dialer func(ctx context.Context, network, addr string) (net.Conn, error)
- OnConnect func(*Conn) error
-
- Username string
- Password string
- DB int
-
- MaxRetries int
- MinRetryBackoff time.Duration
- MaxRetryBackoff time.Duration
-
- DialTimeout time.Duration
- ReadTimeout time.Duration
- WriteTimeout time.Duration
-
- PoolSize int
- MinIdleConns int
- MaxConnAge time.Duration
- PoolTimeout time.Duration
- IdleTimeout time.Duration
- IdleCheckFrequency time.Duration
-
- TLSConfig *tls.Config
-}
-
-func (opt *FailoverOptions) options() *Options {
- return &Options{
- Addr: "FailoverClient",
- Dialer: opt.Dialer,
- OnConnect: opt.OnConnect,
-
- DB: opt.DB,
- Username: opt.Username,
- Password: opt.Password,
-
- MaxRetries: opt.MaxRetries,
- MinRetryBackoff: opt.MinRetryBackoff,
- MaxRetryBackoff: opt.MaxRetryBackoff,
-
- DialTimeout: opt.DialTimeout,
- ReadTimeout: opt.ReadTimeout,
- WriteTimeout: opt.WriteTimeout,
-
- PoolSize: opt.PoolSize,
- PoolTimeout: opt.PoolTimeout,
- IdleTimeout: opt.IdleTimeout,
- IdleCheckFrequency: opt.IdleCheckFrequency,
- MinIdleConns: opt.MinIdleConns,
- MaxConnAge: opt.MaxConnAge,
-
- TLSConfig: opt.TLSConfig,
- }
-}
-
-// NewFailoverClient returns a Redis client that uses Redis Sentinel
-// for automatic failover. It's safe for concurrent use by multiple
-// goroutines.
-func NewFailoverClient(failoverOpt *FailoverOptions) *Client {
- opt := failoverOpt.options()
- opt.init()
-
- failover := &sentinelFailover{
- masterName: failoverOpt.MasterName,
- sentinelAddrs: failoverOpt.SentinelAddrs,
- username: failoverOpt.SentinelUsername,
- password: failoverOpt.SentinelPassword,
-
- opt: opt,
- }
-
- c := Client{
- baseClient: newBaseClient(opt, failover.Pool()),
- ctx: context.Background(),
- }
- c.cmdable = c.Process
- c.onClose = failover.Close
-
- return &c
-}
-
-//------------------------------------------------------------------------------
-
-type SentinelClient struct {
- *baseClient
- ctx context.Context
-}
-
-func NewSentinelClient(opt *Options) *SentinelClient {
- opt.init()
- c := &SentinelClient{
- baseClient: &baseClient{
- opt: opt,
- connPool: newConnPool(opt),
- },
- ctx: context.Background(),
- }
- return c
-}
-
-func (c *SentinelClient) Context() context.Context {
- return c.ctx
-}
-
-func (c *SentinelClient) WithContext(ctx context.Context) *SentinelClient {
- if ctx == nil {
- panic("nil context")
- }
- clone := *c
- clone.ctx = ctx
- return &clone
-}
-
-func (c *SentinelClient) Process(cmd Cmder) error {
- return c.ProcessContext(c.ctx, cmd)
-}
-
-func (c *SentinelClient) ProcessContext(ctx context.Context, cmd Cmder) error {
- return c.baseClient.process(ctx, cmd)
-}
-
-func (c *SentinelClient) pubSub() *PubSub {
- pubsub := &PubSub{
- opt: c.opt,
-
- newConn: func(channels []string) (*pool.Conn, error) {
- return c.newConn(context.TODO())
- },
- closeConn: c.connPool.CloseConn,
- }
- pubsub.init()
- return pubsub
-}
-
-// Ping is used to test if a connection is still alive, or to
-// measure latency.
-func (c *SentinelClient) Ping() *StringCmd {
- cmd := NewStringCmd("ping")
- _ = c.Process(cmd)
- return cmd
-}
-
-// Subscribe subscribes the client to the specified channels.
-// Channels can be omitted to create empty subscription.
-func (c *SentinelClient) Subscribe(channels ...string) *PubSub {
- pubsub := c.pubSub()
- if len(channels) > 0 {
- _ = pubsub.Subscribe(channels...)
- }
- return pubsub
-}
-
-// PSubscribe subscribes the client to the given patterns.
-// Patterns can be omitted to create empty subscription.
-func (c *SentinelClient) PSubscribe(channels ...string) *PubSub {
- pubsub := c.pubSub()
- if len(channels) > 0 {
- _ = pubsub.PSubscribe(channels...)
- }
- return pubsub
-}
-
-func (c *SentinelClient) GetMasterAddrByName(name string) *StringSliceCmd {
- cmd := NewStringSliceCmd("sentinel", "get-master-addr-by-name", name)
- _ = c.Process(cmd)
- return cmd
-}
-
-func (c *SentinelClient) Sentinels(name string) *SliceCmd {
- cmd := NewSliceCmd("sentinel", "sentinels", name)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Failover forces a failover as if the master was not reachable, and without
-// asking for agreement to other Sentinels.
-func (c *SentinelClient) Failover(name string) *StatusCmd {
- cmd := NewStatusCmd("sentinel", "failover", name)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Reset resets all the masters with matching name. The pattern argument is a
-// glob-style pattern. The reset process clears any previous state in a master
-// (including a failover in progress), and removes every slave and sentinel
-// already discovered and associated with the master.
-func (c *SentinelClient) Reset(pattern string) *IntCmd {
- cmd := NewIntCmd("sentinel", "reset", pattern)
- _ = c.Process(cmd)
- return cmd
-}
-
-// FlushConfig forces Sentinel to rewrite its configuration on disk, including
-// the current Sentinel state.
-func (c *SentinelClient) FlushConfig() *StatusCmd {
- cmd := NewStatusCmd("sentinel", "flushconfig")
- _ = c.Process(cmd)
- return cmd
-}
-
-// Master shows the state and info of the specified master.
-func (c *SentinelClient) Master(name string) *StringStringMapCmd {
- cmd := NewStringStringMapCmd("sentinel", "master", name)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Masters shows a list of monitored masters and their state.
-func (c *SentinelClient) Masters() *SliceCmd {
- cmd := NewSliceCmd("sentinel", "masters")
- _ = c.Process(cmd)
- return cmd
-}
-
-// Slaves shows a list of slaves for the specified master and their state.
-func (c *SentinelClient) Slaves(name string) *SliceCmd {
- cmd := NewSliceCmd("sentinel", "slaves", name)
- _ = c.Process(cmd)
- return cmd
-}
-
-// CkQuorum checks if the current Sentinel configuration is able to reach the
-// quorum needed to failover a master, and the majority needed to authorize the
-// failover. This command should be used in monitoring systems to check if a
-// Sentinel deployment is ok.
-func (c *SentinelClient) CkQuorum(name string) *StringCmd {
- cmd := NewStringCmd("sentinel", "ckquorum", name)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Monitor tells the Sentinel to start monitoring a new master with the specified
-// name, ip, port, and quorum.
-func (c *SentinelClient) Monitor(name, ip, port, quorum string) *StringCmd {
- cmd := NewStringCmd("sentinel", "monitor", name, ip, port, quorum)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Set is used in order to change configuration parameters of a specific master.
-func (c *SentinelClient) Set(name, option, value string) *StringCmd {
- cmd := NewStringCmd("sentinel", "set", name, option, value)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Remove is used in order to remove the specified master: the master will no
-// longer be monitored, and will totally be removed from the internal state of
-// the Sentinel.
-func (c *SentinelClient) Remove(name string) *StringCmd {
- cmd := NewStringCmd("sentinel", "remove", name)
- _ = c.Process(cmd)
- return cmd
-}
-
-type sentinelFailover struct {
- sentinelAddrs []string
-
- opt *Options
- username string
- password string
-
- pool *pool.ConnPool
- poolOnce sync.Once
-
- mu sync.RWMutex
- masterName string
- _masterAddr string
- sentinel *SentinelClient
- pubsub *PubSub
-}
-
-func (c *sentinelFailover) Close() error {
- c.mu.Lock()
- defer c.mu.Unlock()
- if c.sentinel != nil {
- return c.closeSentinel()
- }
- return nil
-}
-
-func (c *sentinelFailover) closeSentinel() error {
- firstErr := c.pubsub.Close()
- c.pubsub = nil
-
- err := c.sentinel.Close()
- if err != nil && firstErr == nil {
- firstErr = err
- }
- c.sentinel = nil
-
- return firstErr
-}
-
-func (c *sentinelFailover) Pool() *pool.ConnPool {
- c.poolOnce.Do(func() {
- opt := *c.opt
- opt.Dialer = c.dial
- c.pool = newConnPool(&opt)
- })
- return c.pool
-}
-
-func (c *sentinelFailover) dial(ctx context.Context, network, _ string) (net.Conn, error) {
- addr, err := c.MasterAddr()
- if err != nil {
- return nil, err
- }
- if c.opt.Dialer != nil {
- return c.opt.Dialer(ctx, network, addr)
- }
- return net.DialTimeout("tcp", addr, c.opt.DialTimeout)
-}
-
-func (c *sentinelFailover) MasterAddr() (string, error) {
- addr, err := c.masterAddr()
- if err != nil {
- return "", err
- }
- c.switchMaster(addr)
- return addr, nil
-}
-
-func (c *sentinelFailover) masterAddr() (string, error) {
- c.mu.RLock()
- sentinel := c.sentinel
- c.mu.RUnlock()
-
- if sentinel != nil {
- addr := c.getMasterAddr(sentinel)
- if addr != "" {
- return addr, nil
- }
- }
-
- c.mu.Lock()
- defer c.mu.Unlock()
-
- if c.sentinel != nil {
- addr := c.getMasterAddr(c.sentinel)
- if addr != "" {
- return addr, nil
- }
- _ = c.closeSentinel()
- }
-
- for i, sentinelAddr := range c.sentinelAddrs {
- sentinel := NewSentinelClient(&Options{
- Addr: sentinelAddr,
- Dialer: c.opt.Dialer,
-
- Username: c.username,
- Password: c.password,
-
- MaxRetries: c.opt.MaxRetries,
-
- DialTimeout: c.opt.DialTimeout,
- ReadTimeout: c.opt.ReadTimeout,
- WriteTimeout: c.opt.WriteTimeout,
-
- PoolSize: c.opt.PoolSize,
- PoolTimeout: c.opt.PoolTimeout,
- IdleTimeout: c.opt.IdleTimeout,
- IdleCheckFrequency: c.opt.IdleCheckFrequency,
-
- TLSConfig: c.opt.TLSConfig,
- })
-
- masterAddr, err := sentinel.GetMasterAddrByName(c.masterName).Result()
- if err != nil {
- internal.Logger.Printf("sentinel: GetMasterAddrByName master=%q failed: %s",
- c.masterName, err)
- _ = sentinel.Close()
- continue
- }
-
- // Push working sentinel to the top.
- c.sentinelAddrs[0], c.sentinelAddrs[i] = c.sentinelAddrs[i], c.sentinelAddrs[0]
- c.setSentinel(sentinel)
-
- addr := net.JoinHostPort(masterAddr[0], masterAddr[1])
- return addr, nil
- }
-
- return "", errors.New("redis: all sentinels are unreachable")
-}
-
-func (c *sentinelFailover) getMasterAddr(sentinel *SentinelClient) string {
- addr, err := sentinel.GetMasterAddrByName(c.masterName).Result()
- if err != nil {
- internal.Logger.Printf("sentinel: GetMasterAddrByName name=%q failed: %s",
- c.masterName, err)
- return ""
- }
- return net.JoinHostPort(addr[0], addr[1])
-}
-
-func (c *sentinelFailover) switchMaster(addr string) {
- c.mu.RLock()
- masterAddr := c._masterAddr
- c.mu.RUnlock()
- if masterAddr == addr {
- return
- }
-
- c.mu.Lock()
- defer c.mu.Unlock()
-
- if c._masterAddr == addr {
- return
- }
-
- internal.Logger.Printf("sentinel: new master=%q addr=%q",
- c.masterName, addr)
- _ = c.Pool().Filter(func(cn *pool.Conn) bool {
- return cn.RemoteAddr().String() != addr
- })
- c._masterAddr = addr
-}
-
-func (c *sentinelFailover) setSentinel(sentinel *SentinelClient) {
- if c.sentinel != nil {
- panic("not reached")
- }
- c.sentinel = sentinel
- c.discoverSentinels()
-
- c.pubsub = sentinel.Subscribe("+switch-master")
- go c.listen(c.pubsub)
-}
-
-func (c *sentinelFailover) discoverSentinels() {
- sentinels, err := c.sentinel.Sentinels(c.masterName).Result()
- if err != nil {
- internal.Logger.Printf("sentinel: Sentinels master=%q failed: %s", c.masterName, err)
- return
- }
- for _, sentinel := range sentinels {
- vals := sentinel.([]interface{})
- for i := 0; i < len(vals); i += 2 {
- key := vals[i].(string)
- if key == "name" {
- sentinelAddr := vals[i+1].(string)
- if !contains(c.sentinelAddrs, sentinelAddr) {
- internal.Logger.Printf("sentinel: discovered new sentinel=%q for master=%q",
- sentinelAddr, c.masterName)
- c.sentinelAddrs = append(c.sentinelAddrs, sentinelAddr)
- }
- }
- }
- }
-}
-
-func (c *sentinelFailover) listen(pubsub *PubSub) {
- ch := pubsub.Channel()
- for {
- msg, ok := <-ch
- if !ok {
- break
- }
-
- if msg.Channel == "+switch-master" {
- parts := strings.Split(msg.Payload, " ")
- if parts[0] != c.masterName {
- internal.Logger.Printf("sentinel: ignore addr for master=%q", parts[0])
- continue
- }
- addr := net.JoinHostPort(parts[3], parts[4])
- c.switchMaster(addr)
- }
- }
-}
-
-func contains(slice []string, str string) bool {
- for _, s := range slice {
- if s == str {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/go-redis/redis/v7/tx.go b/vendor/github.com/go-redis/redis/v7/tx.go
deleted file mode 100644
index 9ae159015..000000000
--- a/vendor/github.com/go-redis/redis/v7/tx.go
+++ /dev/null
@@ -1,159 +0,0 @@
-package redis
-
-import (
- "context"
-
- "github.com/go-redis/redis/v7/internal/pool"
- "github.com/go-redis/redis/v7/internal/proto"
-)
-
-// TxFailedErr transaction redis failed.
-const TxFailedErr = proto.RedisError("redis: transaction failed")
-
-// Tx implements Redis transactions as described in
-// http://redis.io/topics/transactions. It's NOT safe for concurrent use
-// by multiple goroutines, because Exec resets list of watched keys.
-// If you don't need WATCH it is better to use Pipeline.
-type Tx struct {
- baseClient
- cmdable
- statefulCmdable
- hooks
- ctx context.Context
-}
-
-func (c *Client) newTx(ctx context.Context) *Tx {
- tx := Tx{
- baseClient: baseClient{
- opt: c.opt,
- connPool: pool.NewStickyConnPool(c.connPool.(*pool.ConnPool), true),
- },
- hooks: c.hooks.clone(),
- ctx: ctx,
- }
- tx.init()
- return &tx
-}
-
-func (c *Tx) init() {
- c.cmdable = c.Process
- c.statefulCmdable = c.Process
-}
-
-func (c *Tx) Context() context.Context {
- return c.ctx
-}
-
-func (c *Tx) WithContext(ctx context.Context) *Tx {
- if ctx == nil {
- panic("nil context")
- }
- clone := *c
- clone.init()
- clone.hooks.lock()
- clone.ctx = ctx
- return &clone
-}
-
-func (c *Tx) Process(cmd Cmder) error {
- return c.ProcessContext(c.ctx, cmd)
-}
-
-func (c *Tx) ProcessContext(ctx context.Context, cmd Cmder) error {
- return c.hooks.process(ctx, cmd, c.baseClient.process)
-}
-
-// Watch prepares a transaction and marks the keys to be watched
-// for conditional execution if there are any keys.
-//
-// The transaction is automatically closed when fn exits.
-func (c *Client) Watch(fn func(*Tx) error, keys ...string) error {
- return c.WatchContext(c.ctx, fn, keys...)
-}
-
-func (c *Client) WatchContext(ctx context.Context, fn func(*Tx) error, keys ...string) error {
- tx := c.newTx(ctx)
- if len(keys) > 0 {
- if err := tx.Watch(keys...).Err(); err != nil {
- _ = tx.Close()
- return err
- }
- }
-
- err := fn(tx)
- _ = tx.Close()
- return err
-}
-
-// Close closes the transaction, releasing any open resources.
-func (c *Tx) Close() error {
- _ = c.Unwatch().Err()
- return c.baseClient.Close()
-}
-
-// Watch marks the keys to be watched for conditional execution
-// of a transaction.
-func (c *Tx) Watch(keys ...string) *StatusCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "watch"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewStatusCmd(args...)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Unwatch flushes all the previously watched keys for a transaction.
-func (c *Tx) Unwatch(keys ...string) *StatusCmd {
- args := make([]interface{}, 1+len(keys))
- args[0] = "unwatch"
- for i, key := range keys {
- args[1+i] = key
- }
- cmd := NewStatusCmd(args...)
- _ = c.Process(cmd)
- return cmd
-}
-
-// Pipeline creates a pipeline. Usually it is more convenient to use Pipelined.
-func (c *Tx) Pipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: func(ctx context.Context, cmds []Cmder) error {
- return c.hooks.processPipeline(ctx, cmds, c.baseClient.processPipeline)
- },
- }
- pipe.init()
- return &pipe
-}
-
-// Pipelined executes commands queued in the fn outside of the transaction.
-// Use TxPipelined if you need transactional behavior.
-func (c *Tx) Pipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.Pipeline().Pipelined(fn)
-}
-
-// TxPipelined executes commands queued in the fn in the transaction.
-//
-// When using WATCH, EXEC will execute commands only if the watched keys
-// were not modified, allowing for a check-and-set mechanism.
-//
-// Exec always returns list of commands. If transaction fails
-// TxFailedErr is returned. Otherwise Exec returns an error of the first
-// failed command or nil.
-func (c *Tx) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
- return c.TxPipeline().Pipelined(fn)
-}
-
-// TxPipeline creates a pipeline. Usually it is more convenient to use TxPipelined.
-func (c *Tx) TxPipeline() Pipeliner {
- pipe := Pipeline{
- ctx: c.ctx,
- exec: func(ctx context.Context, cmds []Cmder) error {
- return c.hooks.processTxPipeline(ctx, cmds, c.baseClient.processTxPipeline)
- },
- }
- pipe.init()
- return &pipe
-}
diff --git a/vendor/github.com/go-redis/redis/v7/universal.go b/vendor/github.com/go-redis/redis/v7/universal.go
deleted file mode 100644
index 005ca682c..000000000
--- a/vendor/github.com/go-redis/redis/v7/universal.go
+++ /dev/null
@@ -1,198 +0,0 @@
-package redis
-
-import (
- "context"
- "crypto/tls"
- "net"
- "time"
-)
-
-// UniversalOptions information is required by UniversalClient to establish
-// connections.
-type UniversalOptions struct {
- // Either a single address or a seed list of host:port addresses
- // of cluster/sentinel nodes.
- Addrs []string
-
- // Database to be selected after connecting to the server.
- // Only single-node and failover clients.
- DB int
-
- // Common options.
-
- Dialer func(ctx context.Context, network, addr string) (net.Conn, error)
- OnConnect func(*Conn) error
- Username string
- Password string
- MaxRetries int
- MinRetryBackoff time.Duration
- MaxRetryBackoff time.Duration
- DialTimeout time.Duration
- ReadTimeout time.Duration
- WriteTimeout time.Duration
- PoolSize int
- MinIdleConns int
- MaxConnAge time.Duration
- PoolTimeout time.Duration
- IdleTimeout time.Duration
- IdleCheckFrequency time.Duration
- TLSConfig *tls.Config
-
- // Only cluster clients.
-
- MaxRedirects int
- ReadOnly bool
- RouteByLatency bool
- RouteRandomly bool
-
- // The sentinel master name.
- // Only failover clients.
- MasterName string
-}
-
-// Cluster returns cluster options created from the universal options.
-func (o *UniversalOptions) Cluster() *ClusterOptions {
- if len(o.Addrs) == 0 {
- o.Addrs = []string{"127.0.0.1:6379"}
- }
-
- return &ClusterOptions{
- Addrs: o.Addrs,
- Dialer: o.Dialer,
- OnConnect: o.OnConnect,
-
- Username: o.Username,
- Password: o.Password,
-
- MaxRedirects: o.MaxRedirects,
- ReadOnly: o.ReadOnly,
- RouteByLatency: o.RouteByLatency,
- RouteRandomly: o.RouteRandomly,
-
- MaxRetries: o.MaxRetries,
- MinRetryBackoff: o.MinRetryBackoff,
- MaxRetryBackoff: o.MaxRetryBackoff,
-
- DialTimeout: o.DialTimeout,
- ReadTimeout: o.ReadTimeout,
- WriteTimeout: o.WriteTimeout,
- PoolSize: o.PoolSize,
- MinIdleConns: o.MinIdleConns,
- MaxConnAge: o.MaxConnAge,
- PoolTimeout: o.PoolTimeout,
- IdleTimeout: o.IdleTimeout,
- IdleCheckFrequency: o.IdleCheckFrequency,
-
- TLSConfig: o.TLSConfig,
- }
-}
-
-// Failover returns failover options created from the universal options.
-func (o *UniversalOptions) Failover() *FailoverOptions {
- if len(o.Addrs) == 0 {
- o.Addrs = []string{"127.0.0.1:26379"}
- }
-
- return &FailoverOptions{
- SentinelAddrs: o.Addrs,
- MasterName: o.MasterName,
-
- Dialer: o.Dialer,
- OnConnect: o.OnConnect,
-
- DB: o.DB,
- Username: o.Username,
- Password: o.Password,
-
- MaxRetries: o.MaxRetries,
- MinRetryBackoff: o.MinRetryBackoff,
- MaxRetryBackoff: o.MaxRetryBackoff,
-
- DialTimeout: o.DialTimeout,
- ReadTimeout: o.ReadTimeout,
- WriteTimeout: o.WriteTimeout,
-
- PoolSize: o.PoolSize,
- MinIdleConns: o.MinIdleConns,
- MaxConnAge: o.MaxConnAge,
- PoolTimeout: o.PoolTimeout,
- IdleTimeout: o.IdleTimeout,
- IdleCheckFrequency: o.IdleCheckFrequency,
-
- TLSConfig: o.TLSConfig,
- }
-}
-
-// Simple returns basic options created from the universal options.
-func (o *UniversalOptions) Simple() *Options {
- addr := "127.0.0.1:6379"
- if len(o.Addrs) > 0 {
- addr = o.Addrs[0]
- }
-
- return &Options{
- Addr: addr,
- Dialer: o.Dialer,
- OnConnect: o.OnConnect,
-
- DB: o.DB,
- Username: o.Username,
- Password: o.Password,
-
- MaxRetries: o.MaxRetries,
- MinRetryBackoff: o.MinRetryBackoff,
- MaxRetryBackoff: o.MaxRetryBackoff,
-
- DialTimeout: o.DialTimeout,
- ReadTimeout: o.ReadTimeout,
- WriteTimeout: o.WriteTimeout,
-
- PoolSize: o.PoolSize,
- MinIdleConns: o.MinIdleConns,
- MaxConnAge: o.MaxConnAge,
- PoolTimeout: o.PoolTimeout,
- IdleTimeout: o.IdleTimeout,
- IdleCheckFrequency: o.IdleCheckFrequency,
-
- TLSConfig: o.TLSConfig,
- }
-}
-
-// --------------------------------------------------------------------
-
-// UniversalClient is an abstract client which - based on the provided options -
-// can connect to either clusters, or sentinel-backed failover instances
-// or simple single-instance servers. This can be useful for testing
-// cluster-specific applications locally.
-type UniversalClient interface {
- Cmdable
- Context() context.Context
- AddHook(Hook)
- Watch(fn func(*Tx) error, keys ...string) error
- Do(args ...interface{}) *Cmd
- DoContext(ctx context.Context, args ...interface{}) *Cmd
- Process(cmd Cmder) error
- ProcessContext(ctx context.Context, cmd Cmder) error
- Subscribe(channels ...string) *PubSub
- PSubscribe(channels ...string) *PubSub
- Close() error
-}
-
-var _ UniversalClient = (*Client)(nil)
-var _ UniversalClient = (*ClusterClient)(nil)
-var _ UniversalClient = (*Ring)(nil)
-
-// NewUniversalClient returns a new multi client. The type of client returned depends
-// on the following three conditions:
-//
-// 1. if a MasterName is passed a sentinel-backed FailoverClient will be returned
-// 2. if the number of Addrs is two or more, a ClusterClient will be returned
-// 3. otherwise, a single-node redis Client will be returned.
-func NewUniversalClient(opts *UniversalOptions) UniversalClient {
- if opts.MasterName != "" {
- return NewFailoverClient(opts.Failover())
- } else if len(opts.Addrs) > 1 {
- return NewClusterClient(opts.Cluster())
- }
- return NewClient(opts.Simple())
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/.gitignore b/vendor/github.com/go-sql-driver/mysql/.gitignore
deleted file mode 100644
index 2de28da16..000000000
--- a/vendor/github.com/go-sql-driver/mysql/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.DS_Store
-.DS_Store?
-._*
-.Spotlight-V100
-.Trashes
-Icon?
-ehthumbs.db
-Thumbs.db
-.idea
diff --git a/vendor/github.com/go-sql-driver/mysql/.travis.yml b/vendor/github.com/go-sql-driver/mysql/.travis.yml
deleted file mode 100644
index 56fcf25f2..000000000
--- a/vendor/github.com/go-sql-driver/mysql/.travis.yml
+++ /dev/null
@@ -1,129 +0,0 @@
-sudo: false
-language: go
-go:
- - 1.10.x
- - 1.11.x
- - 1.12.x
- - 1.13.x
- - master
-
-before_install:
- - go get golang.org/x/tools/cmd/cover
- - go get github.com/mattn/goveralls
-
-before_script:
- - echo -e "[server]\ninnodb_log_file_size=256MB\ninnodb_buffer_pool_size=512MB\nmax_allowed_packet=16MB" | sudo tee -a /etc/mysql/my.cnf
- - sudo service mysql restart
- - .travis/wait_mysql.sh
- - mysql -e 'create database gotest;'
-
-matrix:
- include:
- - env: DB=MYSQL8
- sudo: required
- dist: trusty
- go: 1.10.x
- services:
- - docker
- before_install:
- - go get golang.org/x/tools/cmd/cover
- - go get github.com/mattn/goveralls
- - docker pull mysql:8.0
- - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret
- mysql:8.0 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
- - cp .travis/docker.cnf ~/.my.cnf
- - .travis/wait_mysql.sh
- before_script:
- - export MYSQL_TEST_USER=gotest
- - export MYSQL_TEST_PASS=secret
- - export MYSQL_TEST_ADDR=127.0.0.1:3307
- - export MYSQL_TEST_CONCURRENT=1
-
- - env: DB=MYSQL57
- sudo: required
- dist: trusty
- go: 1.10.x
- services:
- - docker
- before_install:
- - go get golang.org/x/tools/cmd/cover
- - go get github.com/mattn/goveralls
- - docker pull mysql:5.7
- - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret
- mysql:5.7 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
- - cp .travis/docker.cnf ~/.my.cnf
- - .travis/wait_mysql.sh
- before_script:
- - export MYSQL_TEST_USER=gotest
- - export MYSQL_TEST_PASS=secret
- - export MYSQL_TEST_ADDR=127.0.0.1:3307
- - export MYSQL_TEST_CONCURRENT=1
-
- - env: DB=MARIA55
- sudo: required
- dist: trusty
- go: 1.10.x
- services:
- - docker
- before_install:
- - go get golang.org/x/tools/cmd/cover
- - go get github.com/mattn/goveralls
- - docker pull mariadb:5.5
- - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret
- mariadb:5.5 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
- - cp .travis/docker.cnf ~/.my.cnf
- - .travis/wait_mysql.sh
- before_script:
- - export MYSQL_TEST_USER=gotest
- - export MYSQL_TEST_PASS=secret
- - export MYSQL_TEST_ADDR=127.0.0.1:3307
- - export MYSQL_TEST_CONCURRENT=1
-
- - env: DB=MARIA10_1
- sudo: required
- dist: trusty
- go: 1.10.x
- services:
- - docker
- before_install:
- - go get golang.org/x/tools/cmd/cover
- - go get github.com/mattn/goveralls
- - docker pull mariadb:10.1
- - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret
- mariadb:10.1 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
- - cp .travis/docker.cnf ~/.my.cnf
- - .travis/wait_mysql.sh
- before_script:
- - export MYSQL_TEST_USER=gotest
- - export MYSQL_TEST_PASS=secret
- - export MYSQL_TEST_ADDR=127.0.0.1:3307
- - export MYSQL_TEST_CONCURRENT=1
-
- - os: osx
- osx_image: xcode10.1
- addons:
- homebrew:
- packages:
- - mysql
- update: true
- go: 1.12.x
- before_install:
- - go get golang.org/x/tools/cmd/cover
- - go get github.com/mattn/goveralls
- before_script:
- - echo -e "[server]\ninnodb_log_file_size=256MB\ninnodb_buffer_pool_size=512MB\nmax_allowed_packet=16MB\nlocal_infile=1" >> /usr/local/etc/my.cnf
- - mysql.server start
- - mysql -uroot -e 'CREATE USER gotest IDENTIFIED BY "secret"'
- - mysql -uroot -e 'GRANT ALL ON *.* TO gotest'
- - mysql -uroot -e 'create database gotest;'
- - export MYSQL_TEST_USER=gotest
- - export MYSQL_TEST_PASS=secret
- - export MYSQL_TEST_ADDR=127.0.0.1:3306
- - export MYSQL_TEST_CONCURRENT=1
-
-script:
- - go test -v -covermode=count -coverprofile=coverage.out
- - go vet ./...
- - .travis/gofmt.sh
-after_script:
- - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
diff --git a/vendor/github.com/go-sql-driver/mysql/AUTHORS b/vendor/github.com/go-sql-driver/mysql/AUTHORS
deleted file mode 100644
index ad5989800..000000000
--- a/vendor/github.com/go-sql-driver/mysql/AUTHORS
+++ /dev/null
@@ -1,105 +0,0 @@
-# This is the official list of Go-MySQL-Driver authors for copyright purposes.
-
-# If you are submitting a patch, please add your name or the name of the
-# organization which holds the copyright to this list in alphabetical order.
-
-# Names should be added to this file as
-# Name
-# The email address is not required for organizations.
-# Please keep the list sorted.
-
-
-# Individual Persons
-
-Aaron Hopkins
-Achille Roussel
-Alexey Palazhchenko
-Andrew Reid
-Arne Hormann
-Asta Xie
-Bulat Gaifullin
-Carlos Nieto
-Chris Moos
-Craig Wilson
-Daniel Montoya
-Daniel Nichter
-Daniël van Eeden
-Dave Protasowski
-DisposaBoy
-Egor Smolyakov
-Erwan Martin
-Evan Shaw
-Frederick Mayle
-Gustavo Kristic
-Hajime Nakagami
-Hanno Braun
-Henri Yandell
-Hirotaka Yamamoto
-Huyiguang
-ICHINOSE Shogo
-Ilia Cimpoes
-INADA Naoki
-Jacek Szwec
-James Harr
-Jeff Hodges
-Jeffrey Charles
-Jerome Meyer
-Jiajia Zhong
-Jian Zhen
-Joshua Prunier
-Julien Lefevre
-Julien Schmidt
-Justin Li
-Justin Nuß
-Kamil Dziedzic
-Kevin Malachowski
-Kieron Woodhouse
-Lennart Rudolph
-Leonardo YongUk Kim
-Linh Tran Tuan
-Lion Yang
-Luca Looz
-Lucas Liu
-Luke Scott
-Maciej Zimnoch
-Michael Woolnough
-Nathanial Murphy
-Nicola Peduzzi
-Olivier Mengué
-oscarzhao
-Paul Bonser
-Peter Schultz
-Rebecca Chin
-Reed Allman
-Richard Wilkes
-Robert Russell
-Runrioter Wung
-Shuode Li
-Simon J Mudd
-Soroush Pour
-Stan Putrya
-Stanley Gunawan
-Steven Hartland
-Thomas Wodarek
-Tim Ruffles
-Tom Jenkinson
-Vladimir Kovpak
-Xiangyu Hu
-Xiaobing Jiang
-Xiuming Chen
-Zhenye Xie
-
-# Organizations
-
-Barracuda Networks, Inc.
-Counting Ltd.
-DigitalOcean Inc.
-Facebook Inc.
-GitHub Inc.
-Google Inc.
-InfoSum Ltd.
-Keybase Inc.
-Multiplay Ltd.
-Percona LLC
-Pivotal Inc.
-Stripe Inc.
diff --git a/vendor/github.com/go-sql-driver/mysql/CHANGELOG.md b/vendor/github.com/go-sql-driver/mysql/CHANGELOG.md
deleted file mode 100644
index 9cb97b38d..000000000
--- a/vendor/github.com/go-sql-driver/mysql/CHANGELOG.md
+++ /dev/null
@@ -1,206 +0,0 @@
-## Version 1.5 (2020-01-07)
-
-Changes:
-
- - Dropped support Go 1.9 and lower (#823, #829, #886, #1016, #1017)
- - Improve buffer handling (#890)
- - Document potentially insecure TLS configs (#901)
- - Use a double-buffering scheme to prevent data races (#943)
- - Pass uint64 values without converting them to string (#838, #955)
- - Update collations and make utf8mb4 default (#877, #1054)
- - Make NullTime compatible with sql.NullTime in Go 1.13+ (#995)
- - Removed CloudSQL support (#993, #1007)
- - Add Go Module support (#1003)
-
-New Features:
-
- - Implement support of optional TLS (#900)
- - Check connection liveness (#934, #964, #997, #1048, #1051, #1052)
- - Implement Connector Interface (#941, #958, #1020, #1035)
-
-Bugfixes:
-
- - Mark connections as bad on error during ping (#875)
- - Mark connections as bad on error during dial (#867)
- - Fix connection leak caused by rapid context cancellation (#1024)
- - Mark connections as bad on error during Conn.Prepare (#1030)
-
-
-## Version 1.4.1 (2018-11-14)
-
-Bugfixes:
-
- - Fix TIME format for binary columns (#818)
- - Fix handling of empty auth plugin names (#835)
- - Fix caching_sha2_password with empty password (#826)
- - Fix canceled context broke mysqlConn (#862)
- - Fix OldAuthSwitchRequest support (#870)
- - Fix Auth Response packet for cleartext password (#887)
-
-## Version 1.4 (2018-06-03)
-
-Changes:
-
- - Documentation fixes (#530, #535, #567)
- - Refactoring (#575, #579, #580, #581, #603, #615, #704)
- - Cache column names (#444)
- - Sort the DSN parameters in DSNs generated from a config (#637)
- - Allow native password authentication by default (#644)
- - Use the default port if it is missing in the DSN (#668)
- - Removed the `strict` mode (#676)
- - Do not query `max_allowed_packet` by default (#680)
- - Dropped support Go 1.6 and lower (#696)
- - Updated `ConvertValue()` to match the database/sql/driver implementation (#760)
- - Document the usage of `0000-00-00T00:00:00` as the time.Time zero value (#783)
- - Improved the compatibility of the authentication system (#807)
-
-New Features:
-
- - Multi-Results support (#537)
- - `rejectReadOnly` DSN option (#604)
- - `context.Context` support (#608, #612, #627, #761)
- - Transaction isolation level support (#619, #744)
- - Read-Only transactions support (#618, #634)
- - `NewConfig` function which initializes a config with default values (#679)
- - Implemented the `ColumnType` interfaces (#667, #724)
- - Support for custom string types in `ConvertValue` (#623)
- - Implemented `NamedValueChecker`, improving support for uint64 with high bit set (#690, #709, #710)
- - `caching_sha2_password` authentication plugin support (#794, #800, #801, #802)
- - Implemented `driver.SessionResetter` (#779)
- - `sha256_password` authentication plugin support (#808)
-
-Bugfixes:
-
- - Use the DSN hostname as TLS default ServerName if `tls=true` (#564, #718)
- - Fixed LOAD LOCAL DATA INFILE for empty files (#590)
- - Removed columns definition cache since it sometimes cached invalid data (#592)
- - Don't mutate registered TLS configs (#600)
- - Make RegisterTLSConfig concurrency-safe (#613)
- - Handle missing auth data in the handshake packet correctly (#646)
- - Do not retry queries when data was written to avoid data corruption (#302, #736)
- - Cache the connection pointer for error handling before invalidating it (#678)
- - Fixed imports for appengine/cloudsql (#700)
- - Fix sending STMT_LONG_DATA for 0 byte data (#734)
- - Set correct capacity for []bytes read from length-encoded strings (#766)
- - Make RegisterDial concurrency-safe (#773)
-
-
-## Version 1.3 (2016-12-01)
-
-Changes:
-
- - Go 1.1 is no longer supported
- - Use decimals fields in MySQL to format time types (#249)
- - Buffer optimizations (#269)
- - TLS ServerName defaults to the host (#283)
- - Refactoring (#400, #410, #437)
- - Adjusted documentation for second generation CloudSQL (#485)
- - Documented DSN system var quoting rules (#502)
- - Made statement.Close() calls idempotent to avoid errors in Go 1.6+ (#512)
-
-New Features:
-
- - Enable microsecond resolution on TIME, DATETIME and TIMESTAMP (#249)
- - Support for returning table alias on Columns() (#289, #359, #382)
- - Placeholder interpolation, can be actived with the DSN parameter `interpolateParams=true` (#309, #318, #490)
- - Support for uint64 parameters with high bit set (#332, #345)
- - Cleartext authentication plugin support (#327)
- - Exported ParseDSN function and the Config struct (#403, #419, #429)
- - Read / Write timeouts (#401)
- - Support for JSON field type (#414)
- - Support for multi-statements and multi-results (#411, #431)
- - DSN parameter to set the driver-side max_allowed_packet value manually (#489)
- - Native password authentication plugin support (#494, #524)
-
-Bugfixes:
-
- - Fixed handling of queries without columns and rows (#255)
- - Fixed a panic when SetKeepAlive() failed (#298)
- - Handle ERR packets while reading rows (#321)
- - Fixed reading NULL length-encoded integers in MySQL 5.6+ (#349)
- - Fixed absolute paths support in LOAD LOCAL DATA INFILE (#356)
- - Actually zero out bytes in handshake response (#378)
- - Fixed race condition in registering LOAD DATA INFILE handler (#383)
- - Fixed tests with MySQL 5.7.9+ (#380)
- - QueryUnescape TLS config names (#397)
- - Fixed "broken pipe" error by writing to closed socket (#390)
- - Fixed LOAD LOCAL DATA INFILE buffering (#424)
- - Fixed parsing of floats into float64 when placeholders are used (#434)
- - Fixed DSN tests with Go 1.7+ (#459)
- - Handle ERR packets while waiting for EOF (#473)
- - Invalidate connection on error while discarding additional results (#513)
- - Allow terminating packets of length 0 (#516)
-
-
-## Version 1.2 (2014-06-03)
-
-Changes:
-
- - We switched back to a "rolling release". `go get` installs the current master branch again
- - Version v1 of the driver will not be maintained anymore. Go 1.0 is no longer supported by this driver
- - Exported errors to allow easy checking from application code
- - Enabled TCP Keepalives on TCP connections
- - Optimized INFILE handling (better buffer size calculation, lazy init, ...)
- - The DSN parser also checks for a missing separating slash
- - Faster binary date / datetime to string formatting
- - Also exported the MySQLWarning type
- - mysqlConn.Close returns the first error encountered instead of ignoring all errors
- - writePacket() automatically writes the packet size to the header
- - readPacket() uses an iterative approach instead of the recursive approach to merge splitted packets
-
-New Features:
-
- - `RegisterDial` allows the usage of a custom dial function to establish the network connection
- - Setting the connection collation is possible with the `collation` DSN parameter. This parameter should be preferred over the `charset` parameter
- - Logging of critical errors is configurable with `SetLogger`
- - Google CloudSQL support
-
-Bugfixes:
-
- - Allow more than 32 parameters in prepared statements
- - Various old_password fixes
- - Fixed TestConcurrent test to pass Go's race detection
- - Fixed appendLengthEncodedInteger for large numbers
- - Renamed readLengthEnodedString to readLengthEncodedString and skipLengthEnodedString to skipLengthEncodedString (fixed typo)
-
-
-## Version 1.1 (2013-11-02)
-
-Changes:
-
- - Go-MySQL-Driver now requires Go 1.1
- - Connections now use the collation `utf8_general_ci` by default. Adding `&charset=UTF8` to the DSN should not be necessary anymore
- - Made closing rows and connections error tolerant. This allows for example deferring rows.Close() without checking for errors
- - `[]byte(nil)` is now treated as a NULL value. Before, it was treated like an empty string / `[]byte("")`
- - DSN parameter values must now be url.QueryEscape'ed. This allows text values to contain special characters, such as '&'.
- - Use the IO buffer also for writing. This results in zero allocations (by the driver) for most queries
- - Optimized the buffer for reading
- - stmt.Query now caches column metadata
- - New Logo
- - Changed the copyright header to include all contributors
- - Improved the LOAD INFILE documentation
- - The driver struct is now exported to make the driver directly accessible
- - Refactored the driver tests
- - Added more benchmarks and moved all to a separate file
- - Other small refactoring
-
-New Features:
-
- - Added *old_passwords* support: Required in some cases, but must be enabled by adding `allowOldPasswords=true` to the DSN since it is insecure
- - Added a `clientFoundRows` parameter: Return the number of matching rows instead of the number of rows changed on UPDATEs
- - Added TLS/SSL support: Use a TLS/SSL encrypted connection to the server. Custom TLS configs can be registered and used
-
-Bugfixes:
-
- - Fixed MySQL 4.1 support: MySQL 4.1 sends packets with lengths which differ from the specification
- - Convert to DB timezone when inserting `time.Time`
- - Splitted packets (more than 16MB) are now merged correctly
- - Fixed false positive `io.EOF` errors when the data was fully read
- - Avoid panics on reuse of closed connections
- - Fixed empty string producing false nil values
- - Fixed sign byte for positive TIME fields
-
-
-## Version 1.0 (2013-05-14)
-
-Initial Release
diff --git a/vendor/github.com/go-sql-driver/mysql/LICENSE b/vendor/github.com/go-sql-driver/mysql/LICENSE
deleted file mode 100644
index 14e2f777f..000000000
--- a/vendor/github.com/go-sql-driver/mysql/LICENSE
+++ /dev/null
@@ -1,373 +0,0 @@
-Mozilla Public License Version 2.0
-==================================
-
-1. Definitions
---------------
-
-1.1. "Contributor"
- means each individual or legal entity that creates, contributes to
- the creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
- means the combination of the Contributions of others (if any) used
- by a Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
- means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
- means Source Code Form to which the initial Contributor has attached
- the notice in Exhibit A, the Executable Form of such Source Code
- Form, and Modifications of such Source Code Form, in each case
- including portions thereof.
-
-1.5. "Incompatible With Secondary Licenses"
- means
-
- (a) that the initial Contributor has attached the notice described
- in Exhibit B to the Covered Software; or
-
- (b) that the Covered Software was made available under the terms of
- version 1.1 or earlier of the License, but not also under the
- terms of a Secondary License.
-
-1.6. "Executable Form"
- means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
- means a work that combines Covered Software with other material, in
- a separate file or files, that is not Covered Software.
-
-1.8. "License"
- means this document.
-
-1.9. "Licensable"
- means having the right to grant, to the maximum extent possible,
- whether at the time of the initial grant or subsequently, any and
- all of the rights conveyed by this License.
-
-1.10. "Modifications"
- means any of the following:
-
- (a) any file in Source Code Form that results from an addition to,
- deletion from, or modification of the contents of Covered
- Software; or
-
- (b) any new file in Source Code Form that contains any Covered
- Software.
-
-1.11. "Patent Claims" of a Contributor
- means any patent claim(s), including without limitation, method,
- process, and apparatus claims, in any patent Licensable by such
- Contributor that would be infringed, but for the grant of the
- License, by the making, using, selling, offering for sale, having
- made, import, or transfer of either its Contributions or its
- Contributor Version.
-
-1.12. "Secondary License"
- means either the GNU General Public License, Version 2.0, the GNU
- Lesser General Public License, Version 2.1, the GNU Affero General
- Public License, Version 3.0, or any later versions of those
- licenses.
-
-1.13. "Source Code Form"
- means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
- means an individual or a legal entity exercising rights under this
- License. For legal entities, "You" includes any entity that
- controls, is controlled by, or is under common control with You. For
- purposes of this definition, "control" means (a) the power, direct
- or indirect, to cause the direction or management of such entity,
- whether by contract or otherwise, or (b) ownership of more than
- fifty percent (50%) of the outstanding shares or beneficial
- ownership of such entity.
-
-2. License Grants and Conditions
---------------------------------
-
-2.1. Grants
-
-Each Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark)
- Licensable by such Contributor to use, reproduce, make available,
- modify, display, perform, distribute, and otherwise exploit its
- Contributions, either on an unmodified basis, with Modifications, or
- as part of a Larger Work; and
-
-(b) under Patent Claims of such Contributor to make, use, sell, offer
- for sale, have made, import, and otherwise transfer either its
- Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-The licenses granted in Section 2.1 with respect to any Contribution
-become effective for each Contribution on the date the Contributor first
-distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-The licenses granted in this Section 2 are the only rights granted under
-this License. No additional rights or licenses will be implied from the
-distribution or licensing of Covered Software under this License.
-Notwithstanding Section 2.1(b) above, no patent license is granted by a
-Contributor:
-
-(a) for any code that a Contributor has removed from Covered Software;
- or
-
-(b) for infringements caused by: (i) Your and any other third party's
- modifications of Covered Software, or (ii) the combination of its
- Contributions with other software (except as part of its Contributor
- Version); or
-
-(c) under Patent Claims infringed by Covered Software in the absence of
- its Contributions.
-
-This License does not grant any rights in the trademarks, service marks,
-or logos of any Contributor (except as may be necessary to comply with
-the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-No Contributor makes additional grants as a result of Your choice to
-distribute the Covered Software under a subsequent version of this
-License (see Section 10.2) or under the terms of a Secondary License (if
-permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-Each Contributor represents that the Contributor believes its
-Contributions are its original creation(s) or it has sufficient rights
-to grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-This License is not intended to limit any rights You have under
-applicable copyright doctrines of fair use, fair dealing, or other
-equivalents.
-
-2.7. Conditions
-
-Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
-in Section 2.1.
-
-3. Responsibilities
--------------------
-
-3.1. Distribution of Source Form
-
-All distribution of Covered Software in Source Code Form, including any
-Modifications that You create or to which You contribute, must be under
-the terms of this License. You must inform recipients that the Source
-Code Form of the Covered Software is governed by the terms of this
-License, and how they can obtain a copy of this License. You may not
-attempt to alter or restrict the recipients' rights in the Source Code
-Form.
-
-3.2. Distribution of Executable Form
-
-If You distribute Covered Software in Executable Form then:
-
-(a) such Covered Software must also be made available in Source Code
- Form, as described in Section 3.1, and You must inform recipients of
- the Executable Form how they can obtain a copy of such Source Code
- Form by reasonable means in a timely manner, at a charge no more
- than the cost of distribution to the recipient; and
-
-(b) You may distribute such Executable Form under the terms of this
- License, or sublicense it under different terms, provided that the
- license for the Executable Form does not attempt to limit or alter
- the recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-You may create and distribute a Larger Work under terms of Your choice,
-provided that You also comply with the requirements of this License for
-the Covered Software. If the Larger Work is a combination of Covered
-Software with a work governed by one or more Secondary Licenses, and the
-Covered Software is not Incompatible With Secondary Licenses, this
-License permits You to additionally distribute such Covered Software
-under the terms of such Secondary License(s), so that the recipient of
-the Larger Work may, at their option, further distribute the Covered
-Software under the terms of either this License or such Secondary
-License(s).
-
-3.4. Notices
-
-You may not remove or alter the substance of any license notices
-(including copyright notices, patent notices, disclaimers of warranty,
-or limitations of liability) contained within the Source Code Form of
-the Covered Software, except that You may alter any license notices to
-the extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-You may choose to offer, and to charge a fee for, warranty, support,
-indemnity or liability obligations to one or more recipients of Covered
-Software. However, You may do so only on Your own behalf, and not on
-behalf of any Contributor. You must make it absolutely clear that any
-such warranty, support, indemnity, or liability obligation is offered by
-You alone, and You hereby agree to indemnify every Contributor for any
-liability incurred by such Contributor as a result of warranty, support,
-indemnity or liability terms You offer. You may include additional
-disclaimers of warranty and limitations of liability specific to any
-jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
----------------------------------------------------
-
-If it is impossible for You to comply with any of the terms of this
-License with respect to some or all of the Covered Software due to
-statute, judicial order, or regulation then You must: (a) comply with
-the terms of this License to the maximum extent possible; and (b)
-describe the limitations and the code they affect. Such description must
-be placed in a text file included with all distributions of the Covered
-Software under this License. Except to the extent prohibited by statute
-or regulation, such description must be sufficiently detailed for a
-recipient of ordinary skill to be able to understand it.
-
-5. Termination
---------------
-
-5.1. The rights granted under this License will terminate automatically
-if You fail to comply with any of its terms. However, if You become
-compliant, then the rights granted under this License from a particular
-Contributor are reinstated (a) provisionally, unless and until such
-Contributor explicitly and finally terminates Your grants, and (b) on an
-ongoing basis, if such Contributor fails to notify You of the
-non-compliance by some reasonable means prior to 60 days after You have
-come back into compliance. Moreover, Your grants from a particular
-Contributor are reinstated on an ongoing basis if such Contributor
-notifies You of the non-compliance by some reasonable means, this is the
-first time You have received notice of non-compliance with this License
-from such Contributor, and You become compliant prior to 30 days after
-Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-infringement claim (excluding declaratory judgment actions,
-counter-claims, and cross-claims) alleging that a Contributor Version
-directly or indirectly infringes any patent, then the rights granted to
-You by any and all Contributors for the Covered Software under Section
-2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all
-end user license agreements (excluding distributors and resellers) which
-have been validly granted by You or Your distributors under this License
-prior to termination shall survive termination.
-
-************************************************************************
-* *
-* 6. Disclaimer of Warranty *
-* ------------------------- *
-* *
-* Covered Software is provided under this License on an "as is" *
-* basis, without warranty of any kind, either expressed, implied, or *
-* statutory, including, without limitation, warranties that the *
-* Covered Software is free of defects, merchantable, fit for a *
-* particular purpose or non-infringing. The entire risk as to the *
-* quality and performance of the Covered Software is with You. *
-* Should any Covered Software prove defective in any respect, You *
-* (not any Contributor) assume the cost of any necessary servicing, *
-* repair, or correction. This disclaimer of warranty constitutes an *
-* essential part of this License. No use of any Covered Software is *
-* authorized under this License except under this disclaimer. *
-* *
-************************************************************************
-
-************************************************************************
-* *
-* 7. Limitation of Liability *
-* -------------------------- *
-* *
-* Under no circumstances and under no legal theory, whether tort *
-* (including negligence), contract, or otherwise, shall any *
-* Contributor, or anyone who distributes Covered Software as *
-* permitted above, be liable to You for any direct, indirect, *
-* special, incidental, or consequential damages of any character *
-* including, without limitation, damages for lost profits, loss of *
-* goodwill, work stoppage, computer failure or malfunction, or any *
-* and all other commercial damages or losses, even if such party *
-* shall have been informed of the possibility of such damages. This *
-* limitation of liability shall not apply to liability for death or *
-* personal injury resulting from such party's negligence to the *
-* extent applicable law prohibits such limitation. Some *
-* jurisdictions do not allow the exclusion or limitation of *
-* incidental or consequential damages, so this exclusion and *
-* limitation may not apply to You. *
-* *
-************************************************************************
-
-8. Litigation
--------------
-
-Any litigation relating to this License may be brought only in the
-courts of a jurisdiction where the defendant maintains its principal
-place of business and such litigation shall be governed by laws of that
-jurisdiction, without reference to its conflict-of-law provisions.
-Nothing in this Section shall prevent a party's ability to bring
-cross-claims or counter-claims.
-
-9. Miscellaneous
-----------------
-
-This License represents the complete agreement concerning the subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent
-necessary to make it enforceable. Any law or regulation which provides
-that the language of a contract shall be construed against the drafter
-shall not be used to construe this License against a Contributor.
-
-10. Versions of the License
----------------------------
-
-10.1. New Versions
-
-Mozilla Foundation is the license steward. Except as provided in Section
-10.3, no one other than the license steward has the right to modify or
-publish new versions of this License. Each version will be given a
-distinguishing version number.
-
-10.2. Effect of New Versions
-
-You may distribute the Covered Software under the terms of the version
-of the License under which You originally received the Covered Software,
-or under the terms of any subsequent version published by the license
-steward.
-
-10.3. Modified Versions
-
-If you create software not governed by this License, and you want to
-create a new license for such software, you may create and use a
-modified version of this License if you rename the license and remove
-any references to the name of the license steward (except to note that
-such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-Licenses
-
-If You choose to distribute Source Code Form that is Incompatible With
-Secondary Licenses under the terms of this version of the License, the
-notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
--------------------------------------------
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular
-file, then You may include the notice in a location (such as a LICENSE
-file in a relevant directory) where a recipient would be likely to look
-for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
----------------------------------------------------------
-
- This Source Code Form is "Incompatible With Secondary Licenses", as
- defined by the Mozilla Public License, v. 2.0.
diff --git a/vendor/github.com/go-sql-driver/mysql/README.md b/vendor/github.com/go-sql-driver/mysql/README.md
deleted file mode 100644
index d2627a41a..000000000
--- a/vendor/github.com/go-sql-driver/mysql/README.md
+++ /dev/null
@@ -1,501 +0,0 @@
-# Go-MySQL-Driver
-
-A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) package
-
-
-
----------------------------------------
- * [Features](#features)
- * [Requirements](#requirements)
- * [Installation](#installation)
- * [Usage](#usage)
- * [DSN (Data Source Name)](#dsn-data-source-name)
- * [Password](#password)
- * [Protocol](#protocol)
- * [Address](#address)
- * [Parameters](#parameters)
- * [Examples](#examples)
- * [Connection pool and timeouts](#connection-pool-and-timeouts)
- * [context.Context Support](#contextcontext-support)
- * [ColumnType Support](#columntype-support)
- * [LOAD DATA LOCAL INFILE support](#load-data-local-infile-support)
- * [time.Time support](#timetime-support)
- * [Unicode support](#unicode-support)
- * [Testing / Development](#testing--development)
- * [License](#license)
-
----------------------------------------
-
-## Features
- * Lightweight and [fast](https://github.com/go-sql-driver/sql-benchmark "golang MySQL-Driver performance")
- * Native Go implementation. No C-bindings, just pure Go
- * Connections over TCP/IPv4, TCP/IPv6, Unix domain sockets or [custom protocols](https://godoc.org/github.com/go-sql-driver/mysql#DialFunc)
- * Automatic handling of broken connections
- * Automatic Connection Pooling *(by database/sql package)*
- * Supports queries larger than 16MB
- * Full [`sql.RawBytes`](https://golang.org/pkg/database/sql/#RawBytes) support.
- * Intelligent `LONG DATA` handling in prepared statements
- * Secure `LOAD DATA LOCAL INFILE` support with file Whitelisting and `io.Reader` support
- * Optional `time.Time` parsing
- * Optional placeholder interpolation
-
-## Requirements
- * Go 1.10 or higher. We aim to support the 3 latest versions of Go.
- * MySQL (4.1+), MariaDB, Percona Server, Google CloudSQL or Sphinx (2.2.3+)
-
----------------------------------------
-
-## Installation
-Simple install the package to your [$GOPATH](https://github.com/golang/go/wiki/GOPATH "GOPATH") with the [go tool](https://golang.org/cmd/go/ "go command") from shell:
-```bash
-$ go get -u github.com/go-sql-driver/mysql
-```
-Make sure [Git is installed](https://git-scm.com/downloads) on your machine and in your system's `PATH`.
-
-## Usage
-_Go MySQL Driver_ is an implementation of Go's `database/sql/driver` interface. You only need to import the driver and can use the full [`database/sql`](https://golang.org/pkg/database/sql/) API then.
-
-Use `mysql` as `driverName` and a valid [DSN](#dsn-data-source-name) as `dataSourceName`:
-```go
-import "database/sql"
-import _ "github.com/go-sql-driver/mysql"
-
-db, err := sql.Open("mysql", "user:password@/dbname")
-```
-
-[Examples are available in our Wiki](https://github.com/go-sql-driver/mysql/wiki/Examples "Go-MySQL-Driver Examples").
-
-
-### DSN (Data Source Name)
-
-The Data Source Name has a common format, like e.g. [PEAR DB](http://pear.php.net/manual/en/package.database.db.intro-dsn.php) uses it, but without type-prefix (optional parts marked by squared brackets):
-```
-[username[:password]@][protocol[(address)]]/dbname[?param1=value1&...¶mN=valueN]
-```
-
-A DSN in its fullest form:
-```
-username:password@protocol(address)/dbname?param=value
-```
-
-Except for the databasename, all values are optional. So the minimal DSN is:
-```
-/dbname
-```
-
-If you do not want to preselect a database, leave `dbname` empty:
-```
-/
-```
-This has the same effect as an empty DSN string:
-```
-
-```
-
-Alternatively, [Config.FormatDSN](https://godoc.org/github.com/go-sql-driver/mysql#Config.FormatDSN) can be used to create a DSN string by filling a struct.
-
-#### Password
-Passwords can consist of any character. Escaping is **not** necessary.
-
-#### Protocol
-See [net.Dial](https://golang.org/pkg/net/#Dial) for more information which networks are available.
-In general you should use an Unix domain socket if available and TCP otherwise for best performance.
-
-#### Address
-For TCP and UDP networks, addresses have the form `host[:port]`.
-If `port` is omitted, the default port will be used.
-If `host` is a literal IPv6 address, it must be enclosed in square brackets.
-The functions [net.JoinHostPort](https://golang.org/pkg/net/#JoinHostPort) and [net.SplitHostPort](https://golang.org/pkg/net/#SplitHostPort) manipulate addresses in this form.
-
-For Unix domain sockets the address is the absolute path to the MySQL-Server-socket, e.g. `/var/run/mysqld/mysqld.sock` or `/tmp/mysql.sock`.
-
-#### Parameters
-*Parameters are case-sensitive!*
-
-Notice that any of `true`, `TRUE`, `True` or `1` is accepted to stand for a true boolean value. Not surprisingly, false can be specified as any of: `false`, `FALSE`, `False` or `0`.
-
-##### `allowAllFiles`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-
-`allowAllFiles=true` disables the file Whitelist for `LOAD DATA LOCAL INFILE` and allows *all* files.
-[*Might be insecure!*](http://dev.mysql.com/doc/refman/5.7/en/load-data-local.html)
-
-##### `allowCleartextPasswords`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-
-`allowCleartextPasswords=true` allows using the [cleartext client side plugin](http://dev.mysql.com/doc/en/cleartext-authentication-plugin.html) if required by an account, such as one defined with the [PAM authentication plugin](http://dev.mysql.com/doc/en/pam-authentication-plugin.html). Sending passwords in clear text may be a security problem in some configurations. To avoid problems if there is any possibility that the password would be intercepted, clients should connect to MySQL Server using a method that protects the password. Possibilities include [TLS / SSL](#tls), IPsec, or a private network.
-
-##### `allowNativePasswords`
-
-```
-Type: bool
-Valid Values: true, false
-Default: true
-```
-`allowNativePasswords=false` disallows the usage of MySQL native password method.
-
-##### `allowOldPasswords`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-`allowOldPasswords=true` allows the usage of the insecure old password method. This should be avoided, but is necessary in some cases. See also [the old_passwords wiki page](https://github.com/go-sql-driver/mysql/wiki/old_passwords).
-
-##### `charset`
-
-```
-Type: string
-Valid Values:
-Default: none
-```
-
-Sets the charset used for client-server interaction (`"SET NAMES "`). If multiple charsets are set (separated by a comma), the following charset is used if setting the charset failes. This enables for example support for `utf8mb4` ([introduced in MySQL 5.5.3](http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html)) with fallback to `utf8` for older servers (`charset=utf8mb4,utf8`).
-
-Usage of the `charset` parameter is discouraged because it issues additional queries to the server.
-Unless you need the fallback behavior, please use `collation` instead.
-
-##### `checkConnLiveness`
-
-```
-Type: bool
-Valid Values: true, false
-Default: true
-```
-
-On supported platforms connections retrieved from the connection pool are checked for liveness before using them. If the check fails, the respective connection is marked as bad and the query retried with another connection.
-`checkConnLiveness=false` disables this liveness check of connections.
-
-##### `collation`
-
-```
-Type: string
-Valid Values:
-Default: utf8mb4_general_ci
-```
-
-Sets the collation used for client-server interaction on connection. In contrast to `charset`, `collation` does not issue additional queries. If the specified collation is unavailable on the target server, the connection will fail.
-
-A list of valid charsets for a server is retrievable with `SHOW COLLATION`.
-
-The default collation (`utf8mb4_general_ci`) is supported from MySQL 5.5. You should use an older collation (e.g. `utf8_general_ci`) for older MySQL.
-
-Collations for charset "ucs2", "utf16", "utf16le", and "utf32" can not be used ([ref](https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html#charset-connection-impermissible-client-charset)).
-
-
-##### `clientFoundRows`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-
-`clientFoundRows=true` causes an UPDATE to return the number of matching rows instead of the number of rows changed.
-
-##### `columnsWithAlias`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-
-When `columnsWithAlias` is true, calls to `sql.Rows.Columns()` will return the table alias and the column name separated by a dot. For example:
-
-```
-SELECT u.id FROM users as u
-```
-
-will return `u.id` instead of just `id` if `columnsWithAlias=true`.
-
-##### `interpolateParams`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-
-If `interpolateParams` is true, placeholders (`?`) in calls to `db.Query()` and `db.Exec()` are interpolated into a single query string with given parameters. This reduces the number of roundtrips, since the driver has to prepare a statement, execute it with given parameters and close the statement again with `interpolateParams=false`.
-
-*This can not be used together with the multibyte encodings BIG5, CP932, GB2312, GBK or SJIS. These are blacklisted as they may [introduce a SQL injection vulnerability](http://stackoverflow.com/a/12118602/3430118)!*
-
-##### `loc`
-
-```
-Type: string
-Valid Values:
-Default: UTC
-```
-
-Sets the location for time.Time values (when using `parseTime=true`). *"Local"* sets the system's location. See [time.LoadLocation](https://golang.org/pkg/time/#LoadLocation) for details.
-
-Note that this sets the location for time.Time values but does not change MySQL's [time_zone setting](https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html). For that see the [time_zone system variable](#system-variables), which can also be set as a DSN parameter.
-
-Please keep in mind, that param values must be [url.QueryEscape](https://golang.org/pkg/net/url/#QueryEscape)'ed. Alternatively you can manually replace the `/` with `%2F`. For example `US/Pacific` would be `loc=US%2FPacific`.
-
-##### `maxAllowedPacket`
-```
-Type: decimal number
-Default: 4194304
-```
-
-Max packet size allowed in bytes. The default value is 4 MiB and should be adjusted to match the server settings. `maxAllowedPacket=0` can be used to automatically fetch the `max_allowed_packet` variable from server *on every connection*.
-
-##### `multiStatements`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-
-Allow multiple statements in one query. While this allows batch queries, it also greatly increases the risk of SQL injections. Only the result of the first query is returned, all other results are silently discarded.
-
-When `multiStatements` is used, `?` parameters must only be used in the first statement.
-
-##### `parseTime`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-
-`parseTime=true` changes the output type of `DATE` and `DATETIME` values to `time.Time` instead of `[]byte` / `string`
-The date or datetime like `0000-00-00 00:00:00` is converted into zero value of `time.Time`.
-
-
-##### `readTimeout`
-
-```
-Type: duration
-Default: 0
-```
-
-I/O read timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
-
-##### `rejectReadOnly`
-
-```
-Type: bool
-Valid Values: true, false
-Default: false
-```
-
-
-`rejectReadOnly=true` causes the driver to reject read-only connections. This
-is for a possible race condition during an automatic failover, where the mysql
-client gets connected to a read-only replica after the failover.
-
-Note that this should be a fairly rare case, as an automatic failover normally
-happens when the primary is down, and the race condition shouldn't happen
-unless it comes back up online as soon as the failover is kicked off. On the
-other hand, when this happens, a MySQL application can get stuck on a
-read-only connection until restarted. It is however fairly easy to reproduce,
-for example, using a manual failover on AWS Aurora's MySQL-compatible cluster.
-
-If you are not relying on read-only transactions to reject writes that aren't
-supposed to happen, setting this on some MySQL providers (such as AWS Aurora)
-is safer for failovers.
-
-Note that ERROR 1290 can be returned for a `read-only` server and this option will
-cause a retry for that error. However the same error number is used for some
-other cases. You should ensure your application will never cause an ERROR 1290
-except for `read-only` mode when enabling this option.
-
-
-##### `serverPubKey`
-
-```
-Type: string
-Valid Values:
-Default: none
-```
-
-Server public keys can be registered with [`mysql.RegisterServerPubKey`](https://godoc.org/github.com/go-sql-driver/mysql#RegisterServerPubKey), which can then be used by the assigned name in the DSN.
-Public keys are used to transmit encrypted data, e.g. for authentication.
-If the server's public key is known, it should be set manually to avoid expensive and potentially insecure transmissions of the public key from the server to the client each time it is required.
-
-
-##### `timeout`
-
-```
-Type: duration
-Default: OS default
-```
-
-Timeout for establishing connections, aka dial timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
-
-
-##### `tls`
-
-```
-Type: bool / string
-Valid Values: true, false, skip-verify, preferred,
-Default: false
-```
-
-`tls=true` enables TLS / SSL encrypted connection to the server. Use `skip-verify` if you want to use a self-signed or invalid certificate (server side) or use `preferred` to use TLS only when advertised by the server. This is similar to `skip-verify`, but additionally allows a fallback to a connection which is not encrypted. Neither `skip-verify` nor `preferred` add any reliable security. You can use a custom TLS config after registering it with [`mysql.RegisterTLSConfig`](https://godoc.org/github.com/go-sql-driver/mysql#RegisterTLSConfig).
-
-
-##### `writeTimeout`
-
-```
-Type: duration
-Default: 0
-```
-
-I/O write timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
-
-
-##### System Variables
-
-Any other parameters are interpreted as system variables:
- * `=`: `SET =`
- * `=`: `SET =`
- * `=%27%27`: `SET =''`
-
-Rules:
-* The values for string variables must be quoted with `'`.
-* The values must also be [url.QueryEscape](http://golang.org/pkg/net/url/#QueryEscape)'ed!
- (which implies values of string variables must be wrapped with `%27`).
-
-Examples:
- * `autocommit=1`: `SET autocommit=1`
- * [`time_zone=%27Europe%2FParis%27`](https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html): `SET time_zone='Europe/Paris'`
- * [`tx_isolation=%27REPEATABLE-READ%27`](https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_tx_isolation): `SET tx_isolation='REPEATABLE-READ'`
-
-
-#### Examples
-```
-user@unix(/path/to/socket)/dbname
-```
-
-```
-root:pw@unix(/tmp/mysql.sock)/myDatabase?loc=Local
-```
-
-```
-user:password@tcp(localhost:5555)/dbname?tls=skip-verify&autocommit=true
-```
-
-Treat warnings as errors by setting the system variable [`sql_mode`](https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html):
-```
-user:password@/dbname?sql_mode=TRADITIONAL
-```
-
-TCP via IPv6:
-```
-user:password@tcp([de:ad:be:ef::ca:fe]:80)/dbname?timeout=90s&collation=utf8mb4_unicode_ci
-```
-
-TCP on a remote host, e.g. Amazon RDS:
-```
-id:password@tcp(your-amazonaws-uri.com:3306)/dbname
-```
-
-Google Cloud SQL on App Engine:
-```
-user:password@unix(/cloudsql/project-id:region-name:instance-name)/dbname
-```
-
-TCP using default port (3306) on localhost:
-```
-user:password@tcp/dbname?charset=utf8mb4,utf8&sys_var=esc%40ped
-```
-
-Use the default protocol (tcp) and host (localhost:3306):
-```
-user:password@/dbname
-```
-
-No Database preselected:
-```
-user:password@/
-```
-
-
-### Connection pool and timeouts
-The connection pool is managed by Go's database/sql package. For details on how to configure the size of the pool and how long connections stay in the pool see `*DB.SetMaxOpenConns`, `*DB.SetMaxIdleConns`, and `*DB.SetConnMaxLifetime` in the [database/sql documentation](https://golang.org/pkg/database/sql/). The read, write, and dial timeouts for each individual connection are configured with the DSN parameters [`readTimeout`](#readtimeout), [`writeTimeout`](#writetimeout), and [`timeout`](#timeout), respectively.
-
-## `ColumnType` Support
-This driver supports the [`ColumnType` interface](https://golang.org/pkg/database/sql/#ColumnType) introduced in Go 1.8, with the exception of [`ColumnType.Length()`](https://golang.org/pkg/database/sql/#ColumnType.Length), which is currently not supported.
-
-## `context.Context` Support
-Go 1.8 added `database/sql` support for `context.Context`. This driver supports query timeouts and cancellation via contexts.
-See [context support in the database/sql package](https://golang.org/doc/go1.8#database_sql) for more details.
-
-
-### `LOAD DATA LOCAL INFILE` support
-For this feature you need direct access to the package. Therefore you must change the import path (no `_`):
-```go
-import "github.com/go-sql-driver/mysql"
-```
-
-Files must be whitelisted by registering them with `mysql.RegisterLocalFile(filepath)` (recommended) or the Whitelist check must be deactivated by using the DSN parameter `allowAllFiles=true` ([*Might be insecure!*](http://dev.mysql.com/doc/refman/5.7/en/load-data-local.html)).
-
-To use a `io.Reader` a handler function must be registered with `mysql.RegisterReaderHandler(name, handler)` which returns a `io.Reader` or `io.ReadCloser`. The Reader is available with the filepath `Reader::` then. Choose different names for different handlers and `DeregisterReaderHandler` when you don't need it anymore.
-
-See the [godoc of Go-MySQL-Driver](https://godoc.org/github.com/go-sql-driver/mysql "golang mysql driver documentation") for details.
-
-
-### `time.Time` support
-The default internal output type of MySQL `DATE` and `DATETIME` values is `[]byte` which allows you to scan the value into a `[]byte`, `string` or `sql.RawBytes` variable in your program.
-
-However, many want to scan MySQL `DATE` and `DATETIME` values into `time.Time` variables, which is the logical equivalent in Go to `DATE` and `DATETIME` in MySQL. You can do that by changing the internal output type from `[]byte` to `time.Time` with the DSN parameter `parseTime=true`. You can set the default [`time.Time` location](https://golang.org/pkg/time/#Location) with the `loc` DSN parameter.
-
-**Caution:** As of Go 1.1, this makes `time.Time` the only variable type you can scan `DATE` and `DATETIME` values into. This breaks for example [`sql.RawBytes` support](https://github.com/go-sql-driver/mysql/wiki/Examples#rawbytes).
-
-Alternatively you can use the [`NullTime`](https://godoc.org/github.com/go-sql-driver/mysql#NullTime) type as the scan destination, which works with both `time.Time` and `string` / `[]byte`.
-
-
-### Unicode support
-Since version 1.5 Go-MySQL-Driver automatically uses the collation ` utf8mb4_general_ci` by default.
-
-Other collations / charsets can be set using the [`collation`](#collation) DSN parameter.
-
-Version 1.0 of the driver recommended adding `&charset=utf8` (alias for `SET NAMES utf8`) to the DSN to enable proper UTF-8 support. This is not necessary anymore. The [`collation`](#collation) parameter should be preferred to set another collation / charset than the default.
-
-See http://dev.mysql.com/doc/refman/8.0/en/charset-unicode.html for more details on MySQL's Unicode support.
-
-## Testing / Development
-To run the driver tests you may need to adjust the configuration. See the [Testing Wiki-Page](https://github.com/go-sql-driver/mysql/wiki/Testing "Testing") for details.
-
-Go-MySQL-Driver is not feature-complete yet. Your help is very appreciated.
-If you want to contribute, you can work on an [open issue](https://github.com/go-sql-driver/mysql/issues?state=open) or review a [pull request](https://github.com/go-sql-driver/mysql/pulls).
-
-See the [Contribution Guidelines](https://github.com/go-sql-driver/mysql/blob/master/CONTRIBUTING.md) for details.
-
----------------------------------------
-
-## License
-Go-MySQL-Driver is licensed under the [Mozilla Public License Version 2.0](https://raw.github.com/go-sql-driver/mysql/master/LICENSE)
-
-Mozilla summarizes the license scope as follows:
-> MPL: The copyleft applies to any files containing MPLed code.
-
-
-That means:
- * You can **use** the **unchanged** source code both in private and commercially.
- * When distributing, you **must publish** the source code of any **changed files** licensed under the MPL 2.0 under a) the MPL 2.0 itself or b) a compatible license (e.g. GPL 3.0 or Apache License 2.0).
- * You **needn't publish** the source code of your library as long as the files licensed under the MPL 2.0 are **unchanged**.
-
-Please read the [MPL 2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) if you have further questions regarding the license.
-
-You can read the full terms here: [LICENSE](https://raw.github.com/go-sql-driver/mysql/master/LICENSE).
-
-
-
diff --git a/vendor/github.com/go-sql-driver/mysql/auth.go b/vendor/github.com/go-sql-driver/mysql/auth.go
deleted file mode 100644
index fec7040d4..000000000
--- a/vendor/github.com/go-sql-driver/mysql/auth.go
+++ /dev/null
@@ -1,422 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2018 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "crypto/rand"
- "crypto/rsa"
- "crypto/sha1"
- "crypto/sha256"
- "crypto/x509"
- "encoding/pem"
- "sync"
-)
-
-// server pub keys registry
-var (
- serverPubKeyLock sync.RWMutex
- serverPubKeyRegistry map[string]*rsa.PublicKey
-)
-
-// RegisterServerPubKey registers a server RSA public key which can be used to
-// send data in a secure manner to the server without receiving the public key
-// in a potentially insecure way from the server first.
-// Registered keys can afterwards be used adding serverPubKey= to the DSN.
-//
-// Note: The provided rsa.PublicKey instance is exclusively owned by the driver
-// after registering it and may not be modified.
-//
-// data, err := ioutil.ReadFile("mykey.pem")
-// if err != nil {
-// log.Fatal(err)
-// }
-//
-// block, _ := pem.Decode(data)
-// if block == nil || block.Type != "PUBLIC KEY" {
-// log.Fatal("failed to decode PEM block containing public key")
-// }
-//
-// pub, err := x509.ParsePKIXPublicKey(block.Bytes)
-// if err != nil {
-// log.Fatal(err)
-// }
-//
-// if rsaPubKey, ok := pub.(*rsa.PublicKey); ok {
-// mysql.RegisterServerPubKey("mykey", rsaPubKey)
-// } else {
-// log.Fatal("not a RSA public key")
-// }
-//
-func RegisterServerPubKey(name string, pubKey *rsa.PublicKey) {
- serverPubKeyLock.Lock()
- if serverPubKeyRegistry == nil {
- serverPubKeyRegistry = make(map[string]*rsa.PublicKey)
- }
-
- serverPubKeyRegistry[name] = pubKey
- serverPubKeyLock.Unlock()
-}
-
-// DeregisterServerPubKey removes the public key registered with the given name.
-func DeregisterServerPubKey(name string) {
- serverPubKeyLock.Lock()
- if serverPubKeyRegistry != nil {
- delete(serverPubKeyRegistry, name)
- }
- serverPubKeyLock.Unlock()
-}
-
-func getServerPubKey(name string) (pubKey *rsa.PublicKey) {
- serverPubKeyLock.RLock()
- if v, ok := serverPubKeyRegistry[name]; ok {
- pubKey = v
- }
- serverPubKeyLock.RUnlock()
- return
-}
-
-// Hash password using pre 4.1 (old password) method
-// https://github.com/atcurtis/mariadb/blob/master/mysys/my_rnd.c
-type myRnd struct {
- seed1, seed2 uint32
-}
-
-const myRndMaxVal = 0x3FFFFFFF
-
-// Pseudo random number generator
-func newMyRnd(seed1, seed2 uint32) *myRnd {
- return &myRnd{
- seed1: seed1 % myRndMaxVal,
- seed2: seed2 % myRndMaxVal,
- }
-}
-
-// Tested to be equivalent to MariaDB's floating point variant
-// http://play.golang.org/p/QHvhd4qved
-// http://play.golang.org/p/RG0q4ElWDx
-func (r *myRnd) NextByte() byte {
- r.seed1 = (r.seed1*3 + r.seed2) % myRndMaxVal
- r.seed2 = (r.seed1 + r.seed2 + 33) % myRndMaxVal
-
- return byte(uint64(r.seed1) * 31 / myRndMaxVal)
-}
-
-// Generate binary hash from byte string using insecure pre 4.1 method
-func pwHash(password []byte) (result [2]uint32) {
- var add uint32 = 7
- var tmp uint32
-
- result[0] = 1345345333
- result[1] = 0x12345671
-
- for _, c := range password {
- // skip spaces and tabs in password
- if c == ' ' || c == '\t' {
- continue
- }
-
- tmp = uint32(c)
- result[0] ^= (((result[0] & 63) + add) * tmp) + (result[0] << 8)
- result[1] += (result[1] << 8) ^ result[0]
- add += tmp
- }
-
- // Remove sign bit (1<<31)-1)
- result[0] &= 0x7FFFFFFF
- result[1] &= 0x7FFFFFFF
-
- return
-}
-
-// Hash password using insecure pre 4.1 method
-func scrambleOldPassword(scramble []byte, password string) []byte {
- if len(password) == 0 {
- return nil
- }
-
- scramble = scramble[:8]
-
- hashPw := pwHash([]byte(password))
- hashSc := pwHash(scramble)
-
- r := newMyRnd(hashPw[0]^hashSc[0], hashPw[1]^hashSc[1])
-
- var out [8]byte
- for i := range out {
- out[i] = r.NextByte() + 64
- }
-
- mask := r.NextByte()
- for i := range out {
- out[i] ^= mask
- }
-
- return out[:]
-}
-
-// Hash password using 4.1+ method (SHA1)
-func scramblePassword(scramble []byte, password string) []byte {
- if len(password) == 0 {
- return nil
- }
-
- // stage1Hash = SHA1(password)
- crypt := sha1.New()
- crypt.Write([]byte(password))
- stage1 := crypt.Sum(nil)
-
- // scrambleHash = SHA1(scramble + SHA1(stage1Hash))
- // inner Hash
- crypt.Reset()
- crypt.Write(stage1)
- hash := crypt.Sum(nil)
-
- // outer Hash
- crypt.Reset()
- crypt.Write(scramble)
- crypt.Write(hash)
- scramble = crypt.Sum(nil)
-
- // token = scrambleHash XOR stage1Hash
- for i := range scramble {
- scramble[i] ^= stage1[i]
- }
- return scramble
-}
-
-// Hash password using MySQL 8+ method (SHA256)
-func scrambleSHA256Password(scramble []byte, password string) []byte {
- if len(password) == 0 {
- return nil
- }
-
- // XOR(SHA256(password), SHA256(SHA256(SHA256(password)), scramble))
-
- crypt := sha256.New()
- crypt.Write([]byte(password))
- message1 := crypt.Sum(nil)
-
- crypt.Reset()
- crypt.Write(message1)
- message1Hash := crypt.Sum(nil)
-
- crypt.Reset()
- crypt.Write(message1Hash)
- crypt.Write(scramble)
- message2 := crypt.Sum(nil)
-
- for i := range message1 {
- message1[i] ^= message2[i]
- }
-
- return message1
-}
-
-func encryptPassword(password string, seed []byte, pub *rsa.PublicKey) ([]byte, error) {
- plain := make([]byte, len(password)+1)
- copy(plain, password)
- for i := range plain {
- j := i % len(seed)
- plain[i] ^= seed[j]
- }
- sha1 := sha1.New()
- return rsa.EncryptOAEP(sha1, rand.Reader, pub, plain, nil)
-}
-
-func (mc *mysqlConn) sendEncryptedPassword(seed []byte, pub *rsa.PublicKey) error {
- enc, err := encryptPassword(mc.cfg.Passwd, seed, pub)
- if err != nil {
- return err
- }
- return mc.writeAuthSwitchPacket(enc)
-}
-
-func (mc *mysqlConn) auth(authData []byte, plugin string) ([]byte, error) {
- switch plugin {
- case "caching_sha2_password":
- authResp := scrambleSHA256Password(authData, mc.cfg.Passwd)
- return authResp, nil
-
- case "mysql_old_password":
- if !mc.cfg.AllowOldPasswords {
- return nil, ErrOldPassword
- }
- // Note: there are edge cases where this should work but doesn't;
- // this is currently "wontfix":
- // https://github.com/go-sql-driver/mysql/issues/184
- authResp := append(scrambleOldPassword(authData[:8], mc.cfg.Passwd), 0)
- return authResp, nil
-
- case "mysql_clear_password":
- if !mc.cfg.AllowCleartextPasswords {
- return nil, ErrCleartextPassword
- }
- // http://dev.mysql.com/doc/refman/5.7/en/cleartext-authentication-plugin.html
- // http://dev.mysql.com/doc/refman/5.7/en/pam-authentication-plugin.html
- return append([]byte(mc.cfg.Passwd), 0), nil
-
- case "mysql_native_password":
- if !mc.cfg.AllowNativePasswords {
- return nil, ErrNativePassword
- }
- // https://dev.mysql.com/doc/internals/en/secure-password-authentication.html
- // Native password authentication only need and will need 20-byte challenge.
- authResp := scramblePassword(authData[:20], mc.cfg.Passwd)
- return authResp, nil
-
- case "sha256_password":
- if len(mc.cfg.Passwd) == 0 {
- return []byte{0}, nil
- }
- if mc.cfg.tls != nil || mc.cfg.Net == "unix" {
- // write cleartext auth packet
- return append([]byte(mc.cfg.Passwd), 0), nil
- }
-
- pubKey := mc.cfg.pubKey
- if pubKey == nil {
- // request public key from server
- return []byte{1}, nil
- }
-
- // encrypted password
- enc, err := encryptPassword(mc.cfg.Passwd, authData, pubKey)
- return enc, err
-
- default:
- errLog.Print("unknown auth plugin:", plugin)
- return nil, ErrUnknownPlugin
- }
-}
-
-func (mc *mysqlConn) handleAuthResult(oldAuthData []byte, plugin string) error {
- // Read Result Packet
- authData, newPlugin, err := mc.readAuthResult()
- if err != nil {
- return err
- }
-
- // handle auth plugin switch, if requested
- if newPlugin != "" {
- // If CLIENT_PLUGIN_AUTH capability is not supported, no new cipher is
- // sent and we have to keep using the cipher sent in the init packet.
- if authData == nil {
- authData = oldAuthData
- } else {
- // copy data from read buffer to owned slice
- copy(oldAuthData, authData)
- }
-
- plugin = newPlugin
-
- authResp, err := mc.auth(authData, plugin)
- if err != nil {
- return err
- }
- if err = mc.writeAuthSwitchPacket(authResp); err != nil {
- return err
- }
-
- // Read Result Packet
- authData, newPlugin, err = mc.readAuthResult()
- if err != nil {
- return err
- }
-
- // Do not allow to change the auth plugin more than once
- if newPlugin != "" {
- return ErrMalformPkt
- }
- }
-
- switch plugin {
-
- // https://insidemysql.com/preparing-your-community-connector-for-mysql-8-part-2-sha256/
- case "caching_sha2_password":
- switch len(authData) {
- case 0:
- return nil // auth successful
- case 1:
- switch authData[0] {
- case cachingSha2PasswordFastAuthSuccess:
- if err = mc.readResultOK(); err == nil {
- return nil // auth successful
- }
-
- case cachingSha2PasswordPerformFullAuthentication:
- if mc.cfg.tls != nil || mc.cfg.Net == "unix" {
- // write cleartext auth packet
- err = mc.writeAuthSwitchPacket(append([]byte(mc.cfg.Passwd), 0))
- if err != nil {
- return err
- }
- } else {
- pubKey := mc.cfg.pubKey
- if pubKey == nil {
- // request public key from server
- data, err := mc.buf.takeSmallBuffer(4 + 1)
- if err != nil {
- return err
- }
- data[4] = cachingSha2PasswordRequestPublicKey
- mc.writePacket(data)
-
- // parse public key
- if data, err = mc.readPacket(); err != nil {
- return err
- }
-
- block, _ := pem.Decode(data[1:])
- pkix, err := x509.ParsePKIXPublicKey(block.Bytes)
- if err != nil {
- return err
- }
- pubKey = pkix.(*rsa.PublicKey)
- }
-
- // send encrypted password
- err = mc.sendEncryptedPassword(oldAuthData, pubKey)
- if err != nil {
- return err
- }
- }
- return mc.readResultOK()
-
- default:
- return ErrMalformPkt
- }
- default:
- return ErrMalformPkt
- }
-
- case "sha256_password":
- switch len(authData) {
- case 0:
- return nil // auth successful
- default:
- block, _ := pem.Decode(authData)
- pub, err := x509.ParsePKIXPublicKey(block.Bytes)
- if err != nil {
- return err
- }
-
- // send encrypted password
- err = mc.sendEncryptedPassword(oldAuthData, pub.(*rsa.PublicKey))
- if err != nil {
- return err
- }
- return mc.readResultOK()
- }
-
- default:
- return nil // auth successful
- }
-
- return err
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/buffer.go b/vendor/github.com/go-sql-driver/mysql/buffer.go
deleted file mode 100644
index 0774c5c8c..000000000
--- a/vendor/github.com/go-sql-driver/mysql/buffer.go
+++ /dev/null
@@ -1,182 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "io"
- "net"
- "time"
-)
-
-const defaultBufSize = 4096
-const maxCachedBufSize = 256 * 1024
-
-// A buffer which is used for both reading and writing.
-// This is possible since communication on each connection is synchronous.
-// In other words, we can't write and read simultaneously on the same connection.
-// The buffer is similar to bufio.Reader / Writer but zero-copy-ish
-// Also highly optimized for this particular use case.
-// This buffer is backed by two byte slices in a double-buffering scheme
-type buffer struct {
- buf []byte // buf is a byte buffer who's length and capacity are equal.
- nc net.Conn
- idx int
- length int
- timeout time.Duration
- dbuf [2][]byte // dbuf is an array with the two byte slices that back this buffer
- flipcnt uint // flipccnt is the current buffer counter for double-buffering
-}
-
-// newBuffer allocates and returns a new buffer.
-func newBuffer(nc net.Conn) buffer {
- fg := make([]byte, defaultBufSize)
- return buffer{
- buf: fg,
- nc: nc,
- dbuf: [2][]byte{fg, nil},
- }
-}
-
-// flip replaces the active buffer with the background buffer
-// this is a delayed flip that simply increases the buffer counter;
-// the actual flip will be performed the next time we call `buffer.fill`
-func (b *buffer) flip() {
- b.flipcnt += 1
-}
-
-// fill reads into the buffer until at least _need_ bytes are in it
-func (b *buffer) fill(need int) error {
- n := b.length
- // fill data into its double-buffering target: if we've called
- // flip on this buffer, we'll be copying to the background buffer,
- // and then filling it with network data; otherwise we'll just move
- // the contents of the current buffer to the front before filling it
- dest := b.dbuf[b.flipcnt&1]
-
- // grow buffer if necessary to fit the whole packet.
- if need > len(dest) {
- // Round up to the next multiple of the default size
- dest = make([]byte, ((need/defaultBufSize)+1)*defaultBufSize)
-
- // if the allocated buffer is not too large, move it to backing storage
- // to prevent extra allocations on applications that perform large reads
- if len(dest) <= maxCachedBufSize {
- b.dbuf[b.flipcnt&1] = dest
- }
- }
-
- // if we're filling the fg buffer, move the existing data to the start of it.
- // if we're filling the bg buffer, copy over the data
- if n > 0 {
- copy(dest[:n], b.buf[b.idx:])
- }
-
- b.buf = dest
- b.idx = 0
-
- for {
- if b.timeout > 0 {
- if err := b.nc.SetReadDeadline(time.Now().Add(b.timeout)); err != nil {
- return err
- }
- }
-
- nn, err := b.nc.Read(b.buf[n:])
- n += nn
-
- switch err {
- case nil:
- if n < need {
- continue
- }
- b.length = n
- return nil
-
- case io.EOF:
- if n >= need {
- b.length = n
- return nil
- }
- return io.ErrUnexpectedEOF
-
- default:
- return err
- }
- }
-}
-
-// returns next N bytes from buffer.
-// The returned slice is only guaranteed to be valid until the next read
-func (b *buffer) readNext(need int) ([]byte, error) {
- if b.length < need {
- // refill
- if err := b.fill(need); err != nil {
- return nil, err
- }
- }
-
- offset := b.idx
- b.idx += need
- b.length -= need
- return b.buf[offset:b.idx], nil
-}
-
-// takeBuffer returns a buffer with the requested size.
-// If possible, a slice from the existing buffer is returned.
-// Otherwise a bigger buffer is made.
-// Only one buffer (total) can be used at a time.
-func (b *buffer) takeBuffer(length int) ([]byte, error) {
- if b.length > 0 {
- return nil, ErrBusyBuffer
- }
-
- // test (cheap) general case first
- if length <= cap(b.buf) {
- return b.buf[:length], nil
- }
-
- if length < maxPacketSize {
- b.buf = make([]byte, length)
- return b.buf, nil
- }
-
- // buffer is larger than we want to store.
- return make([]byte, length), nil
-}
-
-// takeSmallBuffer is shortcut which can be used if length is
-// known to be smaller than defaultBufSize.
-// Only one buffer (total) can be used at a time.
-func (b *buffer) takeSmallBuffer(length int) ([]byte, error) {
- if b.length > 0 {
- return nil, ErrBusyBuffer
- }
- return b.buf[:length], nil
-}
-
-// takeCompleteBuffer returns the complete existing buffer.
-// This can be used if the necessary buffer size is unknown.
-// cap and len of the returned buffer will be equal.
-// Only one buffer (total) can be used at a time.
-func (b *buffer) takeCompleteBuffer() ([]byte, error) {
- if b.length > 0 {
- return nil, ErrBusyBuffer
- }
- return b.buf, nil
-}
-
-// store stores buf, an updated buffer, if its suitable to do so.
-func (b *buffer) store(buf []byte) error {
- if b.length > 0 {
- return ErrBusyBuffer
- } else if cap(buf) <= maxPacketSize && cap(buf) > cap(b.buf) {
- b.buf = buf[:cap(buf)]
- }
- return nil
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/collations.go b/vendor/github.com/go-sql-driver/mysql/collations.go
deleted file mode 100644
index 8d2b55676..000000000
--- a/vendor/github.com/go-sql-driver/mysql/collations.go
+++ /dev/null
@@ -1,265 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2014 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-const defaultCollation = "utf8mb4_general_ci"
-const binaryCollation = "binary"
-
-// A list of available collations mapped to the internal ID.
-// To update this map use the following MySQL query:
-// SELECT COLLATION_NAME, ID FROM information_schema.COLLATIONS WHERE ID<256 ORDER BY ID
-//
-// Handshake packet have only 1 byte for collation_id. So we can't use collations with ID > 255.
-//
-// ucs2, utf16, and utf32 can't be used for connection charset.
-// https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html#charset-connection-impermissible-client-charset
-// They are commented out to reduce this map.
-var collations = map[string]byte{
- "big5_chinese_ci": 1,
- "latin2_czech_cs": 2,
- "dec8_swedish_ci": 3,
- "cp850_general_ci": 4,
- "latin1_german1_ci": 5,
- "hp8_english_ci": 6,
- "koi8r_general_ci": 7,
- "latin1_swedish_ci": 8,
- "latin2_general_ci": 9,
- "swe7_swedish_ci": 10,
- "ascii_general_ci": 11,
- "ujis_japanese_ci": 12,
- "sjis_japanese_ci": 13,
- "cp1251_bulgarian_ci": 14,
- "latin1_danish_ci": 15,
- "hebrew_general_ci": 16,
- "tis620_thai_ci": 18,
- "euckr_korean_ci": 19,
- "latin7_estonian_cs": 20,
- "latin2_hungarian_ci": 21,
- "koi8u_general_ci": 22,
- "cp1251_ukrainian_ci": 23,
- "gb2312_chinese_ci": 24,
- "greek_general_ci": 25,
- "cp1250_general_ci": 26,
- "latin2_croatian_ci": 27,
- "gbk_chinese_ci": 28,
- "cp1257_lithuanian_ci": 29,
- "latin5_turkish_ci": 30,
- "latin1_german2_ci": 31,
- "armscii8_general_ci": 32,
- "utf8_general_ci": 33,
- "cp1250_czech_cs": 34,
- //"ucs2_general_ci": 35,
- "cp866_general_ci": 36,
- "keybcs2_general_ci": 37,
- "macce_general_ci": 38,
- "macroman_general_ci": 39,
- "cp852_general_ci": 40,
- "latin7_general_ci": 41,
- "latin7_general_cs": 42,
- "macce_bin": 43,
- "cp1250_croatian_ci": 44,
- "utf8mb4_general_ci": 45,
- "utf8mb4_bin": 46,
- "latin1_bin": 47,
- "latin1_general_ci": 48,
- "latin1_general_cs": 49,
- "cp1251_bin": 50,
- "cp1251_general_ci": 51,
- "cp1251_general_cs": 52,
- "macroman_bin": 53,
- //"utf16_general_ci": 54,
- //"utf16_bin": 55,
- //"utf16le_general_ci": 56,
- "cp1256_general_ci": 57,
- "cp1257_bin": 58,
- "cp1257_general_ci": 59,
- //"utf32_general_ci": 60,
- //"utf32_bin": 61,
- //"utf16le_bin": 62,
- "binary": 63,
- "armscii8_bin": 64,
- "ascii_bin": 65,
- "cp1250_bin": 66,
- "cp1256_bin": 67,
- "cp866_bin": 68,
- "dec8_bin": 69,
- "greek_bin": 70,
- "hebrew_bin": 71,
- "hp8_bin": 72,
- "keybcs2_bin": 73,
- "koi8r_bin": 74,
- "koi8u_bin": 75,
- "utf8_tolower_ci": 76,
- "latin2_bin": 77,
- "latin5_bin": 78,
- "latin7_bin": 79,
- "cp850_bin": 80,
- "cp852_bin": 81,
- "swe7_bin": 82,
- "utf8_bin": 83,
- "big5_bin": 84,
- "euckr_bin": 85,
- "gb2312_bin": 86,
- "gbk_bin": 87,
- "sjis_bin": 88,
- "tis620_bin": 89,
- //"ucs2_bin": 90,
- "ujis_bin": 91,
- "geostd8_general_ci": 92,
- "geostd8_bin": 93,
- "latin1_spanish_ci": 94,
- "cp932_japanese_ci": 95,
- "cp932_bin": 96,
- "eucjpms_japanese_ci": 97,
- "eucjpms_bin": 98,
- "cp1250_polish_ci": 99,
- //"utf16_unicode_ci": 101,
- //"utf16_icelandic_ci": 102,
- //"utf16_latvian_ci": 103,
- //"utf16_romanian_ci": 104,
- //"utf16_slovenian_ci": 105,
- //"utf16_polish_ci": 106,
- //"utf16_estonian_ci": 107,
- //"utf16_spanish_ci": 108,
- //"utf16_swedish_ci": 109,
- //"utf16_turkish_ci": 110,
- //"utf16_czech_ci": 111,
- //"utf16_danish_ci": 112,
- //"utf16_lithuanian_ci": 113,
- //"utf16_slovak_ci": 114,
- //"utf16_spanish2_ci": 115,
- //"utf16_roman_ci": 116,
- //"utf16_persian_ci": 117,
- //"utf16_esperanto_ci": 118,
- //"utf16_hungarian_ci": 119,
- //"utf16_sinhala_ci": 120,
- //"utf16_german2_ci": 121,
- //"utf16_croatian_ci": 122,
- //"utf16_unicode_520_ci": 123,
- //"utf16_vietnamese_ci": 124,
- //"ucs2_unicode_ci": 128,
- //"ucs2_icelandic_ci": 129,
- //"ucs2_latvian_ci": 130,
- //"ucs2_romanian_ci": 131,
- //"ucs2_slovenian_ci": 132,
- //"ucs2_polish_ci": 133,
- //"ucs2_estonian_ci": 134,
- //"ucs2_spanish_ci": 135,
- //"ucs2_swedish_ci": 136,
- //"ucs2_turkish_ci": 137,
- //"ucs2_czech_ci": 138,
- //"ucs2_danish_ci": 139,
- //"ucs2_lithuanian_ci": 140,
- //"ucs2_slovak_ci": 141,
- //"ucs2_spanish2_ci": 142,
- //"ucs2_roman_ci": 143,
- //"ucs2_persian_ci": 144,
- //"ucs2_esperanto_ci": 145,
- //"ucs2_hungarian_ci": 146,
- //"ucs2_sinhala_ci": 147,
- //"ucs2_german2_ci": 148,
- //"ucs2_croatian_ci": 149,
- //"ucs2_unicode_520_ci": 150,
- //"ucs2_vietnamese_ci": 151,
- //"ucs2_general_mysql500_ci": 159,
- //"utf32_unicode_ci": 160,
- //"utf32_icelandic_ci": 161,
- //"utf32_latvian_ci": 162,
- //"utf32_romanian_ci": 163,
- //"utf32_slovenian_ci": 164,
- //"utf32_polish_ci": 165,
- //"utf32_estonian_ci": 166,
- //"utf32_spanish_ci": 167,
- //"utf32_swedish_ci": 168,
- //"utf32_turkish_ci": 169,
- //"utf32_czech_ci": 170,
- //"utf32_danish_ci": 171,
- //"utf32_lithuanian_ci": 172,
- //"utf32_slovak_ci": 173,
- //"utf32_spanish2_ci": 174,
- //"utf32_roman_ci": 175,
- //"utf32_persian_ci": 176,
- //"utf32_esperanto_ci": 177,
- //"utf32_hungarian_ci": 178,
- //"utf32_sinhala_ci": 179,
- //"utf32_german2_ci": 180,
- //"utf32_croatian_ci": 181,
- //"utf32_unicode_520_ci": 182,
- //"utf32_vietnamese_ci": 183,
- "utf8_unicode_ci": 192,
- "utf8_icelandic_ci": 193,
- "utf8_latvian_ci": 194,
- "utf8_romanian_ci": 195,
- "utf8_slovenian_ci": 196,
- "utf8_polish_ci": 197,
- "utf8_estonian_ci": 198,
- "utf8_spanish_ci": 199,
- "utf8_swedish_ci": 200,
- "utf8_turkish_ci": 201,
- "utf8_czech_ci": 202,
- "utf8_danish_ci": 203,
- "utf8_lithuanian_ci": 204,
- "utf8_slovak_ci": 205,
- "utf8_spanish2_ci": 206,
- "utf8_roman_ci": 207,
- "utf8_persian_ci": 208,
- "utf8_esperanto_ci": 209,
- "utf8_hungarian_ci": 210,
- "utf8_sinhala_ci": 211,
- "utf8_german2_ci": 212,
- "utf8_croatian_ci": 213,
- "utf8_unicode_520_ci": 214,
- "utf8_vietnamese_ci": 215,
- "utf8_general_mysql500_ci": 223,
- "utf8mb4_unicode_ci": 224,
- "utf8mb4_icelandic_ci": 225,
- "utf8mb4_latvian_ci": 226,
- "utf8mb4_romanian_ci": 227,
- "utf8mb4_slovenian_ci": 228,
- "utf8mb4_polish_ci": 229,
- "utf8mb4_estonian_ci": 230,
- "utf8mb4_spanish_ci": 231,
- "utf8mb4_swedish_ci": 232,
- "utf8mb4_turkish_ci": 233,
- "utf8mb4_czech_ci": 234,
- "utf8mb4_danish_ci": 235,
- "utf8mb4_lithuanian_ci": 236,
- "utf8mb4_slovak_ci": 237,
- "utf8mb4_spanish2_ci": 238,
- "utf8mb4_roman_ci": 239,
- "utf8mb4_persian_ci": 240,
- "utf8mb4_esperanto_ci": 241,
- "utf8mb4_hungarian_ci": 242,
- "utf8mb4_sinhala_ci": 243,
- "utf8mb4_german2_ci": 244,
- "utf8mb4_croatian_ci": 245,
- "utf8mb4_unicode_520_ci": 246,
- "utf8mb4_vietnamese_ci": 247,
- "gb18030_chinese_ci": 248,
- "gb18030_bin": 249,
- "gb18030_unicode_520_ci": 250,
- "utf8mb4_0900_ai_ci": 255,
-}
-
-// A blacklist of collations which is unsafe to interpolate parameters.
-// These multibyte encodings may contains 0x5c (`\`) in their trailing bytes.
-var unsafeCollations = map[string]bool{
- "big5_chinese_ci": true,
- "sjis_japanese_ci": true,
- "gbk_chinese_ci": true,
- "big5_bin": true,
- "gb2312_bin": true,
- "gbk_bin": true,
- "sjis_bin": true,
- "cp932_japanese_ci": true,
- "cp932_bin": true,
- "gb18030_chinese_ci": true,
- "gb18030_bin": true,
- "gb18030_unicode_520_ci": true,
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/conncheck.go b/vendor/github.com/go-sql-driver/mysql/conncheck.go
deleted file mode 100644
index 024eb2858..000000000
--- a/vendor/github.com/go-sql-driver/mysql/conncheck.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2019 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-// +build linux darwin dragonfly freebsd netbsd openbsd solaris illumos
-
-package mysql
-
-import (
- "errors"
- "io"
- "net"
- "syscall"
-)
-
-var errUnexpectedRead = errors.New("unexpected read from socket")
-
-func connCheck(conn net.Conn) error {
- var sysErr error
-
- sysConn, ok := conn.(syscall.Conn)
- if !ok {
- return nil
- }
- rawConn, err := sysConn.SyscallConn()
- if err != nil {
- return err
- }
-
- err = rawConn.Read(func(fd uintptr) bool {
- var buf [1]byte
- n, err := syscall.Read(int(fd), buf[:])
- switch {
- case n == 0 && err == nil:
- sysErr = io.EOF
- case n > 0:
- sysErr = errUnexpectedRead
- case err == syscall.EAGAIN || err == syscall.EWOULDBLOCK:
- sysErr = nil
- default:
- sysErr = err
- }
- return true
- })
- if err != nil {
- return err
- }
-
- return sysErr
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/conncheck_dummy.go b/vendor/github.com/go-sql-driver/mysql/conncheck_dummy.go
deleted file mode 100644
index ea7fb607a..000000000
--- a/vendor/github.com/go-sql-driver/mysql/conncheck_dummy.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2019 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-// +build !linux,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!illumos
-
-package mysql
-
-import "net"
-
-func connCheck(conn net.Conn) error {
- return nil
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/connection.go b/vendor/github.com/go-sql-driver/mysql/connection.go
deleted file mode 100644
index e4bb59e67..000000000
--- a/vendor/github.com/go-sql-driver/mysql/connection.go
+++ /dev/null
@@ -1,651 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "context"
- "database/sql"
- "database/sql/driver"
- "io"
- "net"
- "strconv"
- "strings"
- "time"
-)
-
-type mysqlConn struct {
- buf buffer
- netConn net.Conn
- rawConn net.Conn // underlying connection when netConn is TLS connection.
- affectedRows uint64
- insertId uint64
- cfg *Config
- maxAllowedPacket int
- maxWriteSize int
- writeTimeout time.Duration
- flags clientFlag
- status statusFlag
- sequence uint8
- parseTime bool
- reset bool // set when the Go SQL package calls ResetSession
-
- // for context support (Go 1.8+)
- watching bool
- watcher chan<- context.Context
- closech chan struct{}
- finished chan<- struct{}
- canceled atomicError // set non-nil if conn is canceled
- closed atomicBool // set when conn is closed, before closech is closed
-}
-
-// Handles parameters set in DSN after the connection is established
-func (mc *mysqlConn) handleParams() (err error) {
- for param, val := range mc.cfg.Params {
- switch param {
- // Charset
- case "charset":
- charsets := strings.Split(val, ",")
- for i := range charsets {
- // ignore errors here - a charset may not exist
- err = mc.exec("SET NAMES " + charsets[i])
- if err == nil {
- break
- }
- }
- if err != nil {
- return
- }
-
- // System Vars
- default:
- err = mc.exec("SET " + param + "=" + val + "")
- if err != nil {
- return
- }
- }
- }
-
- return
-}
-
-func (mc *mysqlConn) markBadConn(err error) error {
- if mc == nil {
- return err
- }
- if err != errBadConnNoWrite {
- return err
- }
- return driver.ErrBadConn
-}
-
-func (mc *mysqlConn) Begin() (driver.Tx, error) {
- return mc.begin(false)
-}
-
-func (mc *mysqlConn) begin(readOnly bool) (driver.Tx, error) {
- if mc.closed.IsSet() {
- errLog.Print(ErrInvalidConn)
- return nil, driver.ErrBadConn
- }
- var q string
- if readOnly {
- q = "START TRANSACTION READ ONLY"
- } else {
- q = "START TRANSACTION"
- }
- err := mc.exec(q)
- if err == nil {
- return &mysqlTx{mc}, err
- }
- return nil, mc.markBadConn(err)
-}
-
-func (mc *mysqlConn) Close() (err error) {
- // Makes Close idempotent
- if !mc.closed.IsSet() {
- err = mc.writeCommandPacket(comQuit)
- }
-
- mc.cleanup()
-
- return
-}
-
-// Closes the network connection and unsets internal variables. Do not call this
-// function after successfully authentication, call Close instead. This function
-// is called before auth or on auth failure because MySQL will have already
-// closed the network connection.
-func (mc *mysqlConn) cleanup() {
- if !mc.closed.TrySet(true) {
- return
- }
-
- // Makes cleanup idempotent
- close(mc.closech)
- if mc.netConn == nil {
- return
- }
- if err := mc.netConn.Close(); err != nil {
- errLog.Print(err)
- }
-}
-
-func (mc *mysqlConn) error() error {
- if mc.closed.IsSet() {
- if err := mc.canceled.Value(); err != nil {
- return err
- }
- return ErrInvalidConn
- }
- return nil
-}
-
-func (mc *mysqlConn) Prepare(query string) (driver.Stmt, error) {
- if mc.closed.IsSet() {
- errLog.Print(ErrInvalidConn)
- return nil, driver.ErrBadConn
- }
- // Send command
- err := mc.writeCommandPacketStr(comStmtPrepare, query)
- if err != nil {
- // STMT_PREPARE is safe to retry. So we can return ErrBadConn here.
- errLog.Print(err)
- return nil, driver.ErrBadConn
- }
-
- stmt := &mysqlStmt{
- mc: mc,
- }
-
- // Read Result
- columnCount, err := stmt.readPrepareResultPacket()
- if err == nil {
- if stmt.paramCount > 0 {
- if err = mc.readUntilEOF(); err != nil {
- return nil, err
- }
- }
-
- if columnCount > 0 {
- err = mc.readUntilEOF()
- }
- }
-
- return stmt, err
-}
-
-func (mc *mysqlConn) interpolateParams(query string, args []driver.Value) (string, error) {
- // Number of ? should be same to len(args)
- if strings.Count(query, "?") != len(args) {
- return "", driver.ErrSkip
- }
-
- buf, err := mc.buf.takeCompleteBuffer()
- if err != nil {
- // can not take the buffer. Something must be wrong with the connection
- errLog.Print(err)
- return "", ErrInvalidConn
- }
- buf = buf[:0]
- argPos := 0
-
- for i := 0; i < len(query); i++ {
- q := strings.IndexByte(query[i:], '?')
- if q == -1 {
- buf = append(buf, query[i:]...)
- break
- }
- buf = append(buf, query[i:i+q]...)
- i += q
-
- arg := args[argPos]
- argPos++
-
- if arg == nil {
- buf = append(buf, "NULL"...)
- continue
- }
-
- switch v := arg.(type) {
- case int64:
- buf = strconv.AppendInt(buf, v, 10)
- case uint64:
- // Handle uint64 explicitly because our custom ConvertValue emits unsigned values
- buf = strconv.AppendUint(buf, v, 10)
- case float64:
- buf = strconv.AppendFloat(buf, v, 'g', -1, 64)
- case bool:
- if v {
- buf = append(buf, '1')
- } else {
- buf = append(buf, '0')
- }
- case time.Time:
- if v.IsZero() {
- buf = append(buf, "'0000-00-00'"...)
- } else {
- v := v.In(mc.cfg.Loc)
- v = v.Add(time.Nanosecond * 500) // To round under microsecond
- year := v.Year()
- year100 := year / 100
- year1 := year % 100
- month := v.Month()
- day := v.Day()
- hour := v.Hour()
- minute := v.Minute()
- second := v.Second()
- micro := v.Nanosecond() / 1000
-
- buf = append(buf, []byte{
- '\'',
- digits10[year100], digits01[year100],
- digits10[year1], digits01[year1],
- '-',
- digits10[month], digits01[month],
- '-',
- digits10[day], digits01[day],
- ' ',
- digits10[hour], digits01[hour],
- ':',
- digits10[minute], digits01[minute],
- ':',
- digits10[second], digits01[second],
- }...)
-
- if micro != 0 {
- micro10000 := micro / 10000
- micro100 := micro / 100 % 100
- micro1 := micro % 100
- buf = append(buf, []byte{
- '.',
- digits10[micro10000], digits01[micro10000],
- digits10[micro100], digits01[micro100],
- digits10[micro1], digits01[micro1],
- }...)
- }
- buf = append(buf, '\'')
- }
- case []byte:
- if v == nil {
- buf = append(buf, "NULL"...)
- } else {
- buf = append(buf, "_binary'"...)
- if mc.status&statusNoBackslashEscapes == 0 {
- buf = escapeBytesBackslash(buf, v)
- } else {
- buf = escapeBytesQuotes(buf, v)
- }
- buf = append(buf, '\'')
- }
- case string:
- buf = append(buf, '\'')
- if mc.status&statusNoBackslashEscapes == 0 {
- buf = escapeStringBackslash(buf, v)
- } else {
- buf = escapeStringQuotes(buf, v)
- }
- buf = append(buf, '\'')
- default:
- return "", driver.ErrSkip
- }
-
- if len(buf)+4 > mc.maxAllowedPacket {
- return "", driver.ErrSkip
- }
- }
- if argPos != len(args) {
- return "", driver.ErrSkip
- }
- return string(buf), nil
-}
-
-func (mc *mysqlConn) Exec(query string, args []driver.Value) (driver.Result, error) {
- if mc.closed.IsSet() {
- errLog.Print(ErrInvalidConn)
- return nil, driver.ErrBadConn
- }
- if len(args) != 0 {
- if !mc.cfg.InterpolateParams {
- return nil, driver.ErrSkip
- }
- // try to interpolate the parameters to save extra roundtrips for preparing and closing a statement
- prepared, err := mc.interpolateParams(query, args)
- if err != nil {
- return nil, err
- }
- query = prepared
- }
- mc.affectedRows = 0
- mc.insertId = 0
-
- err := mc.exec(query)
- if err == nil {
- return &mysqlResult{
- affectedRows: int64(mc.affectedRows),
- insertId: int64(mc.insertId),
- }, err
- }
- return nil, mc.markBadConn(err)
-}
-
-// Internal function to execute commands
-func (mc *mysqlConn) exec(query string) error {
- // Send command
- if err := mc.writeCommandPacketStr(comQuery, query); err != nil {
- return mc.markBadConn(err)
- }
-
- // Read Result
- resLen, err := mc.readResultSetHeaderPacket()
- if err != nil {
- return err
- }
-
- if resLen > 0 {
- // columns
- if err := mc.readUntilEOF(); err != nil {
- return err
- }
-
- // rows
- if err := mc.readUntilEOF(); err != nil {
- return err
- }
- }
-
- return mc.discardResults()
-}
-
-func (mc *mysqlConn) Query(query string, args []driver.Value) (driver.Rows, error) {
- return mc.query(query, args)
-}
-
-func (mc *mysqlConn) query(query string, args []driver.Value) (*textRows, error) {
- if mc.closed.IsSet() {
- errLog.Print(ErrInvalidConn)
- return nil, driver.ErrBadConn
- }
- if len(args) != 0 {
- if !mc.cfg.InterpolateParams {
- return nil, driver.ErrSkip
- }
- // try client-side prepare to reduce roundtrip
- prepared, err := mc.interpolateParams(query, args)
- if err != nil {
- return nil, err
- }
- query = prepared
- }
- // Send command
- err := mc.writeCommandPacketStr(comQuery, query)
- if err == nil {
- // Read Result
- var resLen int
- resLen, err = mc.readResultSetHeaderPacket()
- if err == nil {
- rows := new(textRows)
- rows.mc = mc
-
- if resLen == 0 {
- rows.rs.done = true
-
- switch err := rows.NextResultSet(); err {
- case nil, io.EOF:
- return rows, nil
- default:
- return nil, err
- }
- }
-
- // Columns
- rows.rs.columns, err = mc.readColumns(resLen)
- return rows, err
- }
- }
- return nil, mc.markBadConn(err)
-}
-
-// Gets the value of the given MySQL System Variable
-// The returned byte slice is only valid until the next read
-func (mc *mysqlConn) getSystemVar(name string) ([]byte, error) {
- // Send command
- if err := mc.writeCommandPacketStr(comQuery, "SELECT @@"+name); err != nil {
- return nil, err
- }
-
- // Read Result
- resLen, err := mc.readResultSetHeaderPacket()
- if err == nil {
- rows := new(textRows)
- rows.mc = mc
- rows.rs.columns = []mysqlField{{fieldType: fieldTypeVarChar}}
-
- if resLen > 0 {
- // Columns
- if err := mc.readUntilEOF(); err != nil {
- return nil, err
- }
- }
-
- dest := make([]driver.Value, resLen)
- if err = rows.readRow(dest); err == nil {
- return dest[0].([]byte), mc.readUntilEOF()
- }
- }
- return nil, err
-}
-
-// finish is called when the query has canceled.
-func (mc *mysqlConn) cancel(err error) {
- mc.canceled.Set(err)
- mc.cleanup()
-}
-
-// finish is called when the query has succeeded.
-func (mc *mysqlConn) finish() {
- if !mc.watching || mc.finished == nil {
- return
- }
- select {
- case mc.finished <- struct{}{}:
- mc.watching = false
- case <-mc.closech:
- }
-}
-
-// Ping implements driver.Pinger interface
-func (mc *mysqlConn) Ping(ctx context.Context) (err error) {
- if mc.closed.IsSet() {
- errLog.Print(ErrInvalidConn)
- return driver.ErrBadConn
- }
-
- if err = mc.watchCancel(ctx); err != nil {
- return
- }
- defer mc.finish()
-
- if err = mc.writeCommandPacket(comPing); err != nil {
- return mc.markBadConn(err)
- }
-
- return mc.readResultOK()
-}
-
-// BeginTx implements driver.ConnBeginTx interface
-func (mc *mysqlConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
- if err := mc.watchCancel(ctx); err != nil {
- return nil, err
- }
- defer mc.finish()
-
- if sql.IsolationLevel(opts.Isolation) != sql.LevelDefault {
- level, err := mapIsolationLevel(opts.Isolation)
- if err != nil {
- return nil, err
- }
- err = mc.exec("SET TRANSACTION ISOLATION LEVEL " + level)
- if err != nil {
- return nil, err
- }
- }
-
- return mc.begin(opts.ReadOnly)
-}
-
-func (mc *mysqlConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
- dargs, err := namedValueToValue(args)
- if err != nil {
- return nil, err
- }
-
- if err := mc.watchCancel(ctx); err != nil {
- return nil, err
- }
-
- rows, err := mc.query(query, dargs)
- if err != nil {
- mc.finish()
- return nil, err
- }
- rows.finish = mc.finish
- return rows, err
-}
-
-func (mc *mysqlConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
- dargs, err := namedValueToValue(args)
- if err != nil {
- return nil, err
- }
-
- if err := mc.watchCancel(ctx); err != nil {
- return nil, err
- }
- defer mc.finish()
-
- return mc.Exec(query, dargs)
-}
-
-func (mc *mysqlConn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
- if err := mc.watchCancel(ctx); err != nil {
- return nil, err
- }
-
- stmt, err := mc.Prepare(query)
- mc.finish()
- if err != nil {
- return nil, err
- }
-
- select {
- default:
- case <-ctx.Done():
- stmt.Close()
- return nil, ctx.Err()
- }
- return stmt, nil
-}
-
-func (stmt *mysqlStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
- dargs, err := namedValueToValue(args)
- if err != nil {
- return nil, err
- }
-
- if err := stmt.mc.watchCancel(ctx); err != nil {
- return nil, err
- }
-
- rows, err := stmt.query(dargs)
- if err != nil {
- stmt.mc.finish()
- return nil, err
- }
- rows.finish = stmt.mc.finish
- return rows, err
-}
-
-func (stmt *mysqlStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
- dargs, err := namedValueToValue(args)
- if err != nil {
- return nil, err
- }
-
- if err := stmt.mc.watchCancel(ctx); err != nil {
- return nil, err
- }
- defer stmt.mc.finish()
-
- return stmt.Exec(dargs)
-}
-
-func (mc *mysqlConn) watchCancel(ctx context.Context) error {
- if mc.watching {
- // Reach here if canceled,
- // so the connection is already invalid
- mc.cleanup()
- return nil
- }
- // When ctx is already cancelled, don't watch it.
- if err := ctx.Err(); err != nil {
- return err
- }
- // When ctx is not cancellable, don't watch it.
- if ctx.Done() == nil {
- return nil
- }
- // When watcher is not alive, can't watch it.
- if mc.watcher == nil {
- return nil
- }
-
- mc.watching = true
- mc.watcher <- ctx
- return nil
-}
-
-func (mc *mysqlConn) startWatcher() {
- watcher := make(chan context.Context, 1)
- mc.watcher = watcher
- finished := make(chan struct{})
- mc.finished = finished
- go func() {
- for {
- var ctx context.Context
- select {
- case ctx = <-watcher:
- case <-mc.closech:
- return
- }
-
- select {
- case <-ctx.Done():
- mc.cancel(ctx.Err())
- case <-finished:
- case <-mc.closech:
- return
- }
- }
- }()
-}
-
-func (mc *mysqlConn) CheckNamedValue(nv *driver.NamedValue) (err error) {
- nv.Value, err = converter{}.ConvertValue(nv.Value)
- return
-}
-
-// ResetSession implements driver.SessionResetter.
-// (From Go 1.10)
-func (mc *mysqlConn) ResetSession(ctx context.Context) error {
- if mc.closed.IsSet() {
- return driver.ErrBadConn
- }
- mc.reset = true
- return nil
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/connector.go b/vendor/github.com/go-sql-driver/mysql/connector.go
deleted file mode 100644
index d567b4e4f..000000000
--- a/vendor/github.com/go-sql-driver/mysql/connector.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2018 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "context"
- "database/sql/driver"
- "net"
-)
-
-type connector struct {
- cfg *Config // immutable private copy.
-}
-
-// Connect implements driver.Connector interface.
-// Connect returns a connection to the database.
-func (c *connector) Connect(ctx context.Context) (driver.Conn, error) {
- var err error
-
- // New mysqlConn
- mc := &mysqlConn{
- maxAllowedPacket: maxPacketSize,
- maxWriteSize: maxPacketSize - 1,
- closech: make(chan struct{}),
- cfg: c.cfg,
- }
- mc.parseTime = mc.cfg.ParseTime
-
- // Connect to Server
- dialsLock.RLock()
- dial, ok := dials[mc.cfg.Net]
- dialsLock.RUnlock()
- if ok {
- dctx := ctx
- if mc.cfg.Timeout > 0 {
- var cancel context.CancelFunc
- dctx, cancel = context.WithTimeout(ctx, c.cfg.Timeout)
- defer cancel()
- }
- mc.netConn, err = dial(dctx, mc.cfg.Addr)
- } else {
- nd := net.Dialer{Timeout: mc.cfg.Timeout}
- mc.netConn, err = nd.DialContext(ctx, mc.cfg.Net, mc.cfg.Addr)
- }
-
- if err != nil {
- return nil, err
- }
-
- // Enable TCP Keepalives on TCP connections
- if tc, ok := mc.netConn.(*net.TCPConn); ok {
- if err := tc.SetKeepAlive(true); err != nil {
- // Don't send COM_QUIT before handshake.
- mc.netConn.Close()
- mc.netConn = nil
- return nil, err
- }
- }
-
- // Call startWatcher for context support (From Go 1.8)
- mc.startWatcher()
- if err := mc.watchCancel(ctx); err != nil {
- mc.cleanup()
- return nil, err
- }
- defer mc.finish()
-
- mc.buf = newBuffer(mc.netConn)
-
- // Set I/O timeouts
- mc.buf.timeout = mc.cfg.ReadTimeout
- mc.writeTimeout = mc.cfg.WriteTimeout
-
- // Reading Handshake Initialization Packet
- authData, plugin, err := mc.readHandshakePacket()
- if err != nil {
- mc.cleanup()
- return nil, err
- }
-
- if plugin == "" {
- plugin = defaultAuthPlugin
- }
-
- // Send Client Authentication Packet
- authResp, err := mc.auth(authData, plugin)
- if err != nil {
- // try the default auth plugin, if using the requested plugin failed
- errLog.Print("could not use requested auth plugin '"+plugin+"': ", err.Error())
- plugin = defaultAuthPlugin
- authResp, err = mc.auth(authData, plugin)
- if err != nil {
- mc.cleanup()
- return nil, err
- }
- }
- if err = mc.writeHandshakeResponsePacket(authResp, plugin); err != nil {
- mc.cleanup()
- return nil, err
- }
-
- // Handle response to auth packet, switch methods if possible
- if err = mc.handleAuthResult(authData, plugin); err != nil {
- // Authentication failed and MySQL has already closed the connection
- // (https://dev.mysql.com/doc/internals/en/authentication-fails.html).
- // Do not send COM_QUIT, just cleanup and return the error.
- mc.cleanup()
- return nil, err
- }
-
- if mc.cfg.MaxAllowedPacket > 0 {
- mc.maxAllowedPacket = mc.cfg.MaxAllowedPacket
- } else {
- // Get max allowed packet size
- maxap, err := mc.getSystemVar("max_allowed_packet")
- if err != nil {
- mc.Close()
- return nil, err
- }
- mc.maxAllowedPacket = stringToInt(maxap) - 1
- }
- if mc.maxAllowedPacket < maxPacketSize {
- mc.maxWriteSize = mc.maxAllowedPacket
- }
-
- // Handle DSN Params
- err = mc.handleParams()
- if err != nil {
- mc.Close()
- return nil, err
- }
-
- return mc, nil
-}
-
-// Driver implements driver.Connector interface.
-// Driver returns &MySQLDriver{}.
-func (c *connector) Driver() driver.Driver {
- return &MySQLDriver{}
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/const.go b/vendor/github.com/go-sql-driver/mysql/const.go
deleted file mode 100644
index b1e6b85ef..000000000
--- a/vendor/github.com/go-sql-driver/mysql/const.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-const (
- defaultAuthPlugin = "mysql_native_password"
- defaultMaxAllowedPacket = 4 << 20 // 4 MiB
- minProtocolVersion = 10
- maxPacketSize = 1<<24 - 1
- timeFormat = "2006-01-02 15:04:05.999999"
-)
-
-// MySQL constants documentation:
-// http://dev.mysql.com/doc/internals/en/client-server-protocol.html
-
-const (
- iOK byte = 0x00
- iAuthMoreData byte = 0x01
- iLocalInFile byte = 0xfb
- iEOF byte = 0xfe
- iERR byte = 0xff
-)
-
-// https://dev.mysql.com/doc/internals/en/capability-flags.html#packet-Protocol::CapabilityFlags
-type clientFlag uint32
-
-const (
- clientLongPassword clientFlag = 1 << iota
- clientFoundRows
- clientLongFlag
- clientConnectWithDB
- clientNoSchema
- clientCompress
- clientODBC
- clientLocalFiles
- clientIgnoreSpace
- clientProtocol41
- clientInteractive
- clientSSL
- clientIgnoreSIGPIPE
- clientTransactions
- clientReserved
- clientSecureConn
- clientMultiStatements
- clientMultiResults
- clientPSMultiResults
- clientPluginAuth
- clientConnectAttrs
- clientPluginAuthLenEncClientData
- clientCanHandleExpiredPasswords
- clientSessionTrack
- clientDeprecateEOF
-)
-
-const (
- comQuit byte = iota + 1
- comInitDB
- comQuery
- comFieldList
- comCreateDB
- comDropDB
- comRefresh
- comShutdown
- comStatistics
- comProcessInfo
- comConnect
- comProcessKill
- comDebug
- comPing
- comTime
- comDelayedInsert
- comChangeUser
- comBinlogDump
- comTableDump
- comConnectOut
- comRegisterSlave
- comStmtPrepare
- comStmtExecute
- comStmtSendLongData
- comStmtClose
- comStmtReset
- comSetOption
- comStmtFetch
-)
-
-// https://dev.mysql.com/doc/internals/en/com-query-response.html#packet-Protocol::ColumnType
-type fieldType byte
-
-const (
- fieldTypeDecimal fieldType = iota
- fieldTypeTiny
- fieldTypeShort
- fieldTypeLong
- fieldTypeFloat
- fieldTypeDouble
- fieldTypeNULL
- fieldTypeTimestamp
- fieldTypeLongLong
- fieldTypeInt24
- fieldTypeDate
- fieldTypeTime
- fieldTypeDateTime
- fieldTypeYear
- fieldTypeNewDate
- fieldTypeVarChar
- fieldTypeBit
-)
-const (
- fieldTypeJSON fieldType = iota + 0xf5
- fieldTypeNewDecimal
- fieldTypeEnum
- fieldTypeSet
- fieldTypeTinyBLOB
- fieldTypeMediumBLOB
- fieldTypeLongBLOB
- fieldTypeBLOB
- fieldTypeVarString
- fieldTypeString
- fieldTypeGeometry
-)
-
-type fieldFlag uint16
-
-const (
- flagNotNULL fieldFlag = 1 << iota
- flagPriKey
- flagUniqueKey
- flagMultipleKey
- flagBLOB
- flagUnsigned
- flagZeroFill
- flagBinary
- flagEnum
- flagAutoIncrement
- flagTimestamp
- flagSet
- flagUnknown1
- flagUnknown2
- flagUnknown3
- flagUnknown4
-)
-
-// http://dev.mysql.com/doc/internals/en/status-flags.html
-type statusFlag uint16
-
-const (
- statusInTrans statusFlag = 1 << iota
- statusInAutocommit
- statusReserved // Not in documentation
- statusMoreResultsExists
- statusNoGoodIndexUsed
- statusNoIndexUsed
- statusCursorExists
- statusLastRowSent
- statusDbDropped
- statusNoBackslashEscapes
- statusMetadataChanged
- statusQueryWasSlow
- statusPsOutParams
- statusInTransReadonly
- statusSessionStateChanged
-)
-
-const (
- cachingSha2PasswordRequestPublicKey = 2
- cachingSha2PasswordFastAuthSuccess = 3
- cachingSha2PasswordPerformFullAuthentication = 4
-)
diff --git a/vendor/github.com/go-sql-driver/mysql/driver.go b/vendor/github.com/go-sql-driver/mysql/driver.go
deleted file mode 100644
index c1bdf1199..000000000
--- a/vendor/github.com/go-sql-driver/mysql/driver.go
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-// Package mysql provides a MySQL driver for Go's database/sql package.
-//
-// The driver should be used via the database/sql package:
-//
-// import "database/sql"
-// import _ "github.com/go-sql-driver/mysql"
-//
-// db, err := sql.Open("mysql", "user:password@/dbname")
-//
-// See https://github.com/go-sql-driver/mysql#usage for details
-package mysql
-
-import (
- "context"
- "database/sql"
- "database/sql/driver"
- "net"
- "sync"
-)
-
-// MySQLDriver is exported to make the driver directly accessible.
-// In general the driver is used via the database/sql package.
-type MySQLDriver struct{}
-
-// DialFunc is a function which can be used to establish the network connection.
-// Custom dial functions must be registered with RegisterDial
-//
-// Deprecated: users should register a DialContextFunc instead
-type DialFunc func(addr string) (net.Conn, error)
-
-// DialContextFunc is a function which can be used to establish the network connection.
-// Custom dial functions must be registered with RegisterDialContext
-type DialContextFunc func(ctx context.Context, addr string) (net.Conn, error)
-
-var (
- dialsLock sync.RWMutex
- dials map[string]DialContextFunc
-)
-
-// RegisterDialContext registers a custom dial function. It can then be used by the
-// network address mynet(addr), where mynet is the registered new network.
-// The current context for the connection and its address is passed to the dial function.
-func RegisterDialContext(net string, dial DialContextFunc) {
- dialsLock.Lock()
- defer dialsLock.Unlock()
- if dials == nil {
- dials = make(map[string]DialContextFunc)
- }
- dials[net] = dial
-}
-
-// RegisterDial registers a custom dial function. It can then be used by the
-// network address mynet(addr), where mynet is the registered new network.
-// addr is passed as a parameter to the dial function.
-//
-// Deprecated: users should call RegisterDialContext instead
-func RegisterDial(network string, dial DialFunc) {
- RegisterDialContext(network, func(_ context.Context, addr string) (net.Conn, error) {
- return dial(addr)
- })
-}
-
-// Open new Connection.
-// See https://github.com/go-sql-driver/mysql#dsn-data-source-name for how
-// the DSN string is formatted
-func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
- cfg, err := ParseDSN(dsn)
- if err != nil {
- return nil, err
- }
- c := &connector{
- cfg: cfg,
- }
- return c.Connect(context.Background())
-}
-
-func init() {
- sql.Register("mysql", &MySQLDriver{})
-}
-
-// NewConnector returns new driver.Connector.
-func NewConnector(cfg *Config) (driver.Connector, error) {
- cfg = cfg.Clone()
- // normalize the contents of cfg so calls to NewConnector have the same
- // behavior as MySQLDriver.OpenConnector
- if err := cfg.normalize(); err != nil {
- return nil, err
- }
- return &connector{cfg: cfg}, nil
-}
-
-// OpenConnector implements driver.DriverContext.
-func (d MySQLDriver) OpenConnector(dsn string) (driver.Connector, error) {
- cfg, err := ParseDSN(dsn)
- if err != nil {
- return nil, err
- }
- return &connector{
- cfg: cfg,
- }, nil
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/dsn.go b/vendor/github.com/go-sql-driver/mysql/dsn.go
deleted file mode 100644
index 75c8c2489..000000000
--- a/vendor/github.com/go-sql-driver/mysql/dsn.go
+++ /dev/null
@@ -1,560 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2016 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "bytes"
- "crypto/rsa"
- "crypto/tls"
- "errors"
- "fmt"
- "math/big"
- "net"
- "net/url"
- "sort"
- "strconv"
- "strings"
- "time"
-)
-
-var (
- errInvalidDSNUnescaped = errors.New("invalid DSN: did you forget to escape a param value?")
- errInvalidDSNAddr = errors.New("invalid DSN: network address not terminated (missing closing brace)")
- errInvalidDSNNoSlash = errors.New("invalid DSN: missing the slash separating the database name")
- errInvalidDSNUnsafeCollation = errors.New("invalid DSN: interpolateParams can not be used with unsafe collations")
-)
-
-// Config is a configuration parsed from a DSN string.
-// If a new Config is created instead of being parsed from a DSN string,
-// the NewConfig function should be used, which sets default values.
-type Config struct {
- User string // Username
- Passwd string // Password (requires User)
- Net string // Network type
- Addr string // Network address (requires Net)
- DBName string // Database name
- Params map[string]string // Connection parameters
- Collation string // Connection collation
- Loc *time.Location // Location for time.Time values
- MaxAllowedPacket int // Max packet size allowed
- ServerPubKey string // Server public key name
- pubKey *rsa.PublicKey // Server public key
- TLSConfig string // TLS configuration name
- tls *tls.Config // TLS configuration
- Timeout time.Duration // Dial timeout
- ReadTimeout time.Duration // I/O read timeout
- WriteTimeout time.Duration // I/O write timeout
-
- AllowAllFiles bool // Allow all files to be used with LOAD DATA LOCAL INFILE
- AllowCleartextPasswords bool // Allows the cleartext client side plugin
- AllowNativePasswords bool // Allows the native password authentication method
- AllowOldPasswords bool // Allows the old insecure password method
- CheckConnLiveness bool // Check connections for liveness before using them
- ClientFoundRows bool // Return number of matching rows instead of rows changed
- ColumnsWithAlias bool // Prepend table alias to column names
- InterpolateParams bool // Interpolate placeholders into query string
- MultiStatements bool // Allow multiple statements in one query
- ParseTime bool // Parse time values to time.Time
- RejectReadOnly bool // Reject read-only connections
-}
-
-// NewConfig creates a new Config and sets default values.
-func NewConfig() *Config {
- return &Config{
- Collation: defaultCollation,
- Loc: time.UTC,
- MaxAllowedPacket: defaultMaxAllowedPacket,
- AllowNativePasswords: true,
- CheckConnLiveness: true,
- }
-}
-
-func (cfg *Config) Clone() *Config {
- cp := *cfg
- if cp.tls != nil {
- cp.tls = cfg.tls.Clone()
- }
- if len(cp.Params) > 0 {
- cp.Params = make(map[string]string, len(cfg.Params))
- for k, v := range cfg.Params {
- cp.Params[k] = v
- }
- }
- if cfg.pubKey != nil {
- cp.pubKey = &rsa.PublicKey{
- N: new(big.Int).Set(cfg.pubKey.N),
- E: cfg.pubKey.E,
- }
- }
- return &cp
-}
-
-func (cfg *Config) normalize() error {
- if cfg.InterpolateParams && unsafeCollations[cfg.Collation] {
- return errInvalidDSNUnsafeCollation
- }
-
- // Set default network if empty
- if cfg.Net == "" {
- cfg.Net = "tcp"
- }
-
- // Set default address if empty
- if cfg.Addr == "" {
- switch cfg.Net {
- case "tcp":
- cfg.Addr = "127.0.0.1:3306"
- case "unix":
- cfg.Addr = "/tmp/mysql.sock"
- default:
- return errors.New("default addr for network '" + cfg.Net + "' unknown")
- }
- } else if cfg.Net == "tcp" {
- cfg.Addr = ensureHavePort(cfg.Addr)
- }
-
- switch cfg.TLSConfig {
- case "false", "":
- // don't set anything
- case "true":
- cfg.tls = &tls.Config{}
- case "skip-verify", "preferred":
- cfg.tls = &tls.Config{InsecureSkipVerify: true}
- default:
- cfg.tls = getTLSConfigClone(cfg.TLSConfig)
- if cfg.tls == nil {
- return errors.New("invalid value / unknown config name: " + cfg.TLSConfig)
- }
- }
-
- if cfg.tls != nil && cfg.tls.ServerName == "" && !cfg.tls.InsecureSkipVerify {
- host, _, err := net.SplitHostPort(cfg.Addr)
- if err == nil {
- cfg.tls.ServerName = host
- }
- }
-
- if cfg.ServerPubKey != "" {
- cfg.pubKey = getServerPubKey(cfg.ServerPubKey)
- if cfg.pubKey == nil {
- return errors.New("invalid value / unknown server pub key name: " + cfg.ServerPubKey)
- }
- }
-
- return nil
-}
-
-func writeDSNParam(buf *bytes.Buffer, hasParam *bool, name, value string) {
- buf.Grow(1 + len(name) + 1 + len(value))
- if !*hasParam {
- *hasParam = true
- buf.WriteByte('?')
- } else {
- buf.WriteByte('&')
- }
- buf.WriteString(name)
- buf.WriteByte('=')
- buf.WriteString(value)
-}
-
-// FormatDSN formats the given Config into a DSN string which can be passed to
-// the driver.
-func (cfg *Config) FormatDSN() string {
- var buf bytes.Buffer
-
- // [username[:password]@]
- if len(cfg.User) > 0 {
- buf.WriteString(cfg.User)
- if len(cfg.Passwd) > 0 {
- buf.WriteByte(':')
- buf.WriteString(cfg.Passwd)
- }
- buf.WriteByte('@')
- }
-
- // [protocol[(address)]]
- if len(cfg.Net) > 0 {
- buf.WriteString(cfg.Net)
- if len(cfg.Addr) > 0 {
- buf.WriteByte('(')
- buf.WriteString(cfg.Addr)
- buf.WriteByte(')')
- }
- }
-
- // /dbname
- buf.WriteByte('/')
- buf.WriteString(cfg.DBName)
-
- // [?param1=value1&...¶mN=valueN]
- hasParam := false
-
- if cfg.AllowAllFiles {
- hasParam = true
- buf.WriteString("?allowAllFiles=true")
- }
-
- if cfg.AllowCleartextPasswords {
- writeDSNParam(&buf, &hasParam, "allowCleartextPasswords", "true")
- }
-
- if !cfg.AllowNativePasswords {
- writeDSNParam(&buf, &hasParam, "allowNativePasswords", "false")
- }
-
- if cfg.AllowOldPasswords {
- writeDSNParam(&buf, &hasParam, "allowOldPasswords", "true")
- }
-
- if !cfg.CheckConnLiveness {
- writeDSNParam(&buf, &hasParam, "checkConnLiveness", "false")
- }
-
- if cfg.ClientFoundRows {
- writeDSNParam(&buf, &hasParam, "clientFoundRows", "true")
- }
-
- if col := cfg.Collation; col != defaultCollation && len(col) > 0 {
- writeDSNParam(&buf, &hasParam, "collation", col)
- }
-
- if cfg.ColumnsWithAlias {
- writeDSNParam(&buf, &hasParam, "columnsWithAlias", "true")
- }
-
- if cfg.InterpolateParams {
- writeDSNParam(&buf, &hasParam, "interpolateParams", "true")
- }
-
- if cfg.Loc != time.UTC && cfg.Loc != nil {
- writeDSNParam(&buf, &hasParam, "loc", url.QueryEscape(cfg.Loc.String()))
- }
-
- if cfg.MultiStatements {
- writeDSNParam(&buf, &hasParam, "multiStatements", "true")
- }
-
- if cfg.ParseTime {
- writeDSNParam(&buf, &hasParam, "parseTime", "true")
- }
-
- if cfg.ReadTimeout > 0 {
- writeDSNParam(&buf, &hasParam, "readTimeout", cfg.ReadTimeout.String())
- }
-
- if cfg.RejectReadOnly {
- writeDSNParam(&buf, &hasParam, "rejectReadOnly", "true")
- }
-
- if len(cfg.ServerPubKey) > 0 {
- writeDSNParam(&buf, &hasParam, "serverPubKey", url.QueryEscape(cfg.ServerPubKey))
- }
-
- if cfg.Timeout > 0 {
- writeDSNParam(&buf, &hasParam, "timeout", cfg.Timeout.String())
- }
-
- if len(cfg.TLSConfig) > 0 {
- writeDSNParam(&buf, &hasParam, "tls", url.QueryEscape(cfg.TLSConfig))
- }
-
- if cfg.WriteTimeout > 0 {
- writeDSNParam(&buf, &hasParam, "writeTimeout", cfg.WriteTimeout.String())
- }
-
- if cfg.MaxAllowedPacket != defaultMaxAllowedPacket {
- writeDSNParam(&buf, &hasParam, "maxAllowedPacket", strconv.Itoa(cfg.MaxAllowedPacket))
- }
-
- // other params
- if cfg.Params != nil {
- var params []string
- for param := range cfg.Params {
- params = append(params, param)
- }
- sort.Strings(params)
- for _, param := range params {
- writeDSNParam(&buf, &hasParam, param, url.QueryEscape(cfg.Params[param]))
- }
- }
-
- return buf.String()
-}
-
-// ParseDSN parses the DSN string to a Config
-func ParseDSN(dsn string) (cfg *Config, err error) {
- // New config with some default values
- cfg = NewConfig()
-
- // [user[:password]@][net[(addr)]]/dbname[?param1=value1¶mN=valueN]
- // Find the last '/' (since the password or the net addr might contain a '/')
- foundSlash := false
- for i := len(dsn) - 1; i >= 0; i-- {
- if dsn[i] == '/' {
- foundSlash = true
- var j, k int
-
- // left part is empty if i <= 0
- if i > 0 {
- // [username[:password]@][protocol[(address)]]
- // Find the last '@' in dsn[:i]
- for j = i; j >= 0; j-- {
- if dsn[j] == '@' {
- // username[:password]
- // Find the first ':' in dsn[:j]
- for k = 0; k < j; k++ {
- if dsn[k] == ':' {
- cfg.Passwd = dsn[k+1 : j]
- break
- }
- }
- cfg.User = dsn[:k]
-
- break
- }
- }
-
- // [protocol[(address)]]
- // Find the first '(' in dsn[j+1:i]
- for k = j + 1; k < i; k++ {
- if dsn[k] == '(' {
- // dsn[i-1] must be == ')' if an address is specified
- if dsn[i-1] != ')' {
- if strings.ContainsRune(dsn[k+1:i], ')') {
- return nil, errInvalidDSNUnescaped
- }
- return nil, errInvalidDSNAddr
- }
- cfg.Addr = dsn[k+1 : i-1]
- break
- }
- }
- cfg.Net = dsn[j+1 : k]
- }
-
- // dbname[?param1=value1&...¶mN=valueN]
- // Find the first '?' in dsn[i+1:]
- for j = i + 1; j < len(dsn); j++ {
- if dsn[j] == '?' {
- if err = parseDSNParams(cfg, dsn[j+1:]); err != nil {
- return
- }
- break
- }
- }
- cfg.DBName = dsn[i+1 : j]
-
- break
- }
- }
-
- if !foundSlash && len(dsn) > 0 {
- return nil, errInvalidDSNNoSlash
- }
-
- if err = cfg.normalize(); err != nil {
- return nil, err
- }
- return
-}
-
-// parseDSNParams parses the DSN "query string"
-// Values must be url.QueryEscape'ed
-func parseDSNParams(cfg *Config, params string) (err error) {
- for _, v := range strings.Split(params, "&") {
- param := strings.SplitN(v, "=", 2)
- if len(param) != 2 {
- continue
- }
-
- // cfg params
- switch value := param[1]; param[0] {
- // Disable INFILE whitelist / enable all files
- case "allowAllFiles":
- var isBool bool
- cfg.AllowAllFiles, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Use cleartext authentication mode (MySQL 5.5.10+)
- case "allowCleartextPasswords":
- var isBool bool
- cfg.AllowCleartextPasswords, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Use native password authentication
- case "allowNativePasswords":
- var isBool bool
- cfg.AllowNativePasswords, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Use old authentication mode (pre MySQL 4.1)
- case "allowOldPasswords":
- var isBool bool
- cfg.AllowOldPasswords, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Check connections for Liveness before using them
- case "checkConnLiveness":
- var isBool bool
- cfg.CheckConnLiveness, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Switch "rowsAffected" mode
- case "clientFoundRows":
- var isBool bool
- cfg.ClientFoundRows, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Collation
- case "collation":
- cfg.Collation = value
- break
-
- case "columnsWithAlias":
- var isBool bool
- cfg.ColumnsWithAlias, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Compression
- case "compress":
- return errors.New("compression not implemented yet")
-
- // Enable client side placeholder substitution
- case "interpolateParams":
- var isBool bool
- cfg.InterpolateParams, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Time Location
- case "loc":
- if value, err = url.QueryUnescape(value); err != nil {
- return
- }
- cfg.Loc, err = time.LoadLocation(value)
- if err != nil {
- return
- }
-
- // multiple statements in one query
- case "multiStatements":
- var isBool bool
- cfg.MultiStatements, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // time.Time parsing
- case "parseTime":
- var isBool bool
- cfg.ParseTime, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // I/O read Timeout
- case "readTimeout":
- cfg.ReadTimeout, err = time.ParseDuration(value)
- if err != nil {
- return
- }
-
- // Reject read-only connections
- case "rejectReadOnly":
- var isBool bool
- cfg.RejectReadOnly, isBool = readBool(value)
- if !isBool {
- return errors.New("invalid bool value: " + value)
- }
-
- // Server public key
- case "serverPubKey":
- name, err := url.QueryUnescape(value)
- if err != nil {
- return fmt.Errorf("invalid value for server pub key name: %v", err)
- }
- cfg.ServerPubKey = name
-
- // Strict mode
- case "strict":
- panic("strict mode has been removed. See https://github.com/go-sql-driver/mysql/wiki/strict-mode")
-
- // Dial Timeout
- case "timeout":
- cfg.Timeout, err = time.ParseDuration(value)
- if err != nil {
- return
- }
-
- // TLS-Encryption
- case "tls":
- boolValue, isBool := readBool(value)
- if isBool {
- if boolValue {
- cfg.TLSConfig = "true"
- } else {
- cfg.TLSConfig = "false"
- }
- } else if vl := strings.ToLower(value); vl == "skip-verify" || vl == "preferred" {
- cfg.TLSConfig = vl
- } else {
- name, err := url.QueryUnescape(value)
- if err != nil {
- return fmt.Errorf("invalid value for TLS config name: %v", err)
- }
- cfg.TLSConfig = name
- }
-
- // I/O write Timeout
- case "writeTimeout":
- cfg.WriteTimeout, err = time.ParseDuration(value)
- if err != nil {
- return
- }
- case "maxAllowedPacket":
- cfg.MaxAllowedPacket, err = strconv.Atoi(value)
- if err != nil {
- return
- }
- default:
- // lazy init
- if cfg.Params == nil {
- cfg.Params = make(map[string]string)
- }
-
- if cfg.Params[param[0]], err = url.QueryUnescape(value); err != nil {
- return
- }
- }
- }
-
- return
-}
-
-func ensureHavePort(addr string) string {
- if _, _, err := net.SplitHostPort(addr); err != nil {
- return net.JoinHostPort(addr, "3306")
- }
- return addr
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/errors.go b/vendor/github.com/go-sql-driver/mysql/errors.go
deleted file mode 100644
index 760782ff2..000000000
--- a/vendor/github.com/go-sql-driver/mysql/errors.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "errors"
- "fmt"
- "log"
- "os"
-)
-
-// Various errors the driver might return. Can change between driver versions.
-var (
- ErrInvalidConn = errors.New("invalid connection")
- ErrMalformPkt = errors.New("malformed packet")
- ErrNoTLS = errors.New("TLS requested but server does not support TLS")
- ErrCleartextPassword = errors.New("this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN")
- ErrNativePassword = errors.New("this user requires mysql native password authentication.")
- ErrOldPassword = errors.New("this user requires old password authentication. If you still want to use it, please add 'allowOldPasswords=1' to your DSN. See also https://github.com/go-sql-driver/mysql/wiki/old_passwords")
- ErrUnknownPlugin = errors.New("this authentication plugin is not supported")
- ErrOldProtocol = errors.New("MySQL server does not support required protocol 41+")
- ErrPktSync = errors.New("commands out of sync. You can't run this command now")
- ErrPktSyncMul = errors.New("commands out of sync. Did you run multiple statements at once?")
- ErrPktTooLarge = errors.New("packet for query is too large. Try adjusting the 'max_allowed_packet' variable on the server")
- ErrBusyBuffer = errors.New("busy buffer")
-
- // errBadConnNoWrite is used for connection errors where nothing was sent to the database yet.
- // If this happens first in a function starting a database interaction, it should be replaced by driver.ErrBadConn
- // to trigger a resend.
- // See https://github.com/go-sql-driver/mysql/pull/302
- errBadConnNoWrite = errors.New("bad connection")
-)
-
-var errLog = Logger(log.New(os.Stderr, "[mysql] ", log.Ldate|log.Ltime|log.Lshortfile))
-
-// Logger is used to log critical error messages.
-type Logger interface {
- Print(v ...interface{})
-}
-
-// SetLogger is used to set the logger for critical errors.
-// The initial logger is os.Stderr.
-func SetLogger(logger Logger) error {
- if logger == nil {
- return errors.New("logger is nil")
- }
- errLog = logger
- return nil
-}
-
-// MySQLError is an error type which represents a single MySQL error
-type MySQLError struct {
- Number uint16
- Message string
-}
-
-func (me *MySQLError) Error() string {
- return fmt.Sprintf("Error %d: %s", me.Number, me.Message)
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/fields.go b/vendor/github.com/go-sql-driver/mysql/fields.go
deleted file mode 100644
index e1e2ece4b..000000000
--- a/vendor/github.com/go-sql-driver/mysql/fields.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "database/sql"
- "reflect"
-)
-
-func (mf *mysqlField) typeDatabaseName() string {
- switch mf.fieldType {
- case fieldTypeBit:
- return "BIT"
- case fieldTypeBLOB:
- if mf.charSet != collations[binaryCollation] {
- return "TEXT"
- }
- return "BLOB"
- case fieldTypeDate:
- return "DATE"
- case fieldTypeDateTime:
- return "DATETIME"
- case fieldTypeDecimal:
- return "DECIMAL"
- case fieldTypeDouble:
- return "DOUBLE"
- case fieldTypeEnum:
- return "ENUM"
- case fieldTypeFloat:
- return "FLOAT"
- case fieldTypeGeometry:
- return "GEOMETRY"
- case fieldTypeInt24:
- return "MEDIUMINT"
- case fieldTypeJSON:
- return "JSON"
- case fieldTypeLong:
- return "INT"
- case fieldTypeLongBLOB:
- if mf.charSet != collations[binaryCollation] {
- return "LONGTEXT"
- }
- return "LONGBLOB"
- case fieldTypeLongLong:
- return "BIGINT"
- case fieldTypeMediumBLOB:
- if mf.charSet != collations[binaryCollation] {
- return "MEDIUMTEXT"
- }
- return "MEDIUMBLOB"
- case fieldTypeNewDate:
- return "DATE"
- case fieldTypeNewDecimal:
- return "DECIMAL"
- case fieldTypeNULL:
- return "NULL"
- case fieldTypeSet:
- return "SET"
- case fieldTypeShort:
- return "SMALLINT"
- case fieldTypeString:
- if mf.charSet == collations[binaryCollation] {
- return "BINARY"
- }
- return "CHAR"
- case fieldTypeTime:
- return "TIME"
- case fieldTypeTimestamp:
- return "TIMESTAMP"
- case fieldTypeTiny:
- return "TINYINT"
- case fieldTypeTinyBLOB:
- if mf.charSet != collations[binaryCollation] {
- return "TINYTEXT"
- }
- return "TINYBLOB"
- case fieldTypeVarChar:
- if mf.charSet == collations[binaryCollation] {
- return "VARBINARY"
- }
- return "VARCHAR"
- case fieldTypeVarString:
- if mf.charSet == collations[binaryCollation] {
- return "VARBINARY"
- }
- return "VARCHAR"
- case fieldTypeYear:
- return "YEAR"
- default:
- return ""
- }
-}
-
-var (
- scanTypeFloat32 = reflect.TypeOf(float32(0))
- scanTypeFloat64 = reflect.TypeOf(float64(0))
- scanTypeInt8 = reflect.TypeOf(int8(0))
- scanTypeInt16 = reflect.TypeOf(int16(0))
- scanTypeInt32 = reflect.TypeOf(int32(0))
- scanTypeInt64 = reflect.TypeOf(int64(0))
- scanTypeNullFloat = reflect.TypeOf(sql.NullFloat64{})
- scanTypeNullInt = reflect.TypeOf(sql.NullInt64{})
- scanTypeNullTime = reflect.TypeOf(NullTime{})
- scanTypeUint8 = reflect.TypeOf(uint8(0))
- scanTypeUint16 = reflect.TypeOf(uint16(0))
- scanTypeUint32 = reflect.TypeOf(uint32(0))
- scanTypeUint64 = reflect.TypeOf(uint64(0))
- scanTypeRawBytes = reflect.TypeOf(sql.RawBytes{})
- scanTypeUnknown = reflect.TypeOf(new(interface{}))
-)
-
-type mysqlField struct {
- tableName string
- name string
- length uint32
- flags fieldFlag
- fieldType fieldType
- decimals byte
- charSet uint8
-}
-
-func (mf *mysqlField) scanType() reflect.Type {
- switch mf.fieldType {
- case fieldTypeTiny:
- if mf.flags&flagNotNULL != 0 {
- if mf.flags&flagUnsigned != 0 {
- return scanTypeUint8
- }
- return scanTypeInt8
- }
- return scanTypeNullInt
-
- case fieldTypeShort, fieldTypeYear:
- if mf.flags&flagNotNULL != 0 {
- if mf.flags&flagUnsigned != 0 {
- return scanTypeUint16
- }
- return scanTypeInt16
- }
- return scanTypeNullInt
-
- case fieldTypeInt24, fieldTypeLong:
- if mf.flags&flagNotNULL != 0 {
- if mf.flags&flagUnsigned != 0 {
- return scanTypeUint32
- }
- return scanTypeInt32
- }
- return scanTypeNullInt
-
- case fieldTypeLongLong:
- if mf.flags&flagNotNULL != 0 {
- if mf.flags&flagUnsigned != 0 {
- return scanTypeUint64
- }
- return scanTypeInt64
- }
- return scanTypeNullInt
-
- case fieldTypeFloat:
- if mf.flags&flagNotNULL != 0 {
- return scanTypeFloat32
- }
- return scanTypeNullFloat
-
- case fieldTypeDouble:
- if mf.flags&flagNotNULL != 0 {
- return scanTypeFloat64
- }
- return scanTypeNullFloat
-
- case fieldTypeDecimal, fieldTypeNewDecimal, fieldTypeVarChar,
- fieldTypeBit, fieldTypeEnum, fieldTypeSet, fieldTypeTinyBLOB,
- fieldTypeMediumBLOB, fieldTypeLongBLOB, fieldTypeBLOB,
- fieldTypeVarString, fieldTypeString, fieldTypeGeometry, fieldTypeJSON,
- fieldTypeTime:
- return scanTypeRawBytes
-
- case fieldTypeDate, fieldTypeNewDate,
- fieldTypeTimestamp, fieldTypeDateTime:
- // NullTime is always returned for more consistent behavior as it can
- // handle both cases of parseTime regardless if the field is nullable.
- return scanTypeNullTime
-
- default:
- return scanTypeUnknown
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/go.mod b/vendor/github.com/go-sql-driver/mysql/go.mod
deleted file mode 100644
index fffbf6a90..000000000
--- a/vendor/github.com/go-sql-driver/mysql/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/go-sql-driver/mysql
-
-go 1.10
diff --git a/vendor/github.com/go-sql-driver/mysql/infile.go b/vendor/github.com/go-sql-driver/mysql/infile.go
deleted file mode 100644
index 273cb0ba5..000000000
--- a/vendor/github.com/go-sql-driver/mysql/infile.go
+++ /dev/null
@@ -1,182 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "fmt"
- "io"
- "os"
- "strings"
- "sync"
-)
-
-var (
- fileRegister map[string]bool
- fileRegisterLock sync.RWMutex
- readerRegister map[string]func() io.Reader
- readerRegisterLock sync.RWMutex
-)
-
-// RegisterLocalFile adds the given file to the file whitelist,
-// so that it can be used by "LOAD DATA LOCAL INFILE ".
-// Alternatively you can allow the use of all local files with
-// the DSN parameter 'allowAllFiles=true'
-//
-// filePath := "/home/gopher/data.csv"
-// mysql.RegisterLocalFile(filePath)
-// err := db.Exec("LOAD DATA LOCAL INFILE '" + filePath + "' INTO TABLE foo")
-// if err != nil {
-// ...
-//
-func RegisterLocalFile(filePath string) {
- fileRegisterLock.Lock()
- // lazy map init
- if fileRegister == nil {
- fileRegister = make(map[string]bool)
- }
-
- fileRegister[strings.Trim(filePath, `"`)] = true
- fileRegisterLock.Unlock()
-}
-
-// DeregisterLocalFile removes the given filepath from the whitelist.
-func DeregisterLocalFile(filePath string) {
- fileRegisterLock.Lock()
- delete(fileRegister, strings.Trim(filePath, `"`))
- fileRegisterLock.Unlock()
-}
-
-// RegisterReaderHandler registers a handler function which is used
-// to receive a io.Reader.
-// The Reader can be used by "LOAD DATA LOCAL INFILE Reader::".
-// If the handler returns a io.ReadCloser Close() is called when the
-// request is finished.
-//
-// mysql.RegisterReaderHandler("data", func() io.Reader {
-// var csvReader io.Reader // Some Reader that returns CSV data
-// ... // Open Reader here
-// return csvReader
-// })
-// err := db.Exec("LOAD DATA LOCAL INFILE 'Reader::data' INTO TABLE foo")
-// if err != nil {
-// ...
-//
-func RegisterReaderHandler(name string, handler func() io.Reader) {
- readerRegisterLock.Lock()
- // lazy map init
- if readerRegister == nil {
- readerRegister = make(map[string]func() io.Reader)
- }
-
- readerRegister[name] = handler
- readerRegisterLock.Unlock()
-}
-
-// DeregisterReaderHandler removes the ReaderHandler function with
-// the given name from the registry.
-func DeregisterReaderHandler(name string) {
- readerRegisterLock.Lock()
- delete(readerRegister, name)
- readerRegisterLock.Unlock()
-}
-
-func deferredClose(err *error, closer io.Closer) {
- closeErr := closer.Close()
- if *err == nil {
- *err = closeErr
- }
-}
-
-func (mc *mysqlConn) handleInFileRequest(name string) (err error) {
- var rdr io.Reader
- var data []byte
- packetSize := 16 * 1024 // 16KB is small enough for disk readahead and large enough for TCP
- if mc.maxWriteSize < packetSize {
- packetSize = mc.maxWriteSize
- }
-
- if idx := strings.Index(name, "Reader::"); idx == 0 || (idx > 0 && name[idx-1] == '/') { // io.Reader
- // The server might return an an absolute path. See issue #355.
- name = name[idx+8:]
-
- readerRegisterLock.RLock()
- handler, inMap := readerRegister[name]
- readerRegisterLock.RUnlock()
-
- if inMap {
- rdr = handler()
- if rdr != nil {
- if cl, ok := rdr.(io.Closer); ok {
- defer deferredClose(&err, cl)
- }
- } else {
- err = fmt.Errorf("Reader '%s' is ", name)
- }
- } else {
- err = fmt.Errorf("Reader '%s' is not registered", name)
- }
- } else { // File
- name = strings.Trim(name, `"`)
- fileRegisterLock.RLock()
- fr := fileRegister[name]
- fileRegisterLock.RUnlock()
- if mc.cfg.AllowAllFiles || fr {
- var file *os.File
- var fi os.FileInfo
-
- if file, err = os.Open(name); err == nil {
- defer deferredClose(&err, file)
-
- // get file size
- if fi, err = file.Stat(); err == nil {
- rdr = file
- if fileSize := int(fi.Size()); fileSize < packetSize {
- packetSize = fileSize
- }
- }
- }
- } else {
- err = fmt.Errorf("local file '%s' is not registered", name)
- }
- }
-
- // send content packets
- // if packetSize == 0, the Reader contains no data
- if err == nil && packetSize > 0 {
- data := make([]byte, 4+packetSize)
- var n int
- for err == nil {
- n, err = rdr.Read(data[4:])
- if n > 0 {
- if ioErr := mc.writePacket(data[:4+n]); ioErr != nil {
- return ioErr
- }
- }
- }
- if err == io.EOF {
- err = nil
- }
- }
-
- // send empty packet (termination)
- if data == nil {
- data = make([]byte, 4)
- }
- if ioErr := mc.writePacket(data[:4]); ioErr != nil {
- return ioErr
- }
-
- // read OK packet
- if err == nil {
- return mc.readResultOK()
- }
-
- mc.readPacket()
- return err
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/nulltime.go b/vendor/github.com/go-sql-driver/mysql/nulltime.go
deleted file mode 100644
index afa8a89e9..000000000
--- a/vendor/github.com/go-sql-driver/mysql/nulltime.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "database/sql/driver"
- "fmt"
- "time"
-)
-
-// Scan implements the Scanner interface.
-// The value type must be time.Time or string / []byte (formatted time-string),
-// otherwise Scan fails.
-func (nt *NullTime) Scan(value interface{}) (err error) {
- if value == nil {
- nt.Time, nt.Valid = time.Time{}, false
- return
- }
-
- switch v := value.(type) {
- case time.Time:
- nt.Time, nt.Valid = v, true
- return
- case []byte:
- nt.Time, err = parseDateTime(string(v), time.UTC)
- nt.Valid = (err == nil)
- return
- case string:
- nt.Time, err = parseDateTime(v, time.UTC)
- nt.Valid = (err == nil)
- return
- }
-
- nt.Valid = false
- return fmt.Errorf("Can't convert %T to time.Time", value)
-}
-
-// Value implements the driver Valuer interface.
-func (nt NullTime) Value() (driver.Value, error) {
- if !nt.Valid {
- return nil, nil
- }
- return nt.Time, nil
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/nulltime_go113.go b/vendor/github.com/go-sql-driver/mysql/nulltime_go113.go
deleted file mode 100644
index c392594dd..000000000
--- a/vendor/github.com/go-sql-driver/mysql/nulltime_go113.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-// +build go1.13
-
-package mysql
-
-import (
- "database/sql"
-)
-
-// NullTime represents a time.Time that may be NULL.
-// NullTime implements the Scanner interface so
-// it can be used as a scan destination:
-//
-// var nt NullTime
-// err := db.QueryRow("SELECT time FROM foo WHERE id=?", id).Scan(&nt)
-// ...
-// if nt.Valid {
-// // use nt.Time
-// } else {
-// // NULL value
-// }
-//
-// This NullTime implementation is not driver-specific
-type NullTime sql.NullTime
diff --git a/vendor/github.com/go-sql-driver/mysql/nulltime_legacy.go b/vendor/github.com/go-sql-driver/mysql/nulltime_legacy.go
deleted file mode 100644
index 86d159d44..000000000
--- a/vendor/github.com/go-sql-driver/mysql/nulltime_legacy.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-// +build !go1.13
-
-package mysql
-
-import (
- "time"
-)
-
-// NullTime represents a time.Time that may be NULL.
-// NullTime implements the Scanner interface so
-// it can be used as a scan destination:
-//
-// var nt NullTime
-// err := db.QueryRow("SELECT time FROM foo WHERE id=?", id).Scan(&nt)
-// ...
-// if nt.Valid {
-// // use nt.Time
-// } else {
-// // NULL value
-// }
-//
-// This NullTime implementation is not driver-specific
-type NullTime struct {
- Time time.Time
- Valid bool // Valid is true if Time is not NULL
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/packets.go b/vendor/github.com/go-sql-driver/mysql/packets.go
deleted file mode 100644
index 82ad7a200..000000000
--- a/vendor/github.com/go-sql-driver/mysql/packets.go
+++ /dev/null
@@ -1,1342 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "bytes"
- "crypto/tls"
- "database/sql/driver"
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "math"
- "time"
-)
-
-// Packets documentation:
-// http://dev.mysql.com/doc/internals/en/client-server-protocol.html
-
-// Read packet to buffer 'data'
-func (mc *mysqlConn) readPacket() ([]byte, error) {
- var prevData []byte
- for {
- // read packet header
- data, err := mc.buf.readNext(4)
- if err != nil {
- if cerr := mc.canceled.Value(); cerr != nil {
- return nil, cerr
- }
- errLog.Print(err)
- mc.Close()
- return nil, ErrInvalidConn
- }
-
- // packet length [24 bit]
- pktLen := int(uint32(data[0]) | uint32(data[1])<<8 | uint32(data[2])<<16)
-
- // check packet sync [8 bit]
- if data[3] != mc.sequence {
- if data[3] > mc.sequence {
- return nil, ErrPktSyncMul
- }
- return nil, ErrPktSync
- }
- mc.sequence++
-
- // packets with length 0 terminate a previous packet which is a
- // multiple of (2^24)-1 bytes long
- if pktLen == 0 {
- // there was no previous packet
- if prevData == nil {
- errLog.Print(ErrMalformPkt)
- mc.Close()
- return nil, ErrInvalidConn
- }
-
- return prevData, nil
- }
-
- // read packet body [pktLen bytes]
- data, err = mc.buf.readNext(pktLen)
- if err != nil {
- if cerr := mc.canceled.Value(); cerr != nil {
- return nil, cerr
- }
- errLog.Print(err)
- mc.Close()
- return nil, ErrInvalidConn
- }
-
- // return data if this was the last packet
- if pktLen < maxPacketSize {
- // zero allocations for non-split packets
- if prevData == nil {
- return data, nil
- }
-
- return append(prevData, data...), nil
- }
-
- prevData = append(prevData, data...)
- }
-}
-
-// Write packet buffer 'data'
-func (mc *mysqlConn) writePacket(data []byte) error {
- pktLen := len(data) - 4
-
- if pktLen > mc.maxAllowedPacket {
- return ErrPktTooLarge
- }
-
- // Perform a stale connection check. We only perform this check for
- // the first query on a connection that has been checked out of the
- // connection pool: a fresh connection from the pool is more likely
- // to be stale, and it has not performed any previous writes that
- // could cause data corruption, so it's safe to return ErrBadConn
- // if the check fails.
- if mc.reset {
- mc.reset = false
- conn := mc.netConn
- if mc.rawConn != nil {
- conn = mc.rawConn
- }
- var err error
- // If this connection has a ReadTimeout which we've been setting on
- // reads, reset it to its default value before we attempt a non-blocking
- // read, otherwise the scheduler will just time us out before we can read
- if mc.cfg.ReadTimeout != 0 {
- err = conn.SetReadDeadline(time.Time{})
- }
- if err == nil && mc.cfg.CheckConnLiveness {
- err = connCheck(conn)
- }
- if err != nil {
- errLog.Print("closing bad idle connection: ", err)
- mc.Close()
- return driver.ErrBadConn
- }
- }
-
- for {
- var size int
- if pktLen >= maxPacketSize {
- data[0] = 0xff
- data[1] = 0xff
- data[2] = 0xff
- size = maxPacketSize
- } else {
- data[0] = byte(pktLen)
- data[1] = byte(pktLen >> 8)
- data[2] = byte(pktLen >> 16)
- size = pktLen
- }
- data[3] = mc.sequence
-
- // Write packet
- if mc.writeTimeout > 0 {
- if err := mc.netConn.SetWriteDeadline(time.Now().Add(mc.writeTimeout)); err != nil {
- return err
- }
- }
-
- n, err := mc.netConn.Write(data[:4+size])
- if err == nil && n == 4+size {
- mc.sequence++
- if size != maxPacketSize {
- return nil
- }
- pktLen -= size
- data = data[size:]
- continue
- }
-
- // Handle error
- if err == nil { // n != len(data)
- mc.cleanup()
- errLog.Print(ErrMalformPkt)
- } else {
- if cerr := mc.canceled.Value(); cerr != nil {
- return cerr
- }
- if n == 0 && pktLen == len(data)-4 {
- // only for the first loop iteration when nothing was written yet
- return errBadConnNoWrite
- }
- mc.cleanup()
- errLog.Print(err)
- }
- return ErrInvalidConn
- }
-}
-
-/******************************************************************************
-* Initialization Process *
-******************************************************************************/
-
-// Handshake Initialization Packet
-// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::Handshake
-func (mc *mysqlConn) readHandshakePacket() (data []byte, plugin string, err error) {
- data, err = mc.readPacket()
- if err != nil {
- // for init we can rewrite this to ErrBadConn for sql.Driver to retry, since
- // in connection initialization we don't risk retrying non-idempotent actions.
- if err == ErrInvalidConn {
- return nil, "", driver.ErrBadConn
- }
- return
- }
-
- if data[0] == iERR {
- return nil, "", mc.handleErrorPacket(data)
- }
-
- // protocol version [1 byte]
- if data[0] < minProtocolVersion {
- return nil, "", fmt.Errorf(
- "unsupported protocol version %d. Version %d or higher is required",
- data[0],
- minProtocolVersion,
- )
- }
-
- // server version [null terminated string]
- // connection id [4 bytes]
- pos := 1 + bytes.IndexByte(data[1:], 0x00) + 1 + 4
-
- // first part of the password cipher [8 bytes]
- authData := data[pos : pos+8]
-
- // (filler) always 0x00 [1 byte]
- pos += 8 + 1
-
- // capability flags (lower 2 bytes) [2 bytes]
- mc.flags = clientFlag(binary.LittleEndian.Uint16(data[pos : pos+2]))
- if mc.flags&clientProtocol41 == 0 {
- return nil, "", ErrOldProtocol
- }
- if mc.flags&clientSSL == 0 && mc.cfg.tls != nil {
- if mc.cfg.TLSConfig == "preferred" {
- mc.cfg.tls = nil
- } else {
- return nil, "", ErrNoTLS
- }
- }
- pos += 2
-
- if len(data) > pos {
- // character set [1 byte]
- // status flags [2 bytes]
- // capability flags (upper 2 bytes) [2 bytes]
- // length of auth-plugin-data [1 byte]
- // reserved (all [00]) [10 bytes]
- pos += 1 + 2 + 2 + 1 + 10
-
- // second part of the password cipher [mininum 13 bytes],
- // where len=MAX(13, length of auth-plugin-data - 8)
- //
- // The web documentation is ambiguous about the length. However,
- // according to mysql-5.7/sql/auth/sql_authentication.cc line 538,
- // the 13th byte is "\0 byte, terminating the second part of
- // a scramble". So the second part of the password cipher is
- // a NULL terminated string that's at least 13 bytes with the
- // last byte being NULL.
- //
- // The official Python library uses the fixed length 12
- // which seems to work but technically could have a hidden bug.
- authData = append(authData, data[pos:pos+12]...)
- pos += 13
-
- // EOF if version (>= 5.5.7 and < 5.5.10) or (>= 5.6.0 and < 5.6.2)
- // \NUL otherwise
- if end := bytes.IndexByte(data[pos:], 0x00); end != -1 {
- plugin = string(data[pos : pos+end])
- } else {
- plugin = string(data[pos:])
- }
-
- // make a memory safe copy of the cipher slice
- var b [20]byte
- copy(b[:], authData)
- return b[:], plugin, nil
- }
-
- // make a memory safe copy of the cipher slice
- var b [8]byte
- copy(b[:], authData)
- return b[:], plugin, nil
-}
-
-// Client Authentication Packet
-// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse
-func (mc *mysqlConn) writeHandshakeResponsePacket(authResp []byte, plugin string) error {
- // Adjust client flags based on server support
- clientFlags := clientProtocol41 |
- clientSecureConn |
- clientLongPassword |
- clientTransactions |
- clientLocalFiles |
- clientPluginAuth |
- clientMultiResults |
- mc.flags&clientLongFlag
-
- if mc.cfg.ClientFoundRows {
- clientFlags |= clientFoundRows
- }
-
- // To enable TLS / SSL
- if mc.cfg.tls != nil {
- clientFlags |= clientSSL
- }
-
- if mc.cfg.MultiStatements {
- clientFlags |= clientMultiStatements
- }
-
- // encode length of the auth plugin data
- var authRespLEIBuf [9]byte
- authRespLen := len(authResp)
- authRespLEI := appendLengthEncodedInteger(authRespLEIBuf[:0], uint64(authRespLen))
- if len(authRespLEI) > 1 {
- // if the length can not be written in 1 byte, it must be written as a
- // length encoded integer
- clientFlags |= clientPluginAuthLenEncClientData
- }
-
- pktLen := 4 + 4 + 1 + 23 + len(mc.cfg.User) + 1 + len(authRespLEI) + len(authResp) + 21 + 1
-
- // To specify a db name
- if n := len(mc.cfg.DBName); n > 0 {
- clientFlags |= clientConnectWithDB
- pktLen += n + 1
- }
-
- // Calculate packet length and get buffer with that size
- data, err := mc.buf.takeSmallBuffer(pktLen + 4)
- if err != nil {
- // cannot take the buffer. Something must be wrong with the connection
- errLog.Print(err)
- return errBadConnNoWrite
- }
-
- // ClientFlags [32 bit]
- data[4] = byte(clientFlags)
- data[5] = byte(clientFlags >> 8)
- data[6] = byte(clientFlags >> 16)
- data[7] = byte(clientFlags >> 24)
-
- // MaxPacketSize [32 bit] (none)
- data[8] = 0x00
- data[9] = 0x00
- data[10] = 0x00
- data[11] = 0x00
-
- // Charset [1 byte]
- var found bool
- data[12], found = collations[mc.cfg.Collation]
- if !found {
- // Note possibility for false negatives:
- // could be triggered although the collation is valid if the
- // collations map does not contain entries the server supports.
- return errors.New("unknown collation")
- }
-
- // SSL Connection Request Packet
- // http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::SSLRequest
- if mc.cfg.tls != nil {
- // Send TLS / SSL request packet
- if err := mc.writePacket(data[:(4+4+1+23)+4]); err != nil {
- return err
- }
-
- // Switch to TLS
- tlsConn := tls.Client(mc.netConn, mc.cfg.tls)
- if err := tlsConn.Handshake(); err != nil {
- return err
- }
- mc.rawConn = mc.netConn
- mc.netConn = tlsConn
- mc.buf.nc = tlsConn
- }
-
- // Filler [23 bytes] (all 0x00)
- pos := 13
- for ; pos < 13+23; pos++ {
- data[pos] = 0
- }
-
- // User [null terminated string]
- if len(mc.cfg.User) > 0 {
- pos += copy(data[pos:], mc.cfg.User)
- }
- data[pos] = 0x00
- pos++
-
- // Auth Data [length encoded integer]
- pos += copy(data[pos:], authRespLEI)
- pos += copy(data[pos:], authResp)
-
- // Databasename [null terminated string]
- if len(mc.cfg.DBName) > 0 {
- pos += copy(data[pos:], mc.cfg.DBName)
- data[pos] = 0x00
- pos++
- }
-
- pos += copy(data[pos:], plugin)
- data[pos] = 0x00
- pos++
-
- // Send Auth packet
- return mc.writePacket(data[:pos])
-}
-
-// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchResponse
-func (mc *mysqlConn) writeAuthSwitchPacket(authData []byte) error {
- pktLen := 4 + len(authData)
- data, err := mc.buf.takeSmallBuffer(pktLen)
- if err != nil {
- // cannot take the buffer. Something must be wrong with the connection
- errLog.Print(err)
- return errBadConnNoWrite
- }
-
- // Add the auth data [EOF]
- copy(data[4:], authData)
- return mc.writePacket(data)
-}
-
-/******************************************************************************
-* Command Packets *
-******************************************************************************/
-
-func (mc *mysqlConn) writeCommandPacket(command byte) error {
- // Reset Packet Sequence
- mc.sequence = 0
-
- data, err := mc.buf.takeSmallBuffer(4 + 1)
- if err != nil {
- // cannot take the buffer. Something must be wrong with the connection
- errLog.Print(err)
- return errBadConnNoWrite
- }
-
- // Add command byte
- data[4] = command
-
- // Send CMD packet
- return mc.writePacket(data)
-}
-
-func (mc *mysqlConn) writeCommandPacketStr(command byte, arg string) error {
- // Reset Packet Sequence
- mc.sequence = 0
-
- pktLen := 1 + len(arg)
- data, err := mc.buf.takeBuffer(pktLen + 4)
- if err != nil {
- // cannot take the buffer. Something must be wrong with the connection
- errLog.Print(err)
- return errBadConnNoWrite
- }
-
- // Add command byte
- data[4] = command
-
- // Add arg
- copy(data[5:], arg)
-
- // Send CMD packet
- return mc.writePacket(data)
-}
-
-func (mc *mysqlConn) writeCommandPacketUint32(command byte, arg uint32) error {
- // Reset Packet Sequence
- mc.sequence = 0
-
- data, err := mc.buf.takeSmallBuffer(4 + 1 + 4)
- if err != nil {
- // cannot take the buffer. Something must be wrong with the connection
- errLog.Print(err)
- return errBadConnNoWrite
- }
-
- // Add command byte
- data[4] = command
-
- // Add arg [32 bit]
- data[5] = byte(arg)
- data[6] = byte(arg >> 8)
- data[7] = byte(arg >> 16)
- data[8] = byte(arg >> 24)
-
- // Send CMD packet
- return mc.writePacket(data)
-}
-
-/******************************************************************************
-* Result Packets *
-******************************************************************************/
-
-func (mc *mysqlConn) readAuthResult() ([]byte, string, error) {
- data, err := mc.readPacket()
- if err != nil {
- return nil, "", err
- }
-
- // packet indicator
- switch data[0] {
-
- case iOK:
- return nil, "", mc.handleOkPacket(data)
-
- case iAuthMoreData:
- return data[1:], "", err
-
- case iEOF:
- if len(data) == 1 {
- // https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::OldAuthSwitchRequest
- return nil, "mysql_old_password", nil
- }
- pluginEndIndex := bytes.IndexByte(data, 0x00)
- if pluginEndIndex < 0 {
- return nil, "", ErrMalformPkt
- }
- plugin := string(data[1:pluginEndIndex])
- authData := data[pluginEndIndex+1:]
- return authData, plugin, nil
-
- default: // Error otherwise
- return nil, "", mc.handleErrorPacket(data)
- }
-}
-
-// Returns error if Packet is not an 'Result OK'-Packet
-func (mc *mysqlConn) readResultOK() error {
- data, err := mc.readPacket()
- if err != nil {
- return err
- }
-
- if data[0] == iOK {
- return mc.handleOkPacket(data)
- }
- return mc.handleErrorPacket(data)
-}
-
-// Result Set Header Packet
-// http://dev.mysql.com/doc/internals/en/com-query-response.html#packet-ProtocolText::Resultset
-func (mc *mysqlConn) readResultSetHeaderPacket() (int, error) {
- data, err := mc.readPacket()
- if err == nil {
- switch data[0] {
-
- case iOK:
- return 0, mc.handleOkPacket(data)
-
- case iERR:
- return 0, mc.handleErrorPacket(data)
-
- case iLocalInFile:
- return 0, mc.handleInFileRequest(string(data[1:]))
- }
-
- // column count
- num, _, n := readLengthEncodedInteger(data)
- if n-len(data) == 0 {
- return int(num), nil
- }
-
- return 0, ErrMalformPkt
- }
- return 0, err
-}
-
-// Error Packet
-// http://dev.mysql.com/doc/internals/en/generic-response-packets.html#packet-ERR_Packet
-func (mc *mysqlConn) handleErrorPacket(data []byte) error {
- if data[0] != iERR {
- return ErrMalformPkt
- }
-
- // 0xff [1 byte]
-
- // Error Number [16 bit uint]
- errno := binary.LittleEndian.Uint16(data[1:3])
-
- // 1792: ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION
- // 1290: ER_OPTION_PREVENTS_STATEMENT (returned by Aurora during failover)
- if (errno == 1792 || errno == 1290) && mc.cfg.RejectReadOnly {
- // Oops; we are connected to a read-only connection, and won't be able
- // to issue any write statements. Since RejectReadOnly is configured,
- // we throw away this connection hoping this one would have write
- // permission. This is specifically for a possible race condition
- // during failover (e.g. on AWS Aurora). See README.md for more.
- //
- // We explicitly close the connection before returning
- // driver.ErrBadConn to ensure that `database/sql` purges this
- // connection and initiates a new one for next statement next time.
- mc.Close()
- return driver.ErrBadConn
- }
-
- pos := 3
-
- // SQL State [optional: # + 5bytes string]
- if data[3] == 0x23 {
- //sqlstate := string(data[4 : 4+5])
- pos = 9
- }
-
- // Error Message [string]
- return &MySQLError{
- Number: errno,
- Message: string(data[pos:]),
- }
-}
-
-func readStatus(b []byte) statusFlag {
- return statusFlag(b[0]) | statusFlag(b[1])<<8
-}
-
-// Ok Packet
-// http://dev.mysql.com/doc/internals/en/generic-response-packets.html#packet-OK_Packet
-func (mc *mysqlConn) handleOkPacket(data []byte) error {
- var n, m int
-
- // 0x00 [1 byte]
-
- // Affected rows [Length Coded Binary]
- mc.affectedRows, _, n = readLengthEncodedInteger(data[1:])
-
- // Insert id [Length Coded Binary]
- mc.insertId, _, m = readLengthEncodedInteger(data[1+n:])
-
- // server_status [2 bytes]
- mc.status = readStatus(data[1+n+m : 1+n+m+2])
- if mc.status&statusMoreResultsExists != 0 {
- return nil
- }
-
- // warning count [2 bytes]
-
- return nil
-}
-
-// Read Packets as Field Packets until EOF-Packet or an Error appears
-// http://dev.mysql.com/doc/internals/en/com-query-response.html#packet-Protocol::ColumnDefinition41
-func (mc *mysqlConn) readColumns(count int) ([]mysqlField, error) {
- columns := make([]mysqlField, count)
-
- for i := 0; ; i++ {
- data, err := mc.readPacket()
- if err != nil {
- return nil, err
- }
-
- // EOF Packet
- if data[0] == iEOF && (len(data) == 5 || len(data) == 1) {
- if i == count {
- return columns, nil
- }
- return nil, fmt.Errorf("column count mismatch n:%d len:%d", count, len(columns))
- }
-
- // Catalog
- pos, err := skipLengthEncodedString(data)
- if err != nil {
- return nil, err
- }
-
- // Database [len coded string]
- n, err := skipLengthEncodedString(data[pos:])
- if err != nil {
- return nil, err
- }
- pos += n
-
- // Table [len coded string]
- if mc.cfg.ColumnsWithAlias {
- tableName, _, n, err := readLengthEncodedString(data[pos:])
- if err != nil {
- return nil, err
- }
- pos += n
- columns[i].tableName = string(tableName)
- } else {
- n, err = skipLengthEncodedString(data[pos:])
- if err != nil {
- return nil, err
- }
- pos += n
- }
-
- // Original table [len coded string]
- n, err = skipLengthEncodedString(data[pos:])
- if err != nil {
- return nil, err
- }
- pos += n
-
- // Name [len coded string]
- name, _, n, err := readLengthEncodedString(data[pos:])
- if err != nil {
- return nil, err
- }
- columns[i].name = string(name)
- pos += n
-
- // Original name [len coded string]
- n, err = skipLengthEncodedString(data[pos:])
- if err != nil {
- return nil, err
- }
- pos += n
-
- // Filler [uint8]
- pos++
-
- // Charset [charset, collation uint8]
- columns[i].charSet = data[pos]
- pos += 2
-
- // Length [uint32]
- columns[i].length = binary.LittleEndian.Uint32(data[pos : pos+4])
- pos += 4
-
- // Field type [uint8]
- columns[i].fieldType = fieldType(data[pos])
- pos++
-
- // Flags [uint16]
- columns[i].flags = fieldFlag(binary.LittleEndian.Uint16(data[pos : pos+2]))
- pos += 2
-
- // Decimals [uint8]
- columns[i].decimals = data[pos]
- //pos++
-
- // Default value [len coded binary]
- //if pos < len(data) {
- // defaultVal, _, err = bytesToLengthCodedBinary(data[pos:])
- //}
- }
-}
-
-// Read Packets as Field Packets until EOF-Packet or an Error appears
-// http://dev.mysql.com/doc/internals/en/com-query-response.html#packet-ProtocolText::ResultsetRow
-func (rows *textRows) readRow(dest []driver.Value) error {
- mc := rows.mc
-
- if rows.rs.done {
- return io.EOF
- }
-
- data, err := mc.readPacket()
- if err != nil {
- return err
- }
-
- // EOF Packet
- if data[0] == iEOF && len(data) == 5 {
- // server_status [2 bytes]
- rows.mc.status = readStatus(data[3:])
- rows.rs.done = true
- if !rows.HasNextResultSet() {
- rows.mc = nil
- }
- return io.EOF
- }
- if data[0] == iERR {
- rows.mc = nil
- return mc.handleErrorPacket(data)
- }
-
- // RowSet Packet
- var n int
- var isNull bool
- pos := 0
-
- for i := range dest {
- // Read bytes and convert to string
- dest[i], isNull, n, err = readLengthEncodedString(data[pos:])
- pos += n
- if err == nil {
- if !isNull {
- if !mc.parseTime {
- continue
- } else {
- switch rows.rs.columns[i].fieldType {
- case fieldTypeTimestamp, fieldTypeDateTime,
- fieldTypeDate, fieldTypeNewDate:
- dest[i], err = parseDateTime(
- string(dest[i].([]byte)),
- mc.cfg.Loc,
- )
- if err == nil {
- continue
- }
- default:
- continue
- }
- }
-
- } else {
- dest[i] = nil
- continue
- }
- }
- return err // err != nil
- }
-
- return nil
-}
-
-// Reads Packets until EOF-Packet or an Error appears. Returns count of Packets read
-func (mc *mysqlConn) readUntilEOF() error {
- for {
- data, err := mc.readPacket()
- if err != nil {
- return err
- }
-
- switch data[0] {
- case iERR:
- return mc.handleErrorPacket(data)
- case iEOF:
- if len(data) == 5 {
- mc.status = readStatus(data[3:])
- }
- return nil
- }
- }
-}
-
-/******************************************************************************
-* Prepared Statements *
-******************************************************************************/
-
-// Prepare Result Packets
-// http://dev.mysql.com/doc/internals/en/com-stmt-prepare-response.html
-func (stmt *mysqlStmt) readPrepareResultPacket() (uint16, error) {
- data, err := stmt.mc.readPacket()
- if err == nil {
- // packet indicator [1 byte]
- if data[0] != iOK {
- return 0, stmt.mc.handleErrorPacket(data)
- }
-
- // statement id [4 bytes]
- stmt.id = binary.LittleEndian.Uint32(data[1:5])
-
- // Column count [16 bit uint]
- columnCount := binary.LittleEndian.Uint16(data[5:7])
-
- // Param count [16 bit uint]
- stmt.paramCount = int(binary.LittleEndian.Uint16(data[7:9]))
-
- // Reserved [8 bit]
-
- // Warning count [16 bit uint]
-
- return columnCount, nil
- }
- return 0, err
-}
-
-// http://dev.mysql.com/doc/internals/en/com-stmt-send-long-data.html
-func (stmt *mysqlStmt) writeCommandLongData(paramID int, arg []byte) error {
- maxLen := stmt.mc.maxAllowedPacket - 1
- pktLen := maxLen
-
- // After the header (bytes 0-3) follows before the data:
- // 1 byte command
- // 4 bytes stmtID
- // 2 bytes paramID
- const dataOffset = 1 + 4 + 2
-
- // Cannot use the write buffer since
- // a) the buffer is too small
- // b) it is in use
- data := make([]byte, 4+1+4+2+len(arg))
-
- copy(data[4+dataOffset:], arg)
-
- for argLen := len(arg); argLen > 0; argLen -= pktLen - dataOffset {
- if dataOffset+argLen < maxLen {
- pktLen = dataOffset + argLen
- }
-
- stmt.mc.sequence = 0
- // Add command byte [1 byte]
- data[4] = comStmtSendLongData
-
- // Add stmtID [32 bit]
- data[5] = byte(stmt.id)
- data[6] = byte(stmt.id >> 8)
- data[7] = byte(stmt.id >> 16)
- data[8] = byte(stmt.id >> 24)
-
- // Add paramID [16 bit]
- data[9] = byte(paramID)
- data[10] = byte(paramID >> 8)
-
- // Send CMD packet
- err := stmt.mc.writePacket(data[:4+pktLen])
- if err == nil {
- data = data[pktLen-dataOffset:]
- continue
- }
- return err
-
- }
-
- // Reset Packet Sequence
- stmt.mc.sequence = 0
- return nil
-}
-
-// Execute Prepared Statement
-// http://dev.mysql.com/doc/internals/en/com-stmt-execute.html
-func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
- if len(args) != stmt.paramCount {
- return fmt.Errorf(
- "argument count mismatch (got: %d; has: %d)",
- len(args),
- stmt.paramCount,
- )
- }
-
- const minPktLen = 4 + 1 + 4 + 1 + 4
- mc := stmt.mc
-
- // Determine threshold dynamically to avoid packet size shortage.
- longDataSize := mc.maxAllowedPacket / (stmt.paramCount + 1)
- if longDataSize < 64 {
- longDataSize = 64
- }
-
- // Reset packet-sequence
- mc.sequence = 0
-
- var data []byte
- var err error
-
- if len(args) == 0 {
- data, err = mc.buf.takeBuffer(minPktLen)
- } else {
- data, err = mc.buf.takeCompleteBuffer()
- // In this case the len(data) == cap(data) which is used to optimise the flow below.
- }
- if err != nil {
- // cannot take the buffer. Something must be wrong with the connection
- errLog.Print(err)
- return errBadConnNoWrite
- }
-
- // command [1 byte]
- data[4] = comStmtExecute
-
- // statement_id [4 bytes]
- data[5] = byte(stmt.id)
- data[6] = byte(stmt.id >> 8)
- data[7] = byte(stmt.id >> 16)
- data[8] = byte(stmt.id >> 24)
-
- // flags (0: CURSOR_TYPE_NO_CURSOR) [1 byte]
- data[9] = 0x00
-
- // iteration_count (uint32(1)) [4 bytes]
- data[10] = 0x01
- data[11] = 0x00
- data[12] = 0x00
- data[13] = 0x00
-
- if len(args) > 0 {
- pos := minPktLen
-
- var nullMask []byte
- if maskLen, typesLen := (len(args)+7)/8, 1+2*len(args); pos+maskLen+typesLen >= cap(data) {
- // buffer has to be extended but we don't know by how much so
- // we depend on append after all data with known sizes fit.
- // We stop at that because we deal with a lot of columns here
- // which makes the required allocation size hard to guess.
- tmp := make([]byte, pos+maskLen+typesLen)
- copy(tmp[:pos], data[:pos])
- data = tmp
- nullMask = data[pos : pos+maskLen]
- // No need to clean nullMask as make ensures that.
- pos += maskLen
- } else {
- nullMask = data[pos : pos+maskLen]
- for i := range nullMask {
- nullMask[i] = 0
- }
- pos += maskLen
- }
-
- // newParameterBoundFlag 1 [1 byte]
- data[pos] = 0x01
- pos++
-
- // type of each parameter [len(args)*2 bytes]
- paramTypes := data[pos:]
- pos += len(args) * 2
-
- // value of each parameter [n bytes]
- paramValues := data[pos:pos]
- valuesCap := cap(paramValues)
-
- for i, arg := range args {
- // build NULL-bitmap
- if arg == nil {
- nullMask[i/8] |= 1 << (uint(i) & 7)
- paramTypes[i+i] = byte(fieldTypeNULL)
- paramTypes[i+i+1] = 0x00
- continue
- }
-
- // cache types and values
- switch v := arg.(type) {
- case int64:
- paramTypes[i+i] = byte(fieldTypeLongLong)
- paramTypes[i+i+1] = 0x00
-
- if cap(paramValues)-len(paramValues)-8 >= 0 {
- paramValues = paramValues[:len(paramValues)+8]
- binary.LittleEndian.PutUint64(
- paramValues[len(paramValues)-8:],
- uint64(v),
- )
- } else {
- paramValues = append(paramValues,
- uint64ToBytes(uint64(v))...,
- )
- }
-
- case uint64:
- paramTypes[i+i] = byte(fieldTypeLongLong)
- paramTypes[i+i+1] = 0x80 // type is unsigned
-
- if cap(paramValues)-len(paramValues)-8 >= 0 {
- paramValues = paramValues[:len(paramValues)+8]
- binary.LittleEndian.PutUint64(
- paramValues[len(paramValues)-8:],
- uint64(v),
- )
- } else {
- paramValues = append(paramValues,
- uint64ToBytes(uint64(v))...,
- )
- }
-
- case float64:
- paramTypes[i+i] = byte(fieldTypeDouble)
- paramTypes[i+i+1] = 0x00
-
- if cap(paramValues)-len(paramValues)-8 >= 0 {
- paramValues = paramValues[:len(paramValues)+8]
- binary.LittleEndian.PutUint64(
- paramValues[len(paramValues)-8:],
- math.Float64bits(v),
- )
- } else {
- paramValues = append(paramValues,
- uint64ToBytes(math.Float64bits(v))...,
- )
- }
-
- case bool:
- paramTypes[i+i] = byte(fieldTypeTiny)
- paramTypes[i+i+1] = 0x00
-
- if v {
- paramValues = append(paramValues, 0x01)
- } else {
- paramValues = append(paramValues, 0x00)
- }
-
- case []byte:
- // Common case (non-nil value) first
- if v != nil {
- paramTypes[i+i] = byte(fieldTypeString)
- paramTypes[i+i+1] = 0x00
-
- if len(v) < longDataSize {
- paramValues = appendLengthEncodedInteger(paramValues,
- uint64(len(v)),
- )
- paramValues = append(paramValues, v...)
- } else {
- if err := stmt.writeCommandLongData(i, v); err != nil {
- return err
- }
- }
- continue
- }
-
- // Handle []byte(nil) as a NULL value
- nullMask[i/8] |= 1 << (uint(i) & 7)
- paramTypes[i+i] = byte(fieldTypeNULL)
- paramTypes[i+i+1] = 0x00
-
- case string:
- paramTypes[i+i] = byte(fieldTypeString)
- paramTypes[i+i+1] = 0x00
-
- if len(v) < longDataSize {
- paramValues = appendLengthEncodedInteger(paramValues,
- uint64(len(v)),
- )
- paramValues = append(paramValues, v...)
- } else {
- if err := stmt.writeCommandLongData(i, []byte(v)); err != nil {
- return err
- }
- }
-
- case time.Time:
- paramTypes[i+i] = byte(fieldTypeString)
- paramTypes[i+i+1] = 0x00
-
- var a [64]byte
- var b = a[:0]
-
- if v.IsZero() {
- b = append(b, "0000-00-00"...)
- } else {
- b = v.In(mc.cfg.Loc).AppendFormat(b, timeFormat)
- }
-
- paramValues = appendLengthEncodedInteger(paramValues,
- uint64(len(b)),
- )
- paramValues = append(paramValues, b...)
-
- default:
- return fmt.Errorf("cannot convert type: %T", arg)
- }
- }
-
- // Check if param values exceeded the available buffer
- // In that case we must build the data packet with the new values buffer
- if valuesCap != cap(paramValues) {
- data = append(data[:pos], paramValues...)
- if err = mc.buf.store(data); err != nil {
- errLog.Print(err)
- return errBadConnNoWrite
- }
- }
-
- pos += len(paramValues)
- data = data[:pos]
- }
-
- return mc.writePacket(data)
-}
-
-func (mc *mysqlConn) discardResults() error {
- for mc.status&statusMoreResultsExists != 0 {
- resLen, err := mc.readResultSetHeaderPacket()
- if err != nil {
- return err
- }
- if resLen > 0 {
- // columns
- if err := mc.readUntilEOF(); err != nil {
- return err
- }
- // rows
- if err := mc.readUntilEOF(); err != nil {
- return err
- }
- }
- }
- return nil
-}
-
-// http://dev.mysql.com/doc/internals/en/binary-protocol-resultset-row.html
-func (rows *binaryRows) readRow(dest []driver.Value) error {
- data, err := rows.mc.readPacket()
- if err != nil {
- return err
- }
-
- // packet indicator [1 byte]
- if data[0] != iOK {
- // EOF Packet
- if data[0] == iEOF && len(data) == 5 {
- rows.mc.status = readStatus(data[3:])
- rows.rs.done = true
- if !rows.HasNextResultSet() {
- rows.mc = nil
- }
- return io.EOF
- }
- mc := rows.mc
- rows.mc = nil
-
- // Error otherwise
- return mc.handleErrorPacket(data)
- }
-
- // NULL-bitmap, [(column-count + 7 + 2) / 8 bytes]
- pos := 1 + (len(dest)+7+2)>>3
- nullMask := data[1:pos]
-
- for i := range dest {
- // Field is NULL
- // (byte >> bit-pos) % 2 == 1
- if ((nullMask[(i+2)>>3] >> uint((i+2)&7)) & 1) == 1 {
- dest[i] = nil
- continue
- }
-
- // Convert to byte-coded string
- switch rows.rs.columns[i].fieldType {
- case fieldTypeNULL:
- dest[i] = nil
- continue
-
- // Numeric Types
- case fieldTypeTiny:
- if rows.rs.columns[i].flags&flagUnsigned != 0 {
- dest[i] = int64(data[pos])
- } else {
- dest[i] = int64(int8(data[pos]))
- }
- pos++
- continue
-
- case fieldTypeShort, fieldTypeYear:
- if rows.rs.columns[i].flags&flagUnsigned != 0 {
- dest[i] = int64(binary.LittleEndian.Uint16(data[pos : pos+2]))
- } else {
- dest[i] = int64(int16(binary.LittleEndian.Uint16(data[pos : pos+2])))
- }
- pos += 2
- continue
-
- case fieldTypeInt24, fieldTypeLong:
- if rows.rs.columns[i].flags&flagUnsigned != 0 {
- dest[i] = int64(binary.LittleEndian.Uint32(data[pos : pos+4]))
- } else {
- dest[i] = int64(int32(binary.LittleEndian.Uint32(data[pos : pos+4])))
- }
- pos += 4
- continue
-
- case fieldTypeLongLong:
- if rows.rs.columns[i].flags&flagUnsigned != 0 {
- val := binary.LittleEndian.Uint64(data[pos : pos+8])
- if val > math.MaxInt64 {
- dest[i] = uint64ToString(val)
- } else {
- dest[i] = int64(val)
- }
- } else {
- dest[i] = int64(binary.LittleEndian.Uint64(data[pos : pos+8]))
- }
- pos += 8
- continue
-
- case fieldTypeFloat:
- dest[i] = math.Float32frombits(binary.LittleEndian.Uint32(data[pos : pos+4]))
- pos += 4
- continue
-
- case fieldTypeDouble:
- dest[i] = math.Float64frombits(binary.LittleEndian.Uint64(data[pos : pos+8]))
- pos += 8
- continue
-
- // Length coded Binary Strings
- case fieldTypeDecimal, fieldTypeNewDecimal, fieldTypeVarChar,
- fieldTypeBit, fieldTypeEnum, fieldTypeSet, fieldTypeTinyBLOB,
- fieldTypeMediumBLOB, fieldTypeLongBLOB, fieldTypeBLOB,
- fieldTypeVarString, fieldTypeString, fieldTypeGeometry, fieldTypeJSON:
- var isNull bool
- var n int
- dest[i], isNull, n, err = readLengthEncodedString(data[pos:])
- pos += n
- if err == nil {
- if !isNull {
- continue
- } else {
- dest[i] = nil
- continue
- }
- }
- return err
-
- case
- fieldTypeDate, fieldTypeNewDate, // Date YYYY-MM-DD
- fieldTypeTime, // Time [-][H]HH:MM:SS[.fractal]
- fieldTypeTimestamp, fieldTypeDateTime: // Timestamp YYYY-MM-DD HH:MM:SS[.fractal]
-
- num, isNull, n := readLengthEncodedInteger(data[pos:])
- pos += n
-
- switch {
- case isNull:
- dest[i] = nil
- continue
- case rows.rs.columns[i].fieldType == fieldTypeTime:
- // database/sql does not support an equivalent to TIME, return a string
- var dstlen uint8
- switch decimals := rows.rs.columns[i].decimals; decimals {
- case 0x00, 0x1f:
- dstlen = 8
- case 1, 2, 3, 4, 5, 6:
- dstlen = 8 + 1 + decimals
- default:
- return fmt.Errorf(
- "protocol error, illegal decimals value %d",
- rows.rs.columns[i].decimals,
- )
- }
- dest[i], err = formatBinaryTime(data[pos:pos+int(num)], dstlen)
- case rows.mc.parseTime:
- dest[i], err = parseBinaryDateTime(num, data[pos:], rows.mc.cfg.Loc)
- default:
- var dstlen uint8
- if rows.rs.columns[i].fieldType == fieldTypeDate {
- dstlen = 10
- } else {
- switch decimals := rows.rs.columns[i].decimals; decimals {
- case 0x00, 0x1f:
- dstlen = 19
- case 1, 2, 3, 4, 5, 6:
- dstlen = 19 + 1 + decimals
- default:
- return fmt.Errorf(
- "protocol error, illegal decimals value %d",
- rows.rs.columns[i].decimals,
- )
- }
- }
- dest[i], err = formatBinaryDateTime(data[pos:pos+int(num)], dstlen)
- }
-
- if err == nil {
- pos += int(num)
- continue
- } else {
- return err
- }
-
- // Please report if this happens!
- default:
- return fmt.Errorf("unknown field type %d", rows.rs.columns[i].fieldType)
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/result.go b/vendor/github.com/go-sql-driver/mysql/result.go
deleted file mode 100644
index c6438d034..000000000
--- a/vendor/github.com/go-sql-driver/mysql/result.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-type mysqlResult struct {
- affectedRows int64
- insertId int64
-}
-
-func (res *mysqlResult) LastInsertId() (int64, error) {
- return res.insertId, nil
-}
-
-func (res *mysqlResult) RowsAffected() (int64, error) {
- return res.affectedRows, nil
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/rows.go b/vendor/github.com/go-sql-driver/mysql/rows.go
deleted file mode 100644
index 888bdb5f0..000000000
--- a/vendor/github.com/go-sql-driver/mysql/rows.go
+++ /dev/null
@@ -1,223 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "database/sql/driver"
- "io"
- "math"
- "reflect"
-)
-
-type resultSet struct {
- columns []mysqlField
- columnNames []string
- done bool
-}
-
-type mysqlRows struct {
- mc *mysqlConn
- rs resultSet
- finish func()
-}
-
-type binaryRows struct {
- mysqlRows
-}
-
-type textRows struct {
- mysqlRows
-}
-
-func (rows *mysqlRows) Columns() []string {
- if rows.rs.columnNames != nil {
- return rows.rs.columnNames
- }
-
- columns := make([]string, len(rows.rs.columns))
- if rows.mc != nil && rows.mc.cfg.ColumnsWithAlias {
- for i := range columns {
- if tableName := rows.rs.columns[i].tableName; len(tableName) > 0 {
- columns[i] = tableName + "." + rows.rs.columns[i].name
- } else {
- columns[i] = rows.rs.columns[i].name
- }
- }
- } else {
- for i := range columns {
- columns[i] = rows.rs.columns[i].name
- }
- }
-
- rows.rs.columnNames = columns
- return columns
-}
-
-func (rows *mysqlRows) ColumnTypeDatabaseTypeName(i int) string {
- return rows.rs.columns[i].typeDatabaseName()
-}
-
-// func (rows *mysqlRows) ColumnTypeLength(i int) (length int64, ok bool) {
-// return int64(rows.rs.columns[i].length), true
-// }
-
-func (rows *mysqlRows) ColumnTypeNullable(i int) (nullable, ok bool) {
- return rows.rs.columns[i].flags&flagNotNULL == 0, true
-}
-
-func (rows *mysqlRows) ColumnTypePrecisionScale(i int) (int64, int64, bool) {
- column := rows.rs.columns[i]
- decimals := int64(column.decimals)
-
- switch column.fieldType {
- case fieldTypeDecimal, fieldTypeNewDecimal:
- if decimals > 0 {
- return int64(column.length) - 2, decimals, true
- }
- return int64(column.length) - 1, decimals, true
- case fieldTypeTimestamp, fieldTypeDateTime, fieldTypeTime:
- return decimals, decimals, true
- case fieldTypeFloat, fieldTypeDouble:
- if decimals == 0x1f {
- return math.MaxInt64, math.MaxInt64, true
- }
- return math.MaxInt64, decimals, true
- }
-
- return 0, 0, false
-}
-
-func (rows *mysqlRows) ColumnTypeScanType(i int) reflect.Type {
- return rows.rs.columns[i].scanType()
-}
-
-func (rows *mysqlRows) Close() (err error) {
- if f := rows.finish; f != nil {
- f()
- rows.finish = nil
- }
-
- mc := rows.mc
- if mc == nil {
- return nil
- }
- if err := mc.error(); err != nil {
- return err
- }
-
- // flip the buffer for this connection if we need to drain it.
- // note that for a successful query (i.e. one where rows.next()
- // has been called until it returns false), `rows.mc` will be nil
- // by the time the user calls `(*Rows).Close`, so we won't reach this
- // see: https://github.com/golang/go/commit/651ddbdb5056ded455f47f9c494c67b389622a47
- mc.buf.flip()
-
- // Remove unread packets from stream
- if !rows.rs.done {
- err = mc.readUntilEOF()
- }
- if err == nil {
- if err = mc.discardResults(); err != nil {
- return err
- }
- }
-
- rows.mc = nil
- return err
-}
-
-func (rows *mysqlRows) HasNextResultSet() (b bool) {
- if rows.mc == nil {
- return false
- }
- return rows.mc.status&statusMoreResultsExists != 0
-}
-
-func (rows *mysqlRows) nextResultSet() (int, error) {
- if rows.mc == nil {
- return 0, io.EOF
- }
- if err := rows.mc.error(); err != nil {
- return 0, err
- }
-
- // Remove unread packets from stream
- if !rows.rs.done {
- if err := rows.mc.readUntilEOF(); err != nil {
- return 0, err
- }
- rows.rs.done = true
- }
-
- if !rows.HasNextResultSet() {
- rows.mc = nil
- return 0, io.EOF
- }
- rows.rs = resultSet{}
- return rows.mc.readResultSetHeaderPacket()
-}
-
-func (rows *mysqlRows) nextNotEmptyResultSet() (int, error) {
- for {
- resLen, err := rows.nextResultSet()
- if err != nil {
- return 0, err
- }
-
- if resLen > 0 {
- return resLen, nil
- }
-
- rows.rs.done = true
- }
-}
-
-func (rows *binaryRows) NextResultSet() error {
- resLen, err := rows.nextNotEmptyResultSet()
- if err != nil {
- return err
- }
-
- rows.rs.columns, err = rows.mc.readColumns(resLen)
- return err
-}
-
-func (rows *binaryRows) Next(dest []driver.Value) error {
- if mc := rows.mc; mc != nil {
- if err := mc.error(); err != nil {
- return err
- }
-
- // Fetch next row from stream
- return rows.readRow(dest)
- }
- return io.EOF
-}
-
-func (rows *textRows) NextResultSet() (err error) {
- resLen, err := rows.nextNotEmptyResultSet()
- if err != nil {
- return err
- }
-
- rows.rs.columns, err = rows.mc.readColumns(resLen)
- return err
-}
-
-func (rows *textRows) Next(dest []driver.Value) error {
- if mc := rows.mc; mc != nil {
- if err := mc.error(); err != nil {
- return err
- }
-
- // Fetch next row from stream
- return rows.readRow(dest)
- }
- return io.EOF
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/statement.go b/vendor/github.com/go-sql-driver/mysql/statement.go
deleted file mode 100644
index f7e370939..000000000
--- a/vendor/github.com/go-sql-driver/mysql/statement.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "database/sql/driver"
- "fmt"
- "io"
- "reflect"
-)
-
-type mysqlStmt struct {
- mc *mysqlConn
- id uint32
- paramCount int
-}
-
-func (stmt *mysqlStmt) Close() error {
- if stmt.mc == nil || stmt.mc.closed.IsSet() {
- // driver.Stmt.Close can be called more than once, thus this function
- // has to be idempotent.
- // See also Issue #450 and golang/go#16019.
- //errLog.Print(ErrInvalidConn)
- return driver.ErrBadConn
- }
-
- err := stmt.mc.writeCommandPacketUint32(comStmtClose, stmt.id)
- stmt.mc = nil
- return err
-}
-
-func (stmt *mysqlStmt) NumInput() int {
- return stmt.paramCount
-}
-
-func (stmt *mysqlStmt) ColumnConverter(idx int) driver.ValueConverter {
- return converter{}
-}
-
-func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
- if stmt.mc.closed.IsSet() {
- errLog.Print(ErrInvalidConn)
- return nil, driver.ErrBadConn
- }
- // Send command
- err := stmt.writeExecutePacket(args)
- if err != nil {
- return nil, stmt.mc.markBadConn(err)
- }
-
- mc := stmt.mc
-
- mc.affectedRows = 0
- mc.insertId = 0
-
- // Read Result
- resLen, err := mc.readResultSetHeaderPacket()
- if err != nil {
- return nil, err
- }
-
- if resLen > 0 {
- // Columns
- if err = mc.readUntilEOF(); err != nil {
- return nil, err
- }
-
- // Rows
- if err := mc.readUntilEOF(); err != nil {
- return nil, err
- }
- }
-
- if err := mc.discardResults(); err != nil {
- return nil, err
- }
-
- return &mysqlResult{
- affectedRows: int64(mc.affectedRows),
- insertId: int64(mc.insertId),
- }, nil
-}
-
-func (stmt *mysqlStmt) Query(args []driver.Value) (driver.Rows, error) {
- return stmt.query(args)
-}
-
-func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
- if stmt.mc.closed.IsSet() {
- errLog.Print(ErrInvalidConn)
- return nil, driver.ErrBadConn
- }
- // Send command
- err := stmt.writeExecutePacket(args)
- if err != nil {
- return nil, stmt.mc.markBadConn(err)
- }
-
- mc := stmt.mc
-
- // Read Result
- resLen, err := mc.readResultSetHeaderPacket()
- if err != nil {
- return nil, err
- }
-
- rows := new(binaryRows)
-
- if resLen > 0 {
- rows.mc = mc
- rows.rs.columns, err = mc.readColumns(resLen)
- } else {
- rows.rs.done = true
-
- switch err := rows.NextResultSet(); err {
- case nil, io.EOF:
- return rows, nil
- default:
- return nil, err
- }
- }
-
- return rows, err
-}
-
-type converter struct{}
-
-// ConvertValue mirrors the reference/default converter in database/sql/driver
-// with _one_ exception. We support uint64 with their high bit and the default
-// implementation does not. This function should be kept in sync with
-// database/sql/driver defaultConverter.ConvertValue() except for that
-// deliberate difference.
-func (c converter) ConvertValue(v interface{}) (driver.Value, error) {
- if driver.IsValue(v) {
- return v, nil
- }
-
- if vr, ok := v.(driver.Valuer); ok {
- sv, err := callValuerValue(vr)
- if err != nil {
- return nil, err
- }
- if !driver.IsValue(sv) {
- return nil, fmt.Errorf("non-Value type %T returned from Value", sv)
- }
- return sv, nil
- }
-
- rv := reflect.ValueOf(v)
- switch rv.Kind() {
- case reflect.Ptr:
- // indirect pointers
- if rv.IsNil() {
- return nil, nil
- } else {
- return c.ConvertValue(rv.Elem().Interface())
- }
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return rv.Int(), nil
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- return rv.Uint(), nil
- case reflect.Float32, reflect.Float64:
- return rv.Float(), nil
- case reflect.Bool:
- return rv.Bool(), nil
- case reflect.Slice:
- ek := rv.Type().Elem().Kind()
- if ek == reflect.Uint8 {
- return rv.Bytes(), nil
- }
- return nil, fmt.Errorf("unsupported type %T, a slice of %s", v, ek)
- case reflect.String:
- return rv.String(), nil
- }
- return nil, fmt.Errorf("unsupported type %T, a %s", v, rv.Kind())
-}
-
-var valuerReflectType = reflect.TypeOf((*driver.Valuer)(nil)).Elem()
-
-// callValuerValue returns vr.Value(), with one exception:
-// If vr.Value is an auto-generated method on a pointer type and the
-// pointer is nil, it would panic at runtime in the panicwrap
-// method. Treat it like nil instead.
-//
-// This is so people can implement driver.Value on value types and
-// still use nil pointers to those types to mean nil/NULL, just like
-// string/*string.
-//
-// This is an exact copy of the same-named unexported function from the
-// database/sql package.
-func callValuerValue(vr driver.Valuer) (v driver.Value, err error) {
- if rv := reflect.ValueOf(vr); rv.Kind() == reflect.Ptr &&
- rv.IsNil() &&
- rv.Type().Elem().Implements(valuerReflectType) {
- return nil, nil
- }
- return vr.Value()
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/transaction.go b/vendor/github.com/go-sql-driver/mysql/transaction.go
deleted file mode 100644
index 417d72793..000000000
--- a/vendor/github.com/go-sql-driver/mysql/transaction.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-type mysqlTx struct {
- mc *mysqlConn
-}
-
-func (tx *mysqlTx) Commit() (err error) {
- if tx.mc == nil || tx.mc.closed.IsSet() {
- return ErrInvalidConn
- }
- err = tx.mc.exec("COMMIT")
- tx.mc = nil
- return
-}
-
-func (tx *mysqlTx) Rollback() (err error) {
- if tx.mc == nil || tx.mc.closed.IsSet() {
- return ErrInvalidConn
- }
- err = tx.mc.exec("ROLLBACK")
- tx.mc = nil
- return
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/utils.go b/vendor/github.com/go-sql-driver/mysql/utils.go
deleted file mode 100644
index 9552e80b5..000000000
--- a/vendor/github.com/go-sql-driver/mysql/utils.go
+++ /dev/null
@@ -1,701 +0,0 @@
-// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
-//
-// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this file,
-// You can obtain one at http://mozilla.org/MPL/2.0/.
-
-package mysql
-
-import (
- "crypto/tls"
- "database/sql"
- "database/sql/driver"
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "time"
-)
-
-// Registry for custom tls.Configs
-var (
- tlsConfigLock sync.RWMutex
- tlsConfigRegistry map[string]*tls.Config
-)
-
-// RegisterTLSConfig registers a custom tls.Config to be used with sql.Open.
-// Use the key as a value in the DSN where tls=value.
-//
-// Note: The provided tls.Config is exclusively owned by the driver after
-// registering it.
-//
-// rootCertPool := x509.NewCertPool()
-// pem, err := ioutil.ReadFile("/path/ca-cert.pem")
-// if err != nil {
-// log.Fatal(err)
-// }
-// if ok := rootCertPool.AppendCertsFromPEM(pem); !ok {
-// log.Fatal("Failed to append PEM.")
-// }
-// clientCert := make([]tls.Certificate, 0, 1)
-// certs, err := tls.LoadX509KeyPair("/path/client-cert.pem", "/path/client-key.pem")
-// if err != nil {
-// log.Fatal(err)
-// }
-// clientCert = append(clientCert, certs)
-// mysql.RegisterTLSConfig("custom", &tls.Config{
-// RootCAs: rootCertPool,
-// Certificates: clientCert,
-// })
-// db, err := sql.Open("mysql", "user@tcp(localhost:3306)/test?tls=custom")
-//
-func RegisterTLSConfig(key string, config *tls.Config) error {
- if _, isBool := readBool(key); isBool || strings.ToLower(key) == "skip-verify" || strings.ToLower(key) == "preferred" {
- return fmt.Errorf("key '%s' is reserved", key)
- }
-
- tlsConfigLock.Lock()
- if tlsConfigRegistry == nil {
- tlsConfigRegistry = make(map[string]*tls.Config)
- }
-
- tlsConfigRegistry[key] = config
- tlsConfigLock.Unlock()
- return nil
-}
-
-// DeregisterTLSConfig removes the tls.Config associated with key.
-func DeregisterTLSConfig(key string) {
- tlsConfigLock.Lock()
- if tlsConfigRegistry != nil {
- delete(tlsConfigRegistry, key)
- }
- tlsConfigLock.Unlock()
-}
-
-func getTLSConfigClone(key string) (config *tls.Config) {
- tlsConfigLock.RLock()
- if v, ok := tlsConfigRegistry[key]; ok {
- config = v.Clone()
- }
- tlsConfigLock.RUnlock()
- return
-}
-
-// Returns the bool value of the input.
-// The 2nd return value indicates if the input was a valid bool value
-func readBool(input string) (value bool, valid bool) {
- switch input {
- case "1", "true", "TRUE", "True":
- return true, true
- case "0", "false", "FALSE", "False":
- return false, true
- }
-
- // Not a valid bool value
- return
-}
-
-/******************************************************************************
-* Time related utils *
-******************************************************************************/
-
-func parseDateTime(str string, loc *time.Location) (t time.Time, err error) {
- base := "0000-00-00 00:00:00.0000000"
- switch len(str) {
- case 10, 19, 21, 22, 23, 24, 25, 26: // up to "YYYY-MM-DD HH:MM:SS.MMMMMM"
- if str == base[:len(str)] {
- return
- }
- t, err = time.Parse(timeFormat[:len(str)], str)
- default:
- err = fmt.Errorf("invalid time string: %s", str)
- return
- }
-
- // Adjust location
- if err == nil && loc != time.UTC {
- y, mo, d := t.Date()
- h, mi, s := t.Clock()
- t, err = time.Date(y, mo, d, h, mi, s, t.Nanosecond(), loc), nil
- }
-
- return
-}
-
-func parseBinaryDateTime(num uint64, data []byte, loc *time.Location) (driver.Value, error) {
- switch num {
- case 0:
- return time.Time{}, nil
- case 4:
- return time.Date(
- int(binary.LittleEndian.Uint16(data[:2])), // year
- time.Month(data[2]), // month
- int(data[3]), // day
- 0, 0, 0, 0,
- loc,
- ), nil
- case 7:
- return time.Date(
- int(binary.LittleEndian.Uint16(data[:2])), // year
- time.Month(data[2]), // month
- int(data[3]), // day
- int(data[4]), // hour
- int(data[5]), // minutes
- int(data[6]), // seconds
- 0,
- loc,
- ), nil
- case 11:
- return time.Date(
- int(binary.LittleEndian.Uint16(data[:2])), // year
- time.Month(data[2]), // month
- int(data[3]), // day
- int(data[4]), // hour
- int(data[5]), // minutes
- int(data[6]), // seconds
- int(binary.LittleEndian.Uint32(data[7:11]))*1000, // nanoseconds
- loc,
- ), nil
- }
- return nil, fmt.Errorf("invalid DATETIME packet length %d", num)
-}
-
-// zeroDateTime is used in formatBinaryDateTime to avoid an allocation
-// if the DATE or DATETIME has the zero value.
-// It must never be changed.
-// The current behavior depends on database/sql copying the result.
-var zeroDateTime = []byte("0000-00-00 00:00:00.000000")
-
-const digits01 = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"
-const digits10 = "0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999"
-
-func appendMicrosecs(dst, src []byte, decimals int) []byte {
- if decimals <= 0 {
- return dst
- }
- if len(src) == 0 {
- return append(dst, ".000000"[:decimals+1]...)
- }
-
- microsecs := binary.LittleEndian.Uint32(src[:4])
- p1 := byte(microsecs / 10000)
- microsecs -= 10000 * uint32(p1)
- p2 := byte(microsecs / 100)
- microsecs -= 100 * uint32(p2)
- p3 := byte(microsecs)
-
- switch decimals {
- default:
- return append(dst, '.',
- digits10[p1], digits01[p1],
- digits10[p2], digits01[p2],
- digits10[p3], digits01[p3],
- )
- case 1:
- return append(dst, '.',
- digits10[p1],
- )
- case 2:
- return append(dst, '.',
- digits10[p1], digits01[p1],
- )
- case 3:
- return append(dst, '.',
- digits10[p1], digits01[p1],
- digits10[p2],
- )
- case 4:
- return append(dst, '.',
- digits10[p1], digits01[p1],
- digits10[p2], digits01[p2],
- )
- case 5:
- return append(dst, '.',
- digits10[p1], digits01[p1],
- digits10[p2], digits01[p2],
- digits10[p3],
- )
- }
-}
-
-func formatBinaryDateTime(src []byte, length uint8) (driver.Value, error) {
- // length expects the deterministic length of the zero value,
- // negative time and 100+ hours are automatically added if needed
- if len(src) == 0 {
- return zeroDateTime[:length], nil
- }
- var dst []byte // return value
- var p1, p2, p3 byte // current digit pair
-
- switch length {
- case 10, 19, 21, 22, 23, 24, 25, 26:
- default:
- t := "DATE"
- if length > 10 {
- t += "TIME"
- }
- return nil, fmt.Errorf("illegal %s length %d", t, length)
- }
- switch len(src) {
- case 4, 7, 11:
- default:
- t := "DATE"
- if length > 10 {
- t += "TIME"
- }
- return nil, fmt.Errorf("illegal %s packet length %d", t, len(src))
- }
- dst = make([]byte, 0, length)
- // start with the date
- year := binary.LittleEndian.Uint16(src[:2])
- pt := year / 100
- p1 = byte(year - 100*uint16(pt))
- p2, p3 = src[2], src[3]
- dst = append(dst,
- digits10[pt], digits01[pt],
- digits10[p1], digits01[p1], '-',
- digits10[p2], digits01[p2], '-',
- digits10[p3], digits01[p3],
- )
- if length == 10 {
- return dst, nil
- }
- if len(src) == 4 {
- return append(dst, zeroDateTime[10:length]...), nil
- }
- dst = append(dst, ' ')
- p1 = src[4] // hour
- src = src[5:]
-
- // p1 is 2-digit hour, src is after hour
- p2, p3 = src[0], src[1]
- dst = append(dst,
- digits10[p1], digits01[p1], ':',
- digits10[p2], digits01[p2], ':',
- digits10[p3], digits01[p3],
- )
- return appendMicrosecs(dst, src[2:], int(length)-20), nil
-}
-
-func formatBinaryTime(src []byte, length uint8) (driver.Value, error) {
- // length expects the deterministic length of the zero value,
- // negative time and 100+ hours are automatically added if needed
- if len(src) == 0 {
- return zeroDateTime[11 : 11+length], nil
- }
- var dst []byte // return value
-
- switch length {
- case
- 8, // time (can be up to 10 when negative and 100+ hours)
- 10, 11, 12, 13, 14, 15: // time with fractional seconds
- default:
- return nil, fmt.Errorf("illegal TIME length %d", length)
- }
- switch len(src) {
- case 8, 12:
- default:
- return nil, fmt.Errorf("invalid TIME packet length %d", len(src))
- }
- // +2 to enable negative time and 100+ hours
- dst = make([]byte, 0, length+2)
- if src[0] == 1 {
- dst = append(dst, '-')
- }
- days := binary.LittleEndian.Uint32(src[1:5])
- hours := int64(days)*24 + int64(src[5])
-
- if hours >= 100 {
- dst = strconv.AppendInt(dst, hours, 10)
- } else {
- dst = append(dst, digits10[hours], digits01[hours])
- }
-
- min, sec := src[6], src[7]
- dst = append(dst, ':',
- digits10[min], digits01[min], ':',
- digits10[sec], digits01[sec],
- )
- return appendMicrosecs(dst, src[8:], int(length)-9), nil
-}
-
-/******************************************************************************
-* Convert from and to bytes *
-******************************************************************************/
-
-func uint64ToBytes(n uint64) []byte {
- return []byte{
- byte(n),
- byte(n >> 8),
- byte(n >> 16),
- byte(n >> 24),
- byte(n >> 32),
- byte(n >> 40),
- byte(n >> 48),
- byte(n >> 56),
- }
-}
-
-func uint64ToString(n uint64) []byte {
- var a [20]byte
- i := 20
-
- // U+0030 = 0
- // ...
- // U+0039 = 9
-
- var q uint64
- for n >= 10 {
- i--
- q = n / 10
- a[i] = uint8(n-q*10) + 0x30
- n = q
- }
-
- i--
- a[i] = uint8(n) + 0x30
-
- return a[i:]
-}
-
-// treats string value as unsigned integer representation
-func stringToInt(b []byte) int {
- val := 0
- for i := range b {
- val *= 10
- val += int(b[i] - 0x30)
- }
- return val
-}
-
-// returns the string read as a bytes slice, wheter the value is NULL,
-// the number of bytes read and an error, in case the string is longer than
-// the input slice
-func readLengthEncodedString(b []byte) ([]byte, bool, int, error) {
- // Get length
- num, isNull, n := readLengthEncodedInteger(b)
- if num < 1 {
- return b[n:n], isNull, n, nil
- }
-
- n += int(num)
-
- // Check data length
- if len(b) >= n {
- return b[n-int(num) : n : n], false, n, nil
- }
- return nil, false, n, io.EOF
-}
-
-// returns the number of bytes skipped and an error, in case the string is
-// longer than the input slice
-func skipLengthEncodedString(b []byte) (int, error) {
- // Get length
- num, _, n := readLengthEncodedInteger(b)
- if num < 1 {
- return n, nil
- }
-
- n += int(num)
-
- // Check data length
- if len(b) >= n {
- return n, nil
- }
- return n, io.EOF
-}
-
-// returns the number read, whether the value is NULL and the number of bytes read
-func readLengthEncodedInteger(b []byte) (uint64, bool, int) {
- // See issue #349
- if len(b) == 0 {
- return 0, true, 1
- }
-
- switch b[0] {
- // 251: NULL
- case 0xfb:
- return 0, true, 1
-
- // 252: value of following 2
- case 0xfc:
- return uint64(b[1]) | uint64(b[2])<<8, false, 3
-
- // 253: value of following 3
- case 0xfd:
- return uint64(b[1]) | uint64(b[2])<<8 | uint64(b[3])<<16, false, 4
-
- // 254: value of following 8
- case 0xfe:
- return uint64(b[1]) | uint64(b[2])<<8 | uint64(b[3])<<16 |
- uint64(b[4])<<24 | uint64(b[5])<<32 | uint64(b[6])<<40 |
- uint64(b[7])<<48 | uint64(b[8])<<56,
- false, 9
- }
-
- // 0-250: value of first byte
- return uint64(b[0]), false, 1
-}
-
-// encodes a uint64 value and appends it to the given bytes slice
-func appendLengthEncodedInteger(b []byte, n uint64) []byte {
- switch {
- case n <= 250:
- return append(b, byte(n))
-
- case n <= 0xffff:
- return append(b, 0xfc, byte(n), byte(n>>8))
-
- case n <= 0xffffff:
- return append(b, 0xfd, byte(n), byte(n>>8), byte(n>>16))
- }
- return append(b, 0xfe, byte(n), byte(n>>8), byte(n>>16), byte(n>>24),
- byte(n>>32), byte(n>>40), byte(n>>48), byte(n>>56))
-}
-
-// reserveBuffer checks cap(buf) and expand buffer to len(buf) + appendSize.
-// If cap(buf) is not enough, reallocate new buffer.
-func reserveBuffer(buf []byte, appendSize int) []byte {
- newSize := len(buf) + appendSize
- if cap(buf) < newSize {
- // Grow buffer exponentially
- newBuf := make([]byte, len(buf)*2+appendSize)
- copy(newBuf, buf)
- buf = newBuf
- }
- return buf[:newSize]
-}
-
-// escapeBytesBackslash escapes []byte with backslashes (\)
-// This escapes the contents of a string (provided as []byte) by adding backslashes before special
-// characters, and turning others into specific escape sequences, such as
-// turning newlines into \n and null bytes into \0.
-// https://github.com/mysql/mysql-server/blob/mysql-5.7.5/mysys/charset.c#L823-L932
-func escapeBytesBackslash(buf, v []byte) []byte {
- pos := len(buf)
- buf = reserveBuffer(buf, len(v)*2)
-
- for _, c := range v {
- switch c {
- case '\x00':
- buf[pos] = '\\'
- buf[pos+1] = '0'
- pos += 2
- case '\n':
- buf[pos] = '\\'
- buf[pos+1] = 'n'
- pos += 2
- case '\r':
- buf[pos] = '\\'
- buf[pos+1] = 'r'
- pos += 2
- case '\x1a':
- buf[pos] = '\\'
- buf[pos+1] = 'Z'
- pos += 2
- case '\'':
- buf[pos] = '\\'
- buf[pos+1] = '\''
- pos += 2
- case '"':
- buf[pos] = '\\'
- buf[pos+1] = '"'
- pos += 2
- case '\\':
- buf[pos] = '\\'
- buf[pos+1] = '\\'
- pos += 2
- default:
- buf[pos] = c
- pos++
- }
- }
-
- return buf[:pos]
-}
-
-// escapeStringBackslash is similar to escapeBytesBackslash but for string.
-func escapeStringBackslash(buf []byte, v string) []byte {
- pos := len(buf)
- buf = reserveBuffer(buf, len(v)*2)
-
- for i := 0; i < len(v); i++ {
- c := v[i]
- switch c {
- case '\x00':
- buf[pos] = '\\'
- buf[pos+1] = '0'
- pos += 2
- case '\n':
- buf[pos] = '\\'
- buf[pos+1] = 'n'
- pos += 2
- case '\r':
- buf[pos] = '\\'
- buf[pos+1] = 'r'
- pos += 2
- case '\x1a':
- buf[pos] = '\\'
- buf[pos+1] = 'Z'
- pos += 2
- case '\'':
- buf[pos] = '\\'
- buf[pos+1] = '\''
- pos += 2
- case '"':
- buf[pos] = '\\'
- buf[pos+1] = '"'
- pos += 2
- case '\\':
- buf[pos] = '\\'
- buf[pos+1] = '\\'
- pos += 2
- default:
- buf[pos] = c
- pos++
- }
- }
-
- return buf[:pos]
-}
-
-// escapeBytesQuotes escapes apostrophes in []byte by doubling them up.
-// This escapes the contents of a string by doubling up any apostrophes that
-// it contains. This is used when the NO_BACKSLASH_ESCAPES SQL_MODE is in
-// effect on the server.
-// https://github.com/mysql/mysql-server/blob/mysql-5.7.5/mysys/charset.c#L963-L1038
-func escapeBytesQuotes(buf, v []byte) []byte {
- pos := len(buf)
- buf = reserveBuffer(buf, len(v)*2)
-
- for _, c := range v {
- if c == '\'' {
- buf[pos] = '\''
- buf[pos+1] = '\''
- pos += 2
- } else {
- buf[pos] = c
- pos++
- }
- }
-
- return buf[:pos]
-}
-
-// escapeStringQuotes is similar to escapeBytesQuotes but for string.
-func escapeStringQuotes(buf []byte, v string) []byte {
- pos := len(buf)
- buf = reserveBuffer(buf, len(v)*2)
-
- for i := 0; i < len(v); i++ {
- c := v[i]
- if c == '\'' {
- buf[pos] = '\''
- buf[pos+1] = '\''
- pos += 2
- } else {
- buf[pos] = c
- pos++
- }
- }
-
- return buf[:pos]
-}
-
-/******************************************************************************
-* Sync utils *
-******************************************************************************/
-
-// noCopy may be embedded into structs which must not be copied
-// after the first use.
-//
-// See https://github.com/golang/go/issues/8005#issuecomment-190753527
-// for details.
-type noCopy struct{}
-
-// Lock is a no-op used by -copylocks checker from `go vet`.
-func (*noCopy) Lock() {}
-
-// atomicBool is a wrapper around uint32 for usage as a boolean value with
-// atomic access.
-type atomicBool struct {
- _noCopy noCopy
- value uint32
-}
-
-// IsSet returns whether the current boolean value is true
-func (ab *atomicBool) IsSet() bool {
- return atomic.LoadUint32(&ab.value) > 0
-}
-
-// Set sets the value of the bool regardless of the previous value
-func (ab *atomicBool) Set(value bool) {
- if value {
- atomic.StoreUint32(&ab.value, 1)
- } else {
- atomic.StoreUint32(&ab.value, 0)
- }
-}
-
-// TrySet sets the value of the bool and returns whether the value changed
-func (ab *atomicBool) TrySet(value bool) bool {
- if value {
- return atomic.SwapUint32(&ab.value, 1) == 0
- }
- return atomic.SwapUint32(&ab.value, 0) > 0
-}
-
-// atomicError is a wrapper for atomically accessed error values
-type atomicError struct {
- _noCopy noCopy
- value atomic.Value
-}
-
-// Set sets the error value regardless of the previous value.
-// The value must not be nil
-func (ae *atomicError) Set(value error) {
- ae.value.Store(value)
-}
-
-// Value returns the current error value
-func (ae *atomicError) Value() error {
- if v := ae.value.Load(); v != nil {
- // this will panic if the value doesn't implement the error interface
- return v.(error)
- }
- return nil
-}
-
-func namedValueToValue(named []driver.NamedValue) ([]driver.Value, error) {
- dargs := make([]driver.Value, len(named))
- for n, param := range named {
- if len(param.Name) > 0 {
- // TODO: support the use of Named Parameters #561
- return nil, errors.New("mysql: driver does not support the use of Named Parameters")
- }
- dargs[n] = param.Value
- }
- return dargs, nil
-}
-
-func mapIsolationLevel(level driver.IsolationLevel) (string, error) {
- switch sql.IsolationLevel(level) {
- case sql.LevelRepeatableRead:
- return "REPEATABLE READ", nil
- case sql.LevelReadCommitted:
- return "READ COMMITTED", nil
- case sql.LevelReadUncommitted:
- return "READ UNCOMMITTED", nil
- case sql.LevelSerializable:
- return "SERIALIZABLE", nil
- default:
- return "", fmt.Errorf("mysql: unsupported isolation level: %v", level)
- }
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/.editorconfig b/vendor/github.com/go-testfixtures/testfixtures/v3/.editorconfig
deleted file mode 100644
index 05f44c750..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/.editorconfig
+++ /dev/null
@@ -1,15 +0,0 @@
-# http://editorconfig.org/
-
-root = true
-
-[*]
-end_of_line = lf
-insert_final_newline = true
-charset = utf-8
-trim_trailing_whitespace = true
-indent_style = tab
-indent_size = 8
-
-[*.{yml,md}]
-indent_style = space
-indent_size = 2
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/.gitattributes b/vendor/github.com/go-testfixtures/testfixtures/v3/.gitattributes
deleted file mode 100644
index fcadb2cf9..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* text eol=lf
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/.gitignore b/vendor/github.com/go-testfixtures/testfixtures/v3/.gitignore
deleted file mode 100644
index 8772d9ba0..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/.gitignore
+++ /dev/null
@@ -1,29 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
-
-*.sqlite3
-.env
-/testfixtures
-/dist
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/.goreleaser.yml b/vendor/github.com/go-testfixtures/testfixtures/v3/.goreleaser.yml
deleted file mode 100644
index cab247177..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/.goreleaser.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-build:
- binary: testfixtures
- main: ./cmd/testfixtures
- goos:
- - windows
- - darwin
- - linux
- goarch:
- - 386
- - amd64
- ignore:
- - goos: darwin
- goarch: 386
- flags:
- - -tags=sqlite
-
-archives:
- - name_template: "{{.Binary}}_{{.Os}}_{{.Arch}}"
- format_overrides:
- - goos: windows
- format: zip
-
-release:
- draft: true
-
-snapshot:
- name_template: "{{.Tag}}"
-
-checksum:
- name_template: "testfixtures_checksums.txt"
-
-nfpms:
- - vendor: testfixtures
- homepage: https://github.com/go-testfixtures/testfixtures
- maintainer: Andrey Nering
- description: Ruby on Rails like test fixtures for Go.
- license: MIT
- formats:
- - deb
- - rpm
- file_name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/.sample.env b/vendor/github.com/go-testfixtures/testfixtures/v3/.sample.env
deleted file mode 100644
index fcc7cd0c7..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/.sample.env
+++ /dev/null
@@ -1,4 +0,0 @@
-PG_CONN_STRING="user=postgres dbname=testfixtures_test sslmode=disable"
-MYSQL_CONN_STRING="root:@/testfixtures_test?multiStatements=true"
-SQLITE_CONN_STRING="testdb.sqlite3"
-SQLSERVER_CONN_STRING="server=localhost\SQLExpress;database=testfixtures_test;user id=sa;password=sqlserver;encrypt=disable"
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/CHANGELOG.md b/vendor/github.com/go-testfixtures/testfixtures/v3/CHANGELOG.md
deleted file mode 100644
index 53920ff3a..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/CHANGELOG.md
+++ /dev/null
@@ -1,105 +0,0 @@
-# Changelog
-
-## v3.3.0 - 2020-06-27
-
-- Add support for the [github.com/jackc/pgx](https://github.com/jackc/pgx)
- PostgreSQL driver
- ([#71](https://github.com/go-testfixtures/testfixtures/issues/71), [#74](https://github.com/go-testfixtures/testfixtures/pull/74)).
-- Fix bug where some tables were empty due to `ON DELETE CASCADE`
- ([#67](https://github.com/go-testfixtures/testfixtures/issues/67), [#70](https://github.com/go-testfixtures/testfixtures/pull/70)).
-- Fix SQLite version
- ([#73](https://github.com/go-testfixtures/testfixtures/pull/73)).
-- On MySQL, return a clearer error message when a table doesn't exist
- ([#69](https://github.com/go-testfixtures/testfixtures/pull/69)).
-
-## v3.2.0 - 2020-05-10
-
-- Add support for loading multiple files and directories
- ([#65](https://github.com/go-testfixtures/testfixtures/pull/65)).
-
-## v3.1.2 - 2020-04-26
-
-- Dump: Fix column order in generated YAML files
- ([#62](https://github.com/go-testfixtures/testfixtures/pull/62)).
-
-## v3.1.1 - 2020-01-11
-
-- testfixtures now work with both `mssql` and `sqlserver` drivers.
- Note that [the `mssql` one is deprecated](https://github.com/denisenkom/go-mssqldb#deprecated),
- though. So try to migrate to `sqlserver` once possible.
-
-## v3.1.0 - 2020-01-09
-
-- Using `sqlserver` driver instead of the deprecated `mssql`
- ([#58](https://github.com/go-testfixtures/testfixtures/pull/58)).
-
-## v3.0.0 - 2019-12-26
-
-### Breaking changes
-
-- The import path changed from `gopkg.in/testfixtures.v2` to
- `github.com/go-testfixtures/testfixtures/v3`.
-- This package no longer support Oracle databases. This decision was
- taken because too few people actually used this package with Oracle and it
- was the most difficult to test (we didn't run on CI due the lack of an
- official Docker image, etc).
-- The public API was totally rewritten to be more flexible and ideomatic.
- It now uses functional options. It differs from v2, but should be easy
- enough to upgrade.
-- Some deprecated APIs from v2 were removed as well.
-- This now requires Go >= 1.13.
-
-### New features
-
-- We now have a CLI so you can easily use testfixtures to load a sample
- database from fixtures if you want.
-- Templating via [text/template](https://golang.org/pkg/text/template/)
- is now available. This allows some fancier use cases like generating data
- or specific columns dynamically.
-- It's now possible to choose which time zone to use when parsing timestamps
- from fixtures. The default is the same as before, whatever is set on
- `time.Local`.
-- Errors now use the new `%w` verb only available on Go >= 1.13.
-
-### MISC
-
-- Travis and AppVeyor are gone. We're using GitHub Actions exclusively now.
- The whole suite is ran inside Docker (with help of Docker Compose), so it's
- easy to run tests locally as well.
-
-Check the new README for some examples!
-
-## v2.6.0 - 2019-10-24
-
-- Add support for TimescaleDB
- ([#53](https://github.com/go-testfixtures/testfixtures/pull/53)).
-
-## v2.5.3 - 2018-12-15
-
-- Fixes related to use of foreign key pragmas on MySQL (#43).
-
-## v2.5.2 - 2018-11-25
-
-- This library now supports [Go Modules](https://github.com/golang/go/wiki/Modules);
-- Also allow `.yaml` (as an alternative to `.yml`) as the file extension (#42).
-
-## v2.5.1 - 2018-11-04
-
-- Allowing disabling reset of PostgreSQL sequences (#38).
-
-## v2.5.0 - 2018-09-07
-
-- Add public function DetectTestDatabase (#35, #36).
-
-## v2.4.5 - 2018-07-07
-
-- Fix for MySQL/MariaDB: ignoring views on operations that should be run only on tables (#33).
-
-## v2.4.4 - 2018-07-02
-
-- Fix for multiple schemas on Microsoft SQL Server (#29 and #30);
-- Configuring AppVeyor CI to also test for Microsoft SQL Server.
-
----
-
-Sorry, we don't have changelog for older releases 😢.
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/Dockerfile b/vendor/github.com/go-testfixtures/testfixtures/v3/Dockerfile
deleted file mode 100644
index e33dafb07..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/Dockerfile
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM golang:1.14-alpine
-
-RUN apk update
-RUN apk add alpine-sdk
-
-WORKDIR /testfixtures
-COPY . .
-
-RUN go mod download
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/LICENSE b/vendor/github.com/go-testfixtures/testfixtures/v3/LICENSE
deleted file mode 100644
index 894ee77ed..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Andrey Nering
-
-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-testfixtures/testfixtures/v3/README.md b/vendor/github.com/go-testfixtures/testfixtures/v3/README.md
deleted file mode 100644
index 56ca8aa45..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/README.md
+++ /dev/null
@@ -1,483 +0,0 @@
-# testfixtures
-
-[][doc]
-
-> ***Warning***: this package will wipe the database data before loading the
-fixtures! It is supposed to be used on a test database. Please, double check
-if you are running it against the correct database.
-
-> **TIP**: There are options not described in this README page. It's
-> recommended that you also check [the documentation][doc].
-
-Writing tests is hard, even more when you have to deal with an SQL database.
-This package aims to make writing functional tests for web apps written in
-Go easier.
-
-Basically this package mimics the ["Ruby on Rails' way"][railstests] of writing tests
-for database applications, where sample data is kept in fixtures files. Before
-the execution of every test, the test database is cleaned and the fixture data
-is loaded into the database.
-
-The idea is running tests against a real database, instead of relying in mocks,
-which is boring to setup and may lead to production bugs not being caught in
-the tests.
-
-## Installation
-
-First, import it like this:
-
-```go
-import (
- "github.com/go-testfixtures/testfixtures/v3"
-)
-```
-
-## Usage
-
-Create a folder for the fixture files. Each file should contain data for a
-single table and have the name `.yml`:
-
-```
-myapp/
- myapp.go
- myapp_test.go
- ...
- fixtures/
- posts.yml
- comments.yml
- tags.yml
- posts_tags.yml
- ...
-```
-
-The file would look like this (it can have as many record you want):
-
-```yml
-# comments.yml
-- id: 1
- post_id: 1
- content: A comment...
- author_name: John Doe
- author_email: john@doe.com
- created_at: 2020-12-31 23:59:59
- updated_at: 2020-12-31 23:59:59
-
-- id: 2
- post_id: 2
- content: Another comment...
- author_name: John Doe
- author_email: john@doe.com
- created_at: 2020-12-31 23:59:59
- updated_at: 2020-12-31 23:59:59
-
-# ...
-```
-
-An YAML object or array will be converted to JSON. It will be stored on a native
-JSON type like JSONB on PostgreSQL or as a TEXT or VARCHAR column on other
-databases.
-
-```yml
-- id: 1
- post_attributes:
- author: John Due
- author_email: john@due.com
- title: "..."
- tags:
- - programming
- - go
- - testing
- post: "..."
-```
-
-If you need to write raw SQL, probably to call a function, prefix the value
-of the column with `RAW=`:
-
-```yml
-- id: 1
- uuid_column: RAW=uuid_generate_v4()
- postgis_type_column: RAW=ST_GeomFromText('params...')
- created_at: RAW=NOW()
- updated_at: RAW=NOW()
-```
-
-Your tests would look like this:
-
-```go
-package myapp
-
-import (
- "database/sql"
-
- _ "github.com/lib/pq"
- "github.com/go-testfixtures/testfixtures/v3"
-)
-
-var (
- db *sql.DB
- fixtures *testfixtures.Loader
-)
-
-func TestMain(m *testing.M) {
- var err error
-
- // Open connection to the test database.
- // Do NOT import fixtures in a production database!
- // Existing data would be deleted.
- db, err = sql.Open("postgres", "dbname=myapp_test")
- if err != nil {
- ...
- }
-
- fixtures, err := testfixtures.New(
- testfixtures.Database(db), // You database connection
- testfixtures.Dialect("postgres"), // Available: "postgresql", "timescaledb", "mysql", "mariadb", "sqlite" and "sqlserver"
- testfixtures.Directory("testdata/fixtures"), // the directory containing the YAML files
- )
- if err != nil {
- ...
- }
-
- os.Exit(m.Run())
-}
-
-func prepareTestDatabase() {
- if err := fixtures.Load(); err != nil {
- ...
- }
-}
-
-func TestX(t *testing.T) {
- prepareTestDatabase()
-
- // Your test here ...
-}
-
-func TestY(t *testing.T) {
- prepareTestDatabase()
-
- // Your test here ...
-}
-
-func TestZ(t *testing.T) {
- prepareTestDatabase()
-
- // Your test here ...
-}
-```
-
-Alternatively, you can use the `Files` option, to specify which
-files you want to load into the database:
-
-```go
-fixtures, err := testfixtures.New(
- testfixtures.Database(db),
- testfixtures.Dialect("postgres"),
- testfixtures.Files(
- "fixtures/orders.yml",
- "fixtures/customers.yml",
- ),
-)
-if err != nil {
- ...
-}
-
-fixtures, err := testfixtures.NewFiles(db, &testfixtures.PostgreSQL{},
- "fixtures/orders.yml",
- "fixtures/customers.yml",
- // add as many files you want
-)
-if err != nil {
- ...
-}
-```
-
-With `Paths` option, you can specify the paths that fixtures will load
-from. Path can be directory or file. If directory, we will search YAML files
-in it.
-
-```go
-fixtures, err := testfixtures.New(
- testfixtures.Database(db),
- testfixtures.Dialect("postgres"),
- testfixtures.Paths(
- "fixtures/orders.yml",
- "fixtures/customers.yml",
- "common_fixtures/users"
- ),
-)
-if err != nil {
- ...
-}
-```
-
-## Security check
-
-In order to prevent you from accidentally wiping the wrong database, this
-package will refuse to load fixtures if the database name (or database
-filename for SQLite) doesn't contains "test". If you want to disable this
-check, use:
-
-```go
-testfixtures.New(
- ...
- testfixtures.DangerousSkipTestDatabaseCheck(),
-)
-```
-
-## Sequences
-
-For PostgreSQL, this package also resets all sequences to a high
-number to prevent duplicated primary keys while running the tests.
-The default is 10000, but you can change that with:
-
-```go
-testfixtures.New(
- ...
- testfixtures.ResetSequencesTo(10000),
-)
-```
-
-Or, if you want to skip the reset of sequences entirely:
-
-```go
-testfixtures.New(
- ...
- testfixtures.SkipResetSequences(),
-)
-```
-
-## Compatible databases
-
-### PostgreSQL / TimescaleDB
-
-This package has two approaches to disable foreign keys while importing fixtures
-for PostgreSQL databases:
-
-#### With `DISABLE TRIGGER`
-
-This is the default approach. For that use:
-
-```go
-testfixtures.New(
- ...
- testfixtures.Dialect("postgres"), // or "timescaledb"
-)
-```
-
-With the above snippet this package will use `DISABLE TRIGGER` to temporarily
-disabling foreign key constraints while loading fixtures. This work with any
-version of PostgreSQL, but it is **required** to be connected in the database
-as a SUPERUSER. You can make a PostgreSQL user a SUPERUSER with:
-
-```sql
-ALTER USER your_user SUPERUSER;
-```
-
-#### With `ALTER CONSTRAINT`
-
-This approach don't require to be connected as a SUPERUSER, but only work with
-PostgreSQL versions >= 9.4. Try this if you are getting foreign key violation
-errors with the previous approach. It is as simple as using:
-
-```go
-testfixtures.New(
- ...
- testfixtures.Dialect("postgres"),
- testfixtures.UseAlterConstraint(),
-)
-```
-
-Tested using the [github.com/lib/pq](https://github.com/lib/pq) driver.
-
-### MySQL / MariaDB
-
-Just make sure the connection string have
-[the multistatement parameter](https://github.com/go-sql-driver/mysql#multistatements)
-set to true, and use:
-
-```go
-testfixtures.New(
- ...
- testfixtures.Dialect("mysql"), // or "mariadb"
-)
-```
-
-Tested using the [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) driver.
-
-### SQLite
-
-SQLite is also supported. It is recommended to create foreign keys as
-`DEFERRABLE` (the default) to prevent problems. See more
-[on the SQLite documentation](https://www.sqlite.org/foreignkeys.html#fk_deferred).
-(Foreign key constraints are no-op by default on SQLite, but enabling it is
-recommended).
-
-```go
-testfixtures.New(
- ...
- testfixtures.Dialect("sqlite"),
-)
-```
-
-Tested using the [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) driver.
-
-### Microsoft SQL Server
-
-SQL Server support requires SQL Server >= 2008. Inserting on `IDENTITY` columns
-are handled as well. Just make sure you are logged in with a user with
-`ALTER TABLE` permission.
-
-```go
-testfixtures.New(
- ...
- testfixtures.Dialect("sqlserver"),
-)
-```
-
-Tested using the `mssql` and `sqlserver` drivers from the
-[github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) lib.
-
-## Templating
-
-Testfixtures supports templating, but it's disabled by default. Most people
-won't need it, but it may be useful to dynamically generate data.
-
-Enable it by doing:
-
-```go
-testfixtures.New(
- ...
- testfixtures.Template(),
-
- // the above options are optional
- TemplateFuncs(...),
- TemplateDelims("{{", "}}"),
- TemplateOptions("missingkey=zero"),
- TemplateData(...),
-)
-```
-
-The YAML file could look like this:
-
-```yaml
-# It's possible generate values...
-- id: {{sha256 "my-awesome-post}}
- title: My Awesome Post
- text: {{randomText}}
-
-# ... or records
-{{range $post := $.Posts}}
-- id: {{$post.Id}}
- title: {{$post.Title}}
- text: {{$post.Text}}
-{{end}}
-```
-
-## Generating fixtures for a existing database
-
-The following code will generate a YAML file for each table of the database
-into a given folder. It may be useful to boostrap a test scenario from a sample
-database of your app.
-
-```go
-dumper, err := testfixtures.NewDumper(
- testfixtures.DumpDatabase(db),
- testfixtures.DumpDialect("postgres"), // or your database of choice
- testfixtures.DumpDirectory("tmp/fixtures"),
- textfixtures.DumpTables( // optional, will dump all table if not given
- "posts",
- "comments",
- "tags",
- )
-)
-if err != nil {
- ...
-}
-if err := dumper.Dump(); err != nil {
- ...
-}
-```
-
-> This was intended to run in small sample databases. It will likely break
-if run in a production/big database.
-
-## Gotchas
-
-### Parallel testing
-
-This library doesn't yet support running tests in parallel! Running tests
-in parallel can result in random data being present in the database, which
-will likely cause tests to randomly/intermittently fail.
-
-This is specially tricky since it's not immediately clear that `go test ./...`
-run tests for each package in parallel. If more than one package use this
-library, you can face this issue. Please, use `go test -p 1 ./...` or run tests
-for each package in separated commands to fix this issue.
-
-If you're looking into being able to run tests in parallel you can try using
-testfixtures together with the [txdb][gotxdb] package, which allows wrapping
-each test run in a transaction.
-
-## CLI
-
-We also have a CLI to load fixtures in a given database.
-Grab it from the [releases page](https://github.com/go-testfixtures/testfixtures/releases)
-and use it like:
-
-```bash
-testfixtures -d postgres -c "postgres://user:password@localhost/database" -D testdata/fixtures
-```
-
-The connection string changes for each database driver.
-
-Use `--help` for all flags.
-
-## Contributing
-
-We recommend you to [install Task](https://taskfile.dev/#/installation) and
-Docker before contributing to this package, since some stuff is automated
-using these tools.
-
-It's recommended to use Docker Compose to run tests, since it runs tests for
-all supported databases once. To do that you just need to run:
-
-```bash
-task docker
-```
-
-But if you want to run tests locally, copy the `.sample.env` file as `.env`
-and edit it according to your database setup. You'll need to create a database
-(likely names `testfixtures_test`) before continuing. Then run the command
-for the database you want to run tests against:
-
-```bash
-task test:pg # PostgreSQL
-task test:mysql # MySQL
-task test:sqlite # SQLite
-task test:sqlserver # Microsoft SQL Server
-```
-
-GitHub Actions (CI) runs the same Docker setup available locally.
-
-## Alternatives
-
-If you don't think using fixtures is a good idea, you can try one of these
-packages instead:
-
-- [factory-go][factorygo]: Factory for Go. Inspired by Python's Factory Boy
-and Ruby's Factory Girl
-- [go-txdb (Single transaction SQL driver for Go)][gotxdb]: Use a single
-database transaction for each functional test, so you can rollback to
-previous state between tests to have the same database state in all tests
-- [go-sqlmock][gosqlmock]: A mock for the sql.DB interface. This allow you to
-unit test database code without having to connect to a real database
-- [dbcleaner][dbcleaner] - Clean database for testing, inspired by
-database_cleaner for Ruby
-
-[doc]: https://pkg.go.dev/github.com/go-testfixtures/testfixtures/v3?tab=doc
-[railstests]: http://guides.rubyonrails.org/testing.html#the-test-database
-[gotxdb]: https://github.com/DATA-DOG/go-txdb
-[gosqlmock]: https://github.com/DATA-DOG/go-sqlmock
-[factorygo]: https://github.com/bluele/factory-go
-[dbcleaner]: https://github.com/khaiql/dbcleaner
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/Taskfile.yml b/vendor/github.com/go-testfixtures/testfixtures/v3/Taskfile.yml
deleted file mode 100644
index 9da40bd3f..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/Taskfile.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-# https://taskfile.org
-
-version: '2'
-
-tasks:
- build:
- cmds:
- - go build -v -tags sqlite -o ./testfixtures{{exeExt}} ./cmd/testfixtures
-
- test-cli:
- cmds:
- - ./testfixtures -d sqlite -c testdb.sqlite3 -D testdata/fixtures
-
- test:pg:
- desc: Test PostgreSQL
- cmds:
- - task: test-db
- vars: {DATABASE: postgresql}
-
- test:mysql:
- desc: Test MySQL
- cmds:
- - task: test-db
- vars: {DATABASE: mysql}
-
- test:sqlite:
- desc: Test SQLite
- cmds:
- - task: test-db
- vars: {DATABASE: sqlite}
-
- test:sqlserver:
- desc: Test SQLServer
- cmds:
- - task: test-db
- vars: {DATABASE: sqlserver}
-
- test-db:
- cmds:
- - go test -v -tags {{.DATABASE}}
-
- goreleaser:test:
- desc: Tests release process without publishing
- cmds:
- - goreleaser --snapshot --rm-dist
-
- docker:
- cmds:
- - task: docker:build
- - task: docker:test
-
- docker:build:
- cmds:
- - docker build -t testfixtures .
-
- docker:test:
- cmds:
- - docker-compose down -v
- - docker-compose run testfixtures go test -v -tags 'postgresql sqlite mysql sqlserver'
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/docker-compose.yml b/vendor/github.com/go-testfixtures/testfixtures/v3/docker-compose.yml
deleted file mode 100644
index 44afd56e1..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/docker-compose.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-version: '3'
-
-services:
- testfixtures:
- image: testfixtures
- depends_on:
- - postgresql
- - mysql
- - sqlserver
- environment:
- PGPASSWORD: postgres
- PG_CONN_STRING: host=postgresql user=postgres dbname=testfixtures_test port=5432 sslmode=disable
-
- MYSQL_CONN_STRING: root:mysql@tcp(mysql)/testfixtures_test?multiStatements=true
-
- SQLITE_CONN_STRING: testfixtures_test.sqlite3
-
- SQLSERVER_CONN_STRING: server=sqlserver;database=master;user id=sa;password=SQL@1server;encrypt=disable
-
- postgresql:
- image: postgres:12.1-alpine
- environment:
- POSTGRES_DB: testfixtures_test
- POSTGRES_USER: postgres
- POSTGRES_PASSWORD: postgres
-
- mysql:
- image: mysql:8.0
- environment:
- MYSQL_DATABASE: testfixtures_test
- MYSQL_ROOT_PASSWORD: mysql
-
- sqlserver:
- image: mcr.microsoft.com/mssql/server:2019-latest
- environment:
- ACCEPT_EULA: 'Y'
- SA_PASSWORD: SQL@1server
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/dump.go b/vendor/github.com/go-testfixtures/testfixtures/v3/dump.go
deleted file mode 100644
index fe6f63350..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/dump.go
+++ /dev/null
@@ -1,165 +0,0 @@
-package testfixtures
-
-import (
- "database/sql"
- "fmt"
- "os"
- "path/filepath"
- "unicode/utf8"
-
- "gopkg.in/yaml.v2"
-)
-
-// Dumper is resposible for dumping fixtures from the database into a
-// directory.
-type Dumper struct {
- db *sql.DB
- helper helper
- dir string
-
- tables []string
-}
-
-// NewDumper creates a new dumper with the given options.
-//
-// The "DumpDatabase", "DumpDialect" and "DumpDirectory" options are required.
-func NewDumper(options ...func(*Dumper) error) (*Dumper, error) {
- d := &Dumper{}
-
- for _, option := range options {
- if err := option(d); err != nil {
- return nil, err
- }
- }
-
- return d, nil
-}
-
-// DumpDatabase sets the database to be dumped.
-func DumpDatabase(db *sql.DB) func(*Dumper) error {
- return func(d *Dumper) error {
- d.db = db
- return nil
- }
-}
-
-// DumpDialect informs Loader about which database dialect you're using.
-//
-// Possible options are "postgresql", "timescaledb", "mysql", "mariadb",
-// "sqlite" and "sqlserver".
-func DumpDialect(dialect string) func(*Dumper) error {
- return func(d *Dumper) error {
- h, err := helperForDialect(dialect)
- if err != nil {
- return err
- }
- d.helper = h
- return nil
- }
-}
-
-// DumpDirectory sets the directory where the fixtures files will be created.
-func DumpDirectory(dir string) func(*Dumper) error {
- return func(d *Dumper) error {
- d.dir = dir
- return nil
- }
-}
-
-// DumpTables allows you to choose which tables you want to dump.
-//
-// If not informed, Dumper will dump all tables by default.
-func DumpTables(tables ...string) func(*Dumper) error {
- return func(d *Dumper) error {
- d.tables = tables
- return nil
- }
-}
-
-// Dump dumps the databases as YAML fixtures.
-func (d *Dumper) Dump() error {
- tables := d.tables
- if len(tables) == 0 {
- var err error
- tables, err = d.helper.tableNames(d.db)
- if err != nil {
- return err
- }
- }
-
- for _, table := range tables {
- if err := d.dumpTable(table); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (d *Dumper) dumpTable(table string) error {
- query := fmt.Sprintf("SELECT * FROM %s", d.helper.quoteKeyword(table))
-
- stmt, err := d.db.Prepare(query)
- if err != nil {
- return err
- }
- defer stmt.Close()
-
- rows, err := stmt.Query()
- if err != nil {
- return err
- }
- defer rows.Close()
-
- columns, err := rows.Columns()
- if err != nil {
- return err
- }
-
- fixtures := make([]yaml.MapSlice, 0, 10)
- for rows.Next() {
- entries := make([]interface{}, len(columns))
- entryPtrs := make([]interface{}, len(entries))
- for i := range entries {
- entryPtrs[i] = &entries[i]
- }
- if err := rows.Scan(entryPtrs...); err != nil {
- return err
- }
-
- entryMap := make([]yaml.MapItem, len(entries))
- for i, column := range columns {
- entryMap[i] = yaml.MapItem{
- Key: column,
- Value: convertValue(entries[i]),
- }
- }
- fixtures = append(fixtures, entryMap)
- }
- if err = rows.Err(); err != nil {
- return err
- }
-
- filePath := filepath.Join(d.dir, table+".yml")
- f, err := os.Create(filePath)
- if err != nil {
- return err
- }
- defer f.Close()
-
- data, err := yaml.Marshal(fixtures)
- if err != nil {
- return err
- }
- _, err = f.Write(data)
- return err
-}
-
-func convertValue(value interface{}) interface{} {
- switch v := value.(type) {
- case []byte:
- if utf8.Valid(v) {
- return string(v)
- }
- }
- return value
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/go.mod b/vendor/github.com/go-testfixtures/testfixtures/v3/go.mod
deleted file mode 100644
index 0ac428360..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/go.mod
+++ /dev/null
@@ -1,15 +0,0 @@
-module github.com/go-testfixtures/testfixtures/v3
-
-require (
- github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73
- github.com/go-sql-driver/mysql v1.4.1
- github.com/jackc/pgx/v4 v4.6.0
- github.com/joho/godotenv v1.3.0
- github.com/lib/pq v1.3.0
- github.com/mattn/go-sqlite3 v1.14.0
- github.com/spf13/pflag v1.0.5
- google.golang.org/appengine v1.3.0 // indirect
- gopkg.in/yaml.v2 v2.2.7
-)
-
-go 1.13
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/go.sum b/vendor/github.com/go-testfixtures/testfixtures/v3/go.sum
deleted file mode 100644
index c118c8ef4..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/go.sum
+++ /dev/null
@@ -1,164 +0,0 @@
-github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
-github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
-github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
-github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
-github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73 h1:OGNva6WhsKst5OZf7eZOklDztV3hwtTHovdrLHV+MsA=
-github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
-github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
-github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
-github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
-github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
-github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=
-github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
-github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
-github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
-github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
-github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=
-github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=
-github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=
-github.com/jackc/pgconn v1.5.0 h1:oFSOilzIZkyg787M1fEmyMfOUUvwj0daqYMfaWwNL4o=
-github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI=
-github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
-github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
-github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA=
-github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
-github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
-github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
-github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=
-github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
-github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
-github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
-github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
-github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
-github.com/jackc/pgproto3/v2 v2.0.1 h1:Rdjp4NFjwHnEslx2b66FfCI2S0LhO4itac3hXz6WX9M=
-github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
-github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8 h1:Q3tB+ExeflWUW7AFcAhXqk40s9mnNYLk1nOkKNZ5GnU=
-github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
-github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
-github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
-github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
-github.com/jackc/pgtype v1.3.0 h1:l8JvKrby3RI7Kg3bYEeU9TA4vqC38QDpFCfcrC7KuN0=
-github.com/jackc/pgtype v1.3.0/go.mod h1:b0JqxHvPmljG+HQ5IsvQ0yqeSi4nGcDTVjFoiLDb0Ik=
-github.com/jackc/pgx v3.6.2+incompatible h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o=
-github.com/jackc/pgx v3.6.2+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
-github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
-github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
-github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
-github.com/jackc/pgx/v4 v4.6.0 h1:Fh0O9GdlG4gYpjpwOqjdEodJUQM9jzN3Hdv7PN0xmm0=
-github.com/jackc/pgx/v4 v4.6.0/go.mod h1:vPh43ZzxijXUVJ+t/EmXBtFmbFVO72cuneCT9oAlxAg=
-github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
-github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
-github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
-github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
-github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU=
-github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
-github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
-github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA=
-github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
-github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
-github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
-github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
-github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE=
-github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
-github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
-github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
-github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
-github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
-github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
-go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
-go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
-go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c h1:Vj5n4GlwjmQteupaxJ9+0FNOmBrHfq7vN4btdGoDZgI=
-golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c h1:Vj5n4GlwjmQteupaxJ9+0FNOmBrHfq7vN4btdGoDZgI=
-golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
-golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM=
-golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk=
-google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
-gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/helper.go b/vendor/github.com/go-testfixtures/testfixtures/v3/helper.go
deleted file mode 100644
index 06ba5b24e..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/helper.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package testfixtures
-
-import (
- "database/sql"
- "fmt"
-)
-
-const (
- paramTypeDollar = iota + 1
- paramTypeQuestion
- paramTypeAtSign
-)
-
-type loadFunction func(tx *sql.Tx) error
-
-type helper interface {
- init(*sql.DB) error
- disableReferentialIntegrity(*sql.DB, loadFunction) error
- paramType() int
- databaseName(queryable) (string, error)
- tableNames(queryable) ([]string, error)
- isTableModified(queryable, string) (bool, error)
- afterLoad(queryable) error
- quoteKeyword(string) string
- whileInsertOnTable(*sql.Tx, string, func() error) error
-}
-
-type queryable interface {
- Exec(string, ...interface{}) (sql.Result, error)
- Query(string, ...interface{}) (*sql.Rows, error)
- QueryRow(string, ...interface{}) *sql.Row
-}
-
-// batchSplitter is an interface with method which returns byte slice for
-// splitting SQL batches. This need to split sql statements and run its
-// separately.
-//
-// For Microsoft SQL Server batch splitter is "GO". For details see
-// https://docs.microsoft.com/en-us/sql/t-sql/language-elements/sql-server-utilities-statements-go
-type batchSplitter interface {
- splitter() []byte
-}
-
-var (
- _ helper = &mySQL{}
- _ helper = &postgreSQL{}
- _ helper = &sqlite{}
- _ helper = &sqlserver{}
-)
-
-type baseHelper struct{}
-
-func (baseHelper) init(_ *sql.DB) error {
- return nil
-}
-
-func (baseHelper) quoteKeyword(str string) string {
- return fmt.Sprintf(`"%s"`, str)
-}
-
-func (baseHelper) whileInsertOnTable(_ *sql.Tx, _ string, fn func() error) error {
- return fn()
-}
-
-func (baseHelper) isTableModified(_ queryable, _ string) (bool, error) {
- return true, nil
-}
-
-func (baseHelper) afterLoad(_ queryable) error {
- return nil
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/json.go b/vendor/github.com/go-testfixtures/testfixtures/v3/json.go
deleted file mode 100644
index f954a17a7..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/json.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package testfixtures
-
-import (
- "database/sql/driver"
- "encoding/json"
-)
-
-var (
- _ driver.Valuer = jsonArray{}
- _ driver.Valuer = jsonMap{}
-)
-
-type jsonArray []interface{}
-
-func (a jsonArray) Value() (driver.Value, error) {
- return json.Marshal(a)
-}
-
-type jsonMap map[string]interface{}
-
-func (m jsonMap) Value() (driver.Value, error) {
- return json.Marshal(m)
-}
-
-// Go refuses to convert map[interface{}]interface{} to JSON because JSON only support string keys
-// So it's necessary to recursively convert all map[interface]interface{} to map[string]interface{}
-func recursiveToJSON(v interface{}) (r interface{}) {
- switch v := v.(type) {
- case []interface{}:
- for i, e := range v {
- v[i] = recursiveToJSON(e)
- }
- r = jsonArray(v)
- case map[interface{}]interface{}:
- newMap := make(map[string]interface{}, len(v))
- for k, e := range v {
- newMap[k.(string)] = recursiveToJSON(e)
- }
- r = jsonMap(newMap)
- default:
- r = v
- }
- return
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/mysql.go b/vendor/github.com/go-testfixtures/testfixtures/v3/mysql.go
deleted file mode 100644
index c1cb720e4..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/mysql.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package testfixtures
-
-import (
- "database/sql"
- "fmt"
-)
-
-type mySQL struct {
- baseHelper
- tables []string
- tablesChecksum map[string]int64
-}
-
-func (h *mySQL) init(db *sql.DB) error {
- var err error
- h.tables, err = h.tableNames(db)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func (*mySQL) paramType() int {
- return paramTypeQuestion
-}
-
-func (*mySQL) quoteKeyword(str string) string {
- return fmt.Sprintf("`%s`", str)
-}
-
-func (*mySQL) databaseName(q queryable) (string, error) {
- var dbName string
- err := q.QueryRow("SELECT DATABASE()").Scan(&dbName)
- return dbName, err
-}
-
-func (h *mySQL) tableNames(q queryable) ([]string, error) {
- query := `
- SELECT table_name
- FROM information_schema.tables
- WHERE table_schema = ?
- AND table_type = 'BASE TABLE';
- `
- dbName, err := h.databaseName(q)
- if err != nil {
- return nil, err
- }
-
- rows, err := q.Query(query, dbName)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
-
- var tables []string
- for rows.Next() {
- var table string
- if err = rows.Scan(&table); err != nil {
- return nil, err
- }
- tables = append(tables, table)
- }
- if err = rows.Err(); err != nil {
- return nil, err
- }
- return tables, nil
-
-}
-
-func (h *mySQL) disableReferentialIntegrity(db *sql.DB, loadFn loadFunction) (err error) {
- tx, err := db.Begin()
- if err != nil {
- return err
- }
- defer tx.Rollback()
-
- if _, err = tx.Exec("SET FOREIGN_KEY_CHECKS = 0"); err != nil {
- return err
- }
-
- err = loadFn(tx)
- _, err2 := tx.Exec("SET FOREIGN_KEY_CHECKS = 1")
- if err != nil {
- return err
- }
- if err2 != nil {
- return err2
- }
-
- return tx.Commit()
-}
-
-func (h *mySQL) isTableModified(q queryable, tableName string) (bool, error) {
- checksum, err := h.getChecksum(q, tableName)
- if err != nil {
- return true, err
- }
-
- oldChecksum := h.tablesChecksum[tableName]
-
- return oldChecksum == 0 || checksum != oldChecksum, nil
-}
-
-func (h *mySQL) afterLoad(q queryable) error {
- if h.tablesChecksum != nil {
- return nil
- }
-
- h.tablesChecksum = make(map[string]int64, len(h.tables))
- for _, t := range h.tables {
- checksum, err := h.getChecksum(q, t)
- if err != nil {
- return err
- }
- h.tablesChecksum[t] = checksum
- }
- return nil
-}
-
-func (h *mySQL) getChecksum(q queryable, tableName string) (int64, error) {
- query := fmt.Sprintf("CHECKSUM TABLE %s", h.quoteKeyword(tableName))
- var (
- table string
- checksum sql.NullInt64
- )
- if err := q.QueryRow(query).Scan(&table, &checksum); err != nil {
- return 0, err
- }
- if !checksum.Valid {
- return 0, fmt.Errorf("testfixtures: table %s does not exist", tableName)
- }
- return checksum.Int64, nil
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/postgresql.go b/vendor/github.com/go-testfixtures/testfixtures/v3/postgresql.go
deleted file mode 100644
index a8ccd1d94..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/postgresql.go
+++ /dev/null
@@ -1,296 +0,0 @@
-package testfixtures
-
-import (
- "database/sql"
- "fmt"
- "strings"
-)
-
-type postgreSQL struct {
- baseHelper
-
- useAlterConstraint bool
- skipResetSequences bool
- resetSequencesTo int64
-
- tables []string
- sequences []string
- nonDeferrableConstraints []pgConstraint
- tablesChecksum map[string]string
-}
-
-type pgConstraint struct {
- tableName string
- constraintName string
-}
-
-func (h *postgreSQL) init(db *sql.DB) error {
- var err error
-
- h.tables, err = h.tableNames(db)
- if err != nil {
- return err
- }
-
- h.sequences, err = h.getSequences(db)
- if err != nil {
- return err
- }
-
- h.nonDeferrableConstraints, err = h.getNonDeferrableConstraints(db)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func (*postgreSQL) paramType() int {
- return paramTypeDollar
-}
-
-func (*postgreSQL) databaseName(q queryable) (string, error) {
- var dbName string
- err := q.QueryRow("SELECT current_database()").Scan(&dbName)
- return dbName, err
-}
-
-func (h *postgreSQL) tableNames(q queryable) ([]string, error) {
- var tables []string
-
- sql := `
- SELECT pg_namespace.nspname || '.' || pg_class.relname
- FROM pg_class
- INNER JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace
- WHERE pg_class.relkind = 'r'
- AND pg_namespace.nspname NOT IN ('pg_catalog', 'information_schema')
- AND pg_namespace.nspname NOT LIKE 'pg_toast%'
- AND pg_namespace.nspname NOT LIKE '\_timescaledb%';
- `
- rows, err := q.Query(sql)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
-
- for rows.Next() {
- var table string
- if err = rows.Scan(&table); err != nil {
- return nil, err
- }
- tables = append(tables, table)
- }
- if err = rows.Err(); err != nil {
- return nil, err
- }
- return tables, nil
-}
-
-func (h *postgreSQL) getSequences(q queryable) ([]string, error) {
- const sql = `
- SELECT pg_namespace.nspname || '.' || pg_class.relname AS sequence_name
- FROM pg_class
- INNER JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace
- WHERE pg_class.relkind = 'S'
- AND pg_namespace.nspname NOT LIKE '\_timescaledb%'
- `
-
- rows, err := q.Query(sql)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
-
- var sequences []string
- for rows.Next() {
- var sequence string
- if err = rows.Scan(&sequence); err != nil {
- return nil, err
- }
- sequences = append(sequences, sequence)
- }
- if err = rows.Err(); err != nil {
- return nil, err
- }
- return sequences, nil
-}
-
-func (*postgreSQL) getNonDeferrableConstraints(q queryable) ([]pgConstraint, error) {
- var constraints []pgConstraint
-
- sql := `
- SELECT table_schema || '.' || table_name, constraint_name
- FROM information_schema.table_constraints
- WHERE constraint_type = 'FOREIGN KEY'
- AND is_deferrable = 'NO'
- AND table_schema NOT LIKE '\_timescaledb%'
- `
- rows, err := q.Query(sql)
- if err != nil {
- return nil, err
- }
-
- defer rows.Close()
- for rows.Next() {
- var constraint pgConstraint
- if err = rows.Scan(&constraint.tableName, &constraint.constraintName); err != nil {
- return nil, err
- }
- constraints = append(constraints, constraint)
- }
- if err = rows.Err(); err != nil {
- return nil, err
- }
- return constraints, nil
-}
-
-func (h *postgreSQL) disableTriggers(db *sql.DB, loadFn loadFunction) (err error) {
- defer func() {
- // re-enable triggers after load
- var sql string
- for _, table := range h.tables {
- sql += fmt.Sprintf("ALTER TABLE %s ENABLE TRIGGER ALL;", h.quoteKeyword(table))
- }
- if _, err2 := db.Exec(sql); err2 != nil && err == nil {
- err = err2
- }
- }()
-
- tx, err := db.Begin()
- if err != nil {
- return err
- }
-
- var sql string
- for _, table := range h.tables {
- sql += fmt.Sprintf("ALTER TABLE %s DISABLE TRIGGER ALL;", h.quoteKeyword(table))
- }
- if _, err = tx.Exec(sql); err != nil {
- return err
- }
-
- if err = loadFn(tx); err != nil {
- tx.Rollback()
- return err
- }
-
- return tx.Commit()
-}
-
-func (h *postgreSQL) makeConstraintsDeferrable(db *sql.DB, loadFn loadFunction) (err error) {
- defer func() {
- // ensure constraint being not deferrable again after load
- var sql string
- for _, constraint := range h.nonDeferrableConstraints {
- sql += fmt.Sprintf("ALTER TABLE %s ALTER CONSTRAINT %s NOT DEFERRABLE;", h.quoteKeyword(constraint.tableName), h.quoteKeyword(constraint.constraintName))
- }
- if _, err2 := db.Exec(sql); err2 != nil && err == nil {
- err = err2
- }
- }()
-
- var sql string
- for _, constraint := range h.nonDeferrableConstraints {
- sql += fmt.Sprintf("ALTER TABLE %s ALTER CONSTRAINT %s DEFERRABLE;", h.quoteKeyword(constraint.tableName), h.quoteKeyword(constraint.constraintName))
- }
- if _, err := db.Exec(sql); err != nil {
- return err
- }
-
- tx, err := db.Begin()
- if err != nil {
- return err
- }
- defer tx.Rollback()
-
- if _, err = tx.Exec("SET CONSTRAINTS ALL DEFERRED"); err != nil {
- return err
- }
-
- if err = loadFn(tx); err != nil {
- return err
- }
-
- return tx.Commit()
-}
-
-func (h *postgreSQL) disableReferentialIntegrity(db *sql.DB, loadFn loadFunction) (err error) {
- // ensure sequences being reset after load
- if !h.skipResetSequences {
- defer func() {
- if err2 := h.resetSequences(db); err2 != nil && err == nil {
- err = err2
- }
- }()
- }
-
- if h.useAlterConstraint {
- return h.makeConstraintsDeferrable(db, loadFn)
- }
- return h.disableTriggers(db, loadFn)
-}
-
-func (h *postgreSQL) resetSequences(db *sql.DB) error {
- resetSequencesTo := h.resetSequencesTo
- if resetSequencesTo == 0 {
- resetSequencesTo = 10000
- }
-
- for _, sequence := range h.sequences {
- _, err := db.Exec(fmt.Sprintf("SELECT SETVAL('%s', %d)", sequence, resetSequencesTo))
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func (h *postgreSQL) isTableModified(q queryable, tableName string) (bool, error) {
- checksum, err := h.getChecksum(q, tableName)
- if err != nil {
- return false, err
- }
-
- oldChecksum := h.tablesChecksum[tableName]
-
- return oldChecksum == "" || checksum != oldChecksum, nil
-}
-
-func (h *postgreSQL) afterLoad(q queryable) error {
- if h.tablesChecksum != nil {
- return nil
- }
-
- h.tablesChecksum = make(map[string]string, len(h.tables))
- for _, t := range h.tables {
- checksum, err := h.getChecksum(q, t)
- if err != nil {
- return err
- }
- h.tablesChecksum[t] = checksum
- }
- return nil
-}
-
-func (h *postgreSQL) getChecksum(q queryable, tableName string) (string, error) {
- sqlStr := fmt.Sprintf(`
- SELECT md5(CAST((array_agg(t.*)) AS TEXT))
- FROM %s AS t
- `,
- h.quoteKeyword(tableName),
- )
-
- var checksum sql.NullString
- if err := q.QueryRow(sqlStr).Scan(&checksum); err != nil {
- return "", err
- }
- return checksum.String, nil
-}
-
-func (*postgreSQL) quoteKeyword(s string) string {
- parts := strings.Split(s, ".")
- for i, p := range parts {
- parts[i] = fmt.Sprintf(`"%s"`, p)
- }
- return strings.Join(parts, ".")
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/sqlite.go b/vendor/github.com/go-testfixtures/testfixtures/v3/sqlite.go
deleted file mode 100644
index d3d315341..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/sqlite.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package testfixtures
-
-import (
- "database/sql"
- "path/filepath"
-)
-
-type sqlite struct {
- baseHelper
-}
-
-func (*sqlite) paramType() int {
- return paramTypeQuestion
-}
-
-func (*sqlite) databaseName(q queryable) (string, error) {
- var seq int
- var main, dbName string
- err := q.QueryRow("PRAGMA database_list").Scan(&seq, &main, &dbName)
- if err != nil {
- return "", err
- }
- dbName = filepath.Base(dbName)
- return dbName, nil
-}
-
-func (*sqlite) tableNames(q queryable) ([]string, error) {
- query := `
- SELECT name
- FROM sqlite_master
- WHERE type = 'table';
- `
- rows, err := q.Query(query)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
-
- var tables []string
- for rows.Next() {
- var table string
- if err = rows.Scan(&table); err != nil {
- return nil, err
- }
- tables = append(tables, table)
- }
- if err = rows.Err(); err != nil {
- return nil, err
- }
- return tables, nil
-}
-
-func (*sqlite) disableReferentialIntegrity(db *sql.DB, loadFn loadFunction) (err error) {
- defer func() {
- if _, err2 := db.Exec("PRAGMA defer_foreign_keys = OFF"); err2 != nil && err == nil {
- err = err2
- }
- }()
-
- if _, err = db.Exec("PRAGMA defer_foreign_keys = ON"); err != nil {
- return err
- }
-
- tx, err := db.Begin()
- if err != nil {
- return err
- }
- defer tx.Rollback()
-
- if err = loadFn(tx); err != nil {
- return err
- }
-
- return tx.Commit()
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/sqlserver.go b/vendor/github.com/go-testfixtures/testfixtures/v3/sqlserver.go
deleted file mode 100644
index c862a3b62..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/sqlserver.go
+++ /dev/null
@@ -1,153 +0,0 @@
-package testfixtures
-
-import (
- "database/sql"
- "fmt"
- "strings"
-)
-
-type sqlserver struct {
- baseHelper
-
- paramTypeCache int
- tables []string
-}
-
-func (h *sqlserver) init(db *sql.DB) error {
- var err error
-
- // NOTE(@andreynering): The SQL Server lib (github.com/denisenkom/go-mssqldb)
- // supports both the "?" style (when using the deprecated "mssql" driver)
- // and the "@p1" style (when using the new "sqlserver" driver).
- //
- // Since we don't have a way to know which driver it's been used,
- // this is a small hack to detect the allowed param style.
- var v int
- if err := db.QueryRow("SELECT ?", 1).Scan(&v); err == nil && v == 1 {
- h.paramTypeCache = paramTypeQuestion
- } else {
- h.paramTypeCache = paramTypeAtSign
- }
-
- h.tables, err = h.tableNames(db)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func (h *sqlserver) paramType() int {
- return h.paramTypeCache
-}
-
-func (*sqlserver) quoteKeyword(s string) string {
- parts := strings.Split(s, ".")
- for i, p := range parts {
- parts[i] = fmt.Sprintf(`[%s]`, p)
- }
- return strings.Join(parts, ".")
-}
-
-func (*sqlserver) databaseName(q queryable) (string, error) {
- var dbName string
- err := q.QueryRow("SELECT DB_NAME()").Scan(&dbName)
- return dbName, err
-}
-
-func (*sqlserver) tableNames(q queryable) ([]string, error) {
- rows, err := q.Query("SELECT table_schema + '.' + table_name FROM information_schema.tables WHERE table_name <> 'spt_values'")
- if err != nil {
- return nil, err
- }
- defer rows.Close()
-
- var tables []string
- for rows.Next() {
- var table string
- if err = rows.Scan(&table); err != nil {
- return nil, err
- }
- tables = append(tables, table)
- }
- if err = rows.Err(); err != nil {
- return nil, err
- }
- return tables, nil
-}
-
-func (h *sqlserver) tableHasIdentityColumn(q queryable, tableName string) (bool, error) {
- sql := fmt.Sprintf(`
- SELECT COUNT(*)
- FROM SYS.IDENTITY_COLUMNS
- WHERE OBJECT_ID = OBJECT_ID('%s')
- `, tableName)
- var count int
- if err := q.QueryRow(sql).Scan(&count); err != nil {
- return false, err
- }
- return count > 0, nil
-
-}
-
-func (h *sqlserver) whileInsertOnTable(tx *sql.Tx, tableName string, fn func() error) (err error) {
- hasIdentityColumn, err := h.tableHasIdentityColumn(tx, tableName)
- if err != nil {
- return err
- }
- if hasIdentityColumn {
- defer func() {
- _, err2 := tx.Exec(fmt.Sprintf("SET IDENTITY_INSERT %s OFF", h.quoteKeyword(tableName)))
- if err2 != nil && err == nil {
- err = fmt.Errorf("testfixtures: could not disable identity insert: %w", err2)
- }
- }()
-
- _, err := tx.Exec(fmt.Sprintf("SET IDENTITY_INSERT %s ON", h.quoteKeyword(tableName)))
- if err != nil {
- return fmt.Errorf("testfixtures: could not enable identity insert: %w", err)
- }
- }
- return fn()
-}
-
-func (h *sqlserver) disableReferentialIntegrity(db *sql.DB, loadFn loadFunction) (err error) {
- // ensure the triggers are re-enable after all
- defer func() {
- var sql string
- for _, table := range h.tables {
- sql += fmt.Sprintf("ALTER TABLE %s WITH CHECK CHECK CONSTRAINT ALL;", h.quoteKeyword(table))
- }
- if _, err2 := db.Exec(sql); err2 != nil && err == nil {
- err = err2
- }
- }()
-
- var sql string
- for _, table := range h.tables {
- sql += fmt.Sprintf("ALTER TABLE %s NOCHECK CONSTRAINT ALL;", h.quoteKeyword(table))
- }
- if _, err := db.Exec(sql); err != nil {
- return err
- }
-
- tx, err := db.Begin()
- if err != nil {
- return err
- }
- defer tx.Rollback()
-
- if err = loadFn(tx); err != nil {
- return err
- }
-
- return tx.Commit()
-}
-
-// splitter is a batchSplitter interface implementation. We need it for
-// SQL Server because commands like a `CREATE SCHEMA...` and a `CREATE TABLE...`
-// could not be executed in the same batch.
-// See https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms175502(v=sql.105)#rules-for-using-batches
-func (*sqlserver) splitter() []byte {
- return []byte("GO\n")
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/testfixtures.go b/vendor/github.com/go-testfixtures/testfixtures/v3/testfixtures.go
deleted file mode 100644
index 5a57d9f1b..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/testfixtures.go
+++ /dev/null
@@ -1,614 +0,0 @@
-package testfixtures // import "github.com/go-testfixtures/testfixtures/v3"
-
-import (
- "bytes"
- "database/sql"
- "fmt"
- "io/ioutil"
- "os"
- "path"
- "path/filepath"
- "regexp"
- "strings"
- "text/template"
- "time"
-
- "gopkg.in/yaml.v2"
-)
-
-// Loader is the responsible to loading fixtures.
-type Loader struct {
- db *sql.DB
- helper helper
- fixturesFiles []*fixtureFile
-
- skipTestDatabaseCheck bool
- location *time.Location
-
- template bool
- templateFuncs template.FuncMap
- templateLeftDelim string
- templateRightDelim string
- templateOptions []string
- templateData interface{}
-}
-
-type fixtureFile struct {
- path string
- fileName string
- content []byte
- insertSQLs []insertSQL
-}
-
-type insertSQL struct {
- sql string
- params []interface{}
-}
-
-var (
- testDatabaseRegexp = regexp.MustCompile("(?i)test")
-
- errDatabaseIsRequired = fmt.Errorf("testfixtures: database is required")
- errDialectIsRequired = fmt.Errorf("testfixtures: dialect is required")
-)
-
-// New instantiates a new Loader instance. The "Database" and "Driver"
-// options are required.
-func New(options ...func(*Loader) error) (*Loader, error) {
- l := &Loader{
- templateLeftDelim: "{{",
- templateRightDelim: "}}",
- templateOptions: []string{"missingkey=zero"},
- }
-
- for _, option := range options {
- if err := option(l); err != nil {
- return nil, err
- }
- }
-
- if l.db == nil {
- return nil, errDatabaseIsRequired
- }
- if l.helper == nil {
- return nil, errDialectIsRequired
- }
-
- if err := l.helper.init(l.db); err != nil {
- return nil, err
- }
- if err := l.buildInsertSQLs(); err != nil {
- return nil, err
- }
-
- return l, nil
-}
-
-// Database sets an existing sql.DB instant to Loader.
-func Database(db *sql.DB) func(*Loader) error {
- return func(l *Loader) error {
- l.db = db
- return nil
- }
-}
-
-// Dialect informs Loader about which database dialect you're using.
-//
-// Possible options are "postgresql", "timescaledb", "mysql", "mariadb",
-// "sqlite" and "sqlserver".
-func Dialect(dialect string) func(*Loader) error {
- return func(l *Loader) error {
- h, err := helperForDialect(dialect)
- if err != nil {
- return err
- }
- l.helper = h
- return nil
- }
-}
-
-func helperForDialect(dialect string) (helper, error) {
- switch dialect {
- case "postgres", "postgresql", "timescaledb", "pgx":
- return &postgreSQL{}, nil
- case "mysql", "mariadb":
- return &mySQL{}, nil
- case "sqlite", "sqlite3":
- return &sqlite{}, nil
- case "mssql", "sqlserver":
- return &sqlserver{}, nil
- default:
- return nil, fmt.Errorf(`testfixtures: unrecognized dialect "%s"`, dialect)
- }
-}
-
-// UseAlterConstraint If true, the contraint disabling will do
-// using ALTER CONTRAINT sintax, only allowed in PG >= 9.4.
-// If false, the constraint disabling will use DISABLE TRIGGER ALL,
-// which requires SUPERUSER privileges.
-//
-// Only valid for PostgreSQL. Returns an error otherwise.
-func UseAlterConstraint() func(*Loader) error {
- return func(l *Loader) error {
- pgHelper, ok := l.helper.(*postgreSQL)
- if !ok {
- return fmt.Errorf("testfixtures: UseAlterConstraint is only valid for PostgreSQL databases")
- }
- pgHelper.useAlterConstraint = true
- return nil
- }
-}
-
-// SkipResetSequences prevents Loader from reseting sequences after loading
-// fixtures.
-//
-// Only valid for PostgreSQL. Returns an error otherwise.
-func SkipResetSequences() func(*Loader) error {
- return func(l *Loader) error {
- pgHelper, ok := l.helper.(*postgreSQL)
- if !ok {
- return fmt.Errorf("testfixtures: SkipResetSequences is only valid for PostgreSQL databases")
- }
- pgHelper.skipResetSequences = true
- return nil
- }
-}
-
-// ResetSequencesTo sets the value the sequences will be reset to.
-//
-// Defaults to 10000.
-//
-// Only valid for PostgreSQL. Returns an error otherwise.
-func ResetSequencesTo(value int64) func(*Loader) error {
- return func(l *Loader) error {
- pgHelper, ok := l.helper.(*postgreSQL)
- if !ok {
- return fmt.Errorf("testfixtures: ResetSequencesTo is only valid for PostgreSQL databases")
- }
- pgHelper.resetSequencesTo = value
- return nil
- }
-}
-
-// DangerousSkipTestDatabaseCheck will make Loader not check if the database
-// name contains "test". Use with caution!
-func DangerousSkipTestDatabaseCheck() func(*Loader) error {
- return func(l *Loader) error {
- l.skipTestDatabaseCheck = true
- return nil
- }
-}
-
-// Directory informs Loader to load YAML files from a given directory.
-func Directory(dir string) func(*Loader) error {
- return func(l *Loader) error {
- fixtures, err := l.fixturesFromDir(dir)
- if err != nil {
- return err
- }
- l.fixturesFiles = append(l.fixturesFiles, fixtures...)
- return nil
- }
-}
-
-// Files informs Loader to load a given set of YAML files.
-func Files(files ...string) func(*Loader) error {
- return func(l *Loader) error {
- fixtures, err := l.fixturesFromFiles(files...)
- if err != nil {
- return err
- }
- l.fixturesFiles = append(l.fixturesFiles, fixtures...)
- return nil
- }
-}
-
-// Paths inform Loader to load a given set of YAML files and directories.
-func Paths(paths ...string) func(*Loader) error {
- return func(l *Loader) error {
- fixtures, err := l.fixturesFromPaths(paths...)
- if err != nil {
- return err
- }
- l.fixturesFiles = append(l.fixturesFiles, fixtures...)
- return nil
- }
-}
-
-// Location makes Loader use the given location by default when parsing
-// dates. If not given, by default it uses the value of time.Local.
-func Location(location *time.Location) func(*Loader) error {
- return func(l *Loader) error {
- l.location = location
- return nil
- }
-}
-
-// Template makes loader process each YAML file as an template using the
-// text/template package.
-//
-// For more information on how templates work in Go please read:
-// https://golang.org/pkg/text/template/
-//
-// If not given the YAML files are parsed as is.
-func Template() func(*Loader) error {
- return func(l *Loader) error {
- l.template = true
- return nil
- }
-}
-
-// TemplateFuncs allow choosing which functions will be available
-// when processing templates.
-//
-// For more information see: https://golang.org/pkg/text/template/#Template.Funcs
-func TemplateFuncs(funcs template.FuncMap) func(*Loader) error {
- return func(l *Loader) error {
- if !l.template {
- return fmt.Errorf(`testfixtures: the Template() options is required in order to use the TemplateFuns() option`)
- }
-
- l.templateFuncs = funcs
- return nil
- }
-}
-
-// TemplateDelims allow choosing which delimiters will be used for templating.
-// This defaults to "{{" and "}}".
-//
-// For more information see https://golang.org/pkg/text/template/#Template.Delims
-func TemplateDelims(left, right string) func(*Loader) error {
- return func(l *Loader) error {
- if !l.template {
- return fmt.Errorf(`testfixtures: the Template() options is required in order to use the TemplateDelims() option`)
- }
-
- l.templateLeftDelim = left
- l.templateRightDelim = right
- return nil
- }
-}
-
-// TemplateOptions allows you to specific which text/template options will
-// be enabled when processing templates.
-//
-// This defaults to "missingkey=zero". Check the available options here:
-// https://golang.org/pkg/text/template/#Template.Option
-func TemplateOptions(options ...string) func(*Loader) error {
- return func(l *Loader) error {
- if !l.template {
- return fmt.Errorf(`testfixtures: the Template() options is required in order to use the TemplateOptions() option`)
- }
-
- l.templateOptions = options
- return nil
- }
-}
-
-// TemplateData allows you to specify which data will be available
-// when processing templates. Data is accesible by prefixing it with a "."
-// like {{.MyKey}}.
-func TemplateData(data interface{}) func(*Loader) error {
- return func(l *Loader) error {
- if !l.template {
- return fmt.Errorf(`testfixtures: the Template() options is required in order to use the TemplateData() option`)
- }
-
- l.templateData = data
- return nil
- }
-}
-
-// EnsureTestDatabase returns an error if the database name does not contains
-// "test".
-func (l *Loader) EnsureTestDatabase() error {
- dbName, err := l.helper.databaseName(l.db)
- if err != nil {
- return err
- }
- if !testDatabaseRegexp.MatchString(dbName) {
- return fmt.Errorf(`testfixtures: database "%s" does not appear to be a test database`, dbName)
- }
- return nil
-}
-
-// Load wipes and after load all fixtures in the database.
-// if err := fixtures.Load(); err != nil {
-// ...
-// }
-func (l *Loader) Load() error {
- if !l.skipTestDatabaseCheck {
- if err := l.EnsureTestDatabase(); err != nil {
- return err
- }
- }
-
- err := l.helper.disableReferentialIntegrity(l.db, func(tx *sql.Tx) error {
- modifiedTables := make(map[string]bool, len(l.fixturesFiles))
- for _, file := range l.fixturesFiles {
- tableName := file.fileNameWithoutExtension()
- modified, err := l.helper.isTableModified(tx, tableName)
- if err != nil {
- return err
- }
- modifiedTables[tableName] = modified
- }
-
- // Delete existing table data for specified fixtures before populating the data. This helps avoid
- // DELETE CASCADE constraints when using the `UseAlterConstraint()` option.
- for _, file := range l.fixturesFiles {
- modified := modifiedTables[file.fileNameWithoutExtension()]
- if !modified {
- continue
- }
- if err := file.delete(tx, l.helper); err != nil {
- return err
- }
- }
-
- for _, file := range l.fixturesFiles {
- modified := modifiedTables[file.fileNameWithoutExtension()]
- if !modified {
- continue
- }
- err := l.helper.whileInsertOnTable(tx, file.fileNameWithoutExtension(), func() error {
- for j, i := range file.insertSQLs {
- if _, err := tx.Exec(i.sql, i.params...); err != nil {
- return &InsertError{
- Err: err,
- File: file.fileName,
- Index: j,
- SQL: i.sql,
- Params: i.params,
- }
- }
- }
- return nil
- })
- if err != nil {
- return err
- }
- }
- return nil
- })
- if err != nil {
- return err
- }
- return l.helper.afterLoad(l.db)
-}
-
-// InsertError will be returned if any error happens on database while
-// inserting the record.
-type InsertError struct {
- Err error
- File string
- Index int
- SQL string
- Params []interface{}
-}
-
-func (e *InsertError) Error() string {
- return fmt.Sprintf(
- "testfixtures: error inserting record: %v, on file: %s, index: %d, sql: %s, params: %v",
- e.Err,
- e.File,
- e.Index,
- e.SQL,
- e.Params,
- )
-}
-
-func (l *Loader) buildInsertSQLs() error {
- for _, f := range l.fixturesFiles {
- var records interface{}
- if err := yaml.Unmarshal(f.content, &records); err != nil {
- return fmt.Errorf("testfixtures: could not unmarshal YAML: %w", err)
- }
-
- switch records := records.(type) {
- case []interface{}:
- f.insertSQLs = make([]insertSQL, 0, len(records))
-
- for _, record := range records {
- recordMap, ok := record.(map[interface{}]interface{})
- if !ok {
- return fmt.Errorf("testfixtures: could not cast record: not a map[interface{}]interface{}")
- }
-
- sql, values, err := l.buildInsertSQL(f, recordMap)
- if err != nil {
- return err
- }
-
- f.insertSQLs = append(f.insertSQLs, insertSQL{sql, values})
- }
- case map[interface{}]interface{}:
- f.insertSQLs = make([]insertSQL, 0, len(records))
-
- for _, record := range records {
- recordMap, ok := record.(map[interface{}]interface{})
- if !ok {
- return fmt.Errorf("testfixtures: could not cast record: not a map[interface{}]interface{}")
- }
-
- sql, values, err := l.buildInsertSQL(f, recordMap)
- if err != nil {
- return err
- }
-
- f.insertSQLs = append(f.insertSQLs, insertSQL{sql, values})
- }
- default:
- return fmt.Errorf("testfixtures: fixture is not a slice or map")
- }
- }
-
- return nil
-}
-
-func (f *fixtureFile) fileNameWithoutExtension() string {
- return strings.Replace(f.fileName, filepath.Ext(f.fileName), "", 1)
-}
-
-func (f *fixtureFile) delete(tx *sql.Tx, h helper) error {
- if _, err := tx.Exec(fmt.Sprintf("DELETE FROM %s", h.quoteKeyword(f.fileNameWithoutExtension()))); err != nil {
- return fmt.Errorf(`testfixtures: could not clean table "%s": %w`, f.fileNameWithoutExtension(), err)
- }
- return nil
-}
-
-func (l *Loader) buildInsertSQL(f *fixtureFile, record map[interface{}]interface{}) (sqlStr string, values []interface{}, err error) {
- var (
- sqlColumns = make([]string, 0, len(record))
- sqlValues = make([]string, 0, len(record))
- i = 1
- )
- for key, value := range record {
- keyStr, ok := key.(string)
- if !ok {
- err = fmt.Errorf("testfixtures: record map key is not a string")
- return
- }
-
- sqlColumns = append(sqlColumns, l.helper.quoteKeyword(keyStr))
-
- // if string, try convert to SQL or time
- // if map or array, convert to json
- switch v := value.(type) {
- case string:
- if strings.HasPrefix(v, "RAW=") {
- sqlValues = append(sqlValues, strings.TrimPrefix(v, "RAW="))
- continue
- }
-
- if t, err := l.tryStrToDate(v); err == nil {
- value = t
- }
- case []interface{}, map[interface{}]interface{}:
- value = recursiveToJSON(v)
- }
-
- switch l.helper.paramType() {
- case paramTypeDollar:
- sqlValues = append(sqlValues, fmt.Sprintf("$%d", i))
- case paramTypeQuestion:
- sqlValues = append(sqlValues, "?")
- case paramTypeAtSign:
- sqlValues = append(sqlValues, fmt.Sprintf("@p%d", i))
- }
-
- values = append(values, value)
- i++
- }
-
- sqlStr = fmt.Sprintf(
- "INSERT INTO %s (%s) VALUES (%s)",
- l.helper.quoteKeyword(f.fileNameWithoutExtension()),
- strings.Join(sqlColumns, ", "),
- strings.Join(sqlValues, ", "),
- )
- return
-}
-
-func (l *Loader) fixturesFromDir(dir string) ([]*fixtureFile, error) {
- fileinfos, err := ioutil.ReadDir(dir)
- if err != nil {
- return nil, fmt.Errorf(`testfixtures: could not stat directory "%s": %w`, dir, err)
- }
-
- files := make([]*fixtureFile, 0, len(fileinfos))
-
- for _, fileinfo := range fileinfos {
- fileExt := filepath.Ext(fileinfo.Name())
- if !fileinfo.IsDir() && (fileExt == ".yml" || fileExt == ".yaml") {
- fixture := &fixtureFile{
- path: path.Join(dir, fileinfo.Name()),
- fileName: fileinfo.Name(),
- }
- fixture.content, err = ioutil.ReadFile(fixture.path)
- if err != nil {
- return nil, fmt.Errorf(`testfixtures: could not read file "%s": %w`, fixture.path, err)
- }
- if err := l.processFileTemplate(fixture); err != nil {
- return nil, err
- }
- files = append(files, fixture)
- }
- }
- return files, nil
-}
-
-func (l *Loader) fixturesFromFiles(fileNames ...string) ([]*fixtureFile, error) {
- var (
- fixtureFiles = make([]*fixtureFile, 0, len(fileNames))
- err error
- )
-
- for _, f := range fileNames {
- fixture := &fixtureFile{
- path: f,
- fileName: filepath.Base(f),
- }
- fixture.content, err = ioutil.ReadFile(fixture.path)
- if err != nil {
- return nil, fmt.Errorf(`testfixtures: could not read file "%s": %w`, fixture.path, err)
- }
- if err := l.processFileTemplate(fixture); err != nil {
- return nil, err
- }
- fixtureFiles = append(fixtureFiles, fixture)
- }
-
- return fixtureFiles, nil
-}
-
-func (l *Loader) fixturesFromPaths(paths ...string) ([]*fixtureFile, error) {
- fixtureExtractor := func(p string, isDir bool) ([]*fixtureFile, error) {
- if isDir {
- return l.fixturesFromDir(p)
- }
-
- return l.fixturesFromFiles(p)
- }
-
- var fixtureFiles []*fixtureFile
-
- for _, p := range paths {
- f, err := os.Stat(p)
- if err != nil {
- return nil, fmt.Errorf(`testfixtures: could not stat path "%s": %w`, p, err)
- }
-
- fixtures, err := fixtureExtractor(p, f.IsDir())
- if err != nil {
- return nil, err
- }
-
- fixtureFiles = append(fixtureFiles, fixtures...)
- }
-
- return fixtureFiles, nil
-}
-
-func (l *Loader) processFileTemplate(f *fixtureFile) error {
- if !l.template {
- return nil
- }
-
- t := template.New("").
- Funcs(l.templateFuncs).
- Delims(l.templateLeftDelim, l.templateRightDelim).
- Option(l.templateOptions...)
- t, err := t.Parse(string(f.content))
- if err != nil {
- return fmt.Errorf(`textfixtures: error on parsing template in %s: %w`, f.fileName, err)
- }
-
- var buffer bytes.Buffer
- if err := t.Execute(&buffer, l.templateData); err != nil {
- return fmt.Errorf(`textfixtures: error on executing template in %s: %w`, f.fileName, err)
- }
-
- f.content = buffer.Bytes()
- return nil
-}
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/time.go b/vendor/github.com/go-testfixtures/testfixtures/v3/time.go
deleted file mode 100644
index 3d50a98cc..000000000
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/time.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package testfixtures
-
-import (
- "fmt"
- "time"
-)
-
-var timeFormats = [...]string{
- "2006-01-02",
- "2006-01-02 15:04",
- "2006-01-02 15:04:05",
- "20060102",
- "20060102 15:04",
- "20060102 15:04:05",
- "02/01/2006",
- "02/01/2006 15:04",
- "02/01/2006 15:04:05",
- "2006-01-02T15:04-07:00",
- "2006-01-02T15:04:05-07:00",
- "2006-01-02T15:04:05Z07:00",
- "2006-01-02 15:04:05Z07:00",
- "2006-01-02T15:04:05Z0700",
- "2006-01-02 15:04:05Z0700",
- "2006-01-02T15:04:05Z07",
- "2006-01-02 15:04:05Z07",
- "2006-01-02 15:04:05 MST",
-}
-
-func (l *Loader) tryStrToDate(s string) (time.Time, error) {
- loc := l.location
- if loc == nil {
- loc = time.Local
- }
-
- for _, f := range timeFormats {
- t, err := time.ParseInLocation(f, s, loc)
- if err != nil {
- continue
- }
- return t, nil
- }
- return time.Time{}, fmt.Errorf(`testfixtures: could not convert string "%s" to time`, s)
-}
diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS
deleted file mode 100644
index 15167cd74..000000000
--- a/vendor/github.com/golang/protobuf/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/golang/protobuf/CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS
deleted file mode 100644
index 1c4577e96..000000000
--- a/vendor/github.com/golang/protobuf/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE
deleted file mode 100644
index 0f646931a..000000000
--- a/vendor/github.com/golang/protobuf/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright 2010 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/vendor/github.com/golang/protobuf/proto/buffer.go b/vendor/github.com/golang/protobuf/proto/buffer.go
deleted file mode 100644
index e810e6fea..000000000
--- a/vendor/github.com/golang/protobuf/proto/buffer.go
+++ /dev/null
@@ -1,324 +0,0 @@
-// Copyright 2019 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.
-
-package proto
-
-import (
- "errors"
- "fmt"
-
- "google.golang.org/protobuf/encoding/prototext"
- "google.golang.org/protobuf/encoding/protowire"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-const (
- WireVarint = 0
- WireFixed32 = 5
- WireFixed64 = 1
- WireBytes = 2
- WireStartGroup = 3
- WireEndGroup = 4
-)
-
-// EncodeVarint returns the varint encoded bytes of v.
-func EncodeVarint(v uint64) []byte {
- return protowire.AppendVarint(nil, v)
-}
-
-// SizeVarint returns the length of the varint encoded bytes of v.
-// This is equal to len(EncodeVarint(v)).
-func SizeVarint(v uint64) int {
- return protowire.SizeVarint(v)
-}
-
-// DecodeVarint parses a varint encoded integer from b,
-// returning the integer value and the length of the varint.
-// It returns (0, 0) if there is a parse error.
-func DecodeVarint(b []byte) (uint64, int) {
- v, n := protowire.ConsumeVarint(b)
- if n < 0 {
- return 0, 0
- }
- return v, n
-}
-
-// Buffer is a buffer for encoding and decoding the protobuf wire format.
-// It may be reused between invocations to reduce memory usage.
-type Buffer struct {
- buf []byte
- idx int
- deterministic bool
-}
-
-// NewBuffer allocates a new Buffer initialized with buf,
-// where the contents of buf are considered the unread portion of the buffer.
-func NewBuffer(buf []byte) *Buffer {
- return &Buffer{buf: buf}
-}
-
-// SetDeterministic specifies whether to use deterministic serialization.
-//
-// Deterministic serialization guarantees that for a given binary, equal
-// messages will always be serialized to the same bytes. This implies:
-//
-// - Repeated serialization of a message will return the same bytes.
-// - Different processes of the same binary (which may be executing on
-// different machines) will serialize equal messages to the same bytes.
-//
-// Note that the deterministic serialization is NOT canonical across
-// languages. It is not guaranteed to remain stable over time. It is unstable
-// across different builds with schema changes due to unknown fields.
-// Users who need canonical serialization (e.g., persistent storage in a
-// canonical form, fingerprinting, etc.) should define their own
-// canonicalization specification and implement their own serializer rather
-// than relying on this API.
-//
-// If deterministic serialization is requested, map entries will be sorted
-// by keys in lexographical order. This is an implementation detail and
-// subject to change.
-func (b *Buffer) SetDeterministic(deterministic bool) {
- b.deterministic = deterministic
-}
-
-// SetBuf sets buf as the internal buffer,
-// where the contents of buf are considered the unread portion of the buffer.
-func (b *Buffer) SetBuf(buf []byte) {
- b.buf = buf
- b.idx = 0
-}
-
-// Reset clears the internal buffer of all written and unread data.
-func (b *Buffer) Reset() {
- b.buf = b.buf[:0]
- b.idx = 0
-}
-
-// Bytes returns the internal buffer.
-func (b *Buffer) Bytes() []byte {
- return b.buf
-}
-
-// Unread returns the unread portion of the buffer.
-func (b *Buffer) Unread() []byte {
- return b.buf[b.idx:]
-}
-
-// Marshal appends the wire-format encoding of m to the buffer.
-func (b *Buffer) Marshal(m Message) error {
- var err error
- b.buf, err = marshalAppend(b.buf, m, b.deterministic)
- return err
-}
-
-// Unmarshal parses the wire-format message in the buffer and
-// places the decoded results in m.
-// It does not reset m before unmarshaling.
-func (b *Buffer) Unmarshal(m Message) error {
- err := UnmarshalMerge(b.Unread(), m)
- b.idx = len(b.buf)
- return err
-}
-
-type unknownFields struct{ XXX_unrecognized protoimpl.UnknownFields }
-
-func (m *unknownFields) String() string { panic("not implemented") }
-func (m *unknownFields) Reset() { panic("not implemented") }
-func (m *unknownFields) ProtoMessage() { panic("not implemented") }
-
-// DebugPrint dumps the encoded bytes of b with a header and footer including s
-// to stdout. This is only intended for debugging.
-func (*Buffer) DebugPrint(s string, b []byte) {
- m := MessageReflect(new(unknownFields))
- m.SetUnknown(b)
- b, _ = prototext.MarshalOptions{AllowPartial: true, Indent: "\t"}.Marshal(m.Interface())
- fmt.Printf("==== %s ====\n%s==== %s ====\n", s, b, s)
-}
-
-// EncodeVarint appends an unsigned varint encoding to the buffer.
-func (b *Buffer) EncodeVarint(v uint64) error {
- b.buf = protowire.AppendVarint(b.buf, v)
- return nil
-}
-
-// EncodeZigzag32 appends a 32-bit zig-zag varint encoding to the buffer.
-func (b *Buffer) EncodeZigzag32(v uint64) error {
- return b.EncodeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
-}
-
-// EncodeZigzag64 appends a 64-bit zig-zag varint encoding to the buffer.
-func (b *Buffer) EncodeZigzag64(v uint64) error {
- return b.EncodeVarint(uint64((uint64(v) << 1) ^ uint64((int64(v) >> 63))))
-}
-
-// EncodeFixed32 appends a 32-bit little-endian integer to the buffer.
-func (b *Buffer) EncodeFixed32(v uint64) error {
- b.buf = protowire.AppendFixed32(b.buf, uint32(v))
- return nil
-}
-
-// EncodeFixed64 appends a 64-bit little-endian integer to the buffer.
-func (b *Buffer) EncodeFixed64(v uint64) error {
- b.buf = protowire.AppendFixed64(b.buf, uint64(v))
- return nil
-}
-
-// EncodeRawBytes appends a length-prefixed raw bytes to the buffer.
-func (b *Buffer) EncodeRawBytes(v []byte) error {
- b.buf = protowire.AppendBytes(b.buf, v)
- return nil
-}
-
-// EncodeStringBytes appends a length-prefixed raw bytes to the buffer.
-// It does not validate whether v contains valid UTF-8.
-func (b *Buffer) EncodeStringBytes(v string) error {
- b.buf = protowire.AppendString(b.buf, v)
- return nil
-}
-
-// EncodeMessage appends a length-prefixed encoded message to the buffer.
-func (b *Buffer) EncodeMessage(m Message) error {
- var err error
- b.buf = protowire.AppendVarint(b.buf, uint64(Size(m)))
- b.buf, err = marshalAppend(b.buf, m, b.deterministic)
- return err
-}
-
-// DecodeVarint consumes an encoded unsigned varint from the buffer.
-func (b *Buffer) DecodeVarint() (uint64, error) {
- v, n := protowire.ConsumeVarint(b.buf[b.idx:])
- if n < 0 {
- return 0, protowire.ParseError(n)
- }
- b.idx += n
- return uint64(v), nil
-}
-
-// DecodeZigzag32 consumes an encoded 32-bit zig-zag varint from the buffer.
-func (b *Buffer) DecodeZigzag32() (uint64, error) {
- v, err := b.DecodeVarint()
- if err != nil {
- return 0, err
- }
- return uint64((uint32(v) >> 1) ^ uint32((int32(v&1)<<31)>>31)), nil
-}
-
-// DecodeZigzag64 consumes an encoded 64-bit zig-zag varint from the buffer.
-func (b *Buffer) DecodeZigzag64() (uint64, error) {
- v, err := b.DecodeVarint()
- if err != nil {
- return 0, err
- }
- return uint64((uint64(v) >> 1) ^ uint64((int64(v&1)<<63)>>63)), nil
-}
-
-// DecodeFixed32 consumes a 32-bit little-endian integer from the buffer.
-func (b *Buffer) DecodeFixed32() (uint64, error) {
- v, n := protowire.ConsumeFixed32(b.buf[b.idx:])
- if n < 0 {
- return 0, protowire.ParseError(n)
- }
- b.idx += n
- return uint64(v), nil
-}
-
-// DecodeFixed64 consumes a 64-bit little-endian integer from the buffer.
-func (b *Buffer) DecodeFixed64() (uint64, error) {
- v, n := protowire.ConsumeFixed64(b.buf[b.idx:])
- if n < 0 {
- return 0, protowire.ParseError(n)
- }
- b.idx += n
- return uint64(v), nil
-}
-
-// DecodeRawBytes consumes a length-prefixed raw bytes from the buffer.
-// If alloc is specified, it returns a copy the raw bytes
-// rather than a sub-slice of the buffer.
-func (b *Buffer) DecodeRawBytes(alloc bool) ([]byte, error) {
- v, n := protowire.ConsumeBytes(b.buf[b.idx:])
- if n < 0 {
- return nil, protowire.ParseError(n)
- }
- b.idx += n
- if alloc {
- v = append([]byte(nil), v...)
- }
- return v, nil
-}
-
-// DecodeStringBytes consumes a length-prefixed raw bytes from the buffer.
-// It does not validate whether the raw bytes contain valid UTF-8.
-func (b *Buffer) DecodeStringBytes() (string, error) {
- v, n := protowire.ConsumeString(b.buf[b.idx:])
- if n < 0 {
- return "", protowire.ParseError(n)
- }
- b.idx += n
- return v, nil
-}
-
-// DecodeMessage consumes a length-prefixed message from the buffer.
-// It does not reset m before unmarshaling.
-func (b *Buffer) DecodeMessage(m Message) error {
- v, err := b.DecodeRawBytes(false)
- if err != nil {
- return err
- }
- return UnmarshalMerge(v, m)
-}
-
-// DecodeGroup consumes a message group from the buffer.
-// It assumes that the start group marker has already been consumed and
-// consumes all bytes until (and including the end group marker).
-// It does not reset m before unmarshaling.
-func (b *Buffer) DecodeGroup(m Message) error {
- v, n, err := consumeGroup(b.buf[b.idx:])
- if err != nil {
- return err
- }
- b.idx += n
- return UnmarshalMerge(v, m)
-}
-
-// consumeGroup parses b until it finds an end group marker, returning
-// the raw bytes of the message (excluding the end group marker) and the
-// the total length of the message (including the end group marker).
-func consumeGroup(b []byte) ([]byte, int, error) {
- b0 := b
- depth := 1 // assume this follows a start group marker
- for {
- _, wtyp, tagLen := protowire.ConsumeTag(b)
- if tagLen < 0 {
- return nil, 0, protowire.ParseError(tagLen)
- }
- b = b[tagLen:]
-
- var valLen int
- switch wtyp {
- case protowire.VarintType:
- _, valLen = protowire.ConsumeVarint(b)
- case protowire.Fixed32Type:
- _, valLen = protowire.ConsumeFixed32(b)
- case protowire.Fixed64Type:
- _, valLen = protowire.ConsumeFixed64(b)
- case protowire.BytesType:
- _, valLen = protowire.ConsumeBytes(b)
- case protowire.StartGroupType:
- depth++
- case protowire.EndGroupType:
- depth--
- default:
- return nil, 0, errors.New("proto: cannot parse reserved wire type")
- }
- if valLen < 0 {
- return nil, 0, protowire.ParseError(valLen)
- }
- b = b[valLen:]
-
- if depth == 0 {
- return b0[:len(b0)-len(b)-tagLen], len(b0) - len(b), nil
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/defaults.go b/vendor/github.com/golang/protobuf/proto/defaults.go
deleted file mode 100644
index d399bf069..000000000
--- a/vendor/github.com/golang/protobuf/proto/defaults.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2019 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.
-
-package proto
-
-import (
- "google.golang.org/protobuf/reflect/protoreflect"
-)
-
-// SetDefaults sets unpopulated scalar fields to their default values.
-// Fields within a oneof are not set even if they have a default value.
-// SetDefaults is recursively called upon any populated message fields.
-func SetDefaults(m Message) {
- if m != nil {
- setDefaults(MessageReflect(m))
- }
-}
-
-func setDefaults(m protoreflect.Message) {
- fds := m.Descriptor().Fields()
- for i := 0; i < fds.Len(); i++ {
- fd := fds.Get(i)
- if !m.Has(fd) {
- if fd.HasDefault() && fd.ContainingOneof() == nil {
- v := fd.Default()
- if fd.Kind() == protoreflect.BytesKind {
- v = protoreflect.ValueOf(append([]byte(nil), v.Bytes()...)) // copy the default bytes
- }
- m.Set(fd, v)
- }
- continue
- }
- }
-
- m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
- switch {
- // Handle singular message.
- case fd.Cardinality() != protoreflect.Repeated:
- if fd.Message() != nil {
- setDefaults(m.Get(fd).Message())
- }
- // Handle list of messages.
- case fd.IsList():
- if fd.Message() != nil {
- ls := m.Get(fd).List()
- for i := 0; i < ls.Len(); i++ {
- setDefaults(ls.Get(i).Message())
- }
- }
- // Handle map of messages.
- case fd.IsMap():
- if fd.MapValue().Message() != nil {
- ms := m.Get(fd).Map()
- ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool {
- setDefaults(v.Message())
- return true
- })
- }
- }
- return true
- })
-}
diff --git a/vendor/github.com/golang/protobuf/proto/deprecated.go b/vendor/github.com/golang/protobuf/proto/deprecated.go
deleted file mode 100644
index e8db57e09..000000000
--- a/vendor/github.com/golang/protobuf/proto/deprecated.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2018 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.
-
-package proto
-
-import (
- "encoding/json"
- "errors"
- "fmt"
- "strconv"
-
- protoV2 "google.golang.org/protobuf/proto"
-)
-
-var (
- // Deprecated: No longer returned.
- ErrNil = errors.New("proto: Marshal called with nil")
-
- // Deprecated: No longer returned.
- ErrTooLarge = errors.New("proto: message encodes to over 2 GB")
-
- // Deprecated: No longer returned.
- ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
-)
-
-// Deprecated: Do not use.
-type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 }
-
-// Deprecated: Do not use.
-func GetStats() Stats { return Stats{} }
-
-// Deprecated: Do not use.
-func MarshalMessageSet(interface{}) ([]byte, error) {
- return nil, errors.New("proto: not implemented")
-}
-
-// Deprecated: Do not use.
-func UnmarshalMessageSet([]byte, interface{}) error {
- return errors.New("proto: not implemented")
-}
-
-// Deprecated: Do not use.
-func MarshalMessageSetJSON(interface{}) ([]byte, error) {
- return nil, errors.New("proto: not implemented")
-}
-
-// Deprecated: Do not use.
-func UnmarshalMessageSetJSON([]byte, interface{}) error {
- return errors.New("proto: not implemented")
-}
-
-// Deprecated: Do not use.
-func RegisterMessageSetType(Message, int32, string) {}
-
-// Deprecated: Do not use.
-func EnumName(m map[int32]string, v int32) string {
- s, ok := m[v]
- if ok {
- return s
- }
- return strconv.Itoa(int(v))
-}
-
-// Deprecated: Do not use.
-func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) {
- if data[0] == '"' {
- // New style: enums are strings.
- var repr string
- if err := json.Unmarshal(data, &repr); err != nil {
- return -1, err
- }
- val, ok := m[repr]
- if !ok {
- return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr)
- }
- return val, nil
- }
- // Old style: enums are ints.
- var val int32
- if err := json.Unmarshal(data, &val); err != nil {
- return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName)
- }
- return val, nil
-}
-
-// Deprecated: Do not use; this type existed for intenal-use only.
-type InternalMessageInfo struct{}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) DiscardUnknown(m Message) {
- DiscardUnknown(m)
-}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) Marshal(b []byte, m Message, deterministic bool) ([]byte, error) {
- return protoV2.MarshalOptions{Deterministic: deterministic}.MarshalAppend(b, MessageV2(m))
-}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) Merge(dst, src Message) {
- protoV2.Merge(MessageV2(dst), MessageV2(src))
-}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) Size(m Message) int {
- return protoV2.Size(MessageV2(m))
-}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) Unmarshal(m Message, b []byte) error {
- return protoV2.UnmarshalOptions{Merge: true}.Unmarshal(b, MessageV2(m))
-}
diff --git a/vendor/github.com/golang/protobuf/proto/discard.go b/vendor/github.com/golang/protobuf/proto/discard.go
deleted file mode 100644
index 2187e877f..000000000
--- a/vendor/github.com/golang/protobuf/proto/discard.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2019 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.
-
-package proto
-
-import (
- "google.golang.org/protobuf/reflect/protoreflect"
-)
-
-// DiscardUnknown recursively discards all unknown fields from this message
-// and all embedded messages.
-//
-// When unmarshaling a message with unrecognized fields, the tags and values
-// of such fields are preserved in the Message. This allows a later call to
-// marshal to be able to produce a message that continues to have those
-// unrecognized fields. To avoid this, DiscardUnknown is used to
-// explicitly clear the unknown fields after unmarshaling.
-func DiscardUnknown(m Message) {
- if m != nil {
- discardUnknown(MessageReflect(m))
- }
-}
-
-func discardUnknown(m protoreflect.Message) {
- m.Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool {
- switch {
- // Handle singular message.
- case fd.Cardinality() != protoreflect.Repeated:
- if fd.Message() != nil {
- discardUnknown(m.Get(fd).Message())
- }
- // Handle list of messages.
- case fd.IsList():
- if fd.Message() != nil {
- ls := m.Get(fd).List()
- for i := 0; i < ls.Len(); i++ {
- discardUnknown(ls.Get(i).Message())
- }
- }
- // Handle map of messages.
- case fd.IsMap():
- if fd.MapValue().Message() != nil {
- ms := m.Get(fd).Map()
- ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool {
- discardUnknown(v.Message())
- return true
- })
- }
- }
- return true
- })
-
- // Discard unknown fields.
- if len(m.GetUnknown()) > 0 {
- m.SetUnknown(nil)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go
deleted file mode 100644
index 42fc120c9..000000000
--- a/vendor/github.com/golang/protobuf/proto/extensions.go
+++ /dev/null
@@ -1,356 +0,0 @@
-// Copyright 2010 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.
-
-package proto
-
-import (
- "errors"
- "fmt"
- "reflect"
-
- "google.golang.org/protobuf/encoding/protowire"
- "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
- "google.golang.org/protobuf/runtime/protoiface"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-type (
- // ExtensionDesc represents an extension descriptor and
- // is used to interact with an extension field in a message.
- //
- // Variables of this type are generated in code by protoc-gen-go.
- ExtensionDesc = protoimpl.ExtensionInfo
-
- // ExtensionRange represents a range of message extensions.
- // Used in code generated by protoc-gen-go.
- ExtensionRange = protoiface.ExtensionRangeV1
-
- // Deprecated: Do not use; this is an internal type.
- Extension = protoimpl.ExtensionFieldV1
-
- // Deprecated: Do not use; this is an internal type.
- XXX_InternalExtensions = protoimpl.ExtensionFields
-)
-
-// ErrMissingExtension reports whether the extension was not present.
-var ErrMissingExtension = errors.New("proto: missing extension")
-
-var errNotExtendable = errors.New("proto: not an extendable proto.Message")
-
-// HasExtension reports whether the extension field is present in m
-// either as an explicitly populated field or as an unknown field.
-func HasExtension(m Message, xt *ExtensionDesc) (has bool) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return false
- }
-
- // Check whether any populated known field matches the field number.
- xtd := xt.TypeDescriptor()
- if isValidExtension(mr.Descriptor(), xtd) {
- has = mr.Has(xtd)
- } else {
- mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
- has = int32(fd.Number()) == xt.Field
- return !has
- })
- }
-
- // Check whether any unknown field matches the field number.
- for b := mr.GetUnknown(); !has && len(b) > 0; {
- num, _, n := protowire.ConsumeField(b)
- has = int32(num) == xt.Field
- b = b[n:]
- }
- return has
-}
-
-// ClearExtension removes the extension field from m
-// either as an explicitly populated field or as an unknown field.
-func ClearExtension(m Message, xt *ExtensionDesc) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return
- }
-
- xtd := xt.TypeDescriptor()
- if isValidExtension(mr.Descriptor(), xtd) {
- mr.Clear(xtd)
- } else {
- mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
- if int32(fd.Number()) == xt.Field {
- mr.Clear(fd)
- return false
- }
- return true
- })
- }
- clearUnknown(mr, fieldNum(xt.Field))
-}
-
-// ClearAllExtensions clears all extensions from m.
-// This includes populated fields and unknown fields in the extension range.
-func ClearAllExtensions(m Message) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return
- }
-
- mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
- if fd.IsExtension() {
- mr.Clear(fd)
- }
- return true
- })
- clearUnknown(mr, mr.Descriptor().ExtensionRanges())
-}
-
-// GetExtension retrieves a proto2 extended field from m.
-//
-// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil),
-// then GetExtension parses the encoded field and returns a Go value of the specified type.
-// If the field is not present, then the default value is returned (if one is specified),
-// otherwise ErrMissingExtension is reported.
-//
-// If the descriptor is type incomplete (i.e., ExtensionDesc.ExtensionType is nil),
-// then GetExtension returns the raw encoded bytes for the extension field.
-func GetExtension(m Message, xt *ExtensionDesc) (interface{}, error) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
- return nil, errNotExtendable
- }
-
- // Retrieve the unknown fields for this extension field.
- var bo protoreflect.RawFields
- for bi := mr.GetUnknown(); len(bi) > 0; {
- num, _, n := protowire.ConsumeField(bi)
- if int32(num) == xt.Field {
- bo = append(bo, bi[:n]...)
- }
- bi = bi[n:]
- }
-
- // For type incomplete descriptors, only retrieve the unknown fields.
- if xt.ExtensionType == nil {
- return []byte(bo), nil
- }
-
- // If the extension field only exists as unknown fields, unmarshal it.
- // This is rarely done since proto.Unmarshal eagerly unmarshals extensions.
- xtd := xt.TypeDescriptor()
- if !isValidExtension(mr.Descriptor(), xtd) {
- return nil, fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m)
- }
- if !mr.Has(xtd) && len(bo) > 0 {
- m2 := mr.New()
- if err := (proto.UnmarshalOptions{
- Resolver: extensionResolver{xt},
- }.Unmarshal(bo, m2.Interface())); err != nil {
- return nil, err
- }
- if m2.Has(xtd) {
- mr.Set(xtd, m2.Get(xtd))
- clearUnknown(mr, fieldNum(xt.Field))
- }
- }
-
- // Check whether the message has the extension field set or a default.
- var pv protoreflect.Value
- switch {
- case mr.Has(xtd):
- pv = mr.Get(xtd)
- case xtd.HasDefault():
- pv = xtd.Default()
- default:
- return nil, ErrMissingExtension
- }
-
- v := xt.InterfaceOf(pv)
- rv := reflect.ValueOf(v)
- if isScalarKind(rv.Kind()) {
- rv2 := reflect.New(rv.Type())
- rv2.Elem().Set(rv)
- v = rv2.Interface()
- }
- return v, nil
-}
-
-// extensionResolver is a custom extension resolver that stores a single
-// extension type that takes precedence over the global registry.
-type extensionResolver struct{ xt protoreflect.ExtensionType }
-
-func (r extensionResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
- if xtd := r.xt.TypeDescriptor(); xtd.FullName() == field {
- return r.xt, nil
- }
- return protoregistry.GlobalTypes.FindExtensionByName(field)
-}
-
-func (r extensionResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
- if xtd := r.xt.TypeDescriptor(); xtd.ContainingMessage().FullName() == message && xtd.Number() == field {
- return r.xt, nil
- }
- return protoregistry.GlobalTypes.FindExtensionByNumber(message, field)
-}
-
-// GetExtensions returns a list of the extensions values present in m,
-// corresponding with the provided list of extension descriptors, xts.
-// If an extension is missing in m, the corresponding value is nil.
-func GetExtensions(m Message, xts []*ExtensionDesc) ([]interface{}, error) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return nil, errNotExtendable
- }
-
- vs := make([]interface{}, len(xts))
- for i, xt := range xts {
- v, err := GetExtension(m, xt)
- if err != nil {
- if err == ErrMissingExtension {
- continue
- }
- return vs, err
- }
- vs[i] = v
- }
- return vs, nil
-}
-
-// SetExtension sets an extension field in m to the provided value.
-func SetExtension(m Message, xt *ExtensionDesc, v interface{}) error {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
- return errNotExtendable
- }
-
- rv := reflect.ValueOf(v)
- if reflect.TypeOf(v) != reflect.TypeOf(xt.ExtensionType) {
- return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", v, xt.ExtensionType)
- }
- if rv.Kind() == reflect.Ptr {
- if rv.IsNil() {
- return fmt.Errorf("proto: SetExtension called with nil value of type %T", v)
- }
- if isScalarKind(rv.Elem().Kind()) {
- v = rv.Elem().Interface()
- }
- }
-
- xtd := xt.TypeDescriptor()
- if !isValidExtension(mr.Descriptor(), xtd) {
- return fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m)
- }
- mr.Set(xtd, xt.ValueOf(v))
- clearUnknown(mr, fieldNum(xt.Field))
- return nil
-}
-
-// SetRawExtension inserts b into the unknown fields of m.
-//
-// Deprecated: Use Message.ProtoReflect.SetUnknown instead.
-func SetRawExtension(m Message, fnum int32, b []byte) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return
- }
-
- // Verify that the raw field is valid.
- for b0 := b; len(b0) > 0; {
- num, _, n := protowire.ConsumeField(b0)
- if int32(num) != fnum {
- panic(fmt.Sprintf("mismatching field number: got %d, want %d", num, fnum))
- }
- b0 = b0[n:]
- }
-
- ClearExtension(m, &ExtensionDesc{Field: fnum})
- mr.SetUnknown(append(mr.GetUnknown(), b...))
-}
-
-// ExtensionDescs returns a list of extension descriptors found in m,
-// containing descriptors for both populated extension fields in m and
-// also unknown fields of m that are in the extension range.
-// For the later case, an type incomplete descriptor is provided where only
-// the ExtensionDesc.Field field is populated.
-// The order of the extension descriptors is undefined.
-func ExtensionDescs(m Message) ([]*ExtensionDesc, error) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
- return nil, errNotExtendable
- }
-
- // Collect a set of known extension descriptors.
- extDescs := make(map[protoreflect.FieldNumber]*ExtensionDesc)
- mr.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
- if fd.IsExtension() {
- xt := fd.(protoreflect.ExtensionTypeDescriptor)
- if xd, ok := xt.Type().(*ExtensionDesc); ok {
- extDescs[fd.Number()] = xd
- }
- }
- return true
- })
-
- // Collect a set of unknown extension descriptors.
- extRanges := mr.Descriptor().ExtensionRanges()
- for b := mr.GetUnknown(); len(b) > 0; {
- num, _, n := protowire.ConsumeField(b)
- if extRanges.Has(num) && extDescs[num] == nil {
- extDescs[num] = nil
- }
- b = b[n:]
- }
-
- // Transpose the set of descriptors into a list.
- var xts []*ExtensionDesc
- for num, xt := range extDescs {
- if xt == nil {
- xt = &ExtensionDesc{Field: int32(num)}
- }
- xts = append(xts, xt)
- }
- return xts, nil
-}
-
-// isValidExtension reports whether xtd is a valid extension descriptor for md.
-func isValidExtension(md protoreflect.MessageDescriptor, xtd protoreflect.ExtensionTypeDescriptor) bool {
- return xtd.ContainingMessage() == md && md.ExtensionRanges().Has(xtd.Number())
-}
-
-// isScalarKind reports whether k is a protobuf scalar kind (except bytes).
-// This function exists for historical reasons since the representation of
-// scalars differs between v1 and v2, where v1 uses *T and v2 uses T.
-func isScalarKind(k reflect.Kind) bool {
- switch k {
- case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:
- return true
- default:
- return false
- }
-}
-
-// clearUnknown removes unknown fields from m where remover.Has reports true.
-func clearUnknown(m protoreflect.Message, remover interface {
- Has(protoreflect.FieldNumber) bool
-}) {
- var bo protoreflect.RawFields
- for bi := m.GetUnknown(); len(bi) > 0; {
- num, _, n := protowire.ConsumeField(bi)
- if !remover.Has(num) {
- bo = append(bo, bi[:n]...)
- }
- bi = bi[n:]
- }
- if bi := m.GetUnknown(); len(bi) != len(bo) {
- m.SetUnknown(bo)
- }
-}
-
-type fieldNum protoreflect.FieldNumber
-
-func (n1 fieldNum) Has(n2 protoreflect.FieldNumber) bool {
- return protoreflect.FieldNumber(n1) == n2
-}
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go
deleted file mode 100644
index dcdc2202f..000000000
--- a/vendor/github.com/golang/protobuf/proto/properties.go
+++ /dev/null
@@ -1,306 +0,0 @@
-// Copyright 2010 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.
-
-package proto
-
-import (
- "fmt"
- "reflect"
- "strconv"
- "strings"
- "sync"
-
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-// StructProperties represents protocol buffer type information for a
-// generated protobuf message in the open-struct API.
-//
-// Deprecated: Do not use.
-type StructProperties struct {
- // Prop are the properties for each field.
- //
- // Fields belonging to a oneof are stored in OneofTypes instead, with a
- // single Properties representing the parent oneof held here.
- //
- // The order of Prop matches the order of fields in the Go struct.
- // Struct fields that are not related to protobufs have a "XXX_" prefix
- // in the Properties.Name and must be ignored by the user.
- Prop []*Properties
-
- // OneofTypes contains information about the oneof fields in this message.
- // It is keyed by the protobuf field name.
- OneofTypes map[string]*OneofProperties
-}
-
-// Properties represents the type information for a protobuf message field.
-//
-// Deprecated: Do not use.
-type Properties struct {
- // Name is a placeholder name with little meaningful semantic value.
- // If the name has an "XXX_" prefix, the entire Properties must be ignored.
- Name string
- // OrigName is the protobuf field name or oneof name.
- OrigName string
- // JSONName is the JSON name for the protobuf field.
- JSONName string
- // Enum is a placeholder name for enums.
- // For historical reasons, this is neither the Go name for the enum,
- // nor the protobuf name for the enum.
- Enum string // Deprecated: Do not use.
- // Weak contains the full name of the weakly referenced message.
- Weak string
- // Wire is a string representation of the wire type.
- Wire string
- // WireType is the protobuf wire type for the field.
- WireType int
- // Tag is the protobuf field number.
- Tag int
- // Required reports whether this is a required field.
- Required bool
- // Optional reports whether this is a optional field.
- Optional bool
- // Repeated reports whether this is a repeated field.
- Repeated bool
- // Packed reports whether this is a packed repeated field of scalars.
- Packed bool
- // Proto3 reports whether this field operates under the proto3 syntax.
- Proto3 bool
- // Oneof reports whether this field belongs within a oneof.
- Oneof bool
-
- // Default is the default value in string form.
- Default string
- // HasDefault reports whether the field has a default value.
- HasDefault bool
-
- // MapKeyProp is the properties for the key field for a map field.
- MapKeyProp *Properties
- // MapValProp is the properties for the value field for a map field.
- MapValProp *Properties
-}
-
-// OneofProperties represents the type information for a protobuf oneof.
-//
-// Deprecated: Do not use.
-type OneofProperties struct {
- // Type is a pointer to the generated wrapper type for the field value.
- // This is nil for messages that are not in the open-struct API.
- Type reflect.Type
- // Field is the index into StructProperties.Prop for the containing oneof.
- Field int
- // Prop is the properties for the field.
- Prop *Properties
-}
-
-// String formats the properties in the protobuf struct field tag style.
-func (p *Properties) String() string {
- s := p.Wire
- s += "," + strconv.Itoa(p.Tag)
- if p.Required {
- s += ",req"
- }
- if p.Optional {
- s += ",opt"
- }
- if p.Repeated {
- s += ",rep"
- }
- if p.Packed {
- s += ",packed"
- }
- s += ",name=" + p.OrigName
- if p.JSONName != "" {
- s += ",json=" + p.JSONName
- }
- if len(p.Enum) > 0 {
- s += ",enum=" + p.Enum
- }
- if len(p.Weak) > 0 {
- s += ",weak=" + p.Weak
- }
- if p.Proto3 {
- s += ",proto3"
- }
- if p.Oneof {
- s += ",oneof"
- }
- if p.HasDefault {
- s += ",def=" + p.Default
- }
- return s
-}
-
-// Parse populates p by parsing a string in the protobuf struct field tag style.
-func (p *Properties) Parse(tag string) {
- // For example: "bytes,49,opt,name=foo,def=hello!"
- for len(tag) > 0 {
- i := strings.IndexByte(tag, ',')
- if i < 0 {
- i = len(tag)
- }
- switch s := tag[:i]; {
- case strings.HasPrefix(s, "name="):
- p.OrigName = s[len("name="):]
- case strings.HasPrefix(s, "json="):
- p.JSONName = s[len("json="):]
- case strings.HasPrefix(s, "enum="):
- p.Enum = s[len("enum="):]
- case strings.HasPrefix(s, "weak="):
- p.Weak = s[len("weak="):]
- case strings.Trim(s, "0123456789") == "":
- n, _ := strconv.ParseUint(s, 10, 32)
- p.Tag = int(n)
- case s == "opt":
- p.Optional = true
- case s == "req":
- p.Required = true
- case s == "rep":
- p.Repeated = true
- case s == "varint" || s == "zigzag32" || s == "zigzag64":
- p.Wire = s
- p.WireType = WireVarint
- case s == "fixed32":
- p.Wire = s
- p.WireType = WireFixed32
- case s == "fixed64":
- p.Wire = s
- p.WireType = WireFixed64
- case s == "bytes":
- p.Wire = s
- p.WireType = WireBytes
- case s == "group":
- p.Wire = s
- p.WireType = WireStartGroup
- case s == "packed":
- p.Packed = true
- case s == "proto3":
- p.Proto3 = true
- case s == "oneof":
- p.Oneof = true
- case strings.HasPrefix(s, "def="):
- // The default tag is special in that everything afterwards is the
- // default regardless of the presence of commas.
- p.HasDefault = true
- p.Default, i = tag[len("def="):], len(tag)
- }
- tag = strings.TrimPrefix(tag[i:], ",")
- }
-}
-
-// Init populates the properties from a protocol buffer struct tag.
-//
-// Deprecated: Do not use.
-func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {
- p.Name = name
- p.OrigName = name
- if tag == "" {
- return
- }
- p.Parse(tag)
-
- if typ != nil && typ.Kind() == reflect.Map {
- p.MapKeyProp = new(Properties)
- p.MapKeyProp.Init(nil, "Key", f.Tag.Get("protobuf_key"), nil)
- p.MapValProp = new(Properties)
- p.MapValProp.Init(nil, "Value", f.Tag.Get("protobuf_val"), nil)
- }
-}
-
-var propertiesCache sync.Map // map[reflect.Type]*StructProperties
-
-// GetProperties returns the list of properties for the type represented by t,
-// which must be a generated protocol buffer message in the open-struct API,
-// where protobuf message fields are represented by exported Go struct fields.
-//
-// Deprecated: Use protobuf reflection instead.
-func GetProperties(t reflect.Type) *StructProperties {
- if p, ok := propertiesCache.Load(t); ok {
- return p.(*StructProperties)
- }
- p, _ := propertiesCache.LoadOrStore(t, newProperties(t))
- return p.(*StructProperties)
-}
-
-func newProperties(t reflect.Type) *StructProperties {
- if t.Kind() != reflect.Struct {
- panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t))
- }
-
- var hasOneof bool
- prop := new(StructProperties)
-
- // Construct a list of properties for each field in the struct.
- for i := 0; i < t.NumField(); i++ {
- p := new(Properties)
- f := t.Field(i)
- tagField := f.Tag.Get("protobuf")
- p.Init(f.Type, f.Name, tagField, &f)
-
- tagOneof := f.Tag.Get("protobuf_oneof")
- if tagOneof != "" {
- hasOneof = true
- p.OrigName = tagOneof
- }
-
- // Rename unrelated struct fields with the "XXX_" prefix since so much
- // user code simply checks for this to exclude special fields.
- if tagField == "" && tagOneof == "" && !strings.HasPrefix(p.Name, "XXX_") {
- p.Name = "XXX_" + p.Name
- p.OrigName = "XXX_" + p.OrigName
- } else if p.Weak != "" {
- p.Name = p.OrigName // avoid possible "XXX_" prefix on weak field
- }
-
- prop.Prop = append(prop.Prop, p)
- }
-
- // Construct a mapping of oneof field names to properties.
- if hasOneof {
- var oneofWrappers []interface{}
- if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofFuncs"); ok {
- oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[3].Interface().([]interface{})
- }
- if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofWrappers"); ok {
- oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0].Interface().([]interface{})
- }
- if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(protoreflect.ProtoMessage); ok {
- if m, ok := m.ProtoReflect().(interface{ ProtoMessageInfo() *protoimpl.MessageInfo }); ok {
- oneofWrappers = m.ProtoMessageInfo().OneofWrappers
- }
- }
-
- prop.OneofTypes = make(map[string]*OneofProperties)
- for _, wrapper := range oneofWrappers {
- p := &OneofProperties{
- Type: reflect.ValueOf(wrapper).Type(), // *T
- Prop: new(Properties),
- }
- f := p.Type.Elem().Field(0)
- p.Prop.Name = f.Name
- p.Prop.Parse(f.Tag.Get("protobuf"))
-
- // Determine the struct field that contains this oneof.
- // Each wrapper is assignable to exactly one parent field.
- var foundOneof bool
- for i := 0; i < t.NumField() && !foundOneof; i++ {
- if p.Type.AssignableTo(t.Field(i).Type) {
- p.Field = i
- foundOneof = true
- }
- }
- if !foundOneof {
- panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t))
- }
- prop.OneofTypes[p.Prop.OrigName] = p
- }
- }
-
- return prop
-}
-
-func (sp *StructProperties) Len() int { return len(sp.Prop) }
-func (sp *StructProperties) Less(i, j int) bool { return false }
-func (sp *StructProperties) Swap(i, j int) { return }
diff --git a/vendor/github.com/golang/protobuf/proto/proto.go b/vendor/github.com/golang/protobuf/proto/proto.go
deleted file mode 100644
index 5aee89c32..000000000
--- a/vendor/github.com/golang/protobuf/proto/proto.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2019 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.
-
-// Package proto provides functionality for handling protocol buffer messages.
-// In particular, it provides marshaling and unmarshaling between a protobuf
-// message and the binary wire format.
-//
-// See https://developers.google.com/protocol-buffers/docs/gotutorial for
-// more information.
-//
-// Deprecated: Use the "google.golang.org/protobuf/proto" package instead.
-package proto
-
-import (
- protoV2 "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/runtime/protoiface"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-const (
- ProtoPackageIsVersion1 = true
- ProtoPackageIsVersion2 = true
- ProtoPackageIsVersion3 = true
- ProtoPackageIsVersion4 = true
-)
-
-// GeneratedEnum is any enum type generated by protoc-gen-go
-// which is a named int32 kind.
-// This type exists for documentation purposes.
-type GeneratedEnum interface{}
-
-// GeneratedMessage is any message type generated by protoc-gen-go
-// which is a pointer to a named struct kind.
-// This type exists for documentation purposes.
-type GeneratedMessage interface{}
-
-// Message is a protocol buffer message.
-//
-// This is the v1 version of the message interface and is marginally better
-// than an empty interface as it lacks any method to programatically interact
-// with the contents of the message.
-//
-// A v2 message is declared in "google.golang.org/protobuf/proto".Message and
-// exposes protobuf reflection as a first-class feature of the interface.
-//
-// To convert a v1 message to a v2 message, use the MessageV2 function.
-// To convert a v2 message to a v1 message, use the MessageV1 function.
-type Message = protoiface.MessageV1
-
-// MessageV1 converts either a v1 or v2 message to a v1 message.
-// It returns nil if m is nil.
-func MessageV1(m GeneratedMessage) protoiface.MessageV1 {
- return protoimpl.X.ProtoMessageV1Of(m)
-}
-
-// MessageV2 converts either a v1 or v2 message to a v2 message.
-// It returns nil if m is nil.
-func MessageV2(m GeneratedMessage) protoV2.Message {
- return protoimpl.X.ProtoMessageV2Of(m)
-}
-
-// MessageReflect returns a reflective view for a message.
-// It returns nil if m is nil.
-func MessageReflect(m Message) protoreflect.Message {
- return protoimpl.X.MessageOf(m)
-}
-
-// Marshaler is implemented by messages that can marshal themselves.
-// This interface is used by the following functions: Size, Marshal,
-// Buffer.Marshal, and Buffer.EncodeMessage.
-//
-// Deprecated: Do not implement.
-type Marshaler interface {
- // Marshal formats the encoded bytes of the message.
- // It should be deterministic and emit valid protobuf wire data.
- // The caller takes ownership of the returned buffer.
- Marshal() ([]byte, error)
-}
-
-// Unmarshaler is implemented by messages that can unmarshal themselves.
-// This interface is used by the following functions: Unmarshal, UnmarshalMerge,
-// Buffer.Unmarshal, Buffer.DecodeMessage, and Buffer.DecodeGroup.
-//
-// Deprecated: Do not implement.
-type Unmarshaler interface {
- // Unmarshal parses the encoded bytes of the protobuf wire input.
- // The provided buffer is only valid for during method call.
- // It should not reset the receiver message.
- Unmarshal([]byte) error
-}
-
-// Merger is implemented by messages that can merge themselves.
-// This interface is used by the following functions: Clone and Merge.
-//
-// Deprecated: Do not implement.
-type Merger interface {
- // Merge merges the contents of src into the receiver message.
- // It clones all data structures in src such that it aliases no mutable
- // memory referenced by src.
- Merge(src Message)
-}
-
-// RequiredNotSetError is an error type returned when
-// marshaling or unmarshaling a message with missing required fields.
-type RequiredNotSetError struct {
- err error
-}
-
-func (e *RequiredNotSetError) Error() string {
- if e.err != nil {
- return e.err.Error()
- }
- return "proto: required field not set"
-}
-func (e *RequiredNotSetError) RequiredNotSet() bool {
- return true
-}
-
-func checkRequiredNotSet(m protoV2.Message) error {
- if err := protoV2.CheckInitialized(m); err != nil {
- return &RequiredNotSetError{err: err}
- }
- return nil
-}
-
-// Clone returns a deep copy of src.
-func Clone(src Message) Message {
- return MessageV1(protoV2.Clone(MessageV2(src)))
-}
-
-// Merge merges src into dst, which must be messages of the same type.
-//
-// Populated scalar fields in src are copied to dst, while populated
-// singular messages in src are merged into dst by recursively calling Merge.
-// The elements of every list field in src is appended to the corresponded
-// list fields in dst. The entries of every map field in src is copied into
-// the corresponding map field in dst, possibly replacing existing entries.
-// The unknown fields of src are appended to the unknown fields of dst.
-func Merge(dst, src Message) {
- protoV2.Merge(MessageV2(dst), MessageV2(src))
-}
-
-// Equal reports whether two messages are equal.
-// If two messages marshal to the same bytes under deterministic serialization,
-// then Equal is guaranteed to report true.
-//
-// Two messages are equal if they are the same protobuf message type,
-// have the same set of populated known and extension field values,
-// and the same set of unknown fields values.
-//
-// Scalar values are compared with the equivalent of the == operator in Go,
-// except bytes values which are compared using bytes.Equal and
-// floating point values which specially treat NaNs as equal.
-// Message values are compared by recursively calling Equal.
-// Lists are equal if each element value is also equal.
-// Maps are equal if they have the same set of keys, where the pair of values
-// for each key is also equal.
-func Equal(x, y Message) bool {
- return protoV2.Equal(MessageV2(x), MessageV2(y))
-}
-
-func isMessageSet(md protoreflect.MessageDescriptor) bool {
- ms, ok := md.(interface{ IsMessageSet() bool })
- return ok && ms.IsMessageSet()
-}
diff --git a/vendor/github.com/golang/protobuf/proto/registry.go b/vendor/github.com/golang/protobuf/proto/registry.go
deleted file mode 100644
index 1e7ff6420..000000000
--- a/vendor/github.com/golang/protobuf/proto/registry.go
+++ /dev/null
@@ -1,323 +0,0 @@
-// Copyright 2019 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.
-
-package proto
-
-import (
- "bytes"
- "compress/gzip"
- "fmt"
- "io/ioutil"
- "reflect"
- "strings"
- "sync"
-
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-// filePath is the path to the proto source file.
-type filePath = string // e.g., "google/protobuf/descriptor.proto"
-
-// fileDescGZIP is the compressed contents of the encoded FileDescriptorProto.
-type fileDescGZIP = []byte
-
-var fileCache sync.Map // map[filePath]fileDescGZIP
-
-// RegisterFile is called from generated code to register the compressed
-// FileDescriptorProto with the file path for a proto source file.
-//
-// Deprecated: Use protoregistry.GlobalFiles.RegisterFile instead.
-func RegisterFile(s filePath, d fileDescGZIP) {
- // Decompress the descriptor.
- zr, err := gzip.NewReader(bytes.NewReader(d))
- if err != nil {
- panic(fmt.Sprintf("proto: invalid compressed file descriptor: %v", err))
- }
- b, err := ioutil.ReadAll(zr)
- if err != nil {
- panic(fmt.Sprintf("proto: invalid compressed file descriptor: %v", err))
- }
-
- // Construct a protoreflect.FileDescriptor from the raw descriptor.
- // Note that DescBuilder.Build automatically registers the constructed
- // file descriptor with the v2 registry.
- protoimpl.DescBuilder{RawDescriptor: b}.Build()
-
- // Locally cache the raw descriptor form for the file.
- fileCache.Store(s, d)
-}
-
-// FileDescriptor returns the compressed FileDescriptorProto given the file path
-// for a proto source file. It returns nil if not found.
-//
-// Deprecated: Use protoregistry.GlobalFiles.FindFileByPath instead.
-func FileDescriptor(s filePath) fileDescGZIP {
- if v, ok := fileCache.Load(s); ok {
- return v.(fileDescGZIP)
- }
-
- // Find the descriptor in the v2 registry.
- var b []byte
- if fd, _ := protoregistry.GlobalFiles.FindFileByPath(s); fd != nil {
- if fd, ok := fd.(interface{ ProtoLegacyRawDesc() []byte }); ok {
- b = fd.ProtoLegacyRawDesc()
- } else {
- // TODO: Use protodesc.ToFileDescriptorProto to construct
- // a descriptorpb.FileDescriptorProto and marshal it.
- // However, doing so causes the proto package to have a dependency
- // on descriptorpb, leading to cyclic dependency issues.
- }
- }
-
- // Locally cache the raw descriptor form for the file.
- if len(b) > 0 {
- v, _ := fileCache.LoadOrStore(s, protoimpl.X.CompressGZIP(b))
- return v.(fileDescGZIP)
- }
- return nil
-}
-
-// enumName is the name of an enum. For historical reasons, the enum name is
-// neither the full Go name nor the full protobuf name of the enum.
-// The name is the dot-separated combination of just the proto package that the
-// enum is declared within followed by the Go type name of the generated enum.
-type enumName = string // e.g., "my.proto.package.GoMessage_GoEnum"
-
-// enumsByName maps enum values by name to their numeric counterpart.
-type enumsByName = map[string]int32
-
-// enumsByNumber maps enum values by number to their name counterpart.
-type enumsByNumber = map[int32]string
-
-var enumCache sync.Map // map[enumName]enumsByName
-var numFilesCache sync.Map // map[protoreflect.FullName]int
-
-// RegisterEnum is called from the generated code to register the mapping of
-// enum value names to enum numbers for the enum identified by s.
-//
-// Deprecated: Use protoregistry.GlobalTypes.RegisterEnum instead.
-func RegisterEnum(s enumName, _ enumsByNumber, m enumsByName) {
- if _, ok := enumCache.Load(s); ok {
- panic("proto: duplicate enum registered: " + s)
- }
- enumCache.Store(s, m)
-
- // This does not forward registration to the v2 registry since this API
- // lacks sufficient information to construct a complete v2 enum descriptor.
-}
-
-// EnumValueMap returns the mapping from enum value names to enum numbers for
-// the enum of the given name. It returns nil if not found.
-//
-// Deprecated: Use protoregistry.GlobalTypes.FindEnumByName instead.
-func EnumValueMap(s enumName) enumsByName {
- if v, ok := enumCache.Load(s); ok {
- return v.(enumsByName)
- }
-
- // Check whether the cache is stale. If the number of files in the current
- // package differs, then it means that some enums may have been recently
- // registered upstream that we do not know about.
- var protoPkg protoreflect.FullName
- if i := strings.LastIndexByte(s, '.'); i >= 0 {
- protoPkg = protoreflect.FullName(s[:i])
- }
- v, _ := numFilesCache.Load(protoPkg)
- numFiles, _ := v.(int)
- if protoregistry.GlobalFiles.NumFilesByPackage(protoPkg) == numFiles {
- return nil // cache is up-to-date; was not found earlier
- }
-
- // Update the enum cache for all enums declared in the given proto package.
- numFiles = 0
- protoregistry.GlobalFiles.RangeFilesByPackage(protoPkg, func(fd protoreflect.FileDescriptor) bool {
- walkEnums(fd, func(ed protoreflect.EnumDescriptor) {
- name := protoimpl.X.LegacyEnumName(ed)
- if _, ok := enumCache.Load(name); !ok {
- m := make(enumsByName)
- evs := ed.Values()
- for i := evs.Len() - 1; i >= 0; i-- {
- ev := evs.Get(i)
- m[string(ev.Name())] = int32(ev.Number())
- }
- enumCache.LoadOrStore(name, m)
- }
- })
- numFiles++
- return true
- })
- numFilesCache.Store(protoPkg, numFiles)
-
- // Check cache again for enum map.
- if v, ok := enumCache.Load(s); ok {
- return v.(enumsByName)
- }
- return nil
-}
-
-// walkEnums recursively walks all enums declared in d.
-func walkEnums(d interface {
- Enums() protoreflect.EnumDescriptors
- Messages() protoreflect.MessageDescriptors
-}, f func(protoreflect.EnumDescriptor)) {
- eds := d.Enums()
- for i := eds.Len() - 1; i >= 0; i-- {
- f(eds.Get(i))
- }
- mds := d.Messages()
- for i := mds.Len() - 1; i >= 0; i-- {
- walkEnums(mds.Get(i), f)
- }
-}
-
-// messageName is the full name of protobuf message.
-type messageName = string
-
-var messageTypeCache sync.Map // map[messageName]reflect.Type
-
-// RegisterType is called from generated code to register the message Go type
-// for a message of the given name.
-//
-// Deprecated: Use protoregistry.GlobalTypes.RegisterMessage instead.
-func RegisterType(m Message, s messageName) {
- mt := protoimpl.X.LegacyMessageTypeOf(m, protoreflect.FullName(s))
- if err := protoregistry.GlobalTypes.RegisterMessage(mt); err != nil {
- panic(err)
- }
- messageTypeCache.Store(s, reflect.TypeOf(m))
-}
-
-// RegisterMapType is called from generated code to register the Go map type
-// for a protobuf message representing a map entry.
-//
-// Deprecated: Do not use.
-func RegisterMapType(m interface{}, s messageName) {
- t := reflect.TypeOf(m)
- if t.Kind() != reflect.Map {
- panic(fmt.Sprintf("invalid map kind: %v", t))
- }
- if _, ok := messageTypeCache.Load(s); ok {
- panic(fmt.Errorf("proto: duplicate proto message registered: %s", s))
- }
- messageTypeCache.Store(s, t)
-}
-
-// MessageType returns the message type for a named message.
-// It returns nil if not found.
-//
-// Deprecated: Use protoregistry.GlobalTypes.FindMessageByName instead.
-func MessageType(s messageName) reflect.Type {
- if v, ok := messageTypeCache.Load(s); ok {
- return v.(reflect.Type)
- }
-
- // Derive the message type from the v2 registry.
- var t reflect.Type
- if mt, _ := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(s)); mt != nil {
- t = messageGoType(mt)
- }
-
- // If we could not get a concrete type, it is possible that it is a
- // pseudo-message for a map entry.
- if t == nil {
- d, _ := protoregistry.GlobalFiles.FindDescriptorByName(protoreflect.FullName(s))
- if md, _ := d.(protoreflect.MessageDescriptor); md != nil && md.IsMapEntry() {
- kt := goTypeForField(md.Fields().ByNumber(1))
- vt := goTypeForField(md.Fields().ByNumber(2))
- t = reflect.MapOf(kt, vt)
- }
- }
-
- // Locally cache the message type for the given name.
- if t != nil {
- v, _ := messageTypeCache.LoadOrStore(s, t)
- return v.(reflect.Type)
- }
- return nil
-}
-
-func goTypeForField(fd protoreflect.FieldDescriptor) reflect.Type {
- switch k := fd.Kind(); k {
- case protoreflect.EnumKind:
- if et, _ := protoregistry.GlobalTypes.FindEnumByName(fd.Enum().FullName()); et != nil {
- return enumGoType(et)
- }
- return reflect.TypeOf(protoreflect.EnumNumber(0))
- case protoreflect.MessageKind, protoreflect.GroupKind:
- if mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()); mt != nil {
- return messageGoType(mt)
- }
- return reflect.TypeOf((*protoreflect.Message)(nil)).Elem()
- default:
- return reflect.TypeOf(fd.Default().Interface())
- }
-}
-
-func enumGoType(et protoreflect.EnumType) reflect.Type {
- return reflect.TypeOf(et.New(0))
-}
-
-func messageGoType(mt protoreflect.MessageType) reflect.Type {
- return reflect.TypeOf(MessageV1(mt.Zero().Interface()))
-}
-
-// MessageName returns the full protobuf name for the given message type.
-//
-// Deprecated: Use protoreflect.MessageDescriptor.FullName instead.
-func MessageName(m Message) messageName {
- if m == nil {
- return ""
- }
- if m, ok := m.(interface{ XXX_MessageName() messageName }); ok {
- return m.XXX_MessageName()
- }
- return messageName(protoimpl.X.MessageDescriptorOf(m).FullName())
-}
-
-// RegisterExtension is called from the generated code to register
-// the extension descriptor.
-//
-// Deprecated: Use protoregistry.GlobalTypes.RegisterExtension instead.
-func RegisterExtension(d *ExtensionDesc) {
- if err := protoregistry.GlobalTypes.RegisterExtension(d); err != nil {
- panic(err)
- }
-}
-
-type extensionsByNumber = map[int32]*ExtensionDesc
-
-var extensionCache sync.Map // map[messageName]extensionsByNumber
-
-// RegisteredExtensions returns a map of the registered extensions for the
-// provided protobuf message, indexed by the extension field number.
-//
-// Deprecated: Use protoregistry.GlobalTypes.RangeExtensionsByMessage instead.
-func RegisteredExtensions(m Message) extensionsByNumber {
- // Check whether the cache is stale. If the number of extensions for
- // the given message differs, then it means that some extensions were
- // recently registered upstream that we do not know about.
- s := MessageName(m)
- v, _ := extensionCache.Load(s)
- xs, _ := v.(extensionsByNumber)
- if protoregistry.GlobalTypes.NumExtensionsByMessage(protoreflect.FullName(s)) == len(xs) {
- return xs // cache is up-to-date
- }
-
- // Cache is stale, re-compute the extensions map.
- xs = make(extensionsByNumber)
- protoregistry.GlobalTypes.RangeExtensionsByMessage(protoreflect.FullName(s), func(xt protoreflect.ExtensionType) bool {
- if xd, ok := xt.(*ExtensionDesc); ok {
- xs[int32(xt.TypeDescriptor().Number())] = xd
- } else {
- // TODO: This implies that the protoreflect.ExtensionType is a
- // custom type not generated by protoc-gen-go. We could try and
- // convert the type to an ExtensionDesc.
- }
- return true
- })
- extensionCache.Store(s, xs)
- return xs
-}
diff --git a/vendor/github.com/golang/protobuf/proto/text_decode.go b/vendor/github.com/golang/protobuf/proto/text_decode.go
deleted file mode 100644
index 4a5931009..000000000
--- a/vendor/github.com/golang/protobuf/proto/text_decode.go
+++ /dev/null
@@ -1,801 +0,0 @@
-// Copyright 2010 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.
-
-package proto
-
-import (
- "encoding"
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "strings"
- "unicode/utf8"
-
- "google.golang.org/protobuf/encoding/prototext"
- protoV2 "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
-)
-
-const wrapTextUnmarshalV2 = false
-
-// ParseError is returned by UnmarshalText.
-type ParseError struct {
- Message string
-
- // Deprecated: Do not use.
- Line, Offset int
-}
-
-func (e *ParseError) Error() string {
- if wrapTextUnmarshalV2 {
- return e.Message
- }
- if e.Line == 1 {
- return fmt.Sprintf("line 1.%d: %v", e.Offset, e.Message)
- }
- return fmt.Sprintf("line %d: %v", e.Line, e.Message)
-}
-
-// UnmarshalText parses a proto text formatted string into m.
-func UnmarshalText(s string, m Message) error {
- if u, ok := m.(encoding.TextUnmarshaler); ok {
- return u.UnmarshalText([]byte(s))
- }
-
- m.Reset()
- mi := MessageV2(m)
-
- if wrapTextUnmarshalV2 {
- err := prototext.UnmarshalOptions{
- AllowPartial: true,
- }.Unmarshal([]byte(s), mi)
- if err != nil {
- return &ParseError{Message: err.Error()}
- }
- return checkRequiredNotSet(mi)
- } else {
- if err := newTextParser(s).unmarshalMessage(mi.ProtoReflect(), ""); err != nil {
- return err
- }
- return checkRequiredNotSet(mi)
- }
-}
-
-type textParser struct {
- s string // remaining input
- done bool // whether the parsing is finished (success or error)
- backed bool // whether back() was called
- offset, line int
- cur token
-}
-
-type token struct {
- value string
- err *ParseError
- line int // line number
- offset int // byte number from start of input, not start of line
- unquoted string // the unquoted version of value, if it was a quoted string
-}
-
-func newTextParser(s string) *textParser {
- p := new(textParser)
- p.s = s
- p.line = 1
- p.cur.line = 1
- return p
-}
-
-func (p *textParser) unmarshalMessage(m protoreflect.Message, terminator string) (err error) {
- md := m.Descriptor()
- fds := md.Fields()
-
- // A struct is a sequence of "name: value", terminated by one of
- // '>' or '}', or the end of the input. A name may also be
- // "[extension]" or "[type/url]".
- //
- // The whole struct can also be an expanded Any message, like:
- // [type/url] < ... struct contents ... >
- seen := make(map[protoreflect.FieldNumber]bool)
- for {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == terminator {
- break
- }
- if tok.value == "[" {
- if err := p.unmarshalExtensionOrAny(m, seen); err != nil {
- return err
- }
- continue
- }
-
- // This is a normal, non-extension field.
- name := protoreflect.Name(tok.value)
- fd := fds.ByName(name)
- switch {
- case fd == nil:
- gd := fds.ByName(protoreflect.Name(strings.ToLower(string(name))))
- if gd != nil && gd.Kind() == protoreflect.GroupKind && gd.Message().Name() == name {
- fd = gd
- }
- case fd.Kind() == protoreflect.GroupKind && fd.Message().Name() != name:
- fd = nil
- case fd.IsWeak() && fd.Message().IsPlaceholder():
- fd = nil
- }
- if fd == nil {
- typeName := string(md.FullName())
- if m, ok := m.Interface().(Message); ok {
- t := reflect.TypeOf(m)
- if t.Kind() == reflect.Ptr {
- typeName = t.Elem().String()
- }
- }
- return p.errorf("unknown field name %q in %v", name, typeName)
- }
- if od := fd.ContainingOneof(); od != nil && m.WhichOneof(od) != nil {
- return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, od.Name())
- }
- if fd.Cardinality() != protoreflect.Repeated && seen[fd.Number()] {
- return p.errorf("non-repeated field %q was repeated", fd.Name())
- }
- seen[fd.Number()] = true
-
- // Consume any colon.
- if err := p.checkForColon(fd); err != nil {
- return err
- }
-
- // Parse into the field.
- v := m.Get(fd)
- if !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) {
- v = m.Mutable(fd)
- }
- if v, err = p.unmarshalValue(v, fd); err != nil {
- return err
- }
- m.Set(fd, v)
-
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (p *textParser) unmarshalExtensionOrAny(m protoreflect.Message, seen map[protoreflect.FieldNumber]bool) error {
- name, err := p.consumeExtensionOrAnyName()
- if err != nil {
- return err
- }
-
- // If it contains a slash, it's an Any type URL.
- if slashIdx := strings.LastIndex(name, "/"); slashIdx >= 0 {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- // consume an optional colon
- if tok.value == ":" {
- tok = p.next()
- if tok.err != nil {
- return tok.err
- }
- }
-
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
-
- mt, err := protoregistry.GlobalTypes.FindMessageByURL(name)
- if err != nil {
- return p.errorf("unrecognized message %q in google.protobuf.Any", name[slashIdx+len("/"):])
- }
- m2 := mt.New()
- if err := p.unmarshalMessage(m2, terminator); err != nil {
- return err
- }
- b, err := protoV2.Marshal(m2.Interface())
- if err != nil {
- return p.errorf("failed to marshal message of type %q: %v", name[slashIdx+len("/"):], err)
- }
-
- urlFD := m.Descriptor().Fields().ByName("type_url")
- valFD := m.Descriptor().Fields().ByName("value")
- if seen[urlFD.Number()] {
- return p.errorf("Any message unpacked multiple times, or %q already set", urlFD.Name())
- }
- if seen[valFD.Number()] {
- return p.errorf("Any message unpacked multiple times, or %q already set", valFD.Name())
- }
- m.Set(urlFD, protoreflect.ValueOfString(name))
- m.Set(valFD, protoreflect.ValueOfBytes(b))
- seen[urlFD.Number()] = true
- seen[valFD.Number()] = true
- return nil
- }
-
- xname := protoreflect.FullName(name)
- xt, _ := protoregistry.GlobalTypes.FindExtensionByName(xname)
- if xt == nil && isMessageSet(m.Descriptor()) {
- xt, _ = protoregistry.GlobalTypes.FindExtensionByName(xname.Append("message_set_extension"))
- }
- if xt == nil {
- return p.errorf("unrecognized extension %q", name)
- }
- fd := xt.TypeDescriptor()
- if fd.ContainingMessage().FullName() != m.Descriptor().FullName() {
- return p.errorf("extension field %q does not extend message %q", name, m.Descriptor().FullName())
- }
-
- if err := p.checkForColon(fd); err != nil {
- return err
- }
-
- v := m.Get(fd)
- if !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) {
- v = m.Mutable(fd)
- }
- v, err = p.unmarshalValue(v, fd)
- if err != nil {
- return err
- }
- m.Set(fd, v)
- return p.consumeOptionalSeparator()
-}
-
-func (p *textParser) unmarshalValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {
- tok := p.next()
- if tok.err != nil {
- return v, tok.err
- }
- if tok.value == "" {
- return v, p.errorf("unexpected EOF")
- }
-
- switch {
- case fd.IsList():
- lv := v.List()
- var err error
- if tok.value == "[" {
- // Repeated field with list notation, like [1,2,3].
- for {
- vv := lv.NewElement()
- vv, err = p.unmarshalSingularValue(vv, fd)
- if err != nil {
- return v, err
- }
- lv.Append(vv)
-
- tok := p.next()
- if tok.err != nil {
- return v, tok.err
- }
- if tok.value == "]" {
- break
- }
- if tok.value != "," {
- return v, p.errorf("Expected ']' or ',' found %q", tok.value)
- }
- }
- return v, nil
- }
-
- // One value of the repeated field.
- p.back()
- vv := lv.NewElement()
- vv, err = p.unmarshalSingularValue(vv, fd)
- if err != nil {
- return v, err
- }
- lv.Append(vv)
- return v, nil
- case fd.IsMap():
- // The map entry should be this sequence of tokens:
- // < key : KEY value : VALUE >
- // However, implementations may omit key or value, and technically
- // we should support them in any order.
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return v, p.errorf("expected '{' or '<', found %q", tok.value)
- }
-
- keyFD := fd.MapKey()
- valFD := fd.MapValue()
-
- mv := v.Map()
- kv := keyFD.Default()
- vv := mv.NewValue()
- for {
- tok := p.next()
- if tok.err != nil {
- return v, tok.err
- }
- if tok.value == terminator {
- break
- }
- var err error
- switch tok.value {
- case "key":
- if err := p.consumeToken(":"); err != nil {
- return v, err
- }
- if kv, err = p.unmarshalSingularValue(kv, keyFD); err != nil {
- return v, err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return v, err
- }
- case "value":
- if err := p.checkForColon(valFD); err != nil {
- return v, err
- }
- if vv, err = p.unmarshalSingularValue(vv, valFD); err != nil {
- return v, err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return v, err
- }
- default:
- p.back()
- return v, p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value)
- }
- }
- mv.Set(kv.MapKey(), vv)
- return v, nil
- default:
- p.back()
- return p.unmarshalSingularValue(v, fd)
- }
-}
-
-func (p *textParser) unmarshalSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {
- tok := p.next()
- if tok.err != nil {
- return v, tok.err
- }
- if tok.value == "" {
- return v, p.errorf("unexpected EOF")
- }
-
- switch fd.Kind() {
- case protoreflect.BoolKind:
- switch tok.value {
- case "true", "1", "t", "True":
- return protoreflect.ValueOfBool(true), nil
- case "false", "0", "f", "False":
- return protoreflect.ValueOfBool(false), nil
- }
- case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
- if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
- return protoreflect.ValueOfInt32(int32(x)), nil
- }
-
- // The C++ parser accepts large positive hex numbers that uses
- // two's complement arithmetic to represent negative numbers.
- // This feature is here for backwards compatibility with C++.
- if strings.HasPrefix(tok.value, "0x") {
- if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- return protoreflect.ValueOfInt32(int32(-(int64(^x) + 1))), nil
- }
- }
- case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
- if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil {
- return protoreflect.ValueOfInt64(int64(x)), nil
- }
-
- // The C++ parser accepts large positive hex numbers that uses
- // two's complement arithmetic to represent negative numbers.
- // This feature is here for backwards compatibility with C++.
- if strings.HasPrefix(tok.value, "0x") {
- if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {
- return protoreflect.ValueOfInt64(int64(-(int64(^x) + 1))), nil
- }
- }
- case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
- if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- return protoreflect.ValueOfUint32(uint32(x)), nil
- }
- case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
- if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {
- return protoreflect.ValueOfUint64(uint64(x)), nil
- }
- case protoreflect.FloatKind:
- // Ignore 'f' for compatibility with output generated by C++,
- // but don't remove 'f' when the value is "-inf" or "inf".
- v := tok.value
- if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" {
- v = v[:len(v)-len("f")]
- }
- if x, err := strconv.ParseFloat(v, 32); err == nil {
- return protoreflect.ValueOfFloat32(float32(x)), nil
- }
- case protoreflect.DoubleKind:
- // Ignore 'f' for compatibility with output generated by C++,
- // but don't remove 'f' when the value is "-inf" or "inf".
- v := tok.value
- if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" {
- v = v[:len(v)-len("f")]
- }
- if x, err := strconv.ParseFloat(v, 64); err == nil {
- return protoreflect.ValueOfFloat64(float64(x)), nil
- }
- case protoreflect.StringKind:
- if isQuote(tok.value[0]) {
- return protoreflect.ValueOfString(tok.unquoted), nil
- }
- case protoreflect.BytesKind:
- if isQuote(tok.value[0]) {
- return protoreflect.ValueOfBytes([]byte(tok.unquoted)), nil
- }
- case protoreflect.EnumKind:
- if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
- return protoreflect.ValueOfEnum(protoreflect.EnumNumber(x)), nil
- }
- vd := fd.Enum().Values().ByName(protoreflect.Name(tok.value))
- if vd != nil {
- return protoreflect.ValueOfEnum(vd.Number()), nil
- }
- case protoreflect.MessageKind, protoreflect.GroupKind:
- var terminator string
- switch tok.value {
- case "{":
- terminator = "}"
- case "<":
- terminator = ">"
- default:
- return v, p.errorf("expected '{' or '<', found %q", tok.value)
- }
- err := p.unmarshalMessage(v.Message(), terminator)
- return v, err
- default:
- panic(fmt.Sprintf("invalid kind %v", fd.Kind()))
- }
- return v, p.errorf("invalid %v: %v", fd.Kind(), tok.value)
-}
-
-// Consume a ':' from the input stream (if the next token is a colon),
-// returning an error if a colon is needed but not present.
-func (p *textParser) checkForColon(fd protoreflect.FieldDescriptor) *ParseError {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ":" {
- if fd.Message() == nil {
- return p.errorf("expected ':', found %q", tok.value)
- }
- p.back()
- }
- return nil
-}
-
-// consumeExtensionOrAnyName consumes an extension name or an Any type URL and
-// the following ']'. It returns the name or URL consumed.
-func (p *textParser) consumeExtensionOrAnyName() (string, error) {
- tok := p.next()
- if tok.err != nil {
- return "", tok.err
- }
-
- // If extension name or type url is quoted, it's a single token.
- if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] {
- name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0]))
- if err != nil {
- return "", err
- }
- return name, p.consumeToken("]")
- }
-
- // Consume everything up to "]"
- var parts []string
- for tok.value != "]" {
- parts = append(parts, tok.value)
- tok = p.next()
- if tok.err != nil {
- return "", p.errorf("unrecognized type_url or extension name: %s", tok.err)
- }
- if p.done && tok.value != "]" {
- return "", p.errorf("unclosed type_url or extension name")
- }
- }
- return strings.Join(parts, ""), nil
-}
-
-// consumeOptionalSeparator consumes an optional semicolon or comma.
-// It is used in unmarshalMessage to provide backward compatibility.
-func (p *textParser) consumeOptionalSeparator() error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ";" && tok.value != "," {
- p.back()
- }
- return nil
-}
-
-func (p *textParser) errorf(format string, a ...interface{}) *ParseError {
- pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset}
- p.cur.err = pe
- p.done = true
- return pe
-}
-
-func (p *textParser) skipWhitespace() {
- i := 0
- for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') {
- if p.s[i] == '#' {
- // comment; skip to end of line or input
- for i < len(p.s) && p.s[i] != '\n' {
- i++
- }
- if i == len(p.s) {
- break
- }
- }
- if p.s[i] == '\n' {
- p.line++
- }
- i++
- }
- p.offset += i
- p.s = p.s[i:len(p.s)]
- if len(p.s) == 0 {
- p.done = true
- }
-}
-
-func (p *textParser) advance() {
- // Skip whitespace
- p.skipWhitespace()
- if p.done {
- return
- }
-
- // Start of non-whitespace
- p.cur.err = nil
- p.cur.offset, p.cur.line = p.offset, p.line
- p.cur.unquoted = ""
- switch p.s[0] {
- case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/':
- // Single symbol
- p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)]
- case '"', '\'':
- // Quoted string
- i := 1
- for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' {
- if p.s[i] == '\\' && i+1 < len(p.s) {
- // skip escaped char
- i++
- }
- i++
- }
- if i >= len(p.s) || p.s[i] != p.s[0] {
- p.errorf("unmatched quote")
- return
- }
- unq, err := unquoteC(p.s[1:i], rune(p.s[0]))
- if err != nil {
- p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err)
- return
- }
- p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)]
- p.cur.unquoted = unq
- default:
- i := 0
- for i < len(p.s) && isIdentOrNumberChar(p.s[i]) {
- i++
- }
- if i == 0 {
- p.errorf("unexpected byte %#x", p.s[0])
- return
- }
- p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)]
- }
- p.offset += len(p.cur.value)
-}
-
-// Back off the parser by one token. Can only be done between calls to next().
-// It makes the next advance() a no-op.
-func (p *textParser) back() { p.backed = true }
-
-// Advances the parser and returns the new current token.
-func (p *textParser) next() *token {
- if p.backed || p.done {
- p.backed = false
- return &p.cur
- }
- p.advance()
- if p.done {
- p.cur.value = ""
- } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) {
- // Look for multiple quoted strings separated by whitespace,
- // and concatenate them.
- cat := p.cur
- for {
- p.skipWhitespace()
- if p.done || !isQuote(p.s[0]) {
- break
- }
- p.advance()
- if p.cur.err != nil {
- return &p.cur
- }
- cat.value += " " + p.cur.value
- cat.unquoted += p.cur.unquoted
- }
- p.done = false // parser may have seen EOF, but we want to return cat
- p.cur = cat
- }
- return &p.cur
-}
-
-func (p *textParser) consumeToken(s string) error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != s {
- p.back()
- return p.errorf("expected %q, found %q", s, tok.value)
- }
- return nil
-}
-
-var errBadUTF8 = errors.New("proto: bad UTF-8")
-
-func unquoteC(s string, quote rune) (string, error) {
- // This is based on C++'s tokenizer.cc.
- // Despite its name, this is *not* parsing C syntax.
- // For instance, "\0" is an invalid quoted string.
-
- // Avoid allocation in trivial cases.
- simple := true
- for _, r := range s {
- if r == '\\' || r == quote {
- simple = false
- break
- }
- }
- if simple {
- return s, nil
- }
-
- buf := make([]byte, 0, 3*len(s)/2)
- for len(s) > 0 {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", errBadUTF8
- }
- s = s[n:]
- if r != '\\' {
- if r < utf8.RuneSelf {
- buf = append(buf, byte(r))
- } else {
- buf = append(buf, string(r)...)
- }
- continue
- }
-
- ch, tail, err := unescape(s)
- if err != nil {
- return "", err
- }
- buf = append(buf, ch...)
- s = tail
- }
- return string(buf), nil
-}
-
-func unescape(s string) (ch string, tail string, err error) {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", "", errBadUTF8
- }
- s = s[n:]
- switch r {
- case 'a':
- return "\a", s, nil
- case 'b':
- return "\b", s, nil
- case 'f':
- return "\f", s, nil
- case 'n':
- return "\n", s, nil
- case 'r':
- return "\r", s, nil
- case 't':
- return "\t", s, nil
- case 'v':
- return "\v", s, nil
- case '?':
- return "?", s, nil // trigraph workaround
- case '\'', '"', '\\':
- return string(r), s, nil
- case '0', '1', '2', '3', '4', '5', '6', '7':
- if len(s) < 2 {
- return "", "", fmt.Errorf(`\%c requires 2 following digits`, r)
- }
- ss := string(r) + s[:2]
- s = s[2:]
- i, err := strconv.ParseUint(ss, 8, 8)
- if err != nil {
- return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss)
- }
- return string([]byte{byte(i)}), s, nil
- case 'x', 'X', 'u', 'U':
- var n int
- switch r {
- case 'x', 'X':
- n = 2
- case 'u':
- n = 4
- case 'U':
- n = 8
- }
- if len(s) < n {
- return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n)
- }
- ss := s[:n]
- s = s[n:]
- i, err := strconv.ParseUint(ss, 16, 64)
- if err != nil {
- return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss)
- }
- if r == 'x' || r == 'X' {
- return string([]byte{byte(i)}), s, nil
- }
- if i > utf8.MaxRune {
- return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss)
- }
- return string(i), s, nil
- }
- return "", "", fmt.Errorf(`unknown escape \%c`, r)
-}
-
-func isIdentOrNumberChar(c byte) bool {
- switch {
- case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z':
- return true
- case '0' <= c && c <= '9':
- return true
- }
- switch c {
- case '-', '+', '.', '_':
- return true
- }
- return false
-}
-
-func isWhitespace(c byte) bool {
- switch c {
- case ' ', '\t', '\n', '\r':
- return true
- }
- return false
-}
-
-func isQuote(c byte) bool {
- switch c {
- case '"', '\'':
- return true
- }
- return false
-}
diff --git a/vendor/github.com/golang/protobuf/proto/text_encode.go b/vendor/github.com/golang/protobuf/proto/text_encode.go
deleted file mode 100644
index a31134eeb..000000000
--- a/vendor/github.com/golang/protobuf/proto/text_encode.go
+++ /dev/null
@@ -1,560 +0,0 @@
-// Copyright 2010 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.
-
-package proto
-
-import (
- "bytes"
- "encoding"
- "fmt"
- "io"
- "math"
- "sort"
- "strings"
-
- "google.golang.org/protobuf/encoding/prototext"
- "google.golang.org/protobuf/encoding/protowire"
- "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
-)
-
-const wrapTextMarshalV2 = false
-
-// TextMarshaler is a configurable text format marshaler.
-type TextMarshaler struct {
- Compact bool // use compact text format (one line)
- ExpandAny bool // expand google.protobuf.Any messages of known types
-}
-
-// Marshal writes the proto text format of m to w.
-func (tm *TextMarshaler) Marshal(w io.Writer, m Message) error {
- b, err := tm.marshal(m)
- if len(b) > 0 {
- if _, err := w.Write(b); err != nil {
- return err
- }
- }
- return err
-}
-
-// Text returns a proto text formatted string of m.
-func (tm *TextMarshaler) Text(m Message) string {
- b, _ := tm.marshal(m)
- return string(b)
-}
-
-func (tm *TextMarshaler) marshal(m Message) ([]byte, error) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return []byte(""), nil
- }
-
- if wrapTextMarshalV2 {
- if m, ok := m.(encoding.TextMarshaler); ok {
- return m.MarshalText()
- }
-
- opts := prototext.MarshalOptions{
- AllowPartial: true,
- EmitUnknown: true,
- }
- if !tm.Compact {
- opts.Indent = " "
- }
- if !tm.ExpandAny {
- opts.Resolver = (*protoregistry.Types)(nil)
- }
- return opts.Marshal(mr.Interface())
- } else {
- w := &textWriter{
- compact: tm.Compact,
- expandAny: tm.ExpandAny,
- complete: true,
- }
-
- if m, ok := m.(encoding.TextMarshaler); ok {
- b, err := m.MarshalText()
- if err != nil {
- return nil, err
- }
- w.Write(b)
- return w.buf, nil
- }
-
- err := w.writeMessage(mr)
- return w.buf, err
- }
-}
-
-var (
- defaultTextMarshaler = TextMarshaler{}
- compactTextMarshaler = TextMarshaler{Compact: true}
-)
-
-// MarshalText writes the proto text format of m to w.
-func MarshalText(w io.Writer, m Message) error { return defaultTextMarshaler.Marshal(w, m) }
-
-// MarshalTextString returns a proto text formatted string of m.
-func MarshalTextString(m Message) string { return defaultTextMarshaler.Text(m) }
-
-// CompactText writes the compact proto text format of m to w.
-func CompactText(w io.Writer, m Message) error { return compactTextMarshaler.Marshal(w, m) }
-
-// CompactTextString returns a compact proto text formatted string of m.
-func CompactTextString(m Message) string { return compactTextMarshaler.Text(m) }
-
-var (
- newline = []byte("\n")
- endBraceNewline = []byte("}\n")
- posInf = []byte("inf")
- negInf = []byte("-inf")
- nan = []byte("nan")
-)
-
-// textWriter is an io.Writer that tracks its indentation level.
-type textWriter struct {
- compact bool // same as TextMarshaler.Compact
- expandAny bool // same as TextMarshaler.ExpandAny
- complete bool // whether the current position is a complete line
- indent int // indentation level; never negative
- buf []byte
-}
-
-func (w *textWriter) Write(p []byte) (n int, _ error) {
- newlines := bytes.Count(p, newline)
- if newlines == 0 {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.buf = append(w.buf, p...)
- w.complete = false
- return len(p), nil
- }
-
- frags := bytes.SplitN(p, newline, newlines+1)
- if w.compact {
- for i, frag := range frags {
- if i > 0 {
- w.buf = append(w.buf, ' ')
- n++
- }
- w.buf = append(w.buf, frag...)
- n += len(frag)
- }
- return n, nil
- }
-
- for i, frag := range frags {
- if w.complete {
- w.writeIndent()
- }
- w.buf = append(w.buf, frag...)
- n += len(frag)
- if i+1 < len(frags) {
- w.buf = append(w.buf, '\n')
- n++
- }
- }
- w.complete = len(frags[len(frags)-1]) == 0
- return n, nil
-}
-
-func (w *textWriter) WriteByte(c byte) error {
- if w.compact && c == '\n' {
- c = ' '
- }
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.buf = append(w.buf, c)
- w.complete = c == '\n'
- return nil
-}
-
-func (w *textWriter) writeName(fd protoreflect.FieldDescriptor) {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.complete = false
-
- if fd.Kind() != protoreflect.GroupKind {
- w.buf = append(w.buf, fd.Name()...)
- w.WriteByte(':')
- } else {
- // Use message type name for group field name.
- w.buf = append(w.buf, fd.Message().Name()...)
- }
-
- if !w.compact {
- w.WriteByte(' ')
- }
-}
-
-func requiresQuotes(u string) bool {
- // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted.
- for _, ch := range u {
- switch {
- case ch == '.' || ch == '/' || ch == '_':
- continue
- case '0' <= ch && ch <= '9':
- continue
- case 'A' <= ch && ch <= 'Z':
- continue
- case 'a' <= ch && ch <= 'z':
- continue
- default:
- return true
- }
- }
- return false
-}
-
-// writeProto3Any writes an expanded google.protobuf.Any message.
-//
-// It returns (false, nil) if sv value can't be unmarshaled (e.g. because
-// required messages are not linked in).
-//
-// It returns (true, error) when sv was written in expanded format or an error
-// was encountered.
-func (w *textWriter) writeProto3Any(m protoreflect.Message) (bool, error) {
- md := m.Descriptor()
- fdURL := md.Fields().ByName("type_url")
- fdVal := md.Fields().ByName("value")
-
- url := m.Get(fdURL).String()
- mt, err := protoregistry.GlobalTypes.FindMessageByURL(url)
- if err != nil {
- return false, nil
- }
-
- b := m.Get(fdVal).Bytes()
- m2 := mt.New()
- if err := proto.Unmarshal(b, m2.Interface()); err != nil {
- return false, nil
- }
- w.Write([]byte("["))
- if requiresQuotes(url) {
- w.writeQuotedString(url)
- } else {
- w.Write([]byte(url))
- }
- if w.compact {
- w.Write([]byte("]:<"))
- } else {
- w.Write([]byte("]: <\n"))
- w.indent++
- }
- if err := w.writeMessage(m2); err != nil {
- return true, err
- }
- if w.compact {
- w.Write([]byte("> "))
- } else {
- w.indent--
- w.Write([]byte(">\n"))
- }
- return true, nil
-}
-
-func (w *textWriter) writeMessage(m protoreflect.Message) error {
- md := m.Descriptor()
- if w.expandAny && md.FullName() == "google.protobuf.Any" {
- if canExpand, err := w.writeProto3Any(m); canExpand {
- return err
- }
- }
-
- fds := md.Fields()
- for i := 0; i < fds.Len(); {
- fd := fds.Get(i)
- if od := fd.ContainingOneof(); od != nil {
- fd = m.WhichOneof(od)
- i += od.Fields().Len()
- } else {
- i++
- }
- if fd == nil || !m.Has(fd) {
- continue
- }
-
- switch {
- case fd.IsList():
- lv := m.Get(fd).List()
- for j := 0; j < lv.Len(); j++ {
- w.writeName(fd)
- v := lv.Get(j)
- if err := w.writeSingularValue(v, fd); err != nil {
- return err
- }
- w.WriteByte('\n')
- }
- case fd.IsMap():
- kfd := fd.MapKey()
- vfd := fd.MapValue()
- mv := m.Get(fd).Map()
-
- type entry struct{ key, val protoreflect.Value }
- var entries []entry
- mv.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {
- entries = append(entries, entry{k.Value(), v})
- return true
- })
- sort.Slice(entries, func(i, j int) bool {
- switch kfd.Kind() {
- case protoreflect.BoolKind:
- return !entries[i].key.Bool() && entries[j].key.Bool()
- case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
- return entries[i].key.Int() < entries[j].key.Int()
- case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
- return entries[i].key.Uint() < entries[j].key.Uint()
- case protoreflect.StringKind:
- return entries[i].key.String() < entries[j].key.String()
- default:
- panic("invalid kind")
- }
- })
- for _, entry := range entries {
- w.writeName(fd)
- w.WriteByte('<')
- if !w.compact {
- w.WriteByte('\n')
- }
- w.indent++
- w.writeName(kfd)
- if err := w.writeSingularValue(entry.key, kfd); err != nil {
- return err
- }
- w.WriteByte('\n')
- w.writeName(vfd)
- if err := w.writeSingularValue(entry.val, vfd); err != nil {
- return err
- }
- w.WriteByte('\n')
- w.indent--
- w.WriteByte('>')
- w.WriteByte('\n')
- }
- default:
- w.writeName(fd)
- if err := w.writeSingularValue(m.Get(fd), fd); err != nil {
- return err
- }
- w.WriteByte('\n')
- }
- }
-
- if b := m.GetUnknown(); len(b) > 0 {
- w.writeUnknownFields(b)
- }
- return w.writeExtensions(m)
-}
-
-func (w *textWriter) writeSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) error {
- switch fd.Kind() {
- case protoreflect.FloatKind, protoreflect.DoubleKind:
- switch vf := v.Float(); {
- case math.IsInf(vf, +1):
- w.Write(posInf)
- case math.IsInf(vf, -1):
- w.Write(negInf)
- case math.IsNaN(vf):
- w.Write(nan)
- default:
- fmt.Fprint(w, v.Interface())
- }
- case protoreflect.StringKind:
- // NOTE: This does not validate UTF-8 for historical reasons.
- w.writeQuotedString(string(v.String()))
- case protoreflect.BytesKind:
- w.writeQuotedString(string(v.Bytes()))
- case protoreflect.MessageKind, protoreflect.GroupKind:
- var bra, ket byte = '<', '>'
- if fd.Kind() == protoreflect.GroupKind {
- bra, ket = '{', '}'
- }
- w.WriteByte(bra)
- if !w.compact {
- w.WriteByte('\n')
- }
- w.indent++
- m := v.Message()
- if m2, ok := m.Interface().(encoding.TextMarshaler); ok {
- b, err := m2.MarshalText()
- if err != nil {
- return err
- }
- w.Write(b)
- } else {
- w.writeMessage(m)
- }
- w.indent--
- w.WriteByte(ket)
- case protoreflect.EnumKind:
- if ev := fd.Enum().Values().ByNumber(v.Enum()); ev != nil {
- fmt.Fprint(w, ev.Name())
- } else {
- fmt.Fprint(w, v.Enum())
- }
- default:
- fmt.Fprint(w, v.Interface())
- }
- return nil
-}
-
-// writeQuotedString writes a quoted string in the protocol buffer text format.
-func (w *textWriter) writeQuotedString(s string) {
- w.WriteByte('"')
- for i := 0; i < len(s); i++ {
- switch c := s[i]; c {
- case '\n':
- w.buf = append(w.buf, `\n`...)
- case '\r':
- w.buf = append(w.buf, `\r`...)
- case '\t':
- w.buf = append(w.buf, `\t`...)
- case '"':
- w.buf = append(w.buf, `\"`...)
- case '\\':
- w.buf = append(w.buf, `\\`...)
- default:
- if isPrint := c >= 0x20 && c < 0x7f; isPrint {
- w.buf = append(w.buf, c)
- } else {
- w.buf = append(w.buf, fmt.Sprintf(`\%03o`, c)...)
- }
- }
- }
- w.WriteByte('"')
-}
-
-func (w *textWriter) writeUnknownFields(b []byte) {
- if !w.compact {
- fmt.Fprintf(w, "/* %d unknown bytes */\n", len(b))
- }
-
- for len(b) > 0 {
- num, wtyp, n := protowire.ConsumeTag(b)
- if n < 0 {
- return
- }
- b = b[n:]
-
- if wtyp == protowire.EndGroupType {
- w.indent--
- w.Write(endBraceNewline)
- continue
- }
- fmt.Fprint(w, num)
- if wtyp != protowire.StartGroupType {
- w.WriteByte(':')
- }
- if !w.compact || wtyp == protowire.StartGroupType {
- w.WriteByte(' ')
- }
- switch wtyp {
- case protowire.VarintType:
- v, n := protowire.ConsumeVarint(b)
- if n < 0 {
- return
- }
- b = b[n:]
- fmt.Fprint(w, v)
- case protowire.Fixed32Type:
- v, n := protowire.ConsumeFixed32(b)
- if n < 0 {
- return
- }
- b = b[n:]
- fmt.Fprint(w, v)
- case protowire.Fixed64Type:
- v, n := protowire.ConsumeFixed64(b)
- if n < 0 {
- return
- }
- b = b[n:]
- fmt.Fprint(w, v)
- case protowire.BytesType:
- v, n := protowire.ConsumeBytes(b)
- if n < 0 {
- return
- }
- b = b[n:]
- fmt.Fprintf(w, "%q", v)
- case protowire.StartGroupType:
- w.WriteByte('{')
- w.indent++
- default:
- fmt.Fprintf(w, "/* unknown wire type %d */", wtyp)
- }
- w.WriteByte('\n')
- }
-}
-
-// writeExtensions writes all the extensions in m.
-func (w *textWriter) writeExtensions(m protoreflect.Message) error {
- md := m.Descriptor()
- if md.ExtensionRanges().Len() == 0 {
- return nil
- }
-
- type ext struct {
- desc protoreflect.FieldDescriptor
- val protoreflect.Value
- }
- var exts []ext
- m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
- if fd.IsExtension() {
- exts = append(exts, ext{fd, v})
- }
- return true
- })
- sort.Slice(exts, func(i, j int) bool {
- return exts[i].desc.Number() < exts[j].desc.Number()
- })
-
- for _, ext := range exts {
- // For message set, use the name of the message as the extension name.
- name := string(ext.desc.FullName())
- if isMessageSet(ext.desc.ContainingMessage()) {
- name = strings.TrimSuffix(name, ".message_set_extension")
- }
-
- if !ext.desc.IsList() {
- if err := w.writeSingularExtension(name, ext.val, ext.desc); err != nil {
- return err
- }
- } else {
- lv := ext.val.List()
- for i := 0; i < lv.Len(); i++ {
- if err := w.writeSingularExtension(name, lv.Get(i), ext.desc); err != nil {
- return err
- }
- }
- }
- }
- return nil
-}
-
-func (w *textWriter) writeSingularExtension(name string, v protoreflect.Value, fd protoreflect.FieldDescriptor) error {
- fmt.Fprintf(w, "[%s]:", name)
- if !w.compact {
- w.WriteByte(' ')
- }
- if err := w.writeSingularValue(v, fd); err != nil {
- return err
- }
- w.WriteByte('\n')
- return nil
-}
-
-func (w *textWriter) writeIndent() {
- if !w.complete {
- return
- }
- for i := 0; i < w.indent*2; i++ {
- w.buf = append(w.buf, ' ')
- }
- w.complete = false
-}
diff --git a/vendor/github.com/golang/protobuf/proto/wire.go b/vendor/github.com/golang/protobuf/proto/wire.go
deleted file mode 100644
index d7c28da5a..000000000
--- a/vendor/github.com/golang/protobuf/proto/wire.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2019 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.
-
-package proto
-
-import (
- protoV2 "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/runtime/protoiface"
-)
-
-// Size returns the size in bytes of the wire-format encoding of m.
-func Size(m Message) int {
- if m == nil {
- return 0
- }
- mi := MessageV2(m)
- return protoV2.Size(mi)
-}
-
-// Marshal returns the wire-format encoding of m.
-func Marshal(m Message) ([]byte, error) {
- b, err := marshalAppend(nil, m, false)
- if b == nil {
- b = zeroBytes
- }
- return b, err
-}
-
-var zeroBytes = make([]byte, 0, 0)
-
-func marshalAppend(buf []byte, m Message, deterministic bool) ([]byte, error) {
- if m == nil {
- return nil, ErrNil
- }
- mi := MessageV2(m)
- nbuf, err := protoV2.MarshalOptions{
- Deterministic: deterministic,
- AllowPartial: true,
- }.MarshalAppend(buf, mi)
- if err != nil {
- return buf, err
- }
- if len(buf) == len(nbuf) {
- if !mi.ProtoReflect().IsValid() {
- return buf, ErrNil
- }
- }
- return nbuf, checkRequiredNotSet(mi)
-}
-
-// Unmarshal parses a wire-format message in b and places the decoded results in m.
-//
-// Unmarshal resets m before starting to unmarshal, so any existing data in m is always
-// removed. Use UnmarshalMerge to preserve and append to existing data.
-func Unmarshal(b []byte, m Message) error {
- m.Reset()
- return UnmarshalMerge(b, m)
-}
-
-// UnmarshalMerge parses a wire-format message in b and places the decoded results in m.
-func UnmarshalMerge(b []byte, m Message) error {
- mi := MessageV2(m)
- out, err := protoV2.UnmarshalOptions{
- AllowPartial: true,
- Merge: true,
- }.UnmarshalState(protoiface.UnmarshalInput{
- Buf: b,
- Message: mi.ProtoReflect(),
- })
- if err != nil {
- return err
- }
- if out.Flags&protoiface.UnmarshalInitialized > 0 {
- return nil
- }
- return checkRequiredNotSet(mi)
-}
diff --git a/vendor/github.com/golang/protobuf/proto/wrappers.go b/vendor/github.com/golang/protobuf/proto/wrappers.go
deleted file mode 100644
index 398e34859..000000000
--- a/vendor/github.com/golang/protobuf/proto/wrappers.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2019 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.
-
-package proto
-
-// Bool stores v in a new bool value and returns a pointer to it.
-func Bool(v bool) *bool { return &v }
-
-// Int stores v in a new int32 value and returns a pointer to it.
-//
-// Deprecated: Use Int32 instead.
-func Int(v int) *int32 { return Int32(int32(v)) }
-
-// Int32 stores v in a new int32 value and returns a pointer to it.
-func Int32(v int32) *int32 { return &v }
-
-// Int64 stores v in a new int64 value and returns a pointer to it.
-func Int64(v int64) *int64 { return &v }
-
-// Uint32 stores v in a new uint32 value and returns a pointer to it.
-func Uint32(v uint32) *uint32 { return &v }
-
-// Uint64 stores v in a new uint64 value and returns a pointer to it.
-func Uint64(v uint64) *uint64 { return &v }
-
-// Float32 stores v in a new float32 value and returns a pointer to it.
-func Float32(v float32) *float32 { return &v }
-
-// Float64 stores v in a new float64 value and returns a pointer to it.
-func Float64(v float64) *float64 { return &v }
-
-// String stores v in a new string value and returns a pointer to it.
-func String(v string) *string { return &v }
diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go
deleted file mode 100644
index e729dcff1..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2016 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.
-
-package ptypes
-
-import (
- "fmt"
- "strings"
-
- "github.com/golang/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
-
- anypb "github.com/golang/protobuf/ptypes/any"
-)
-
-const urlPrefix = "type.googleapis.com/"
-
-// AnyMessageName returns the message name contained in an anypb.Any message.
-// Most type assertions should use the Is function instead.
-func AnyMessageName(any *anypb.Any) (string, error) {
- name, err := anyMessageName(any)
- return string(name), err
-}
-func anyMessageName(any *anypb.Any) (protoreflect.FullName, error) {
- if any == nil {
- return "", fmt.Errorf("message is nil")
- }
- name := protoreflect.FullName(any.TypeUrl)
- if i := strings.LastIndex(any.TypeUrl, "/"); i >= 0 {
- name = name[i+len("/"):]
- }
- if !name.IsValid() {
- return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl)
- }
- return name, nil
-}
-
-// MarshalAny marshals the given message m into an anypb.Any message.
-func MarshalAny(m proto.Message) (*anypb.Any, error) {
- switch dm := m.(type) {
- case DynamicAny:
- m = dm.Message
- case *DynamicAny:
- if dm == nil {
- return nil, proto.ErrNil
- }
- m = dm.Message
- }
- b, err := proto.Marshal(m)
- if err != nil {
- return nil, err
- }
- return &anypb.Any{TypeUrl: urlPrefix + proto.MessageName(m), Value: b}, nil
-}
-
-// Empty returns a new message of the type specified in an anypb.Any message.
-// It returns protoregistry.NotFound if the corresponding message type could not
-// be resolved in the global registry.
-func Empty(any *anypb.Any) (proto.Message, error) {
- name, err := anyMessageName(any)
- if err != nil {
- return nil, err
- }
- mt, err := protoregistry.GlobalTypes.FindMessageByName(name)
- if err != nil {
- return nil, err
- }
- return proto.MessageV1(mt.New().Interface()), nil
-}
-
-// UnmarshalAny unmarshals the encoded value contained in the anypb.Any message
-// into the provided message m. It returns an error if the target message
-// does not match the type in the Any message or if an unmarshal error occurs.
-//
-// The target message m may be a *DynamicAny message. If the underlying message
-// type could not be resolved, then this returns protoregistry.NotFound.
-func UnmarshalAny(any *anypb.Any, m proto.Message) error {
- if dm, ok := m.(*DynamicAny); ok {
- if dm.Message == nil {
- var err error
- dm.Message, err = Empty(any)
- if err != nil {
- return err
- }
- }
- m = dm.Message
- }
-
- anyName, err := AnyMessageName(any)
- if err != nil {
- return err
- }
- msgName := proto.MessageName(m)
- if anyName != msgName {
- return fmt.Errorf("mismatched message type: got %q want %q", anyName, msgName)
- }
- return proto.Unmarshal(any.Value, m)
-}
-
-// Is reports whether the Any message contains a message of the specified type.
-func Is(any *anypb.Any, m proto.Message) bool {
- if any == nil || m == nil {
- return false
- }
- name := proto.MessageName(m)
- if !strings.HasSuffix(any.TypeUrl, name) {
- return false
- }
- return len(any.TypeUrl) == len(name) || any.TypeUrl[len(any.TypeUrl)-len(name)-1] == '/'
-}
-
-// DynamicAny is a value that can be passed to UnmarshalAny to automatically
-// allocate a proto.Message for the type specified in an anypb.Any message.
-// The allocated message is stored in the embedded proto.Message.
-//
-// Example:
-// var x ptypes.DynamicAny
-// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... }
-// fmt.Printf("unmarshaled message: %v", x.Message)
-type DynamicAny struct{ proto.Message }
-
-func (m DynamicAny) String() string {
- if m.Message == nil {
- return ""
- }
- return m.Message.String()
-}
-func (m DynamicAny) Reset() {
- if m.Message == nil {
- return
- }
- m.Message.Reset()
-}
-func (m DynamicAny) ProtoMessage() {
- return
-}
-func (m DynamicAny) ProtoReflect() protoreflect.Message {
- if m.Message == nil {
- return nil
- }
- return dynamicAny{proto.MessageReflect(m.Message)}
-}
-
-type dynamicAny struct{ protoreflect.Message }
-
-func (m dynamicAny) Type() protoreflect.MessageType {
- return dynamicAnyType{m.Message.Type()}
-}
-func (m dynamicAny) New() protoreflect.Message {
- return dynamicAnyType{m.Message.Type()}.New()
-}
-func (m dynamicAny) Interface() protoreflect.ProtoMessage {
- return DynamicAny{proto.MessageV1(m.Message.Interface())}
-}
-
-type dynamicAnyType struct{ protoreflect.MessageType }
-
-func (t dynamicAnyType) New() protoreflect.Message {
- return dynamicAny{t.MessageType.New()}
-}
-func (t dynamicAnyType) Zero() protoreflect.Message {
- return dynamicAny{t.MessageType.Zero()}
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
deleted file mode 100644
index 0ef27d33d..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: github.com/golang/protobuf/ptypes/any/any.proto
-
-package any
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- anypb "google.golang.org/protobuf/types/known/anypb"
- reflect "reflect"
-)
-
-// Symbols defined in public import of google/protobuf/any.proto.
-
-type Any = anypb.Any
-
-var File_github_com_golang_protobuf_ptypes_any_any_proto protoreflect.FileDescriptor
-
-var file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc = []byte{
- 0x0a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c,
- 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79,
- 0x70, 0x65, 0x73, 0x2f, 0x61, 0x6e, 0x79, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x2b, 0x5a, 0x29,
- 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e,
- 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65,
- 0x73, 0x2f, 0x61, 0x6e, 0x79, 0x3b, 0x61, 0x6e, 0x79, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
-}
-
-var file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes = []interface{}{}
-var file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_github_com_golang_protobuf_ptypes_any_any_proto_init() }
-func file_github_com_golang_protobuf_ptypes_any_any_proto_init() {
- if File_github_com_golang_protobuf_ptypes_any_any_proto != nil {
- return
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 0,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes,
- DependencyIndexes: file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs,
- }.Build()
- File_github_com_golang_protobuf_ptypes_any_any_proto = out.File
- file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc = nil
- file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes = nil
- file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs = nil
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/doc.go b/vendor/github.com/golang/protobuf/ptypes/doc.go
deleted file mode 100644
index fb9edd5c6..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/doc.go
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright 2016 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.
-
-// Package ptypes provides functionality for interacting with well-known types.
-package ptypes
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration.go b/vendor/github.com/golang/protobuf/ptypes/duration.go
deleted file mode 100644
index 6110ae8a4..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2016 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.
-
-package ptypes
-
-import (
- "errors"
- "fmt"
- "time"
-
- durationpb "github.com/golang/protobuf/ptypes/duration"
-)
-
-// Range of google.protobuf.Duration as specified in duration.proto.
-// This is about 10,000 years in seconds.
-const (
- maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60)
- minSeconds = -maxSeconds
-)
-
-// Duration converts a durationpb.Duration to a time.Duration.
-// Duration returns an error if dur is invalid or overflows a time.Duration.
-func Duration(dur *durationpb.Duration) (time.Duration, error) {
- if err := validateDuration(dur); err != nil {
- return 0, err
- }
- d := time.Duration(dur.Seconds) * time.Second
- if int64(d/time.Second) != dur.Seconds {
- return 0, fmt.Errorf("duration: %v is out of range for time.Duration", dur)
- }
- if dur.Nanos != 0 {
- d += time.Duration(dur.Nanos) * time.Nanosecond
- if (d < 0) != (dur.Nanos < 0) {
- return 0, fmt.Errorf("duration: %v is out of range for time.Duration", dur)
- }
- }
- return d, nil
-}
-
-// DurationProto converts a time.Duration to a durationpb.Duration.
-func DurationProto(d time.Duration) *durationpb.Duration {
- nanos := d.Nanoseconds()
- secs := nanos / 1e9
- nanos -= secs * 1e9
- return &durationpb.Duration{
- Seconds: int64(secs),
- Nanos: int32(nanos),
- }
-}
-
-// validateDuration determines whether the durationpb.Duration is valid
-// according to the definition in google/protobuf/duration.proto.
-// A valid durpb.Duration may still be too large to fit into a time.Duration
-// Note that the range of durationpb.Duration is about 10,000 years,
-// while the range of time.Duration is about 290 years.
-func validateDuration(dur *durationpb.Duration) error {
- if dur == nil {
- return errors.New("duration: nil Duration")
- }
- if dur.Seconds < minSeconds || dur.Seconds > maxSeconds {
- return fmt.Errorf("duration: %v: seconds out of range", dur)
- }
- if dur.Nanos <= -1e9 || dur.Nanos >= 1e9 {
- return fmt.Errorf("duration: %v: nanos out of range", dur)
- }
- // Seconds and Nanos must have the same sign, unless d.Nanos is zero.
- if (dur.Seconds < 0 && dur.Nanos > 0) || (dur.Seconds > 0 && dur.Nanos < 0) {
- return fmt.Errorf("duration: %v: seconds and nanos have different signs", dur)
- }
- return nil
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
deleted file mode 100644
index d0079ee3e..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: github.com/golang/protobuf/ptypes/duration/duration.proto
-
-package duration
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- durationpb "google.golang.org/protobuf/types/known/durationpb"
- reflect "reflect"
-)
-
-// Symbols defined in public import of google/protobuf/duration.proto.
-
-type Duration = durationpb.Duration
-
-var File_github_com_golang_protobuf_ptypes_duration_duration_proto protoreflect.FileDescriptor
-
-var file_github_com_golang_protobuf_ptypes_duration_duration_proto_rawDesc = []byte{
- 0x0a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c,
- 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79,
- 0x70, 0x65, 0x73, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x75, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x35, 0x5a, 0x33, 0x67,
- 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67,
- 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73,
- 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var file_github_com_golang_protobuf_ptypes_duration_duration_proto_goTypes = []interface{}{}
-var file_github_com_golang_protobuf_ptypes_duration_duration_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_github_com_golang_protobuf_ptypes_duration_duration_proto_init() }
-func file_github_com_golang_protobuf_ptypes_duration_duration_proto_init() {
- if File_github_com_golang_protobuf_ptypes_duration_duration_proto != nil {
- return
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_github_com_golang_protobuf_ptypes_duration_duration_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 0,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_github_com_golang_protobuf_ptypes_duration_duration_proto_goTypes,
- DependencyIndexes: file_github_com_golang_protobuf_ptypes_duration_duration_proto_depIdxs,
- }.Build()
- File_github_com_golang_protobuf_ptypes_duration_duration_proto = out.File
- file_github_com_golang_protobuf_ptypes_duration_duration_proto_rawDesc = nil
- file_github_com_golang_protobuf_ptypes_duration_duration_proto_goTypes = nil
- file_github_com_golang_protobuf_ptypes_duration_duration_proto_depIdxs = nil
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp.go b/vendor/github.com/golang/protobuf/ptypes/timestamp.go
deleted file mode 100644
index 026d0d491..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2016 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.
-
-package ptypes
-
-import (
- "errors"
- "fmt"
- "time"
-
- timestamppb "github.com/golang/protobuf/ptypes/timestamp"
-)
-
-// Range of google.protobuf.Duration as specified in timestamp.proto.
-const (
- // Seconds field of the earliest valid Timestamp.
- // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix().
- minValidSeconds = -62135596800
- // Seconds field just after the latest valid Timestamp.
- // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix().
- maxValidSeconds = 253402300800
-)
-
-// Timestamp converts a timestamppb.Timestamp to a time.Time.
-// It returns an error if the argument is invalid.
-//
-// Unlike most Go functions, if Timestamp returns an error, the first return
-// value is not the zero time.Time. Instead, it is the value obtained from the
-// time.Unix function when passed the contents of the Timestamp, in the UTC
-// locale. This may or may not be a meaningful time; many invalid Timestamps
-// do map to valid time.Times.
-//
-// A nil Timestamp returns an error. The first return value in that case is
-// undefined.
-func Timestamp(ts *timestamppb.Timestamp) (time.Time, error) {
- // Don't return the zero value on error, because corresponds to a valid
- // timestamp. Instead return whatever time.Unix gives us.
- var t time.Time
- if ts == nil {
- t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp
- } else {
- t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC()
- }
- return t, validateTimestamp(ts)
-}
-
-// TimestampNow returns a google.protobuf.Timestamp for the current time.
-func TimestampNow() *timestamppb.Timestamp {
- ts, err := TimestampProto(time.Now())
- if err != nil {
- panic("ptypes: time.Now() out of Timestamp range")
- }
- return ts
-}
-
-// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
-// It returns an error if the resulting Timestamp is invalid.
-func TimestampProto(t time.Time) (*timestamppb.Timestamp, error) {
- ts := ×tamppb.Timestamp{
- Seconds: t.Unix(),
- Nanos: int32(t.Nanosecond()),
- }
- if err := validateTimestamp(ts); err != nil {
- return nil, err
- }
- return ts, nil
-}
-
-// TimestampString returns the RFC 3339 string for valid Timestamps.
-// For invalid Timestamps, it returns an error message in parentheses.
-func TimestampString(ts *timestamppb.Timestamp) string {
- t, err := Timestamp(ts)
- if err != nil {
- return fmt.Sprintf("(%v)", err)
- }
- return t.Format(time.RFC3339Nano)
-}
-
-// validateTimestamp determines whether a Timestamp is valid.
-// A valid timestamp represents a time in the range [0001-01-01, 10000-01-01)
-// and has a Nanos field in the range [0, 1e9).
-//
-// If the Timestamp is valid, validateTimestamp returns nil.
-// Otherwise, it returns an error that describes the problem.
-//
-// Every valid Timestamp can be represented by a time.Time,
-// but the converse is not true.
-func validateTimestamp(ts *timestamppb.Timestamp) error {
- if ts == nil {
- return errors.New("timestamp: nil Timestamp")
- }
- if ts.Seconds < minValidSeconds {
- return fmt.Errorf("timestamp: %v before 0001-01-01", ts)
- }
- if ts.Seconds >= maxValidSeconds {
- return fmt.Errorf("timestamp: %v after 10000-01-01", ts)
- }
- if ts.Nanos < 0 || ts.Nanos >= 1e9 {
- return fmt.Errorf("timestamp: %v: nanos not in range [0, 1e9)", ts)
- }
- return nil
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
deleted file mode 100644
index a76f80760..000000000
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
-
-package timestamp
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- timestamppb "google.golang.org/protobuf/types/known/timestamppb"
- reflect "reflect"
-)
-
-// Symbols defined in public import of google/protobuf/timestamp.proto.
-
-type Timestamp = timestamppb.Timestamp
-
-var File_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto protoreflect.FileDescriptor
-
-var file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_rawDesc = []byte{
- 0x0a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c,
- 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79,
- 0x70, 0x65, 0x73, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2f, 0x74, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74,
- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x37,
- 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c,
- 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79,
- 0x70, 0x65, 0x73, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3b, 0x74, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
-}
-
-var file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_goTypes = []interface{}{}
-var file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_init() }
-func file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_init() {
- if File_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto != nil {
- return
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 0,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_goTypes,
- DependencyIndexes: file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_depIdxs,
- }.Build()
- File_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto = out.File
- file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_rawDesc = nil
- file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_goTypes = nil
- file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_depIdxs = nil
-}
diff --git a/vendor/github.com/golang/snappy/.gitignore b/vendor/github.com/golang/snappy/.gitignore
deleted file mode 100644
index 042091d9b..000000000
--- a/vendor/github.com/golang/snappy/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-cmd/snappytool/snappytool
-testdata/bench
-
-# These explicitly listed benchmark data files are for an obsolete version of
-# snappy_test.go.
-testdata/alice29.txt
-testdata/asyoulik.txt
-testdata/fireworks.jpeg
-testdata/geo.protodata
-testdata/html
-testdata/html_x_4
-testdata/kppkn.gtb
-testdata/lcet10.txt
-testdata/paper-100k.pdf
-testdata/plrabn12.txt
-testdata/urls.10K
diff --git a/vendor/github.com/golang/snappy/AUTHORS b/vendor/github.com/golang/snappy/AUTHORS
deleted file mode 100644
index bcfa19520..000000000
--- a/vendor/github.com/golang/snappy/AUTHORS
+++ /dev/null
@@ -1,15 +0,0 @@
-# This is the official list of Snappy-Go authors for copyright purposes.
-# This file is distinct from the CONTRIBUTORS files.
-# See the latter for an explanation.
-
-# Names should be added to this file as
-# Name or Organization
-# The email address is not required for organizations.
-
-# Please keep the list sorted.
-
-Damian Gryski
-Google Inc.
-Jan Mercl <0xjnml@gmail.com>
-Rodolfo Carvalho
-Sebastien Binet
diff --git a/vendor/github.com/golang/snappy/CONTRIBUTORS b/vendor/github.com/golang/snappy/CONTRIBUTORS
deleted file mode 100644
index 931ae3160..000000000
--- a/vendor/github.com/golang/snappy/CONTRIBUTORS
+++ /dev/null
@@ -1,37 +0,0 @@
-# This is the official list of people who can contribute
-# (and typically have contributed) code to the Snappy-Go repository.
-# The AUTHORS file lists the copyright holders; this file
-# lists people. For example, Google employees are listed here
-# but not in AUTHORS, because Google holds the copyright.
-#
-# The submission process automatically checks to make sure
-# that people submitting code are listed in this file (by email address).
-#
-# Names should be added to this file only after verifying that
-# the individual or the individual's organization has agreed to
-# the appropriate Contributor License Agreement, found here:
-#
-# http://code.google.com/legal/individual-cla-v1.0.html
-# http://code.google.com/legal/corporate-cla-v1.0.html
-#
-# The agreement for individuals can be filled out on the web.
-#
-# When adding J Random Contributor's name to this file,
-# either J's name or J's organization's name should be
-# added to the AUTHORS file, depending on whether the
-# individual or corporate CLA was used.
-
-# Names should be added to this file like so:
-# Name
-
-# Please keep the list sorted.
-
-Damian Gryski
-Jan Mercl <0xjnml@gmail.com>
-Kai Backman
-Marc-Antoine Ruel
-Nigel Tao
-Rob Pike
-Rodolfo Carvalho
-Russ Cox
-Sebastien Binet
diff --git a/vendor/github.com/golang/snappy/LICENSE b/vendor/github.com/golang/snappy/LICENSE
deleted file mode 100644
index 6050c10f4..000000000
--- a/vendor/github.com/golang/snappy/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2011 The Snappy-Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/golang/snappy/README b/vendor/github.com/golang/snappy/README
deleted file mode 100644
index cea12879a..000000000
--- a/vendor/github.com/golang/snappy/README
+++ /dev/null
@@ -1,107 +0,0 @@
-The Snappy compression format in the Go programming language.
-
-To download and install from source:
-$ go get github.com/golang/snappy
-
-Unless otherwise noted, the Snappy-Go source files are distributed
-under the BSD-style license found in the LICENSE file.
-
-
-
-Benchmarks.
-
-The golang/snappy benchmarks include compressing (Z) and decompressing (U) ten
-or so files, the same set used by the C++ Snappy code (github.com/google/snappy
-and note the "google", not "golang"). On an "Intel(R) Core(TM) i7-3770 CPU @
-3.40GHz", Go's GOARCH=amd64 numbers as of 2016-05-29:
-
-"go test -test.bench=."
-
-_UFlat0-8 2.19GB/s ± 0% html
-_UFlat1-8 1.41GB/s ± 0% urls
-_UFlat2-8 23.5GB/s ± 2% jpg
-_UFlat3-8 1.91GB/s ± 0% jpg_200
-_UFlat4-8 14.0GB/s ± 1% pdf
-_UFlat5-8 1.97GB/s ± 0% html4
-_UFlat6-8 814MB/s ± 0% txt1
-_UFlat7-8 785MB/s ± 0% txt2
-_UFlat8-8 857MB/s ± 0% txt3
-_UFlat9-8 719MB/s ± 1% txt4
-_UFlat10-8 2.84GB/s ± 0% pb
-_UFlat11-8 1.05GB/s ± 0% gaviota
-
-_ZFlat0-8 1.04GB/s ± 0% html
-_ZFlat1-8 534MB/s ± 0% urls
-_ZFlat2-8 15.7GB/s ± 1% jpg
-_ZFlat3-8 740MB/s ± 3% jpg_200
-_ZFlat4-8 9.20GB/s ± 1% pdf
-_ZFlat5-8 991MB/s ± 0% html4
-_ZFlat6-8 379MB/s ± 0% txt1
-_ZFlat7-8 352MB/s ± 0% txt2
-_ZFlat8-8 396MB/s ± 1% txt3
-_ZFlat9-8 327MB/s ± 1% txt4
-_ZFlat10-8 1.33GB/s ± 1% pb
-_ZFlat11-8 605MB/s ± 1% gaviota
-
-
-
-"go test -test.bench=. -tags=noasm"
-
-_UFlat0-8 621MB/s ± 2% html
-_UFlat1-8 494MB/s ± 1% urls
-_UFlat2-8 23.2GB/s ± 1% jpg
-_UFlat3-8 1.12GB/s ± 1% jpg_200
-_UFlat4-8 4.35GB/s ± 1% pdf
-_UFlat5-8 609MB/s ± 0% html4
-_UFlat6-8 296MB/s ± 0% txt1
-_UFlat7-8 288MB/s ± 0% txt2
-_UFlat8-8 309MB/s ± 1% txt3
-_UFlat9-8 280MB/s ± 1% txt4
-_UFlat10-8 753MB/s ± 0% pb
-_UFlat11-8 400MB/s ± 0% gaviota
-
-_ZFlat0-8 409MB/s ± 1% html
-_ZFlat1-8 250MB/s ± 1% urls
-_ZFlat2-8 12.3GB/s ± 1% jpg
-_ZFlat3-8 132MB/s ± 0% jpg_200
-_ZFlat4-8 2.92GB/s ± 0% pdf
-_ZFlat5-8 405MB/s ± 1% html4
-_ZFlat6-8 179MB/s ± 1% txt1
-_ZFlat7-8 170MB/s ± 1% txt2
-_ZFlat8-8 189MB/s ± 1% txt3
-_ZFlat9-8 164MB/s ± 1% txt4
-_ZFlat10-8 479MB/s ± 1% pb
-_ZFlat11-8 270MB/s ± 1% gaviota
-
-
-
-For comparison (Go's encoded output is byte-for-byte identical to C++'s), here
-are the numbers from C++ Snappy's
-
-make CXXFLAGS="-O2 -DNDEBUG -g" clean snappy_unittest.log && cat snappy_unittest.log
-
-BM_UFlat/0 2.4GB/s html
-BM_UFlat/1 1.4GB/s urls
-BM_UFlat/2 21.8GB/s jpg
-BM_UFlat/3 1.5GB/s jpg_200
-BM_UFlat/4 13.3GB/s pdf
-BM_UFlat/5 2.1GB/s html4
-BM_UFlat/6 1.0GB/s txt1
-BM_UFlat/7 959.4MB/s txt2
-BM_UFlat/8 1.0GB/s txt3
-BM_UFlat/9 864.5MB/s txt4
-BM_UFlat/10 2.9GB/s pb
-BM_UFlat/11 1.2GB/s gaviota
-
-BM_ZFlat/0 944.3MB/s html (22.31 %)
-BM_ZFlat/1 501.6MB/s urls (47.78 %)
-BM_ZFlat/2 14.3GB/s jpg (99.95 %)
-BM_ZFlat/3 538.3MB/s jpg_200 (73.00 %)
-BM_ZFlat/4 8.3GB/s pdf (83.30 %)
-BM_ZFlat/5 903.5MB/s html4 (22.52 %)
-BM_ZFlat/6 336.0MB/s txt1 (57.88 %)
-BM_ZFlat/7 312.3MB/s txt2 (61.91 %)
-BM_ZFlat/8 353.1MB/s txt3 (54.99 %)
-BM_ZFlat/9 289.9MB/s txt4 (66.26 %)
-BM_ZFlat/10 1.2GB/s pb (19.68 %)
-BM_ZFlat/11 527.4MB/s gaviota (37.72 %)
diff --git a/vendor/github.com/golang/snappy/decode.go b/vendor/github.com/golang/snappy/decode.go
deleted file mode 100644
index 72efb0353..000000000
--- a/vendor/github.com/golang/snappy/decode.go
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright 2011 The Snappy-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.
-
-package snappy
-
-import (
- "encoding/binary"
- "errors"
- "io"
-)
-
-var (
- // ErrCorrupt reports that the input is invalid.
- ErrCorrupt = errors.New("snappy: corrupt input")
- // ErrTooLarge reports that the uncompressed length is too large.
- ErrTooLarge = errors.New("snappy: decoded block is too large")
- // ErrUnsupported reports that the input isn't supported.
- ErrUnsupported = errors.New("snappy: unsupported input")
-
- errUnsupportedLiteralLength = errors.New("snappy: unsupported literal length")
-)
-
-// DecodedLen returns the length of the decoded block.
-func DecodedLen(src []byte) (int, error) {
- v, _, err := decodedLen(src)
- return v, err
-}
-
-// decodedLen returns the length of the decoded block and the number of bytes
-// that the length header occupied.
-func decodedLen(src []byte) (blockLen, headerLen int, err error) {
- v, n := binary.Uvarint(src)
- if n <= 0 || v > 0xffffffff {
- return 0, 0, ErrCorrupt
- }
-
- const wordSize = 32 << (^uint(0) >> 32 & 1)
- if wordSize == 32 && v > 0x7fffffff {
- return 0, 0, ErrTooLarge
- }
- return int(v), n, nil
-}
-
-const (
- decodeErrCodeCorrupt = 1
- decodeErrCodeUnsupportedLiteralLength = 2
-)
-
-// Decode returns the decoded form of src. The returned slice may be a sub-
-// slice of dst if dst was large enough to hold the entire decoded block.
-// Otherwise, a newly allocated slice will be returned.
-//
-// The dst and src must not overlap. It is valid to pass a nil dst.
-func Decode(dst, src []byte) ([]byte, error) {
- dLen, s, err := decodedLen(src)
- if err != nil {
- return nil, err
- }
- if dLen <= len(dst) {
- dst = dst[:dLen]
- } else {
- dst = make([]byte, dLen)
- }
- switch decode(dst, src[s:]) {
- case 0:
- return dst, nil
- case decodeErrCodeUnsupportedLiteralLength:
- return nil, errUnsupportedLiteralLength
- }
- return nil, ErrCorrupt
-}
-
-// NewReader returns a new Reader that decompresses from r, using the framing
-// format described at
-// https://github.com/google/snappy/blob/master/framing_format.txt
-func NewReader(r io.Reader) *Reader {
- return &Reader{
- r: r,
- decoded: make([]byte, maxBlockSize),
- buf: make([]byte, maxEncodedLenOfMaxBlockSize+checksumSize),
- }
-}
-
-// Reader is an io.Reader that can read Snappy-compressed bytes.
-type Reader struct {
- r io.Reader
- err error
- decoded []byte
- buf []byte
- // decoded[i:j] contains decoded bytes that have not yet been passed on.
- i, j int
- readHeader bool
-}
-
-// Reset discards any buffered data, resets all state, and switches the Snappy
-// reader to read from r. This permits reusing a Reader rather than allocating
-// a new one.
-func (r *Reader) Reset(reader io.Reader) {
- r.r = reader
- r.err = nil
- r.i = 0
- r.j = 0
- r.readHeader = false
-}
-
-func (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) {
- if _, r.err = io.ReadFull(r.r, p); r.err != nil {
- if r.err == io.ErrUnexpectedEOF || (r.err == io.EOF && !allowEOF) {
- r.err = ErrCorrupt
- }
- return false
- }
- return true
-}
-
-// Read satisfies the io.Reader interface.
-func (r *Reader) Read(p []byte) (int, error) {
- if r.err != nil {
- return 0, r.err
- }
- for {
- if r.i < r.j {
- n := copy(p, r.decoded[r.i:r.j])
- r.i += n
- return n, nil
- }
- if !r.readFull(r.buf[:4], true) {
- return 0, r.err
- }
- chunkType := r.buf[0]
- if !r.readHeader {
- if chunkType != chunkTypeStreamIdentifier {
- r.err = ErrCorrupt
- return 0, r.err
- }
- r.readHeader = true
- }
- chunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16
- if chunkLen > len(r.buf) {
- r.err = ErrUnsupported
- return 0, r.err
- }
-
- // The chunk types are specified at
- // https://github.com/google/snappy/blob/master/framing_format.txt
- switch chunkType {
- case chunkTypeCompressedData:
- // Section 4.2. Compressed data (chunk type 0x00).
- if chunkLen < checksumSize {
- r.err = ErrCorrupt
- return 0, r.err
- }
- buf := r.buf[:chunkLen]
- if !r.readFull(buf, false) {
- return 0, r.err
- }
- checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24
- buf = buf[checksumSize:]
-
- n, err := DecodedLen(buf)
- if err != nil {
- r.err = err
- return 0, r.err
- }
- if n > len(r.decoded) {
- r.err = ErrCorrupt
- return 0, r.err
- }
- if _, err := Decode(r.decoded, buf); err != nil {
- r.err = err
- return 0, r.err
- }
- if crc(r.decoded[:n]) != checksum {
- r.err = ErrCorrupt
- return 0, r.err
- }
- r.i, r.j = 0, n
- continue
-
- case chunkTypeUncompressedData:
- // Section 4.3. Uncompressed data (chunk type 0x01).
- if chunkLen < checksumSize {
- r.err = ErrCorrupt
- return 0, r.err
- }
- buf := r.buf[:checksumSize]
- if !r.readFull(buf, false) {
- return 0, r.err
- }
- checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24
- // Read directly into r.decoded instead of via r.buf.
- n := chunkLen - checksumSize
- if n > len(r.decoded) {
- r.err = ErrCorrupt
- return 0, r.err
- }
- if !r.readFull(r.decoded[:n], false) {
- return 0, r.err
- }
- if crc(r.decoded[:n]) != checksum {
- r.err = ErrCorrupt
- return 0, r.err
- }
- r.i, r.j = 0, n
- continue
-
- case chunkTypeStreamIdentifier:
- // Section 4.1. Stream identifier (chunk type 0xff).
- if chunkLen != len(magicBody) {
- r.err = ErrCorrupt
- return 0, r.err
- }
- if !r.readFull(r.buf[:len(magicBody)], false) {
- return 0, r.err
- }
- for i := 0; i < len(magicBody); i++ {
- if r.buf[i] != magicBody[i] {
- r.err = ErrCorrupt
- return 0, r.err
- }
- }
- continue
- }
-
- if chunkType <= 0x7f {
- // Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f).
- r.err = ErrUnsupported
- return 0, r.err
- }
- // Section 4.4 Padding (chunk type 0xfe).
- // Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd).
- if !r.readFull(r.buf[:chunkLen], false) {
- return 0, r.err
- }
- }
-}
diff --git a/vendor/github.com/golang/snappy/decode_amd64.go b/vendor/github.com/golang/snappy/decode_amd64.go
deleted file mode 100644
index fcd192b84..000000000
--- a/vendor/github.com/golang/snappy/decode_amd64.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 The Snappy-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.
-
-// +build !appengine
-// +build gc
-// +build !noasm
-
-package snappy
-
-// decode has the same semantics as in decode_other.go.
-//
-//go:noescape
-func decode(dst, src []byte) int
diff --git a/vendor/github.com/golang/snappy/decode_amd64.s b/vendor/github.com/golang/snappy/decode_amd64.s
deleted file mode 100644
index e6179f65e..000000000
--- a/vendor/github.com/golang/snappy/decode_amd64.s
+++ /dev/null
@@ -1,490 +0,0 @@
-// Copyright 2016 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.
-
-// +build !appengine
-// +build gc
-// +build !noasm
-
-#include "textflag.h"
-
-// The asm code generally follows the pure Go code in decode_other.go, except
-// where marked with a "!!!".
-
-// func decode(dst, src []byte) int
-//
-// All local variables fit into registers. The non-zero stack size is only to
-// spill registers and push args when issuing a CALL. The register allocation:
-// - AX scratch
-// - BX scratch
-// - CX length or x
-// - DX offset
-// - SI &src[s]
-// - DI &dst[d]
-// + R8 dst_base
-// + R9 dst_len
-// + R10 dst_base + dst_len
-// + R11 src_base
-// + R12 src_len
-// + R13 src_base + src_len
-// - R14 used by doCopy
-// - R15 used by doCopy
-//
-// The registers R8-R13 (marked with a "+") are set at the start of the
-// function, and after a CALL returns, and are not otherwise modified.
-//
-// The d variable is implicitly DI - R8, and len(dst)-d is R10 - DI.
-// The s variable is implicitly SI - R11, and len(src)-s is R13 - SI.
-TEXT ·decode(SB), NOSPLIT, $48-56
- // Initialize SI, DI and R8-R13.
- MOVQ dst_base+0(FP), R8
- MOVQ dst_len+8(FP), R9
- MOVQ R8, DI
- MOVQ R8, R10
- ADDQ R9, R10
- MOVQ src_base+24(FP), R11
- MOVQ src_len+32(FP), R12
- MOVQ R11, SI
- MOVQ R11, R13
- ADDQ R12, R13
-
-loop:
- // for s < len(src)
- CMPQ SI, R13
- JEQ end
-
- // CX = uint32(src[s])
- //
- // switch src[s] & 0x03
- MOVBLZX (SI), CX
- MOVL CX, BX
- ANDL $3, BX
- CMPL BX, $1
- JAE tagCopy
-
- // ----------------------------------------
- // The code below handles literal tags.
-
- // case tagLiteral:
- // x := uint32(src[s] >> 2)
- // switch
- SHRL $2, CX
- CMPL CX, $60
- JAE tagLit60Plus
-
- // case x < 60:
- // s++
- INCQ SI
-
-doLit:
- // This is the end of the inner "switch", when we have a literal tag.
- //
- // We assume that CX == x and x fits in a uint32, where x is the variable
- // used in the pure Go decode_other.go code.
-
- // length = int(x) + 1
- //
- // Unlike the pure Go code, we don't need to check if length <= 0 because
- // CX can hold 64 bits, so the increment cannot overflow.
- INCQ CX
-
- // Prepare to check if copying length bytes will run past the end of dst or
- // src.
- //
- // AX = len(dst) - d
- // BX = len(src) - s
- MOVQ R10, AX
- SUBQ DI, AX
- MOVQ R13, BX
- SUBQ SI, BX
-
- // !!! Try a faster technique for short (16 or fewer bytes) copies.
- //
- // if length > 16 || len(dst)-d < 16 || len(src)-s < 16 {
- // goto callMemmove // Fall back on calling runtime·memmove.
- // }
- //
- // The C++ snappy code calls this TryFastAppend. It also checks len(src)-s
- // against 21 instead of 16, because it cannot assume that all of its input
- // is contiguous in memory and so it needs to leave enough source bytes to
- // read the next tag without refilling buffers, but Go's Decode assumes
- // contiguousness (the src argument is a []byte).
- CMPQ CX, $16
- JGT callMemmove
- CMPQ AX, $16
- JLT callMemmove
- CMPQ BX, $16
- JLT callMemmove
-
- // !!! Implement the copy from src to dst as a 16-byte load and store.
- // (Decode's documentation says that dst and src must not overlap.)
- //
- // This always copies 16 bytes, instead of only length bytes, but that's
- // OK. If the input is a valid Snappy encoding then subsequent iterations
- // will fix up the overrun. Otherwise, Decode returns a nil []byte (and a
- // non-nil error), so the overrun will be ignored.
- //
- // Note that on amd64, it is legal and cheap to issue unaligned 8-byte or
- // 16-byte loads and stores. This technique probably wouldn't be as
- // effective on architectures that are fussier about alignment.
- MOVOU 0(SI), X0
- MOVOU X0, 0(DI)
-
- // d += length
- // s += length
- ADDQ CX, DI
- ADDQ CX, SI
- JMP loop
-
-callMemmove:
- // if length > len(dst)-d || length > len(src)-s { etc }
- CMPQ CX, AX
- JGT errCorrupt
- CMPQ CX, BX
- JGT errCorrupt
-
- // copy(dst[d:], src[s:s+length])
- //
- // This means calling runtime·memmove(&dst[d], &src[s], length), so we push
- // DI, SI and CX as arguments. Coincidentally, we also need to spill those
- // three registers to the stack, to save local variables across the CALL.
- MOVQ DI, 0(SP)
- MOVQ SI, 8(SP)
- MOVQ CX, 16(SP)
- MOVQ DI, 24(SP)
- MOVQ SI, 32(SP)
- MOVQ CX, 40(SP)
- CALL runtime·memmove(SB)
-
- // Restore local variables: unspill registers from the stack and
- // re-calculate R8-R13.
- MOVQ 24(SP), DI
- MOVQ 32(SP), SI
- MOVQ 40(SP), CX
- MOVQ dst_base+0(FP), R8
- MOVQ dst_len+8(FP), R9
- MOVQ R8, R10
- ADDQ R9, R10
- MOVQ src_base+24(FP), R11
- MOVQ src_len+32(FP), R12
- MOVQ R11, R13
- ADDQ R12, R13
-
- // d += length
- // s += length
- ADDQ CX, DI
- ADDQ CX, SI
- JMP loop
-
-tagLit60Plus:
- // !!! This fragment does the
- //
- // s += x - 58; if uint(s) > uint(len(src)) { etc }
- //
- // checks. In the asm version, we code it once instead of once per switch case.
- ADDQ CX, SI
- SUBQ $58, SI
- MOVQ SI, BX
- SUBQ R11, BX
- CMPQ BX, R12
- JA errCorrupt
-
- // case x == 60:
- CMPL CX, $61
- JEQ tagLit61
- JA tagLit62Plus
-
- // x = uint32(src[s-1])
- MOVBLZX -1(SI), CX
- JMP doLit
-
-tagLit61:
- // case x == 61:
- // x = uint32(src[s-2]) | uint32(src[s-1])<<8
- MOVWLZX -2(SI), CX
- JMP doLit
-
-tagLit62Plus:
- CMPL CX, $62
- JA tagLit63
-
- // case x == 62:
- // x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16
- MOVWLZX -3(SI), CX
- MOVBLZX -1(SI), BX
- SHLL $16, BX
- ORL BX, CX
- JMP doLit
-
-tagLit63:
- // case x == 63:
- // x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24
- MOVL -4(SI), CX
- JMP doLit
-
-// The code above handles literal tags.
-// ----------------------------------------
-// The code below handles copy tags.
-
-tagCopy4:
- // case tagCopy4:
- // s += 5
- ADDQ $5, SI
-
- // if uint(s) > uint(len(src)) { etc }
- MOVQ SI, BX
- SUBQ R11, BX
- CMPQ BX, R12
- JA errCorrupt
-
- // length = 1 + int(src[s-5])>>2
- SHRQ $2, CX
- INCQ CX
-
- // offset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24)
- MOVLQZX -4(SI), DX
- JMP doCopy
-
-tagCopy2:
- // case tagCopy2:
- // s += 3
- ADDQ $3, SI
-
- // if uint(s) > uint(len(src)) { etc }
- MOVQ SI, BX
- SUBQ R11, BX
- CMPQ BX, R12
- JA errCorrupt
-
- // length = 1 + int(src[s-3])>>2
- SHRQ $2, CX
- INCQ CX
-
- // offset = int(uint32(src[s-2]) | uint32(src[s-1])<<8)
- MOVWQZX -2(SI), DX
- JMP doCopy
-
-tagCopy:
- // We have a copy tag. We assume that:
- // - BX == src[s] & 0x03
- // - CX == src[s]
- CMPQ BX, $2
- JEQ tagCopy2
- JA tagCopy4
-
- // case tagCopy1:
- // s += 2
- ADDQ $2, SI
-
- // if uint(s) > uint(len(src)) { etc }
- MOVQ SI, BX
- SUBQ R11, BX
- CMPQ BX, R12
- JA errCorrupt
-
- // offset = int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1]))
- MOVQ CX, DX
- ANDQ $0xe0, DX
- SHLQ $3, DX
- MOVBQZX -1(SI), BX
- ORQ BX, DX
-
- // length = 4 + int(src[s-2])>>2&0x7
- SHRQ $2, CX
- ANDQ $7, CX
- ADDQ $4, CX
-
-doCopy:
- // This is the end of the outer "switch", when we have a copy tag.
- //
- // We assume that:
- // - CX == length && CX > 0
- // - DX == offset
-
- // if offset <= 0 { etc }
- CMPQ DX, $0
- JLE errCorrupt
-
- // if d < offset { etc }
- MOVQ DI, BX
- SUBQ R8, BX
- CMPQ BX, DX
- JLT errCorrupt
-
- // if length > len(dst)-d { etc }
- MOVQ R10, BX
- SUBQ DI, BX
- CMPQ CX, BX
- JGT errCorrupt
-
- // forwardCopy(dst[d:d+length], dst[d-offset:]); d += length
- //
- // Set:
- // - R14 = len(dst)-d
- // - R15 = &dst[d-offset]
- MOVQ R10, R14
- SUBQ DI, R14
- MOVQ DI, R15
- SUBQ DX, R15
-
- // !!! Try a faster technique for short (16 or fewer bytes) forward copies.
- //
- // First, try using two 8-byte load/stores, similar to the doLit technique
- // above. Even if dst[d:d+length] and dst[d-offset:] can overlap, this is
- // still OK if offset >= 8. Note that this has to be two 8-byte load/stores
- // and not one 16-byte load/store, and the first store has to be before the
- // second load, due to the overlap if offset is in the range [8, 16).
- //
- // if length > 16 || offset < 8 || len(dst)-d < 16 {
- // goto slowForwardCopy
- // }
- // copy 16 bytes
- // d += length
- CMPQ CX, $16
- JGT slowForwardCopy
- CMPQ DX, $8
- JLT slowForwardCopy
- CMPQ R14, $16
- JLT slowForwardCopy
- MOVQ 0(R15), AX
- MOVQ AX, 0(DI)
- MOVQ 8(R15), BX
- MOVQ BX, 8(DI)
- ADDQ CX, DI
- JMP loop
-
-slowForwardCopy:
- // !!! If the forward copy is longer than 16 bytes, or if offset < 8, we
- // can still try 8-byte load stores, provided we can overrun up to 10 extra
- // bytes. As above, the overrun will be fixed up by subsequent iterations
- // of the outermost loop.
- //
- // The C++ snappy code calls this technique IncrementalCopyFastPath. Its
- // commentary says:
- //
- // ----
- //
- // The main part of this loop is a simple copy of eight bytes at a time
- // until we've copied (at least) the requested amount of bytes. However,
- // if d and d-offset are less than eight bytes apart (indicating a
- // repeating pattern of length < 8), we first need to expand the pattern in
- // order to get the correct results. For instance, if the buffer looks like
- // this, with the eight-byte and patterns marked as
- // intervals:
- //
- // abxxxxxxxxxxxx
- // [------] d-offset
- // [------] d
- //
- // a single eight-byte copy from to will repeat the pattern
- // once, after which we can move two bytes without moving :
- //
- // ababxxxxxxxxxx
- // [------] d-offset
- // [------] d
- //
- // and repeat the exercise until the two no longer overlap.
- //
- // This allows us to do very well in the special case of one single byte
- // repeated many times, without taking a big hit for more general cases.
- //
- // The worst case of extra writing past the end of the match occurs when
- // offset == 1 and length == 1; the last copy will read from byte positions
- // [0..7] and write to [4..11], whereas it was only supposed to write to
- // position 1. Thus, ten excess bytes.
- //
- // ----
- //
- // That "10 byte overrun" worst case is confirmed by Go's
- // TestSlowForwardCopyOverrun, which also tests the fixUpSlowForwardCopy
- // and finishSlowForwardCopy algorithm.
- //
- // if length > len(dst)-d-10 {
- // goto verySlowForwardCopy
- // }
- SUBQ $10, R14
- CMPQ CX, R14
- JGT verySlowForwardCopy
-
-makeOffsetAtLeast8:
- // !!! As above, expand the pattern so that offset >= 8 and we can use
- // 8-byte load/stores.
- //
- // for offset < 8 {
- // copy 8 bytes from dst[d-offset:] to dst[d:]
- // length -= offset
- // d += offset
- // offset += offset
- // // The two previous lines together means that d-offset, and therefore
- // // R15, is unchanged.
- // }
- CMPQ DX, $8
- JGE fixUpSlowForwardCopy
- MOVQ (R15), BX
- MOVQ BX, (DI)
- SUBQ DX, CX
- ADDQ DX, DI
- ADDQ DX, DX
- JMP makeOffsetAtLeast8
-
-fixUpSlowForwardCopy:
- // !!! Add length (which might be negative now) to d (implied by DI being
- // &dst[d]) so that d ends up at the right place when we jump back to the
- // top of the loop. Before we do that, though, we save DI to AX so that, if
- // length is positive, copying the remaining length bytes will write to the
- // right place.
- MOVQ DI, AX
- ADDQ CX, DI
-
-finishSlowForwardCopy:
- // !!! Repeat 8-byte load/stores until length <= 0. Ending with a negative
- // length means that we overrun, but as above, that will be fixed up by
- // subsequent iterations of the outermost loop.
- CMPQ CX, $0
- JLE loop
- MOVQ (R15), BX
- MOVQ BX, (AX)
- ADDQ $8, R15
- ADDQ $8, AX
- SUBQ $8, CX
- JMP finishSlowForwardCopy
-
-verySlowForwardCopy:
- // verySlowForwardCopy is a simple implementation of forward copy. In C
- // parlance, this is a do/while loop instead of a while loop, since we know
- // that length > 0. In Go syntax:
- //
- // for {
- // dst[d] = dst[d - offset]
- // d++
- // length--
- // if length == 0 {
- // break
- // }
- // }
- MOVB (R15), BX
- MOVB BX, (DI)
- INCQ R15
- INCQ DI
- DECQ CX
- JNZ verySlowForwardCopy
- JMP loop
-
-// The code above handles copy tags.
-// ----------------------------------------
-
-end:
- // This is the end of the "for s < len(src)".
- //
- // if d != len(dst) { etc }
- CMPQ DI, R10
- JNE errCorrupt
-
- // return 0
- MOVQ $0, ret+48(FP)
- RET
-
-errCorrupt:
- // return decodeErrCodeCorrupt
- MOVQ $1, ret+48(FP)
- RET
diff --git a/vendor/github.com/golang/snappy/decode_other.go b/vendor/github.com/golang/snappy/decode_other.go
deleted file mode 100644
index 8c9f2049b..000000000
--- a/vendor/github.com/golang/snappy/decode_other.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2016 The Snappy-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.
-
-// +build !amd64 appengine !gc noasm
-
-package snappy
-
-// decode writes the decoding of src to dst. It assumes that the varint-encoded
-// length of the decompressed bytes has already been read, and that len(dst)
-// equals that length.
-//
-// It returns 0 on success or a decodeErrCodeXxx error code on failure.
-func decode(dst, src []byte) int {
- var d, s, offset, length int
- for s < len(src) {
- switch src[s] & 0x03 {
- case tagLiteral:
- x := uint32(src[s] >> 2)
- switch {
- case x < 60:
- s++
- case x == 60:
- s += 2
- if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
- return decodeErrCodeCorrupt
- }
- x = uint32(src[s-1])
- case x == 61:
- s += 3
- if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
- return decodeErrCodeCorrupt
- }
- x = uint32(src[s-2]) | uint32(src[s-1])<<8
- case x == 62:
- s += 4
- if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
- return decodeErrCodeCorrupt
- }
- x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16
- case x == 63:
- s += 5
- if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
- return decodeErrCodeCorrupt
- }
- x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24
- }
- length = int(x) + 1
- if length <= 0 {
- return decodeErrCodeUnsupportedLiteralLength
- }
- if length > len(dst)-d || length > len(src)-s {
- return decodeErrCodeCorrupt
- }
- copy(dst[d:], src[s:s+length])
- d += length
- s += length
- continue
-
- case tagCopy1:
- s += 2
- if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
- return decodeErrCodeCorrupt
- }
- length = 4 + int(src[s-2])>>2&0x7
- offset = int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1]))
-
- case tagCopy2:
- s += 3
- if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
- return decodeErrCodeCorrupt
- }
- length = 1 + int(src[s-3])>>2
- offset = int(uint32(src[s-2]) | uint32(src[s-1])<<8)
-
- case tagCopy4:
- s += 5
- if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
- return decodeErrCodeCorrupt
- }
- length = 1 + int(src[s-5])>>2
- offset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24)
- }
-
- if offset <= 0 || d < offset || length > len(dst)-d {
- return decodeErrCodeCorrupt
- }
- // Copy from an earlier sub-slice of dst to a later sub-slice. Unlike
- // the built-in copy function, this byte-by-byte copy always runs
- // forwards, even if the slices overlap. Conceptually, this is:
- //
- // d += forwardCopy(dst[d:d+length], dst[d-offset:])
- for end := d + length; d != end; d++ {
- dst[d] = dst[d-offset]
- }
- }
- if d != len(dst) {
- return decodeErrCodeCorrupt
- }
- return 0
-}
diff --git a/vendor/github.com/golang/snappy/encode.go b/vendor/github.com/golang/snappy/encode.go
deleted file mode 100644
index 8d393e904..000000000
--- a/vendor/github.com/golang/snappy/encode.go
+++ /dev/null
@@ -1,285 +0,0 @@
-// Copyright 2011 The Snappy-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.
-
-package snappy
-
-import (
- "encoding/binary"
- "errors"
- "io"
-)
-
-// Encode returns the encoded form of src. The returned slice may be a sub-
-// slice of dst if dst was large enough to hold the entire encoded block.
-// Otherwise, a newly allocated slice will be returned.
-//
-// The dst and src must not overlap. It is valid to pass a nil dst.
-func Encode(dst, src []byte) []byte {
- if n := MaxEncodedLen(len(src)); n < 0 {
- panic(ErrTooLarge)
- } else if len(dst) < n {
- dst = make([]byte, n)
- }
-
- // The block starts with the varint-encoded length of the decompressed bytes.
- d := binary.PutUvarint(dst, uint64(len(src)))
-
- for len(src) > 0 {
- p := src
- src = nil
- if len(p) > maxBlockSize {
- p, src = p[:maxBlockSize], p[maxBlockSize:]
- }
- if len(p) < minNonLiteralBlockSize {
- d += emitLiteral(dst[d:], p)
- } else {
- d += encodeBlock(dst[d:], p)
- }
- }
- return dst[:d]
-}
-
-// inputMargin is the minimum number of extra input bytes to keep, inside
-// encodeBlock's inner loop. On some architectures, this margin lets us
-// implement a fast path for emitLiteral, where the copy of short (<= 16 byte)
-// literals can be implemented as a single load to and store from a 16-byte
-// register. That literal's actual length can be as short as 1 byte, so this
-// can copy up to 15 bytes too much, but that's OK as subsequent iterations of
-// the encoding loop will fix up the copy overrun, and this inputMargin ensures
-// that we don't overrun the dst and src buffers.
-const inputMargin = 16 - 1
-
-// minNonLiteralBlockSize is the minimum size of the input to encodeBlock that
-// could be encoded with a copy tag. This is the minimum with respect to the
-// algorithm used by encodeBlock, not a minimum enforced by the file format.
-//
-// The encoded output must start with at least a 1 byte literal, as there are
-// no previous bytes to copy. A minimal (1 byte) copy after that, generated
-// from an emitCopy call in encodeBlock's main loop, would require at least
-// another inputMargin bytes, for the reason above: we want any emitLiteral
-// calls inside encodeBlock's main loop to use the fast path if possible, which
-// requires being able to overrun by inputMargin bytes. Thus,
-// minNonLiteralBlockSize equals 1 + 1 + inputMargin.
-//
-// The C++ code doesn't use this exact threshold, but it could, as discussed at
-// https://groups.google.com/d/topic/snappy-compression/oGbhsdIJSJ8/discussion
-// The difference between Go (2+inputMargin) and C++ (inputMargin) is purely an
-// optimization. It should not affect the encoded form. This is tested by
-// TestSameEncodingAsCppShortCopies.
-const minNonLiteralBlockSize = 1 + 1 + inputMargin
-
-// MaxEncodedLen returns the maximum length of a snappy block, given its
-// uncompressed length.
-//
-// It will return a negative value if srcLen is too large to encode.
-func MaxEncodedLen(srcLen int) int {
- n := uint64(srcLen)
- if n > 0xffffffff {
- return -1
- }
- // Compressed data can be defined as:
- // compressed := item* literal*
- // item := literal* copy
- //
- // The trailing literal sequence has a space blowup of at most 62/60
- // since a literal of length 60 needs one tag byte + one extra byte
- // for length information.
- //
- // Item blowup is trickier to measure. Suppose the "copy" op copies
- // 4 bytes of data. Because of a special check in the encoding code,
- // we produce a 4-byte copy only if the offset is < 65536. Therefore
- // the copy op takes 3 bytes to encode, and this type of item leads
- // to at most the 62/60 blowup for representing literals.
- //
- // Suppose the "copy" op copies 5 bytes of data. If the offset is big
- // enough, it will take 5 bytes to encode the copy op. Therefore the
- // worst case here is a one-byte literal followed by a five-byte copy.
- // That is, 6 bytes of input turn into 7 bytes of "compressed" data.
- //
- // This last factor dominates the blowup, so the final estimate is:
- n = 32 + n + n/6
- if n > 0xffffffff {
- return -1
- }
- return int(n)
-}
-
-var errClosed = errors.New("snappy: Writer is closed")
-
-// NewWriter returns a new Writer that compresses to w.
-//
-// The Writer returned does not buffer writes. There is no need to Flush or
-// Close such a Writer.
-//
-// Deprecated: the Writer returned is not suitable for many small writes, only
-// for few large writes. Use NewBufferedWriter instead, which is efficient
-// regardless of the frequency and shape of the writes, and remember to Close
-// that Writer when done.
-func NewWriter(w io.Writer) *Writer {
- return &Writer{
- w: w,
- obuf: make([]byte, obufLen),
- }
-}
-
-// NewBufferedWriter returns a new Writer that compresses to w, using the
-// framing format described at
-// https://github.com/google/snappy/blob/master/framing_format.txt
-//
-// The Writer returned buffers writes. Users must call Close to guarantee all
-// data has been forwarded to the underlying io.Writer. They may also call
-// Flush zero or more times before calling Close.
-func NewBufferedWriter(w io.Writer) *Writer {
- return &Writer{
- w: w,
- ibuf: make([]byte, 0, maxBlockSize),
- obuf: make([]byte, obufLen),
- }
-}
-
-// Writer is an io.Writer that can write Snappy-compressed bytes.
-type Writer struct {
- w io.Writer
- err error
-
- // ibuf is a buffer for the incoming (uncompressed) bytes.
- //
- // Its use is optional. For backwards compatibility, Writers created by the
- // NewWriter function have ibuf == nil, do not buffer incoming bytes, and
- // therefore do not need to be Flush'ed or Close'd.
- ibuf []byte
-
- // obuf is a buffer for the outgoing (compressed) bytes.
- obuf []byte
-
- // wroteStreamHeader is whether we have written the stream header.
- wroteStreamHeader bool
-}
-
-// Reset discards the writer's state and switches the Snappy writer to write to
-// w. This permits reusing a Writer rather than allocating a new one.
-func (w *Writer) Reset(writer io.Writer) {
- w.w = writer
- w.err = nil
- if w.ibuf != nil {
- w.ibuf = w.ibuf[:0]
- }
- w.wroteStreamHeader = false
-}
-
-// Write satisfies the io.Writer interface.
-func (w *Writer) Write(p []byte) (nRet int, errRet error) {
- if w.ibuf == nil {
- // Do not buffer incoming bytes. This does not perform or compress well
- // if the caller of Writer.Write writes many small slices. This
- // behavior is therefore deprecated, but still supported for backwards
- // compatibility with code that doesn't explicitly Flush or Close.
- return w.write(p)
- }
-
- // The remainder of this method is based on bufio.Writer.Write from the
- // standard library.
-
- for len(p) > (cap(w.ibuf)-len(w.ibuf)) && w.err == nil {
- var n int
- if len(w.ibuf) == 0 {
- // Large write, empty buffer.
- // Write directly from p to avoid copy.
- n, _ = w.write(p)
- } else {
- n = copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p)
- w.ibuf = w.ibuf[:len(w.ibuf)+n]
- w.Flush()
- }
- nRet += n
- p = p[n:]
- }
- if w.err != nil {
- return nRet, w.err
- }
- n := copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p)
- w.ibuf = w.ibuf[:len(w.ibuf)+n]
- nRet += n
- return nRet, nil
-}
-
-func (w *Writer) write(p []byte) (nRet int, errRet error) {
- if w.err != nil {
- return 0, w.err
- }
- for len(p) > 0 {
- obufStart := len(magicChunk)
- if !w.wroteStreamHeader {
- w.wroteStreamHeader = true
- copy(w.obuf, magicChunk)
- obufStart = 0
- }
-
- var uncompressed []byte
- if len(p) > maxBlockSize {
- uncompressed, p = p[:maxBlockSize], p[maxBlockSize:]
- } else {
- uncompressed, p = p, nil
- }
- checksum := crc(uncompressed)
-
- // Compress the buffer, discarding the result if the improvement
- // isn't at least 12.5%.
- compressed := Encode(w.obuf[obufHeaderLen:], uncompressed)
- chunkType := uint8(chunkTypeCompressedData)
- chunkLen := 4 + len(compressed)
- obufEnd := obufHeaderLen + len(compressed)
- if len(compressed) >= len(uncompressed)-len(uncompressed)/8 {
- chunkType = chunkTypeUncompressedData
- chunkLen = 4 + len(uncompressed)
- obufEnd = obufHeaderLen
- }
-
- // Fill in the per-chunk header that comes before the body.
- w.obuf[len(magicChunk)+0] = chunkType
- w.obuf[len(magicChunk)+1] = uint8(chunkLen >> 0)
- w.obuf[len(magicChunk)+2] = uint8(chunkLen >> 8)
- w.obuf[len(magicChunk)+3] = uint8(chunkLen >> 16)
- w.obuf[len(magicChunk)+4] = uint8(checksum >> 0)
- w.obuf[len(magicChunk)+5] = uint8(checksum >> 8)
- w.obuf[len(magicChunk)+6] = uint8(checksum >> 16)
- w.obuf[len(magicChunk)+7] = uint8(checksum >> 24)
-
- if _, err := w.w.Write(w.obuf[obufStart:obufEnd]); err != nil {
- w.err = err
- return nRet, err
- }
- if chunkType == chunkTypeUncompressedData {
- if _, err := w.w.Write(uncompressed); err != nil {
- w.err = err
- return nRet, err
- }
- }
- nRet += len(uncompressed)
- }
- return nRet, nil
-}
-
-// Flush flushes the Writer to its underlying io.Writer.
-func (w *Writer) Flush() error {
- if w.err != nil {
- return w.err
- }
- if len(w.ibuf) == 0 {
- return nil
- }
- w.write(w.ibuf)
- w.ibuf = w.ibuf[:0]
- return w.err
-}
-
-// Close calls Flush and then closes the Writer.
-func (w *Writer) Close() error {
- w.Flush()
- ret := w.err
- if w.err == nil {
- w.err = errClosed
- }
- return ret
-}
diff --git a/vendor/github.com/golang/snappy/encode_amd64.go b/vendor/github.com/golang/snappy/encode_amd64.go
deleted file mode 100644
index 150d91bc8..000000000
--- a/vendor/github.com/golang/snappy/encode_amd64.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 The Snappy-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.
-
-// +build !appengine
-// +build gc
-// +build !noasm
-
-package snappy
-
-// emitLiteral has the same semantics as in encode_other.go.
-//
-//go:noescape
-func emitLiteral(dst, lit []byte) int
-
-// emitCopy has the same semantics as in encode_other.go.
-//
-//go:noescape
-func emitCopy(dst []byte, offset, length int) int
-
-// extendMatch has the same semantics as in encode_other.go.
-//
-//go:noescape
-func extendMatch(src []byte, i, j int) int
-
-// encodeBlock has the same semantics as in encode_other.go.
-//
-//go:noescape
-func encodeBlock(dst, src []byte) (d int)
diff --git a/vendor/github.com/golang/snappy/encode_amd64.s b/vendor/github.com/golang/snappy/encode_amd64.s
deleted file mode 100644
index adfd979fe..000000000
--- a/vendor/github.com/golang/snappy/encode_amd64.s
+++ /dev/null
@@ -1,730 +0,0 @@
-// Copyright 2016 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.
-
-// +build !appengine
-// +build gc
-// +build !noasm
-
-#include "textflag.h"
-
-// The XXX lines assemble on Go 1.4, 1.5 and 1.7, but not 1.6, due to a
-// Go toolchain regression. See https://github.com/golang/go/issues/15426 and
-// https://github.com/golang/snappy/issues/29
-//
-// As a workaround, the package was built with a known good assembler, and
-// those instructions were disassembled by "objdump -d" to yield the
-// 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15
-// style comments, in AT&T asm syntax. Note that rsp here is a physical
-// register, not Go/asm's SP pseudo-register (see https://golang.org/doc/asm).
-// The instructions were then encoded as "BYTE $0x.." sequences, which assemble
-// fine on Go 1.6.
-
-// The asm code generally follows the pure Go code in encode_other.go, except
-// where marked with a "!!!".
-
-// ----------------------------------------------------------------------------
-
-// func emitLiteral(dst, lit []byte) int
-//
-// All local variables fit into registers. The register allocation:
-// - AX len(lit)
-// - BX n
-// - DX return value
-// - DI &dst[i]
-// - R10 &lit[0]
-//
-// The 24 bytes of stack space is to call runtime·memmove.
-//
-// The unusual register allocation of local variables, such as R10 for the
-// source pointer, matches the allocation used at the call site in encodeBlock,
-// which makes it easier to manually inline this function.
-TEXT ·emitLiteral(SB), NOSPLIT, $24-56
- MOVQ dst_base+0(FP), DI
- MOVQ lit_base+24(FP), R10
- MOVQ lit_len+32(FP), AX
- MOVQ AX, DX
- MOVL AX, BX
- SUBL $1, BX
-
- CMPL BX, $60
- JLT oneByte
- CMPL BX, $256
- JLT twoBytes
-
-threeBytes:
- MOVB $0xf4, 0(DI)
- MOVW BX, 1(DI)
- ADDQ $3, DI
- ADDQ $3, DX
- JMP memmove
-
-twoBytes:
- MOVB $0xf0, 0(DI)
- MOVB BX, 1(DI)
- ADDQ $2, DI
- ADDQ $2, DX
- JMP memmove
-
-oneByte:
- SHLB $2, BX
- MOVB BX, 0(DI)
- ADDQ $1, DI
- ADDQ $1, DX
-
-memmove:
- MOVQ DX, ret+48(FP)
-
- // copy(dst[i:], lit)
- //
- // This means calling runtime·memmove(&dst[i], &lit[0], len(lit)), so we push
- // DI, R10 and AX as arguments.
- MOVQ DI, 0(SP)
- MOVQ R10, 8(SP)
- MOVQ AX, 16(SP)
- CALL runtime·memmove(SB)
- RET
-
-// ----------------------------------------------------------------------------
-
-// func emitCopy(dst []byte, offset, length int) int
-//
-// All local variables fit into registers. The register allocation:
-// - AX length
-// - SI &dst[0]
-// - DI &dst[i]
-// - R11 offset
-//
-// The unusual register allocation of local variables, such as R11 for the
-// offset, matches the allocation used at the call site in encodeBlock, which
-// makes it easier to manually inline this function.
-TEXT ·emitCopy(SB), NOSPLIT, $0-48
- MOVQ dst_base+0(FP), DI
- MOVQ DI, SI
- MOVQ offset+24(FP), R11
- MOVQ length+32(FP), AX
-
-loop0:
- // for length >= 68 { etc }
- CMPL AX, $68
- JLT step1
-
- // Emit a length 64 copy, encoded as 3 bytes.
- MOVB $0xfe, 0(DI)
- MOVW R11, 1(DI)
- ADDQ $3, DI
- SUBL $64, AX
- JMP loop0
-
-step1:
- // if length > 64 { etc }
- CMPL AX, $64
- JLE step2
-
- // Emit a length 60 copy, encoded as 3 bytes.
- MOVB $0xee, 0(DI)
- MOVW R11, 1(DI)
- ADDQ $3, DI
- SUBL $60, AX
-
-step2:
- // if length >= 12 || offset >= 2048 { goto step3 }
- CMPL AX, $12
- JGE step3
- CMPL R11, $2048
- JGE step3
-
- // Emit the remaining copy, encoded as 2 bytes.
- MOVB R11, 1(DI)
- SHRL $8, R11
- SHLB $5, R11
- SUBB $4, AX
- SHLB $2, AX
- ORB AX, R11
- ORB $1, R11
- MOVB R11, 0(DI)
- ADDQ $2, DI
-
- // Return the number of bytes written.
- SUBQ SI, DI
- MOVQ DI, ret+40(FP)
- RET
-
-step3:
- // Emit the remaining copy, encoded as 3 bytes.
- SUBL $1, AX
- SHLB $2, AX
- ORB $2, AX
- MOVB AX, 0(DI)
- MOVW R11, 1(DI)
- ADDQ $3, DI
-
- // Return the number of bytes written.
- SUBQ SI, DI
- MOVQ DI, ret+40(FP)
- RET
-
-// ----------------------------------------------------------------------------
-
-// func extendMatch(src []byte, i, j int) int
-//
-// All local variables fit into registers. The register allocation:
-// - DX &src[0]
-// - SI &src[j]
-// - R13 &src[len(src) - 8]
-// - R14 &src[len(src)]
-// - R15 &src[i]
-//
-// The unusual register allocation of local variables, such as R15 for a source
-// pointer, matches the allocation used at the call site in encodeBlock, which
-// makes it easier to manually inline this function.
-TEXT ·extendMatch(SB), NOSPLIT, $0-48
- MOVQ src_base+0(FP), DX
- MOVQ src_len+8(FP), R14
- MOVQ i+24(FP), R15
- MOVQ j+32(FP), SI
- ADDQ DX, R14
- ADDQ DX, R15
- ADDQ DX, SI
- MOVQ R14, R13
- SUBQ $8, R13
-
-cmp8:
- // As long as we are 8 or more bytes before the end of src, we can load and
- // compare 8 bytes at a time. If those 8 bytes are equal, repeat.
- CMPQ SI, R13
- JA cmp1
- MOVQ (R15), AX
- MOVQ (SI), BX
- CMPQ AX, BX
- JNE bsf
- ADDQ $8, R15
- ADDQ $8, SI
- JMP cmp8
-
-bsf:
- // If those 8 bytes were not equal, XOR the two 8 byte values, and return
- // the index of the first byte that differs. The BSF instruction finds the
- // least significant 1 bit, the amd64 architecture is little-endian, and
- // the shift by 3 converts a bit index to a byte index.
- XORQ AX, BX
- BSFQ BX, BX
- SHRQ $3, BX
- ADDQ BX, SI
-
- // Convert from &src[ret] to ret.
- SUBQ DX, SI
- MOVQ SI, ret+40(FP)
- RET
-
-cmp1:
- // In src's tail, compare 1 byte at a time.
- CMPQ SI, R14
- JAE extendMatchEnd
- MOVB (R15), AX
- MOVB (SI), BX
- CMPB AX, BX
- JNE extendMatchEnd
- ADDQ $1, R15
- ADDQ $1, SI
- JMP cmp1
-
-extendMatchEnd:
- // Convert from &src[ret] to ret.
- SUBQ DX, SI
- MOVQ SI, ret+40(FP)
- RET
-
-// ----------------------------------------------------------------------------
-
-// func encodeBlock(dst, src []byte) (d int)
-//
-// All local variables fit into registers, other than "var table". The register
-// allocation:
-// - AX . .
-// - BX . .
-// - CX 56 shift (note that amd64 shifts by non-immediates must use CX).
-// - DX 64 &src[0], tableSize
-// - SI 72 &src[s]
-// - DI 80 &dst[d]
-// - R9 88 sLimit
-// - R10 . &src[nextEmit]
-// - R11 96 prevHash, currHash, nextHash, offset
-// - R12 104 &src[base], skip
-// - R13 . &src[nextS], &src[len(src) - 8]
-// - R14 . len(src), bytesBetweenHashLookups, &src[len(src)], x
-// - R15 112 candidate
-//
-// The second column (56, 64, etc) is the stack offset to spill the registers
-// when calling other functions. We could pack this slightly tighter, but it's
-// simpler to have a dedicated spill map independent of the function called.
-//
-// "var table [maxTableSize]uint16" takes up 32768 bytes of stack space. An
-// extra 56 bytes, to call other functions, and an extra 64 bytes, to spill
-// local variables (registers) during calls gives 32768 + 56 + 64 = 32888.
-TEXT ·encodeBlock(SB), 0, $32888-56
- MOVQ dst_base+0(FP), DI
- MOVQ src_base+24(FP), SI
- MOVQ src_len+32(FP), R14
-
- // shift, tableSize := uint32(32-8), 1<<8
- MOVQ $24, CX
- MOVQ $256, DX
-
-calcShift:
- // for ; tableSize < maxTableSize && tableSize < len(src); tableSize *= 2 {
- // shift--
- // }
- CMPQ DX, $16384
- JGE varTable
- CMPQ DX, R14
- JGE varTable
- SUBQ $1, CX
- SHLQ $1, DX
- JMP calcShift
-
-varTable:
- // var table [maxTableSize]uint16
- //
- // In the asm code, unlike the Go code, we can zero-initialize only the
- // first tableSize elements. Each uint16 element is 2 bytes and each MOVOU
- // writes 16 bytes, so we can do only tableSize/8 writes instead of the
- // 2048 writes that would zero-initialize all of table's 32768 bytes.
- SHRQ $3, DX
- LEAQ table-32768(SP), BX
- PXOR X0, X0
-
-memclr:
- MOVOU X0, 0(BX)
- ADDQ $16, BX
- SUBQ $1, DX
- JNZ memclr
-
- // !!! DX = &src[0]
- MOVQ SI, DX
-
- // sLimit := len(src) - inputMargin
- MOVQ R14, R9
- SUBQ $15, R9
-
- // !!! Pre-emptively spill CX, DX and R9 to the stack. Their values don't
- // change for the rest of the function.
- MOVQ CX, 56(SP)
- MOVQ DX, 64(SP)
- MOVQ R9, 88(SP)
-
- // nextEmit := 0
- MOVQ DX, R10
-
- // s := 1
- ADDQ $1, SI
-
- // nextHash := hash(load32(src, s), shift)
- MOVL 0(SI), R11
- IMULL $0x1e35a7bd, R11
- SHRL CX, R11
-
-outer:
- // for { etc }
-
- // skip := 32
- MOVQ $32, R12
-
- // nextS := s
- MOVQ SI, R13
-
- // candidate := 0
- MOVQ $0, R15
-
-inner0:
- // for { etc }
-
- // s := nextS
- MOVQ R13, SI
-
- // bytesBetweenHashLookups := skip >> 5
- MOVQ R12, R14
- SHRQ $5, R14
-
- // nextS = s + bytesBetweenHashLookups
- ADDQ R14, R13
-
- // skip += bytesBetweenHashLookups
- ADDQ R14, R12
-
- // if nextS > sLimit { goto emitRemainder }
- MOVQ R13, AX
- SUBQ DX, AX
- CMPQ AX, R9
- JA emitRemainder
-
- // candidate = int(table[nextHash])
- // XXX: MOVWQZX table-32768(SP)(R11*2), R15
- // XXX: 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15
- BYTE $0x4e
- BYTE $0x0f
- BYTE $0xb7
- BYTE $0x7c
- BYTE $0x5c
- BYTE $0x78
-
- // table[nextHash] = uint16(s)
- MOVQ SI, AX
- SUBQ DX, AX
-
- // XXX: MOVW AX, table-32768(SP)(R11*2)
- // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2)
- BYTE $0x66
- BYTE $0x42
- BYTE $0x89
- BYTE $0x44
- BYTE $0x5c
- BYTE $0x78
-
- // nextHash = hash(load32(src, nextS), shift)
- MOVL 0(R13), R11
- IMULL $0x1e35a7bd, R11
- SHRL CX, R11
-
- // if load32(src, s) != load32(src, candidate) { continue } break
- MOVL 0(SI), AX
- MOVL (DX)(R15*1), BX
- CMPL AX, BX
- JNE inner0
-
-fourByteMatch:
- // As per the encode_other.go code:
- //
- // A 4-byte match has been found. We'll later see etc.
-
- // !!! Jump to a fast path for short (<= 16 byte) literals. See the comment
- // on inputMargin in encode.go.
- MOVQ SI, AX
- SUBQ R10, AX
- CMPQ AX, $16
- JLE emitLiteralFastPath
-
- // ----------------------------------------
- // Begin inline of the emitLiteral call.
- //
- // d += emitLiteral(dst[d:], src[nextEmit:s])
-
- MOVL AX, BX
- SUBL $1, BX
-
- CMPL BX, $60
- JLT inlineEmitLiteralOneByte
- CMPL BX, $256
- JLT inlineEmitLiteralTwoBytes
-
-inlineEmitLiteralThreeBytes:
- MOVB $0xf4, 0(DI)
- MOVW BX, 1(DI)
- ADDQ $3, DI
- JMP inlineEmitLiteralMemmove
-
-inlineEmitLiteralTwoBytes:
- MOVB $0xf0, 0(DI)
- MOVB BX, 1(DI)
- ADDQ $2, DI
- JMP inlineEmitLiteralMemmove
-
-inlineEmitLiteralOneByte:
- SHLB $2, BX
- MOVB BX, 0(DI)
- ADDQ $1, DI
-
-inlineEmitLiteralMemmove:
- // Spill local variables (registers) onto the stack; call; unspill.
- //
- // copy(dst[i:], lit)
- //
- // This means calling runtime·memmove(&dst[i], &lit[0], len(lit)), so we push
- // DI, R10 and AX as arguments.
- MOVQ DI, 0(SP)
- MOVQ R10, 8(SP)
- MOVQ AX, 16(SP)
- ADDQ AX, DI // Finish the "d +=" part of "d += emitLiteral(etc)".
- MOVQ SI, 72(SP)
- MOVQ DI, 80(SP)
- MOVQ R15, 112(SP)
- CALL runtime·memmove(SB)
- MOVQ 56(SP), CX
- MOVQ 64(SP), DX
- MOVQ 72(SP), SI
- MOVQ 80(SP), DI
- MOVQ 88(SP), R9
- MOVQ 112(SP), R15
- JMP inner1
-
-inlineEmitLiteralEnd:
- // End inline of the emitLiteral call.
- // ----------------------------------------
-
-emitLiteralFastPath:
- // !!! Emit the 1-byte encoding "uint8(len(lit)-1)<<2".
- MOVB AX, BX
- SUBB $1, BX
- SHLB $2, BX
- MOVB BX, (DI)
- ADDQ $1, DI
-
- // !!! Implement the copy from lit to dst as a 16-byte load and store.
- // (Encode's documentation says that dst and src must not overlap.)
- //
- // This always copies 16 bytes, instead of only len(lit) bytes, but that's
- // OK. Subsequent iterations will fix up the overrun.
- //
- // Note that on amd64, it is legal and cheap to issue unaligned 8-byte or
- // 16-byte loads and stores. This technique probably wouldn't be as
- // effective on architectures that are fussier about alignment.
- MOVOU 0(R10), X0
- MOVOU X0, 0(DI)
- ADDQ AX, DI
-
-inner1:
- // for { etc }
-
- // base := s
- MOVQ SI, R12
-
- // !!! offset := base - candidate
- MOVQ R12, R11
- SUBQ R15, R11
- SUBQ DX, R11
-
- // ----------------------------------------
- // Begin inline of the extendMatch call.
- //
- // s = extendMatch(src, candidate+4, s+4)
-
- // !!! R14 = &src[len(src)]
- MOVQ src_len+32(FP), R14
- ADDQ DX, R14
-
- // !!! R13 = &src[len(src) - 8]
- MOVQ R14, R13
- SUBQ $8, R13
-
- // !!! R15 = &src[candidate + 4]
- ADDQ $4, R15
- ADDQ DX, R15
-
- // !!! s += 4
- ADDQ $4, SI
-
-inlineExtendMatchCmp8:
- // As long as we are 8 or more bytes before the end of src, we can load and
- // compare 8 bytes at a time. If those 8 bytes are equal, repeat.
- CMPQ SI, R13
- JA inlineExtendMatchCmp1
- MOVQ (R15), AX
- MOVQ (SI), BX
- CMPQ AX, BX
- JNE inlineExtendMatchBSF
- ADDQ $8, R15
- ADDQ $8, SI
- JMP inlineExtendMatchCmp8
-
-inlineExtendMatchBSF:
- // If those 8 bytes were not equal, XOR the two 8 byte values, and return
- // the index of the first byte that differs. The BSF instruction finds the
- // least significant 1 bit, the amd64 architecture is little-endian, and
- // the shift by 3 converts a bit index to a byte index.
- XORQ AX, BX
- BSFQ BX, BX
- SHRQ $3, BX
- ADDQ BX, SI
- JMP inlineExtendMatchEnd
-
-inlineExtendMatchCmp1:
- // In src's tail, compare 1 byte at a time.
- CMPQ SI, R14
- JAE inlineExtendMatchEnd
- MOVB (R15), AX
- MOVB (SI), BX
- CMPB AX, BX
- JNE inlineExtendMatchEnd
- ADDQ $1, R15
- ADDQ $1, SI
- JMP inlineExtendMatchCmp1
-
-inlineExtendMatchEnd:
- // End inline of the extendMatch call.
- // ----------------------------------------
-
- // ----------------------------------------
- // Begin inline of the emitCopy call.
- //
- // d += emitCopy(dst[d:], base-candidate, s-base)
-
- // !!! length := s - base
- MOVQ SI, AX
- SUBQ R12, AX
-
-inlineEmitCopyLoop0:
- // for length >= 68 { etc }
- CMPL AX, $68
- JLT inlineEmitCopyStep1
-
- // Emit a length 64 copy, encoded as 3 bytes.
- MOVB $0xfe, 0(DI)
- MOVW R11, 1(DI)
- ADDQ $3, DI
- SUBL $64, AX
- JMP inlineEmitCopyLoop0
-
-inlineEmitCopyStep1:
- // if length > 64 { etc }
- CMPL AX, $64
- JLE inlineEmitCopyStep2
-
- // Emit a length 60 copy, encoded as 3 bytes.
- MOVB $0xee, 0(DI)
- MOVW R11, 1(DI)
- ADDQ $3, DI
- SUBL $60, AX
-
-inlineEmitCopyStep2:
- // if length >= 12 || offset >= 2048 { goto inlineEmitCopyStep3 }
- CMPL AX, $12
- JGE inlineEmitCopyStep3
- CMPL R11, $2048
- JGE inlineEmitCopyStep3
-
- // Emit the remaining copy, encoded as 2 bytes.
- MOVB R11, 1(DI)
- SHRL $8, R11
- SHLB $5, R11
- SUBB $4, AX
- SHLB $2, AX
- ORB AX, R11
- ORB $1, R11
- MOVB R11, 0(DI)
- ADDQ $2, DI
- JMP inlineEmitCopyEnd
-
-inlineEmitCopyStep3:
- // Emit the remaining copy, encoded as 3 bytes.
- SUBL $1, AX
- SHLB $2, AX
- ORB $2, AX
- MOVB AX, 0(DI)
- MOVW R11, 1(DI)
- ADDQ $3, DI
-
-inlineEmitCopyEnd:
- // End inline of the emitCopy call.
- // ----------------------------------------
-
- // nextEmit = s
- MOVQ SI, R10
-
- // if s >= sLimit { goto emitRemainder }
- MOVQ SI, AX
- SUBQ DX, AX
- CMPQ AX, R9
- JAE emitRemainder
-
- // As per the encode_other.go code:
- //
- // We could immediately etc.
-
- // x := load64(src, s-1)
- MOVQ -1(SI), R14
-
- // prevHash := hash(uint32(x>>0), shift)
- MOVL R14, R11
- IMULL $0x1e35a7bd, R11
- SHRL CX, R11
-
- // table[prevHash] = uint16(s-1)
- MOVQ SI, AX
- SUBQ DX, AX
- SUBQ $1, AX
-
- // XXX: MOVW AX, table-32768(SP)(R11*2)
- // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2)
- BYTE $0x66
- BYTE $0x42
- BYTE $0x89
- BYTE $0x44
- BYTE $0x5c
- BYTE $0x78
-
- // currHash := hash(uint32(x>>8), shift)
- SHRQ $8, R14
- MOVL R14, R11
- IMULL $0x1e35a7bd, R11
- SHRL CX, R11
-
- // candidate = int(table[currHash])
- // XXX: MOVWQZX table-32768(SP)(R11*2), R15
- // XXX: 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15
- BYTE $0x4e
- BYTE $0x0f
- BYTE $0xb7
- BYTE $0x7c
- BYTE $0x5c
- BYTE $0x78
-
- // table[currHash] = uint16(s)
- ADDQ $1, AX
-
- // XXX: MOVW AX, table-32768(SP)(R11*2)
- // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2)
- BYTE $0x66
- BYTE $0x42
- BYTE $0x89
- BYTE $0x44
- BYTE $0x5c
- BYTE $0x78
-
- // if uint32(x>>8) == load32(src, candidate) { continue }
- MOVL (DX)(R15*1), BX
- CMPL R14, BX
- JEQ inner1
-
- // nextHash = hash(uint32(x>>16), shift)
- SHRQ $8, R14
- MOVL R14, R11
- IMULL $0x1e35a7bd, R11
- SHRL CX, R11
-
- // s++
- ADDQ $1, SI
-
- // break out of the inner1 for loop, i.e. continue the outer loop.
- JMP outer
-
-emitRemainder:
- // if nextEmit < len(src) { etc }
- MOVQ src_len+32(FP), AX
- ADDQ DX, AX
- CMPQ R10, AX
- JEQ encodeBlockEnd
-
- // d += emitLiteral(dst[d:], src[nextEmit:])
- //
- // Push args.
- MOVQ DI, 0(SP)
- MOVQ $0, 8(SP) // Unnecessary, as the callee ignores it, but conservative.
- MOVQ $0, 16(SP) // Unnecessary, as the callee ignores it, but conservative.
- MOVQ R10, 24(SP)
- SUBQ R10, AX
- MOVQ AX, 32(SP)
- MOVQ AX, 40(SP) // Unnecessary, as the callee ignores it, but conservative.
-
- // Spill local variables (registers) onto the stack; call; unspill.
- MOVQ DI, 80(SP)
- CALL ·emitLiteral(SB)
- MOVQ 80(SP), DI
-
- // Finish the "d +=" part of "d += emitLiteral(etc)".
- ADDQ 48(SP), DI
-
-encodeBlockEnd:
- MOVQ dst_base+0(FP), AX
- SUBQ AX, DI
- MOVQ DI, d+48(FP)
- RET
diff --git a/vendor/github.com/golang/snappy/encode_other.go b/vendor/github.com/golang/snappy/encode_other.go
deleted file mode 100644
index dbcae905e..000000000
--- a/vendor/github.com/golang/snappy/encode_other.go
+++ /dev/null
@@ -1,238 +0,0 @@
-// Copyright 2016 The Snappy-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.
-
-// +build !amd64 appengine !gc noasm
-
-package snappy
-
-func load32(b []byte, i int) uint32 {
- b = b[i : i+4 : len(b)] // Help the compiler eliminate bounds checks on the next line.
- return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
-}
-
-func load64(b []byte, i int) uint64 {
- b = b[i : i+8 : len(b)] // Help the compiler eliminate bounds checks on the next line.
- return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
- uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
-}
-
-// emitLiteral writes a literal chunk and returns the number of bytes written.
-//
-// It assumes that:
-// dst is long enough to hold the encoded bytes
-// 1 <= len(lit) && len(lit) <= 65536
-func emitLiteral(dst, lit []byte) int {
- i, n := 0, uint(len(lit)-1)
- switch {
- case n < 60:
- dst[0] = uint8(n)<<2 | tagLiteral
- i = 1
- case n < 1<<8:
- dst[0] = 60<<2 | tagLiteral
- dst[1] = uint8(n)
- i = 2
- default:
- dst[0] = 61<<2 | tagLiteral
- dst[1] = uint8(n)
- dst[2] = uint8(n >> 8)
- i = 3
- }
- return i + copy(dst[i:], lit)
-}
-
-// emitCopy writes a copy chunk and returns the number of bytes written.
-//
-// It assumes that:
-// dst is long enough to hold the encoded bytes
-// 1 <= offset && offset <= 65535
-// 4 <= length && length <= 65535
-func emitCopy(dst []byte, offset, length int) int {
- i := 0
- // The maximum length for a single tagCopy1 or tagCopy2 op is 64 bytes. The
- // threshold for this loop is a little higher (at 68 = 64 + 4), and the
- // length emitted down below is is a little lower (at 60 = 64 - 4), because
- // it's shorter to encode a length 67 copy as a length 60 tagCopy2 followed
- // by a length 7 tagCopy1 (which encodes as 3+2 bytes) than to encode it as
- // a length 64 tagCopy2 followed by a length 3 tagCopy2 (which encodes as
- // 3+3 bytes). The magic 4 in the 64±4 is because the minimum length for a
- // tagCopy1 op is 4 bytes, which is why a length 3 copy has to be an
- // encodes-as-3-bytes tagCopy2 instead of an encodes-as-2-bytes tagCopy1.
- for length >= 68 {
- // Emit a length 64 copy, encoded as 3 bytes.
- dst[i+0] = 63<<2 | tagCopy2
- dst[i+1] = uint8(offset)
- dst[i+2] = uint8(offset >> 8)
- i += 3
- length -= 64
- }
- if length > 64 {
- // Emit a length 60 copy, encoded as 3 bytes.
- dst[i+0] = 59<<2 | tagCopy2
- dst[i+1] = uint8(offset)
- dst[i+2] = uint8(offset >> 8)
- i += 3
- length -= 60
- }
- if length >= 12 || offset >= 2048 {
- // Emit the remaining copy, encoded as 3 bytes.
- dst[i+0] = uint8(length-1)<<2 | tagCopy2
- dst[i+1] = uint8(offset)
- dst[i+2] = uint8(offset >> 8)
- return i + 3
- }
- // Emit the remaining copy, encoded as 2 bytes.
- dst[i+0] = uint8(offset>>8)<<5 | uint8(length-4)<<2 | tagCopy1
- dst[i+1] = uint8(offset)
- return i + 2
-}
-
-// extendMatch returns the largest k such that k <= len(src) and that
-// src[i:i+k-j] and src[j:k] have the same contents.
-//
-// It assumes that:
-// 0 <= i && i < j && j <= len(src)
-func extendMatch(src []byte, i, j int) int {
- for ; j < len(src) && src[i] == src[j]; i, j = i+1, j+1 {
- }
- return j
-}
-
-func hash(u, shift uint32) uint32 {
- return (u * 0x1e35a7bd) >> shift
-}
-
-// encodeBlock encodes a non-empty src to a guaranteed-large-enough dst. It
-// assumes that the varint-encoded length of the decompressed bytes has already
-// been written.
-//
-// It also assumes that:
-// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
-func encodeBlock(dst, src []byte) (d int) {
- // Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive.
- // The table element type is uint16, as s < sLimit and sLimit < len(src)
- // and len(src) <= maxBlockSize and maxBlockSize == 65536.
- const (
- maxTableSize = 1 << 14
- // tableMask is redundant, but helps the compiler eliminate bounds
- // checks.
- tableMask = maxTableSize - 1
- )
- shift := uint32(32 - 8)
- for tableSize := 1 << 8; tableSize < maxTableSize && tableSize < len(src); tableSize *= 2 {
- shift--
- }
- // In Go, all array elements are zero-initialized, so there is no advantage
- // to a smaller tableSize per se. However, it matches the C++ algorithm,
- // and in the asm versions of this code, we can get away with zeroing only
- // the first tableSize elements.
- var table [maxTableSize]uint16
-
- // sLimit is when to stop looking for offset/length copies. The inputMargin
- // lets us use a fast path for emitLiteral in the main loop, while we are
- // looking for copies.
- sLimit := len(src) - inputMargin
-
- // nextEmit is where in src the next emitLiteral should start from.
- nextEmit := 0
-
- // The encoded form must start with a literal, as there are no previous
- // bytes to copy, so we start looking for hash matches at s == 1.
- s := 1
- nextHash := hash(load32(src, s), shift)
-
- for {
- // Copied from the C++ snappy implementation:
- //
- // Heuristic match skipping: If 32 bytes are scanned with no matches
- // found, start looking only at every other byte. If 32 more bytes are
- // scanned (or skipped), look at every third byte, etc.. When a match
- // is found, immediately go back to looking at every byte. This is a
- // small loss (~5% performance, ~0.1% density) for compressible data
- // due to more bookkeeping, but for non-compressible data (such as
- // JPEG) it's a huge win since the compressor quickly "realizes" the
- // data is incompressible and doesn't bother looking for matches
- // everywhere.
- //
- // The "skip" variable keeps track of how many bytes there are since
- // the last match; dividing it by 32 (ie. right-shifting by five) gives
- // the number of bytes to move ahead for each iteration.
- skip := 32
-
- nextS := s
- candidate := 0
- for {
- s = nextS
- bytesBetweenHashLookups := skip >> 5
- nextS = s + bytesBetweenHashLookups
- skip += bytesBetweenHashLookups
- if nextS > sLimit {
- goto emitRemainder
- }
- candidate = int(table[nextHash&tableMask])
- table[nextHash&tableMask] = uint16(s)
- nextHash = hash(load32(src, nextS), shift)
- if load32(src, s) == load32(src, candidate) {
- break
- }
- }
-
- // A 4-byte match has been found. We'll later see if more than 4 bytes
- // match. But, prior to the match, src[nextEmit:s] are unmatched. Emit
- // them as literal bytes.
- d += emitLiteral(dst[d:], src[nextEmit:s])
-
- // Call emitCopy, and then see if another emitCopy could be our next
- // move. Repeat until we find no match for the input immediately after
- // what was consumed by the last emitCopy call.
- //
- // If we exit this loop normally then we need to call emitLiteral next,
- // though we don't yet know how big the literal will be. We handle that
- // by proceeding to the next iteration of the main loop. We also can
- // exit this loop via goto if we get close to exhausting the input.
- for {
- // Invariant: we have a 4-byte match at s, and no need to emit any
- // literal bytes prior to s.
- base := s
-
- // Extend the 4-byte match as long as possible.
- //
- // This is an inlined version of:
- // s = extendMatch(src, candidate+4, s+4)
- s += 4
- for i := candidate + 4; s < len(src) && src[i] == src[s]; i, s = i+1, s+1 {
- }
-
- d += emitCopy(dst[d:], base-candidate, s-base)
- nextEmit = s
- if s >= sLimit {
- goto emitRemainder
- }
-
- // We could immediately start working at s now, but to improve
- // compression we first update the hash table at s-1 and at s. If
- // another emitCopy is not our next move, also calculate nextHash
- // at s+1. At least on GOARCH=amd64, these three hash calculations
- // are faster as one load64 call (with some shifts) instead of
- // three load32 calls.
- x := load64(src, s-1)
- prevHash := hash(uint32(x>>0), shift)
- table[prevHash&tableMask] = uint16(s - 1)
- currHash := hash(uint32(x>>8), shift)
- candidate = int(table[currHash&tableMask])
- table[currHash&tableMask] = uint16(s)
- if uint32(x>>8) != load32(src, candidate) {
- nextHash = hash(uint32(x>>16), shift)
- s++
- break
- }
- }
- }
-
-emitRemainder:
- if nextEmit < len(src) {
- d += emitLiteral(dst[d:], src[nextEmit:])
- }
- return d
-}
diff --git a/vendor/github.com/golang/snappy/go.mod b/vendor/github.com/golang/snappy/go.mod
deleted file mode 100644
index f6406bb2c..000000000
--- a/vendor/github.com/golang/snappy/go.mod
+++ /dev/null
@@ -1 +0,0 @@
-module github.com/golang/snappy
diff --git a/vendor/github.com/golang/snappy/snappy.go b/vendor/github.com/golang/snappy/snappy.go
deleted file mode 100644
index ece692ea4..000000000
--- a/vendor/github.com/golang/snappy/snappy.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2011 The Snappy-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.
-
-// Package snappy implements the Snappy compression format. It aims for very
-// high speeds and reasonable compression.
-//
-// There are actually two Snappy formats: block and stream. They are related,
-// but different: trying to decompress block-compressed data as a Snappy stream
-// will fail, and vice versa. The block format is the Decode and Encode
-// functions and the stream format is the Reader and Writer types.
-//
-// The block format, the more common case, is used when the complete size (the
-// number of bytes) of the original data is known upfront, at the time
-// compression starts. The stream format, also known as the framing format, is
-// for when that isn't always true.
-//
-// The canonical, C++ implementation is at https://github.com/google/snappy and
-// it only implements the block format.
-package snappy // import "github.com/golang/snappy"
-
-import (
- "hash/crc32"
-)
-
-/*
-Each encoded block begins with the varint-encoded length of the decoded data,
-followed by a sequence of chunks. Chunks begin and end on byte boundaries. The
-first byte of each chunk is broken into its 2 least and 6 most significant bits
-called l and m: l ranges in [0, 4) and m ranges in [0, 64). l is the chunk tag.
-Zero means a literal tag. All other values mean a copy tag.
-
-For literal tags:
- - If m < 60, the next 1 + m bytes are literal bytes.
- - Otherwise, let n be the little-endian unsigned integer denoted by the next
- m - 59 bytes. The next 1 + n bytes after that are literal bytes.
-
-For copy tags, length bytes are copied from offset bytes ago, in the style of
-Lempel-Ziv compression algorithms. In particular:
- - For l == 1, the offset ranges in [0, 1<<11) and the length in [4, 12).
- The length is 4 + the low 3 bits of m. The high 3 bits of m form bits 8-10
- of the offset. The next byte is bits 0-7 of the offset.
- - For l == 2, the offset ranges in [0, 1<<16) and the length in [1, 65).
- The length is 1 + m. The offset is the little-endian unsigned integer
- denoted by the next 2 bytes.
- - For l == 3, this tag is a legacy format that is no longer issued by most
- encoders. Nonetheless, the offset ranges in [0, 1<<32) and the length in
- [1, 65). The length is 1 + m. The offset is the little-endian unsigned
- integer denoted by the next 4 bytes.
-*/
-const (
- tagLiteral = 0x00
- tagCopy1 = 0x01
- tagCopy2 = 0x02
- tagCopy4 = 0x03
-)
-
-const (
- checksumSize = 4
- chunkHeaderSize = 4
- magicChunk = "\xff\x06\x00\x00" + magicBody
- magicBody = "sNaPpY"
-
- // maxBlockSize is the maximum size of the input to encodeBlock. It is not
- // part of the wire format per se, but some parts of the encoder assume
- // that an offset fits into a uint16.
- //
- // Also, for the framing format (Writer type instead of Encode function),
- // https://github.com/google/snappy/blob/master/framing_format.txt says
- // that "the uncompressed data in a chunk must be no longer than 65536
- // bytes".
- maxBlockSize = 65536
-
- // maxEncodedLenOfMaxBlockSize equals MaxEncodedLen(maxBlockSize), but is
- // hard coded to be a const instead of a variable, so that obufLen can also
- // be a const. Their equivalence is confirmed by
- // TestMaxEncodedLenOfMaxBlockSize.
- maxEncodedLenOfMaxBlockSize = 76490
-
- obufHeaderLen = len(magicChunk) + checksumSize + chunkHeaderSize
- obufLen = obufHeaderLen + maxEncodedLenOfMaxBlockSize
-)
-
-const (
- chunkTypeCompressedData = 0x00
- chunkTypeUncompressedData = 0x01
- chunkTypePadding = 0xfe
- chunkTypeStreamIdentifier = 0xff
-)
-
-var crcTable = crc32.MakeTable(crc32.Castagnoli)
-
-// crc implements the checksum specified in section 3 of
-// https://github.com/google/snappy/blob/master/framing_format.txt
-func crc(b []byte) uint32 {
- c := crc32.Update(0, crcTable, b)
- return uint32(c>>15|c<<17) + 0xa282ead8
-}
diff --git a/vendor/github.com/gordonklaus/ineffassign/.gitignore b/vendor/github.com/gordonklaus/ineffassign/.gitignore
deleted file mode 100644
index c4feb4ff0..000000000
--- a/vendor/github.com/gordonklaus/ineffassign/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-ineffassign
-
-# Created by https://www.gitignore.io/api/go
-
-### Go ###
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
-
diff --git a/vendor/github.com/gordonklaus/ineffassign/LICENSE b/vendor/github.com/gordonklaus/ineffassign/LICENSE
deleted file mode 100644
index 9e3d9bcc0..000000000
--- a/vendor/github.com/gordonklaus/ineffassign/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2016 Gordon Klaus and contributors
-
-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/gordonklaus/ineffassign/README.md b/vendor/github.com/gordonklaus/ineffassign/README.md
deleted file mode 100644
index 5d6730695..000000000
--- a/vendor/github.com/gordonklaus/ineffassign/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# ineffassign
-Detect ineffectual assignments in Go code.
-
-This tool misses some cases because it does not consider any type information in its analysis. (For example, assignments to struct fields are never marked as ineffectual.) It should, however, never give any false positives.
diff --git a/vendor/github.com/gordonklaus/ineffassign/bugs b/vendor/github.com/gordonklaus/ineffassign/bugs
deleted file mode 100644
index 468177e0a..000000000
--- a/vendor/github.com/gordonklaus/ineffassign/bugs
+++ /dev/null
@@ -1,7 +0,0 @@
-cmd/compile/internal/big/floatconv.go:367:2 m
-cmd/cover/cover_test.go:62:2 err
-cmd/pprof/internal/profile/profile.go:131:10 err
-math/big/ftoa.go:285:2 m
-net/file_unix.go:66:7 err
-golang.org/x/mobile/app/android.go:175:2 queue
-golang.org/x/net/icmp/listen_posix.go:83:6 err
diff --git a/vendor/github.com/gordonklaus/ineffassign/ineffassign.go b/vendor/github.com/gordonklaus/ineffassign/ineffassign.go
deleted file mode 100644
index ce4a4f3fd..000000000
--- a/vendor/github.com/gordonklaus/ineffassign/ineffassign.go
+++ /dev/null
@@ -1,624 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "go/ast"
- "go/parser"
- "go/token"
- "os"
- "path/filepath"
- "sort"
- "strings"
-)
-
-const invalidArgumentExitCode = 3
-
-var dontRecurseFlag = flag.Bool("n", false, "don't recursively check paths")
-
-func main() {
- flag.Parse()
-
- if len(flag.Args()) == 0 {
- fmt.Println("missing argument: filepath")
- os.Exit(invalidArgumentExitCode)
- }
-
- lintFailed := false
- for _, path := range flag.Args() {
- root, err := filepath.Abs(path)
- if err != nil {
- fmt.Printf("Error finding absolute path: %s", err)
- os.Exit(invalidArgumentExitCode)
- }
- if walkPath(root) {
- lintFailed = true
- }
- }
- if lintFailed {
- os.Exit(1)
- }
-}
-
-func walkPath(root string) bool {
- lintFailed := false
- filepath.Walk(root, func(path string, fi os.FileInfo, err error) error {
- if err != nil {
- fmt.Printf("Error during filesystem walk: %v\n", err)
- return nil
- }
- if fi.IsDir() {
- if path != root && (*dontRecurseFlag ||
- filepath.Base(path) == "testdata" ||
- filepath.Base(path) == "vendor") {
- return filepath.SkipDir
- }
- return nil
- }
- if !strings.HasSuffix(path, ".go") {
- return nil
- }
- fset, _, ineff := checkPath(path)
- for _, id := range ineff {
- fmt.Printf("%s: ineffectual assignment to %s\n", fset.Position(id.Pos()), id.Name)
- lintFailed = true
- }
- return nil
- })
- return lintFailed
-}
-
-func checkPath(path string) (*token.FileSet, []*ast.CommentGroup, []*ast.Ident) {
- fset := token.NewFileSet()
- f, err := parser.ParseFile(fset, path, nil, parser.ParseComments)
- if err != nil {
- return nil, nil, nil
- }
-
- bld := &builder{vars: map[*ast.Object]*variable{}}
- bld.walk(f)
-
- chk := &checker{vars: bld.vars, seen: map[*block]bool{}}
- for _, b := range bld.roots {
- chk.check(b)
- }
- sort.Sort(chk.ineff)
-
- return fset, f.Comments, chk.ineff
-}
-
-type builder struct {
- roots []*block
- block *block
- vars map[*ast.Object]*variable
- results []*ast.FieldList
- breaks branchStack
- continues branchStack
- gotos branchStack
- labelStmt *ast.LabeledStmt
-}
-
-type block struct {
- children []*block
- ops map[*ast.Object][]operation
-}
-
-func (b *block) addChild(c *block) {
- b.children = append(b.children, c)
-}
-
-type operation struct {
- id *ast.Ident
- assign bool
-}
-
-type variable struct {
- fundept int
- escapes bool
-}
-
-func (bld *builder) walk(n ast.Node) {
- if n != nil {
- ast.Walk(bld, n)
- }
-}
-
-func (bld *builder) Visit(n ast.Node) ast.Visitor {
- switch n := n.(type) {
- case *ast.FuncDecl:
- if n.Body != nil {
- bld.fun(n.Type, n.Body)
- }
- case *ast.FuncLit:
- bld.fun(n.Type, n.Body)
- case *ast.IfStmt:
- bld.walk(n.Init)
- bld.walk(n.Cond)
- b0 := bld.block
- bld.newBlock(b0)
- bld.walk(n.Body)
- b1 := bld.block
- if n.Else != nil {
- bld.newBlock(b0)
- bld.walk(n.Else)
- b0 = bld.block
- }
- bld.newBlock(b0, b1)
- case *ast.ForStmt:
- lbl := bld.stmtLabel(n)
- brek := bld.breaks.push(lbl)
- continu := bld.continues.push(lbl)
- bld.walk(n.Init)
- start := bld.newBlock(bld.block)
- bld.walk(n.Cond)
- cond := bld.block
- bld.newBlock(cond)
- bld.walk(n.Body)
- continu.setDestination(bld.newBlock(bld.block))
- bld.walk(n.Post)
- bld.block.addChild(start)
- brek.setDestination(bld.newBlock(cond))
- bld.breaks.pop()
- bld.continues.pop()
- case *ast.RangeStmt:
- lbl := bld.stmtLabel(n)
- brek := bld.breaks.push(lbl)
- continu := bld.continues.push(lbl)
- bld.walk(n.X)
- pre := bld.newBlock(bld.block)
- start := bld.newBlock(pre)
- if n.Key != nil {
- lhs := []ast.Expr{n.Key}
- if n.Value != nil {
- lhs = append(lhs, n.Value)
- }
- bld.walk(&ast.AssignStmt{Lhs: lhs, Tok: n.Tok, TokPos: n.TokPos, Rhs: []ast.Expr{&ast.Ident{NamePos: n.X.End()}}})
- }
- bld.walk(n.Body)
- bld.block.addChild(start)
- continu.setDestination(pre)
- brek.setDestination(bld.newBlock(pre, bld.block))
- bld.breaks.pop()
- bld.continues.pop()
- case *ast.SwitchStmt:
- bld.walk(n.Init)
- bld.walk(n.Tag)
- bld.swtch(n, n.Body.List)
- case *ast.TypeSwitchStmt:
- bld.walk(n.Init)
- bld.walk(n.Assign)
- bld.swtch(n, n.Body.List)
- case *ast.SelectStmt:
- brek := bld.breaks.push(bld.stmtLabel(n))
- for _, c := range n.Body.List {
- c := c.(*ast.CommClause).Comm
- if s, ok := c.(*ast.AssignStmt); ok {
- bld.walk(s.Rhs[0])
- } else {
- bld.walk(c)
- }
- }
- b0 := bld.block
- exits := make([]*block, len(n.Body.List))
- dfault := false
- for i, c := range n.Body.List {
- c := c.(*ast.CommClause)
- bld.newBlock(b0)
- bld.walk(c)
- exits[i] = bld.block
- dfault = dfault || c.Comm == nil
- }
- if !dfault {
- exits = append(exits, b0)
- }
- brek.setDestination(bld.newBlock(exits...))
- bld.breaks.pop()
- case *ast.LabeledStmt:
- bld.gotos.get(n.Label).setDestination(bld.newBlock(bld.block))
- bld.labelStmt = n
- bld.walk(n.Stmt)
- case *ast.BranchStmt:
- switch n.Tok {
- case token.BREAK:
- bld.breaks.get(n.Label).addSource(bld.block)
- bld.newBlock()
- case token.CONTINUE:
- bld.continues.get(n.Label).addSource(bld.block)
- bld.newBlock()
- case token.GOTO:
- bld.gotos.get(n.Label).addSource(bld.block)
- bld.newBlock()
- }
-
- case *ast.AssignStmt:
- if n.Tok == token.QUO_ASSIGN || n.Tok == token.REM_ASSIGN {
- bld.maybePanic()
- }
-
- for _, x := range n.Rhs {
- bld.walk(x)
- }
- for i, x := range n.Lhs {
- if id, ok := ident(x); ok {
- if n.Tok >= token.ADD_ASSIGN && n.Tok <= token.AND_NOT_ASSIGN {
- bld.use(id)
- }
- // Don't treat explicit initialization to zero as assignment; it is often used as shorthand for a bare declaration.
- if n.Tok == token.DEFINE && i < len(n.Rhs) && isZeroInitializer(n.Rhs[i]) {
- bld.use(id)
- } else {
- bld.assign(id)
- }
- } else {
- bld.walk(x)
- }
- }
- case *ast.GenDecl:
- if n.Tok == token.VAR {
- for _, s := range n.Specs {
- s := s.(*ast.ValueSpec)
- for _, x := range s.Values {
- bld.walk(x)
- }
- for _, id := range s.Names {
- if len(s.Values) > 0 {
- bld.assign(id)
- } else {
- bld.use(id)
- }
- }
- }
- }
- case *ast.IncDecStmt:
- if id, ok := ident(n.X); ok {
- bld.use(id)
- bld.assign(id)
- } else {
- bld.walk(n.X)
- }
- case *ast.Ident:
- bld.use(n)
- case *ast.ReturnStmt:
- for _, x := range n.Results {
- bld.walk(x)
- }
- if res := bld.results[len(bld.results)-1]; res != nil {
- for _, f := range res.List {
- for _, id := range f.Names {
- if n.Results != nil {
- bld.assign(id)
- }
- bld.use(id)
- }
- }
- }
- bld.newBlock()
- case *ast.SendStmt:
- bld.maybePanic()
- return bld
-
- case *ast.BinaryExpr:
- if n.Op == token.EQL || n.Op == token.QUO || n.Op == token.REM {
- bld.maybePanic()
- }
- return bld
- case *ast.CallExpr:
- bld.maybePanic()
- return bld
- case *ast.IndexExpr:
- bld.maybePanic()
- return bld
- case *ast.UnaryExpr:
- id, ok := ident(n.X)
- if ix, isIx := n.X.(*ast.IndexExpr); isIx {
- // We don't care about indexing into slices, but without type information we can do no better.
- id, ok = ident(ix.X)
- }
- if ok && n.Op == token.AND {
- if v, ok := bld.vars[id.Obj]; ok {
- v.escapes = true
- }
- }
- return bld
- case *ast.SelectorExpr:
- bld.maybePanic()
- // A method call (possibly delayed via a method value) might implicitly take
- // the address of its receiver, causing it to escape.
- // We can't do any better here without knowing the variable's type.
- if id, ok := ident(n.X); ok {
- if v, ok := bld.vars[id.Obj]; ok {
- v.escapes = true
- }
- }
- return bld
- case *ast.SliceExpr:
- bld.maybePanic()
- // We don't care about slicing into slices, but without type information we can do no better.
- if id, ok := ident(n.X); ok {
- if v, ok := bld.vars[id.Obj]; ok {
- v.escapes = true
- }
- }
- return bld
- case *ast.StarExpr:
- bld.maybePanic()
- return bld
- case *ast.TypeAssertExpr:
- bld.maybePanic()
- return bld
-
- default:
- return bld
- }
- return nil
-}
-
-func isZeroInitializer(x ast.Expr) bool {
- // Assume that a call expression of a single argument is a conversion expression. We can't do better without type information.
- if c, ok := x.(*ast.CallExpr); ok {
- switch c.Fun.(type) {
- case *ast.Ident, *ast.SelectorExpr:
- default:
- return false
- }
- if len(c.Args) != 1 {
- return false
- }
- x = c.Args[0]
- }
-
- switch x := x.(type) {
- case *ast.BasicLit:
- switch x.Value {
- case "0", "0.0", "0.", ".0", `""`:
- return true
- }
- case *ast.Ident:
- return x.Name == "false" && x.Obj == nil
- }
-
- return false
-}
-
-func (bld *builder) fun(typ *ast.FuncType, body *ast.BlockStmt) {
- for _, v := range bld.vars {
- v.fundept++
- }
- bld.results = append(bld.results, typ.Results)
-
- b := bld.block
- bld.newBlock()
- bld.roots = append(bld.roots, bld.block)
- bld.walk(typ)
- bld.walk(body)
- bld.block = b
-
- bld.results = bld.results[:len(bld.results)-1]
- for _, v := range bld.vars {
- v.fundept--
- }
-}
-
-func (bld *builder) swtch(stmt ast.Stmt, cases []ast.Stmt) {
- brek := bld.breaks.push(bld.stmtLabel(stmt))
- b0 := bld.block
- list := b0
- exits := make([]*block, 0, len(cases)+1)
- var dfault, fallthru *block
- for _, c := range cases {
- c := c.(*ast.CaseClause)
-
- if c.List != nil {
- list = bld.newBlock(list)
- for _, x := range c.List {
- bld.walk(x)
- }
- }
-
- parents := []*block{}
- if c.List != nil {
- parents = append(parents, list)
- }
- if fallthru != nil {
- parents = append(parents, fallthru)
- fallthru = nil
- }
- bld.newBlock(parents...)
- if c.List == nil {
- dfault = bld.block
- }
- for _, s := range c.Body {
- bld.walk(s)
- if s, ok := s.(*ast.BranchStmt); ok && s.Tok == token.FALLTHROUGH {
- fallthru = bld.block
- }
- }
-
- if fallthru == nil {
- exits = append(exits, bld.block)
- }
- }
- if dfault != nil {
- list.addChild(dfault)
- } else {
- exits = append(exits, b0)
- }
- brek.setDestination(bld.newBlock(exits...))
- bld.breaks.pop()
-}
-
-// An operation that might panic marks named function results as used.
-func (bld *builder) maybePanic() {
- if len(bld.results) == 0 {
- return
- }
- res := bld.results[len(bld.results)-1]
- if res == nil {
- return
- }
- for _, f := range res.List {
- for _, id := range f.Names {
- bld.use(id)
- }
- }
-}
-
-func (bld *builder) newBlock(parents ...*block) *block {
- bld.block = &block{ops: map[*ast.Object][]operation{}}
- for _, b := range parents {
- b.addChild(bld.block)
- }
- return bld.block
-}
-
-func (bld *builder) stmtLabel(s ast.Stmt) *ast.Object {
- if ls := bld.labelStmt; ls != nil && ls.Stmt == s {
- return ls.Label.Obj
- }
- return nil
-}
-
-func (bld *builder) assign(id *ast.Ident) {
- bld.newOp(id, true)
-}
-
-func (bld *builder) use(id *ast.Ident) {
- bld.newOp(id, false)
-}
-
-func (bld *builder) newOp(id *ast.Ident, assign bool) {
- if id.Name == "_" || id.Obj == nil {
- return
- }
-
- v, ok := bld.vars[id.Obj]
- if !ok {
- v = &variable{}
- bld.vars[id.Obj] = v
- }
- v.escapes = v.escapes || v.fundept > 0 || bld.block == nil
-
- if b := bld.block; b != nil {
- b.ops[id.Obj] = append(b.ops[id.Obj], operation{id, assign})
- }
-}
-
-type branchStack []*branch
-
-type branch struct {
- label *ast.Object
- srcs []*block
- dst *block
-}
-
-func (s *branchStack) push(lbl *ast.Object) *branch {
- br := &branch{label: lbl}
- *s = append(*s, br)
- return br
-}
-
-func (s *branchStack) get(lbl *ast.Ident) *branch {
- for i := len(*s) - 1; i >= 0; i-- {
- if br := (*s)[i]; lbl == nil || br.label == lbl.Obj {
- return br
- }
- }
-
- // Guard against invalid code (break/continue outside of loop).
- if lbl == nil {
- return &branch{}
- }
-
- return s.push(lbl.Obj)
-}
-
-func (br *branch) addSource(src *block) {
- br.srcs = append(br.srcs, src)
- if br.dst != nil {
- src.addChild(br.dst)
- }
-}
-
-func (br *branch) setDestination(dst *block) {
- br.dst = dst
- for _, src := range br.srcs {
- src.addChild(dst)
- }
-}
-
-func (s *branchStack) pop() {
- *s = (*s)[:len(*s)-1]
-}
-
-func ident(x ast.Expr) (*ast.Ident, bool) {
- if p, ok := x.(*ast.ParenExpr); ok {
- return ident(p.X)
- }
- id, ok := x.(*ast.Ident)
- return id, ok
-}
-
-type checker struct {
- vars map[*ast.Object]*variable
- seen map[*block]bool
- ineff idents
-}
-
-func (chk *checker) check(b *block) {
- if chk.seen[b] {
- return
- }
- chk.seen[b] = true
-
- for obj, ops := range b.ops {
- if chk.vars[obj].escapes {
- continue
- }
- ops:
- for i, op := range ops {
- if !op.assign {
- continue
- }
- if i+1 < len(ops) {
- if ops[i+1].assign {
- chk.ineff = append(chk.ineff, op.id)
- }
- continue
- }
- seen := map[*block]bool{}
- for _, b := range b.children {
- if used(obj, b, seen) {
- continue ops
- }
- }
- chk.ineff = append(chk.ineff, op.id)
- }
- }
-
- for _, b := range b.children {
- chk.check(b)
- }
-}
-
-func used(obj *ast.Object, b *block, seen map[*block]bool) bool {
- if seen[b] {
- return false
- }
- seen[b] = true
-
- if ops := b.ops[obj]; len(ops) > 0 {
- return !ops[0].assign
- }
- for _, b := range b.children {
- if used(obj, b, seen) {
- return true
- }
- }
- return false
-}
-
-type idents []*ast.Ident
-
-func (ids idents) Len() int { return len(ids) }
-func (ids idents) Less(i, j int) bool { return ids[i].Pos() < ids[j].Pos() }
-func (ids idents) Swap(i, j int) { ids[i], ids[j] = ids[j], ids[i] }
diff --git a/vendor/github.com/gordonklaus/ineffassign/list b/vendor/github.com/gordonklaus/ineffassign/list
deleted file mode 100644
index 7e6b1e75a..000000000
--- a/vendor/github.com/gordonklaus/ineffassign/list
+++ /dev/null
@@ -1,25 +0,0 @@
-/Users/gordon/go/src/code.google.com/p/freetype-go/freetype/truetype/truetype.go:493:5: offset assigned and not used
-/Users/gordon/go/src/code.google.com/p/freetype-go/freetype/truetype/truetype.go:289:11: offset assigned and not used
-/Users/gordon/go/src/code.google.com/p/freetype-go/freetype/truetype/truetype_test.go:224:2: prefix assigned and not used
-/Users/gordon/go/src/code.google.com/p/freetype-go/freetype/truetype/truetype_test.go:239:3: s assigned and not used
-/Users/gordon/go/src/github.com/gordonklaus/flux/go/types/resolver.go:372:2: seenPkgs assigned and not used
-/Users/gordon/go/src/github.com/gopherjs/gopherjs/compiler/package.go:195:7: recvType assigned and not used
-/Users/gordon/go/src/golang.org/x/crypto/ocsp/ocsp.go:340:2: rest assigned and not used
-/Users/gordon/go/src/golang.org/x/crypto/openpgp/packet/opaque_test.go:35:6: err assigned and not used
-/Users/gordon/go/src/golang.org/x/crypto/otr/otr.go:641:6: in assigned and not used
-/Users/gordon/go/src/golang.org/x/crypto/otr/otr_test.go:198:17: err assigned and not used
-/Users/gordon/go/src/golang.org/x/crypto/ssh/benchmark_test.go:94:17: err assigned and not used
-/Users/gordon/go/src/golang.org/x/mobile/app/android.go:175:2: queue assigned and not used
-/Users/gordon/go/src/golang.org/x/mobile/cmd/gomobile/bind.go:411:2: w assigned and not used
-/Users/gordon/go/src/golang.org/x/mobile/cmd/gomobile/build.go:231:8: err assigned and not used
-/Users/gordon/go/src/golang.org/x/net/icmp/listen_posix.go:83:6: err assigned and not used
-/Users/gordon/go/src/golang.org/x/net/ipv4/control_unix.go:99:5: b assigned and not used
-/Users/gordon/go/src/golang.org/x/net/ipv4/control_unix.go:148:4: b assigned and not used
-/Users/gordon/go/src/golang.org/x/net/ipv6/control_unix.go:90:4: b assigned and not used
-/Users/gordon/go/src/golang.org/x/net/ipv6/control_unix.go:162:4: b assigned and not used
-/Users/gordon/go/src/golang.org/x/net/websocket/hybi.go:298:3: n assigned and not used
-/Users/gordon/go/src/golang.org/x/tools/cmd/callgraph/main.go:164:2: args assigned and not used
-/Users/gordon/go/src/golang.org/x/tools/cmd/cover/cover_test.go:52:2: err assigned and not used
-/Users/gordon/go/src/golang.org/x/tools/go/gcimporter/exportdata.go:74:13: size assigned and not used
-/Users/gordon/go/src/golang.org/x/tools/oracle/oracle.go:268:2: iprog assigned and not used
-/Users/gordon/go/src/golang.org/x/tools/oracle/oracle_test.go:299:2: iprog assigned and not used
diff --git a/vendor/github.com/gordonklaus/ineffassign/liststd b/vendor/github.com/gordonklaus/ineffassign/liststd
deleted file mode 100644
index 591d026e4..000000000
--- a/vendor/github.com/gordonklaus/ineffassign/liststd
+++ /dev/null
@@ -1,131 +0,0 @@
-/usr/local/go/src/bufio/scan.go:388:6: ineffectual assignment to width
-/usr/local/go/src/bufio/scan.go:396:6: ineffectual assignment to width
-/usr/local/go/src/bytes/buffer_test.go:141:6: ineffectual assignment to err
-/usr/local/go/src/bytes/buffer_test.go:164:3: ineffectual assignment to c
-/usr/local/go/src/cmd/cgo/out.go:799:3: ineffectual assignment to gccResult
-/usr/local/go/src/cmd/compile/internal/big/ratconv.go:170:4: ineffectual assignment to err
-/usr/local/go/src/cmd/compile/internal/gc/bimport.go:330:2: ineffectual assignment to file
-/usr/local/go/src/cmd/compile/internal/gc/cgen.go:3332:3: ineffectual assignment to max
-/usr/local/go/src/cmd/compile/internal/gc/export.go:379:2: ineffectual assignment to size
-/usr/local/go/src/cmd/compile/internal/gc/global_test.go:51:2: ineffectual assignment to out
-/usr/local/go/src/cmd/compile/internal/gc/lex.go:281:4: ineffectual assignment to c1
-/usr/local/go/src/cmd/compile/internal/gc/reg.go:1373:2: ineffectual assignment to firstf
-/usr/local/go/src/cmd/compile/internal/gc/reg.go:1381:3: ineffectual assignment to firstf
-/usr/local/go/src/cmd/compile/internal/s390x/peep.go:1048:3: ineffectual assignment to size
-/usr/local/go/src/cmd/compile/internal/s390x/peep.go:1139:3: ineffectual assignment to size
-/usr/local/go/src/cmd/compile/internal/ssa/loopbce.go:44:3: ineffectual assignment to entry
-/usr/local/go/src/cmd/cover/html.go:64:8: ineffectual assignment to err
-/usr/local/go/src/cmd/cover/html.go:66:8: ineffectual assignment to err
-/usr/local/go/src/cmd/go/build.go:3355:3: ineffectual assignment to cgoLDFLAGS
-/usr/local/go/src/cmd/internal/goobj/read.go:532:3: ineffectual assignment to data
-/usr/local/go/src/cmd/internal/obj/arm64/obj7.go:600:2: ineffectual assignment to aoffset
-/usr/local/go/src/cmd/internal/obj/mips/asm0.go:1049:3: ineffectual assignment to v
-/usr/local/go/src/cmd/internal/obj/mips/asm0.go:1101:3: ineffectual assignment to v
-/usr/local/go/src/cmd/internal/obj/s390x/objz.go:609:3: ineffectual assignment to pLast
-/usr/local/go/src/cmd/internal/pprof/profile/encode.go:279:12: ineffectual assignment to err
-/usr/local/go/src/cmd/link/internal/ld/dwarf.go:1426:2: ineffectual assignment to unitstart
-/usr/local/go/src/cmd/link/internal/ld/dwarf.go:1427:2: ineffectual assignment to headerstart
-/usr/local/go/src/cmd/link/internal/ld/dwarf.go:1428:2: ineffectual assignment to headerend
-/usr/local/go/src/cmd/link/internal/ld/elf.go:2272:3: ineffectual assignment to resoff
-/usr/local/go/src/cmd/vet/print.go:227:9: ineffectual assignment to w
-/usr/local/go/src/cmd/yacc/yacc.go:770:2: ineffectual assignment to val
-/usr/local/go/src/cmd/yacc/yacc.go:3127:2: ineffectual assignment to i
-/usr/local/go/src/compress/bzip2/huffman.go:114:4: ineffectual assignment to length
-/usr/local/go/src/compress/flate/reader_test.go:53:3: ineffectual assignment to buf0
-/usr/local/go/src/compress/flate/writer_test.go:29:3: ineffectual assignment to buf0
-/usr/local/go/src/compress/gzip/gzip_test.go:211:5: ineffectual assignment to err
-/usr/local/go/src/compress/lzw/reader_test.go:148:4: ineffectual assignment to buf0
-/usr/local/go/src/compress/lzw/writer_test.go:146:3: ineffectual assignment to buf0
-/usr/local/go/src/container/list/list_test.go:286:2: ineffectual assignment to e1
-/usr/local/go/src/container/list/list_test.go:286:6: ineffectual assignment to e2
-/usr/local/go/src/container/list/list_test.go:286:10: ineffectual assignment to e3
-/usr/local/go/src/container/list/list_test.go:286:14: ineffectual assignment to e4
-/usr/local/go/src/crypto/elliptic/p224.go:722:10: ineffectual assignment to bytes
-/usr/local/go/src/crypto/tls/handshake_messages.go:289:3: ineffectual assignment to z
-/usr/local/go/src/crypto/x509/verify.go:110:5: ineffectual assignment to certName
-/usr/local/go/src/database/sql/sql_test.go:1705:4: ineffectual assignment to numOpen
-/usr/local/go/src/database/sql/sql_test.go:1839:5: ineffectual assignment to err
-/usr/local/go/src/debug/dwarf/type.go:540:5: ineffectual assignment to haveBitOffset
-/usr/local/go/src/debug/elf/file.go:1014:3: ineffectual assignment to suffix
-/usr/local/go/src/debug/gosym/pclntab_test.go:256:2: ineffectual assignment to off
-/usr/local/go/src/debug/pe/file_test.go:309:2: ineffectual assignment to err
-/usr/local/go/src/encoding/base32/base32_test.go:120:4: ineffectual assignment to count
-/usr/local/go/src/encoding/base64/base64_test.go:174:4: ineffectual assignment to count
-/usr/local/go/src/encoding/gob/decgen.go:187:6: ineffectual assignment to err
-/usr/local/go/src/encoding/gob/encgen.go:166:6: ineffectual assignment to err
-/usr/local/go/src/encoding/json/encode.go:1071:2: ineffectual assignment to count
-/usr/local/go/src/encoding/json/encode.go:1169:6: ineffectual assignment to advance
-/usr/local/go/src/encoding/xml/xml.go:1030:6: ineffectual assignment to ok
-/usr/local/go/src/fmt/print.go:936:2: ineffectual assignment to afterIndex
-/usr/local/go/src/fmt/print.go:1051:15: ineffectual assignment to afterIndex
-/usr/local/go/src/go/ast/filter.go:84:3: ineffectual assignment to keepField
-/usr/local/go/src/go/internal/gcimporter/bimport.go:215:2: ineffectual assignment to file
-/usr/local/go/src/go/printer/nodes.go:439:4: ineffectual assignment to extraTabs
-/usr/local/go/src/go/printer/printer_test.go:155:8: ineffectual assignment to err
-/usr/local/go/src/go/types/conversions.go:49:2: ineffectual assignment to final
-/usr/local/go/src/html/template/css.go:160:2: ineffectual assignment to r
-/usr/local/go/src/html/template/css.go:160:5: ineffectual assignment to w
-/usr/local/go/src/html/template/html.go:141:2: ineffectual assignment to r
-/usr/local/go/src/html/template/html.go:141:5: ineffectual assignment to w
-/usr/local/go/src/html/template/js.go:249:2: ineffectual assignment to r
-/usr/local/go/src/html/template/js.go:249:5: ineffectual assignment to w
-/usr/local/go/src/image/decode_test.go:125:9: ineffectual assignment to err
-/usr/local/go/src/image/png/reader.go:689:2: ineffectual assignment to n
-/usr/local/go/src/image/png/writer.go:269:3: ineffectual assignment to best
-/usr/local/go/src/io/io_test.go:245:2: ineffectual assignment to n
-/usr/local/go/src/io/ioutil/ioutil.go:149:2: ineffectual assignment to readSize
-/usr/local/go/src/io/ioutil/ioutil_test.go:24:2: ineffectual assignment to contents
-/usr/local/go/src/log/syslog/syslog_test.go:236:5: ineffectual assignment to err
-/usr/local/go/src/log/syslog/syslog_test.go:240:5: ineffectual assignment to err
-/usr/local/go/src/math/big/ratconv.go:176:4: ineffectual assignment to err
-/usr/local/go/src/mime/multipart/multipart_test.go:408:2: ineffectual assignment to p
-/usr/local/go/src/net/dial_test.go:381:6: ineffectual assignment to err
-/usr/local/go/src/net/dnsname_test.go:36:6: ineffectual assignment to char63
-/usr/local/go/src/net/dnsname_test.go:37:6: ineffectual assignment to char64
-/usr/local/go/src/net/fd_plan9.go:64:4: ineffectual assignment to err
-/usr/local/go/src/net/fd_windows.go:166:3: ineffectual assignment to err
-/usr/local/go/src/net/http/fs.go:413:5: ineffectual assignment to name
-/usr/local/go/src/net/http/h2_bundle.go:6249:4: ineffectual assignment to n
-/usr/local/go/src/net/http/request_test.go:155:13: ineffectual assignment to err
-/usr/local/go/src/net/http/serve_test.go:4053:13: ineffectual assignment to err
-/usr/local/go/src/net/http/transport_test.go:729:8: ineffectual assignment to err
-/usr/local/go/src/net/http/transport_test.go:2345:3: ineffectual assignment to slurp
-/usr/local/go/src/net/parse.go:27:2: ineffectual assignment to i
-/usr/local/go/src/net/rpc/server.go:270:3: ineffectual assignment to str
-/usr/local/go/src/net/udpsock_plan9.go:80:16: ineffectual assignment to i
-/usr/local/go/src/os/env_test.go:109:2: ineffectual assignment to value
-/usr/local/go/src/os/os_test.go:1080:5: ineffectual assignment to err
-/usr/local/go/src/os/path_test.go:122:2: ineffectual assignment to testit
-/usr/local/go/src/reflect/type.go:2379:3: ineffectual assignment to name
-/usr/local/go/src/regexp/exec.go:123:2: ineffectual assignment to r
-/usr/local/go/src/regexp/exec.go:124:2: ineffectual assignment to width
-/usr/local/go/src/regexp/exec.go:321:2: ineffectual assignment to r
-/usr/local/go/src/regexp/exec.go:322:2: ineffectual assignment to width
-/usr/local/go/src/regexp/onepass.go:338:15: ineffectual assignment to matchArg
-/usr/local/go/src/regexp/syntax/parse.go:577:2: ineffectual assignment to start
-/usr/local/go/src/runtime/lfstack_test.go:48:2: ineffectual assignment to nodes
-/usr/local/go/src/runtime/mbitmap.go:1458:3: ineffectual assignment to i
-/usr/local/go/src/runtime/mfinal_test.go:60:4: ineffectual assignment to v
-/usr/local/go/src/runtime/mfinal_test.go:98:3: ineffectual assignment to v
-/usr/local/go/src/runtime/mgcmark.go:414:2: ineffectual assignment to stolen
-/usr/local/go/src/runtime/mgcsweep.go:188:2: ineffectual assignment to nfree
-/usr/local/go/src/runtime/os_plan9.go:307:2: ineffectual assignment to n
-/usr/local/go/src/runtime/pprof/pprof.go:465:5: ineffectual assignment to ok
-/usr/local/go/src/runtime/pprof/pprof.go:608:5: ineffectual assignment to ok
-/usr/local/go/src/runtime/pprof/pprof.go:751:5: ineffectual assignment to ok
-/usr/local/go/src/runtime/proc.go:4227:3: ineffectual assignment to xname
-/usr/local/go/src/runtime/runtime1.go:360:3: ineffectual assignment to field
-/usr/local/go/src/runtime/runtime_mmap_test.go:25:2: ineffectual assignment to p
-/usr/local/go/src/runtime/softfloat64.go:228:3: ineffectual assignment to f
-/usr/local/go/src/runtime/softfloat64.go:228:6: ineffectual assignment to g
-/usr/local/go/src/runtime/stack_test.go:106:4: ineffectual assignment to s
-/usr/local/go/src/strconv/quote.go:23:6: ineffectual assignment to width
-/usr/local/go/src/sync/atomic/atomic_test.go:1122:2: ineffectual assignment to new
-/usr/local/go/src/sync/atomic/atomic_test.go:1150:2: ineffectual assignment to new
-/usr/local/go/src/syscall/dir_plan9.go:88:2: ineffectual assignment to b
-/usr/local/go/src/syscall/dir_plan9.go:131:13: ineffectual assignment to b
-/usr/local/go/src/syscall/exec_plan9.go:281:2: ineffectual assignment to r1
-/usr/local/go/src/syscall/mksyscall_windows.go:310:2: ineffectual assignment to s
-/usr/local/go/src/syscall/syscall_bsd_test.go:23:2: ineffectual assignment to n
-/usr/local/go/src/syscall/syscall_unix_test.go:187:17: ineffectual assignment to err
-/usr/local/go/src/text/template/multi_test.go:249:9: ineffectual assignment to err
diff --git a/vendor/github.com/hashicorp/hcl/.gitignore b/vendor/github.com/hashicorp/hcl/.gitignore
deleted file mode 100644
index 15586a2b5..000000000
--- a/vendor/github.com/hashicorp/hcl/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-y.output
-
-# ignore intellij files
-.idea
-*.iml
-*.ipr
-*.iws
-
-*.test
diff --git a/vendor/github.com/hashicorp/hcl/.travis.yml b/vendor/github.com/hashicorp/hcl/.travis.yml
deleted file mode 100644
index cb63a3216..000000000
--- a/vendor/github.com/hashicorp/hcl/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-sudo: false
-
-language: go
-
-go:
- - 1.x
- - tip
-
-branches:
- only:
- - master
-
-script: make test
diff --git a/vendor/github.com/hashicorp/hcl/LICENSE b/vendor/github.com/hashicorp/hcl/LICENSE
deleted file mode 100644
index c33dcc7c9..000000000
--- a/vendor/github.com/hashicorp/hcl/LICENSE
+++ /dev/null
@@ -1,354 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. “Contributor”
-
- means each individual or legal entity that creates, contributes to the
- creation of, or owns Covered Software.
-
-1.2. “Contributor Version”
-
- means the combination of the Contributions of others (if any) used by a
- Contributor and that particular Contributor’s Contribution.
-
-1.3. “Contribution”
-
- means Covered Software of a particular Contributor.
-
-1.4. “Covered Software”
-
- means Source Code Form to which the initial Contributor has attached the
- notice in Exhibit A, the Executable Form of such Source Code Form, and
- Modifications of such Source Code Form, in each case including portions
- thereof.
-
-1.5. “Incompatible With Secondary Licenses”
- means
-
- a. that the initial Contributor has attached the notice described in
- Exhibit B to the Covered Software; or
-
- b. that the Covered Software was made available under the terms of version
- 1.1 or earlier of the License, but not also under the terms of a
- Secondary License.
-
-1.6. “Executable Form”
-
- means any form of the work other than Source Code Form.
-
-1.7. “Larger Work”
-
- means a work that combines Covered Software with other material, in a separate
- file or files, that is not Covered Software.
-
-1.8. “License”
-
- means this document.
-
-1.9. “Licensable”
-
- means having the right to grant, to the maximum extent possible, whether at the
- time of the initial grant or subsequently, any and all of the rights conveyed by
- this License.
-
-1.10. “Modifications”
-
- means any of the following:
-
- a. any file in Source Code Form that results from an addition to, deletion
- from, or modification of the contents of Covered Software; or
-
- b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. “Patent Claims” of a Contributor
-
- means any patent claim(s), including without limitation, method, process,
- and apparatus claims, in any patent Licensable by such Contributor that
- would be infringed, but for the grant of the License, by the making,
- using, selling, offering for sale, having made, import, or transfer of
- either its Contributions or its Contributor Version.
-
-1.12. “Secondary License”
-
- means either the GNU General Public License, Version 2.0, the GNU Lesser
- General Public License, Version 2.1, the GNU Affero General Public
- License, Version 3.0, or any later versions of those licenses.
-
-1.13. “Source Code Form”
-
- means the form of the work preferred for making modifications.
-
-1.14. “You” (or “Your”)
-
- means an individual or a legal entity exercising rights under this
- License. For legal entities, “You” includes any entity that controls, is
- controlled by, or is under common control with You. For purposes of this
- definition, “control” means (a) the power, direct or indirect, to cause
- the direction or management of such entity, whether by contract or
- otherwise, or (b) ownership of more than fifty percent (50%) of the
- outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
- Each Contributor hereby grants You a world-wide, royalty-free,
- non-exclusive license:
-
- a. under intellectual property rights (other than patent or trademark)
- Licensable by such Contributor to use, reproduce, make available,
- modify, display, perform, distribute, and otherwise exploit its
- Contributions, either on an unmodified basis, with Modifications, or as
- part of a Larger Work; and
-
- b. under Patent Claims of such Contributor to make, use, sell, offer for
- sale, have made, import, and otherwise transfer either its Contributions
- or its Contributor Version.
-
-2.2. Effective Date
-
- The licenses granted in Section 2.1 with respect to any Contribution become
- effective for each Contribution on the date the Contributor first distributes
- such Contribution.
-
-2.3. Limitations on Grant Scope
-
- The licenses granted in this Section 2 are the only rights granted under this
- License. No additional rights or licenses will be implied from the distribution
- or licensing of Covered Software under this License. Notwithstanding Section
- 2.1(b) above, no patent license is granted by a Contributor:
-
- a. for any code that a Contributor has removed from Covered Software; or
-
- b. for infringements caused by: (i) Your and any other third party’s
- modifications of Covered Software, or (ii) the combination of its
- Contributions with other software (except as part of its Contributor
- Version); or
-
- c. under Patent Claims infringed by Covered Software in the absence of its
- Contributions.
-
- This License does not grant any rights in the trademarks, service marks, or
- logos of any Contributor (except as may be necessary to comply with the
- notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
- No Contributor makes additional grants as a result of Your choice to
- distribute the Covered Software under a subsequent version of this License
- (see Section 10.2) or under the terms of a Secondary License (if permitted
- under the terms of Section 3.3).
-
-2.5. Representation
-
- Each Contributor represents that the Contributor believes its Contributions
- are its original creation(s) or it has sufficient rights to grant the
- rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
- This License is not intended to limit any rights You have under applicable
- copyright doctrines of fair use, fair dealing, or other equivalents.
-
-2.7. Conditions
-
- Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
- Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
- All distribution of Covered Software in Source Code Form, including any
- Modifications that You create or to which You contribute, must be under the
- terms of this License. You must inform recipients that the Source Code Form
- of the Covered Software is governed by the terms of this License, and how
- they can obtain a copy of this License. You may not attempt to alter or
- restrict the recipients’ rights in the Source Code Form.
-
-3.2. Distribution of Executable Form
-
- If You distribute Covered Software in Executable Form then:
-
- a. such Covered Software must also be made available in Source Code Form,
- as described in Section 3.1, and You must inform recipients of the
- Executable Form how they can obtain a copy of such Source Code Form by
- reasonable means in a timely manner, at a charge no more than the cost
- of distribution to the recipient; and
-
- b. You may distribute such Executable Form under the terms of this License,
- or sublicense it under different terms, provided that the license for
- the Executable Form does not attempt to limit or alter the recipients’
- rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
- You may create and distribute a Larger Work under terms of Your choice,
- provided that You also comply with the requirements of this License for the
- Covered Software. If the Larger Work is a combination of Covered Software
- with a work governed by one or more Secondary Licenses, and the Covered
- Software is not Incompatible With Secondary Licenses, this License permits
- You to additionally distribute such Covered Software under the terms of
- such Secondary License(s), so that the recipient of the Larger Work may, at
- their option, further distribute the Covered Software under the terms of
- either this License or such Secondary License(s).
-
-3.4. Notices
-
- You may not remove or alter the substance of any license notices (including
- copyright notices, patent notices, disclaimers of warranty, or limitations
- of liability) contained within the Source Code Form of the Covered
- Software, except that You may alter any license notices to the extent
- required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
- You may choose to offer, and to charge a fee for, warranty, support,
- indemnity or liability obligations to one or more recipients of Covered
- Software. However, You may do so only on Your own behalf, and not on behalf
- of any Contributor. You must make it absolutely clear that any such
- warranty, support, indemnity, or liability obligation is offered by You
- alone, and You hereby agree to indemnify every Contributor for any
- liability incurred by such Contributor as a result of warranty, support,
- indemnity or liability terms You offer. You may include additional
- disclaimers of warranty and limitations of liability specific to any
- jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
- If it is impossible for You to comply with any of the terms of this License
- with respect to some or all of the Covered Software due to statute, judicial
- order, or regulation then You must: (a) comply with the terms of this License
- to the maximum extent possible; and (b) describe the limitations and the code
- they affect. Such description must be placed in a text file included with all
- distributions of the Covered Software under this License. Except to the
- extent prohibited by statute or regulation, such description must be
- sufficiently detailed for a recipient of ordinary skill to be able to
- understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
- fail to comply with any of its terms. However, if You become compliant,
- then the rights granted under this License from a particular Contributor
- are reinstated (a) provisionally, unless and until such Contributor
- explicitly and finally terminates Your grants, and (b) on an ongoing basis,
- if such Contributor fails to notify You of the non-compliance by some
- reasonable means prior to 60 days after You have come back into compliance.
- Moreover, Your grants from a particular Contributor are reinstated on an
- ongoing basis if such Contributor notifies You of the non-compliance by
- some reasonable means, this is the first time You have received notice of
- non-compliance with this License from such Contributor, and You become
- compliant prior to 30 days after Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
- infringement claim (excluding declaratory judgment actions, counter-claims,
- and cross-claims) alleging that a Contributor Version directly or
- indirectly infringes any patent, then the rights granted to You by any and
- all Contributors for the Covered Software under Section 2.1 of this License
- shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
- license agreements (excluding distributors and resellers) which have been
- validly granted by You or Your distributors under this License prior to
- termination shall survive termination.
-
-6. Disclaimer of Warranty
-
- Covered Software is provided under this License on an “as is” basis, without
- warranty of any kind, either expressed, implied, or statutory, including,
- without limitation, warranties that the Covered Software is free of defects,
- merchantable, fit for a particular purpose or non-infringing. The entire
- risk as to the quality and performance of the Covered Software is with You.
- Should any Covered Software prove defective in any respect, You (not any
- Contributor) assume the cost of any necessary servicing, repair, or
- correction. This disclaimer of warranty constitutes an essential part of this
- License. No use of any Covered Software is authorized under this License
- except under this disclaimer.
-
-7. Limitation of Liability
-
- Under no circumstances and under no legal theory, whether tort (including
- negligence), contract, or otherwise, shall any Contributor, or anyone who
- distributes Covered Software as permitted above, be liable to You for any
- direct, indirect, special, incidental, or consequential damages of any
- character including, without limitation, damages for lost profits, loss of
- goodwill, work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses, even if such party shall have been
- informed of the possibility of such damages. This limitation of liability
- shall not apply to liability for death or personal injury resulting from such
- party’s negligence to the extent applicable law prohibits such limitation.
- Some jurisdictions do not allow the exclusion or limitation of incidental or
- consequential damages, so this exclusion and limitation may not apply to You.
-
-8. Litigation
-
- Any litigation relating to this License may be brought only in the courts of
- a jurisdiction where the defendant maintains its principal place of business
- and such litigation shall be governed by laws of that jurisdiction, without
- reference to its conflict-of-law provisions. Nothing in this Section shall
- prevent a party’s ability to bring cross-claims or counter-claims.
-
-9. Miscellaneous
-
- This License represents the complete agreement concerning the subject matter
- hereof. If any provision of this License is held to be unenforceable, such
- provision shall be reformed only to the extent necessary to make it
- enforceable. Any law or regulation which provides that the language of a
- contract shall be construed against the drafter shall not be used to construe
- this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
- Mozilla Foundation is the license steward. Except as provided in Section
- 10.3, no one other than the license steward has the right to modify or
- publish new versions of this License. Each version will be given a
- distinguishing version number.
-
-10.2. Effect of New Versions
-
- You may distribute the Covered Software under the terms of the version of
- the License under which You originally received the Covered Software, or
- under the terms of any subsequent version published by the license
- steward.
-
-10.3. Modified Versions
-
- If you create software not governed by this License, and you want to
- create a new license for such software, you may create and use a modified
- version of this License if you rename the license and remove any
- references to the name of the license steward (except to note that such
- modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
- If You choose to distribute Source Code Form that is Incompatible With
- Secondary Licenses under the terms of this version of the License, the
- notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
-
- This Source Code Form is subject to the
- terms of the Mozilla Public License, v.
- 2.0. If a copy of the MPL was not
- distributed with this file, You can
- obtain one at
- http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file, then
-You may include the notice in a location (such as a LICENSE file in a relevant
-directory) where a recipient would be likely to look for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - “Incompatible With Secondary Licenses” Notice
-
- This Source Code Form is “Incompatible
- With Secondary Licenses”, as defined by
- the Mozilla Public License, v. 2.0.
-
diff --git a/vendor/github.com/hashicorp/hcl/Makefile b/vendor/github.com/hashicorp/hcl/Makefile
deleted file mode 100644
index 84fd743f5..000000000
--- a/vendor/github.com/hashicorp/hcl/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-TEST?=./...
-
-default: test
-
-fmt: generate
- go fmt ./...
-
-test: generate
- go get -t ./...
- go test $(TEST) $(TESTARGS)
-
-generate:
- go generate ./...
-
-updatedeps:
- go get -u golang.org/x/tools/cmd/stringer
-
-.PHONY: default generate test updatedeps
diff --git a/vendor/github.com/hashicorp/hcl/README.md b/vendor/github.com/hashicorp/hcl/README.md
deleted file mode 100644
index c8223326d..000000000
--- a/vendor/github.com/hashicorp/hcl/README.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# HCL
-
-[](https://godoc.org/github.com/hashicorp/hcl) [](https://travis-ci.org/hashicorp/hcl)
-
-HCL (HashiCorp Configuration Language) is a configuration language built
-by HashiCorp. The goal of HCL is to build a structured configuration language
-that is both human and machine friendly for use with command-line tools, but
-specifically targeted towards DevOps tools, servers, etc.
-
-HCL is also fully JSON compatible. That is, JSON can be used as completely
-valid input to a system expecting HCL. This helps makes systems
-interoperable with other systems.
-
-HCL is heavily inspired by
-[libucl](https://github.com/vstakhov/libucl),
-nginx configuration, and others similar.
-
-## Why?
-
-A common question when viewing HCL is to ask the question: why not
-JSON, YAML, etc.?
-
-Prior to HCL, the tools we built at [HashiCorp](http://www.hashicorp.com)
-used a variety of configuration languages from full programming languages
-such as Ruby to complete data structure languages such as JSON. What we
-learned is that some people wanted human-friendly configuration languages
-and some people wanted machine-friendly languages.
-
-JSON fits a nice balance in this, but is fairly verbose and most
-importantly doesn't support comments. With YAML, we found that beginners
-had a really hard time determining what the actual structure was, and
-ended up guessing more often than not whether to use a hyphen, colon, etc.
-in order to represent some configuration key.
-
-Full programming languages such as Ruby enable complex behavior
-a configuration language shouldn't usually allow, and also forces
-people to learn some set of Ruby.
-
-Because of this, we decided to create our own configuration language
-that is JSON-compatible. Our configuration language (HCL) is designed
-to be written and modified by humans. The API for HCL allows JSON
-as an input so that it is also machine-friendly (machines can generate
-JSON instead of trying to generate HCL).
-
-Our goal with HCL is not to alienate other configuration languages.
-It is instead to provide HCL as a specialized language for our tools,
-and JSON as the interoperability layer.
-
-## Syntax
-
-For a complete grammar, please see the parser itself. A high-level overview
-of the syntax and grammar is listed here.
-
- * Single line comments start with `#` or `//`
-
- * Multi-line comments are wrapped in `/*` and `*/`. Nested block comments
- are not allowed. A multi-line comment (also known as a block comment)
- terminates at the first `*/` found.
-
- * Values are assigned with the syntax `key = value` (whitespace doesn't
- matter). The value can be any primitive: a string, number, boolean,
- object, or list.
-
- * Strings are double-quoted and can contain any UTF-8 characters.
- Example: `"Hello, World"`
-
- * Multi-line strings start with `<-
- echo %Path%
-
- go version
-
- go env
-
- go get -t ./...
-
-build_script:
-- cmd: go test -v ./...
diff --git a/vendor/github.com/hashicorp/hcl/decoder.go b/vendor/github.com/hashicorp/hcl/decoder.go
deleted file mode 100644
index bed9ebbe1..000000000
--- a/vendor/github.com/hashicorp/hcl/decoder.go
+++ /dev/null
@@ -1,729 +0,0 @@
-package hcl
-
-import (
- "errors"
- "fmt"
- "reflect"
- "sort"
- "strconv"
- "strings"
-
- "github.com/hashicorp/hcl/hcl/ast"
- "github.com/hashicorp/hcl/hcl/parser"
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-// This is the tag to use with structures to have settings for HCL
-const tagName = "hcl"
-
-var (
- // nodeType holds a reference to the type of ast.Node
- nodeType reflect.Type = findNodeType()
-)
-
-// Unmarshal accepts a byte slice as input and writes the
-// data to the value pointed to by v.
-func Unmarshal(bs []byte, v interface{}) error {
- root, err := parse(bs)
- if err != nil {
- return err
- }
-
- return DecodeObject(v, root)
-}
-
-// Decode reads the given input and decodes it into the structure
-// given by `out`.
-func Decode(out interface{}, in string) error {
- obj, err := Parse(in)
- if err != nil {
- return err
- }
-
- return DecodeObject(out, obj)
-}
-
-// DecodeObject is a lower-level version of Decode. It decodes a
-// raw Object into the given output.
-func DecodeObject(out interface{}, n ast.Node) error {
- val := reflect.ValueOf(out)
- if val.Kind() != reflect.Ptr {
- return errors.New("result must be a pointer")
- }
-
- // If we have the file, we really decode the root node
- if f, ok := n.(*ast.File); ok {
- n = f.Node
- }
-
- var d decoder
- return d.decode("root", n, val.Elem())
-}
-
-type decoder struct {
- stack []reflect.Kind
-}
-
-func (d *decoder) decode(name string, node ast.Node, result reflect.Value) error {
- k := result
-
- // If we have an interface with a valid value, we use that
- // for the check.
- if result.Kind() == reflect.Interface {
- elem := result.Elem()
- if elem.IsValid() {
- k = elem
- }
- }
-
- // Push current onto stack unless it is an interface.
- if k.Kind() != reflect.Interface {
- d.stack = append(d.stack, k.Kind())
-
- // Schedule a pop
- defer func() {
- d.stack = d.stack[:len(d.stack)-1]
- }()
- }
-
- switch k.Kind() {
- case reflect.Bool:
- return d.decodeBool(name, node, result)
- case reflect.Float32, reflect.Float64:
- return d.decodeFloat(name, node, result)
- case reflect.Int, reflect.Int32, reflect.Int64:
- return d.decodeInt(name, node, result)
- case reflect.Interface:
- // When we see an interface, we make our own thing
- return d.decodeInterface(name, node, result)
- case reflect.Map:
- return d.decodeMap(name, node, result)
- case reflect.Ptr:
- return d.decodePtr(name, node, result)
- case reflect.Slice:
- return d.decodeSlice(name, node, result)
- case reflect.String:
- return d.decodeString(name, node, result)
- case reflect.Struct:
- return d.decodeStruct(name, node, result)
- default:
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: unknown kind to decode into: %s", name, k.Kind()),
- }
- }
-}
-
-func (d *decoder) decodeBool(name string, node ast.Node, result reflect.Value) error {
- switch n := node.(type) {
- case *ast.LiteralType:
- if n.Token.Type == token.BOOL {
- v, err := strconv.ParseBool(n.Token.Text)
- if err != nil {
- return err
- }
-
- result.Set(reflect.ValueOf(v))
- return nil
- }
- }
-
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: unknown type %T", name, node),
- }
-}
-
-func (d *decoder) decodeFloat(name string, node ast.Node, result reflect.Value) error {
- switch n := node.(type) {
- case *ast.LiteralType:
- if n.Token.Type == token.FLOAT || n.Token.Type == token.NUMBER {
- v, err := strconv.ParseFloat(n.Token.Text, 64)
- if err != nil {
- return err
- }
-
- result.Set(reflect.ValueOf(v).Convert(result.Type()))
- return nil
- }
- }
-
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: unknown type %T", name, node),
- }
-}
-
-func (d *decoder) decodeInt(name string, node ast.Node, result reflect.Value) error {
- switch n := node.(type) {
- case *ast.LiteralType:
- switch n.Token.Type {
- case token.NUMBER:
- v, err := strconv.ParseInt(n.Token.Text, 0, 0)
- if err != nil {
- return err
- }
-
- if result.Kind() == reflect.Interface {
- result.Set(reflect.ValueOf(int(v)))
- } else {
- result.SetInt(v)
- }
- return nil
- case token.STRING:
- v, err := strconv.ParseInt(n.Token.Value().(string), 0, 0)
- if err != nil {
- return err
- }
-
- if result.Kind() == reflect.Interface {
- result.Set(reflect.ValueOf(int(v)))
- } else {
- result.SetInt(v)
- }
- return nil
- }
- }
-
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: unknown type %T", name, node),
- }
-}
-
-func (d *decoder) decodeInterface(name string, node ast.Node, result reflect.Value) error {
- // When we see an ast.Node, we retain the value to enable deferred decoding.
- // Very useful in situations where we want to preserve ast.Node information
- // like Pos
- if result.Type() == nodeType && result.CanSet() {
- result.Set(reflect.ValueOf(node))
- return nil
- }
-
- var set reflect.Value
- redecode := true
-
- // For testing types, ObjectType should just be treated as a list. We
- // set this to a temporary var because we want to pass in the real node.
- testNode := node
- if ot, ok := node.(*ast.ObjectType); ok {
- testNode = ot.List
- }
-
- switch n := testNode.(type) {
- case *ast.ObjectList:
- // If we're at the root or we're directly within a slice, then we
- // decode objects into map[string]interface{}, otherwise we decode
- // them into lists.
- if len(d.stack) == 0 || d.stack[len(d.stack)-1] == reflect.Slice {
- var temp map[string]interface{}
- tempVal := reflect.ValueOf(temp)
- result := reflect.MakeMap(
- reflect.MapOf(
- reflect.TypeOf(""),
- tempVal.Type().Elem()))
-
- set = result
- } else {
- var temp []map[string]interface{}
- tempVal := reflect.ValueOf(temp)
- result := reflect.MakeSlice(
- reflect.SliceOf(tempVal.Type().Elem()), 0, len(n.Items))
- set = result
- }
- case *ast.ObjectType:
- // If we're at the root or we're directly within a slice, then we
- // decode objects into map[string]interface{}, otherwise we decode
- // them into lists.
- if len(d.stack) == 0 || d.stack[len(d.stack)-1] == reflect.Slice {
- var temp map[string]interface{}
- tempVal := reflect.ValueOf(temp)
- result := reflect.MakeMap(
- reflect.MapOf(
- reflect.TypeOf(""),
- tempVal.Type().Elem()))
-
- set = result
- } else {
- var temp []map[string]interface{}
- tempVal := reflect.ValueOf(temp)
- result := reflect.MakeSlice(
- reflect.SliceOf(tempVal.Type().Elem()), 0, 1)
- set = result
- }
- case *ast.ListType:
- var temp []interface{}
- tempVal := reflect.ValueOf(temp)
- result := reflect.MakeSlice(
- reflect.SliceOf(tempVal.Type().Elem()), 0, 0)
- set = result
- case *ast.LiteralType:
- switch n.Token.Type {
- case token.BOOL:
- var result bool
- set = reflect.Indirect(reflect.New(reflect.TypeOf(result)))
- case token.FLOAT:
- var result float64
- set = reflect.Indirect(reflect.New(reflect.TypeOf(result)))
- case token.NUMBER:
- var result int
- set = reflect.Indirect(reflect.New(reflect.TypeOf(result)))
- case token.STRING, token.HEREDOC:
- set = reflect.Indirect(reflect.New(reflect.TypeOf("")))
- default:
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: cannot decode into interface: %T", name, node),
- }
- }
- default:
- return fmt.Errorf(
- "%s: cannot decode into interface: %T",
- name, node)
- }
-
- // Set the result to what its supposed to be, then reset
- // result so we don't reflect into this method anymore.
- result.Set(set)
-
- if redecode {
- // Revisit the node so that we can use the newly instantiated
- // thing and populate it.
- if err := d.decode(name, node, result); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (d *decoder) decodeMap(name string, node ast.Node, result reflect.Value) error {
- if item, ok := node.(*ast.ObjectItem); ok {
- node = &ast.ObjectList{Items: []*ast.ObjectItem{item}}
- }
-
- if ot, ok := node.(*ast.ObjectType); ok {
- node = ot.List
- }
-
- n, ok := node.(*ast.ObjectList)
- if !ok {
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: not an object type for map (%T)", name, node),
- }
- }
-
- // If we have an interface, then we can address the interface,
- // but not the slice itself, so get the element but set the interface
- set := result
- if result.Kind() == reflect.Interface {
- result = result.Elem()
- }
-
- resultType := result.Type()
- resultElemType := resultType.Elem()
- resultKeyType := resultType.Key()
- if resultKeyType.Kind() != reflect.String {
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: map must have string keys", name),
- }
- }
-
- // Make a map if it is nil
- resultMap := result
- if result.IsNil() {
- resultMap = reflect.MakeMap(
- reflect.MapOf(resultKeyType, resultElemType))
- }
-
- // Go through each element and decode it.
- done := make(map[string]struct{})
- for _, item := range n.Items {
- if item.Val == nil {
- continue
- }
-
- // github.com/hashicorp/terraform/issue/5740
- if len(item.Keys) == 0 {
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: map must have string keys", name),
- }
- }
-
- // Get the key we're dealing with, which is the first item
- keyStr := item.Keys[0].Token.Value().(string)
-
- // If we've already processed this key, then ignore it
- if _, ok := done[keyStr]; ok {
- continue
- }
-
- // Determine the value. If we have more than one key, then we
- // get the objectlist of only these keys.
- itemVal := item.Val
- if len(item.Keys) > 1 {
- itemVal = n.Filter(keyStr)
- done[keyStr] = struct{}{}
- }
-
- // Make the field name
- fieldName := fmt.Sprintf("%s.%s", name, keyStr)
-
- // Get the key/value as reflection values
- key := reflect.ValueOf(keyStr)
- val := reflect.Indirect(reflect.New(resultElemType))
-
- // If we have a pre-existing value in the map, use that
- oldVal := resultMap.MapIndex(key)
- if oldVal.IsValid() {
- val.Set(oldVal)
- }
-
- // Decode!
- if err := d.decode(fieldName, itemVal, val); err != nil {
- return err
- }
-
- // Set the value on the map
- resultMap.SetMapIndex(key, val)
- }
-
- // Set the final map if we can
- set.Set(resultMap)
- return nil
-}
-
-func (d *decoder) decodePtr(name string, node ast.Node, result reflect.Value) error {
- // Create an element of the concrete (non pointer) type and decode
- // into that. Then set the value of the pointer to this type.
- resultType := result.Type()
- resultElemType := resultType.Elem()
- val := reflect.New(resultElemType)
- if err := d.decode(name, node, reflect.Indirect(val)); err != nil {
- return err
- }
-
- result.Set(val)
- return nil
-}
-
-func (d *decoder) decodeSlice(name string, node ast.Node, result reflect.Value) error {
- // If we have an interface, then we can address the interface,
- // but not the slice itself, so get the element but set the interface
- set := result
- if result.Kind() == reflect.Interface {
- result = result.Elem()
- }
- // Create the slice if it isn't nil
- resultType := result.Type()
- resultElemType := resultType.Elem()
- if result.IsNil() {
- resultSliceType := reflect.SliceOf(resultElemType)
- result = reflect.MakeSlice(
- resultSliceType, 0, 0)
- }
-
- // Figure out the items we'll be copying into the slice
- var items []ast.Node
- switch n := node.(type) {
- case *ast.ObjectList:
- items = make([]ast.Node, len(n.Items))
- for i, item := range n.Items {
- items[i] = item
- }
- case *ast.ObjectType:
- items = []ast.Node{n}
- case *ast.ListType:
- items = n.List
- default:
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("unknown slice type: %T", node),
- }
- }
-
- for i, item := range items {
- fieldName := fmt.Sprintf("%s[%d]", name, i)
-
- // Decode
- val := reflect.Indirect(reflect.New(resultElemType))
-
- // if item is an object that was decoded from ambiguous JSON and
- // flattened, make sure it's expanded if it needs to decode into a
- // defined structure.
- item := expandObject(item, val)
-
- if err := d.decode(fieldName, item, val); err != nil {
- return err
- }
-
- // Append it onto the slice
- result = reflect.Append(result, val)
- }
-
- set.Set(result)
- return nil
-}
-
-// expandObject detects if an ambiguous JSON object was flattened to a List which
-// should be decoded into a struct, and expands the ast to properly deocode.
-func expandObject(node ast.Node, result reflect.Value) ast.Node {
- item, ok := node.(*ast.ObjectItem)
- if !ok {
- return node
- }
-
- elemType := result.Type()
-
- // our target type must be a struct
- switch elemType.Kind() {
- case reflect.Ptr:
- switch elemType.Elem().Kind() {
- case reflect.Struct:
- //OK
- default:
- return node
- }
- case reflect.Struct:
- //OK
- default:
- return node
- }
-
- // A list value will have a key and field name. If it had more fields,
- // it wouldn't have been flattened.
- if len(item.Keys) != 2 {
- return node
- }
-
- keyToken := item.Keys[0].Token
- item.Keys = item.Keys[1:]
-
- // we need to un-flatten the ast enough to decode
- newNode := &ast.ObjectItem{
- Keys: []*ast.ObjectKey{
- &ast.ObjectKey{
- Token: keyToken,
- },
- },
- Val: &ast.ObjectType{
- List: &ast.ObjectList{
- Items: []*ast.ObjectItem{item},
- },
- },
- }
-
- return newNode
-}
-
-func (d *decoder) decodeString(name string, node ast.Node, result reflect.Value) error {
- switch n := node.(type) {
- case *ast.LiteralType:
- switch n.Token.Type {
- case token.NUMBER:
- result.Set(reflect.ValueOf(n.Token.Text).Convert(result.Type()))
- return nil
- case token.STRING, token.HEREDOC:
- result.Set(reflect.ValueOf(n.Token.Value()).Convert(result.Type()))
- return nil
- }
- }
-
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: unknown type for string %T", name, node),
- }
-}
-
-func (d *decoder) decodeStruct(name string, node ast.Node, result reflect.Value) error {
- var item *ast.ObjectItem
- if it, ok := node.(*ast.ObjectItem); ok {
- item = it
- node = it.Val
- }
-
- if ot, ok := node.(*ast.ObjectType); ok {
- node = ot.List
- }
-
- // Handle the special case where the object itself is a literal. Previously
- // the yacc parser would always ensure top-level elements were arrays. The new
- // parser does not make the same guarantees, thus we need to convert any
- // top-level literal elements into a list.
- if _, ok := node.(*ast.LiteralType); ok && item != nil {
- node = &ast.ObjectList{Items: []*ast.ObjectItem{item}}
- }
-
- list, ok := node.(*ast.ObjectList)
- if !ok {
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: not an object type for struct (%T)", name, node),
- }
- }
-
- // This slice will keep track of all the structs we'll be decoding.
- // There can be more than one struct if there are embedded structs
- // that are squashed.
- structs := make([]reflect.Value, 1, 5)
- structs[0] = result
-
- // Compile the list of all the fields that we're going to be decoding
- // from all the structs.
- type field struct {
- field reflect.StructField
- val reflect.Value
- }
- fields := []field{}
- for len(structs) > 0 {
- structVal := structs[0]
- structs = structs[1:]
-
- structType := structVal.Type()
- for i := 0; i < structType.NumField(); i++ {
- fieldType := structType.Field(i)
- tagParts := strings.Split(fieldType.Tag.Get(tagName), ",")
-
- // Ignore fields with tag name "-"
- if tagParts[0] == "-" {
- continue
- }
-
- if fieldType.Anonymous {
- fieldKind := fieldType.Type.Kind()
- if fieldKind != reflect.Struct {
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: unsupported type to struct: %s",
- fieldType.Name, fieldKind),
- }
- }
-
- // We have an embedded field. We "squash" the fields down
- // if specified in the tag.
- squash := false
- for _, tag := range tagParts[1:] {
- if tag == "squash" {
- squash = true
- break
- }
- }
-
- if squash {
- structs = append(
- structs, result.FieldByName(fieldType.Name))
- continue
- }
- }
-
- // Normal struct field, store it away
- fields = append(fields, field{fieldType, structVal.Field(i)})
- }
- }
-
- usedKeys := make(map[string]struct{})
- decodedFields := make([]string, 0, len(fields))
- decodedFieldsVal := make([]reflect.Value, 0)
- unusedKeysVal := make([]reflect.Value, 0)
- for _, f := range fields {
- field, fieldValue := f.field, f.val
- if !fieldValue.IsValid() {
- // This should never happen
- panic("field is not valid")
- }
-
- // If we can't set the field, then it is unexported or something,
- // and we just continue onwards.
- if !fieldValue.CanSet() {
- continue
- }
-
- fieldName := field.Name
-
- tagValue := field.Tag.Get(tagName)
- tagParts := strings.SplitN(tagValue, ",", 2)
- if len(tagParts) >= 2 {
- switch tagParts[1] {
- case "decodedFields":
- decodedFieldsVal = append(decodedFieldsVal, fieldValue)
- continue
- case "key":
- if item == nil {
- return &parser.PosError{
- Pos: node.Pos(),
- Err: fmt.Errorf("%s: %s asked for 'key', impossible",
- name, fieldName),
- }
- }
-
- fieldValue.SetString(item.Keys[0].Token.Value().(string))
- continue
- case "unusedKeys":
- unusedKeysVal = append(unusedKeysVal, fieldValue)
- continue
- }
- }
-
- if tagParts[0] != "" {
- fieldName = tagParts[0]
- }
-
- // Determine the element we'll use to decode. If it is a single
- // match (only object with the field), then we decode it exactly.
- // If it is a prefix match, then we decode the matches.
- filter := list.Filter(fieldName)
-
- prefixMatches := filter.Children()
- matches := filter.Elem()
- if len(matches.Items) == 0 && len(prefixMatches.Items) == 0 {
- continue
- }
-
- // Track the used key
- usedKeys[fieldName] = struct{}{}
-
- // Create the field name and decode. We range over the elements
- // because we actually want the value.
- fieldName = fmt.Sprintf("%s.%s", name, fieldName)
- if len(prefixMatches.Items) > 0 {
- if err := d.decode(fieldName, prefixMatches, fieldValue); err != nil {
- return err
- }
- }
- for _, match := range matches.Items {
- var decodeNode ast.Node = match.Val
- if ot, ok := decodeNode.(*ast.ObjectType); ok {
- decodeNode = &ast.ObjectList{Items: ot.List.Items}
- }
-
- if err := d.decode(fieldName, decodeNode, fieldValue); err != nil {
- return err
- }
- }
-
- decodedFields = append(decodedFields, field.Name)
- }
-
- if len(decodedFieldsVal) > 0 {
- // Sort it so that it is deterministic
- sort.Strings(decodedFields)
-
- for _, v := range decodedFieldsVal {
- v.Set(reflect.ValueOf(decodedFields))
- }
- }
-
- return nil
-}
-
-// findNodeType returns the type of ast.Node
-func findNodeType() reflect.Type {
- var nodeContainer struct {
- Node ast.Node
- }
- value := reflect.ValueOf(nodeContainer).FieldByName("Node")
- return value.Type()
-}
diff --git a/vendor/github.com/hashicorp/hcl/go.mod b/vendor/github.com/hashicorp/hcl/go.mod
deleted file mode 100644
index 4debbbe35..000000000
--- a/vendor/github.com/hashicorp/hcl/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/hashicorp/hcl
-
-require github.com/davecgh/go-spew v1.1.1
diff --git a/vendor/github.com/hashicorp/hcl/go.sum b/vendor/github.com/hashicorp/hcl/go.sum
deleted file mode 100644
index b5e2922e8..000000000
--- a/vendor/github.com/hashicorp/hcl/go.sum
+++ /dev/null
@@ -1,2 +0,0 @@
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
diff --git a/vendor/github.com/hashicorp/hcl/hcl.go b/vendor/github.com/hashicorp/hcl/hcl.go
deleted file mode 100644
index 575a20b50..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Package hcl decodes HCL into usable Go structures.
-//
-// hcl input can come in either pure HCL format or JSON format.
-// It can be parsed into an AST, and then decoded into a structure,
-// or it can be decoded directly from a string into a structure.
-//
-// If you choose to parse HCL into a raw AST, the benefit is that you
-// can write custom visitor implementations to implement custom
-// semantic checks. By default, HCL does not perform any semantic
-// checks.
-package hcl
diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go b/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go
deleted file mode 100644
index 6e5ef654b..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go
+++ /dev/null
@@ -1,219 +0,0 @@
-// Package ast declares the types used to represent syntax trees for HCL
-// (HashiCorp Configuration Language)
-package ast
-
-import (
- "fmt"
- "strings"
-
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-// Node is an element in the abstract syntax tree.
-type Node interface {
- node()
- Pos() token.Pos
-}
-
-func (File) node() {}
-func (ObjectList) node() {}
-func (ObjectKey) node() {}
-func (ObjectItem) node() {}
-func (Comment) node() {}
-func (CommentGroup) node() {}
-func (ObjectType) node() {}
-func (LiteralType) node() {}
-func (ListType) node() {}
-
-// File represents a single HCL file
-type File struct {
- Node Node // usually a *ObjectList
- Comments []*CommentGroup // list of all comments in the source
-}
-
-func (f *File) Pos() token.Pos {
- return f.Node.Pos()
-}
-
-// ObjectList represents a list of ObjectItems. An HCL file itself is an
-// ObjectList.
-type ObjectList struct {
- Items []*ObjectItem
-}
-
-func (o *ObjectList) Add(item *ObjectItem) {
- o.Items = append(o.Items, item)
-}
-
-// Filter filters out the objects with the given key list as a prefix.
-//
-// The returned list of objects contain ObjectItems where the keys have
-// this prefix already stripped off. This might result in objects with
-// zero-length key lists if they have no children.
-//
-// If no matches are found, an empty ObjectList (non-nil) is returned.
-func (o *ObjectList) Filter(keys ...string) *ObjectList {
- var result ObjectList
- for _, item := range o.Items {
- // If there aren't enough keys, then ignore this
- if len(item.Keys) < len(keys) {
- continue
- }
-
- match := true
- for i, key := range item.Keys[:len(keys)] {
- key := key.Token.Value().(string)
- if key != keys[i] && !strings.EqualFold(key, keys[i]) {
- match = false
- break
- }
- }
- if !match {
- continue
- }
-
- // Strip off the prefix from the children
- newItem := *item
- newItem.Keys = newItem.Keys[len(keys):]
- result.Add(&newItem)
- }
-
- return &result
-}
-
-// Children returns further nested objects (key length > 0) within this
-// ObjectList. This should be used with Filter to get at child items.
-func (o *ObjectList) Children() *ObjectList {
- var result ObjectList
- for _, item := range o.Items {
- if len(item.Keys) > 0 {
- result.Add(item)
- }
- }
-
- return &result
-}
-
-// Elem returns items in the list that are direct element assignments
-// (key length == 0). This should be used with Filter to get at elements.
-func (o *ObjectList) Elem() *ObjectList {
- var result ObjectList
- for _, item := range o.Items {
- if len(item.Keys) == 0 {
- result.Add(item)
- }
- }
-
- return &result
-}
-
-func (o *ObjectList) Pos() token.Pos {
- // always returns the uninitiliazed position
- return o.Items[0].Pos()
-}
-
-// ObjectItem represents a HCL Object Item. An item is represented with a key
-// (or keys). It can be an assignment or an object (both normal and nested)
-type ObjectItem struct {
- // keys is only one length long if it's of type assignment. If it's a
- // nested object it can be larger than one. In that case "assign" is
- // invalid as there is no assignments for a nested object.
- Keys []*ObjectKey
-
- // assign contains the position of "=", if any
- Assign token.Pos
-
- // val is the item itself. It can be an object,list, number, bool or a
- // string. If key length is larger than one, val can be only of type
- // Object.
- Val Node
-
- LeadComment *CommentGroup // associated lead comment
- LineComment *CommentGroup // associated line comment
-}
-
-func (o *ObjectItem) Pos() token.Pos {
- // I'm not entirely sure what causes this, but removing this causes
- // a test failure. We should investigate at some point.
- if len(o.Keys) == 0 {
- return token.Pos{}
- }
-
- return o.Keys[0].Pos()
-}
-
-// ObjectKeys are either an identifier or of type string.
-type ObjectKey struct {
- Token token.Token
-}
-
-func (o *ObjectKey) Pos() token.Pos {
- return o.Token.Pos
-}
-
-// LiteralType represents a literal of basic type. Valid types are:
-// token.NUMBER, token.FLOAT, token.BOOL and token.STRING
-type LiteralType struct {
- Token token.Token
-
- // comment types, only used when in a list
- LeadComment *CommentGroup
- LineComment *CommentGroup
-}
-
-func (l *LiteralType) Pos() token.Pos {
- return l.Token.Pos
-}
-
-// ListStatement represents a HCL List type
-type ListType struct {
- Lbrack token.Pos // position of "["
- Rbrack token.Pos // position of "]"
- List []Node // the elements in lexical order
-}
-
-func (l *ListType) Pos() token.Pos {
- return l.Lbrack
-}
-
-func (l *ListType) Add(node Node) {
- l.List = append(l.List, node)
-}
-
-// ObjectType represents a HCL Object Type
-type ObjectType struct {
- Lbrace token.Pos // position of "{"
- Rbrace token.Pos // position of "}"
- List *ObjectList // the nodes in lexical order
-}
-
-func (o *ObjectType) Pos() token.Pos {
- return o.Lbrace
-}
-
-// Comment node represents a single //, # style or /*- style commment
-type Comment struct {
- Start token.Pos // position of / or #
- Text string
-}
-
-func (c *Comment) Pos() token.Pos {
- return c.Start
-}
-
-// CommentGroup node represents a sequence of comments with no other tokens and
-// no empty lines between.
-type CommentGroup struct {
- List []*Comment // len(List) > 0
-}
-
-func (c *CommentGroup) Pos() token.Pos {
- return c.List[0].Pos()
-}
-
-//-------------------------------------------------------------------
-// GoStringer
-//-------------------------------------------------------------------
-
-func (o *ObjectKey) GoString() string { return fmt.Sprintf("*%#v", *o) }
-func (o *ObjectList) GoString() string { return fmt.Sprintf("*%#v", *o) }
diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go b/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go
deleted file mode 100644
index ba07ad42b..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package ast
-
-import "fmt"
-
-// WalkFunc describes a function to be called for each node during a Walk. The
-// returned node can be used to rewrite the AST. Walking stops the returned
-// bool is false.
-type WalkFunc func(Node) (Node, bool)
-
-// Walk traverses an AST in depth-first order: It starts by calling fn(node);
-// node must not be nil. If fn returns true, Walk invokes fn recursively for
-// each of the non-nil children of node, followed by a call of fn(nil). The
-// returned node of fn can be used to rewrite the passed node to fn.
-func Walk(node Node, fn WalkFunc) Node {
- rewritten, ok := fn(node)
- if !ok {
- return rewritten
- }
-
- switch n := node.(type) {
- case *File:
- n.Node = Walk(n.Node, fn)
- case *ObjectList:
- for i, item := range n.Items {
- n.Items[i] = Walk(item, fn).(*ObjectItem)
- }
- case *ObjectKey:
- // nothing to do
- case *ObjectItem:
- for i, k := range n.Keys {
- n.Keys[i] = Walk(k, fn).(*ObjectKey)
- }
-
- if n.Val != nil {
- n.Val = Walk(n.Val, fn)
- }
- case *LiteralType:
- // nothing to do
- case *ListType:
- for i, l := range n.List {
- n.List[i] = Walk(l, fn)
- }
- case *ObjectType:
- n.List = Walk(n.List, fn).(*ObjectList)
- default:
- // should we panic here?
- fmt.Printf("unknown type: %T\n", n)
- }
-
- fn(nil)
- return rewritten
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/error.go b/vendor/github.com/hashicorp/hcl/hcl/parser/error.go
deleted file mode 100644
index 5c99381df..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/error.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package parser
-
-import (
- "fmt"
-
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-// PosError is a parse error that contains a position.
-type PosError struct {
- Pos token.Pos
- Err error
-}
-
-func (e *PosError) Error() string {
- return fmt.Sprintf("At %s: %s", e.Pos, e.Err)
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
deleted file mode 100644
index 64c83bcfb..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
+++ /dev/null
@@ -1,532 +0,0 @@
-// Package parser implements a parser for HCL (HashiCorp Configuration
-// Language)
-package parser
-
-import (
- "bytes"
- "errors"
- "fmt"
- "strings"
-
- "github.com/hashicorp/hcl/hcl/ast"
- "github.com/hashicorp/hcl/hcl/scanner"
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-type Parser struct {
- sc *scanner.Scanner
-
- // Last read token
- tok token.Token
- commaPrev token.Token
-
- comments []*ast.CommentGroup
- leadComment *ast.CommentGroup // last lead comment
- lineComment *ast.CommentGroup // last line comment
-
- enableTrace bool
- indent int
- n int // buffer size (max = 1)
-}
-
-func newParser(src []byte) *Parser {
- return &Parser{
- sc: scanner.New(src),
- }
-}
-
-// Parse returns the fully parsed source and returns the abstract syntax tree.
-func Parse(src []byte) (*ast.File, error) {
- // normalize all line endings
- // since the scanner and output only work with "\n" line endings, we may
- // end up with dangling "\r" characters in the parsed data.
- src = bytes.Replace(src, []byte("\r\n"), []byte("\n"), -1)
-
- p := newParser(src)
- return p.Parse()
-}
-
-var errEofToken = errors.New("EOF token found")
-
-// Parse returns the fully parsed source and returns the abstract syntax tree.
-func (p *Parser) Parse() (*ast.File, error) {
- f := &ast.File{}
- var err, scerr error
- p.sc.Error = func(pos token.Pos, msg string) {
- scerr = &PosError{Pos: pos, Err: errors.New(msg)}
- }
-
- f.Node, err = p.objectList(false)
- if scerr != nil {
- return nil, scerr
- }
- if err != nil {
- return nil, err
- }
-
- f.Comments = p.comments
- return f, nil
-}
-
-// objectList parses a list of items within an object (generally k/v pairs).
-// The parameter" obj" tells this whether to we are within an object (braces:
-// '{', '}') or just at the top level. If we're within an object, we end
-// at an RBRACE.
-func (p *Parser) objectList(obj bool) (*ast.ObjectList, error) {
- defer un(trace(p, "ParseObjectList"))
- node := &ast.ObjectList{}
-
- for {
- if obj {
- tok := p.scan()
- p.unscan()
- if tok.Type == token.RBRACE {
- break
- }
- }
-
- n, err := p.objectItem()
- if err == errEofToken {
- break // we are finished
- }
-
- // we don't return a nil node, because might want to use already
- // collected items.
- if err != nil {
- return node, err
- }
-
- node.Add(n)
-
- // object lists can be optionally comma-delimited e.g. when a list of maps
- // is being expressed, so a comma is allowed here - it's simply consumed
- tok := p.scan()
- if tok.Type != token.COMMA {
- p.unscan()
- }
- }
- return node, nil
-}
-
-func (p *Parser) consumeComment() (comment *ast.Comment, endline int) {
- endline = p.tok.Pos.Line
-
- // count the endline if it's multiline comment, ie starting with /*
- if len(p.tok.Text) > 1 && p.tok.Text[1] == '*' {
- // don't use range here - no need to decode Unicode code points
- for i := 0; i < len(p.tok.Text); i++ {
- if p.tok.Text[i] == '\n' {
- endline++
- }
- }
- }
-
- comment = &ast.Comment{Start: p.tok.Pos, Text: p.tok.Text}
- p.tok = p.sc.Scan()
- return
-}
-
-func (p *Parser) consumeCommentGroup(n int) (comments *ast.CommentGroup, endline int) {
- var list []*ast.Comment
- endline = p.tok.Pos.Line
-
- for p.tok.Type == token.COMMENT && p.tok.Pos.Line <= endline+n {
- var comment *ast.Comment
- comment, endline = p.consumeComment()
- list = append(list, comment)
- }
-
- // add comment group to the comments list
- comments = &ast.CommentGroup{List: list}
- p.comments = append(p.comments, comments)
-
- return
-}
-
-// objectItem parses a single object item
-func (p *Parser) objectItem() (*ast.ObjectItem, error) {
- defer un(trace(p, "ParseObjectItem"))
-
- keys, err := p.objectKey()
- if len(keys) > 0 && err == errEofToken {
- // We ignore eof token here since it is an error if we didn't
- // receive a value (but we did receive a key) for the item.
- err = nil
- }
- if len(keys) > 0 && err != nil && p.tok.Type == token.RBRACE {
- // This is a strange boolean statement, but what it means is:
- // We have keys with no value, and we're likely in an object
- // (since RBrace ends an object). For this, we set err to nil so
- // we continue and get the error below of having the wrong value
- // type.
- err = nil
-
- // Reset the token type so we don't think it completed fine. See
- // objectType which uses p.tok.Type to check if we're done with
- // the object.
- p.tok.Type = token.EOF
- }
- if err != nil {
- return nil, err
- }
-
- o := &ast.ObjectItem{
- Keys: keys,
- }
-
- if p.leadComment != nil {
- o.LeadComment = p.leadComment
- p.leadComment = nil
- }
-
- switch p.tok.Type {
- case token.ASSIGN:
- o.Assign = p.tok.Pos
- o.Val, err = p.object()
- if err != nil {
- return nil, err
- }
- case token.LBRACE:
- o.Val, err = p.objectType()
- if err != nil {
- return nil, err
- }
- default:
- keyStr := make([]string, 0, len(keys))
- for _, k := range keys {
- keyStr = append(keyStr, k.Token.Text)
- }
-
- return nil, &PosError{
- Pos: p.tok.Pos,
- Err: fmt.Errorf(
- "key '%s' expected start of object ('{') or assignment ('=')",
- strings.Join(keyStr, " ")),
- }
- }
-
- // key=#comment
- // val
- if p.lineComment != nil {
- o.LineComment, p.lineComment = p.lineComment, nil
- }
-
- // do a look-ahead for line comment
- p.scan()
- if len(keys) > 0 && o.Val.Pos().Line == keys[0].Pos().Line && p.lineComment != nil {
- o.LineComment = p.lineComment
- p.lineComment = nil
- }
- p.unscan()
- return o, nil
-}
-
-// objectKey parses an object key and returns a ObjectKey AST
-func (p *Parser) objectKey() ([]*ast.ObjectKey, error) {
- keyCount := 0
- keys := make([]*ast.ObjectKey, 0)
-
- for {
- tok := p.scan()
- switch tok.Type {
- case token.EOF:
- // It is very important to also return the keys here as well as
- // the error. This is because we need to be able to tell if we
- // did parse keys prior to finding the EOF, or if we just found
- // a bare EOF.
- return keys, errEofToken
- case token.ASSIGN:
- // assignment or object only, but not nested objects. this is not
- // allowed: `foo bar = {}`
- if keyCount > 1 {
- return nil, &PosError{
- Pos: p.tok.Pos,
- Err: fmt.Errorf("nested object expected: LBRACE got: %s", p.tok.Type),
- }
- }
-
- if keyCount == 0 {
- return nil, &PosError{
- Pos: p.tok.Pos,
- Err: errors.New("no object keys found!"),
- }
- }
-
- return keys, nil
- case token.LBRACE:
- var err error
-
- // If we have no keys, then it is a syntax error. i.e. {{}} is not
- // allowed.
- if len(keys) == 0 {
- err = &PosError{
- Pos: p.tok.Pos,
- Err: fmt.Errorf("expected: IDENT | STRING got: %s", p.tok.Type),
- }
- }
-
- // object
- return keys, err
- case token.IDENT, token.STRING:
- keyCount++
- keys = append(keys, &ast.ObjectKey{Token: p.tok})
- case token.ILLEGAL:
- return keys, &PosError{
- Pos: p.tok.Pos,
- Err: fmt.Errorf("illegal character"),
- }
- default:
- return keys, &PosError{
- Pos: p.tok.Pos,
- Err: fmt.Errorf("expected: IDENT | STRING | ASSIGN | LBRACE got: %s", p.tok.Type),
- }
- }
- }
-}
-
-// object parses any type of object, such as number, bool, string, object or
-// list.
-func (p *Parser) object() (ast.Node, error) {
- defer un(trace(p, "ParseType"))
- tok := p.scan()
-
- switch tok.Type {
- case token.NUMBER, token.FLOAT, token.BOOL, token.STRING, token.HEREDOC:
- return p.literalType()
- case token.LBRACE:
- return p.objectType()
- case token.LBRACK:
- return p.listType()
- case token.COMMENT:
- // implement comment
- case token.EOF:
- return nil, errEofToken
- }
-
- return nil, &PosError{
- Pos: tok.Pos,
- Err: fmt.Errorf("Unknown token: %+v", tok),
- }
-}
-
-// objectType parses an object type and returns a ObjectType AST
-func (p *Parser) objectType() (*ast.ObjectType, error) {
- defer un(trace(p, "ParseObjectType"))
-
- // we assume that the currently scanned token is a LBRACE
- o := &ast.ObjectType{
- Lbrace: p.tok.Pos,
- }
-
- l, err := p.objectList(true)
-
- // if we hit RBRACE, we are good to go (means we parsed all Items), if it's
- // not a RBRACE, it's an syntax error and we just return it.
- if err != nil && p.tok.Type != token.RBRACE {
- return nil, err
- }
-
- // No error, scan and expect the ending to be a brace
- if tok := p.scan(); tok.Type != token.RBRACE {
- return nil, &PosError{
- Pos: tok.Pos,
- Err: fmt.Errorf("object expected closing RBRACE got: %s", tok.Type),
- }
- }
-
- o.List = l
- o.Rbrace = p.tok.Pos // advanced via parseObjectList
- return o, nil
-}
-
-// listType parses a list type and returns a ListType AST
-func (p *Parser) listType() (*ast.ListType, error) {
- defer un(trace(p, "ParseListType"))
-
- // we assume that the currently scanned token is a LBRACK
- l := &ast.ListType{
- Lbrack: p.tok.Pos,
- }
-
- needComma := false
- for {
- tok := p.scan()
- if needComma {
- switch tok.Type {
- case token.COMMA, token.RBRACK:
- default:
- return nil, &PosError{
- Pos: tok.Pos,
- Err: fmt.Errorf(
- "error parsing list, expected comma or list end, got: %s",
- tok.Type),
- }
- }
- }
- switch tok.Type {
- case token.BOOL, token.NUMBER, token.FLOAT, token.STRING, token.HEREDOC:
- node, err := p.literalType()
- if err != nil {
- return nil, err
- }
-
- // If there is a lead comment, apply it
- if p.leadComment != nil {
- node.LeadComment = p.leadComment
- p.leadComment = nil
- }
-
- l.Add(node)
- needComma = true
- case token.COMMA:
- // get next list item or we are at the end
- // do a look-ahead for line comment
- p.scan()
- if p.lineComment != nil && len(l.List) > 0 {
- lit, ok := l.List[len(l.List)-1].(*ast.LiteralType)
- if ok {
- lit.LineComment = p.lineComment
- l.List[len(l.List)-1] = lit
- p.lineComment = nil
- }
- }
- p.unscan()
-
- needComma = false
- continue
- case token.LBRACE:
- // Looks like a nested object, so parse it out
- node, err := p.objectType()
- if err != nil {
- return nil, &PosError{
- Pos: tok.Pos,
- Err: fmt.Errorf(
- "error while trying to parse object within list: %s", err),
- }
- }
- l.Add(node)
- needComma = true
- case token.LBRACK:
- node, err := p.listType()
- if err != nil {
- return nil, &PosError{
- Pos: tok.Pos,
- Err: fmt.Errorf(
- "error while trying to parse list within list: %s", err),
- }
- }
- l.Add(node)
- case token.RBRACK:
- // finished
- l.Rbrack = p.tok.Pos
- return l, nil
- default:
- return nil, &PosError{
- Pos: tok.Pos,
- Err: fmt.Errorf("unexpected token while parsing list: %s", tok.Type),
- }
- }
- }
-}
-
-// literalType parses a literal type and returns a LiteralType AST
-func (p *Parser) literalType() (*ast.LiteralType, error) {
- defer un(trace(p, "ParseLiteral"))
-
- return &ast.LiteralType{
- Token: p.tok,
- }, nil
-}
-
-// scan returns the next token from the underlying scanner. If a token has
-// been unscanned then read that instead. In the process, it collects any
-// comment groups encountered, and remembers the last lead and line comments.
-func (p *Parser) scan() token.Token {
- // If we have a token on the buffer, then return it.
- if p.n != 0 {
- p.n = 0
- return p.tok
- }
-
- // Otherwise read the next token from the scanner and Save it to the buffer
- // in case we unscan later.
- prev := p.tok
- p.tok = p.sc.Scan()
-
- if p.tok.Type == token.COMMENT {
- var comment *ast.CommentGroup
- var endline int
-
- // fmt.Printf("p.tok.Pos.Line = %+v prev: %d endline %d \n",
- // p.tok.Pos.Line, prev.Pos.Line, endline)
- if p.tok.Pos.Line == prev.Pos.Line {
- // The comment is on same line as the previous token; it
- // cannot be a lead comment but may be a line comment.
- comment, endline = p.consumeCommentGroup(0)
- if p.tok.Pos.Line != endline {
- // The next token is on a different line, thus
- // the last comment group is a line comment.
- p.lineComment = comment
- }
- }
-
- // consume successor comments, if any
- endline = -1
- for p.tok.Type == token.COMMENT {
- comment, endline = p.consumeCommentGroup(1)
- }
-
- if endline+1 == p.tok.Pos.Line && p.tok.Type != token.RBRACE {
- switch p.tok.Type {
- case token.RBRACE, token.RBRACK:
- // Do not count for these cases
- default:
- // The next token is following on the line immediately after the
- // comment group, thus the last comment group is a lead comment.
- p.leadComment = comment
- }
- }
-
- }
-
- return p.tok
-}
-
-// unscan pushes the previously read token back onto the buffer.
-func (p *Parser) unscan() {
- p.n = 1
-}
-
-// ----------------------------------------------------------------------------
-// Parsing support
-
-func (p *Parser) printTrace(a ...interface{}) {
- if !p.enableTrace {
- return
- }
-
- const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "
- const n = len(dots)
- fmt.Printf("%5d:%3d: ", p.tok.Pos.Line, p.tok.Pos.Column)
-
- i := 2 * p.indent
- for i > n {
- fmt.Print(dots)
- i -= n
- }
- // i <= n
- fmt.Print(dots[0:i])
- fmt.Println(a...)
-}
-
-func trace(p *Parser, msg string) *Parser {
- p.printTrace(msg, "(")
- p.indent++
- return p
-}
-
-// Usage pattern: defer un(trace(p, "..."))
-func un(p *Parser) {
- p.indent--
- p.printTrace(")")
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go
deleted file mode 100644
index 7c038d12a..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go
+++ /dev/null
@@ -1,789 +0,0 @@
-package printer
-
-import (
- "bytes"
- "fmt"
- "sort"
-
- "github.com/hashicorp/hcl/hcl/ast"
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-const (
- blank = byte(' ')
- newline = byte('\n')
- tab = byte('\t')
- infinity = 1 << 30 // offset or line
-)
-
-var (
- unindent = []byte("\uE123") // in the private use space
-)
-
-type printer struct {
- cfg Config
- prev token.Pos
-
- comments []*ast.CommentGroup // may be nil, contains all comments
- standaloneComments []*ast.CommentGroup // contains all standalone comments (not assigned to any node)
-
- enableTrace bool
- indentTrace int
-}
-
-type ByPosition []*ast.CommentGroup
-
-func (b ByPosition) Len() int { return len(b) }
-func (b ByPosition) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-func (b ByPosition) Less(i, j int) bool { return b[i].Pos().Before(b[j].Pos()) }
-
-// collectComments comments all standalone comments which are not lead or line
-// comment
-func (p *printer) collectComments(node ast.Node) {
- // first collect all comments. This is already stored in
- // ast.File.(comments)
- ast.Walk(node, func(nn ast.Node) (ast.Node, bool) {
- switch t := nn.(type) {
- case *ast.File:
- p.comments = t.Comments
- return nn, false
- }
- return nn, true
- })
-
- standaloneComments := make(map[token.Pos]*ast.CommentGroup, 0)
- for _, c := range p.comments {
- standaloneComments[c.Pos()] = c
- }
-
- // next remove all lead and line comments from the overall comment map.
- // This will give us comments which are standalone, comments which are not
- // assigned to any kind of node.
- ast.Walk(node, func(nn ast.Node) (ast.Node, bool) {
- switch t := nn.(type) {
- case *ast.LiteralType:
- if t.LeadComment != nil {
- for _, comment := range t.LeadComment.List {
- if _, ok := standaloneComments[comment.Pos()]; ok {
- delete(standaloneComments, comment.Pos())
- }
- }
- }
-
- if t.LineComment != nil {
- for _, comment := range t.LineComment.List {
- if _, ok := standaloneComments[comment.Pos()]; ok {
- delete(standaloneComments, comment.Pos())
- }
- }
- }
- case *ast.ObjectItem:
- if t.LeadComment != nil {
- for _, comment := range t.LeadComment.List {
- if _, ok := standaloneComments[comment.Pos()]; ok {
- delete(standaloneComments, comment.Pos())
- }
- }
- }
-
- if t.LineComment != nil {
- for _, comment := range t.LineComment.List {
- if _, ok := standaloneComments[comment.Pos()]; ok {
- delete(standaloneComments, comment.Pos())
- }
- }
- }
- }
-
- return nn, true
- })
-
- for _, c := range standaloneComments {
- p.standaloneComments = append(p.standaloneComments, c)
- }
-
- sort.Sort(ByPosition(p.standaloneComments))
-}
-
-// output prints creates b printable HCL output and returns it.
-func (p *printer) output(n interface{}) []byte {
- var buf bytes.Buffer
-
- switch t := n.(type) {
- case *ast.File:
- // File doesn't trace so we add the tracing here
- defer un(trace(p, "File"))
- return p.output(t.Node)
- case *ast.ObjectList:
- defer un(trace(p, "ObjectList"))
-
- var index int
- for {
- // Determine the location of the next actual non-comment
- // item. If we're at the end, the next item is at "infinity"
- var nextItem token.Pos
- if index != len(t.Items) {
- nextItem = t.Items[index].Pos()
- } else {
- nextItem = token.Pos{Offset: infinity, Line: infinity}
- }
-
- // Go through the standalone comments in the file and print out
- // the comments that we should be for this object item.
- for _, c := range p.standaloneComments {
- // Go through all the comments in the group. The group
- // should be printed together, not separated by double newlines.
- printed := false
- newlinePrinted := false
- for _, comment := range c.List {
- // We only care about comments after the previous item
- // we've printed so that comments are printed in the
- // correct locations (between two objects for example).
- // And before the next item.
- if comment.Pos().After(p.prev) && comment.Pos().Before(nextItem) {
- // if we hit the end add newlines so we can print the comment
- // we don't do this if prev is invalid which means the
- // beginning of the file since the first comment should
- // be at the first line.
- if !newlinePrinted && p.prev.IsValid() && index == len(t.Items) {
- buf.Write([]byte{newline, newline})
- newlinePrinted = true
- }
-
- // Write the actual comment.
- buf.WriteString(comment.Text)
- buf.WriteByte(newline)
-
- // Set printed to true to note that we printed something
- printed = true
- }
- }
-
- // If we're not at the last item, write a new line so
- // that there is a newline separating this comment from
- // the next object.
- if printed && index != len(t.Items) {
- buf.WriteByte(newline)
- }
- }
-
- if index == len(t.Items) {
- break
- }
-
- buf.Write(p.output(t.Items[index]))
- if index != len(t.Items)-1 {
- // Always write a newline to separate us from the next item
- buf.WriteByte(newline)
-
- // Need to determine if we're going to separate the next item
- // with a blank line. The logic here is simple, though there
- // are a few conditions:
- //
- // 1. The next object is more than one line away anyways,
- // so we need an empty line.
- //
- // 2. The next object is not a "single line" object, so
- // we need an empty line.
- //
- // 3. This current object is not a single line object,
- // so we need an empty line.
- current := t.Items[index]
- next := t.Items[index+1]
- if next.Pos().Line != t.Items[index].Pos().Line+1 ||
- !p.isSingleLineObject(next) ||
- !p.isSingleLineObject(current) {
- buf.WriteByte(newline)
- }
- }
- index++
- }
- case *ast.ObjectKey:
- buf.WriteString(t.Token.Text)
- case *ast.ObjectItem:
- p.prev = t.Pos()
- buf.Write(p.objectItem(t))
- case *ast.LiteralType:
- buf.Write(p.literalType(t))
- case *ast.ListType:
- buf.Write(p.list(t))
- case *ast.ObjectType:
- buf.Write(p.objectType(t))
- default:
- fmt.Printf(" unknown type: %T\n", n)
- }
-
- return buf.Bytes()
-}
-
-func (p *printer) literalType(lit *ast.LiteralType) []byte {
- result := []byte(lit.Token.Text)
- switch lit.Token.Type {
- case token.HEREDOC:
- // Clear the trailing newline from heredocs
- if result[len(result)-1] == '\n' {
- result = result[:len(result)-1]
- }
-
- // Poison lines 2+ so that we don't indent them
- result = p.heredocIndent(result)
- case token.STRING:
- // If this is a multiline string, poison lines 2+ so we don't
- // indent them.
- if bytes.IndexRune(result, '\n') >= 0 {
- result = p.heredocIndent(result)
- }
- }
-
- return result
-}
-
-// objectItem returns the printable HCL form of an object item. An object type
-// starts with one/multiple keys and has a value. The value might be of any
-// type.
-func (p *printer) objectItem(o *ast.ObjectItem) []byte {
- defer un(trace(p, fmt.Sprintf("ObjectItem: %s", o.Keys[0].Token.Text)))
- var buf bytes.Buffer
-
- if o.LeadComment != nil {
- for _, comment := range o.LeadComment.List {
- buf.WriteString(comment.Text)
- buf.WriteByte(newline)
- }
- }
-
- // If key and val are on different lines, treat line comments like lead comments.
- if o.LineComment != nil && o.Val.Pos().Line != o.Keys[0].Pos().Line {
- for _, comment := range o.LineComment.List {
- buf.WriteString(comment.Text)
- buf.WriteByte(newline)
- }
- }
-
- for i, k := range o.Keys {
- buf.WriteString(k.Token.Text)
- buf.WriteByte(blank)
-
- // reach end of key
- if o.Assign.IsValid() && i == len(o.Keys)-1 && len(o.Keys) == 1 {
- buf.WriteString("=")
- buf.WriteByte(blank)
- }
- }
-
- buf.Write(p.output(o.Val))
-
- if o.LineComment != nil && o.Val.Pos().Line == o.Keys[0].Pos().Line {
- buf.WriteByte(blank)
- for _, comment := range o.LineComment.List {
- buf.WriteString(comment.Text)
- }
- }
-
- return buf.Bytes()
-}
-
-// objectType returns the printable HCL form of an object type. An object type
-// begins with a brace and ends with a brace.
-func (p *printer) objectType(o *ast.ObjectType) []byte {
- defer un(trace(p, "ObjectType"))
- var buf bytes.Buffer
- buf.WriteString("{")
-
- var index int
- var nextItem token.Pos
- var commented, newlinePrinted bool
- for {
- // Determine the location of the next actual non-comment
- // item. If we're at the end, the next item is the closing brace
- if index != len(o.List.Items) {
- nextItem = o.List.Items[index].Pos()
- } else {
- nextItem = o.Rbrace
- }
-
- // Go through the standalone comments in the file and print out
- // the comments that we should be for this object item.
- for _, c := range p.standaloneComments {
- printed := false
- var lastCommentPos token.Pos
- for _, comment := range c.List {
- // We only care about comments after the previous item
- // we've printed so that comments are printed in the
- // correct locations (between two objects for example).
- // And before the next item.
- if comment.Pos().After(p.prev) && comment.Pos().Before(nextItem) {
- // If there are standalone comments and the initial newline has not
- // been printed yet, do it now.
- if !newlinePrinted {
- newlinePrinted = true
- buf.WriteByte(newline)
- }
-
- // add newline if it's between other printed nodes
- if index > 0 {
- commented = true
- buf.WriteByte(newline)
- }
-
- // Store this position
- lastCommentPos = comment.Pos()
-
- // output the comment itself
- buf.Write(p.indent(p.heredocIndent([]byte(comment.Text))))
-
- // Set printed to true to note that we printed something
- printed = true
-
- /*
- if index != len(o.List.Items) {
- buf.WriteByte(newline) // do not print on the end
- }
- */
- }
- }
-
- // Stuff to do if we had comments
- if printed {
- // Always write a newline
- buf.WriteByte(newline)
-
- // If there is another item in the object and our comment
- // didn't hug it directly, then make sure there is a blank
- // line separating them.
- if nextItem != o.Rbrace && nextItem.Line != lastCommentPos.Line+1 {
- buf.WriteByte(newline)
- }
- }
- }
-
- if index == len(o.List.Items) {
- p.prev = o.Rbrace
- break
- }
-
- // At this point we are sure that it's not a totally empty block: print
- // the initial newline if it hasn't been printed yet by the previous
- // block about standalone comments.
- if !newlinePrinted {
- buf.WriteByte(newline)
- newlinePrinted = true
- }
-
- // check if we have adjacent one liner items. If yes we'll going to align
- // the comments.
- var aligned []*ast.ObjectItem
- for _, item := range o.List.Items[index:] {
- // we don't group one line lists
- if len(o.List.Items) == 1 {
- break
- }
-
- // one means a oneliner with out any lead comment
- // two means a oneliner with lead comment
- // anything else might be something else
- cur := lines(string(p.objectItem(item)))
- if cur > 2 {
- break
- }
-
- curPos := item.Pos()
-
- nextPos := token.Pos{}
- if index != len(o.List.Items)-1 {
- nextPos = o.List.Items[index+1].Pos()
- }
-
- prevPos := token.Pos{}
- if index != 0 {
- prevPos = o.List.Items[index-1].Pos()
- }
-
- // fmt.Println("DEBUG ----------------")
- // fmt.Printf("prev = %+v prevPos: %s\n", prev, prevPos)
- // fmt.Printf("cur = %+v curPos: %s\n", cur, curPos)
- // fmt.Printf("next = %+v nextPos: %s\n", next, nextPos)
-
- if curPos.Line+1 == nextPos.Line {
- aligned = append(aligned, item)
- index++
- continue
- }
-
- if curPos.Line-1 == prevPos.Line {
- aligned = append(aligned, item)
- index++
-
- // finish if we have a new line or comment next. This happens
- // if the next item is not adjacent
- if curPos.Line+1 != nextPos.Line {
- break
- }
- continue
- }
-
- break
- }
-
- // put newlines if the items are between other non aligned items.
- // newlines are also added if there is a standalone comment already, so
- // check it too
- if !commented && index != len(aligned) {
- buf.WriteByte(newline)
- }
-
- if len(aligned) >= 1 {
- p.prev = aligned[len(aligned)-1].Pos()
-
- items := p.alignedItems(aligned)
- buf.Write(p.indent(items))
- } else {
- p.prev = o.List.Items[index].Pos()
-
- buf.Write(p.indent(p.objectItem(o.List.Items[index])))
- index++
- }
-
- buf.WriteByte(newline)
- }
-
- buf.WriteString("}")
- return buf.Bytes()
-}
-
-func (p *printer) alignedItems(items []*ast.ObjectItem) []byte {
- var buf bytes.Buffer
-
- // find the longest key and value length, needed for alignment
- var longestKeyLen int // longest key length
- var longestValLen int // longest value length
- for _, item := range items {
- key := len(item.Keys[0].Token.Text)
- val := len(p.output(item.Val))
-
- if key > longestKeyLen {
- longestKeyLen = key
- }
-
- if val > longestValLen {
- longestValLen = val
- }
- }
-
- for i, item := range items {
- if item.LeadComment != nil {
- for _, comment := range item.LeadComment.List {
- buf.WriteString(comment.Text)
- buf.WriteByte(newline)
- }
- }
-
- for i, k := range item.Keys {
- keyLen := len(k.Token.Text)
- buf.WriteString(k.Token.Text)
- for i := 0; i < longestKeyLen-keyLen+1; i++ {
- buf.WriteByte(blank)
- }
-
- // reach end of key
- if i == len(item.Keys)-1 && len(item.Keys) == 1 {
- buf.WriteString("=")
- buf.WriteByte(blank)
- }
- }
-
- val := p.output(item.Val)
- valLen := len(val)
- buf.Write(val)
-
- if item.Val.Pos().Line == item.Keys[0].Pos().Line && item.LineComment != nil {
- for i := 0; i < longestValLen-valLen+1; i++ {
- buf.WriteByte(blank)
- }
-
- for _, comment := range item.LineComment.List {
- buf.WriteString(comment.Text)
- }
- }
-
- // do not print for the last item
- if i != len(items)-1 {
- buf.WriteByte(newline)
- }
- }
-
- return buf.Bytes()
-}
-
-// list returns the printable HCL form of an list type.
-func (p *printer) list(l *ast.ListType) []byte {
- if p.isSingleLineList(l) {
- return p.singleLineList(l)
- }
-
- var buf bytes.Buffer
- buf.WriteString("[")
- buf.WriteByte(newline)
-
- var longestLine int
- for _, item := range l.List {
- // for now we assume that the list only contains literal types
- if lit, ok := item.(*ast.LiteralType); ok {
- lineLen := len(lit.Token.Text)
- if lineLen > longestLine {
- longestLine = lineLen
- }
- }
- }
-
- haveEmptyLine := false
- for i, item := range l.List {
- // If we have a lead comment, then we want to write that first
- leadComment := false
- if lit, ok := item.(*ast.LiteralType); ok && lit.LeadComment != nil {
- leadComment = true
-
- // Ensure an empty line before every element with a
- // lead comment (except the first item in a list).
- if !haveEmptyLine && i != 0 {
- buf.WriteByte(newline)
- }
-
- for _, comment := range lit.LeadComment.List {
- buf.Write(p.indent([]byte(comment.Text)))
- buf.WriteByte(newline)
- }
- }
-
- // also indent each line
- val := p.output(item)
- curLen := len(val)
- buf.Write(p.indent(val))
-
- // if this item is a heredoc, then we output the comma on
- // the next line. This is the only case this happens.
- comma := []byte{','}
- if lit, ok := item.(*ast.LiteralType); ok && lit.Token.Type == token.HEREDOC {
- buf.WriteByte(newline)
- comma = p.indent(comma)
- }
-
- buf.Write(comma)
-
- if lit, ok := item.(*ast.LiteralType); ok && lit.LineComment != nil {
- // if the next item doesn't have any comments, do not align
- buf.WriteByte(blank) // align one space
- for i := 0; i < longestLine-curLen; i++ {
- buf.WriteByte(blank)
- }
-
- for _, comment := range lit.LineComment.List {
- buf.WriteString(comment.Text)
- }
- }
-
- buf.WriteByte(newline)
-
- // Ensure an empty line after every element with a
- // lead comment (except the first item in a list).
- haveEmptyLine = leadComment && i != len(l.List)-1
- if haveEmptyLine {
- buf.WriteByte(newline)
- }
- }
-
- buf.WriteString("]")
- return buf.Bytes()
-}
-
-// isSingleLineList returns true if:
-// * they were previously formatted entirely on one line
-// * they consist entirely of literals
-// * there are either no heredoc strings or the list has exactly one element
-// * there are no line comments
-func (printer) isSingleLineList(l *ast.ListType) bool {
- for _, item := range l.List {
- if item.Pos().Line != l.Lbrack.Line {
- return false
- }
-
- lit, ok := item.(*ast.LiteralType)
- if !ok {
- return false
- }
-
- if lit.Token.Type == token.HEREDOC && len(l.List) != 1 {
- return false
- }
-
- if lit.LineComment != nil {
- return false
- }
- }
-
- return true
-}
-
-// singleLineList prints a simple single line list.
-// For a definition of "simple", see isSingleLineList above.
-func (p *printer) singleLineList(l *ast.ListType) []byte {
- buf := &bytes.Buffer{}
-
- buf.WriteString("[")
- for i, item := range l.List {
- if i != 0 {
- buf.WriteString(", ")
- }
-
- // Output the item itself
- buf.Write(p.output(item))
-
- // The heredoc marker needs to be at the end of line.
- if lit, ok := item.(*ast.LiteralType); ok && lit.Token.Type == token.HEREDOC {
- buf.WriteByte(newline)
- }
- }
-
- buf.WriteString("]")
- return buf.Bytes()
-}
-
-// indent indents the lines of the given buffer for each non-empty line
-func (p *printer) indent(buf []byte) []byte {
- var prefix []byte
- if p.cfg.SpacesWidth != 0 {
- for i := 0; i < p.cfg.SpacesWidth; i++ {
- prefix = append(prefix, blank)
- }
- } else {
- prefix = []byte{tab}
- }
-
- var res []byte
- bol := true
- for _, c := range buf {
- if bol && c != '\n' {
- res = append(res, prefix...)
- }
-
- res = append(res, c)
- bol = c == '\n'
- }
- return res
-}
-
-// unindent removes all the indentation from the tombstoned lines
-func (p *printer) unindent(buf []byte) []byte {
- var res []byte
- for i := 0; i < len(buf); i++ {
- skip := len(buf)-i <= len(unindent)
- if !skip {
- skip = !bytes.Equal(unindent, buf[i:i+len(unindent)])
- }
- if skip {
- res = append(res, buf[i])
- continue
- }
-
- // We have a marker. we have to backtrace here and clean out
- // any whitespace ahead of our tombstone up to a \n
- for j := len(res) - 1; j >= 0; j-- {
- if res[j] == '\n' {
- break
- }
-
- res = res[:j]
- }
-
- // Skip the entire unindent marker
- i += len(unindent) - 1
- }
-
- return res
-}
-
-// heredocIndent marks all the 2nd and further lines as unindentable
-func (p *printer) heredocIndent(buf []byte) []byte {
- var res []byte
- bol := false
- for _, c := range buf {
- if bol && c != '\n' {
- res = append(res, unindent...)
- }
- res = append(res, c)
- bol = c == '\n'
- }
- return res
-}
-
-// isSingleLineObject tells whether the given object item is a single
-// line object such as "obj {}".
-//
-// A single line object:
-//
-// * has no lead comments (hence multi-line)
-// * has no assignment
-// * has no values in the stanza (within {})
-//
-func (p *printer) isSingleLineObject(val *ast.ObjectItem) bool {
- // If there is a lead comment, can't be one line
- if val.LeadComment != nil {
- return false
- }
-
- // If there is assignment, we always break by line
- if val.Assign.IsValid() {
- return false
- }
-
- // If it isn't an object type, then its not a single line object
- ot, ok := val.Val.(*ast.ObjectType)
- if !ok {
- return false
- }
-
- // If the object has no items, it is single line!
- return len(ot.List.Items) == 0
-}
-
-func lines(txt string) int {
- endline := 1
- for i := 0; i < len(txt); i++ {
- if txt[i] == '\n' {
- endline++
- }
- }
- return endline
-}
-
-// ----------------------------------------------------------------------------
-// Tracing support
-
-func (p *printer) printTrace(a ...interface{}) {
- if !p.enableTrace {
- return
- }
-
- const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "
- const n = len(dots)
- i := 2 * p.indentTrace
- for i > n {
- fmt.Print(dots)
- i -= n
- }
- // i <= n
- fmt.Print(dots[0:i])
- fmt.Println(a...)
-}
-
-func trace(p *printer, msg string) *printer {
- p.printTrace(msg, "(")
- p.indentTrace++
- return p
-}
-
-// Usage pattern: defer un(trace(p, "..."))
-func un(p *printer) {
- p.indentTrace--
- p.printTrace(")")
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go b/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go
deleted file mode 100644
index 6617ab8e7..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Package printer implements printing of AST nodes to HCL format.
-package printer
-
-import (
- "bytes"
- "io"
- "text/tabwriter"
-
- "github.com/hashicorp/hcl/hcl/ast"
- "github.com/hashicorp/hcl/hcl/parser"
-)
-
-var DefaultConfig = Config{
- SpacesWidth: 2,
-}
-
-// A Config node controls the output of Fprint.
-type Config struct {
- SpacesWidth int // if set, it will use spaces instead of tabs for alignment
-}
-
-func (c *Config) Fprint(output io.Writer, node ast.Node) error {
- p := &printer{
- cfg: *c,
- comments: make([]*ast.CommentGroup, 0),
- standaloneComments: make([]*ast.CommentGroup, 0),
- // enableTrace: true,
- }
-
- p.collectComments(node)
-
- if _, err := output.Write(p.unindent(p.output(node))); err != nil {
- return err
- }
-
- // flush tabwriter, if any
- var err error
- if tw, _ := output.(*tabwriter.Writer); tw != nil {
- err = tw.Flush()
- }
-
- return err
-}
-
-// Fprint "pretty-prints" an HCL node to output
-// It calls Config.Fprint with default settings.
-func Fprint(output io.Writer, node ast.Node) error {
- return DefaultConfig.Fprint(output, node)
-}
-
-// Format formats src HCL and returns the result.
-func Format(src []byte) ([]byte, error) {
- node, err := parser.Parse(src)
- if err != nil {
- return nil, err
- }
-
- var buf bytes.Buffer
- if err := DefaultConfig.Fprint(&buf, node); err != nil {
- return nil, err
- }
-
- // Add trailing newline to result
- buf.WriteString("\n")
- return buf.Bytes(), nil
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go b/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
deleted file mode 100644
index 624a18fe3..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
+++ /dev/null
@@ -1,652 +0,0 @@
-// Package scanner implements a scanner for HCL (HashiCorp Configuration
-// Language) source text.
-package scanner
-
-import (
- "bytes"
- "fmt"
- "os"
- "regexp"
- "unicode"
- "unicode/utf8"
-
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-// eof represents a marker rune for the end of the reader.
-const eof = rune(0)
-
-// Scanner defines a lexical scanner
-type Scanner struct {
- buf *bytes.Buffer // Source buffer for advancing and scanning
- src []byte // Source buffer for immutable access
-
- // Source Position
- srcPos token.Pos // current position
- prevPos token.Pos // previous position, used for peek() method
-
- lastCharLen int // length of last character in bytes
- lastLineLen int // length of last line in characters (for correct column reporting)
-
- tokStart int // token text start position
- tokEnd int // token text end position
-
- // Error is called for each error encountered. If no Error
- // function is set, the error is reported to os.Stderr.
- Error func(pos token.Pos, msg string)
-
- // ErrorCount is incremented by one for each error encountered.
- ErrorCount int
-
- // tokPos is the start position of most recently scanned token; set by
- // Scan. The Filename field is always left untouched by the Scanner. If
- // an error is reported (via Error) and Position is invalid, the scanner is
- // not inside a token.
- tokPos token.Pos
-}
-
-// New creates and initializes a new instance of Scanner using src as
-// its source content.
-func New(src []byte) *Scanner {
- // even though we accept a src, we read from a io.Reader compatible type
- // (*bytes.Buffer). So in the future we might easily change it to streaming
- // read.
- b := bytes.NewBuffer(src)
- s := &Scanner{
- buf: b,
- src: src,
- }
-
- // srcPosition always starts with 1
- s.srcPos.Line = 1
- return s
-}
-
-// next reads the next rune from the bufferred reader. Returns the rune(0) if
-// an error occurs (or io.EOF is returned).
-func (s *Scanner) next() rune {
- ch, size, err := s.buf.ReadRune()
- if err != nil {
- // advance for error reporting
- s.srcPos.Column++
- s.srcPos.Offset += size
- s.lastCharLen = size
- return eof
- }
-
- // remember last position
- s.prevPos = s.srcPos
-
- s.srcPos.Column++
- s.lastCharLen = size
- s.srcPos.Offset += size
-
- if ch == utf8.RuneError && size == 1 {
- s.err("illegal UTF-8 encoding")
- return ch
- }
-
- if ch == '\n' {
- s.srcPos.Line++
- s.lastLineLen = s.srcPos.Column
- s.srcPos.Column = 0
- }
-
- if ch == '\x00' {
- s.err("unexpected null character (0x00)")
- return eof
- }
-
- if ch == '\uE123' {
- s.err("unicode code point U+E123 reserved for internal use")
- return utf8.RuneError
- }
-
- // debug
- // fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column)
- return ch
-}
-
-// unread unreads the previous read Rune and updates the source position
-func (s *Scanner) unread() {
- if err := s.buf.UnreadRune(); err != nil {
- panic(err) // this is user fault, we should catch it
- }
- s.srcPos = s.prevPos // put back last position
-}
-
-// peek returns the next rune without advancing the reader.
-func (s *Scanner) peek() rune {
- peek, _, err := s.buf.ReadRune()
- if err != nil {
- return eof
- }
-
- s.buf.UnreadRune()
- return peek
-}
-
-// Scan scans the next token and returns the token.
-func (s *Scanner) Scan() token.Token {
- ch := s.next()
-
- // skip white space
- for isWhitespace(ch) {
- ch = s.next()
- }
-
- var tok token.Type
-
- // token text markings
- s.tokStart = s.srcPos.Offset - s.lastCharLen
-
- // token position, initial next() is moving the offset by one(size of rune
- // actually), though we are interested with the starting point
- s.tokPos.Offset = s.srcPos.Offset - s.lastCharLen
- if s.srcPos.Column > 0 {
- // common case: last character was not a '\n'
- s.tokPos.Line = s.srcPos.Line
- s.tokPos.Column = s.srcPos.Column
- } else {
- // last character was a '\n'
- // (we cannot be at the beginning of the source
- // since we have called next() at least once)
- s.tokPos.Line = s.srcPos.Line - 1
- s.tokPos.Column = s.lastLineLen
- }
-
- switch {
- case isLetter(ch):
- tok = token.IDENT
- lit := s.scanIdentifier()
- if lit == "true" || lit == "false" {
- tok = token.BOOL
- }
- case isDecimal(ch):
- tok = s.scanNumber(ch)
- default:
- switch ch {
- case eof:
- tok = token.EOF
- case '"':
- tok = token.STRING
- s.scanString()
- case '#', '/':
- tok = token.COMMENT
- s.scanComment(ch)
- case '.':
- tok = token.PERIOD
- ch = s.peek()
- if isDecimal(ch) {
- tok = token.FLOAT
- ch = s.scanMantissa(ch)
- ch = s.scanExponent(ch)
- }
- case '<':
- tok = token.HEREDOC
- s.scanHeredoc()
- case '[':
- tok = token.LBRACK
- case ']':
- tok = token.RBRACK
- case '{':
- tok = token.LBRACE
- case '}':
- tok = token.RBRACE
- case ',':
- tok = token.COMMA
- case '=':
- tok = token.ASSIGN
- case '+':
- tok = token.ADD
- case '-':
- if isDecimal(s.peek()) {
- ch := s.next()
- tok = s.scanNumber(ch)
- } else {
- tok = token.SUB
- }
- default:
- s.err("illegal char")
- }
- }
-
- // finish token ending
- s.tokEnd = s.srcPos.Offset
-
- // create token literal
- var tokenText string
- if s.tokStart >= 0 {
- tokenText = string(s.src[s.tokStart:s.tokEnd])
- }
- s.tokStart = s.tokEnd // ensure idempotency of tokenText() call
-
- return token.Token{
- Type: tok,
- Pos: s.tokPos,
- Text: tokenText,
- }
-}
-
-func (s *Scanner) scanComment(ch rune) {
- // single line comments
- if ch == '#' || (ch == '/' && s.peek() != '*') {
- if ch == '/' && s.peek() != '/' {
- s.err("expected '/' for comment")
- return
- }
-
- ch = s.next()
- for ch != '\n' && ch >= 0 && ch != eof {
- ch = s.next()
- }
- if ch != eof && ch >= 0 {
- s.unread()
- }
- return
- }
-
- // be sure we get the character after /* This allows us to find comment's
- // that are not erminated
- if ch == '/' {
- s.next()
- ch = s.next() // read character after "/*"
- }
-
- // look for /* - style comments
- for {
- if ch < 0 || ch == eof {
- s.err("comment not terminated")
- break
- }
-
- ch0 := ch
- ch = s.next()
- if ch0 == '*' && ch == '/' {
- break
- }
- }
-}
-
-// scanNumber scans a HCL number definition starting with the given rune
-func (s *Scanner) scanNumber(ch rune) token.Type {
- if ch == '0' {
- // check for hexadecimal, octal or float
- ch = s.next()
- if ch == 'x' || ch == 'X' {
- // hexadecimal
- ch = s.next()
- found := false
- for isHexadecimal(ch) {
- ch = s.next()
- found = true
- }
-
- if !found {
- s.err("illegal hexadecimal number")
- }
-
- if ch != eof {
- s.unread()
- }
-
- return token.NUMBER
- }
-
- // now it's either something like: 0421(octal) or 0.1231(float)
- illegalOctal := false
- for isDecimal(ch) {
- ch = s.next()
- if ch == '8' || ch == '9' {
- // this is just a possibility. For example 0159 is illegal, but
- // 0159.23 is valid. So we mark a possible illegal octal. If
- // the next character is not a period, we'll print the error.
- illegalOctal = true
- }
- }
-
- if ch == 'e' || ch == 'E' {
- ch = s.scanExponent(ch)
- return token.FLOAT
- }
-
- if ch == '.' {
- ch = s.scanFraction(ch)
-
- if ch == 'e' || ch == 'E' {
- ch = s.next()
- ch = s.scanExponent(ch)
- }
- return token.FLOAT
- }
-
- if illegalOctal {
- s.err("illegal octal number")
- }
-
- if ch != eof {
- s.unread()
- }
- return token.NUMBER
- }
-
- s.scanMantissa(ch)
- ch = s.next() // seek forward
- if ch == 'e' || ch == 'E' {
- ch = s.scanExponent(ch)
- return token.FLOAT
- }
-
- if ch == '.' {
- ch = s.scanFraction(ch)
- if ch == 'e' || ch == 'E' {
- ch = s.next()
- ch = s.scanExponent(ch)
- }
- return token.FLOAT
- }
-
- if ch != eof {
- s.unread()
- }
- return token.NUMBER
-}
-
-// scanMantissa scans the mantissa beginning from the rune. It returns the next
-// non decimal rune. It's used to determine wheter it's a fraction or exponent.
-func (s *Scanner) scanMantissa(ch rune) rune {
- scanned := false
- for isDecimal(ch) {
- ch = s.next()
- scanned = true
- }
-
- if scanned && ch != eof {
- s.unread()
- }
- return ch
-}
-
-// scanFraction scans the fraction after the '.' rune
-func (s *Scanner) scanFraction(ch rune) rune {
- if ch == '.' {
- ch = s.peek() // we peek just to see if we can move forward
- ch = s.scanMantissa(ch)
- }
- return ch
-}
-
-// scanExponent scans the remaining parts of an exponent after the 'e' or 'E'
-// rune.
-func (s *Scanner) scanExponent(ch rune) rune {
- if ch == 'e' || ch == 'E' {
- ch = s.next()
- if ch == '-' || ch == '+' {
- ch = s.next()
- }
- ch = s.scanMantissa(ch)
- }
- return ch
-}
-
-// scanHeredoc scans a heredoc string
-func (s *Scanner) scanHeredoc() {
- // Scan the second '<' in example: '<= len(identBytes) && identRegexp.Match(s.src[lineStart:s.srcPos.Offset-s.lastCharLen]) {
- break
- }
-
- // Not an anchor match, record the start of a new line
- lineStart = s.srcPos.Offset
- }
-
- if ch == eof {
- s.err("heredoc not terminated")
- return
- }
- }
-
- return
-}
-
-// scanString scans a quoted string
-func (s *Scanner) scanString() {
- braces := 0
- for {
- // '"' opening already consumed
- // read character after quote
- ch := s.next()
-
- if (ch == '\n' && braces == 0) || ch < 0 || ch == eof {
- s.err("literal not terminated")
- return
- }
-
- if ch == '"' && braces == 0 {
- break
- }
-
- // If we're going into a ${} then we can ignore quotes for awhile
- if braces == 0 && ch == '$' && s.peek() == '{' {
- braces++
- s.next()
- } else if braces > 0 && ch == '{' {
- braces++
- }
- if braces > 0 && ch == '}' {
- braces--
- }
-
- if ch == '\\' {
- s.scanEscape()
- }
- }
-
- return
-}
-
-// scanEscape scans an escape sequence
-func (s *Scanner) scanEscape() rune {
- // http://en.cppreference.com/w/cpp/language/escape
- ch := s.next() // read character after '/'
- switch ch {
- case 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', '"':
- // nothing to do
- case '0', '1', '2', '3', '4', '5', '6', '7':
- // octal notation
- ch = s.scanDigits(ch, 8, 3)
- case 'x':
- // hexademical notation
- ch = s.scanDigits(s.next(), 16, 2)
- case 'u':
- // universal character name
- ch = s.scanDigits(s.next(), 16, 4)
- case 'U':
- // universal character name
- ch = s.scanDigits(s.next(), 16, 8)
- default:
- s.err("illegal char escape")
- }
- return ch
-}
-
-// scanDigits scans a rune with the given base for n times. For example an
-// octal notation \184 would yield in scanDigits(ch, 8, 3)
-func (s *Scanner) scanDigits(ch rune, base, n int) rune {
- start := n
- for n > 0 && digitVal(ch) < base {
- ch = s.next()
- if ch == eof {
- // If we see an EOF, we halt any more scanning of digits
- // immediately.
- break
- }
-
- n--
- }
- if n > 0 {
- s.err("illegal char escape")
- }
-
- if n != start && ch != eof {
- // we scanned all digits, put the last non digit char back,
- // only if we read anything at all
- s.unread()
- }
-
- return ch
-}
-
-// scanIdentifier scans an identifier and returns the literal string
-func (s *Scanner) scanIdentifier() string {
- offs := s.srcPos.Offset - s.lastCharLen
- ch := s.next()
- for isLetter(ch) || isDigit(ch) || ch == '-' || ch == '.' {
- ch = s.next()
- }
-
- if ch != eof {
- s.unread() // we got identifier, put back latest char
- }
-
- return string(s.src[offs:s.srcPos.Offset])
-}
-
-// recentPosition returns the position of the character immediately after the
-// character or token returned by the last call to Scan.
-func (s *Scanner) recentPosition() (pos token.Pos) {
- pos.Offset = s.srcPos.Offset - s.lastCharLen
- switch {
- case s.srcPos.Column > 0:
- // common case: last character was not a '\n'
- pos.Line = s.srcPos.Line
- pos.Column = s.srcPos.Column
- case s.lastLineLen > 0:
- // last character was a '\n'
- // (we cannot be at the beginning of the source
- // since we have called next() at least once)
- pos.Line = s.srcPos.Line - 1
- pos.Column = s.lastLineLen
- default:
- // at the beginning of the source
- pos.Line = 1
- pos.Column = 1
- }
- return
-}
-
-// err prints the error of any scanning to s.Error function. If the function is
-// not defined, by default it prints them to os.Stderr
-func (s *Scanner) err(msg string) {
- s.ErrorCount++
- pos := s.recentPosition()
-
- if s.Error != nil {
- s.Error(pos, msg)
- return
- }
-
- fmt.Fprintf(os.Stderr, "%s: %s\n", pos, msg)
-}
-
-// isHexadecimal returns true if the given rune is a letter
-func isLetter(ch rune) bool {
- return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch)
-}
-
-// isDigit returns true if the given rune is a decimal digit
-func isDigit(ch rune) bool {
- return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch)
-}
-
-// isDecimal returns true if the given rune is a decimal number
-func isDecimal(ch rune) bool {
- return '0' <= ch && ch <= '9'
-}
-
-// isHexadecimal returns true if the given rune is an hexadecimal number
-func isHexadecimal(ch rune) bool {
- return '0' <= ch && ch <= '9' || 'a' <= ch && ch <= 'f' || 'A' <= ch && ch <= 'F'
-}
-
-// isWhitespace returns true if the rune is a space, tab, newline or carriage return
-func isWhitespace(ch rune) bool {
- return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'
-}
-
-// digitVal returns the integer value of a given octal,decimal or hexadecimal rune
-func digitVal(ch rune) int {
- switch {
- case '0' <= ch && ch <= '9':
- return int(ch - '0')
- case 'a' <= ch && ch <= 'f':
- return int(ch - 'a' + 10)
- case 'A' <= ch && ch <= 'F':
- return int(ch - 'A' + 10)
- }
- return 16 // larger than any legal digit val
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go b/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go
deleted file mode 100644
index 5f981eaa2..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go
+++ /dev/null
@@ -1,241 +0,0 @@
-package strconv
-
-import (
- "errors"
- "unicode/utf8"
-)
-
-// ErrSyntax indicates that a value does not have the right syntax for the target type.
-var ErrSyntax = errors.New("invalid syntax")
-
-// Unquote interprets s as a single-quoted, double-quoted,
-// or backquoted Go string literal, returning the string value
-// that s quotes. (If s is single-quoted, it would be a Go
-// character literal; Unquote returns the corresponding
-// one-character string.)
-func Unquote(s string) (t string, err error) {
- n := len(s)
- if n < 2 {
- return "", ErrSyntax
- }
- quote := s[0]
- if quote != s[n-1] {
- return "", ErrSyntax
- }
- s = s[1 : n-1]
-
- if quote != '"' {
- return "", ErrSyntax
- }
- if !contains(s, '$') && !contains(s, '{') && contains(s, '\n') {
- return "", ErrSyntax
- }
-
- // Is it trivial? Avoid allocation.
- if !contains(s, '\\') && !contains(s, quote) && !contains(s, '$') {
- switch quote {
- case '"':
- return s, nil
- case '\'':
- r, size := utf8.DecodeRuneInString(s)
- if size == len(s) && (r != utf8.RuneError || size != 1) {
- return s, nil
- }
- }
- }
-
- var runeTmp [utf8.UTFMax]byte
- buf := make([]byte, 0, 3*len(s)/2) // Try to avoid more allocations.
- for len(s) > 0 {
- // If we're starting a '${}' then let it through un-unquoted.
- // Specifically: we don't unquote any characters within the `${}`
- // section.
- if s[0] == '$' && len(s) > 1 && s[1] == '{' {
- buf = append(buf, '$', '{')
- s = s[2:]
-
- // Continue reading until we find the closing brace, copying as-is
- braces := 1
- for len(s) > 0 && braces > 0 {
- r, size := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError {
- return "", ErrSyntax
- }
-
- s = s[size:]
-
- n := utf8.EncodeRune(runeTmp[:], r)
- buf = append(buf, runeTmp[:n]...)
-
- switch r {
- case '{':
- braces++
- case '}':
- braces--
- }
- }
- if braces != 0 {
- return "", ErrSyntax
- }
- if len(s) == 0 {
- // If there's no string left, we're done!
- break
- } else {
- // If there's more left, we need to pop back up to the top of the loop
- // in case there's another interpolation in this string.
- continue
- }
- }
-
- if s[0] == '\n' {
- return "", ErrSyntax
- }
-
- c, multibyte, ss, err := unquoteChar(s, quote)
- if err != nil {
- return "", err
- }
- s = ss
- if c < utf8.RuneSelf || !multibyte {
- buf = append(buf, byte(c))
- } else {
- n := utf8.EncodeRune(runeTmp[:], c)
- buf = append(buf, runeTmp[:n]...)
- }
- if quote == '\'' && len(s) != 0 {
- // single-quoted must be single character
- return "", ErrSyntax
- }
- }
- return string(buf), nil
-}
-
-// contains reports whether the string contains the byte c.
-func contains(s string, c byte) bool {
- for i := 0; i < len(s); i++ {
- if s[i] == c {
- return true
- }
- }
- return false
-}
-
-func unhex(b byte) (v rune, ok bool) {
- c := rune(b)
- switch {
- case '0' <= c && c <= '9':
- return c - '0', true
- case 'a' <= c && c <= 'f':
- return c - 'a' + 10, true
- case 'A' <= c && c <= 'F':
- return c - 'A' + 10, true
- }
- return
-}
-
-func unquoteChar(s string, quote byte) (value rune, multibyte bool, tail string, err error) {
- // easy cases
- switch c := s[0]; {
- case c == quote && (quote == '\'' || quote == '"'):
- err = ErrSyntax
- return
- case c >= utf8.RuneSelf:
- r, size := utf8.DecodeRuneInString(s)
- return r, true, s[size:], nil
- case c != '\\':
- return rune(s[0]), false, s[1:], nil
- }
-
- // hard case: c is backslash
- if len(s) <= 1 {
- err = ErrSyntax
- return
- }
- c := s[1]
- s = s[2:]
-
- switch c {
- case 'a':
- value = '\a'
- case 'b':
- value = '\b'
- case 'f':
- value = '\f'
- case 'n':
- value = '\n'
- case 'r':
- value = '\r'
- case 't':
- value = '\t'
- case 'v':
- value = '\v'
- case 'x', 'u', 'U':
- n := 0
- switch c {
- case 'x':
- n = 2
- case 'u':
- n = 4
- case 'U':
- n = 8
- }
- var v rune
- if len(s) < n {
- err = ErrSyntax
- return
- }
- for j := 0; j < n; j++ {
- x, ok := unhex(s[j])
- if !ok {
- err = ErrSyntax
- return
- }
- v = v<<4 | x
- }
- s = s[n:]
- if c == 'x' {
- // single-byte string, possibly not UTF-8
- value = v
- break
- }
- if v > utf8.MaxRune {
- err = ErrSyntax
- return
- }
- value = v
- multibyte = true
- case '0', '1', '2', '3', '4', '5', '6', '7':
- v := rune(c) - '0'
- if len(s) < 2 {
- err = ErrSyntax
- return
- }
- for j := 0; j < 2; j++ { // one digit already; two more
- x := rune(s[j]) - '0'
- if x < 0 || x > 7 {
- err = ErrSyntax
- return
- }
- v = (v << 3) | x
- }
- s = s[2:]
- if v > 255 {
- err = ErrSyntax
- return
- }
- value = v
- case '\\':
- value = '\\'
- case '\'', '"':
- if c != quote {
- err = ErrSyntax
- return
- }
- value = rune(c)
- default:
- err = ErrSyntax
- return
- }
- tail = s
- return
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/token/position.go b/vendor/github.com/hashicorp/hcl/hcl/token/position.go
deleted file mode 100644
index 59c1bb72d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/token/position.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package token
-
-import "fmt"
-
-// Pos describes an arbitrary source position
-// including the file, line, and column location.
-// A Position is valid if the line number is > 0.
-type Pos struct {
- Filename string // filename, if any
- Offset int // offset, starting at 0
- Line int // line number, starting at 1
- Column int // column number, starting at 1 (character count)
-}
-
-// IsValid returns true if the position is valid.
-func (p *Pos) IsValid() bool { return p.Line > 0 }
-
-// String returns a string in one of several forms:
-//
-// file:line:column valid position with file name
-// line:column valid position without file name
-// file invalid position with file name
-// - invalid position without file name
-func (p Pos) String() string {
- s := p.Filename
- if p.IsValid() {
- if s != "" {
- s += ":"
- }
- s += fmt.Sprintf("%d:%d", p.Line, p.Column)
- }
- if s == "" {
- s = "-"
- }
- return s
-}
-
-// Before reports whether the position p is before u.
-func (p Pos) Before(u Pos) bool {
- return u.Offset > p.Offset || u.Line > p.Line
-}
-
-// After reports whether the position p is after u.
-func (p Pos) After(u Pos) bool {
- return u.Offset < p.Offset || u.Line < p.Line
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/token/token.go b/vendor/github.com/hashicorp/hcl/hcl/token/token.go
deleted file mode 100644
index e37c0664e..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/token/token.go
+++ /dev/null
@@ -1,219 +0,0 @@
-// Package token defines constants representing the lexical tokens for HCL
-// (HashiCorp Configuration Language)
-package token
-
-import (
- "fmt"
- "strconv"
- "strings"
-
- hclstrconv "github.com/hashicorp/hcl/hcl/strconv"
-)
-
-// Token defines a single HCL token which can be obtained via the Scanner
-type Token struct {
- Type Type
- Pos Pos
- Text string
- JSON bool
-}
-
-// Type is the set of lexical tokens of the HCL (HashiCorp Configuration Language)
-type Type int
-
-const (
- // Special tokens
- ILLEGAL Type = iota
- EOF
- COMMENT
-
- identifier_beg
- IDENT // literals
- literal_beg
- NUMBER // 12345
- FLOAT // 123.45
- BOOL // true,false
- STRING // "abc"
- HEREDOC // < 0 {
- // Pop the current item
- n := len(frontier)
- item := frontier[n-1]
- frontier = frontier[:n-1]
-
- switch v := item.Val.(type) {
- case *ast.ObjectType:
- items, frontier = flattenObjectType(v, item, items, frontier)
- case *ast.ListType:
- items, frontier = flattenListType(v, item, items, frontier)
- default:
- items = append(items, item)
- }
- }
-
- // Reverse the list since the frontier model runs things backwards
- for i := len(items)/2 - 1; i >= 0; i-- {
- opp := len(items) - 1 - i
- items[i], items[opp] = items[opp], items[i]
- }
-
- // Done! Set the original items
- list.Items = items
- return n, true
- })
-}
-
-func flattenListType(
- ot *ast.ListType,
- item *ast.ObjectItem,
- items []*ast.ObjectItem,
- frontier []*ast.ObjectItem) ([]*ast.ObjectItem, []*ast.ObjectItem) {
- // If the list is empty, keep the original list
- if len(ot.List) == 0 {
- items = append(items, item)
- return items, frontier
- }
-
- // All the elements of this object must also be objects!
- for _, subitem := range ot.List {
- if _, ok := subitem.(*ast.ObjectType); !ok {
- items = append(items, item)
- return items, frontier
- }
- }
-
- // Great! We have a match go through all the items and flatten
- for _, elem := range ot.List {
- // Add it to the frontier so that we can recurse
- frontier = append(frontier, &ast.ObjectItem{
- Keys: item.Keys,
- Assign: item.Assign,
- Val: elem,
- LeadComment: item.LeadComment,
- LineComment: item.LineComment,
- })
- }
-
- return items, frontier
-}
-
-func flattenObjectType(
- ot *ast.ObjectType,
- item *ast.ObjectItem,
- items []*ast.ObjectItem,
- frontier []*ast.ObjectItem) ([]*ast.ObjectItem, []*ast.ObjectItem) {
- // If the list has no items we do not have to flatten anything
- if ot.List.Items == nil {
- items = append(items, item)
- return items, frontier
- }
-
- // All the elements of this object must also be objects!
- for _, subitem := range ot.List.Items {
- if _, ok := subitem.Val.(*ast.ObjectType); !ok {
- items = append(items, item)
- return items, frontier
- }
- }
-
- // Great! We have a match go through all the items and flatten
- for _, subitem := range ot.List.Items {
- // Copy the new key
- keys := make([]*ast.ObjectKey, len(item.Keys)+len(subitem.Keys))
- copy(keys, item.Keys)
- copy(keys[len(item.Keys):], subitem.Keys)
-
- // Add it to the frontier so that we can recurse
- frontier = append(frontier, &ast.ObjectItem{
- Keys: keys,
- Assign: item.Assign,
- Val: subitem.Val,
- LeadComment: item.LeadComment,
- LineComment: item.LineComment,
- })
- }
-
- return items, frontier
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/parser/parser.go b/vendor/github.com/hashicorp/hcl/json/parser/parser.go
deleted file mode 100644
index 125a5f072..000000000
--- a/vendor/github.com/hashicorp/hcl/json/parser/parser.go
+++ /dev/null
@@ -1,313 +0,0 @@
-package parser
-
-import (
- "errors"
- "fmt"
-
- "github.com/hashicorp/hcl/hcl/ast"
- hcltoken "github.com/hashicorp/hcl/hcl/token"
- "github.com/hashicorp/hcl/json/scanner"
- "github.com/hashicorp/hcl/json/token"
-)
-
-type Parser struct {
- sc *scanner.Scanner
-
- // Last read token
- tok token.Token
- commaPrev token.Token
-
- enableTrace bool
- indent int
- n int // buffer size (max = 1)
-}
-
-func newParser(src []byte) *Parser {
- return &Parser{
- sc: scanner.New(src),
- }
-}
-
-// Parse returns the fully parsed source and returns the abstract syntax tree.
-func Parse(src []byte) (*ast.File, error) {
- p := newParser(src)
- return p.Parse()
-}
-
-var errEofToken = errors.New("EOF token found")
-
-// Parse returns the fully parsed source and returns the abstract syntax tree.
-func (p *Parser) Parse() (*ast.File, error) {
- f := &ast.File{}
- var err, scerr error
- p.sc.Error = func(pos token.Pos, msg string) {
- scerr = fmt.Errorf("%s: %s", pos, msg)
- }
-
- // The root must be an object in JSON
- object, err := p.object()
- if scerr != nil {
- return nil, scerr
- }
- if err != nil {
- return nil, err
- }
-
- // We make our final node an object list so it is more HCL compatible
- f.Node = object.List
-
- // Flatten it, which finds patterns and turns them into more HCL-like
- // AST trees.
- flattenObjects(f.Node)
-
- return f, nil
-}
-
-func (p *Parser) objectList() (*ast.ObjectList, error) {
- defer un(trace(p, "ParseObjectList"))
- node := &ast.ObjectList{}
-
- for {
- n, err := p.objectItem()
- if err == errEofToken {
- break // we are finished
- }
-
- // we don't return a nil node, because might want to use already
- // collected items.
- if err != nil {
- return node, err
- }
-
- node.Add(n)
-
- // Check for a followup comma. If it isn't a comma, then we're done
- if tok := p.scan(); tok.Type != token.COMMA {
- break
- }
- }
-
- return node, nil
-}
-
-// objectItem parses a single object item
-func (p *Parser) objectItem() (*ast.ObjectItem, error) {
- defer un(trace(p, "ParseObjectItem"))
-
- keys, err := p.objectKey()
- if err != nil {
- return nil, err
- }
-
- o := &ast.ObjectItem{
- Keys: keys,
- }
-
- switch p.tok.Type {
- case token.COLON:
- pos := p.tok.Pos
- o.Assign = hcltoken.Pos{
- Filename: pos.Filename,
- Offset: pos.Offset,
- Line: pos.Line,
- Column: pos.Column,
- }
-
- o.Val, err = p.objectValue()
- if err != nil {
- return nil, err
- }
- }
-
- return o, nil
-}
-
-// objectKey parses an object key and returns a ObjectKey AST
-func (p *Parser) objectKey() ([]*ast.ObjectKey, error) {
- keyCount := 0
- keys := make([]*ast.ObjectKey, 0)
-
- for {
- tok := p.scan()
- switch tok.Type {
- case token.EOF:
- return nil, errEofToken
- case token.STRING:
- keyCount++
- keys = append(keys, &ast.ObjectKey{
- Token: p.tok.HCLToken(),
- })
- case token.COLON:
- // If we have a zero keycount it means that we never got
- // an object key, i.e. `{ :`. This is a syntax error.
- if keyCount == 0 {
- return nil, fmt.Errorf("expected: STRING got: %s", p.tok.Type)
- }
-
- // Done
- return keys, nil
- case token.ILLEGAL:
- return nil, errors.New("illegal")
- default:
- return nil, fmt.Errorf("expected: STRING got: %s", p.tok.Type)
- }
- }
-}
-
-// object parses any type of object, such as number, bool, string, object or
-// list.
-func (p *Parser) objectValue() (ast.Node, error) {
- defer un(trace(p, "ParseObjectValue"))
- tok := p.scan()
-
- switch tok.Type {
- case token.NUMBER, token.FLOAT, token.BOOL, token.NULL, token.STRING:
- return p.literalType()
- case token.LBRACE:
- return p.objectType()
- case token.LBRACK:
- return p.listType()
- case token.EOF:
- return nil, errEofToken
- }
-
- return nil, fmt.Errorf("Expected object value, got unknown token: %+v", tok)
-}
-
-// object parses any type of object, such as number, bool, string, object or
-// list.
-func (p *Parser) object() (*ast.ObjectType, error) {
- defer un(trace(p, "ParseType"))
- tok := p.scan()
-
- switch tok.Type {
- case token.LBRACE:
- return p.objectType()
- case token.EOF:
- return nil, errEofToken
- }
-
- return nil, fmt.Errorf("Expected object, got unknown token: %+v", tok)
-}
-
-// objectType parses an object type and returns a ObjectType AST
-func (p *Parser) objectType() (*ast.ObjectType, error) {
- defer un(trace(p, "ParseObjectType"))
-
- // we assume that the currently scanned token is a LBRACE
- o := &ast.ObjectType{}
-
- l, err := p.objectList()
-
- // if we hit RBRACE, we are good to go (means we parsed all Items), if it's
- // not a RBRACE, it's an syntax error and we just return it.
- if err != nil && p.tok.Type != token.RBRACE {
- return nil, err
- }
-
- o.List = l
- return o, nil
-}
-
-// listType parses a list type and returns a ListType AST
-func (p *Parser) listType() (*ast.ListType, error) {
- defer un(trace(p, "ParseListType"))
-
- // we assume that the currently scanned token is a LBRACK
- l := &ast.ListType{}
-
- for {
- tok := p.scan()
- switch tok.Type {
- case token.NUMBER, token.FLOAT, token.STRING:
- node, err := p.literalType()
- if err != nil {
- return nil, err
- }
-
- l.Add(node)
- case token.COMMA:
- continue
- case token.LBRACE:
- node, err := p.objectType()
- if err != nil {
- return nil, err
- }
-
- l.Add(node)
- case token.BOOL:
- // TODO(arslan) should we support? not supported by HCL yet
- case token.LBRACK:
- // TODO(arslan) should we support nested lists? Even though it's
- // written in README of HCL, it's not a part of the grammar
- // (not defined in parse.y)
- case token.RBRACK:
- // finished
- return l, nil
- default:
- return nil, fmt.Errorf("unexpected token while parsing list: %s", tok.Type)
- }
-
- }
-}
-
-// literalType parses a literal type and returns a LiteralType AST
-func (p *Parser) literalType() (*ast.LiteralType, error) {
- defer un(trace(p, "ParseLiteral"))
-
- return &ast.LiteralType{
- Token: p.tok.HCLToken(),
- }, nil
-}
-
-// scan returns the next token from the underlying scanner. If a token has
-// been unscanned then read that instead.
-func (p *Parser) scan() token.Token {
- // If we have a token on the buffer, then return it.
- if p.n != 0 {
- p.n = 0
- return p.tok
- }
-
- p.tok = p.sc.Scan()
- return p.tok
-}
-
-// unscan pushes the previously read token back onto the buffer.
-func (p *Parser) unscan() {
- p.n = 1
-}
-
-// ----------------------------------------------------------------------------
-// Parsing support
-
-func (p *Parser) printTrace(a ...interface{}) {
- if !p.enableTrace {
- return
- }
-
- const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "
- const n = len(dots)
- fmt.Printf("%5d:%3d: ", p.tok.Pos.Line, p.tok.Pos.Column)
-
- i := 2 * p.indent
- for i > n {
- fmt.Print(dots)
- i -= n
- }
- // i <= n
- fmt.Print(dots[0:i])
- fmt.Println(a...)
-}
-
-func trace(p *Parser, msg string) *Parser {
- p.printTrace(msg, "(")
- p.indent++
- return p
-}
-
-// Usage pattern: defer un(trace(p, "..."))
-func un(p *Parser) {
- p.indent--
- p.printTrace(")")
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go b/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go
deleted file mode 100644
index fe3f0f095..000000000
--- a/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go
+++ /dev/null
@@ -1,451 +0,0 @@
-package scanner
-
-import (
- "bytes"
- "fmt"
- "os"
- "unicode"
- "unicode/utf8"
-
- "github.com/hashicorp/hcl/json/token"
-)
-
-// eof represents a marker rune for the end of the reader.
-const eof = rune(0)
-
-// Scanner defines a lexical scanner
-type Scanner struct {
- buf *bytes.Buffer // Source buffer for advancing and scanning
- src []byte // Source buffer for immutable access
-
- // Source Position
- srcPos token.Pos // current position
- prevPos token.Pos // previous position, used for peek() method
-
- lastCharLen int // length of last character in bytes
- lastLineLen int // length of last line in characters (for correct column reporting)
-
- tokStart int // token text start position
- tokEnd int // token text end position
-
- // Error is called for each error encountered. If no Error
- // function is set, the error is reported to os.Stderr.
- Error func(pos token.Pos, msg string)
-
- // ErrorCount is incremented by one for each error encountered.
- ErrorCount int
-
- // tokPos is the start position of most recently scanned token; set by
- // Scan. The Filename field is always left untouched by the Scanner. If
- // an error is reported (via Error) and Position is invalid, the scanner is
- // not inside a token.
- tokPos token.Pos
-}
-
-// New creates and initializes a new instance of Scanner using src as
-// its source content.
-func New(src []byte) *Scanner {
- // even though we accept a src, we read from a io.Reader compatible type
- // (*bytes.Buffer). So in the future we might easily change it to streaming
- // read.
- b := bytes.NewBuffer(src)
- s := &Scanner{
- buf: b,
- src: src,
- }
-
- // srcPosition always starts with 1
- s.srcPos.Line = 1
- return s
-}
-
-// next reads the next rune from the bufferred reader. Returns the rune(0) if
-// an error occurs (or io.EOF is returned).
-func (s *Scanner) next() rune {
- ch, size, err := s.buf.ReadRune()
- if err != nil {
- // advance for error reporting
- s.srcPos.Column++
- s.srcPos.Offset += size
- s.lastCharLen = size
- return eof
- }
-
- if ch == utf8.RuneError && size == 1 {
- s.srcPos.Column++
- s.srcPos.Offset += size
- s.lastCharLen = size
- s.err("illegal UTF-8 encoding")
- return ch
- }
-
- // remember last position
- s.prevPos = s.srcPos
-
- s.srcPos.Column++
- s.lastCharLen = size
- s.srcPos.Offset += size
-
- if ch == '\n' {
- s.srcPos.Line++
- s.lastLineLen = s.srcPos.Column
- s.srcPos.Column = 0
- }
-
- // debug
- // fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column)
- return ch
-}
-
-// unread unreads the previous read Rune and updates the source position
-func (s *Scanner) unread() {
- if err := s.buf.UnreadRune(); err != nil {
- panic(err) // this is user fault, we should catch it
- }
- s.srcPos = s.prevPos // put back last position
-}
-
-// peek returns the next rune without advancing the reader.
-func (s *Scanner) peek() rune {
- peek, _, err := s.buf.ReadRune()
- if err != nil {
- return eof
- }
-
- s.buf.UnreadRune()
- return peek
-}
-
-// Scan scans the next token and returns the token.
-func (s *Scanner) Scan() token.Token {
- ch := s.next()
-
- // skip white space
- for isWhitespace(ch) {
- ch = s.next()
- }
-
- var tok token.Type
-
- // token text markings
- s.tokStart = s.srcPos.Offset - s.lastCharLen
-
- // token position, initial next() is moving the offset by one(size of rune
- // actually), though we are interested with the starting point
- s.tokPos.Offset = s.srcPos.Offset - s.lastCharLen
- if s.srcPos.Column > 0 {
- // common case: last character was not a '\n'
- s.tokPos.Line = s.srcPos.Line
- s.tokPos.Column = s.srcPos.Column
- } else {
- // last character was a '\n'
- // (we cannot be at the beginning of the source
- // since we have called next() at least once)
- s.tokPos.Line = s.srcPos.Line - 1
- s.tokPos.Column = s.lastLineLen
- }
-
- switch {
- case isLetter(ch):
- lit := s.scanIdentifier()
- if lit == "true" || lit == "false" {
- tok = token.BOOL
- } else if lit == "null" {
- tok = token.NULL
- } else {
- s.err("illegal char")
- }
- case isDecimal(ch):
- tok = s.scanNumber(ch)
- default:
- switch ch {
- case eof:
- tok = token.EOF
- case '"':
- tok = token.STRING
- s.scanString()
- case '.':
- tok = token.PERIOD
- ch = s.peek()
- if isDecimal(ch) {
- tok = token.FLOAT
- ch = s.scanMantissa(ch)
- ch = s.scanExponent(ch)
- }
- case '[':
- tok = token.LBRACK
- case ']':
- tok = token.RBRACK
- case '{':
- tok = token.LBRACE
- case '}':
- tok = token.RBRACE
- case ',':
- tok = token.COMMA
- case ':':
- tok = token.COLON
- case '-':
- if isDecimal(s.peek()) {
- ch := s.next()
- tok = s.scanNumber(ch)
- } else {
- s.err("illegal char")
- }
- default:
- s.err("illegal char: " + string(ch))
- }
- }
-
- // finish token ending
- s.tokEnd = s.srcPos.Offset
-
- // create token literal
- var tokenText string
- if s.tokStart >= 0 {
- tokenText = string(s.src[s.tokStart:s.tokEnd])
- }
- s.tokStart = s.tokEnd // ensure idempotency of tokenText() call
-
- return token.Token{
- Type: tok,
- Pos: s.tokPos,
- Text: tokenText,
- }
-}
-
-// scanNumber scans a HCL number definition starting with the given rune
-func (s *Scanner) scanNumber(ch rune) token.Type {
- zero := ch == '0'
- pos := s.srcPos
-
- s.scanMantissa(ch)
- ch = s.next() // seek forward
- if ch == 'e' || ch == 'E' {
- ch = s.scanExponent(ch)
- return token.FLOAT
- }
-
- if ch == '.' {
- ch = s.scanFraction(ch)
- if ch == 'e' || ch == 'E' {
- ch = s.next()
- ch = s.scanExponent(ch)
- }
- return token.FLOAT
- }
-
- if ch != eof {
- s.unread()
- }
-
- // If we have a larger number and this is zero, error
- if zero && pos != s.srcPos {
- s.err("numbers cannot start with 0")
- }
-
- return token.NUMBER
-}
-
-// scanMantissa scans the mantissa beginning from the rune. It returns the next
-// non decimal rune. It's used to determine wheter it's a fraction or exponent.
-func (s *Scanner) scanMantissa(ch rune) rune {
- scanned := false
- for isDecimal(ch) {
- ch = s.next()
- scanned = true
- }
-
- if scanned && ch != eof {
- s.unread()
- }
- return ch
-}
-
-// scanFraction scans the fraction after the '.' rune
-func (s *Scanner) scanFraction(ch rune) rune {
- if ch == '.' {
- ch = s.peek() // we peek just to see if we can move forward
- ch = s.scanMantissa(ch)
- }
- return ch
-}
-
-// scanExponent scans the remaining parts of an exponent after the 'e' or 'E'
-// rune.
-func (s *Scanner) scanExponent(ch rune) rune {
- if ch == 'e' || ch == 'E' {
- ch = s.next()
- if ch == '-' || ch == '+' {
- ch = s.next()
- }
- ch = s.scanMantissa(ch)
- }
- return ch
-}
-
-// scanString scans a quoted string
-func (s *Scanner) scanString() {
- braces := 0
- for {
- // '"' opening already consumed
- // read character after quote
- ch := s.next()
-
- if ch == '\n' || ch < 0 || ch == eof {
- s.err("literal not terminated")
- return
- }
-
- if ch == '"' {
- break
- }
-
- // If we're going into a ${} then we can ignore quotes for awhile
- if braces == 0 && ch == '$' && s.peek() == '{' {
- braces++
- s.next()
- } else if braces > 0 && ch == '{' {
- braces++
- }
- if braces > 0 && ch == '}' {
- braces--
- }
-
- if ch == '\\' {
- s.scanEscape()
- }
- }
-
- return
-}
-
-// scanEscape scans an escape sequence
-func (s *Scanner) scanEscape() rune {
- // http://en.cppreference.com/w/cpp/language/escape
- ch := s.next() // read character after '/'
- switch ch {
- case 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', '"':
- // nothing to do
- case '0', '1', '2', '3', '4', '5', '6', '7':
- // octal notation
- ch = s.scanDigits(ch, 8, 3)
- case 'x':
- // hexademical notation
- ch = s.scanDigits(s.next(), 16, 2)
- case 'u':
- // universal character name
- ch = s.scanDigits(s.next(), 16, 4)
- case 'U':
- // universal character name
- ch = s.scanDigits(s.next(), 16, 8)
- default:
- s.err("illegal char escape")
- }
- return ch
-}
-
-// scanDigits scans a rune with the given base for n times. For example an
-// octal notation \184 would yield in scanDigits(ch, 8, 3)
-func (s *Scanner) scanDigits(ch rune, base, n int) rune {
- for n > 0 && digitVal(ch) < base {
- ch = s.next()
- n--
- }
- if n > 0 {
- s.err("illegal char escape")
- }
-
- // we scanned all digits, put the last non digit char back
- s.unread()
- return ch
-}
-
-// scanIdentifier scans an identifier and returns the literal string
-func (s *Scanner) scanIdentifier() string {
- offs := s.srcPos.Offset - s.lastCharLen
- ch := s.next()
- for isLetter(ch) || isDigit(ch) || ch == '-' {
- ch = s.next()
- }
-
- if ch != eof {
- s.unread() // we got identifier, put back latest char
- }
-
- return string(s.src[offs:s.srcPos.Offset])
-}
-
-// recentPosition returns the position of the character immediately after the
-// character or token returned by the last call to Scan.
-func (s *Scanner) recentPosition() (pos token.Pos) {
- pos.Offset = s.srcPos.Offset - s.lastCharLen
- switch {
- case s.srcPos.Column > 0:
- // common case: last character was not a '\n'
- pos.Line = s.srcPos.Line
- pos.Column = s.srcPos.Column
- case s.lastLineLen > 0:
- // last character was a '\n'
- // (we cannot be at the beginning of the source
- // since we have called next() at least once)
- pos.Line = s.srcPos.Line - 1
- pos.Column = s.lastLineLen
- default:
- // at the beginning of the source
- pos.Line = 1
- pos.Column = 1
- }
- return
-}
-
-// err prints the error of any scanning to s.Error function. If the function is
-// not defined, by default it prints them to os.Stderr
-func (s *Scanner) err(msg string) {
- s.ErrorCount++
- pos := s.recentPosition()
-
- if s.Error != nil {
- s.Error(pos, msg)
- return
- }
-
- fmt.Fprintf(os.Stderr, "%s: %s\n", pos, msg)
-}
-
-// isHexadecimal returns true if the given rune is a letter
-func isLetter(ch rune) bool {
- return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch)
-}
-
-// isHexadecimal returns true if the given rune is a decimal digit
-func isDigit(ch rune) bool {
- return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch)
-}
-
-// isHexadecimal returns true if the given rune is a decimal number
-func isDecimal(ch rune) bool {
- return '0' <= ch && ch <= '9'
-}
-
-// isHexadecimal returns true if the given rune is an hexadecimal number
-func isHexadecimal(ch rune) bool {
- return '0' <= ch && ch <= '9' || 'a' <= ch && ch <= 'f' || 'A' <= ch && ch <= 'F'
-}
-
-// isWhitespace returns true if the rune is a space, tab, newline or carriage return
-func isWhitespace(ch rune) bool {
- return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'
-}
-
-// digitVal returns the integer value of a given octal,decimal or hexadecimal rune
-func digitVal(ch rune) int {
- switch {
- case '0' <= ch && ch <= '9':
- return int(ch - '0')
- case 'a' <= ch && ch <= 'f':
- return int(ch - 'a' + 10)
- case 'A' <= ch && ch <= 'F':
- return int(ch - 'A' + 10)
- }
- return 16 // larger than any legal digit val
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/token/position.go b/vendor/github.com/hashicorp/hcl/json/token/position.go
deleted file mode 100644
index 59c1bb72d..000000000
--- a/vendor/github.com/hashicorp/hcl/json/token/position.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package token
-
-import "fmt"
-
-// Pos describes an arbitrary source position
-// including the file, line, and column location.
-// A Position is valid if the line number is > 0.
-type Pos struct {
- Filename string // filename, if any
- Offset int // offset, starting at 0
- Line int // line number, starting at 1
- Column int // column number, starting at 1 (character count)
-}
-
-// IsValid returns true if the position is valid.
-func (p *Pos) IsValid() bool { return p.Line > 0 }
-
-// String returns a string in one of several forms:
-//
-// file:line:column valid position with file name
-// line:column valid position without file name
-// file invalid position with file name
-// - invalid position without file name
-func (p Pos) String() string {
- s := p.Filename
- if p.IsValid() {
- if s != "" {
- s += ":"
- }
- s += fmt.Sprintf("%d:%d", p.Line, p.Column)
- }
- if s == "" {
- s = "-"
- }
- return s
-}
-
-// Before reports whether the position p is before u.
-func (p Pos) Before(u Pos) bool {
- return u.Offset > p.Offset || u.Line > p.Line
-}
-
-// After reports whether the position p is after u.
-func (p Pos) After(u Pos) bool {
- return u.Offset < p.Offset || u.Line < p.Line
-}
diff --git a/vendor/github.com/hashicorp/hcl/json/token/token.go b/vendor/github.com/hashicorp/hcl/json/token/token.go
deleted file mode 100644
index 95a0c3eee..000000000
--- a/vendor/github.com/hashicorp/hcl/json/token/token.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package token
-
-import (
- "fmt"
- "strconv"
-
- hcltoken "github.com/hashicorp/hcl/hcl/token"
-)
-
-// Token defines a single HCL token which can be obtained via the Scanner
-type Token struct {
- Type Type
- Pos Pos
- Text string
-}
-
-// Type is the set of lexical tokens of the HCL (HashiCorp Configuration Language)
-type Type int
-
-const (
- // Special tokens
- ILLEGAL Type = iota
- EOF
-
- identifier_beg
- literal_beg
- NUMBER // 12345
- FLOAT // 123.45
- BOOL // true,false
- STRING // "abc"
- NULL // null
- literal_end
- identifier_end
-
- operator_beg
- LBRACK // [
- LBRACE // {
- COMMA // ,
- PERIOD // .
- COLON // :
-
- RBRACK // ]
- RBRACE // }
-
- operator_end
-)
-
-var tokens = [...]string{
- ILLEGAL: "ILLEGAL",
-
- EOF: "EOF",
-
- NUMBER: "NUMBER",
- FLOAT: "FLOAT",
- BOOL: "BOOL",
- STRING: "STRING",
- NULL: "NULL",
-
- LBRACK: "LBRACK",
- LBRACE: "LBRACE",
- COMMA: "COMMA",
- PERIOD: "PERIOD",
- COLON: "COLON",
-
- RBRACK: "RBRACK",
- RBRACE: "RBRACE",
-}
-
-// String returns the string corresponding to the token tok.
-func (t Type) String() string {
- s := ""
- if 0 <= t && t < Type(len(tokens)) {
- s = tokens[t]
- }
- if s == "" {
- s = "token(" + strconv.Itoa(int(t)) + ")"
- }
- return s
-}
-
-// IsIdentifier returns true for tokens corresponding to identifiers and basic
-// type literals; it returns false otherwise.
-func (t Type) IsIdentifier() bool { return identifier_beg < t && t < identifier_end }
-
-// IsLiteral returns true for tokens corresponding to basic type literals; it
-// returns false otherwise.
-func (t Type) IsLiteral() bool { return literal_beg < t && t < literal_end }
-
-// IsOperator returns true for tokens corresponding to operators and
-// delimiters; it returns false otherwise.
-func (t Type) IsOperator() bool { return operator_beg < t && t < operator_end }
-
-// String returns the token's literal text. Note that this is only
-// applicable for certain token types, such as token.IDENT,
-// token.STRING, etc..
-func (t Token) String() string {
- return fmt.Sprintf("%s %s %s", t.Pos.String(), t.Type.String(), t.Text)
-}
-
-// HCLToken converts this token to an HCL token.
-//
-// The token type must be a literal type or this will panic.
-func (t Token) HCLToken() hcltoken.Token {
- switch t.Type {
- case BOOL:
- return hcltoken.Token{Type: hcltoken.BOOL, Text: t.Text}
- case FLOAT:
- return hcltoken.Token{Type: hcltoken.FLOAT, Text: t.Text}
- case NULL:
- return hcltoken.Token{Type: hcltoken.STRING, Text: ""}
- case NUMBER:
- return hcltoken.Token{Type: hcltoken.NUMBER, Text: t.Text}
- case STRING:
- return hcltoken.Token{Type: hcltoken.STRING, Text: t.Text, JSON: true}
- default:
- panic(fmt.Sprintf("unimplemented HCLToken for type: %s", t.Type))
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/lex.go b/vendor/github.com/hashicorp/hcl/lex.go
deleted file mode 100644
index d9993c292..000000000
--- a/vendor/github.com/hashicorp/hcl/lex.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package hcl
-
-import (
- "unicode"
- "unicode/utf8"
-)
-
-type lexModeValue byte
-
-const (
- lexModeUnknown lexModeValue = iota
- lexModeHcl
- lexModeJson
-)
-
-// lexMode returns whether we're going to be parsing in JSON
-// mode or HCL mode.
-func lexMode(v []byte) lexModeValue {
- var (
- r rune
- w int
- offset int
- )
-
- for {
- r, w = utf8.DecodeRune(v[offset:])
- offset += w
- if unicode.IsSpace(r) {
- continue
- }
- if r == '{' {
- return lexModeJson
- }
- break
- }
-
- return lexModeHcl
-}
diff --git a/vendor/github.com/hashicorp/hcl/parse.go b/vendor/github.com/hashicorp/hcl/parse.go
deleted file mode 100644
index 1fca53c4c..000000000
--- a/vendor/github.com/hashicorp/hcl/parse.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package hcl
-
-import (
- "fmt"
-
- "github.com/hashicorp/hcl/hcl/ast"
- hclParser "github.com/hashicorp/hcl/hcl/parser"
- jsonParser "github.com/hashicorp/hcl/json/parser"
-)
-
-// ParseBytes accepts as input byte slice and returns ast tree.
-//
-// Input can be either JSON or HCL
-func ParseBytes(in []byte) (*ast.File, error) {
- return parse(in)
-}
-
-// ParseString accepts input as a string and returns ast tree.
-func ParseString(input string) (*ast.File, error) {
- return parse([]byte(input))
-}
-
-func parse(in []byte) (*ast.File, error) {
- switch lexMode(in) {
- case lexModeHcl:
- return hclParser.Parse(in)
- case lexModeJson:
- return jsonParser.Parse(in)
- }
-
- return nil, fmt.Errorf("unknown config format")
-}
-
-// Parse parses the given input and returns the root object.
-//
-// The input format can be either HCL or JSON.
-func Parse(input string) (*ast.File, error) {
- return parse([]byte(input))
-}
diff --git a/vendor/github.com/iancoleman/strcase/.travis.yml b/vendor/github.com/iancoleman/strcase/.travis.yml
deleted file mode 100644
index 4da3ca1dc..000000000
--- a/vendor/github.com/iancoleman/strcase/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-sudo: false
-language: go
-go:
- - 1.7.x
- - 1.8.x
- - 1.9.x
- - 1.10.x
- - 1.11.x
- - master
diff --git a/vendor/github.com/iancoleman/strcase/LICENSE b/vendor/github.com/iancoleman/strcase/LICENSE
deleted file mode 100644
index 3e87ff70e..000000000
--- a/vendor/github.com/iancoleman/strcase/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Ian Coleman
-Copyright (c) 2018 Ma_124,
-
-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/iancoleman/strcase/README.md b/vendor/github.com/iancoleman/strcase/README.md
deleted file mode 100644
index 5f6391de3..000000000
--- a/vendor/github.com/iancoleman/strcase/README.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# strcase
-[](http://godoc.org/github.com/iancoleman/strcase)
-[](https://travis-ci.org/iancoleman/strcase)
-[](http://gocover.io/github.com/iancoleman/strcase)
-[](https://goreportcard.com/report/github.com/iancoleman/strcase)
-
-strcase is a go package for converting string case to various cases (e.g. [snake case](https://en.wikipedia.org/wiki/Snake_case) or [camel case](https://en.wikipedia.org/wiki/CamelCase)) to see the full conversion table below.
-
-## Example
-
-```go
-s := "AnyKind of_string"
-```
-
-| Function | Result |
-|-------------------------------------------|----------------------|
-| `ToSnake(s)` | `any_kind_of_string` |
-| `ToSnakeWithIgnore(s, '.')` | `any_kind.of_string` |
-| `ToScreamingSnake(s)` | `ANY_KIND_OF_STRING` |
-| `ToKebab(s)` | `any-kind-of-string` |
-| `ToScreamingKebab(s)` | `ANY-KIND-OF-STRING` |
-| `ToDelimited(s, '.')` | `any.kind.of.string` |
-| `ToScreamingDelimited(s, '.', '', true)` | `ANY.KIND.OF.STRING` |
-| `ToScreamingDelimited(s, '.', ' ', true)` | `ANY.KIND OF.STRING` |
-| `ToCamel(s)` | `AnyKindOfString` |
-| `ToLowerCamel(s)` | `anyKindOfString` |
-
-
-## Install
-
-```bash
-go get -u github.com/iancoleman/strcase
-```
diff --git a/vendor/github.com/iancoleman/strcase/acronyms.go b/vendor/github.com/iancoleman/strcase/acronyms.go
deleted file mode 100644
index 3b0606490..000000000
--- a/vendor/github.com/iancoleman/strcase/acronyms.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package strcase
-
-var uppercaseAcronym = map[string]bool{
- "ID": true,
-}
diff --git a/vendor/github.com/iancoleman/strcase/camel.go b/vendor/github.com/iancoleman/strcase/camel.go
deleted file mode 100644
index 4aab39a17..000000000
--- a/vendor/github.com/iancoleman/strcase/camel.go
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2015 Ian Coleman
- * Copyright (c) 2018 Ma_124,
- *
- * 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.
- */
-
-package strcase
-
-import (
- "strings"
-)
-
-// Converts a string to CamelCase
-func toCamelInitCase(s string, initCase bool) string {
- s = addWordBoundariesToNumbers(s)
- s = strings.Trim(s, " ")
- n := ""
- capNext := initCase
- for _, v := range s {
- if v >= 'A' && v <= 'Z' {
- n += string(v)
- }
- if v >= '0' && v <= '9' {
- n += string(v)
- }
- if v >= 'a' && v <= 'z' {
- if capNext {
- n += strings.ToUpper(string(v))
- } else {
- n += string(v)
- }
- }
- if v == '_' || v == ' ' || v == '-' || v == '.' {
- capNext = true
- } else {
- capNext = false
- }
- }
- return n
-}
-
-// ToCamel converts a string to CamelCase
-func ToCamel(s string) string {
- if uppercaseAcronym[s] {
- s = strings.ToLower(s)
- }
- return toCamelInitCase(s, true)
-}
-
-// ToLowerCamel converts a string to lowerCamelCase
-func ToLowerCamel(s string) string {
- if s == "" {
- return s
- }
- if uppercaseAcronym[s] {
- s = strings.ToLower(s)
- }
- if r := rune(s[0]); r >= 'A' && r <= 'Z' {
- s = strings.ToLower(string(r)) + s[1:]
- }
- return toCamelInitCase(s, false)
-}
diff --git a/vendor/github.com/iancoleman/strcase/doc.go b/vendor/github.com/iancoleman/strcase/doc.go
deleted file mode 100644
index 5e1825b9e..000000000
--- a/vendor/github.com/iancoleman/strcase/doc.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Package strcase converts strings to various cases. See the conversion table below:
-// | Function | Result |
-// |---------------------------------|--------------------|
-// | ToSnake(s) | any_kind_of_string |
-// | ToScreamingSnake(s) | ANY_KIND_OF_STRING |
-// | ToKebab(s) | any-kind-of-string |
-// | ToScreamingKebab(s) | ANY-KIND-OF-STRING |
-// | ToDelimited(s, '.') | any.kind.of.string |
-// | ToScreamingDelimited(s, '.') | ANY.KIND.OF.STRING |
-// | ToCamel(s) | AnyKindOfString |
-// | ToLowerCamel(s) | anyKindOfString |
-package strcase
diff --git a/vendor/github.com/iancoleman/strcase/numbers.go b/vendor/github.com/iancoleman/strcase/numbers.go
deleted file mode 100644
index fdf07cb06..000000000
--- a/vendor/github.com/iancoleman/strcase/numbers.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2015 Ian Coleman
- *
- * 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.
- */
-
-package strcase
-
-import (
- "regexp"
-)
-
-var numberSequence = regexp.MustCompile(`([a-zA-Z])(\d+)([a-zA-Z]?)`)
-var numberReplacement = []byte(`$1 $2 $3`)
-
-func addWordBoundariesToNumbers(s string) string {
- b := []byte(s)
- b = numberSequence.ReplaceAll(b, numberReplacement)
- return string(b)
-}
diff --git a/vendor/github.com/iancoleman/strcase/snake.go b/vendor/github.com/iancoleman/strcase/snake.go
deleted file mode 100644
index 8e8867bc0..000000000
--- a/vendor/github.com/iancoleman/strcase/snake.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2015 Ian Coleman
- * Copyright (c) 2018 Ma_124,
- *
- * 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.
- */
-
-package strcase
-
-import (
- "strings"
-)
-
-// ToSnake converts a string to snake_case
-func ToSnake(s string) string {
-
- return ToDelimited(s, '_')
-}
-func ToSnakeWithIgnore(s string, ignore uint8) string {
-
- return ToScreamingDelimited(s, '_', ignore, false)
-}
-
-// ToScreamingSnake converts a string to SCREAMING_SNAKE_CASE
-func ToScreamingSnake(s string) string {
- return ToScreamingDelimited(s, '_', 0, true)
-}
-
-// ToKebab converts a string to kebab-case
-func ToKebab(s string) string {
- return ToDelimited(s, '-')
-}
-
-// ToScreamingKebab converts a string to SCREAMING-KEBAB-CASE
-func ToScreamingKebab(s string) string {
- return ToScreamingDelimited(s, '-', 0, true)
-}
-
-// ToDelimited converts a string to delimited.snake.case
-// (in this case `delimiter = '.'`)
-func ToDelimited(s string, delimiter uint8) string {
- return ToScreamingDelimited(s, delimiter, 0, false)
-}
-
-// ToScreamingDelimited converts a string to SCREAMING.DELIMITED.SNAKE.CASE
-// (in this case `delimiter = '.'; screaming = true`)
-// or delimited.snake.case
-// (in this case `delimiter = '.'; screaming = false`)
-func ToScreamingDelimited(s string, delimiter uint8, ignore uint8, screaming bool) string {
- s = addWordBoundariesToNumbers(s)
- s = strings.Trim(s, " ")
- n := ""
- for i, v := range s {
- // treat acronyms as words, eg for JSONData -> JSON is a whole word
- nextCaseIsChanged := false
- if i+1 < len(s) {
- next := s[i+1]
- vIsCap := v >= 'A' && v <= 'Z'
- vIsLow := v >= 'a' && v <= 'z'
- nextIsCap := next >= 'A' && next <= 'Z'
- nextIsLow := next >= 'a' && next <= 'z'
- if (vIsCap && nextIsLow) || (vIsLow && nextIsCap) {
- nextCaseIsChanged = true
- }
- if ignore > 0 && i-1 >= 0 && s[i-1] == ignore && nextCaseIsChanged {
- nextCaseIsChanged = false
- }
- }
-
- if i > 0 && n[len(n)-1] != delimiter && nextCaseIsChanged {
- // add underscore if next letter case type is changed
- if v >= 'A' && v <= 'Z' {
- n += string(delimiter) + string(v)
- } else if v >= 'a' && v <= 'z' {
- n += string(v) + string(delimiter)
- }
- } else if v == ' ' || v == '_' || v == '-' {
- // replace spaces/underscores with delimiters
- if uint8(v) == ignore {
- n += string(v)
- } else {
- n += string(delimiter)
- }
- } else {
- n = n + string(v)
- }
- }
-
- if screaming {
- n = strings.ToUpper(n)
- } else {
- n = strings.ToLower(n)
- }
- return n
-}
diff --git a/vendor/github.com/imdario/mergo/.deepsource.toml b/vendor/github.com/imdario/mergo/.deepsource.toml
deleted file mode 100644
index 8a0681af8..000000000
--- a/vendor/github.com/imdario/mergo/.deepsource.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-version = 1
-
-test_patterns = [
- "*_test.go"
-]
-
-[[analyzers]]
-name = "go"
-enabled = true
-
- [analyzers.meta]
- import_path = "github.com/imdario/mergo"
\ No newline at end of file
diff --git a/vendor/github.com/imdario/mergo/.gitignore b/vendor/github.com/imdario/mergo/.gitignore
deleted file mode 100644
index 529c3412b..000000000
--- a/vendor/github.com/imdario/mergo/.gitignore
+++ /dev/null
@@ -1,33 +0,0 @@
-#### joe made this: http://goel.io/joe
-
-#### go ####
-# 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
-
-# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
-.glide/
-
-#### vim ####
-# Swap
-[._]*.s[a-v][a-z]
-[._]*.sw[a-p]
-[._]s[a-v][a-z]
-[._]sw[a-p]
-
-# Session
-Session.vim
-
-# Temporary
-.netrwhist
-*~
-# Auto-generated tag files
-tags
diff --git a/vendor/github.com/imdario/mergo/.travis.yml b/vendor/github.com/imdario/mergo/.travis.yml
deleted file mode 100644
index dad29725f..000000000
--- a/vendor/github.com/imdario/mergo/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: go
-install:
- - go get -t
- - go get golang.org/x/tools/cmd/cover
- - go get github.com/mattn/goveralls
-script:
- - go test -race -v ./...
-after_script:
- - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN
diff --git a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md b/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md
deleted file mode 100644
index 469b44907..000000000
--- a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/imdario/mergo/LICENSE b/vendor/github.com/imdario/mergo/LICENSE
deleted file mode 100644
index 686680298..000000000
--- a/vendor/github.com/imdario/mergo/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2013 Dario Castañé. All rights reserved.
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md
deleted file mode 100644
index 02fc81e06..000000000
--- a/vendor/github.com/imdario/mergo/README.md
+++ /dev/null
@@ -1,238 +0,0 @@
-# Mergo
-
-A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements.
-
-Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche.
-
-## Status
-
-It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc](https://github.com/imdario/mergo#mergo-in-the-wild).
-
-[![GoDoc][3]][4]
-[![GoCard][5]][6]
-[![Build Status][1]][2]
-[![Coverage Status][7]][8]
-[![Sourcegraph][9]][10]
-[](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_shield)
-
-[1]: https://travis-ci.org/imdario/mergo.png
-[2]: https://travis-ci.org/imdario/mergo
-[3]: https://godoc.org/github.com/imdario/mergo?status.svg
-[4]: https://godoc.org/github.com/imdario/mergo
-[5]: https://goreportcard.com/badge/imdario/mergo
-[6]: https://goreportcard.com/report/github.com/imdario/mergo
-[7]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master
-[8]: https://coveralls.io/github/imdario/mergo?branch=master
-[9]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg
-[10]: https://sourcegraph.com/github.com/imdario/mergo?badge
-
-### Latest release
-
-[Release v0.3.7](https://github.com/imdario/mergo/releases/tag/v0.3.7).
-
-### Important note
-
-Please keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2) Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). An optional/variadic argument has been added, so it won't break existing code.
-
-If you were using Mergo **before** April 6th 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause (I hope it won't!) in existing projects after the change (release 0.2.0).
-
-### Donations
-
-If Mergo is useful to you, consider buying me a coffee, a beer or making a monthly donation so I can keep building great free software. :heart_eyes:
-
-
-[](https://beerpay.io/imdario/mergo)
-[](https://beerpay.io/imdario/mergo)
-
-
-### Mergo in the wild
-
-- [moby/moby](https://github.com/moby/moby)
-- [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes)
-- [vmware/dispatch](https://github.com/vmware/dispatch)
-- [Shopify/themekit](https://github.com/Shopify/themekit)
-- [imdario/zas](https://github.com/imdario/zas)
-- [matcornic/hermes](https://github.com/matcornic/hermes)
-- [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go)
-- [kataras/iris](https://github.com/kataras/iris)
-- [michaelsauter/crane](https://github.com/michaelsauter/crane)
-- [go-task/task](https://github.com/go-task/task)
-- [sensu/uchiwa](https://github.com/sensu/uchiwa)
-- [ory/hydra](https://github.com/ory/hydra)
-- [sisatech/vcli](https://github.com/sisatech/vcli)
-- [dairycart/dairycart](https://github.com/dairycart/dairycart)
-- [projectcalico/felix](https://github.com/projectcalico/felix)
-- [resin-os/balena](https://github.com/resin-os/balena)
-- [go-kivik/kivik](https://github.com/go-kivik/kivik)
-- [Telefonica/govice](https://github.com/Telefonica/govice)
-- [supergiant/supergiant](supergiant/supergiant)
-- [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce)
-- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy)
-- [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel)
-- [EagerIO/Stout](https://github.com/EagerIO/Stout)
-- [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api)
-- [russross/canvasassignments](https://github.com/russross/canvasassignments)
-- [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api)
-- [casualjim/exeggutor](https://github.com/casualjim/exeggutor)
-- [divshot/gitling](https://github.com/divshot/gitling)
-- [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl)
-- [andrerocker/deploy42](https://github.com/andrerocker/deploy42)
-- [elwinar/rambler](https://github.com/elwinar/rambler)
-- [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman)
-- [jfbus/impressionist](https://github.com/jfbus/impressionist)
-- [Jmeyering/zealot](https://github.com/Jmeyering/zealot)
-- [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host)
-- [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go)
-- [thoas/picfit](https://github.com/thoas/picfit)
-- [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server)
-- [jnuthong/item_search](https://github.com/jnuthong/item_search)
-- [bukalapak/snowboard](https://github.com/bukalapak/snowboard)
-
-## Installation
-
- go get github.com/imdario/mergo
-
- // use in your .go code
- import (
- "github.com/imdario/mergo"
- )
-
-## Usage
-
-You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are not considered zero values](https://golang.org/ref/spec#The_zero_value) either. Also maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection).
-
-```go
-if err := mergo.Merge(&dst, src); err != nil {
- // ...
-}
-```
-
-Also, you can merge overwriting values using the transformer `WithOverride`.
-
-```go
-if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil {
- // ...
-}
-```
-
-Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field.
-
-```go
-if err := mergo.Map(&dst, srcMap); err != nil {
- // ...
-}
-```
-
-Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values.
-
-More information and examples in [godoc documentation](http://godoc.org/github.com/imdario/mergo).
-
-### Nice example
-
-```go
-package main
-
-import (
- "fmt"
- "github.com/imdario/mergo"
-)
-
-type Foo struct {
- A string
- B int64
-}
-
-func main() {
- src := Foo{
- A: "one",
- B: 2,
- }
- dest := Foo{
- A: "two",
- }
- mergo.Merge(&dest, src)
- fmt.Println(dest)
- // Will print
- // {two 2}
-}
-```
-
-Note: if test are failing due missing package, please execute:
-
- go get gopkg.in/yaml.v2
-
-### Transformers
-
-Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`?
-
-```go
-package main
-
-import (
- "fmt"
- "github.com/imdario/mergo"
- "reflect"
- "time"
-)
-
-type timeTransfomer struct {
-}
-
-func (t timeTransfomer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error {
- if typ == reflect.TypeOf(time.Time{}) {
- return func(dst, src reflect.Value) error {
- if dst.CanSet() {
- isZero := dst.MethodByName("IsZero")
- result := isZero.Call([]reflect.Value{})
- if result[0].Bool() {
- dst.Set(src)
- }
- }
- return nil
- }
- }
- return nil
-}
-
-type Snapshot struct {
- Time time.Time
- // ...
-}
-
-func main() {
- src := Snapshot{time.Now()}
- dest := Snapshot{}
- mergo.Merge(&dest, src, mergo.WithTransformers(timeTransfomer{}))
- fmt.Println(dest)
- // Will print
- // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 }
-}
-```
-
-
-## Contact me
-
-If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario)
-
-## About
-
-Written by [Dario Castañé](http://dario.im).
-
-## Top Contributors
-
-[](https://sourcerer.io/fame/imdario/imdario/mergo/links/0)
-[](https://sourcerer.io/fame/imdario/imdario/mergo/links/1)
-[](https://sourcerer.io/fame/imdario/imdario/mergo/links/2)
-[](https://sourcerer.io/fame/imdario/imdario/mergo/links/3)
-[](https://sourcerer.io/fame/imdario/imdario/mergo/links/4)
-[](https://sourcerer.io/fame/imdario/imdario/mergo/links/5)
-[](https://sourcerer.io/fame/imdario/imdario/mergo/links/6)
-[](https://sourcerer.io/fame/imdario/imdario/mergo/links/7)
-
-
-## License
-
-[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE).
-
-
-[](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_large)
diff --git a/vendor/github.com/imdario/mergo/doc.go b/vendor/github.com/imdario/mergo/doc.go
deleted file mode 100644
index 6e9aa7baf..000000000
--- a/vendor/github.com/imdario/mergo/doc.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2013 Dario Castañé. All rights reserved.
-// 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.
-
-/*
-Package mergo merges same-type structs and maps by setting default values in zero-value fields.
-
-Mergo won't merge unexported (private) fields but will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection).
-
-Usage
-
-From my own work-in-progress project:
-
- type networkConfig struct {
- Protocol string
- Address string
- ServerType string `json: "server_type"`
- Port uint16
- }
-
- type FssnConfig struct {
- Network networkConfig
- }
-
- var fssnDefault = FssnConfig {
- networkConfig {
- "tcp",
- "127.0.0.1",
- "http",
- 31560,
- },
- }
-
- // Inside a function [...]
-
- if err := mergo.Merge(&config, fssnDefault); err != nil {
- log.Fatal(err)
- }
-
- // More code [...]
-
-*/
-package mergo
diff --git a/vendor/github.com/imdario/mergo/map.go b/vendor/github.com/imdario/mergo/map.go
deleted file mode 100644
index d83258b4d..000000000
--- a/vendor/github.com/imdario/mergo/map.go
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright 2014 Dario Castañé. All rights reserved.
-// 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.
-
-// Based on src/pkg/reflect/deepequal.go from official
-// golang's stdlib.
-
-package mergo
-
-import (
- "fmt"
- "reflect"
- "unicode"
- "unicode/utf8"
-)
-
-func changeInitialCase(s string, mapper func(rune) rune) string {
- if s == "" {
- return s
- }
- r, n := utf8.DecodeRuneInString(s)
- return string(mapper(r)) + s[n:]
-}
-
-func isExported(field reflect.StructField) bool {
- r, _ := utf8.DecodeRuneInString(field.Name)
- return r >= 'A' && r <= 'Z'
-}
-
-// Traverses recursively both values, assigning src's fields values to dst.
-// The map argument tracks comparisons that have already been seen, which allows
-// short circuiting on recursive types.
-func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) {
- overwrite := config.Overwrite
- if dst.CanAddr() {
- addr := dst.UnsafeAddr()
- h := 17 * addr
- seen := visited[h]
- typ := dst.Type()
- for p := seen; p != nil; p = p.next {
- if p.ptr == addr && p.typ == typ {
- return nil
- }
- }
- // Remember, remember...
- visited[h] = &visit{addr, typ, seen}
- }
- zeroValue := reflect.Value{}
- switch dst.Kind() {
- case reflect.Map:
- dstMap := dst.Interface().(map[string]interface{})
- for i, n := 0, src.NumField(); i < n; i++ {
- srcType := src.Type()
- field := srcType.Field(i)
- if !isExported(field) {
- continue
- }
- fieldName := field.Name
- fieldName = changeInitialCase(fieldName, unicode.ToLower)
- if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v)) || overwrite) {
- dstMap[fieldName] = src.Field(i).Interface()
- }
- }
- case reflect.Ptr:
- if dst.IsNil() {
- v := reflect.New(dst.Type().Elem())
- dst.Set(v)
- }
- dst = dst.Elem()
- fallthrough
- case reflect.Struct:
- srcMap := src.Interface().(map[string]interface{})
- for key := range srcMap {
- config.overwriteWithEmptyValue = true
- srcValue := srcMap[key]
- fieldName := changeInitialCase(key, unicode.ToUpper)
- dstElement := dst.FieldByName(fieldName)
- if dstElement == zeroValue {
- // We discard it because the field doesn't exist.
- continue
- }
- srcElement := reflect.ValueOf(srcValue)
- dstKind := dstElement.Kind()
- srcKind := srcElement.Kind()
- if srcKind == reflect.Ptr && dstKind != reflect.Ptr {
- srcElement = srcElement.Elem()
- srcKind = reflect.TypeOf(srcElement.Interface()).Kind()
- } else if dstKind == reflect.Ptr {
- // Can this work? I guess it can't.
- if srcKind != reflect.Ptr && srcElement.CanAddr() {
- srcPtr := srcElement.Addr()
- srcElement = reflect.ValueOf(srcPtr)
- srcKind = reflect.Ptr
- }
- }
-
- if !srcElement.IsValid() {
- continue
- }
- if srcKind == dstKind {
- if _, err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {
- return
- }
- } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface {
- if _, err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {
- return
- }
- } else if srcKind == reflect.Map {
- if err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil {
- return
- }
- } else {
- return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind)
- }
- }
- }
- return
-}
-
-// Map sets fields' values in dst from src.
-// src can be a map with string keys or a struct. dst must be the opposite:
-// if src is a map, dst must be a valid pointer to struct. If src is a struct,
-// dst must be map[string]interface{}.
-// It won't merge unexported (private) fields and will do recursively
-// any exported field.
-// If dst is a map, keys will be src fields' names in lower camel case.
-// Missing key in src that doesn't match a field in dst will be skipped. This
-// doesn't apply if dst is a map.
-// This is separated method from Merge because it is cleaner and it keeps sane
-// semantics: merging equal types, mapping different (restricted) types.
-func Map(dst, src interface{}, opts ...func(*Config)) error {
- return _map(dst, src, opts...)
-}
-
-// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by
-// non-empty src attribute values.
-// Deprecated: Use Map(…) with WithOverride
-func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error {
- return _map(dst, src, append(opts, WithOverride)...)
-}
-
-func _map(dst, src interface{}, opts ...func(*Config)) error {
- var (
- vDst, vSrc reflect.Value
- err error
- )
- config := &Config{}
-
- for _, opt := range opts {
- opt(config)
- }
-
- if vDst, vSrc, err = resolveValues(dst, src); err != nil {
- return err
- }
- // To be friction-less, we redirect equal-type arguments
- // to deepMerge. Only because arguments can be anything.
- if vSrc.Kind() == vDst.Kind() {
- _, err := deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config)
- return err
- }
- switch vSrc.Kind() {
- case reflect.Struct:
- if vDst.Kind() != reflect.Map {
- return ErrExpectedMapAsDestination
- }
- case reflect.Map:
- if vDst.Kind() != reflect.Struct {
- return ErrExpectedStructAsDestination
- }
- default:
- return ErrNotSupported
- }
- return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config)
-}
diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go
deleted file mode 100644
index 3332c9c2a..000000000
--- a/vendor/github.com/imdario/mergo/merge.go
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright 2013 Dario Castañé. All rights reserved.
-// 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.
-
-// Based on src/pkg/reflect/deepequal.go from official
-// golang's stdlib.
-
-package mergo
-
-import (
- "fmt"
- "reflect"
- "unsafe"
-)
-
-func hasExportedField(dst reflect.Value) (exported bool) {
- for i, n := 0, dst.NumField(); i < n; i++ {
- field := dst.Type().Field(i)
- if isExportedComponent(&field) {
- return true
- }
- }
- return
-}
-
-func isExportedComponent(field *reflect.StructField) bool {
- name := field.Name
- pkgPath := field.PkgPath
- if len(pkgPath) > 0 {
- return false
- }
- c := name[0]
- if 'a' <= c && c <= 'z' || c == '_' {
- return false
- }
- return true
-}
-
-type Config struct {
- Overwrite bool
- AppendSlice bool
- TypeCheck bool
- Transformers Transformers
- overwriteWithEmptyValue bool
- overwriteSliceWithEmptyValue bool
-}
-
-type Transformers interface {
- Transformer(reflect.Type) func(dst, src reflect.Value) error
-}
-
-// Traverses recursively both values, assigning src's fields values to dst.
-// The map argument tracks comparisons that have already been seen, which allows
-// short circuiting on recursive types.
-func deepMerge(dstIn, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (dst reflect.Value, err error) {
- dst = dstIn
- overwrite := config.Overwrite
- typeCheck := config.TypeCheck
- overwriteWithEmptySrc := config.overwriteWithEmptyValue
- overwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue
-
- if !src.IsValid() {
- return
- }
-
- if dst.CanAddr() {
- addr := dst.UnsafeAddr()
- h := 17 * addr
- seen := visited[h]
- typ := dst.Type()
- for p := seen; p != nil; p = p.next {
- if p.ptr == addr && p.typ == typ {
- return dst, nil
- }
- }
- // Remember, remember...
- visited[h] = &visit{addr, typ, seen}
- }
-
- if config.Transformers != nil && !isEmptyValue(dst) {
- if fn := config.Transformers.Transformer(dst.Type()); fn != nil {
- err = fn(dst, src)
- return
- }
- }
-
- if dst.IsValid() && src.IsValid() && src.Type() != dst.Type() {
- err = fmt.Errorf("cannot append two different types (%s, %s)", src.Kind(), dst.Kind())
- return
- }
-
- switch dst.Kind() {
- case reflect.Struct:
- if hasExportedField(dst) {
- dstCp := reflect.New(dst.Type()).Elem()
- for i, n := 0, dst.NumField(); i < n; i++ {
- dstField := dst.Field(i)
- structField := dst.Type().Field(i)
- // copy un-exported struct fields
- if !isExportedComponent(&structField) {
- rf := dstCp.Field(i)
- rf = reflect.NewAt(rf.Type(), unsafe.Pointer(rf.UnsafeAddr())).Elem() //nolint:gosec
- dstRF := dst.Field(i)
- if !dst.Field(i).CanAddr() {
- continue
- }
-
- dstRF = reflect.NewAt(dstRF.Type(), unsafe.Pointer(dstRF.UnsafeAddr())).Elem() //nolint:gosec
- rf.Set(dstRF)
- continue
- }
- dstField, err = deepMerge(dstField, src.Field(i), visited, depth+1, config)
- if err != nil {
- return
- }
- dstCp.Field(i).Set(dstField)
- }
-
- if dst.CanSet() {
- dst.Set(dstCp)
- } else {
- dst = dstCp
- }
- return
- } else {
- if (isReflectNil(dst) || overwrite) && (!isEmptyValue(src) || overwriteWithEmptySrc) {
- dst = src
- }
- }
-
- case reflect.Map:
- if dst.IsNil() && !src.IsNil() {
- if dst.CanSet() {
- dst.Set(reflect.MakeMap(dst.Type()))
- } else {
- dst = src
- return
- }
- }
- for _, key := range src.MapKeys() {
- srcElement := src.MapIndex(key)
- dstElement := dst.MapIndex(key)
- if !srcElement.IsValid() {
- continue
- }
- if dst.MapIndex(key).IsValid() {
- k := dstElement.Interface()
- dstElement = reflect.ValueOf(k)
- }
- if isReflectNil(srcElement) {
- if overwrite || isReflectNil(dstElement) {
- dst.SetMapIndex(key, srcElement)
- }
- continue
- }
- if !srcElement.CanInterface() {
- continue
- }
-
- if srcElement.CanInterface() {
- srcElement = reflect.ValueOf(srcElement.Interface())
- if dstElement.IsValid() {
- dstElement = reflect.ValueOf(dstElement.Interface())
- }
- }
- dstElement, err = deepMerge(dstElement, srcElement, visited, depth+1, config)
- if err != nil {
- return
- }
- dst.SetMapIndex(key, dstElement)
-
- }
- case reflect.Slice:
- newSlice := dst
- if (!isEmptyValue(src) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice {
- if typeCheck && src.Type() != dst.Type() {
- return dst, fmt.Errorf("cannot override two slices with different type (%s, %s)", src.Type(), dst.Type())
- }
- newSlice = src
- } else if config.AppendSlice {
- if typeCheck && src.Type() != dst.Type() {
- err = fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type())
- return
- }
- newSlice = reflect.AppendSlice(dst, src)
- }
- if dst.CanSet() {
- dst.Set(newSlice)
- } else {
- dst = newSlice
- }
- case reflect.Ptr, reflect.Interface:
- if isReflectNil(src) {
- break
- }
-
- if dst.Kind() != reflect.Ptr && src.Type().AssignableTo(dst.Type()) {
- if dst.IsNil() || overwrite {
- if overwrite || isEmptyValue(dst) {
- if dst.CanSet() {
- dst.Set(src)
- } else {
- dst = src
- }
- }
- }
- break
- }
-
- if src.Kind() != reflect.Interface {
- if dst.IsNil() || (src.Kind() != reflect.Ptr && overwrite) {
- if dst.CanSet() && (overwrite || isEmptyValue(dst)) {
- dst.Set(src)
- }
- } else if src.Kind() == reflect.Ptr {
- if dst, err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {
- return
- }
- dst = dst.Addr()
- } else if dst.Elem().Type() == src.Type() {
- if dst, err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil {
- return
- }
- } else {
- return dst, ErrDifferentArgumentsTypes
- }
- break
- }
- if dst.IsNil() || overwrite {
- if (overwrite || isEmptyValue(dst)) && (overwriteWithEmptySrc || !isEmptyValue(src)) {
- if dst.CanSet() {
- dst.Set(src)
- } else {
- dst = src
- }
- }
- } else if _, err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {
- return
- }
- default:
- overwriteFull := (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst))
- if overwriteFull {
- if dst.CanSet() {
- dst.Set(src)
- } else {
- dst = src
- }
- }
- }
-
- return
-}
-
-// Merge will fill any empty for value type attributes on the dst struct using corresponding
-// src attributes if they themselves are not empty. dst and src must be valid same-type structs
-// and dst must be a pointer to struct.
-// It won't merge unexported (private) fields and will do recursively any exported field.
-func Merge(dst, src interface{}, opts ...func(*Config)) error {
- return merge(dst, src, opts...)
-}
-
-// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overridden by
-// non-empty src attribute values.
-// Deprecated: use Merge(…) with WithOverride
-func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error {
- return merge(dst, src, append(opts, WithOverride)...)
-}
-
-// WithTransformers adds transformers to merge, allowing to customize the merging of some types.
-func WithTransformers(transformers Transformers) func(*Config) {
- return func(config *Config) {
- config.Transformers = transformers
- }
-}
-
-// WithOverride will make merge override non-empty dst attributes with non-empty src attributes values.
-func WithOverride(config *Config) {
- config.Overwrite = true
-}
-
-// WithOverwriteWithEmptyValue will make merge override non empty dst attributes with empty src attributes values.
-func WithOverwriteWithEmptyValue(config *Config) {
- config.overwriteWithEmptyValue = true
-}
-
-// WithOverrideEmptySlice will make merge override empty dst slice with empty src slice.
-func WithOverrideEmptySlice(config *Config) {
- config.overwriteSliceWithEmptyValue = true
-}
-
-// WithAppendSlice will make merge append slices instead of overwriting it.
-func WithAppendSlice(config *Config) {
- config.AppendSlice = true
-}
-
-// WithTypeCheck will make merge check types while overwriting it (must be used with WithOverride).
-func WithTypeCheck(config *Config) {
- config.TypeCheck = true
-}
-
-func merge(dst, src interface{}, opts ...func(*Config)) error {
- var (
- vDst, vSrc reflect.Value
- err error
- )
-
- config := &Config{}
-
- for _, opt := range opts {
- opt(config)
- }
-
- if vDst, vSrc, err = resolveValues(dst, src); err != nil {
- return err
- }
- if !vDst.CanSet() {
- return fmt.Errorf("cannot set dst, needs reference")
- }
- if vDst.Type() != vSrc.Type() {
- return ErrDifferentArgumentsTypes
- }
- _, err = deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config)
- return err
-}
-
-// IsReflectNil is the reflect value provided nil
-func isReflectNil(v reflect.Value) bool {
- k := v.Kind()
- switch k {
- case reflect.Interface, reflect.Slice, reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr:
- // Both interface and slice are nil if first word is 0.
- // Both are always bigger than a word; assume flagIndir.
- return v.IsNil()
- default:
- return false
- }
-}
diff --git a/vendor/github.com/imdario/mergo/mergo.go b/vendor/github.com/imdario/mergo/mergo.go
deleted file mode 100644
index a82fea2fd..000000000
--- a/vendor/github.com/imdario/mergo/mergo.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2013 Dario Castañé. All rights reserved.
-// 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.
-
-// Based on src/pkg/reflect/deepequal.go from official
-// golang's stdlib.
-
-package mergo
-
-import (
- "errors"
- "reflect"
-)
-
-// Errors reported by Mergo when it finds invalid arguments.
-var (
- ErrNilArguments = errors.New("src and dst must not be nil")
- ErrDifferentArgumentsTypes = errors.New("src and dst must be of same type")
- ErrNotSupported = errors.New("only structs and maps are supported")
- ErrExpectedMapAsDestination = errors.New("dst was expected to be a map")
- ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct")
-)
-
-// During deepMerge, must keep track of checks that are
-// in progress. The comparison algorithm assumes that all
-// checks in progress are true when it reencounters them.
-// Visited are stored in a map indexed by 17 * a1 + a2;
-type visit struct {
- ptr uintptr
- typ reflect.Type
- next *visit
-}
-
-// From src/pkg/encoding/json/encode.go.
-func isEmptyValue(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
- return v.Len() == 0
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.Interface, reflect.Ptr:
- if v.IsNil() {
- return true
- }
- return isEmptyValue(v.Elem())
- case reflect.Func:
- return v.IsNil()
- case reflect.Invalid:
- return true
- }
- return false
-}
-
-func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) {
- if dst == nil || src == nil {
- err = ErrNilArguments
- return
- }
- vDst = reflect.ValueOf(dst).Elem()
- if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map {
- err = ErrNotSupported
- return
- }
- vSrc = reflect.ValueOf(src)
- // We check if vSrc is a pointer to dereference it.
- if vSrc.Kind() == reflect.Ptr {
- vSrc = vSrc.Elem()
- }
- return
-}
-
-// Traverses recursively both values, assigning src's fields values to dst.
-// The map argument tracks comparisons that have already been seen, which allows
-// short circuiting on recursive types.
-func deeper(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) {
- if dst.CanAddr() {
- addr := dst.UnsafeAddr()
- h := 17 * addr
- seen := visited[h]
- typ := dst.Type()
- for p := seen; p != nil; p = p.next {
- if p.ptr == addr && p.typ == typ {
- return nil
- }
- }
- // Remember, remember...
- visited[h] = &visit{addr, typ, seen}
- }
- return // TODO refactor
-}
diff --git a/vendor/github.com/inconshreveable/mousetrap/LICENSE b/vendor/github.com/inconshreveable/mousetrap/LICENSE
deleted file mode 100644
index 5f0d1fb6a..000000000
--- a/vendor/github.com/inconshreveable/mousetrap/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright 2014 Alan Shreve
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/vendor/github.com/inconshreveable/mousetrap/README.md b/vendor/github.com/inconshreveable/mousetrap/README.md
deleted file mode 100644
index 7a950d177..000000000
--- a/vendor/github.com/inconshreveable/mousetrap/README.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# mousetrap
-
-mousetrap is a tiny library that answers a single question.
-
-On a Windows machine, was the process invoked by someone double clicking on
-the executable file while browsing in explorer?
-
-### Motivation
-
-Windows developers unfamiliar with command line tools will often "double-click"
-the executable for a tool. Because most CLI tools print the help and then exit
-when invoked without arguments, this is often very frustrating for those users.
-
-mousetrap provides a way to detect these invocations so that you can provide
-more helpful behavior and instructions on how to run the CLI tool. To see what
-this looks like, both from an organizational and a technical perspective, see
-https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/
-
-### The interface
-
-The library exposes a single interface:
-
- func StartedByExplorer() (bool)
diff --git a/vendor/github.com/inconshreveable/mousetrap/trap_others.go b/vendor/github.com/inconshreveable/mousetrap/trap_others.go
deleted file mode 100644
index 9d2d8a4ba..000000000
--- a/vendor/github.com/inconshreveable/mousetrap/trap_others.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// +build !windows
-
-package mousetrap
-
-// StartedByExplorer returns true if the program was invoked by the user
-// double-clicking on the executable from explorer.exe
-//
-// It is conservative and returns false if any of the internal calls fail.
-// It does not guarantee that the program was run from a terminal. It only can tell you
-// whether it was launched from explorer.exe
-//
-// On non-Windows platforms, it always returns false.
-func StartedByExplorer() bool {
- return false
-}
diff --git a/vendor/github.com/inconshreveable/mousetrap/trap_windows.go b/vendor/github.com/inconshreveable/mousetrap/trap_windows.go
deleted file mode 100644
index 336142a5e..000000000
--- a/vendor/github.com/inconshreveable/mousetrap/trap_windows.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// +build windows
-// +build !go1.4
-
-package mousetrap
-
-import (
- "fmt"
- "os"
- "syscall"
- "unsafe"
-)
-
-const (
- // defined by the Win32 API
- th32cs_snapprocess uintptr = 0x2
-)
-
-var (
- kernel = syscall.MustLoadDLL("kernel32.dll")
- CreateToolhelp32Snapshot = kernel.MustFindProc("CreateToolhelp32Snapshot")
- Process32First = kernel.MustFindProc("Process32FirstW")
- Process32Next = kernel.MustFindProc("Process32NextW")
-)
-
-// ProcessEntry32 structure defined by the Win32 API
-type processEntry32 struct {
- dwSize uint32
- cntUsage uint32
- th32ProcessID uint32
- th32DefaultHeapID int
- th32ModuleID uint32
- cntThreads uint32
- th32ParentProcessID uint32
- pcPriClassBase int32
- dwFlags uint32
- szExeFile [syscall.MAX_PATH]uint16
-}
-
-func getProcessEntry(pid int) (pe *processEntry32, err error) {
- snapshot, _, e1 := CreateToolhelp32Snapshot.Call(th32cs_snapprocess, uintptr(0))
- if snapshot == uintptr(syscall.InvalidHandle) {
- err = fmt.Errorf("CreateToolhelp32Snapshot: %v", e1)
- return
- }
- defer syscall.CloseHandle(syscall.Handle(snapshot))
-
- var processEntry processEntry32
- processEntry.dwSize = uint32(unsafe.Sizeof(processEntry))
- ok, _, e1 := Process32First.Call(snapshot, uintptr(unsafe.Pointer(&processEntry)))
- if ok == 0 {
- err = fmt.Errorf("Process32First: %v", e1)
- return
- }
-
- for {
- if processEntry.th32ProcessID == uint32(pid) {
- pe = &processEntry
- return
- }
-
- ok, _, e1 = Process32Next.Call(snapshot, uintptr(unsafe.Pointer(&processEntry)))
- if ok == 0 {
- err = fmt.Errorf("Process32Next: %v", e1)
- return
- }
- }
-}
-
-func getppid() (pid int, err error) {
- pe, err := getProcessEntry(os.Getpid())
- if err != nil {
- return
- }
-
- pid = int(pe.th32ParentProcessID)
- return
-}
-
-// StartedByExplorer returns true if the program was invoked by the user double-clicking
-// on the executable from explorer.exe
-//
-// It is conservative and returns false if any of the internal calls fail.
-// It does not guarantee that the program was run from a terminal. It only can tell you
-// whether it was launched from explorer.exe
-func StartedByExplorer() bool {
- ppid, err := getppid()
- if err != nil {
- return false
- }
-
- pe, err := getProcessEntry(ppid)
- if err != nil {
- return false
- }
-
- name := syscall.UTF16ToString(pe.szExeFile[:])
- return name == "explorer.exe"
-}
diff --git a/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go b/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go
deleted file mode 100644
index 9a28e57c3..000000000
--- a/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build windows
-// +build go1.4
-
-package mousetrap
-
-import (
- "os"
- "syscall"
- "unsafe"
-)
-
-func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) {
- snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0)
- if err != nil {
- return nil, err
- }
- defer syscall.CloseHandle(snapshot)
- var procEntry syscall.ProcessEntry32
- procEntry.Size = uint32(unsafe.Sizeof(procEntry))
- if err = syscall.Process32First(snapshot, &procEntry); err != nil {
- return nil, err
- }
- for {
- if procEntry.ProcessID == uint32(pid) {
- return &procEntry, nil
- }
- err = syscall.Process32Next(snapshot, &procEntry)
- if err != nil {
- return nil, err
- }
- }
-}
-
-// StartedByExplorer returns true if the program was invoked by the user double-clicking
-// on the executable from explorer.exe
-//
-// It is conservative and returns false if any of the internal calls fail.
-// It does not guarantee that the program was run from a terminal. It only can tell you
-// whether it was launched from explorer.exe
-func StartedByExplorer() bool {
- pe, err := getProcessEntry(os.Getppid())
- if err != nil {
- return false
- }
- return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:])
-}
diff --git a/vendor/github.com/jgautheron/goconst/LICENSE b/vendor/github.com/jgautheron/goconst/LICENSE
deleted file mode 100644
index e92649543..000000000
--- a/vendor/github.com/jgautheron/goconst/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Jonathan Gautheron
-
-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/jgautheron/goconst/README.md b/vendor/github.com/jgautheron/goconst/README.md
deleted file mode 100644
index 04fc9b015..000000000
--- a/vendor/github.com/jgautheron/goconst/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# goconst
-
-Find repeated strings that could be replaced by a constant.
-
-### Motivation
-
-There are obvious benefits to using constants instead of repeating strings, mostly to ease maintenance. Cannot argue against changing a single constant versus many strings.
-
-While this could be considered a beginner mistake, across time, multiple packages and large codebases, some repetition could have slipped in.
-
-### Get Started
-
- $ go get github.com/jgautheron/goconst/cmd/goconst
- $ goconst ./...
-
-### Usage
-
-```
-Usage:
-
- goconst ARGS
-
-Flags:
-
- -ignore exclude files matching the given regular expression
- -ignore-tests exclude tests from the search (default: true)
- -min-occurrences report from how many occurrences (default: 2)
- -min-length only report strings with the minimum given length (default: 3)
- -match-constant look for existing constants matching the values
- -numbers search also for duplicated numbers
- -min minimum value, only works with -numbers
- -max maximum value, only works with -numbers
- -output output formatting (text or json)
-
-Examples:
-
- goconst ./...
- goconst -ignore "yacc|\.pb\." $GOPATH/src/github.com/cockroachdb/cockroach/...
- goconst -min-occurrences 3 -output json $GOPATH/src/github.com/cockroachdb/cockroach
- goconst -numbers -min 60 -max 512 .
-```
-
-### Other static analysis tools
-
-- [gogetimports](https://github.com/jgautheron/gogetimports): Get a JSON-formatted list of imports.
-- [usedexports](https://github.com/jgautheron/usedexports): Find exported variables that could be unexported.
-
-### License
-MIT
diff --git a/vendor/github.com/jgautheron/goconst/cmd/goconst/main.go b/vendor/github.com/jgautheron/goconst/cmd/goconst/main.go
deleted file mode 100644
index a06515d68..000000000
--- a/vendor/github.com/jgautheron/goconst/cmd/goconst/main.go
+++ /dev/null
@@ -1,166 +0,0 @@
-package main
-
-import (
- "encoding/json"
- "flag"
- "fmt"
- "io"
- "log"
- "os"
- "strconv"
- "strings"
-
- "github.com/jgautheron/goconst"
-)
-
-const usageDoc = `goconst: find repeated strings that could be replaced by a constant
-
-Usage:
-
- goconst ARGS [...]
-
-Flags:
-
- -ignore exclude files matching the given regular expression
- -ignore-tests exclude tests from the search (default: true)
- -min-occurrences report from how many occurrences (default: 2)
- -min-length only report strings with the minimum given length (default: 3)
- -match-constant look for existing constants matching the strings
- -numbers search also for duplicated numbers
- -min minimum value, only works with -numbers
- -max maximum value, only works with -numbers
- -output output formatting (text or json)
-
-Examples:
-
- goconst ./...
- goconst -ignore "yacc|\.pb\." $GOPATH/src/github.com/cockroachdb/cockroach/...
- goconst -min-occurrences 3 -output json $GOPATH/src/github.com/cockroachdb/cockroach
- goconst -numbers -min 60 -max 512 .
-`
-
-var (
- flagIgnore = flag.String("ignore", "", "ignore files matching the given regular expression")
- flagIgnoreTests = flag.Bool("ignore-tests", true, "exclude tests from the search")
- flagMinOccurrences = flag.Int("min-occurrences", 2, "report from how many occurrences")
- flagMinLength = flag.Int("min-length", 3, "only report strings with the minimum given length")
- flagMatchConstant = flag.Bool("match-constant", false, "look for existing constants matching the strings")
- flagNumbers = flag.Bool("numbers", false, "search also for duplicated numbers")
- flagMin = flag.Int("min", 0, "minimum value, only works with -numbers")
- flagMax = flag.Int("max", 0, "maximum value, only works with -numbers")
- flagOutput = flag.String("output", "text", "output formatting")
-)
-
-func main() {
- flag.Usage = func() {
- usage(os.Stderr)
- }
- flag.Parse()
- log.SetPrefix("goconst: ")
-
- args := flag.Args()
- if len(args) < 1 {
- usage(os.Stderr)
- os.Exit(1)
- }
- for _, path := range args {
- if err := run(path); err != nil {
- log.Println(err)
- os.Exit(1)
- }
- }
-}
-
-func run(path string) error {
- gco := goconst.New(
- path,
- *flagIgnore,
- *flagIgnoreTests,
- *flagMatchConstant,
- *flagNumbers,
- *flagMinLength,
- )
- strs, consts, err := gco.ParseTree()
- if err != nil {
- return err
- }
-
- return printOutput(strs, consts, *flagOutput, *flagMinOccurrences, *flagMin, *flagMax)
-}
-
-func usage(out io.Writer) {
- fmt.Fprintf(out, usageDoc)
-}
-
-func printOutput(strs goconst.Strings, consts goconst.Constants, output string, minOccurrences, min, max int) error {
- for str, item := range strs {
- // Filter out items whose occurrences don't match the min value
- if len(item) < minOccurrences {
- delete(strs, str)
- }
-
- // If the value is a number
- if i, err := strconv.Atoi(str); err == nil {
- if min != 0 && i < min {
- delete(strs, str)
- }
- if max != 0 && i > max {
- delete(strs, str)
- }
- }
- }
-
- switch output {
- case "json":
- enc := json.NewEncoder(os.Stdout)
- err := enc.Encode(struct {
- Strings goconst.Strings `json:"strings,omitEmpty"`
- Constants goconst.Constants `json:"constants,omitEmpty"`
- }{
- strs, consts,
- })
- if err != nil {
- return err
- }
- case "text":
- for str, item := range strs {
- for _, xpos := range item {
- fmt.Printf(
- `%s:%d:%d:%d other occurrence(s) of "%s" found in: %s`,
- xpos.Filename,
- xpos.Line,
- xpos.Column,
- len(item)-1,
- str,
- occurrences(item, xpos),
- )
- fmt.Print("\n")
- }
-
- if len(consts) == 0 {
- continue
- }
- if cst, ok := consts[str]; ok {
- // const should be in the same package and exported
- fmt.Printf(`A matching constant has been found for "%s": %s`, str, cst.Name)
- fmt.Printf("\n\t%s\n", cst.String())
- }
- }
- default:
- return fmt.Errorf(`Unsupported output format: %s`, output)
- }
- return nil
-}
-
-func occurrences(item []goconst.ExtendedPos, current goconst.ExtendedPos) string {
- occurrences := []string{}
- for _, xpos := range item {
- if xpos == current {
- continue
- }
- occurrences = append(occurrences, fmt.Sprintf(
- "%s:%d:%d", xpos.Filename, xpos.Line, xpos.Column,
- ))
- }
- return strings.Join(occurrences, " ")
-}
diff --git a/vendor/github.com/jgautheron/goconst/go.mod b/vendor/github.com/jgautheron/goconst/go.mod
deleted file mode 100644
index 53dbfbbb9..000000000
--- a/vendor/github.com/jgautheron/goconst/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/jgautheron/goconst
-
-go 1.13
diff --git a/vendor/github.com/jgautheron/goconst/parser.go b/vendor/github.com/jgautheron/goconst/parser.go
deleted file mode 100644
index 5f837230b..000000000
--- a/vendor/github.com/jgautheron/goconst/parser.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// Package goconst finds repeated strings that could be replaced by a constant.
-//
-// There are obvious benefits to using constants instead of repeating strings,
-// mostly to ease maintenance. Cannot argue against changing a single constant versus many strings.
-// While this could be considered a beginner mistake, across time,
-// multiple packages and large codebases, some repetition could have slipped in.
-package goconst
-
-import (
- "go/ast"
- "go/parser"
- "go/token"
- "log"
- "os"
- "path/filepath"
- "regexp"
- "strings"
-)
-
-const (
- testSuffix = "_test.go"
-)
-
-type Parser struct {
- // Meant to be passed via New()
- path, ignore string
- ignoreTests, matchConstant bool
- minLength int
-
- supportedTokens []token.Token
-
- // Internals
- strs Strings
- consts Constants
-}
-
-// New creates a new instance of the parser.
-// This is your entry point if you'd like to use goconst as an API.
-func New(path, ignore string, ignoreTests, matchConstant, numbers bool, minLength int) *Parser {
- supportedTokens := []token.Token{token.STRING}
- if numbers {
- supportedTokens = append(supportedTokens, token.INT, token.FLOAT)
- }
-
- return &Parser{
- path: path,
- ignore: ignore,
- ignoreTests: ignoreTests,
- matchConstant: matchConstant,
- minLength: minLength,
- supportedTokens: supportedTokens,
-
- // Initialize the maps
- strs: Strings{},
- consts: Constants{},
- }
-}
-
-// ParseTree will search the given path for occurrences that could be moved into constants.
-// If "..." is appended, the search will be recursive.
-func (p *Parser) ParseTree() (Strings, Constants, error) {
- pathLen := len(p.path)
- // Parse recursively the given path if the recursive notation is found
- if pathLen >= 5 && p.path[pathLen-3:] == "..." {
- filepath.Walk(p.path[:pathLen-3], func(path string, f os.FileInfo, err error) error {
- if err != nil {
- log.Println(err)
- // resume walking
- return nil
- }
-
- if f.IsDir() {
- p.parseDir(path)
- }
- return nil
- })
- } else {
- p.parseDir(p.path)
- }
- return p.strs, p.consts, nil
-}
-
-func (p *Parser) parseDir(dir string) error {
- fset := token.NewFileSet()
- pkgs, err := parser.ParseDir(fset, dir, func(info os.FileInfo) bool {
- valid, name := true, info.Name()
-
- if p.ignoreTests {
- if strings.HasSuffix(name, testSuffix) {
- valid = false
- }
- }
-
- if len(p.ignore) != 0 {
- match, err := regexp.MatchString(p.ignore, dir+name)
- if err != nil {
- log.Fatal(err)
- return true
- }
- if match {
- valid = false
- }
- }
-
- return valid
- }, 0)
- if err != nil {
- return err
- }
-
- for _, pkg := range pkgs {
- for fn, f := range pkg.Files {
- ast.Walk(&treeVisitor{
- fileSet: fset,
- packageName: pkg.Name,
- fileName: fn,
- p: p,
- }, f)
- }
- }
-
- return nil
-}
-
-type Strings map[string][]ExtendedPos
-type Constants map[string]ConstType
-
-type ConstType struct {
- token.Position
- Name, packageName string
-}
-
-type ExtendedPos struct {
- token.Position
- packageName string
-}
diff --git a/vendor/github.com/jgautheron/goconst/visitor.go b/vendor/github.com/jgautheron/goconst/visitor.go
deleted file mode 100644
index 27cd5d8a2..000000000
--- a/vendor/github.com/jgautheron/goconst/visitor.go
+++ /dev/null
@@ -1,153 +0,0 @@
-package goconst
-
-import (
- "go/ast"
- "go/token"
- "strings"
-)
-
-// treeVisitor carries the package name and file name
-// for passing it to the imports map, and the fileSet for
-// retrieving the token.Position.
-type treeVisitor struct {
- p *Parser
- fileSet *token.FileSet
- packageName, fileName string
-}
-
-// Visit browses the AST tree for strings that could be potentially
-// replaced by constants.
-// A map of existing constants is built as well (-match-constant).
-func (v *treeVisitor) Visit(node ast.Node) ast.Visitor {
- if node == nil {
- return v
- }
-
- // A single case with "ast.BasicLit" would be much easier
- // but then we wouldn't be able to tell in which context
- // the string is defined (could be a constant definition).
- switch t := node.(type) {
- // Scan for constants in an attempt to match strings with existing constants
- case *ast.GenDecl:
- if !v.p.matchConstant {
- return v
- }
- if t.Tok != token.CONST {
- return v
- }
-
- for _, spec := range t.Specs {
- val := spec.(*ast.ValueSpec)
- for i, str := range val.Values {
- lit, ok := str.(*ast.BasicLit)
- if !ok || !v.isSupported(lit.Kind) {
- continue
- }
-
- v.addConst(val.Names[i].Name, lit.Value, val.Names[i].Pos())
- }
- }
-
- // foo := "moo"
- case *ast.AssignStmt:
- for _, rhs := range t.Rhs {
- lit, ok := rhs.(*ast.BasicLit)
- if !ok || !v.isSupported(lit.Kind) {
- continue
- }
-
- v.addString(lit.Value, rhs.(*ast.BasicLit).Pos())
- }
-
- // if foo == "moo"
- case *ast.BinaryExpr:
- if t.Op != token.EQL && t.Op != token.NEQ {
- return v
- }
-
- var lit *ast.BasicLit
- var ok bool
-
- lit, ok = t.X.(*ast.BasicLit)
- if ok && v.isSupported(lit.Kind) {
- v.addString(lit.Value, lit.Pos())
- }
-
- lit, ok = t.Y.(*ast.BasicLit)
- if ok && v.isSupported(lit.Kind) {
- v.addString(lit.Value, lit.Pos())
- }
-
- // case "foo":
- case *ast.CaseClause:
- for _, item := range t.List {
- lit, ok := item.(*ast.BasicLit)
- if ok && v.isSupported(lit.Kind) {
- v.addString(lit.Value, lit.Pos())
- }
- }
-
- // return "boo"
- case *ast.ReturnStmt:
- for _, item := range t.Results {
- lit, ok := item.(*ast.BasicLit)
- if ok && v.isSupported(lit.Kind) {
- v.addString(lit.Value, lit.Pos())
- }
- }
-
- // fn("http://")
- case *ast.CallExpr:
- for _, item := range t.Args {
- lit, ok := item.(*ast.BasicLit)
- if ok && v.isSupported(lit.Kind) {
- v.addString(lit.Value, lit.Pos())
- }
- }
- }
-
- return v
-}
-
-// addString adds a string in the map along with its position in the tree.
-func (v *treeVisitor) addString(str string, pos token.Pos) {
- // Drop first and last character, quote, backquote...
- str = str[1 : len(str)-1]
-
- // Ignore empty strings
- if len(str) == 0 {
- return
- }
-
- if len(str) < v.p.minLength {
- return
- }
-
- _, ok := v.p.strs[str]
- if !ok {
- v.p.strs[str] = make([]ExtendedPos, 0)
- }
- v.p.strs[str] = append(v.p.strs[str], ExtendedPos{
- packageName: v.packageName,
- Position: v.fileSet.Position(pos),
- })
-}
-
-// addConst adds a const in the map along with its position in the tree.
-func (v *treeVisitor) addConst(name string, val string, pos token.Pos) {
- val = strings.Replace(val, `"`, "", 2)
- v.p.consts[val] = ConstType{
- Name: name,
- packageName: v.packageName,
- Position: v.fileSet.Position(pos),
- }
-}
-
-func (v *treeVisitor) isSupported(tk token.Token) bool {
- for _, s := range v.p.supportedTokens {
- if tk == s {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/labstack/echo/v4/.editorconfig b/vendor/github.com/labstack/echo/v4/.editorconfig
deleted file mode 100644
index 17ae50dd0..000000000
--- a/vendor/github.com/labstack/echo/v4/.editorconfig
+++ /dev/null
@@ -1,25 +0,0 @@
-# EditorConfig coding styles definitions. For more information about the
-# properties used in this file, please see the EditorConfig documentation:
-# http://editorconfig.org/
-
-# indicate this is the root of the project
-root = true
-
-[*]
-charset = utf-8
-
-end_of_line = LF
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-indent_style = space
-indent_size = 2
-
-[Makefile]
-indent_style = tab
-
-[*.md]
-trim_trailing_whitespace = false
-
-[*.go]
-indent_style = tab
diff --git a/vendor/github.com/labstack/echo/v4/.gitattributes b/vendor/github.com/labstack/echo/v4/.gitattributes
deleted file mode 100644
index 49b63e526..000000000
--- a/vendor/github.com/labstack/echo/v4/.gitattributes
+++ /dev/null
@@ -1,20 +0,0 @@
-# Automatically normalize line endings for all text-based files
-# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
-* text=auto
-
-# For the following file types, normalize line endings to LF on checking and
-# prevent conversion to CRLF when they are checked out (this is required in
-# order to prevent newline related issues)
-.* text eol=lf
-*.go text eol=lf
-*.yml text eol=lf
-*.html text eol=lf
-*.css text eol=lf
-*.js text eol=lf
-*.json text eol=lf
-LICENSE text eol=lf
-
-# Exclude `website` and `cookbook` from GitHub's language statistics
-# https://github.com/github/linguist#using-gitattributes
-cookbook/* linguist-documentation
-website/* linguist-documentation
diff --git a/vendor/github.com/labstack/echo/v4/.gitignore b/vendor/github.com/labstack/echo/v4/.gitignore
deleted file mode 100644
index dd74acca4..000000000
--- a/vendor/github.com/labstack/echo/v4/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.DS_Store
-coverage.txt
-_test
-vendor
-.idea
-*.iml
-*.out
diff --git a/vendor/github.com/labstack/echo/v4/.travis.yml b/vendor/github.com/labstack/echo/v4/.travis.yml
deleted file mode 100644
index a1fc87684..000000000
--- a/vendor/github.com/labstack/echo/v4/.travis.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-language: go
-go:
- - 1.12.x
- - 1.13.x
- - tip
-env:
- - GO111MODULE=on
-install:
- - go get -v golang.org/x/lint/golint
-script:
- - golint -set_exit_status ./...
- - go test -race -coverprofile=coverage.txt -covermode=atomic ./...
-after_success:
- - bash <(curl -s https://codecov.io/bash)
-matrix:
- allow_failures:
- - go: tip
diff --git a/vendor/github.com/labstack/echo/v4/LICENSE b/vendor/github.com/labstack/echo/v4/LICENSE
deleted file mode 100644
index b5b006b4e..000000000
--- a/vendor/github.com/labstack/echo/v4/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2017 LabStack
-
-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/labstack/echo/v4/Makefile b/vendor/github.com/labstack/echo/v4/Makefile
deleted file mode 100644
index dfcb6c02b..000000000
--- a/vendor/github.com/labstack/echo/v4/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-tag:
- @git tag `grep -P '^\tversion = ' echo.go|cut -f2 -d'"'`
- @git tag|grep -v ^v
diff --git a/vendor/github.com/labstack/echo/v4/README.md b/vendor/github.com/labstack/echo/v4/README.md
deleted file mode 100644
index c57d478fb..000000000
--- a/vendor/github.com/labstack/echo/v4/README.md
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-[](https://sourcegraph.com/github.com/labstack/echo?badge)
-[](http://godoc.org/github.com/labstack/echo)
-[](https://goreportcard.com/report/github.com/labstack/echo)
-[](https://travis-ci.org/labstack/echo)
-[](https://codecov.io/gh/labstack/echo)
-[](https://gitter.im/labstack/echo)
-[](https://forum.labstack.com)
-[](https://twitter.com/labstack)
-[](https://raw.githubusercontent.com/labstack/echo/master/LICENSE)
-
-## Supported Go versions
-
-As of version 4.0.0, Echo is available as a [Go module](https://github.com/golang/go/wiki/Modules).
-Therefore a Go version capable of understanding /vN suffixed imports is required:
-
-- 1.9.7+
-- 1.10.3+
-- 1.11+
-
-Any of these versions will allow you to import Echo as `github.com/labstack/echo/v4` which is the recommended
-way of using Echo going forward.
-
-For older versions, please use the latest v3 tag.
-
-## Feature Overview
-
-- Optimized HTTP router which smartly prioritize routes
-- Build robust and scalable RESTful APIs
-- Group APIs
-- Extensible middleware framework
-- Define middleware at root, group or route level
-- Data binding for JSON, XML and form payload
-- Handy functions to send variety of HTTP responses
-- Centralized HTTP error handling
-- Template rendering with any template engine
-- Define your format for the logger
-- Highly customizable
-- Automatic TLS via Let’s Encrypt
-- HTTP/2 support
-
-## Benchmarks
-
-Date: 2018/03/15
-Source: https://github.com/vishr/web-framework-benchmark
-Lower is better!
-
-
-
-## [Guide](https://echo.labstack.com/guide)
-
-### Installation
-
-```go
-// go get github.com/labstack/echo/{version}
-go get github.com/labstack/echo/v4
-```
-
-### Example
-
-```go
-package main
-
-import (
- "net/http"
- "github.com/labstack/echo/v4"
- "github.com/labstack/echo/v4/middleware"
-)
-
-func main() {
- // Echo instance
- e := echo.New()
-
- // Middleware
- e.Use(middleware.Logger())
- e.Use(middleware.Recover())
-
- // Routes
- e.GET("/", hello)
-
- // Start server
- e.Logger.Fatal(e.Start(":1323"))
-}
-
-// Handler
-func hello(c echo.Context) error {
- return c.String(http.StatusOK, "Hello, World!")
-}
-```
-
-## Help
-
-- [Forum](https://forum.labstack.com)
-- [Chat](https://gitter.im/labstack/echo)
-
-## Contribute
-
-**Use issues for everything**
-
-- For a small change, just send a PR.
-- For bigger changes open an issue for discussion before sending a PR.
-- PR should have:
- - Test case
- - Documentation
- - Example (If it makes sense)
-- You can also contribute by:
- - Reporting issues
- - Suggesting new features or enhancements
- - Improve/fix documentation
-
-## Credits
-
-- [Vishal Rana](https://github.com/vishr) - Author
-- [Nitin Rana](https://github.com/nr17) - Consultant
-- [Contributors](https://github.com/labstack/echo/graphs/contributors)
-
-## License
-
-[MIT](https://github.com/labstack/echo/blob/master/LICENSE)
diff --git a/vendor/github.com/labstack/echo/v4/bind.go b/vendor/github.com/labstack/echo/v4/bind.go
deleted file mode 100644
index f89147435..000000000
--- a/vendor/github.com/labstack/echo/v4/bind.go
+++ /dev/null
@@ -1,285 +0,0 @@
-package echo
-
-import (
- "encoding"
- "encoding/json"
- "encoding/xml"
- "errors"
- "fmt"
- "net/http"
- "reflect"
- "strconv"
- "strings"
-)
-
-type (
- // Binder is the interface that wraps the Bind method.
- Binder interface {
- Bind(i interface{}, c Context) error
- }
-
- // DefaultBinder is the default implementation of the Binder interface.
- DefaultBinder struct{}
-
- // BindUnmarshaler is the interface used to wrap the UnmarshalParam method.
- // Types that don't implement this, but do implement encoding.TextUnmarshaler
- // will use that interface instead.
- BindUnmarshaler interface {
- // UnmarshalParam decodes and assigns a value from an form or query param.
- UnmarshalParam(param string) error
- }
-)
-
-// Bind implements the `Binder#Bind` function.
-func (b *DefaultBinder) Bind(i interface{}, c Context) (err error) {
- req := c.Request()
-
- names := c.ParamNames()
- values := c.ParamValues()
- params := map[string][]string{}
- for i, name := range names {
- params[name] = []string{values[i]}
- }
- if err := b.bindData(i, params, "param"); err != nil {
- return NewHTTPError(http.StatusBadRequest, err.Error()).SetInternal(err)
- }
- if err = b.bindData(i, c.QueryParams(), "query"); err != nil {
- return NewHTTPError(http.StatusBadRequest, err.Error()).SetInternal(err)
- }
- if req.ContentLength == 0 {
- return
- }
- ctype := req.Header.Get(HeaderContentType)
- switch {
- case strings.HasPrefix(ctype, MIMEApplicationJSON):
- if err = json.NewDecoder(req.Body).Decode(i); err != nil {
- if ute, ok := err.(*json.UnmarshalTypeError); ok {
- return NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unmarshal type error: expected=%v, got=%v, field=%v, offset=%v", ute.Type, ute.Value, ute.Field, ute.Offset)).SetInternal(err)
- } else if se, ok := err.(*json.SyntaxError); ok {
- return NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Syntax error: offset=%v, error=%v", se.Offset, se.Error())).SetInternal(err)
- }
- return NewHTTPError(http.StatusBadRequest, err.Error()).SetInternal(err)
- }
- case strings.HasPrefix(ctype, MIMEApplicationXML), strings.HasPrefix(ctype, MIMETextXML):
- if err = xml.NewDecoder(req.Body).Decode(i); err != nil {
- if ute, ok := err.(*xml.UnsupportedTypeError); ok {
- return NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unsupported type error: type=%v, error=%v", ute.Type, ute.Error())).SetInternal(err)
- } else if se, ok := err.(*xml.SyntaxError); ok {
- return NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Syntax error: line=%v, error=%v", se.Line, se.Error())).SetInternal(err)
- }
- return NewHTTPError(http.StatusBadRequest, err.Error()).SetInternal(err)
- }
- case strings.HasPrefix(ctype, MIMEApplicationForm), strings.HasPrefix(ctype, MIMEMultipartForm):
- params, err := c.FormParams()
- if err != nil {
- return NewHTTPError(http.StatusBadRequest, err.Error()).SetInternal(err)
- }
- if err = b.bindData(i, params, "form"); err != nil {
- return NewHTTPError(http.StatusBadRequest, err.Error()).SetInternal(err)
- }
- default:
- return ErrUnsupportedMediaType
- }
- return
-}
-
-func (b *DefaultBinder) bindData(ptr interface{}, data map[string][]string, tag string) error {
- if ptr == nil || len(data) == 0 {
- return nil
- }
- typ := reflect.TypeOf(ptr).Elem()
- val := reflect.ValueOf(ptr).Elem()
-
- // Map
- if typ.Kind() == reflect.Map {
- for k, v := range data {
- val.SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(v[0]))
- }
- return nil
- }
-
- // !struct
- if typ.Kind() != reflect.Struct {
- return errors.New("binding element must be a struct")
- }
-
- for i := 0; i < typ.NumField(); i++ {
- typeField := typ.Field(i)
- structField := val.Field(i)
- if !structField.CanSet() {
- continue
- }
- structFieldKind := structField.Kind()
- inputFieldName := typeField.Tag.Get(tag)
-
- if inputFieldName == "" {
- inputFieldName = typeField.Name
- // If tag is nil, we inspect if the field is a struct.
- if _, ok := structField.Addr().Interface().(BindUnmarshaler); !ok && structFieldKind == reflect.Struct {
- if err := b.bindData(structField.Addr().Interface(), data, tag); err != nil {
- return err
- }
- continue
- }
- }
-
- inputValue, exists := data[inputFieldName]
- if !exists {
- // Go json.Unmarshal supports case insensitive binding. However the
- // url params are bound case sensitive which is inconsistent. To
- // fix this we must check all of the map values in a
- // case-insensitive search.
- for k, v := range data {
- if strings.EqualFold(k, inputFieldName) {
- inputValue = v
- exists = true
- break
- }
- }
- }
-
- if !exists {
- continue
- }
-
- // Call this first, in case we're dealing with an alias to an array type
- if ok, err := unmarshalField(typeField.Type.Kind(), inputValue[0], structField); ok {
- if err != nil {
- return err
- }
- continue
- }
-
- numElems := len(inputValue)
- if structFieldKind == reflect.Slice && numElems > 0 {
- sliceOf := structField.Type().Elem().Kind()
- slice := reflect.MakeSlice(structField.Type(), numElems, numElems)
- for j := 0; j < numElems; j++ {
- if err := setWithProperType(sliceOf, inputValue[j], slice.Index(j)); err != nil {
- return err
- }
- }
- val.Field(i).Set(slice)
- } else if err := setWithProperType(typeField.Type.Kind(), inputValue[0], structField); err != nil {
- return err
-
- }
- }
- return nil
-}
-
-func setWithProperType(valueKind reflect.Kind, val string, structField reflect.Value) error {
- // But also call it here, in case we're dealing with an array of BindUnmarshalers
- if ok, err := unmarshalField(valueKind, val, structField); ok {
- return err
- }
-
- switch valueKind {
- case reflect.Ptr:
- return setWithProperType(structField.Elem().Kind(), val, structField.Elem())
- case reflect.Int:
- return setIntField(val, 0, structField)
- case reflect.Int8:
- return setIntField(val, 8, structField)
- case reflect.Int16:
- return setIntField(val, 16, structField)
- case reflect.Int32:
- return setIntField(val, 32, structField)
- case reflect.Int64:
- return setIntField(val, 64, structField)
- case reflect.Uint:
- return setUintField(val, 0, structField)
- case reflect.Uint8:
- return setUintField(val, 8, structField)
- case reflect.Uint16:
- return setUintField(val, 16, structField)
- case reflect.Uint32:
- return setUintField(val, 32, structField)
- case reflect.Uint64:
- return setUintField(val, 64, structField)
- case reflect.Bool:
- return setBoolField(val, structField)
- case reflect.Float32:
- return setFloatField(val, 32, structField)
- case reflect.Float64:
- return setFloatField(val, 64, structField)
- case reflect.String:
- structField.SetString(val)
- default:
- return errors.New("unknown type")
- }
- return nil
-}
-
-func unmarshalField(valueKind reflect.Kind, val string, field reflect.Value) (bool, error) {
- switch valueKind {
- case reflect.Ptr:
- return unmarshalFieldPtr(val, field)
- default:
- return unmarshalFieldNonPtr(val, field)
- }
-}
-
-func unmarshalFieldNonPtr(value string, field reflect.Value) (bool, error) {
- fieldIValue := field.Addr().Interface()
- if unmarshaler, ok := fieldIValue.(BindUnmarshaler); ok {
- return true, unmarshaler.UnmarshalParam(value)
- }
- if unmarshaler, ok := fieldIValue.(encoding.TextUnmarshaler); ok {
- return true, unmarshaler.UnmarshalText([]byte(value))
- }
-
- return false, nil
-}
-
-func unmarshalFieldPtr(value string, field reflect.Value) (bool, error) {
- if field.IsNil() {
- // Initialize the pointer to a nil value
- field.Set(reflect.New(field.Type().Elem()))
- }
- return unmarshalFieldNonPtr(value, field.Elem())
-}
-
-func setIntField(value string, bitSize int, field reflect.Value) error {
- if value == "" {
- value = "0"
- }
- intVal, err := strconv.ParseInt(value, 10, bitSize)
- if err == nil {
- field.SetInt(intVal)
- }
- return err
-}
-
-func setUintField(value string, bitSize int, field reflect.Value) error {
- if value == "" {
- value = "0"
- }
- uintVal, err := strconv.ParseUint(value, 10, bitSize)
- if err == nil {
- field.SetUint(uintVal)
- }
- return err
-}
-
-func setBoolField(value string, field reflect.Value) error {
- if value == "" {
- value = "false"
- }
- boolVal, err := strconv.ParseBool(value)
- if err == nil {
- field.SetBool(boolVal)
- }
- return err
-}
-
-func setFloatField(value string, bitSize int, field reflect.Value) error {
- if value == "" {
- value = "0.0"
- }
- floatVal, err := strconv.ParseFloat(value, bitSize)
- if err == nil {
- field.SetFloat(floatVal)
- }
- return err
-}
diff --git a/vendor/github.com/labstack/echo/v4/context.go b/vendor/github.com/labstack/echo/v4/context.go
deleted file mode 100644
index 99ef03bcb..000000000
--- a/vendor/github.com/labstack/echo/v4/context.go
+++ /dev/null
@@ -1,638 +0,0 @@
-package echo
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "fmt"
- "io"
- "mime/multipart"
- "net"
- "net/http"
- "net/url"
- "os"
- "path/filepath"
- "strings"
- "sync"
-)
-
-type (
- // Context represents the context of the current HTTP request. It holds request and
- // response objects, path, path parameters, data and registered handler.
- Context interface {
- // Request returns `*http.Request`.
- Request() *http.Request
-
- // SetRequest sets `*http.Request`.
- SetRequest(r *http.Request)
-
- // SetResponse sets `*Response`.
- SetResponse(r *Response)
-
- // Response returns `*Response`.
- Response() *Response
-
- // IsTLS returns true if HTTP connection is TLS otherwise false.
- IsTLS() bool
-
- // IsWebSocket returns true if HTTP connection is WebSocket otherwise false.
- IsWebSocket() bool
-
- // Scheme returns the HTTP protocol scheme, `http` or `https`.
- Scheme() string
-
- // RealIP returns the client's network address based on `X-Forwarded-For`
- // or `X-Real-IP` request header.
- // The behavior can be configured using `Echo#IPExtractor`.
- RealIP() string
-
- // Path returns the registered path for the handler.
- Path() string
-
- // SetPath sets the registered path for the handler.
- SetPath(p string)
-
- // Param returns path parameter by name.
- Param(name string) string
-
- // ParamNames returns path parameter names.
- ParamNames() []string
-
- // SetParamNames sets path parameter names.
- SetParamNames(names ...string)
-
- // ParamValues returns path parameter values.
- ParamValues() []string
-
- // SetParamValues sets path parameter values.
- SetParamValues(values ...string)
-
- // QueryParam returns the query param for the provided name.
- QueryParam(name string) string
-
- // QueryParams returns the query parameters as `url.Values`.
- QueryParams() url.Values
-
- // QueryString returns the URL query string.
- QueryString() string
-
- // FormValue returns the form field value for the provided name.
- FormValue(name string) string
-
- // FormParams returns the form parameters as `url.Values`.
- FormParams() (url.Values, error)
-
- // FormFile returns the multipart form file for the provided name.
- FormFile(name string) (*multipart.FileHeader, error)
-
- // MultipartForm returns the multipart form.
- MultipartForm() (*multipart.Form, error)
-
- // Cookie returns the named cookie provided in the request.
- Cookie(name string) (*http.Cookie, error)
-
- // SetCookie adds a `Set-Cookie` header in HTTP response.
- SetCookie(cookie *http.Cookie)
-
- // Cookies returns the HTTP cookies sent with the request.
- Cookies() []*http.Cookie
-
- // Get retrieves data from the context.
- Get(key string) interface{}
-
- // Set saves data in the context.
- Set(key string, val interface{})
-
- // Bind binds the request body into provided type `i`. The default binder
- // does it based on Content-Type header.
- Bind(i interface{}) error
-
- // Validate validates provided `i`. It is usually called after `Context#Bind()`.
- // Validator must be registered using `Echo#Validator`.
- Validate(i interface{}) error
-
- // Render renders a template with data and sends a text/html response with status
- // code. Renderer must be registered using `Echo.Renderer`.
- Render(code int, name string, data interface{}) error
-
- // HTML sends an HTTP response with status code.
- HTML(code int, html string) error
-
- // HTMLBlob sends an HTTP blob response with status code.
- HTMLBlob(code int, b []byte) error
-
- // String sends a string response with status code.
- String(code int, s string) error
-
- // JSON sends a JSON response with status code.
- JSON(code int, i interface{}) error
-
- // JSONPretty sends a pretty-print JSON with status code.
- JSONPretty(code int, i interface{}, indent string) error
-
- // JSONBlob sends a JSON blob response with status code.
- JSONBlob(code int, b []byte) error
-
- // JSONP sends a JSONP response with status code. It uses `callback` to construct
- // the JSONP payload.
- JSONP(code int, callback string, i interface{}) error
-
- // JSONPBlob sends a JSONP blob response with status code. It uses `callback`
- // to construct the JSONP payload.
- JSONPBlob(code int, callback string, b []byte) error
-
- // XML sends an XML response with status code.
- XML(code int, i interface{}) error
-
- // XMLPretty sends a pretty-print XML with status code.
- XMLPretty(code int, i interface{}, indent string) error
-
- // XMLBlob sends an XML blob response with status code.
- XMLBlob(code int, b []byte) error
-
- // Blob sends a blob response with status code and content type.
- Blob(code int, contentType string, b []byte) error
-
- // Stream sends a streaming response with status code and content type.
- Stream(code int, contentType string, r io.Reader) error
-
- // File sends a response with the content of the file.
- File(file string) error
-
- // Attachment sends a response as attachment, prompting client to save the
- // file.
- Attachment(file string, name string) error
-
- // Inline sends a response as inline, opening the file in the browser.
- Inline(file string, name string) error
-
- // NoContent sends a response with no body and a status code.
- NoContent(code int) error
-
- // Redirect redirects the request to a provided URL with status code.
- Redirect(code int, url string) error
-
- // Error invokes the registered HTTP error handler. Generally used by middleware.
- Error(err error)
-
- // Handler returns the matched handler by router.
- Handler() HandlerFunc
-
- // SetHandler sets the matched handler by router.
- SetHandler(h HandlerFunc)
-
- // Logger returns the `Logger` instance.
- Logger() Logger
-
- // Set the logger
- SetLogger(l Logger)
-
- // Echo returns the `Echo` instance.
- Echo() *Echo
-
- // Reset resets the context after request completes. It must be called along
- // with `Echo#AcquireContext()` and `Echo#ReleaseContext()`.
- // See `Echo#ServeHTTP()`
- Reset(r *http.Request, w http.ResponseWriter)
- }
-
- context struct {
- request *http.Request
- response *Response
- path string
- pnames []string
- pvalues []string
- query url.Values
- handler HandlerFunc
- store Map
- echo *Echo
- logger Logger
- lock sync.RWMutex
- }
-)
-
-const (
- defaultMemory = 32 << 20 // 32 MB
- indexPage = "index.html"
- defaultIndent = " "
-)
-
-func (c *context) writeContentType(value string) {
- header := c.Response().Header()
- if header.Get(HeaderContentType) == "" {
- header.Set(HeaderContentType, value)
- }
-}
-
-func (c *context) Request() *http.Request {
- return c.request
-}
-
-func (c *context) SetRequest(r *http.Request) {
- c.request = r
-}
-
-func (c *context) Response() *Response {
- return c.response
-}
-
-func (c *context) SetResponse(r *Response) {
- c.response = r
-}
-
-func (c *context) IsTLS() bool {
- return c.request.TLS != nil
-}
-
-func (c *context) IsWebSocket() bool {
- upgrade := c.request.Header.Get(HeaderUpgrade)
- return strings.ToLower(upgrade) == "websocket"
-}
-
-func (c *context) Scheme() string {
- // Can't use `r.Request.URL.Scheme`
- // See: https://groups.google.com/forum/#!topic/golang-nuts/pMUkBlQBDF0
- if c.IsTLS() {
- return "https"
- }
- if scheme := c.request.Header.Get(HeaderXForwardedProto); scheme != "" {
- return scheme
- }
- if scheme := c.request.Header.Get(HeaderXForwardedProtocol); scheme != "" {
- return scheme
- }
- if ssl := c.request.Header.Get(HeaderXForwardedSsl); ssl == "on" {
- return "https"
- }
- if scheme := c.request.Header.Get(HeaderXUrlScheme); scheme != "" {
- return scheme
- }
- return "http"
-}
-
-func (c *context) RealIP() string {
- if c.echo != nil && c.echo.IPExtractor != nil {
- return c.echo.IPExtractor(c.request)
- }
- // Fall back to legacy behavior
- if ip := c.request.Header.Get(HeaderXForwardedFor); ip != "" {
- return strings.Split(ip, ", ")[0]
- }
- if ip := c.request.Header.Get(HeaderXRealIP); ip != "" {
- return ip
- }
- ra, _, _ := net.SplitHostPort(c.request.RemoteAddr)
- return ra
-}
-
-func (c *context) Path() string {
- return c.path
-}
-
-func (c *context) SetPath(p string) {
- c.path = p
-}
-
-func (c *context) Param(name string) string {
- for i, n := range c.pnames {
- if i < len(c.pvalues) {
- if n == name {
- return c.pvalues[i]
- }
- }
- }
- return ""
-}
-
-func (c *context) ParamNames() []string {
- return c.pnames
-}
-
-func (c *context) SetParamNames(names ...string) {
- c.pnames = names
- *c.echo.maxParam = len(names)
-}
-
-func (c *context) ParamValues() []string {
- return c.pvalues[:len(c.pnames)]
-}
-
-func (c *context) SetParamValues(values ...string) {
- c.pvalues = values
-}
-
-func (c *context) QueryParam(name string) string {
- if c.query == nil {
- c.query = c.request.URL.Query()
- }
- return c.query.Get(name)
-}
-
-func (c *context) QueryParams() url.Values {
- if c.query == nil {
- c.query = c.request.URL.Query()
- }
- return c.query
-}
-
-func (c *context) QueryString() string {
- return c.request.URL.RawQuery
-}
-
-func (c *context) FormValue(name string) string {
- return c.request.FormValue(name)
-}
-
-func (c *context) FormParams() (url.Values, error) {
- if strings.HasPrefix(c.request.Header.Get(HeaderContentType), MIMEMultipartForm) {
- if err := c.request.ParseMultipartForm(defaultMemory); err != nil {
- return nil, err
- }
- } else {
- if err := c.request.ParseForm(); err != nil {
- return nil, err
- }
- }
- return c.request.Form, nil
-}
-
-func (c *context) FormFile(name string) (*multipart.FileHeader, error) {
- f, fh, err := c.request.FormFile(name)
- if err != nil {
- return nil, err
- }
- defer f.Close()
- return fh, nil
-}
-
-func (c *context) MultipartForm() (*multipart.Form, error) {
- err := c.request.ParseMultipartForm(defaultMemory)
- return c.request.MultipartForm, err
-}
-
-func (c *context) Cookie(name string) (*http.Cookie, error) {
- return c.request.Cookie(name)
-}
-
-func (c *context) SetCookie(cookie *http.Cookie) {
- http.SetCookie(c.Response(), cookie)
-}
-
-func (c *context) Cookies() []*http.Cookie {
- return c.request.Cookies()
-}
-
-func (c *context) Get(key string) interface{} {
- c.lock.RLock()
- defer c.lock.RUnlock()
- return c.store[key]
-}
-
-func (c *context) Set(key string, val interface{}) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- if c.store == nil {
- c.store = make(Map)
- }
- c.store[key] = val
-}
-
-func (c *context) Bind(i interface{}) error {
- return c.echo.Binder.Bind(i, c)
-}
-
-func (c *context) Validate(i interface{}) error {
- if c.echo.Validator == nil {
- return ErrValidatorNotRegistered
- }
- return c.echo.Validator.Validate(i)
-}
-
-func (c *context) Render(code int, name string, data interface{}) (err error) {
- if c.echo.Renderer == nil {
- return ErrRendererNotRegistered
- }
- buf := new(bytes.Buffer)
- if err = c.echo.Renderer.Render(buf, name, data, c); err != nil {
- return
- }
- return c.HTMLBlob(code, buf.Bytes())
-}
-
-func (c *context) HTML(code int, html string) (err error) {
- return c.HTMLBlob(code, []byte(html))
-}
-
-func (c *context) HTMLBlob(code int, b []byte) (err error) {
- return c.Blob(code, MIMETextHTMLCharsetUTF8, b)
-}
-
-func (c *context) String(code int, s string) (err error) {
- return c.Blob(code, MIMETextPlainCharsetUTF8, []byte(s))
-}
-
-func (c *context) jsonPBlob(code int, callback string, i interface{}) (err error) {
- enc := json.NewEncoder(c.response)
- _, pretty := c.QueryParams()["pretty"]
- if c.echo.Debug || pretty {
- enc.SetIndent("", " ")
- }
- c.writeContentType(MIMEApplicationJavaScriptCharsetUTF8)
- c.response.WriteHeader(code)
- if _, err = c.response.Write([]byte(callback + "(")); err != nil {
- return
- }
- if err = enc.Encode(i); err != nil {
- return
- }
- if _, err = c.response.Write([]byte(");")); err != nil {
- return
- }
- return
-}
-
-func (c *context) json(code int, i interface{}, indent string) error {
- enc := json.NewEncoder(c.response)
- if indent != "" {
- enc.SetIndent("", indent)
- }
- c.writeContentType(MIMEApplicationJSONCharsetUTF8)
- c.response.Status = code
- return enc.Encode(i)
-}
-
-func (c *context) JSON(code int, i interface{}) (err error) {
- indent := ""
- if _, pretty := c.QueryParams()["pretty"]; c.echo.Debug || pretty {
- indent = defaultIndent
- }
- return c.json(code, i, indent)
-}
-
-func (c *context) JSONPretty(code int, i interface{}, indent string) (err error) {
- return c.json(code, i, indent)
-}
-
-func (c *context) JSONBlob(code int, b []byte) (err error) {
- return c.Blob(code, MIMEApplicationJSONCharsetUTF8, b)
-}
-
-func (c *context) JSONP(code int, callback string, i interface{}) (err error) {
- return c.jsonPBlob(code, callback, i)
-}
-
-func (c *context) JSONPBlob(code int, callback string, b []byte) (err error) {
- c.writeContentType(MIMEApplicationJavaScriptCharsetUTF8)
- c.response.WriteHeader(code)
- if _, err = c.response.Write([]byte(callback + "(")); err != nil {
- return
- }
- if _, err = c.response.Write(b); err != nil {
- return
- }
- _, err = c.response.Write([]byte(");"))
- return
-}
-
-func (c *context) xml(code int, i interface{}, indent string) (err error) {
- c.writeContentType(MIMEApplicationXMLCharsetUTF8)
- c.response.WriteHeader(code)
- enc := xml.NewEncoder(c.response)
- if indent != "" {
- enc.Indent("", indent)
- }
- if _, err = c.response.Write([]byte(xml.Header)); err != nil {
- return
- }
- return enc.Encode(i)
-}
-
-func (c *context) XML(code int, i interface{}) (err error) {
- indent := ""
- if _, pretty := c.QueryParams()["pretty"]; c.echo.Debug || pretty {
- indent = defaultIndent
- }
- return c.xml(code, i, indent)
-}
-
-func (c *context) XMLPretty(code int, i interface{}, indent string) (err error) {
- return c.xml(code, i, indent)
-}
-
-func (c *context) XMLBlob(code int, b []byte) (err error) {
- c.writeContentType(MIMEApplicationXMLCharsetUTF8)
- c.response.WriteHeader(code)
- if _, err = c.response.Write([]byte(xml.Header)); err != nil {
- return
- }
- _, err = c.response.Write(b)
- return
-}
-
-func (c *context) Blob(code int, contentType string, b []byte) (err error) {
- c.writeContentType(contentType)
- c.response.WriteHeader(code)
- _, err = c.response.Write(b)
- return
-}
-
-func (c *context) Stream(code int, contentType string, r io.Reader) (err error) {
- c.writeContentType(contentType)
- c.response.WriteHeader(code)
- _, err = io.Copy(c.response, r)
- return
-}
-
-func (c *context) File(file string) (err error) {
- f, err := os.Open(file)
- if err != nil {
- return NotFoundHandler(c)
- }
- defer f.Close()
-
- fi, _ := f.Stat()
- if fi.IsDir() {
- file = filepath.Join(file, indexPage)
- f, err = os.Open(file)
- if err != nil {
- return NotFoundHandler(c)
- }
- defer f.Close()
- if fi, err = f.Stat(); err != nil {
- return
- }
- }
- http.ServeContent(c.Response(), c.Request(), fi.Name(), fi.ModTime(), f)
- return
-}
-
-func (c *context) Attachment(file, name string) error {
- return c.contentDisposition(file, name, "attachment")
-}
-
-func (c *context) Inline(file, name string) error {
- return c.contentDisposition(file, name, "inline")
-}
-
-func (c *context) contentDisposition(file, name, dispositionType string) error {
- c.response.Header().Set(HeaderContentDisposition, fmt.Sprintf("%s; filename=%q", dispositionType, name))
- return c.File(file)
-}
-
-func (c *context) NoContent(code int) error {
- c.response.WriteHeader(code)
- return nil
-}
-
-func (c *context) Redirect(code int, url string) error {
- if code < 300 || code > 308 {
- return ErrInvalidRedirectCode
- }
- c.response.Header().Set(HeaderLocation, url)
- c.response.WriteHeader(code)
- return nil
-}
-
-func (c *context) Error(err error) {
- c.echo.HTTPErrorHandler(err, c)
-}
-
-func (c *context) Echo() *Echo {
- return c.echo
-}
-
-func (c *context) Handler() HandlerFunc {
- return c.handler
-}
-
-func (c *context) SetHandler(h HandlerFunc) {
- c.handler = h
-}
-
-func (c *context) Logger() Logger {
- res := c.logger
- if res != nil {
- return res
- }
- return c.echo.Logger
-}
-
-func (c *context) SetLogger(l Logger) {
- c.logger = l
-}
-
-func (c *context) Reset(r *http.Request, w http.ResponseWriter) {
- c.request = r
- c.response.reset(w)
- c.query = nil
- c.handler = NotFoundHandler
- c.store = nil
- c.path = ""
- c.pnames = nil
- c.logger = nil
- // NOTE: Don't reset because it has to have length c.echo.maxParam at all times
- for i := 0; i < *c.echo.maxParam; i++ {
- c.pvalues[i] = ""
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/echo.go b/vendor/github.com/labstack/echo/v4/echo.go
deleted file mode 100644
index 511eb43fb..000000000
--- a/vendor/github.com/labstack/echo/v4/echo.go
+++ /dev/null
@@ -1,883 +0,0 @@
-/*
-Package echo implements high performance, minimalist Go web framework.
-
-Example:
-
- package main
-
- import (
- "net/http"
-
- "github.com/labstack/echo/v4"
- "github.com/labstack/echo/v4/middleware"
- )
-
- // Handler
- func hello(c echo.Context) error {
- return c.String(http.StatusOK, "Hello, World!")
- }
-
- func main() {
- // Echo instance
- e := echo.New()
-
- // Middleware
- e.Use(middleware.Logger())
- e.Use(middleware.Recover())
-
- // Routes
- e.GET("/", hello)
-
- // Start server
- e.Logger.Fatal(e.Start(":1323"))
- }
-
-Learn more at https://echo.labstack.com
-*/
-package echo
-
-import (
- "bytes"
- stdContext "context"
- "crypto/tls"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- stdLog "log"
- "net"
- "net/http"
- "net/url"
- "path"
- "path/filepath"
- "reflect"
- "runtime"
- "sync"
- "time"
-
- "github.com/labstack/gommon/color"
- "github.com/labstack/gommon/log"
- "golang.org/x/crypto/acme"
- "golang.org/x/crypto/acme/autocert"
- "golang.org/x/net/http2"
- "golang.org/x/net/http2/h2c"
-)
-
-type (
- // Echo is the top-level framework instance.
- Echo struct {
- common
- StdLogger *stdLog.Logger
- colorer *color.Color
- premiddleware []MiddlewareFunc
- middleware []MiddlewareFunc
- maxParam *int
- router *Router
- routers map[string]*Router
- notFoundHandler HandlerFunc
- pool sync.Pool
- Server *http.Server
- TLSServer *http.Server
- Listener net.Listener
- TLSListener net.Listener
- AutoTLSManager autocert.Manager
- DisableHTTP2 bool
- Debug bool
- HideBanner bool
- HidePort bool
- HTTPErrorHandler HTTPErrorHandler
- Binder Binder
- Validator Validator
- Renderer Renderer
- Logger Logger
- IPExtractor IPExtractor
- }
-
- // Route contains a handler and information for matching against requests.
- Route struct {
- Method string `json:"method"`
- Path string `json:"path"`
- Name string `json:"name"`
- }
-
- // HTTPError represents an error that occurred while handling a request.
- HTTPError struct {
- Code int `json:"-"`
- Message interface{} `json:"message"`
- Internal error `json:"-"` // Stores the error returned by an external dependency
- }
-
- // MiddlewareFunc defines a function to process middleware.
- MiddlewareFunc func(HandlerFunc) HandlerFunc
-
- // HandlerFunc defines a function to serve HTTP requests.
- HandlerFunc func(Context) error
-
- // HTTPErrorHandler is a centralized HTTP error handler.
- HTTPErrorHandler func(error, Context)
-
- // Validator is the interface that wraps the Validate function.
- Validator interface {
- Validate(i interface{}) error
- }
-
- // Renderer is the interface that wraps the Render function.
- Renderer interface {
- Render(io.Writer, string, interface{}, Context) error
- }
-
- // Map defines a generic map of type `map[string]interface{}`.
- Map map[string]interface{}
-
- // Common struct for Echo & Group.
- common struct{}
-)
-
-// HTTP methods
-// NOTE: Deprecated, please use the stdlib constants directly instead.
-const (
- CONNECT = http.MethodConnect
- DELETE = http.MethodDelete
- GET = http.MethodGet
- HEAD = http.MethodHead
- OPTIONS = http.MethodOptions
- PATCH = http.MethodPatch
- POST = http.MethodPost
- // PROPFIND = "PROPFIND"
- PUT = http.MethodPut
- TRACE = http.MethodTrace
-)
-
-// MIME types
-const (
- MIMEApplicationJSON = "application/json"
- MIMEApplicationJSONCharsetUTF8 = MIMEApplicationJSON + "; " + charsetUTF8
- MIMEApplicationJavaScript = "application/javascript"
- MIMEApplicationJavaScriptCharsetUTF8 = MIMEApplicationJavaScript + "; " + charsetUTF8
- MIMEApplicationXML = "application/xml"
- MIMEApplicationXMLCharsetUTF8 = MIMEApplicationXML + "; " + charsetUTF8
- MIMETextXML = "text/xml"
- MIMETextXMLCharsetUTF8 = MIMETextXML + "; " + charsetUTF8
- MIMEApplicationForm = "application/x-www-form-urlencoded"
- MIMEApplicationProtobuf = "application/protobuf"
- MIMEApplicationMsgpack = "application/msgpack"
- MIMETextHTML = "text/html"
- MIMETextHTMLCharsetUTF8 = MIMETextHTML + "; " + charsetUTF8
- MIMETextPlain = "text/plain"
- MIMETextPlainCharsetUTF8 = MIMETextPlain + "; " + charsetUTF8
- MIMEMultipartForm = "multipart/form-data"
- MIMEOctetStream = "application/octet-stream"
-)
-
-const (
- charsetUTF8 = "charset=UTF-8"
- // PROPFIND Method can be used on collection and property resources.
- PROPFIND = "PROPFIND"
- // REPORT Method can be used to get information about a resource, see rfc 3253
- REPORT = "REPORT"
-)
-
-// Headers
-const (
- HeaderAccept = "Accept"
- HeaderAcceptEncoding = "Accept-Encoding"
- HeaderAllow = "Allow"
- HeaderAuthorization = "Authorization"
- HeaderContentDisposition = "Content-Disposition"
- HeaderContentEncoding = "Content-Encoding"
- HeaderContentLength = "Content-Length"
- HeaderContentType = "Content-Type"
- HeaderCookie = "Cookie"
- HeaderSetCookie = "Set-Cookie"
- HeaderIfModifiedSince = "If-Modified-Since"
- HeaderLastModified = "Last-Modified"
- HeaderLocation = "Location"
- HeaderUpgrade = "Upgrade"
- HeaderVary = "Vary"
- HeaderWWWAuthenticate = "WWW-Authenticate"
- HeaderXForwardedFor = "X-Forwarded-For"
- HeaderXForwardedProto = "X-Forwarded-Proto"
- HeaderXForwardedProtocol = "X-Forwarded-Protocol"
- HeaderXForwardedSsl = "X-Forwarded-Ssl"
- HeaderXUrlScheme = "X-Url-Scheme"
- HeaderXHTTPMethodOverride = "X-HTTP-Method-Override"
- HeaderXRealIP = "X-Real-IP"
- HeaderXRequestID = "X-Request-ID"
- HeaderXRequestedWith = "X-Requested-With"
- HeaderServer = "Server"
- HeaderOrigin = "Origin"
-
- // Access control
- HeaderAccessControlRequestMethod = "Access-Control-Request-Method"
- HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"
- HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"
- HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"
- HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"
- HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
- HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"
- HeaderAccessControlMaxAge = "Access-Control-Max-Age"
-
- // Security
- HeaderStrictTransportSecurity = "Strict-Transport-Security"
- HeaderXContentTypeOptions = "X-Content-Type-Options"
- HeaderXXSSProtection = "X-XSS-Protection"
- HeaderXFrameOptions = "X-Frame-Options"
- HeaderContentSecurityPolicy = "Content-Security-Policy"
- HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
- HeaderXCSRFToken = "X-CSRF-Token"
- HeaderReferrerPolicy = "Referrer-Policy"
-)
-
-const (
- // Version of Echo
- Version = "4.1.16"
- website = "https://echo.labstack.com"
- // http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
- banner = `
- ____ __
- / __/___/ / ___
- / _// __/ _ \/ _ \
-/___/\__/_//_/\___/ %s
-High performance, minimalist Go web framework
-%s
-____________________________________O/_______
- O\
-`
-)
-
-var (
- methods = [...]string{
- http.MethodConnect,
- http.MethodDelete,
- http.MethodGet,
- http.MethodHead,
- http.MethodOptions,
- http.MethodPatch,
- http.MethodPost,
- PROPFIND,
- http.MethodPut,
- http.MethodTrace,
- REPORT,
- }
-)
-
-// Errors
-var (
- ErrUnsupportedMediaType = NewHTTPError(http.StatusUnsupportedMediaType)
- ErrNotFound = NewHTTPError(http.StatusNotFound)
- ErrUnauthorized = NewHTTPError(http.StatusUnauthorized)
- ErrForbidden = NewHTTPError(http.StatusForbidden)
- ErrMethodNotAllowed = NewHTTPError(http.StatusMethodNotAllowed)
- ErrStatusRequestEntityTooLarge = NewHTTPError(http.StatusRequestEntityTooLarge)
- ErrTooManyRequests = NewHTTPError(http.StatusTooManyRequests)
- ErrBadRequest = NewHTTPError(http.StatusBadRequest)
- ErrBadGateway = NewHTTPError(http.StatusBadGateway)
- ErrInternalServerError = NewHTTPError(http.StatusInternalServerError)
- ErrRequestTimeout = NewHTTPError(http.StatusRequestTimeout)
- ErrServiceUnavailable = NewHTTPError(http.StatusServiceUnavailable)
- ErrValidatorNotRegistered = errors.New("validator not registered")
- ErrRendererNotRegistered = errors.New("renderer not registered")
- ErrInvalidRedirectCode = errors.New("invalid redirect status code")
- ErrCookieNotFound = errors.New("cookie not found")
- ErrInvalidCertOrKeyType = errors.New("invalid cert or key type, must be string or []byte")
-)
-
-// Error handlers
-var (
- NotFoundHandler = func(c Context) error {
- return ErrNotFound
- }
-
- MethodNotAllowedHandler = func(c Context) error {
- return ErrMethodNotAllowed
- }
-)
-
-// New creates an instance of Echo.
-func New() (e *Echo) {
- e = &Echo{
- Server: new(http.Server),
- TLSServer: new(http.Server),
- AutoTLSManager: autocert.Manager{
- Prompt: autocert.AcceptTOS,
- },
- Logger: log.New("echo"),
- colorer: color.New(),
- maxParam: new(int),
- }
- e.Server.Handler = e
- e.TLSServer.Handler = e
- e.HTTPErrorHandler = e.DefaultHTTPErrorHandler
- e.Binder = &DefaultBinder{}
- e.Logger.SetLevel(log.ERROR)
- e.StdLogger = stdLog.New(e.Logger.Output(), e.Logger.Prefix()+": ", 0)
- e.pool.New = func() interface{} {
- return e.NewContext(nil, nil)
- }
- e.router = NewRouter(e)
- e.routers = map[string]*Router{}
- return
-}
-
-// NewContext returns a Context instance.
-func (e *Echo) NewContext(r *http.Request, w http.ResponseWriter) Context {
- return &context{
- request: r,
- response: NewResponse(w, e),
- store: make(Map),
- echo: e,
- pvalues: make([]string, *e.maxParam),
- handler: NotFoundHandler,
- }
-}
-
-// Router returns the default router.
-func (e *Echo) Router() *Router {
- return e.router
-}
-
-// Routers returns the map of host => router.
-func (e *Echo) Routers() map[string]*Router {
- return e.routers
-}
-
-// DefaultHTTPErrorHandler is the default HTTP error handler. It sends a JSON response
-// with status code.
-func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
- he, ok := err.(*HTTPError)
- if ok {
- if he.Internal != nil {
- if herr, ok := he.Internal.(*HTTPError); ok {
- he = herr
- }
- }
- } else {
- he = &HTTPError{
- Code: http.StatusInternalServerError,
- Message: http.StatusText(http.StatusInternalServerError),
- }
- }
-
- // Issue #1426
- code := he.Code
- message := he.Message
- if e.Debug {
- message = err.Error()
- } else if m, ok := message.(string); ok {
- message = Map{"message": m}
- }
-
- // Send response
- if !c.Response().Committed {
- if c.Request().Method == http.MethodHead { // Issue #608
- err = c.NoContent(he.Code)
- } else {
- err = c.JSON(code, message)
- }
- if err != nil {
- e.Logger.Error(err)
- }
- }
-}
-
-// Pre adds middleware to the chain which is run before router.
-func (e *Echo) Pre(middleware ...MiddlewareFunc) {
- e.premiddleware = append(e.premiddleware, middleware...)
-}
-
-// Use adds middleware to the chain which is run after router.
-func (e *Echo) Use(middleware ...MiddlewareFunc) {
- e.middleware = append(e.middleware, middleware...)
-}
-
-// CONNECT registers a new CONNECT route for a path with matching handler in the
-// router with optional route-level middleware.
-func (e *Echo) CONNECT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodConnect, path, h, m...)
-}
-
-// DELETE registers a new DELETE route for a path with matching handler in the router
-// with optional route-level middleware.
-func (e *Echo) DELETE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodDelete, path, h, m...)
-}
-
-// GET registers a new GET route for a path with matching handler in the router
-// with optional route-level middleware.
-func (e *Echo) GET(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodGet, path, h, m...)
-}
-
-// HEAD registers a new HEAD route for a path with matching handler in the
-// router with optional route-level middleware.
-func (e *Echo) HEAD(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodHead, path, h, m...)
-}
-
-// OPTIONS registers a new OPTIONS route for a path with matching handler in the
-// router with optional route-level middleware.
-func (e *Echo) OPTIONS(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodOptions, path, h, m...)
-}
-
-// PATCH registers a new PATCH route for a path with matching handler in the
-// router with optional route-level middleware.
-func (e *Echo) PATCH(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodPatch, path, h, m...)
-}
-
-// POST registers a new POST route for a path with matching handler in the
-// router with optional route-level middleware.
-func (e *Echo) POST(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodPost, path, h, m...)
-}
-
-// PUT registers a new PUT route for a path with matching handler in the
-// router with optional route-level middleware.
-func (e *Echo) PUT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodPut, path, h, m...)
-}
-
-// TRACE registers a new TRACE route for a path with matching handler in the
-// router with optional route-level middleware.
-func (e *Echo) TRACE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return e.Add(http.MethodTrace, path, h, m...)
-}
-
-// Any registers a new route for all HTTP methods and path with matching handler
-// in the router with optional route-level middleware.
-func (e *Echo) Any(path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route {
- routes := make([]*Route, len(methods))
- for i, m := range methods {
- routes[i] = e.Add(m, path, handler, middleware...)
- }
- return routes
-}
-
-// Match registers a new route for multiple HTTP methods and path with matching
-// handler in the router with optional route-level middleware.
-func (e *Echo) Match(methods []string, path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route {
- routes := make([]*Route, len(methods))
- for i, m := range methods {
- routes[i] = e.Add(m, path, handler, middleware...)
- }
- return routes
-}
-
-// Static registers a new route with path prefix to serve static files from the
-// provided root directory.
-func (e *Echo) Static(prefix, root string) *Route {
- if root == "" {
- root = "." // For security we want to restrict to CWD.
- }
- return e.static(prefix, root, e.GET)
-}
-
-func (common) static(prefix, root string, get func(string, HandlerFunc, ...MiddlewareFunc) *Route) *Route {
- h := func(c Context) error {
- p, err := url.PathUnescape(c.Param("*"))
- if err != nil {
- return err
- }
- name := filepath.Join(root, path.Clean("/"+p)) // "/"+ for security
- return c.File(name)
- }
- if prefix == "/" {
- return get(prefix+"*", h)
- }
- return get(prefix+"/*", h)
-}
-
-func (common) file(path, file string, get func(string, HandlerFunc, ...MiddlewareFunc) *Route,
- m ...MiddlewareFunc) *Route {
- return get(path, func(c Context) error {
- return c.File(file)
- }, m...)
-}
-
-// File registers a new route with path to serve a static file with optional route-level middleware.
-func (e *Echo) File(path, file string, m ...MiddlewareFunc) *Route {
- return e.file(path, file, e.GET, m...)
-}
-
-func (e *Echo) add(host, method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route {
- name := handlerName(handler)
- router := e.findRouter(host)
- router.Add(method, path, func(c Context) error {
- h := handler
- // Chain middleware
- for i := len(middleware) - 1; i >= 0; i-- {
- h = middleware[i](h)
- }
- return h(c)
- })
- r := &Route{
- Method: method,
- Path: path,
- Name: name,
- }
- e.router.routes[method+path] = r
- return r
-}
-
-// Add registers a new route for an HTTP method and path with matching handler
-// in the router with optional route-level middleware.
-func (e *Echo) Add(method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route {
- return e.add("", method, path, handler, middleware...)
-}
-
-// Host creates a new router group for the provided host and optional host-level middleware.
-func (e *Echo) Host(name string, m ...MiddlewareFunc) (g *Group) {
- e.routers[name] = NewRouter(e)
- g = &Group{host: name, echo: e}
- g.Use(m...)
- return
-}
-
-// Group creates a new router group with prefix and optional group-level middleware.
-func (e *Echo) Group(prefix string, m ...MiddlewareFunc) (g *Group) {
- g = &Group{prefix: prefix, echo: e}
- g.Use(m...)
- return
-}
-
-// URI generates a URI from handler.
-func (e *Echo) URI(handler HandlerFunc, params ...interface{}) string {
- name := handlerName(handler)
- return e.Reverse(name, params...)
-}
-
-// URL is an alias for `URI` function.
-func (e *Echo) URL(h HandlerFunc, params ...interface{}) string {
- return e.URI(h, params...)
-}
-
-// Reverse generates an URL from route name and provided parameters.
-func (e *Echo) Reverse(name string, params ...interface{}) string {
- uri := new(bytes.Buffer)
- ln := len(params)
- n := 0
- for _, r := range e.router.routes {
- if r.Name == name {
- for i, l := 0, len(r.Path); i < l; i++ {
- if r.Path[i] == ':' && n < ln {
- for ; i < l && r.Path[i] != '/'; i++ {
- }
- uri.WriteString(fmt.Sprintf("%v", params[n]))
- n++
- }
- if i < l {
- uri.WriteByte(r.Path[i])
- }
- }
- break
- }
- }
- return uri.String()
-}
-
-// Routes returns the registered routes.
-func (e *Echo) Routes() []*Route {
- routes := make([]*Route, 0, len(e.router.routes))
- for _, v := range e.router.routes {
- routes = append(routes, v)
- }
- return routes
-}
-
-// AcquireContext returns an empty `Context` instance from the pool.
-// You must return the context by calling `ReleaseContext()`.
-func (e *Echo) AcquireContext() Context {
- return e.pool.Get().(Context)
-}
-
-// ReleaseContext returns the `Context` instance back to the pool.
-// You must call it after `AcquireContext()`.
-func (e *Echo) ReleaseContext(c Context) {
- e.pool.Put(c)
-}
-
-// ServeHTTP implements `http.Handler` interface, which serves HTTP requests.
-func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- // Acquire context
- c := e.pool.Get().(*context)
- c.Reset(r, w)
-
- h := NotFoundHandler
-
- if e.premiddleware == nil {
- e.findRouter(r.Host).Find(r.Method, getPath(r), c)
- h = c.Handler()
- h = applyMiddleware(h, e.middleware...)
- } else {
- h = func(c Context) error {
- e.findRouter(r.Host).Find(r.Method, getPath(r), c)
- h := c.Handler()
- h = applyMiddleware(h, e.middleware...)
- return h(c)
- }
- h = applyMiddleware(h, e.premiddleware...)
- }
-
- // Execute chain
- if err := h(c); err != nil {
- e.HTTPErrorHandler(err, c)
- }
-
- // Release context
- e.pool.Put(c)
-}
-
-// Start starts an HTTP server.
-func (e *Echo) Start(address string) error {
- e.Server.Addr = address
- return e.StartServer(e.Server)
-}
-
-// StartTLS starts an HTTPS server.
-// If `certFile` or `keyFile` is `string` the values are treated as file paths.
-// If `certFile` or `keyFile` is `[]byte` the values are treated as the certificate or key as-is.
-func (e *Echo) StartTLS(address string, certFile, keyFile interface{}) (err error) {
- var cert []byte
- if cert, err = filepathOrContent(certFile); err != nil {
- return
- }
-
- var key []byte
- if key, err = filepathOrContent(keyFile); err != nil {
- return
- }
-
- s := e.TLSServer
- s.TLSConfig = new(tls.Config)
- s.TLSConfig.Certificates = make([]tls.Certificate, 1)
- if s.TLSConfig.Certificates[0], err = tls.X509KeyPair(cert, key); err != nil {
- return
- }
-
- return e.startTLS(address)
-}
-
-func filepathOrContent(fileOrContent interface{}) (content []byte, err error) {
- switch v := fileOrContent.(type) {
- case string:
- return ioutil.ReadFile(v)
- case []byte:
- return v, nil
- default:
- return nil, ErrInvalidCertOrKeyType
- }
-}
-
-// StartAutoTLS starts an HTTPS server using certificates automatically installed from https://letsencrypt.org.
-func (e *Echo) StartAutoTLS(address string) error {
- s := e.TLSServer
- s.TLSConfig = new(tls.Config)
- s.TLSConfig.GetCertificate = e.AutoTLSManager.GetCertificate
- s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, acme.ALPNProto)
- return e.startTLS(address)
-}
-
-func (e *Echo) startTLS(address string) error {
- s := e.TLSServer
- s.Addr = address
- if !e.DisableHTTP2 {
- s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, "h2")
- }
- return e.StartServer(e.TLSServer)
-}
-
-// StartServer starts a custom http server.
-func (e *Echo) StartServer(s *http.Server) (err error) {
- // Setup
- e.colorer.SetOutput(e.Logger.Output())
- s.ErrorLog = e.StdLogger
- s.Handler = e
- if e.Debug {
- e.Logger.SetLevel(log.DEBUG)
- }
-
- if !e.HideBanner {
- e.colorer.Printf(banner, e.colorer.Red("v"+Version), e.colorer.Blue(website))
- }
-
- if s.TLSConfig == nil {
- if e.Listener == nil {
- e.Listener, err = newListener(s.Addr)
- if err != nil {
- return err
- }
- }
- if !e.HidePort {
- e.colorer.Printf("⇨ http server started on %s\n", e.colorer.Green(e.Listener.Addr()))
- }
- return s.Serve(e.Listener)
- }
- if e.TLSListener == nil {
- l, err := newListener(s.Addr)
- if err != nil {
- return err
- }
- e.TLSListener = tls.NewListener(l, s.TLSConfig)
- }
- if !e.HidePort {
- e.colorer.Printf("⇨ https server started on %s\n", e.colorer.Green(e.TLSListener.Addr()))
- }
- return s.Serve(e.TLSListener)
-}
-
-// StartH2CServer starts a custom http/2 server with h2c (HTTP/2 Cleartext).
-func (e *Echo) StartH2CServer(address string, h2s *http2.Server) (err error) {
- // Setup
- s := e.Server
- s.Addr = address
- e.colorer.SetOutput(e.Logger.Output())
- s.ErrorLog = e.StdLogger
- s.Handler = h2c.NewHandler(e, h2s)
- if e.Debug {
- e.Logger.SetLevel(log.DEBUG)
- }
-
- if !e.HideBanner {
- e.colorer.Printf(banner, e.colorer.Red("v"+Version), e.colorer.Blue(website))
- }
-
- if e.Listener == nil {
- e.Listener, err = newListener(s.Addr)
- if err != nil {
- return err
- }
- }
- if !e.HidePort {
- e.colorer.Printf("⇨ http server started on %s\n", e.colorer.Green(e.Listener.Addr()))
- }
- return s.Serve(e.Listener)
-}
-
-// Close immediately stops the server.
-// It internally calls `http.Server#Close()`.
-func (e *Echo) Close() error {
- if err := e.TLSServer.Close(); err != nil {
- return err
- }
- return e.Server.Close()
-}
-
-// Shutdown stops the server gracefully.
-// It internally calls `http.Server#Shutdown()`.
-func (e *Echo) Shutdown(ctx stdContext.Context) error {
- if err := e.TLSServer.Shutdown(ctx); err != nil {
- return err
- }
- return e.Server.Shutdown(ctx)
-}
-
-// NewHTTPError creates a new HTTPError instance.
-func NewHTTPError(code int, message ...interface{}) *HTTPError {
- he := &HTTPError{Code: code, Message: http.StatusText(code)}
- if len(message) > 0 {
- he.Message = message[0]
- }
- return he
-}
-
-// Error makes it compatible with `error` interface.
-func (he *HTTPError) Error() string {
- if he.Internal == nil {
- return fmt.Sprintf("code=%d, message=%v", he.Code, he.Message)
- }
- return fmt.Sprintf("code=%d, message=%v, internal=%v", he.Code, he.Message, he.Internal)
-}
-
-// SetInternal sets error to HTTPError.Internal
-func (he *HTTPError) SetInternal(err error) *HTTPError {
- he.Internal = err
- return he
-}
-
-// WrapHandler wraps `http.Handler` into `echo.HandlerFunc`.
-func WrapHandler(h http.Handler) HandlerFunc {
- return func(c Context) error {
- h.ServeHTTP(c.Response(), c.Request())
- return nil
- }
-}
-
-// WrapMiddleware wraps `func(http.Handler) http.Handler` into `echo.MiddlewareFunc`
-func WrapMiddleware(m func(http.Handler) http.Handler) MiddlewareFunc {
- return func(next HandlerFunc) HandlerFunc {
- return func(c Context) (err error) {
- m(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- c.SetRequest(r)
- c.SetResponse(NewResponse(w, c.Echo()))
- err = next(c)
- })).ServeHTTP(c.Response(), c.Request())
- return
- }
- }
-}
-
-func getPath(r *http.Request) string {
- path := r.URL.RawPath
- if path == "" {
- path = r.URL.Path
- }
- return path
-}
-
-func (e *Echo) findRouter(host string) *Router {
- if len(e.routers) > 0 {
- if r, ok := e.routers[host]; ok {
- return r
- }
- }
- return e.router
-}
-
-func handlerName(h HandlerFunc) string {
- t := reflect.ValueOf(h).Type()
- if t.Kind() == reflect.Func {
- return runtime.FuncForPC(reflect.ValueOf(h).Pointer()).Name()
- }
- return t.String()
-}
-
-// // PathUnescape is wraps `url.PathUnescape`
-// func PathUnescape(s string) (string, error) {
-// return url.PathUnescape(s)
-// }
-
-// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted
-// connections. It's used by ListenAndServe and ListenAndServeTLS so
-// dead TCP connections (e.g. closing laptop mid-download) eventually
-// go away.
-type tcpKeepAliveListener struct {
- *net.TCPListener
-}
-
-func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
- if c, err = ln.AcceptTCP(); err != nil {
- return
- } else if err = c.(*net.TCPConn).SetKeepAlive(true); err != nil {
- return
- }
- // Ignore error from setting the KeepAlivePeriod as some systems, such as
- // OpenBSD, do not support setting TCP_USER_TIMEOUT on IPPROTO_TCP
- _ = c.(*net.TCPConn).SetKeepAlivePeriod(3 * time.Minute)
- return
-}
-
-func newListener(address string) (*tcpKeepAliveListener, error) {
- l, err := net.Listen("tcp", address)
- if err != nil {
- return nil, err
- }
- return &tcpKeepAliveListener{l.(*net.TCPListener)}, nil
-}
-
-func applyMiddleware(h HandlerFunc, middleware ...MiddlewareFunc) HandlerFunc {
- for i := len(middleware) - 1; i >= 0; i-- {
- h = middleware[i](h)
- }
- return h
-}
diff --git a/vendor/github.com/labstack/echo/v4/go.mod b/vendor/github.com/labstack/echo/v4/go.mod
deleted file mode 100644
index b3ac0800e..000000000
--- a/vendor/github.com/labstack/echo/v4/go.mod
+++ /dev/null
@@ -1,14 +0,0 @@
-module github.com/labstack/echo/v4
-
-go 1.14
-
-require (
- github.com/dgrijalva/jwt-go v3.2.0+incompatible
- github.com/labstack/gommon v0.3.0
- github.com/mattn/go-colorable v0.1.6 // indirect
- github.com/stretchr/testify v1.4.0
- github.com/valyala/fasttemplate v1.1.0
- golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d
- golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
- golang.org/x/text v0.3.2 // indirect
-)
diff --git a/vendor/github.com/labstack/echo/v4/go.sum b/vendor/github.com/labstack/echo/v4/go.sum
deleted file mode 100644
index 8e7e54ce7..000000000
--- a/vendor/github.com/labstack/echo/v4/go.sum
+++ /dev/null
@@ -1,49 +0,0 @@
-github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dgrijalva/jwt-go v1.0.2 h1:KPldsxuKGsS2FPWsNeg9ZO18aCrGKujPoWXn2yo+KQM=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0=
-github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
-github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
-github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
-github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg=
-github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
-github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
-github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
-github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
-github.com/valyala/fasttemplate v1.1.0 h1:RZqt0yGBsps8NGvLSGW804QQqCUYYLsaOjTVHy1Ocw4=
-github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d h1:1ZiEyfaQIg3Qh0EoqpwAakHVhecoE5wlSg5GjnafJGw=
-golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/labstack/echo/v4/group.go b/vendor/github.com/labstack/echo/v4/group.go
deleted file mode 100644
index 5d9582535..000000000
--- a/vendor/github.com/labstack/echo/v4/group.go
+++ /dev/null
@@ -1,124 +0,0 @@
-package echo
-
-import (
- "net/http"
-)
-
-type (
- // Group is a set of sub-routes for a specified route. It can be used for inner
- // routes that share a common middleware or functionality that should be separate
- // from the parent echo instance while still inheriting from it.
- Group struct {
- common
- host string
- prefix string
- middleware []MiddlewareFunc
- echo *Echo
- }
-)
-
-// Use implements `Echo#Use()` for sub-routes within the Group.
-func (g *Group) Use(middleware ...MiddlewareFunc) {
- g.middleware = append(g.middleware, middleware...)
- if len(g.middleware) == 0 {
- return
- }
- // Allow all requests to reach the group as they might get dropped if router
- // doesn't find a match, making none of the group middleware process.
- g.Any("", NotFoundHandler)
- g.Any("/*", NotFoundHandler)
-}
-
-// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.
-func (g *Group) CONNECT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodConnect, path, h, m...)
-}
-
-// DELETE implements `Echo#DELETE()` for sub-routes within the Group.
-func (g *Group) DELETE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodDelete, path, h, m...)
-}
-
-// GET implements `Echo#GET()` for sub-routes within the Group.
-func (g *Group) GET(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodGet, path, h, m...)
-}
-
-// HEAD implements `Echo#HEAD()` for sub-routes within the Group.
-func (g *Group) HEAD(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodHead, path, h, m...)
-}
-
-// OPTIONS implements `Echo#OPTIONS()` for sub-routes within the Group.
-func (g *Group) OPTIONS(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodOptions, path, h, m...)
-}
-
-// PATCH implements `Echo#PATCH()` for sub-routes within the Group.
-func (g *Group) PATCH(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodPatch, path, h, m...)
-}
-
-// POST implements `Echo#POST()` for sub-routes within the Group.
-func (g *Group) POST(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodPost, path, h, m...)
-}
-
-// PUT implements `Echo#PUT()` for sub-routes within the Group.
-func (g *Group) PUT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodPut, path, h, m...)
-}
-
-// TRACE implements `Echo#TRACE()` for sub-routes within the Group.
-func (g *Group) TRACE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
- return g.Add(http.MethodTrace, path, h, m...)
-}
-
-// Any implements `Echo#Any()` for sub-routes within the Group.
-func (g *Group) Any(path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route {
- routes := make([]*Route, len(methods))
- for i, m := range methods {
- routes[i] = g.Add(m, path, handler, middleware...)
- }
- return routes
-}
-
-// Match implements `Echo#Match()` for sub-routes within the Group.
-func (g *Group) Match(methods []string, path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route {
- routes := make([]*Route, len(methods))
- for i, m := range methods {
- routes[i] = g.Add(m, path, handler, middleware...)
- }
- return routes
-}
-
-// Group creates a new sub-group with prefix and optional sub-group-level middleware.
-func (g *Group) Group(prefix string, middleware ...MiddlewareFunc) (sg *Group) {
- m := make([]MiddlewareFunc, 0, len(g.middleware)+len(middleware))
- m = append(m, g.middleware...)
- m = append(m, middleware...)
- sg = g.echo.Group(g.prefix+prefix, m...)
- sg.host = g.host
- return
-}
-
-// Static implements `Echo#Static()` for sub-routes within the Group.
-func (g *Group) Static(prefix, root string) {
- g.static(prefix, root, g.GET)
-}
-
-// File implements `Echo#File()` for sub-routes within the Group.
-func (g *Group) File(path, file string) {
- g.file(g.prefix+path, file, g.GET)
-}
-
-// Add implements `Echo#Add()` for sub-routes within the Group.
-func (g *Group) Add(method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route {
- // Combine into a new slice to avoid accidentally passing the same slice for
- // multiple routes, which would lead to later add() calls overwriting the
- // middleware from earlier calls.
- m := make([]MiddlewareFunc, 0, len(g.middleware)+len(middleware))
- m = append(m, g.middleware...)
- m = append(m, middleware...)
- return g.echo.add(g.host, method, g.prefix+path, handler, m...)
-}
diff --git a/vendor/github.com/labstack/echo/v4/ip.go b/vendor/github.com/labstack/echo/v4/ip.go
deleted file mode 100644
index 39cb421fd..000000000
--- a/vendor/github.com/labstack/echo/v4/ip.go
+++ /dev/null
@@ -1,137 +0,0 @@
-package echo
-
-import (
- "net"
- "net/http"
- "strings"
-)
-
-type ipChecker struct {
- trustLoopback bool
- trustLinkLocal bool
- trustPrivateNet bool
- trustExtraRanges []*net.IPNet
-}
-
-// TrustOption is config for which IP address to trust
-type TrustOption func(*ipChecker)
-
-// TrustLoopback configures if you trust loopback address (default: true).
-func TrustLoopback(v bool) TrustOption {
- return func(c *ipChecker) {
- c.trustLoopback = v
- }
-}
-
-// TrustLinkLocal configures if you trust link-local address (default: true).
-func TrustLinkLocal(v bool) TrustOption {
- return func(c *ipChecker) {
- c.trustLinkLocal = v
- }
-}
-
-// TrustPrivateNet configures if you trust private network address (default: true).
-func TrustPrivateNet(v bool) TrustOption {
- return func(c *ipChecker) {
- c.trustPrivateNet = v
- }
-}
-
-// TrustIPRange add trustable IP ranges using CIDR notation.
-func TrustIPRange(ipRange *net.IPNet) TrustOption {
- return func(c *ipChecker) {
- c.trustExtraRanges = append(c.trustExtraRanges, ipRange)
- }
-}
-
-func newIPChecker(configs []TrustOption) *ipChecker {
- checker := &ipChecker{trustLoopback: true, trustLinkLocal: true, trustPrivateNet: true}
- for _, configure := range configs {
- configure(checker)
- }
- return checker
-}
-
-func isPrivateIPRange(ip net.IP) bool {
- if ip4 := ip.To4(); ip4 != nil {
- return ip4[0] == 10 ||
- ip4[0] == 172 && ip4[1]&0xf0 == 16 ||
- ip4[0] == 192 && ip4[1] == 168
- }
- return len(ip) == net.IPv6len && ip[0]&0xfe == 0xfc
-}
-
-func (c *ipChecker) trust(ip net.IP) bool {
- if c.trustLoopback && ip.IsLoopback() {
- return true
- }
- if c.trustLinkLocal && ip.IsLinkLocalUnicast() {
- return true
- }
- if c.trustPrivateNet && isPrivateIPRange(ip) {
- return true
- }
- for _, trustedRange := range c.trustExtraRanges {
- if trustedRange.Contains(ip) {
- return true
- }
- }
- return false
-}
-
-// IPExtractor is a function to extract IP addr from http.Request.
-// Set appropriate one to Echo#IPExtractor.
-// See https://echo.labstack.com/guide/ip-address for more details.
-type IPExtractor func(*http.Request) string
-
-// ExtractIPDirect extracts IP address using actual IP address.
-// Use this if your server faces to internet directory (i.e.: uses no proxy).
-func ExtractIPDirect() IPExtractor {
- return func(req *http.Request) string {
- ra, _, _ := net.SplitHostPort(req.RemoteAddr)
- return ra
- }
-}
-
-// ExtractIPFromRealIPHeader extracts IP address using x-real-ip header.
-// Use this if you put proxy which uses this header.
-func ExtractIPFromRealIPHeader(options ...TrustOption) IPExtractor {
- checker := newIPChecker(options)
- return func(req *http.Request) string {
- directIP := ExtractIPDirect()(req)
- realIP := req.Header.Get(HeaderXRealIP)
- if realIP != "" {
- if ip := net.ParseIP(directIP); ip != nil && checker.trust(ip) {
- return realIP
- }
- }
- return directIP
- }
-}
-
-// ExtractIPFromXFFHeader extracts IP address using x-forwarded-for header.
-// Use this if you put proxy which uses this header.
-// This returns nearest untrustable IP. If all IPs are trustable, returns furthest one (i.e.: XFF[0]).
-func ExtractIPFromXFFHeader(options ...TrustOption) IPExtractor {
- checker := newIPChecker(options)
- return func(req *http.Request) string {
- directIP := ExtractIPDirect()(req)
- xffs := req.Header[HeaderXForwardedFor]
- if len(xffs) == 0 {
- return directIP
- }
- ips := append(strings.Split(strings.Join(xffs, ","), ","), directIP)
- for i := len(ips) - 1; i >= 0; i-- {
- ip := net.ParseIP(strings.TrimSpace(ips[i]))
- if ip == nil {
- // Unable to parse IP; cannot trust entire records
- return directIP
- }
- if !checker.trust(ip) {
- return ip.String()
- }
- }
- // All of the IPs are trusted; return first element because it is furthest from server (best effort strategy).
- return strings.TrimSpace(ips[0])
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/log.go b/vendor/github.com/labstack/echo/v4/log.go
deleted file mode 100644
index 3f8de5904..000000000
--- a/vendor/github.com/labstack/echo/v4/log.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package echo
-
-import (
- "io"
-
- "github.com/labstack/gommon/log"
-)
-
-type (
- // Logger defines the logging interface.
- Logger interface {
- Output() io.Writer
- SetOutput(w io.Writer)
- Prefix() string
- SetPrefix(p string)
- Level() log.Lvl
- SetLevel(v log.Lvl)
- SetHeader(h string)
- Print(i ...interface{})
- Printf(format string, args ...interface{})
- Printj(j log.JSON)
- Debug(i ...interface{})
- Debugf(format string, args ...interface{})
- Debugj(j log.JSON)
- Info(i ...interface{})
- Infof(format string, args ...interface{})
- Infoj(j log.JSON)
- Warn(i ...interface{})
- Warnf(format string, args ...interface{})
- Warnj(j log.JSON)
- Error(i ...interface{})
- Errorf(format string, args ...interface{})
- Errorj(j log.JSON)
- Fatal(i ...interface{})
- Fatalj(j log.JSON)
- Fatalf(format string, args ...interface{})
- Panic(i ...interface{})
- Panicj(j log.JSON)
- Panicf(format string, args ...interface{})
- }
-)
diff --git a/vendor/github.com/labstack/echo/v4/middleware/basic_auth.go b/vendor/github.com/labstack/echo/v4/middleware/basic_auth.go
deleted file mode 100644
index 76ba24206..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/basic_auth.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package middleware
-
-import (
- "encoding/base64"
- "strconv"
- "strings"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // BasicAuthConfig defines the config for BasicAuth middleware.
- BasicAuthConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Validator is a function to validate BasicAuth credentials.
- // Required.
- Validator BasicAuthValidator
-
- // Realm is a string to define realm attribute of BasicAuth.
- // Default value "Restricted".
- Realm string
- }
-
- // BasicAuthValidator defines a function to validate BasicAuth credentials.
- BasicAuthValidator func(string, string, echo.Context) (bool, error)
-)
-
-const (
- basic = "basic"
- defaultRealm = "Restricted"
-)
-
-var (
- // DefaultBasicAuthConfig is the default BasicAuth middleware config.
- DefaultBasicAuthConfig = BasicAuthConfig{
- Skipper: DefaultSkipper,
- Realm: defaultRealm,
- }
-)
-
-// BasicAuth returns an BasicAuth middleware.
-//
-// For valid credentials it calls the next handler.
-// For missing or invalid credentials, it sends "401 - Unauthorized" response.
-func BasicAuth(fn BasicAuthValidator) echo.MiddlewareFunc {
- c := DefaultBasicAuthConfig
- c.Validator = fn
- return BasicAuthWithConfig(c)
-}
-
-// BasicAuthWithConfig returns an BasicAuth middleware with config.
-// See `BasicAuth()`.
-func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Validator == nil {
- panic("echo: basic-auth middleware requires a validator function")
- }
- if config.Skipper == nil {
- config.Skipper = DefaultBasicAuthConfig.Skipper
- }
- if config.Realm == "" {
- config.Realm = defaultRealm
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- auth := c.Request().Header.Get(echo.HeaderAuthorization)
- l := len(basic)
-
- if len(auth) > l+1 && strings.ToLower(auth[:l]) == basic {
- b, err := base64.StdEncoding.DecodeString(auth[l+1:])
- if err != nil {
- return err
- }
- cred := string(b)
- for i := 0; i < len(cred); i++ {
- if cred[i] == ':' {
- // Verify credentials
- valid, err := config.Validator(cred[:i], cred[i+1:], c)
- if err != nil {
- return err
- } else if valid {
- return next(c)
- }
- break
- }
- }
- }
-
- realm := defaultRealm
- if config.Realm != defaultRealm {
- realm = strconv.Quote(config.Realm)
- }
-
- // Need to return `401` for browsers to pop-up login box.
- c.Response().Header().Set(echo.HeaderWWWAuthenticate, basic+" realm="+realm)
- return echo.ErrUnauthorized
- }
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/body_dump.go b/vendor/github.com/labstack/echo/v4/middleware/body_dump.go
deleted file mode 100644
index ebd0d0ab2..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/body_dump.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package middleware
-
-import (
- "bufio"
- "bytes"
- "io"
- "io/ioutil"
- "net"
- "net/http"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // BodyDumpConfig defines the config for BodyDump middleware.
- BodyDumpConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Handler receives request and response payload.
- // Required.
- Handler BodyDumpHandler
- }
-
- // BodyDumpHandler receives the request and response payload.
- BodyDumpHandler func(echo.Context, []byte, []byte)
-
- bodyDumpResponseWriter struct {
- io.Writer
- http.ResponseWriter
- }
-)
-
-var (
- // DefaultBodyDumpConfig is the default BodyDump middleware config.
- DefaultBodyDumpConfig = BodyDumpConfig{
- Skipper: DefaultSkipper,
- }
-)
-
-// BodyDump returns a BodyDump middleware.
-//
-// BodyDump middleware captures the request and response payload and calls the
-// registered handler.
-func BodyDump(handler BodyDumpHandler) echo.MiddlewareFunc {
- c := DefaultBodyDumpConfig
- c.Handler = handler
- return BodyDumpWithConfig(c)
-}
-
-// BodyDumpWithConfig returns a BodyDump middleware with config.
-// See: `BodyDump()`.
-func BodyDumpWithConfig(config BodyDumpConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Handler == nil {
- panic("echo: body-dump middleware requires a handler function")
- }
- if config.Skipper == nil {
- config.Skipper = DefaultBodyDumpConfig.Skipper
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) (err error) {
- if config.Skipper(c) {
- return next(c)
- }
-
- // Request
- reqBody := []byte{}
- if c.Request().Body != nil { // Read
- reqBody, _ = ioutil.ReadAll(c.Request().Body)
- }
- c.Request().Body = ioutil.NopCloser(bytes.NewBuffer(reqBody)) // Reset
-
- // Response
- resBody := new(bytes.Buffer)
- mw := io.MultiWriter(c.Response().Writer, resBody)
- writer := &bodyDumpResponseWriter{Writer: mw, ResponseWriter: c.Response().Writer}
- c.Response().Writer = writer
-
- if err = next(c); err != nil {
- c.Error(err)
- }
-
- // Callback
- config.Handler(c, reqBody, resBody.Bytes())
-
- return
- }
- }
-}
-
-func (w *bodyDumpResponseWriter) WriteHeader(code int) {
- w.ResponseWriter.WriteHeader(code)
-}
-
-func (w *bodyDumpResponseWriter) Write(b []byte) (int, error) {
- return w.Writer.Write(b)
-}
-
-func (w *bodyDumpResponseWriter) Flush() {
- w.ResponseWriter.(http.Flusher).Flush()
-}
-
-func (w *bodyDumpResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- return w.ResponseWriter.(http.Hijacker).Hijack()
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/body_limit.go b/vendor/github.com/labstack/echo/v4/middleware/body_limit.go
deleted file mode 100644
index b436bd595..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/body_limit.go
+++ /dev/null
@@ -1,117 +0,0 @@
-package middleware
-
-import (
- "fmt"
- "io"
- "sync"
-
- "github.com/labstack/echo/v4"
- "github.com/labstack/gommon/bytes"
-)
-
-type (
- // BodyLimitConfig defines the config for BodyLimit middleware.
- BodyLimitConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Maximum allowed size for a request body, it can be specified
- // as `4x` or `4xB`, where x is one of the multiple from K, M, G, T or P.
- Limit string `yaml:"limit"`
- limit int64
- }
-
- limitedReader struct {
- BodyLimitConfig
- reader io.ReadCloser
- read int64
- context echo.Context
- }
-)
-
-var (
- // DefaultBodyLimitConfig is the default BodyLimit middleware config.
- DefaultBodyLimitConfig = BodyLimitConfig{
- Skipper: DefaultSkipper,
- }
-)
-
-// BodyLimit returns a BodyLimit middleware.
-//
-// BodyLimit middleware sets the maximum allowed size for a request body, if the
-// size exceeds the configured limit, it sends "413 - Request Entity Too Large"
-// response. The BodyLimit is determined based on both `Content-Length` request
-// header and actual content read, which makes it super secure.
-// Limit can be specified as `4x` or `4xB`, where x is one of the multiple from K, M,
-// G, T or P.
-func BodyLimit(limit string) echo.MiddlewareFunc {
- c := DefaultBodyLimitConfig
- c.Limit = limit
- return BodyLimitWithConfig(c)
-}
-
-// BodyLimitWithConfig returns a BodyLimit middleware with config.
-// See: `BodyLimit()`.
-func BodyLimitWithConfig(config BodyLimitConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultBodyLimitConfig.Skipper
- }
-
- limit, err := bytes.Parse(config.Limit)
- if err != nil {
- panic(fmt.Errorf("echo: invalid body-limit=%s", config.Limit))
- }
- config.limit = limit
- pool := limitedReaderPool(config)
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- req := c.Request()
-
- // Based on content length
- if req.ContentLength > config.limit {
- return echo.ErrStatusRequestEntityTooLarge
- }
-
- // Based on content read
- r := pool.Get().(*limitedReader)
- r.Reset(req.Body, c)
- defer pool.Put(r)
- req.Body = r
-
- return next(c)
- }
- }
-}
-
-func (r *limitedReader) Read(b []byte) (n int, err error) {
- n, err = r.reader.Read(b)
- r.read += int64(n)
- if r.read > r.limit {
- return n, echo.ErrStatusRequestEntityTooLarge
- }
- return
-}
-
-func (r *limitedReader) Close() error {
- return r.reader.Close()
-}
-
-func (r *limitedReader) Reset(reader io.ReadCloser, context echo.Context) {
- r.reader = reader
- r.context = context
- r.read = 0
-}
-
-func limitedReaderPool(c BodyLimitConfig) sync.Pool {
- return sync.Pool{
- New: func() interface{} {
- return &limitedReader{BodyLimitConfig: c}
- },
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/compress.go b/vendor/github.com/labstack/echo/v4/middleware/compress.go
deleted file mode 100644
index 89da16efe..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/compress.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package middleware
-
-import (
- "bufio"
- "compress/gzip"
- "io"
- "io/ioutil"
- "net"
- "net/http"
- "strings"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // GzipConfig defines the config for Gzip middleware.
- GzipConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Gzip compression level.
- // Optional. Default value -1.
- Level int `yaml:"level"`
- }
-
- gzipResponseWriter struct {
- io.Writer
- http.ResponseWriter
- }
-)
-
-const (
- gzipScheme = "gzip"
-)
-
-var (
- // DefaultGzipConfig is the default Gzip middleware config.
- DefaultGzipConfig = GzipConfig{
- Skipper: DefaultSkipper,
- Level: -1,
- }
-)
-
-// Gzip returns a middleware which compresses HTTP response using gzip compression
-// scheme.
-func Gzip() echo.MiddlewareFunc {
- return GzipWithConfig(DefaultGzipConfig)
-}
-
-// GzipWithConfig return Gzip middleware with config.
-// See: `Gzip()`.
-func GzipWithConfig(config GzipConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultGzipConfig.Skipper
- }
- if config.Level == 0 {
- config.Level = DefaultGzipConfig.Level
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- res := c.Response()
- res.Header().Add(echo.HeaderVary, echo.HeaderAcceptEncoding)
- if strings.Contains(c.Request().Header.Get(echo.HeaderAcceptEncoding), gzipScheme) {
- res.Header().Set(echo.HeaderContentEncoding, gzipScheme) // Issue #806
- rw := res.Writer
- w, err := gzip.NewWriterLevel(rw, config.Level)
- if err != nil {
- return err
- }
- defer func() {
- if res.Size == 0 {
- if res.Header().Get(echo.HeaderContentEncoding) == gzipScheme {
- res.Header().Del(echo.HeaderContentEncoding)
- }
- // We have to reset response to it's pristine state when
- // nothing is written to body or error is returned.
- // See issue #424, #407.
- res.Writer = rw
- w.Reset(ioutil.Discard)
- }
- w.Close()
- }()
- grw := &gzipResponseWriter{Writer: w, ResponseWriter: rw}
- res.Writer = grw
- }
- return next(c)
- }
- }
-}
-
-func (w *gzipResponseWriter) WriteHeader(code int) {
- if code == http.StatusNoContent { // Issue #489
- w.ResponseWriter.Header().Del(echo.HeaderContentEncoding)
- }
- w.Header().Del(echo.HeaderContentLength) // Issue #444
- w.ResponseWriter.WriteHeader(code)
-}
-
-func (w *gzipResponseWriter) Write(b []byte) (int, error) {
- if w.Header().Get(echo.HeaderContentType) == "" {
- w.Header().Set(echo.HeaderContentType, http.DetectContentType(b))
- }
- return w.Writer.Write(b)
-}
-
-func (w *gzipResponseWriter) Flush() {
- w.Writer.(*gzip.Writer).Flush()
- if flusher, ok := w.ResponseWriter.(http.Flusher); ok {
- flusher.Flush()
- }
-}
-
-func (w *gzipResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- return w.ResponseWriter.(http.Hijacker).Hijack()
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/cors.go b/vendor/github.com/labstack/echo/v4/middleware/cors.go
deleted file mode 100644
index 5dfe31f95..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/cors.go
+++ /dev/null
@@ -1,147 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strconv"
- "strings"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // CORSConfig defines the config for CORS middleware.
- CORSConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // AllowOrigin defines a list of origins that may access the resource.
- // Optional. Default value []string{"*"}.
- AllowOrigins []string `yaml:"allow_origins"`
-
- // AllowMethods defines a list methods allowed when accessing the resource.
- // This is used in response to a preflight request.
- // Optional. Default value DefaultCORSConfig.AllowMethods.
- AllowMethods []string `yaml:"allow_methods"`
-
- // AllowHeaders defines a list of request headers that can be used when
- // making the actual request. This is in response to a preflight request.
- // Optional. Default value []string{}.
- AllowHeaders []string `yaml:"allow_headers"`
-
- // AllowCredentials indicates whether or not the response to the request
- // can be exposed when the credentials flag is true. When used as part of
- // a response to a preflight request, this indicates whether or not the
- // actual request can be made using credentials.
- // Optional. Default value false.
- AllowCredentials bool `yaml:"allow_credentials"`
-
- // ExposeHeaders defines a whitelist headers that clients are allowed to
- // access.
- // Optional. Default value []string{}.
- ExposeHeaders []string `yaml:"expose_headers"`
-
- // MaxAge indicates how long (in seconds) the results of a preflight request
- // can be cached.
- // Optional. Default value 0.
- MaxAge int `yaml:"max_age"`
- }
-)
-
-var (
- // DefaultCORSConfig is the default CORS middleware config.
- DefaultCORSConfig = CORSConfig{
- Skipper: DefaultSkipper,
- AllowOrigins: []string{"*"},
- AllowMethods: []string{http.MethodGet, http.MethodHead, http.MethodPut, http.MethodPatch, http.MethodPost, http.MethodDelete},
- }
-)
-
-// CORS returns a Cross-Origin Resource Sharing (CORS) middleware.
-// See: https://developer.mozilla.org/en/docs/Web/HTTP/Access_control_CORS
-func CORS() echo.MiddlewareFunc {
- return CORSWithConfig(DefaultCORSConfig)
-}
-
-// CORSWithConfig returns a CORS middleware with config.
-// See: `CORS()`.
-func CORSWithConfig(config CORSConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultCORSConfig.Skipper
- }
- if len(config.AllowOrigins) == 0 {
- config.AllowOrigins = DefaultCORSConfig.AllowOrigins
- }
- if len(config.AllowMethods) == 0 {
- config.AllowMethods = DefaultCORSConfig.AllowMethods
- }
-
- allowMethods := strings.Join(config.AllowMethods, ",")
- allowHeaders := strings.Join(config.AllowHeaders, ",")
- exposeHeaders := strings.Join(config.ExposeHeaders, ",")
- maxAge := strconv.Itoa(config.MaxAge)
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- req := c.Request()
- res := c.Response()
- origin := req.Header.Get(echo.HeaderOrigin)
- allowOrigin := ""
-
- // Check allowed origins
- for _, o := range config.AllowOrigins {
- if o == "*" && config.AllowCredentials {
- allowOrigin = origin
- break
- }
- if o == "*" || o == origin {
- allowOrigin = o
- break
- }
- if matchSubdomain(origin, o) {
- allowOrigin = origin
- break
- }
- }
-
- // Simple request
- if req.Method != http.MethodOptions {
- res.Header().Add(echo.HeaderVary, echo.HeaderOrigin)
- res.Header().Set(echo.HeaderAccessControlAllowOrigin, allowOrigin)
- if config.AllowCredentials {
- res.Header().Set(echo.HeaderAccessControlAllowCredentials, "true")
- }
- if exposeHeaders != "" {
- res.Header().Set(echo.HeaderAccessControlExposeHeaders, exposeHeaders)
- }
- return next(c)
- }
-
- // Preflight request
- res.Header().Add(echo.HeaderVary, echo.HeaderOrigin)
- res.Header().Add(echo.HeaderVary, echo.HeaderAccessControlRequestMethod)
- res.Header().Add(echo.HeaderVary, echo.HeaderAccessControlRequestHeaders)
- res.Header().Set(echo.HeaderAccessControlAllowOrigin, allowOrigin)
- res.Header().Set(echo.HeaderAccessControlAllowMethods, allowMethods)
- if config.AllowCredentials {
- res.Header().Set(echo.HeaderAccessControlAllowCredentials, "true")
- }
- if allowHeaders != "" {
- res.Header().Set(echo.HeaderAccessControlAllowHeaders, allowHeaders)
- } else {
- h := req.Header.Get(echo.HeaderAccessControlRequestHeaders)
- if h != "" {
- res.Header().Set(echo.HeaderAccessControlAllowHeaders, h)
- }
- }
- if config.MaxAge > 0 {
- res.Header().Set(echo.HeaderAccessControlMaxAge, maxAge)
- }
- return c.NoContent(http.StatusNoContent)
- }
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/csrf.go b/vendor/github.com/labstack/echo/v4/middleware/csrf.go
deleted file mode 100644
index 09a66bb64..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/csrf.go
+++ /dev/null
@@ -1,210 +0,0 @@
-package middleware
-
-import (
- "crypto/subtle"
- "errors"
- "net/http"
- "strings"
- "time"
-
- "github.com/labstack/echo/v4"
- "github.com/labstack/gommon/random"
-)
-
-type (
- // CSRFConfig defines the config for CSRF middleware.
- CSRFConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // TokenLength is the length of the generated token.
- TokenLength uint8 `yaml:"token_length"`
- // Optional. Default value 32.
-
- // TokenLookup is a string in the form of ":" that is used
- // to extract token from the request.
- // Optional. Default value "header:X-CSRF-Token".
- // Possible values:
- // - "header:"
- // - "form:"
- // - "query:"
- TokenLookup string `yaml:"token_lookup"`
-
- // Context key to store generated CSRF token into context.
- // Optional. Default value "csrf".
- ContextKey string `yaml:"context_key"`
-
- // Name of the CSRF cookie. This cookie will store CSRF token.
- // Optional. Default value "csrf".
- CookieName string `yaml:"cookie_name"`
-
- // Domain of the CSRF cookie.
- // Optional. Default value none.
- CookieDomain string `yaml:"cookie_domain"`
-
- // Path of the CSRF cookie.
- // Optional. Default value none.
- CookiePath string `yaml:"cookie_path"`
-
- // Max age (in seconds) of the CSRF cookie.
- // Optional. Default value 86400 (24hr).
- CookieMaxAge int `yaml:"cookie_max_age"`
-
- // Indicates if CSRF cookie is secure.
- // Optional. Default value false.
- CookieSecure bool `yaml:"cookie_secure"`
-
- // Indicates if CSRF cookie is HTTP only.
- // Optional. Default value false.
- CookieHTTPOnly bool `yaml:"cookie_http_only"`
- }
-
- // csrfTokenExtractor defines a function that takes `echo.Context` and returns
- // either a token or an error.
- csrfTokenExtractor func(echo.Context) (string, error)
-)
-
-var (
- // DefaultCSRFConfig is the default CSRF middleware config.
- DefaultCSRFConfig = CSRFConfig{
- Skipper: DefaultSkipper,
- TokenLength: 32,
- TokenLookup: "header:" + echo.HeaderXCSRFToken,
- ContextKey: "csrf",
- CookieName: "_csrf",
- CookieMaxAge: 86400,
- }
-)
-
-// CSRF returns a Cross-Site Request Forgery (CSRF) middleware.
-// See: https://en.wikipedia.org/wiki/Cross-site_request_forgery
-func CSRF() echo.MiddlewareFunc {
- c := DefaultCSRFConfig
- return CSRFWithConfig(c)
-}
-
-// CSRFWithConfig returns a CSRF middleware with config.
-// See `CSRF()`.
-func CSRFWithConfig(config CSRFConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultCSRFConfig.Skipper
- }
- if config.TokenLength == 0 {
- config.TokenLength = DefaultCSRFConfig.TokenLength
- }
- if config.TokenLookup == "" {
- config.TokenLookup = DefaultCSRFConfig.TokenLookup
- }
- if config.ContextKey == "" {
- config.ContextKey = DefaultCSRFConfig.ContextKey
- }
- if config.CookieName == "" {
- config.CookieName = DefaultCSRFConfig.CookieName
- }
- if config.CookieMaxAge == 0 {
- config.CookieMaxAge = DefaultCSRFConfig.CookieMaxAge
- }
-
- // Initialize
- parts := strings.Split(config.TokenLookup, ":")
- extractor := csrfTokenFromHeader(parts[1])
- switch parts[0] {
- case "form":
- extractor = csrfTokenFromForm(parts[1])
- case "query":
- extractor = csrfTokenFromQuery(parts[1])
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- req := c.Request()
- k, err := c.Cookie(config.CookieName)
- token := ""
-
- // Generate token
- if err != nil {
- token = random.String(config.TokenLength)
- } else {
- // Reuse token
- token = k.Value
- }
-
- switch req.Method {
- case http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodTrace:
- default:
- // Validate token only for requests which are not defined as 'safe' by RFC7231
- clientToken, err := extractor(c)
- if err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, err.Error())
- }
- if !validateCSRFToken(token, clientToken) {
- return echo.NewHTTPError(http.StatusForbidden, "invalid csrf token")
- }
- }
-
- // Set CSRF cookie
- cookie := new(http.Cookie)
- cookie.Name = config.CookieName
- cookie.Value = token
- if config.CookiePath != "" {
- cookie.Path = config.CookiePath
- }
- if config.CookieDomain != "" {
- cookie.Domain = config.CookieDomain
- }
- cookie.Expires = time.Now().Add(time.Duration(config.CookieMaxAge) * time.Second)
- cookie.Secure = config.CookieSecure
- cookie.HttpOnly = config.CookieHTTPOnly
- c.SetCookie(cookie)
-
- // Store token in the context
- c.Set(config.ContextKey, token)
-
- // Protect clients from caching the response
- c.Response().Header().Add(echo.HeaderVary, echo.HeaderCookie)
-
- return next(c)
- }
- }
-}
-
-// csrfTokenFromForm returns a `csrfTokenExtractor` that extracts token from the
-// provided request header.
-func csrfTokenFromHeader(header string) csrfTokenExtractor {
- return func(c echo.Context) (string, error) {
- return c.Request().Header.Get(header), nil
- }
-}
-
-// csrfTokenFromForm returns a `csrfTokenExtractor` that extracts token from the
-// provided form parameter.
-func csrfTokenFromForm(param string) csrfTokenExtractor {
- return func(c echo.Context) (string, error) {
- token := c.FormValue(param)
- if token == "" {
- return "", errors.New("missing csrf token in the form parameter")
- }
- return token, nil
- }
-}
-
-// csrfTokenFromQuery returns a `csrfTokenExtractor` that extracts token from the
-// provided query parameter.
-func csrfTokenFromQuery(param string) csrfTokenExtractor {
- return func(c echo.Context) (string, error) {
- token := c.QueryParam(param)
- if token == "" {
- return "", errors.New("missing csrf token in the query string")
- }
- return token, nil
- }
-}
-
-func validateCSRFToken(token, clientToken string) bool {
- return subtle.ConstantTimeCompare([]byte(token), []byte(clientToken)) == 1
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/jwt.go b/vendor/github.com/labstack/echo/v4/middleware/jwt.go
deleted file mode 100644
index 3c7c48681..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/jwt.go
+++ /dev/null
@@ -1,267 +0,0 @@
-package middleware
-
-import (
- "fmt"
- "net/http"
- "reflect"
- "strings"
-
- "github.com/dgrijalva/jwt-go"
- "github.com/labstack/echo/v4"
-)
-
-type (
- // JWTConfig defines the config for JWT middleware.
- JWTConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // BeforeFunc defines a function which is executed just before the middleware.
- BeforeFunc BeforeFunc
-
- // SuccessHandler defines a function which is executed for a valid token.
- SuccessHandler JWTSuccessHandler
-
- // ErrorHandler defines a function which is executed for an invalid token.
- // It may be used to define a custom JWT error.
- ErrorHandler JWTErrorHandler
-
- // ErrorHandlerWithContext is almost identical to ErrorHandler, but it's passed the current context.
- ErrorHandlerWithContext JWTErrorHandlerWithContext
-
- // Signing key to validate token. Used as fallback if SigningKeys has length 0.
- // Required. This or SigningKeys.
- SigningKey interface{}
-
- // Map of signing keys to validate token with kid field usage.
- // Required. This or SigningKey.
- SigningKeys map[string]interface{}
-
- // Signing method, used to check token signing method.
- // Optional. Default value HS256.
- SigningMethod string
-
- // Context key to store user information from the token into context.
- // Optional. Default value "user".
- ContextKey string
-
- // Claims are extendable claims data defining token content.
- // Optional. Default value jwt.MapClaims
- Claims jwt.Claims
-
- // TokenLookup is a string in the form of ":" that is used
- // to extract token from the request.
- // Optional. Default value "header:Authorization".
- // Possible values:
- // - "header:"
- // - "query:"
- // - "param:"
- // - "cookie:"
- TokenLookup string
-
- // AuthScheme to be used in the Authorization header.
- // Optional. Default value "Bearer".
- AuthScheme string
-
- keyFunc jwt.Keyfunc
- }
-
- // JWTSuccessHandler defines a function which is executed for a valid token.
- JWTSuccessHandler func(echo.Context)
-
- // JWTErrorHandler defines a function which is executed for an invalid token.
- JWTErrorHandler func(error) error
-
- // JWTErrorHandlerWithContext is almost identical to JWTErrorHandler, but it's passed the current context.
- JWTErrorHandlerWithContext func(error, echo.Context) error
-
- jwtExtractor func(echo.Context) (string, error)
-)
-
-// Algorithms
-const (
- AlgorithmHS256 = "HS256"
-)
-
-// Errors
-var (
- ErrJWTMissing = echo.NewHTTPError(http.StatusBadRequest, "missing or malformed jwt")
-)
-
-var (
- // DefaultJWTConfig is the default JWT auth middleware config.
- DefaultJWTConfig = JWTConfig{
- Skipper: DefaultSkipper,
- SigningMethod: AlgorithmHS256,
- ContextKey: "user",
- TokenLookup: "header:" + echo.HeaderAuthorization,
- AuthScheme: "Bearer",
- Claims: jwt.MapClaims{},
- }
-)
-
-// JWT returns a JSON Web Token (JWT) auth middleware.
-//
-// For valid token, it sets the user in context and calls next handler.
-// For invalid token, it returns "401 - Unauthorized" error.
-// For missing token, it returns "400 - Bad Request" error.
-//
-// See: https://jwt.io/introduction
-// See `JWTConfig.TokenLookup`
-func JWT(key interface{}) echo.MiddlewareFunc {
- c := DefaultJWTConfig
- c.SigningKey = key
- return JWTWithConfig(c)
-}
-
-// JWTWithConfig returns a JWT auth middleware with config.
-// See: `JWT()`.
-func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultJWTConfig.Skipper
- }
- if config.SigningKey == nil && len(config.SigningKeys) == 0 {
- panic("echo: jwt middleware requires signing key")
- }
- if config.SigningMethod == "" {
- config.SigningMethod = DefaultJWTConfig.SigningMethod
- }
- if config.ContextKey == "" {
- config.ContextKey = DefaultJWTConfig.ContextKey
- }
- if config.Claims == nil {
- config.Claims = DefaultJWTConfig.Claims
- }
- if config.TokenLookup == "" {
- config.TokenLookup = DefaultJWTConfig.TokenLookup
- }
- if config.AuthScheme == "" {
- config.AuthScheme = DefaultJWTConfig.AuthScheme
- }
- config.keyFunc = func(t *jwt.Token) (interface{}, error) {
- // Check the signing method
- if t.Method.Alg() != config.SigningMethod {
- return nil, fmt.Errorf("unexpected jwt signing method=%v", t.Header["alg"])
- }
- if len(config.SigningKeys) > 0 {
- if kid, ok := t.Header["kid"].(string); ok {
- if key, ok := config.SigningKeys[kid]; ok {
- return key, nil
- }
- }
- return nil, fmt.Errorf("unexpected jwt key id=%v", t.Header["kid"])
- }
-
- return config.SigningKey, nil
- }
-
- // Initialize
- parts := strings.Split(config.TokenLookup, ":")
- extractor := jwtFromHeader(parts[1], config.AuthScheme)
- switch parts[0] {
- case "query":
- extractor = jwtFromQuery(parts[1])
- case "param":
- extractor = jwtFromParam(parts[1])
- case "cookie":
- extractor = jwtFromCookie(parts[1])
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- if config.BeforeFunc != nil {
- config.BeforeFunc(c)
- }
-
- auth, err := extractor(c)
- if err != nil {
- if config.ErrorHandler != nil {
- return config.ErrorHandler(err)
- }
-
- if config.ErrorHandlerWithContext != nil {
- return config.ErrorHandlerWithContext(err, c)
- }
- return err
- }
- token := new(jwt.Token)
- // Issue #647, #656
- if _, ok := config.Claims.(jwt.MapClaims); ok {
- token, err = jwt.Parse(auth, config.keyFunc)
- } else {
- t := reflect.ValueOf(config.Claims).Type().Elem()
- claims := reflect.New(t).Interface().(jwt.Claims)
- token, err = jwt.ParseWithClaims(auth, claims, config.keyFunc)
- }
- if err == nil && token.Valid {
- // Store user information from token into context.
- c.Set(config.ContextKey, token)
- if config.SuccessHandler != nil {
- config.SuccessHandler(c)
- }
- return next(c)
- }
- if config.ErrorHandler != nil {
- return config.ErrorHandler(err)
- }
- if config.ErrorHandlerWithContext != nil {
- return config.ErrorHandlerWithContext(err, c)
- }
- return &echo.HTTPError{
- Code: http.StatusUnauthorized,
- Message: "invalid or expired jwt",
- Internal: err,
- }
- }
- }
-}
-
-// jwtFromHeader returns a `jwtExtractor` that extracts token from the request header.
-func jwtFromHeader(header string, authScheme string) jwtExtractor {
- return func(c echo.Context) (string, error) {
- auth := c.Request().Header.Get(header)
- l := len(authScheme)
- if len(auth) > l+1 && auth[:l] == authScheme {
- return auth[l+1:], nil
- }
- return "", ErrJWTMissing
- }
-}
-
-// jwtFromQuery returns a `jwtExtractor` that extracts token from the query string.
-func jwtFromQuery(param string) jwtExtractor {
- return func(c echo.Context) (string, error) {
- token := c.QueryParam(param)
- if token == "" {
- return "", ErrJWTMissing
- }
- return token, nil
- }
-}
-
-// jwtFromParam returns a `jwtExtractor` that extracts token from the url param string.
-func jwtFromParam(param string) jwtExtractor {
- return func(c echo.Context) (string, error) {
- token := c.Param(param)
- if token == "" {
- return "", ErrJWTMissing
- }
- return token, nil
- }
-}
-
-// jwtFromCookie returns a `jwtExtractor` that extracts token from the named cookie.
-func jwtFromCookie(name string) jwtExtractor {
- return func(c echo.Context) (string, error) {
- cookie, err := c.Cookie(name)
- if err != nil {
- return "", ErrJWTMissing
- }
- return cookie.Value, nil
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/key_auth.go b/vendor/github.com/labstack/echo/v4/middleware/key_auth.go
deleted file mode 100644
index 94cfd1429..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/key_auth.go
+++ /dev/null
@@ -1,153 +0,0 @@
-package middleware
-
-import (
- "errors"
- "net/http"
- "strings"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // KeyAuthConfig defines the config for KeyAuth middleware.
- KeyAuthConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // KeyLookup is a string in the form of ":" that is used
- // to extract key from the request.
- // Optional. Default value "header:Authorization".
- // Possible values:
- // - "header:"
- // - "query:"
- // - "form:"
- KeyLookup string `yaml:"key_lookup"`
-
- // AuthScheme to be used in the Authorization header.
- // Optional. Default value "Bearer".
- AuthScheme string
-
- // Validator is a function to validate key.
- // Required.
- Validator KeyAuthValidator
- }
-
- // KeyAuthValidator defines a function to validate KeyAuth credentials.
- KeyAuthValidator func(string, echo.Context) (bool, error)
-
- keyExtractor func(echo.Context) (string, error)
-)
-
-var (
- // DefaultKeyAuthConfig is the default KeyAuth middleware config.
- DefaultKeyAuthConfig = KeyAuthConfig{
- Skipper: DefaultSkipper,
- KeyLookup: "header:" + echo.HeaderAuthorization,
- AuthScheme: "Bearer",
- }
-)
-
-// KeyAuth returns an KeyAuth middleware.
-//
-// For valid key it calls the next handler.
-// For invalid key, it sends "401 - Unauthorized" response.
-// For missing key, it sends "400 - Bad Request" response.
-func KeyAuth(fn KeyAuthValidator) echo.MiddlewareFunc {
- c := DefaultKeyAuthConfig
- c.Validator = fn
- return KeyAuthWithConfig(c)
-}
-
-// KeyAuthWithConfig returns an KeyAuth middleware with config.
-// See `KeyAuth()`.
-func KeyAuthWithConfig(config KeyAuthConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultKeyAuthConfig.Skipper
- }
- // Defaults
- if config.AuthScheme == "" {
- config.AuthScheme = DefaultKeyAuthConfig.AuthScheme
- }
- if config.KeyLookup == "" {
- config.KeyLookup = DefaultKeyAuthConfig.KeyLookup
- }
- if config.Validator == nil {
- panic("echo: key-auth middleware requires a validator function")
- }
-
- // Initialize
- parts := strings.Split(config.KeyLookup, ":")
- extractor := keyFromHeader(parts[1], config.AuthScheme)
- switch parts[0] {
- case "query":
- extractor = keyFromQuery(parts[1])
- case "form":
- extractor = keyFromForm(parts[1])
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- // Extract and verify key
- key, err := extractor(c)
- if err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, err.Error())
- }
- valid, err := config.Validator(key, c)
- if err != nil {
- return &echo.HTTPError{
- Code: http.StatusUnauthorized,
- Message: "invalid key",
- Internal: err,
- }
- } else if valid {
- return next(c)
- }
- return echo.ErrUnauthorized
- }
- }
-}
-
-// keyFromHeader returns a `keyExtractor` that extracts key from the request header.
-func keyFromHeader(header string, authScheme string) keyExtractor {
- return func(c echo.Context) (string, error) {
- auth := c.Request().Header.Get(header)
- if auth == "" {
- return "", errors.New("missing key in request header")
- }
- if header == echo.HeaderAuthorization {
- l := len(authScheme)
- if len(auth) > l+1 && auth[:l] == authScheme {
- return auth[l+1:], nil
- }
- return "", errors.New("invalid key in the request header")
- }
- return auth, nil
- }
-}
-
-// keyFromQuery returns a `keyExtractor` that extracts key from the query string.
-func keyFromQuery(param string) keyExtractor {
- return func(c echo.Context) (string, error) {
- key := c.QueryParam(param)
- if key == "" {
- return "", errors.New("missing key in the query string")
- }
- return key, nil
- }
-}
-
-// keyFromForm returns a `keyExtractor` that extracts key from the form.
-func keyFromForm(param string) keyExtractor {
- return func(c echo.Context) (string, error) {
- key := c.FormValue(param)
- if key == "" {
- return "", errors.New("missing key in the form")
- }
- return key, nil
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/logger.go b/vendor/github.com/labstack/echo/v4/middleware/logger.go
deleted file mode 100644
index 9baac4769..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/logger.go
+++ /dev/null
@@ -1,223 +0,0 @@
-package middleware
-
-import (
- "bytes"
- "encoding/json"
- "io"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "github.com/labstack/echo/v4"
- "github.com/labstack/gommon/color"
- "github.com/valyala/fasttemplate"
-)
-
-type (
- // LoggerConfig defines the config for Logger middleware.
- LoggerConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Tags to construct the logger format.
- //
- // - time_unix
- // - time_unix_nano
- // - time_rfc3339
- // - time_rfc3339_nano
- // - time_custom
- // - id (Request ID)
- // - remote_ip
- // - uri
- // - host
- // - method
- // - path
- // - protocol
- // - referer
- // - user_agent
- // - status
- // - error
- // - latency (In nanoseconds)
- // - latency_human (Human readable)
- // - bytes_in (Bytes received)
- // - bytes_out (Bytes sent)
- // - header:
- // - query:
- // - form:
- //
- // Example "${remote_ip} ${status}"
- //
- // Optional. Default value DefaultLoggerConfig.Format.
- Format string `yaml:"format"`
-
- // Optional. Default value DefaultLoggerConfig.CustomTimeFormat.
- CustomTimeFormat string `yaml:"custom_time_format"`
-
- // Output is a writer where logs in JSON format are written.
- // Optional. Default value os.Stdout.
- Output io.Writer
-
- template *fasttemplate.Template
- colorer *color.Color
- pool *sync.Pool
- }
-)
-
-var (
- // DefaultLoggerConfig is the default Logger middleware config.
- DefaultLoggerConfig = LoggerConfig{
- Skipper: DefaultSkipper,
- Format: `{"time":"${time_rfc3339_nano}","id":"${id}","remote_ip":"${remote_ip}",` +
- `"host":"${host}","method":"${method}","uri":"${uri}","user_agent":"${user_agent}",` +
- `"status":${status},"error":"${error}","latency":${latency},"latency_human":"${latency_human}"` +
- `,"bytes_in":${bytes_in},"bytes_out":${bytes_out}}` + "\n",
- CustomTimeFormat: "2006-01-02 15:04:05.00000",
- colorer: color.New(),
- }
-)
-
-// Logger returns a middleware that logs HTTP requests.
-func Logger() echo.MiddlewareFunc {
- return LoggerWithConfig(DefaultLoggerConfig)
-}
-
-// LoggerWithConfig returns a Logger middleware with config.
-// See: `Logger()`.
-func LoggerWithConfig(config LoggerConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultLoggerConfig.Skipper
- }
- if config.Format == "" {
- config.Format = DefaultLoggerConfig.Format
- }
- if config.Output == nil {
- config.Output = DefaultLoggerConfig.Output
- }
-
- config.template = fasttemplate.New(config.Format, "${", "}")
- config.colorer = color.New()
- config.colorer.SetOutput(config.Output)
- config.pool = &sync.Pool{
- New: func() interface{} {
- return bytes.NewBuffer(make([]byte, 256))
- },
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) (err error) {
- if config.Skipper(c) {
- return next(c)
- }
-
- req := c.Request()
- res := c.Response()
- start := time.Now()
- if err = next(c); err != nil {
- c.Error(err)
- }
- stop := time.Now()
- buf := config.pool.Get().(*bytes.Buffer)
- buf.Reset()
- defer config.pool.Put(buf)
-
- if _, err = config.template.ExecuteFunc(buf, func(w io.Writer, tag string) (int, error) {
- switch tag {
- case "time_unix":
- return buf.WriteString(strconv.FormatInt(time.Now().Unix(), 10))
- case "time_unix_nano":
- return buf.WriteString(strconv.FormatInt(time.Now().UnixNano(), 10))
- case "time_rfc3339":
- return buf.WriteString(time.Now().Format(time.RFC3339))
- case "time_rfc3339_nano":
- return buf.WriteString(time.Now().Format(time.RFC3339Nano))
- case "time_custom":
- return buf.WriteString(time.Now().Format(config.CustomTimeFormat))
- case "id":
- id := req.Header.Get(echo.HeaderXRequestID)
- if id == "" {
- id = res.Header().Get(echo.HeaderXRequestID)
- }
- return buf.WriteString(id)
- case "remote_ip":
- return buf.WriteString(c.RealIP())
- case "host":
- return buf.WriteString(req.Host)
- case "uri":
- return buf.WriteString(req.RequestURI)
- case "method":
- return buf.WriteString(req.Method)
- case "path":
- p := req.URL.Path
- if p == "" {
- p = "/"
- }
- return buf.WriteString(p)
- case "protocol":
- return buf.WriteString(req.Proto)
- case "referer":
- return buf.WriteString(req.Referer())
- case "user_agent":
- return buf.WriteString(req.UserAgent())
- case "status":
- n := res.Status
- s := config.colorer.Green(n)
- switch {
- case n >= 500:
- s = config.colorer.Red(n)
- case n >= 400:
- s = config.colorer.Yellow(n)
- case n >= 300:
- s = config.colorer.Cyan(n)
- }
- return buf.WriteString(s)
- case "error":
- if err != nil {
- // Error may contain invalid JSON e.g. `"`
- b, _ := json.Marshal(err.Error())
- b = b[1 : len(b)-1]
- return buf.Write(b)
- }
- case "latency":
- l := stop.Sub(start)
- return buf.WriteString(strconv.FormatInt(int64(l), 10))
- case "latency_human":
- return buf.WriteString(stop.Sub(start).String())
- case "bytes_in":
- cl := req.Header.Get(echo.HeaderContentLength)
- if cl == "" {
- cl = "0"
- }
- return buf.WriteString(cl)
- case "bytes_out":
- return buf.WriteString(strconv.FormatInt(res.Size, 10))
- default:
- switch {
- case strings.HasPrefix(tag, "header:"):
- return buf.Write([]byte(c.Request().Header.Get(tag[7:])))
- case strings.HasPrefix(tag, "query:"):
- return buf.Write([]byte(c.QueryParam(tag[6:])))
- case strings.HasPrefix(tag, "form:"):
- return buf.Write([]byte(c.FormValue(tag[5:])))
- case strings.HasPrefix(tag, "cookie:"):
- cookie, err := c.Cookie(tag[7:])
- if err == nil {
- return buf.Write([]byte(cookie.Value))
- }
- }
- }
- return 0, nil
- }); err != nil {
- return
- }
-
- if config.Output == nil {
- _, err = c.Logger().Output().Write(buf.Bytes())
- return
- }
- _, err = config.Output.Write(buf.Bytes())
- return
- }
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/method_override.go b/vendor/github.com/labstack/echo/v4/middleware/method_override.go
deleted file mode 100644
index 92b14d2ed..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/method_override.go
+++ /dev/null
@@ -1,92 +0,0 @@
-package middleware
-
-import (
- "net/http"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // MethodOverrideConfig defines the config for MethodOverride middleware.
- MethodOverrideConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Getter is a function that gets overridden method from the request.
- // Optional. Default values MethodFromHeader(echo.HeaderXHTTPMethodOverride).
- Getter MethodOverrideGetter
- }
-
- // MethodOverrideGetter is a function that gets overridden method from the request
- MethodOverrideGetter func(echo.Context) string
-)
-
-var (
- // DefaultMethodOverrideConfig is the default MethodOverride middleware config.
- DefaultMethodOverrideConfig = MethodOverrideConfig{
- Skipper: DefaultSkipper,
- Getter: MethodFromHeader(echo.HeaderXHTTPMethodOverride),
- }
-)
-
-// MethodOverride returns a MethodOverride middleware.
-// MethodOverride middleware checks for the overridden method from the request and
-// uses it instead of the original method.
-//
-// For security reasons, only `POST` method can be overridden.
-func MethodOverride() echo.MiddlewareFunc {
- return MethodOverrideWithConfig(DefaultMethodOverrideConfig)
-}
-
-// MethodOverrideWithConfig returns a MethodOverride middleware with config.
-// See: `MethodOverride()`.
-func MethodOverrideWithConfig(config MethodOverrideConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultMethodOverrideConfig.Skipper
- }
- if config.Getter == nil {
- config.Getter = DefaultMethodOverrideConfig.Getter
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- req := c.Request()
- if req.Method == http.MethodPost {
- m := config.Getter(c)
- if m != "" {
- req.Method = m
- }
- }
- return next(c)
- }
- }
-}
-
-// MethodFromHeader is a `MethodOverrideGetter` that gets overridden method from
-// the request header.
-func MethodFromHeader(header string) MethodOverrideGetter {
- return func(c echo.Context) string {
- return c.Request().Header.Get(header)
- }
-}
-
-// MethodFromForm is a `MethodOverrideGetter` that gets overridden method from the
-// form parameter.
-func MethodFromForm(param string) MethodOverrideGetter {
- return func(c echo.Context) string {
- return c.FormValue(param)
- }
-}
-
-// MethodFromQuery is a `MethodOverrideGetter` that gets overridden method from
-// the query parameter.
-func MethodFromQuery(param string) MethodOverrideGetter {
- return func(c echo.Context) string {
- return c.QueryParam(param)
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/middleware.go b/vendor/github.com/labstack/echo/v4/middleware/middleware.go
deleted file mode 100644
index d0b7153cb..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/middleware.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package middleware
-
-import (
- "regexp"
- "strconv"
- "strings"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // Skipper defines a function to skip middleware. Returning true skips processing
- // the middleware.
- Skipper func(echo.Context) bool
-
- // BeforeFunc defines a function which is executed just before the middleware.
- BeforeFunc func(echo.Context)
-)
-
-func captureTokens(pattern *regexp.Regexp, input string) *strings.Replacer {
- groups := pattern.FindAllStringSubmatch(input, -1)
- if groups == nil {
- return nil
- }
- values := groups[0][1:]
- replace := make([]string, 2*len(values))
- for i, v := range values {
- j := 2 * i
- replace[j] = "$" + strconv.Itoa(i+1)
- replace[j+1] = v
- }
- return strings.NewReplacer(replace...)
-}
-
-// DefaultSkipper returns false which processes the middleware.
-func DefaultSkipper(echo.Context) bool {
- return false
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/proxy.go b/vendor/github.com/labstack/echo/v4/middleware/proxy.go
deleted file mode 100644
index 1da370dbf..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/proxy.go
+++ /dev/null
@@ -1,261 +0,0 @@
-package middleware
-
-import (
- "fmt"
- "io"
- "math/rand"
- "net"
- "net/http"
- "net/url"
- "regexp"
- "strings"
- "sync"
- "sync/atomic"
- "time"
-
- "github.com/labstack/echo/v4"
-)
-
-// TODO: Handle TLS proxy
-
-type (
- // ProxyConfig defines the config for Proxy middleware.
- ProxyConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Balancer defines a load balancing technique.
- // Required.
- Balancer ProxyBalancer
-
- // Rewrite defines URL path rewrite rules. The values captured in asterisk can be
- // retrieved by index e.g. $1, $2 and so on.
- // Examples:
- // "/old": "/new",
- // "/api/*": "/$1",
- // "/js/*": "/public/javascripts/$1",
- // "/users/*/orders/*": "/user/$1/order/$2",
- Rewrite map[string]string
-
- // Context key to store selected ProxyTarget into context.
- // Optional. Default value "target".
- ContextKey string
-
- // To customize the transport to remote.
- // Examples: If custom TLS certificates are required.
- Transport http.RoundTripper
-
- rewriteRegex map[*regexp.Regexp]string
- }
-
- // ProxyTarget defines the upstream target.
- ProxyTarget struct {
- Name string
- URL *url.URL
- Meta echo.Map
- }
-
- // ProxyBalancer defines an interface to implement a load balancing technique.
- ProxyBalancer interface {
- AddTarget(*ProxyTarget) bool
- RemoveTarget(string) bool
- Next(echo.Context) *ProxyTarget
- }
-
- commonBalancer struct {
- targets []*ProxyTarget
- mutex sync.RWMutex
- }
-
- // RandomBalancer implements a random load balancing technique.
- randomBalancer struct {
- *commonBalancer
- random *rand.Rand
- }
-
- // RoundRobinBalancer implements a round-robin load balancing technique.
- roundRobinBalancer struct {
- *commonBalancer
- i uint32
- }
-)
-
-var (
- // DefaultProxyConfig is the default Proxy middleware config.
- DefaultProxyConfig = ProxyConfig{
- Skipper: DefaultSkipper,
- ContextKey: "target",
- }
-)
-
-func proxyRaw(t *ProxyTarget, c echo.Context) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- in, _, err := c.Response().Hijack()
- if err != nil {
- c.Set("_error", fmt.Sprintf("proxy raw, hijack error=%v, url=%s", t.URL, err))
- return
- }
- defer in.Close()
-
- out, err := net.Dial("tcp", t.URL.Host)
- if err != nil {
- c.Set("_error", echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("proxy raw, dial error=%v, url=%s", t.URL, err)))
- return
- }
- defer out.Close()
-
- // Write header
- err = r.Write(out)
- if err != nil {
- c.Set("_error", echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("proxy raw, request header copy error=%v, url=%s", t.URL, err)))
- return
- }
-
- errCh := make(chan error, 2)
- cp := func(dst io.Writer, src io.Reader) {
- _, err = io.Copy(dst, src)
- errCh <- err
- }
-
- go cp(out, in)
- go cp(in, out)
- err = <-errCh
- if err != nil && err != io.EOF {
- c.Set("_error", fmt.Errorf("proxy raw, copy body error=%v, url=%s", t.URL, err))
- }
- })
-}
-
-// NewRandomBalancer returns a random proxy balancer.
-func NewRandomBalancer(targets []*ProxyTarget) ProxyBalancer {
- b := &randomBalancer{commonBalancer: new(commonBalancer)}
- b.targets = targets
- return b
-}
-
-// NewRoundRobinBalancer returns a round-robin proxy balancer.
-func NewRoundRobinBalancer(targets []*ProxyTarget) ProxyBalancer {
- b := &roundRobinBalancer{commonBalancer: new(commonBalancer)}
- b.targets = targets
- return b
-}
-
-// AddTarget adds an upstream target to the list.
-func (b *commonBalancer) AddTarget(target *ProxyTarget) bool {
- for _, t := range b.targets {
- if t.Name == target.Name {
- return false
- }
- }
- b.mutex.Lock()
- defer b.mutex.Unlock()
- b.targets = append(b.targets, target)
- return true
-}
-
-// RemoveTarget removes an upstream target from the list.
-func (b *commonBalancer) RemoveTarget(name string) bool {
- b.mutex.Lock()
- defer b.mutex.Unlock()
- for i, t := range b.targets {
- if t.Name == name {
- b.targets = append(b.targets[:i], b.targets[i+1:]...)
- return true
- }
- }
- return false
-}
-
-// Next randomly returns an upstream target.
-func (b *randomBalancer) Next(c echo.Context) *ProxyTarget {
- if b.random == nil {
- b.random = rand.New(rand.NewSource(int64(time.Now().Nanosecond())))
- }
- b.mutex.RLock()
- defer b.mutex.RUnlock()
- return b.targets[b.random.Intn(len(b.targets))]
-}
-
-// Next returns an upstream target using round-robin technique.
-func (b *roundRobinBalancer) Next(c echo.Context) *ProxyTarget {
- b.i = b.i % uint32(len(b.targets))
- t := b.targets[b.i]
- atomic.AddUint32(&b.i, 1)
- return t
-}
-
-// Proxy returns a Proxy middleware.
-//
-// Proxy middleware forwards the request to upstream server using a configured load balancing technique.
-func Proxy(balancer ProxyBalancer) echo.MiddlewareFunc {
- c := DefaultProxyConfig
- c.Balancer = balancer
- return ProxyWithConfig(c)
-}
-
-// ProxyWithConfig returns a Proxy middleware with config.
-// See: `Proxy()`
-func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultProxyConfig.Skipper
- }
- if config.Balancer == nil {
- panic("echo: proxy middleware requires balancer")
- }
- config.rewriteRegex = map[*regexp.Regexp]string{}
-
- // Initialize
- for k, v := range config.Rewrite {
- k = strings.Replace(k, "*", "(\\S*)", -1)
- config.rewriteRegex[regexp.MustCompile(k)] = v
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) (err error) {
- if config.Skipper(c) {
- return next(c)
- }
-
- req := c.Request()
- res := c.Response()
- tgt := config.Balancer.Next(c)
- c.Set(config.ContextKey, tgt)
-
- // Rewrite
- for k, v := range config.rewriteRegex {
- replacer := captureTokens(k, req.URL.Path)
- if replacer != nil {
- req.URL.Path = replacer.Replace(v)
- }
- }
-
- // Fix header
- // Basically it's not good practice to unconditionally pass incoming x-real-ip header to upstream.
- // However, for backward compatibility, legacy behavior is preserved unless you configure Echo#IPExtractor.
- if req.Header.Get(echo.HeaderXRealIP) == "" || c.Echo().IPExtractor != nil {
- req.Header.Set(echo.HeaderXRealIP, c.RealIP())
- }
- if req.Header.Get(echo.HeaderXForwardedProto) == "" {
- req.Header.Set(echo.HeaderXForwardedProto, c.Scheme())
- }
- if c.IsWebSocket() && req.Header.Get(echo.HeaderXForwardedFor) == "" { // For HTTP, it is automatically set by Go HTTP reverse proxy.
- req.Header.Set(echo.HeaderXForwardedFor, c.RealIP())
- }
-
- // Proxy
- switch {
- case c.IsWebSocket():
- proxyRaw(tgt, c).ServeHTTP(res, req)
- case req.Header.Get(echo.HeaderAccept) == "text/event-stream":
- default:
- proxyHTTP(tgt, c, config).ServeHTTP(res, req)
- }
- if e, ok := c.Get("_error").(error); ok {
- err = e
- }
-
- return
- }
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/proxy_1_11.go b/vendor/github.com/labstack/echo/v4/middleware/proxy_1_11.go
deleted file mode 100644
index 12b7568bf..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/proxy_1_11.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// +build go1.11
-
-package middleware
-
-import (
- "fmt"
- "net/http"
- "net/http/httputil"
-
- "github.com/labstack/echo/v4"
-)
-
-func proxyHTTP(tgt *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler {
- proxy := httputil.NewSingleHostReverseProxy(tgt.URL)
- proxy.ErrorHandler = func(resp http.ResponseWriter, req *http.Request, err error) {
- desc := tgt.URL.String()
- if tgt.Name != "" {
- desc = fmt.Sprintf("%s(%s)", tgt.Name, tgt.URL.String())
- }
- c.Set("_error", echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("remote %s unreachable, could not forward: %v", desc, err)))
- }
- proxy.Transport = config.Transport
- return proxy
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/proxy_1_11_n.go b/vendor/github.com/labstack/echo/v4/middleware/proxy_1_11_n.go
deleted file mode 100644
index 9a78929fe..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/proxy_1_11_n.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +build !go1.11
-
-package middleware
-
-import (
- "net/http"
- "net/http/httputil"
-
- "github.com/labstack/echo/v4"
-)
-
-func proxyHTTP(t *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler {
- return httputil.NewSingleHostReverseProxy(t.URL)
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/recover.go b/vendor/github.com/labstack/echo/v4/middleware/recover.go
deleted file mode 100644
index e87aaf321..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/recover.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package middleware
-
-import (
- "fmt"
- "runtime"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // RecoverConfig defines the config for Recover middleware.
- RecoverConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Size of the stack to be printed.
- // Optional. Default value 4KB.
- StackSize int `yaml:"stack_size"`
-
- // DisableStackAll disables formatting stack traces of all other goroutines
- // into buffer after the trace for the current goroutine.
- // Optional. Default value false.
- DisableStackAll bool `yaml:"disable_stack_all"`
-
- // DisablePrintStack disables printing stack trace.
- // Optional. Default value as false.
- DisablePrintStack bool `yaml:"disable_print_stack"`
- }
-)
-
-var (
- // DefaultRecoverConfig is the default Recover middleware config.
- DefaultRecoverConfig = RecoverConfig{
- Skipper: DefaultSkipper,
- StackSize: 4 << 10, // 4 KB
- DisableStackAll: false,
- DisablePrintStack: false,
- }
-)
-
-// Recover returns a middleware which recovers from panics anywhere in the chain
-// and handles the control to the centralized HTTPErrorHandler.
-func Recover() echo.MiddlewareFunc {
- return RecoverWithConfig(DefaultRecoverConfig)
-}
-
-// RecoverWithConfig returns a Recover middleware with config.
-// See: `Recover()`.
-func RecoverWithConfig(config RecoverConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultRecoverConfig.Skipper
- }
- if config.StackSize == 0 {
- config.StackSize = DefaultRecoverConfig.StackSize
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- defer func() {
- if r := recover(); r != nil {
- err, ok := r.(error)
- if !ok {
- err = fmt.Errorf("%v", r)
- }
- stack := make([]byte, config.StackSize)
- length := runtime.Stack(stack, !config.DisableStackAll)
- if !config.DisablePrintStack {
- c.Logger().Printf("[PANIC RECOVER] %v %s\n", err, stack[:length])
- }
- c.Error(err)
- }
- }()
- return next(c)
- }
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/redirect.go b/vendor/github.com/labstack/echo/v4/middleware/redirect.go
deleted file mode 100644
index 813e5b856..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/redirect.go
+++ /dev/null
@@ -1,153 +0,0 @@
-package middleware
-
-import (
- "net/http"
-
- "github.com/labstack/echo/v4"
-)
-
-// RedirectConfig defines the config for Redirect middleware.
-type RedirectConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper
-
- // Status code to be used when redirecting the request.
- // Optional. Default value http.StatusMovedPermanently.
- Code int `yaml:"code"`
-}
-
-// redirectLogic represents a function that given a scheme, host and uri
-// can both: 1) determine if redirect is needed (will set ok accordingly) and
-// 2) return the appropriate redirect url.
-type redirectLogic func(scheme, host, uri string) (ok bool, url string)
-
-const www = "www."
-
-// DefaultRedirectConfig is the default Redirect middleware config.
-var DefaultRedirectConfig = RedirectConfig{
- Skipper: DefaultSkipper,
- Code: http.StatusMovedPermanently,
-}
-
-// HTTPSRedirect redirects http requests to https.
-// For example, http://labstack.com will be redirect to https://labstack.com.
-//
-// Usage `Echo#Pre(HTTPSRedirect())`
-func HTTPSRedirect() echo.MiddlewareFunc {
- return HTTPSRedirectWithConfig(DefaultRedirectConfig)
-}
-
-// HTTPSRedirectWithConfig returns an HTTPSRedirect middleware with config.
-// See `HTTPSRedirect()`.
-func HTTPSRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
- return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
- if ok = scheme != "https"; ok {
- url = "https://" + host + uri
- }
- return
- })
-}
-
-// HTTPSWWWRedirect redirects http requests to https www.
-// For example, http://labstack.com will be redirect to https://www.labstack.com.
-//
-// Usage `Echo#Pre(HTTPSWWWRedirect())`
-func HTTPSWWWRedirect() echo.MiddlewareFunc {
- return HTTPSWWWRedirectWithConfig(DefaultRedirectConfig)
-}
-
-// HTTPSWWWRedirectWithConfig returns an HTTPSRedirect middleware with config.
-// See `HTTPSWWWRedirect()`.
-func HTTPSWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
- return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
- if ok = scheme != "https" && host[:4] != www; ok {
- url = "https://www." + host + uri
- }
- return
- })
-}
-
-// HTTPSNonWWWRedirect redirects http requests to https non www.
-// For example, http://www.labstack.com will be redirect to https://labstack.com.
-//
-// Usage `Echo#Pre(HTTPSNonWWWRedirect())`
-func HTTPSNonWWWRedirect() echo.MiddlewareFunc {
- return HTTPSNonWWWRedirectWithConfig(DefaultRedirectConfig)
-}
-
-// HTTPSNonWWWRedirectWithConfig returns an HTTPSRedirect middleware with config.
-// See `HTTPSNonWWWRedirect()`.
-func HTTPSNonWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
- return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
- if ok = scheme != "https"; ok {
- if host[:4] == www {
- host = host[4:]
- }
- url = "https://" + host + uri
- }
- return
- })
-}
-
-// WWWRedirect redirects non www requests to www.
-// For example, http://labstack.com will be redirect to http://www.labstack.com.
-//
-// Usage `Echo#Pre(WWWRedirect())`
-func WWWRedirect() echo.MiddlewareFunc {
- return WWWRedirectWithConfig(DefaultRedirectConfig)
-}
-
-// WWWRedirectWithConfig returns an HTTPSRedirect middleware with config.
-// See `WWWRedirect()`.
-func WWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
- return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
- if ok = host[:4] != www; ok {
- url = scheme + "://www." + host + uri
- }
- return
- })
-}
-
-// NonWWWRedirect redirects www requests to non www.
-// For example, http://www.labstack.com will be redirect to http://labstack.com.
-//
-// Usage `Echo#Pre(NonWWWRedirect())`
-func NonWWWRedirect() echo.MiddlewareFunc {
- return NonWWWRedirectWithConfig(DefaultRedirectConfig)
-}
-
-// NonWWWRedirectWithConfig returns an HTTPSRedirect middleware with config.
-// See `NonWWWRedirect()`.
-func NonWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
- return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
- if ok = host[:4] == www; ok {
- url = scheme + "://" + host[4:] + uri
- }
- return
- })
-}
-
-func redirect(config RedirectConfig, cb redirectLogic) echo.MiddlewareFunc {
- if config.Skipper == nil {
- config.Skipper = DefaultTrailingSlashConfig.Skipper
- }
- if config.Code == 0 {
- config.Code = DefaultRedirectConfig.Code
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- req, scheme := c.Request(), c.Scheme()
- host := req.Host
- if ok, url := cb(scheme, host, req.RequestURI); ok {
- return c.Redirect(config.Code, url)
- }
-
- return next(c)
- }
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/request_id.go b/vendor/github.com/labstack/echo/v4/middleware/request_id.go
deleted file mode 100644
index 21f801f3b..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/request_id.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package middleware
-
-import (
- "github.com/labstack/echo/v4"
- "github.com/labstack/gommon/random"
-)
-
-type (
- // RequestIDConfig defines the config for RequestID middleware.
- RequestIDConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Generator defines a function to generate an ID.
- // Optional. Default value random.String(32).
- Generator func() string
- }
-)
-
-var (
- // DefaultRequestIDConfig is the default RequestID middleware config.
- DefaultRequestIDConfig = RequestIDConfig{
- Skipper: DefaultSkipper,
- Generator: generator,
- }
-)
-
-// RequestID returns a X-Request-ID middleware.
-func RequestID() echo.MiddlewareFunc {
- return RequestIDWithConfig(DefaultRequestIDConfig)
-}
-
-// RequestIDWithConfig returns a X-Request-ID middleware with config.
-func RequestIDWithConfig(config RequestIDConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Skipper == nil {
- config.Skipper = DefaultRequestIDConfig.Skipper
- }
- if config.Generator == nil {
- config.Generator = generator
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- if config.Skipper(c) {
- return next(c)
- }
-
- req := c.Request()
- res := c.Response()
- rid := req.Header.Get(echo.HeaderXRequestID)
- if rid == "" {
- rid = config.Generator()
- }
- res.Header().Set(echo.HeaderXRequestID, rid)
-
- return next(c)
- }
- }
-}
-
-func generator() string {
- return random.String(32)
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/rewrite.go b/vendor/github.com/labstack/echo/v4/middleware/rewrite.go
deleted file mode 100644
index d1387af0f..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/rewrite.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package middleware
-
-import (
- "regexp"
- "strings"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // RewriteConfig defines the config for Rewrite middleware.
- RewriteConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // Rules defines the URL path rewrite rules. The values captured in asterisk can be
- // retrieved by index e.g. $1, $2 and so on.
- // Example:
- // "/old": "/new",
- // "/api/*": "/$1",
- // "/js/*": "/public/javascripts/$1",
- // "/users/*/orders/*": "/user/$1/order/$2",
- // Required.
- Rules map[string]string `yaml:"rules"`
-
- rulesRegex map[*regexp.Regexp]string
- }
-)
-
-var (
- // DefaultRewriteConfig is the default Rewrite middleware config.
- DefaultRewriteConfig = RewriteConfig{
- Skipper: DefaultSkipper,
- }
-)
-
-// Rewrite returns a Rewrite middleware.
-//
-// Rewrite middleware rewrites the URL path based on the provided rules.
-func Rewrite(rules map[string]string) echo.MiddlewareFunc {
- c := DefaultRewriteConfig
- c.Rules = rules
- return RewriteWithConfig(c)
-}
-
-// RewriteWithConfig returns a Rewrite middleware with config.
-// See: `Rewrite()`.
-func RewriteWithConfig(config RewriteConfig) echo.MiddlewareFunc {
- // Defaults
- if config.Rules == nil {
- panic("echo: rewrite middleware requires url path rewrite rules")
- }
- if config.Skipper == nil {
- config.Skipper = DefaultBodyDumpConfig.Skipper
- }
- config.rulesRegex = map[*regexp.Regexp]string{}
-
- // Initialize
- for k, v := range config.Rules {
- k = regexp.QuoteMeta(k)
- k = strings.Replace(k, `\*`, "(.*)", -1)
- k = k + "$"
- config.rulesRegex[regexp.MustCompile(k)] = v
- }
-
- return func(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) (err error) {
- if config.Skipper(c) {
- return next(c)
- }
-
- req := c.Request()
-
- // Rewrite
- for k, v := range config.rulesRegex {
- replacer := captureTokens(k, req.URL.Path)
- if replacer != nil {
- req.URL.Path = replacer.Replace(v)
- break
- }
- }
- return next(c)
- }
- }
-}
diff --git a/vendor/github.com/labstack/echo/v4/middleware/secure.go b/vendor/github.com/labstack/echo/v4/middleware/secure.go
deleted file mode 100644
index 6c4051723..000000000
--- a/vendor/github.com/labstack/echo/v4/middleware/secure.go
+++ /dev/null
@@ -1,145 +0,0 @@
-package middleware
-
-import (
- "fmt"
-
- "github.com/labstack/echo/v4"
-)
-
-type (
- // SecureConfig defines the config for Secure middleware.
- SecureConfig struct {
- // Skipper defines a function to skip middleware.
- Skipper Skipper
-
- // XSSProtection provides protection against cross-site scripting attack (XSS)
- // by setting the `X-XSS-Protection` header.
- // Optional. Default value "1; mode=block".
- XSSProtection string `yaml:"xss_protection"`
-
- // ContentTypeNosniff provides protection against overriding Content-Type
- // header by setting the `X-Content-Type-Options` header.
- // Optional. Default value "nosniff".
- ContentTypeNosniff string `yaml:"content_type_nosniff"`
-
- // XFrameOptions can be used to indicate whether or not a browser should
- // be allowed to render a page in a ,