aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/json-iterator/go/any_nil.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/json-iterator/go/any_nil.go')
-rw-r--r--vendor/github.com/json-iterator/go/any_nil.go69
1 files changed, 69 insertions, 0 deletions
diff --git a/vendor/github.com/json-iterator/go/any_nil.go b/vendor/github.com/json-iterator/go/any_nil.go
new file mode 100644
index 0000000..d04cb54
--- /dev/null
+++ b/vendor/github.com/json-iterator/go/any_nil.go
@@ -0,0 +1,69 @@
1package jsoniter
2
3type nilAny struct {
4 baseAny
5}
6
7func (any *nilAny) LastError() error {
8 return nil
9}
10
11func (any *nilAny) ValueType() ValueType {
12 return NilValue
13}
14
15func (any *nilAny) MustBeValid() Any {
16 return any
17}
18
19func (any *nilAny) ToBool() bool {
20 return false
21}
22
23func (any *nilAny) ToInt() int {
24 return 0
25}
26
27func (any *nilAny) ToInt32() int32 {
28 return 0
29}
30
31func (any *nilAny) ToInt64() int64 {
32 return 0
33}
34
35func (any *nilAny) ToUint() uint {
36 return 0
37}
38
39func (any *nilAny) ToUint32() uint32 {
40 return 0
41}
42
43func (any *nilAny) ToUint64() uint64 {
44 return 0
45}
46
47func (any *nilAny) ToFloat32() float32 {
48 return 0
49}
50
51func (any *nilAny) ToFloat64() float64 {
52 return 0
53}
54
55func (any *nilAny) ToString() string {
56 return ""
57}
58
59func (any *nilAny) WriteTo(stream *Stream) {
60 stream.WriteNil()
61}
62
63func (any *nilAny) Parse() *Iterator {
64 return nil
65}
66
67func (any *nilAny) GetInterface() interface{} {
68 return nil
69}