aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/json-iterator/go/any_uint32.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_uint32.go
parent209d8b0187ed025dec9ac149ebcced3462877bff (diff)
downloadgitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz
gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip
Make Nix builds work
Diffstat (limited to 'vendor/github.com/json-iterator/go/any_uint32.go')
-rw-r--r--vendor/github.com/json-iterator/go/any_uint32.go74
1 files changed, 74 insertions, 0 deletions
diff --git a/vendor/github.com/json-iterator/go/any_uint32.go b/vendor/github.com/json-iterator/go/any_uint32.go
new file mode 100644
index 0000000..656bbd3
--- /dev/null
+++ b/vendor/github.com/json-iterator/go/any_uint32.go
@@ -0,0 +1,74 @@
1package jsoniter
2
3import (
4 "strconv"
5)
6
7type uint32Any struct {
8 baseAny
9 val uint32
10}
11
12func (any *uint32Any) LastError() error {
13 return nil
14}
15
16func (any *uint32Any) ValueType() ValueType {
17 return NumberValue
18}
19
20func (any *uint32Any) MustBeValid() Any {
21 return any
22}
23
24func (any *uint32Any) ToBool() bool {
25 return any.val != 0
26}
27
28func (any *uint32Any) ToInt() int {
29 return int(any.val)
30}
31
32func (any *uint32Any) ToInt32() int32 {
33 return int32(any.val)
34}
35
36func (any *uint32Any) ToInt64() int64 {
37 return int64(any.val)
38}
39
40func (any *uint32Any) ToUint() uint {
41 return uint(any.val)
42}
43
44func (any *uint32Any) ToUint32() uint32 {
45 return any.val
46}
47
48func (any *uint32Any) ToUint64() uint64 {
49 return uint64(any.val)
50}
51
52func (any *uint32Any) ToFloat32() float32 {
53 return float32(any.val)
54}
55
56func (any *uint32Any) ToFloat64() float64 {
57 return float64(any.val)
58}
59
60func (any *uint32Any) ToString() string {
61 return strconv.FormatInt(int64(any.val), 10)
62}
63
64func (any *uint32Any) WriteTo(stream *Stream) {
65 stream.WriteUint32(any.val)
66}
67
68func (any *uint32Any) Parse() *Iterator {
69 return nil
70}
71
72func (any *uint32Any) GetInterface() interface{} {
73 return any.val
74}