summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mailru/easyjson/opt
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-16 05:37:14 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-04-16 08:37:14 -0400
commit6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch)
tree3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/github.com/mailru/easyjson/opt
parentbf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff)
downloadchat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/github.com/mailru/easyjson/opt')
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_String.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go79
-rw-r--r--vendor/github.com/mailru/easyjson/opt/optional/opt.go80
-rw-r--r--vendor/github.com/mailru/easyjson/opt/opts.go22
16 files changed, 0 insertions, 1208 deletions
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go
deleted file mode 100644
index 6978ee971..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Bool.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Bool struct {
- V bool
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OBool(v bool) Bool {
- return Bool{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Bool) Get(deflt bool) bool {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Bool) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Bool(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Bool) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Bool{}
- } else {
- v.V = l.Bool()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Bool) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Bool) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Bool) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Bool) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go
deleted file mode 100644
index 643cea359..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float32.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Float32 struct {
- V float32
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OFloat32(v float32) Float32 {
- return Float32{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Float32) Get(deflt float32) float32 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Float32) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Float32(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Float32) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Float32{}
- } else {
- v.V = l.Float32()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Float32) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Float32) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Float32) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Float32) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go
deleted file mode 100644
index 75ae72757..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Float64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Float64 struct {
- V float64
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OFloat64(v float64) Float64 {
- return Float64{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Float64) Get(deflt float64) float64 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Float64) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Float64(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Float64) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Float64{}
- } else {
- v.V = l.Float64()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Float64) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Float64) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Float64) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Float64) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go
deleted file mode 100644
index 469742fee..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int struct {
- V int
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt(v int) Int {
- return Int{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int) Get(deflt int) int {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int{}
- } else {
- v.V = l.Int()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go
deleted file mode 100644
index b7723e241..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int16.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int16 struct {
- V int16
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt16(v int16) Int16 {
- return Int16{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int16) Get(deflt int16) int16 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int16) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int16(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int16) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int16{}
- } else {
- v.V = l.Int16()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int16) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int16) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int16) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int16) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go
deleted file mode 100644
index 7c7637a38..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int32.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int32 struct {
- V int32
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt32(v int32) Int32 {
- return Int32{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int32) Get(deflt int32) int32 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int32) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int32(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int32) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int32{}
- } else {
- v.V = l.Int32()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int32) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int32) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int32) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int32) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go
deleted file mode 100644
index e6ea6dc41..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int64 struct {
- V int64
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt64(v int64) Int64 {
- return Int64{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int64) Get(deflt int64) int64 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int64) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int64(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int64) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int64{}
- } else {
- v.V = l.Int64()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int64) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int64) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int64) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int64) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go
deleted file mode 100644
index ddc666580..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Int8.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Int8 struct {
- V int8
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OInt8(v int8) Int8 {
- return Int8{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Int8) Get(deflt int8) int8 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Int8) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Int8(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Int8) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Int8{}
- } else {
- v.V = l.Int8()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Int8) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Int8) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Int8) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Int8) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go
deleted file mode 100644
index 11c90b4ed..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_String.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type String struct {
- V string
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OString(v string) String {
- return String{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v String) Get(deflt string) string {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v String) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.String(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *String) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = String{}
- } else {
- v.V = l.String()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v String) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *String) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v String) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v String) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go
deleted file mode 100644
index 57efd3185..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint struct {
- V uint
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint(v uint) Uint {
- return Uint{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint) Get(deflt uint) uint {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint{}
- } else {
- v.V = l.Uint()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go
deleted file mode 100644
index f28e1d2ef..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint16.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint16 struct {
- V uint16
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint16(v uint16) Uint16 {
- return Uint16{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint16) Get(deflt uint16) uint16 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint16) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint16(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint16) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint16{}
- } else {
- v.V = l.Uint16()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint16) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint16) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint16) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint16) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go
deleted file mode 100644
index 9fb95c0db..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint32.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint32 struct {
- V uint32
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint32(v uint32) Uint32 {
- return Uint32{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint32) Get(deflt uint32) uint32 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint32) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint32(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint32) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint32{}
- } else {
- v.V = l.Uint32()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint32) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint32) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint32) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint32) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go
deleted file mode 100644
index 0e623c62d..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint64 struct {
- V uint64
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint64(v uint64) Uint64 {
- return Uint64{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint64) Get(deflt uint64) uint64 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint64) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint64(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint64) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint64{}
- } else {
- v.V = l.Uint64()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint64) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint64) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint64) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint64) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go b/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go
deleted file mode 100644
index c629e4453..000000000
--- a/vendor/github.com/mailru/easyjson/opt/gotemplate_Uint8.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// generated by gotemplate
-
-package opt
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Uint8 struct {
- V uint8
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OUint8(v uint8) Uint8 {
- return Uint8{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Uint8) Get(deflt uint8) uint8 {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Uint8) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Uint8(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Uint8) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Uint8{}
- } else {
- v.V = l.Uint8()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Uint8) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Uint8) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Uint8) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Uint8) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/optional/opt.go b/vendor/github.com/mailru/easyjson/opt/optional/opt.go
deleted file mode 100644
index 277dd1a3b..000000000
--- a/vendor/github.com/mailru/easyjson/opt/optional/opt.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// +build none
-
-package optional
-
-import (
- "fmt"
-
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// template type Optional(A)
-type A int
-
-// A 'gotemplate'-based type for providing optional semantics without using pointers.
-type Optional struct {
- V A
- Defined bool
-}
-
-// Creates an optional type with a given value.
-func OOptional(v A) Optional {
- return Optional{V: v, Defined: true}
-}
-
-// Get returns the value or given default in the case the value is undefined.
-func (v Optional) Get(deflt A) A {
- if !v.Defined {
- return deflt
- }
- return v.V
-}
-
-// MarshalEasyJSON does JSON marshaling using easyjson interface.
-func (v Optional) MarshalEasyJSON(w *jwriter.Writer) {
- if v.Defined {
- w.Optional(v.V)
- } else {
- w.RawString("null")
- }
-}
-
-// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
-func (v *Optional) UnmarshalEasyJSON(l *jlexer.Lexer) {
- if l.IsNull() {
- l.Skip()
- *v = Optional{}
- } else {
- v.V = l.Optional()
- v.Defined = true
- }
-}
-
-// MarshalJSON implements a standard json marshaler interface.
-func (v Optional) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- v.MarshalEasyJSON(&w)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// UnmarshalJSON implements a standard json unmarshaler interface.
-func (v *Optional) UnmarshalJSON(data []byte) error {
- l := jlexer.Lexer{Data: data}
- v.UnmarshalEasyJSON(&l)
- return l.Error()
-}
-
-// IsDefined returns whether the value is defined, a function is required so that it can
-// be used in an interface.
-func (v Optional) IsDefined() bool {
- return v.Defined
-}
-
-// String implements a stringer interface using fmt.Sprint for the value.
-func (v Optional) String() string {
- if !v.Defined {
- return "<undefined>"
- }
- return fmt.Sprint(v.V)
-}
diff --git a/vendor/github.com/mailru/easyjson/opt/opts.go b/vendor/github.com/mailru/easyjson/opt/opts.go
deleted file mode 100644
index 3617f7f9f..000000000
--- a/vendor/github.com/mailru/easyjson/opt/opts.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package opt
-
-//go:generate sed -i "s/\\+build none/generated by gotemplate/" optional/opt.go
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int(int)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint(uint)
-
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int8(int8)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int16(int16)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int32(int32)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Int64(int64)
-
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint8(uint8)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint16(uint16)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint32(uint32)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Uint64(uint64)
-
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Float32(float32)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Float64(float64)
-
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" Bool(bool)
-//go:generate gotemplate "github.com/mailru/easyjson/opt/optional" String(string)
-//go:generate sed -i "s/generated by gotemplate/+build none/" optional/opt.go