diff options
author | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
---|---|---|
committer | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
commit | 404aeae4545d2426c089a5f8d5e82dae56f5212b (patch) | |
tree | 2d84e00af272b39fc04f3795ae06bc48970e57b5 /vendor/github.com/json-iterator/go/any_nil.go | |
parent | 209d8b0187ed025dec9ac149ebcced3462877bff (diff) | |
download | gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip |
Make Nix builds work
Diffstat (limited to 'vendor/github.com/json-iterator/go/any_nil.go')
-rw-r--r-- | vendor/github.com/json-iterator/go/any_nil.go | 69 |
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 @@ | |||
1 | package jsoniter | ||
2 | |||
3 | type nilAny struct { | ||
4 | baseAny | ||
5 | } | ||
6 | |||
7 | func (any *nilAny) LastError() error { | ||
8 | return nil | ||
9 | } | ||
10 | |||
11 | func (any *nilAny) ValueType() ValueType { | ||
12 | return NilValue | ||
13 | } | ||
14 | |||
15 | func (any *nilAny) MustBeValid() Any { | ||
16 | return any | ||
17 | } | ||
18 | |||
19 | func (any *nilAny) ToBool() bool { | ||
20 | return false | ||
21 | } | ||
22 | |||
23 | func (any *nilAny) ToInt() int { | ||
24 | return 0 | ||
25 | } | ||
26 | |||
27 | func (any *nilAny) ToInt32() int32 { | ||
28 | return 0 | ||
29 | } | ||
30 | |||
31 | func (any *nilAny) ToInt64() int64 { | ||
32 | return 0 | ||
33 | } | ||
34 | |||
35 | func (any *nilAny) ToUint() uint { | ||
36 | return 0 | ||
37 | } | ||
38 | |||
39 | func (any *nilAny) ToUint32() uint32 { | ||
40 | return 0 | ||
41 | } | ||
42 | |||
43 | func (any *nilAny) ToUint64() uint64 { | ||
44 | return 0 | ||
45 | } | ||
46 | |||
47 | func (any *nilAny) ToFloat32() float32 { | ||
48 | return 0 | ||
49 | } | ||
50 | |||
51 | func (any *nilAny) ToFloat64() float64 { | ||
52 | return 0 | ||
53 | } | ||
54 | |||
55 | func (any *nilAny) ToString() string { | ||
56 | return "" | ||
57 | } | ||
58 | |||
59 | func (any *nilAny) WriteTo(stream *Stream) { | ||
60 | stream.WriteNil() | ||
61 | } | ||
62 | |||
63 | func (any *nilAny) Parse() *Iterator { | ||
64 | return nil | ||
65 | } | ||
66 | |||
67 | func (any *nilAny) GetInterface() interface{} { | ||
68 | return nil | ||
69 | } | ||