aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/json-iterator/go/any_bool.go
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2023-12-29 21:31:53 +0100
committerLibravatar Rutger Broekhoff2023-12-29 21:31:53 +0100
commit404aeae4545d2426c089a5f8d5e82dae56f5212b (patch)
tree2d84e00af272b39fc04f3795ae06bc48970e57b5 /vendor/github.com/json-iterator/go/any_bool.go
parent209d8b0187ed025dec9ac149ebcced3462877bff (diff)
downloadgitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz
gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip
Make Nix builds work
Diffstat (limited to 'vendor/github.com/json-iterator/go/any_bool.go')
-rw-r--r--vendor/github.com/json-iterator/go/any_bool.go137
1 files changed, 137 insertions, 0 deletions
diff --git a/vendor/github.com/json-iterator/go/any_bool.go b/vendor/github.com/json-iterator/go/any_bool.go
new file mode 100644
index 0000000..9452324
--- /dev/null
+++ b/vendor/github.com/json-iterator/go/any_bool.go
@@ -0,0 +1,137 @@
1package jsoniter
2
3type trueAny struct {
4 baseAny
5}
6
7func (any *trueAny) LastError() error {
8 return nil
9}
10
11func (any *trueAny) ToBool() bool {
12 return true
13}
14
15func (any *trueAny) ToInt() int {
16 return 1
17}
18
19func (any *trueAny) ToInt32() int32 {
20 return 1
21}
22
23func (any *trueAny) ToInt64() int64 {
24 return 1
25}
26
27func (any *trueAny) ToUint() uint {
28 return 1
29}
30
31func (any *trueAny) ToUint32() uint32 {
32 return 1
33}
34
35func (any *trueAny) ToUint64() uint64 {
36 return 1
37}
38
39func (any *trueAny) ToFloat32() float32 {
40 return 1
41}
42
43func (any *trueAny) ToFloat64() float64 {
44 return 1
45}
46
47func (any *trueAny) ToString() string {
48 return "true"
49}
50
51func (any *trueAny) WriteTo(stream *Stream) {
52 stream.WriteTrue()
53}
54
55func (any *trueAny) Parse() *Iterator {
56 return nil
57}
58
59func (any *trueAny) GetInterface() interface{} {
60 return true
61}
62
63func (any *trueAny) ValueType() ValueType {
64 return BoolValue
65}
66
67func (any *trueAny) MustBeValid() Any {
68 return any
69}
70
71type falseAny struct {
72 baseAny
73}
74
75func (any *falseAny) LastError() error {
76 return nil
77}
78
79func (any *falseAny) ToBool() bool {
80 return false
81}
82
83func (any *falseAny) ToInt() int {
84 return 0
85}
86
87func (any *falseAny) ToInt32() int32 {
88 return 0
89}
90
91func (any *falseAny) ToInt64() int64 {
92 return 0
93}
94
95func (any *falseAny) ToUint() uint {
96 return 0
97}
98
99func (any *falseAny) ToUint32() uint32 {
100 return 0
101}
102
103func (any *falseAny) ToUint64() uint64 {
104 return 0
105}
106
107func (any *falseAny) ToFloat32() float32 {
108 return 0
109}
110
111func (any *falseAny) ToFloat64() float64 {
112 return 0
113}
114
115func (any *falseAny) ToString() string {
116 return "false"
117}
118
119func (any *falseAny) WriteTo(stream *Stream) {
120 stream.WriteFalse()
121}
122
123func (any *falseAny) Parse() *Iterator {
124 return nil
125}
126
127func (any *falseAny) GetInterface() interface{} {
128 return false
129}
130
131func (any *falseAny) ValueType() ValueType {
132 return BoolValue
133}
134
135func (any *falseAny) MustBeValid() Any {
136 return any
137}