aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/json-iterator/go/any_invalid.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/json-iterator/go/any_invalid.go')
-rw-r--r--vendor/github.com/json-iterator/go/any_invalid.go82
1 files changed, 0 insertions, 82 deletions
diff --git a/vendor/github.com/json-iterator/go/any_invalid.go b/vendor/github.com/json-iterator/go/any_invalid.go
deleted file mode 100644
index 1d859ea..0000000
--- a/vendor/github.com/json-iterator/go/any_invalid.go
+++ /dev/null
@@ -1,82 +0,0 @@
1package jsoniter
2
3import "fmt"
4
5type invalidAny struct {
6 baseAny
7 err error
8}
9
10func newInvalidAny(path []interface{}) *invalidAny {
11 return &invalidAny{baseAny{}, fmt.Errorf("%v not found", path)}
12}
13
14func (any *invalidAny) LastError() error {
15 return any.err
16}
17
18func (any *invalidAny) ValueType() ValueType {
19 return InvalidValue
20}
21
22func (any *invalidAny) MustBeValid() Any {
23 panic(any.err)
24}
25
26func (any *invalidAny) ToBool() bool {
27 return false
28}
29
30func (any *invalidAny) ToInt() int {
31 return 0
32}
33
34func (any *invalidAny) ToInt32() int32 {
35 return 0
36}
37
38func (any *invalidAny) ToInt64() int64 {
39 return 0
40}
41
42func (any *invalidAny) ToUint() uint {
43 return 0
44}
45
46func (any *invalidAny) ToUint32() uint32 {
47 return 0
48}
49
50func (any *invalidAny) ToUint64() uint64 {
51 return 0
52}
53
54func (any *invalidAny) ToFloat32() float32 {
55 return 0
56}
57
58func (any *invalidAny) ToFloat64() float64 {
59 return 0
60}
61
62func (any *invalidAny) ToString() string {
63 return ""
64}
65
66func (any *invalidAny) WriteTo(stream *Stream) {
67}
68
69func (any *invalidAny) Get(path ...interface{}) Any {
70 if any.err == nil {
71 return &invalidAny{baseAny{}, fmt.Errorf("get %v from invalid", path)}
72 }
73 return &invalidAny{baseAny{}, fmt.Errorf("%v, get %v from invalid", any.err, path)}
74}
75
76func (any *invalidAny) Parse() *Iterator {
77 return nil
78}
79
80func (any *invalidAny) GetInterface() interface{} {
81 return nil
82}