-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunc.qtpl.go
More file actions
169 lines (156 loc) · 3.83 KB
/
Copy pathfunc.qtpl.go
File metadata and controls
169 lines (156 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// Code generated by qtc from "func.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line func.qtpl:2
package fastjsonrpc
//line func.qtpl:2
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line func.qtpl:2
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line func.qtpl:2
func streamnewResult(qw422016 *qt422016.Writer, id, result []byte) {
//line func.qtpl:2
qw422016.N().S(`{"jsonrpc":"2.0","result":`)
//line func.qtpl:5
qw422016.N().Z(result)
//line func.qtpl:6
if len(id) > 0 {
//line func.qtpl:6
qw422016.N().S(`,"id":`)
//line func.qtpl:6
qw422016.N().Z(id)
//line func.qtpl:6
}
//line func.qtpl:6
qw422016.N().S(`}`)
//line func.qtpl:8
}
//line func.qtpl:8
func writenewResult(qq422016 qtio422016.Writer, id, result []byte) {
//line func.qtpl:8
qw422016 := qt422016.AcquireWriter(qq422016)
//line func.qtpl:8
streamnewResult(qw422016, id, result)
//line func.qtpl:8
qt422016.ReleaseWriter(qw422016)
//line func.qtpl:8
}
//line func.qtpl:8
func newResult(id, result []byte) string {
//line func.qtpl:8
qb422016 := qt422016.AcquireByteBuffer()
//line func.qtpl:8
writenewResult(qb422016, id, result)
//line func.qtpl:8
qs422016 := string(qb422016.B)
//line func.qtpl:8
qt422016.ReleaseByteBuffer(qb422016)
//line func.qtpl:8
return qs422016
//line func.qtpl:8
}
//line func.qtpl:12
func streamnewError(qw422016 *qt422016.Writer, id []byte, code int, message string, data []byte) {
//line func.qtpl:12
qw422016.N().S(`{"jsonrpc":"2.0","error":{"code":`)
//line func.qtpl:16
qw422016.N().D(code)
//line func.qtpl:16
qw422016.N().S(`,"message":"`)
//line func.qtpl:17
qw422016.E().J(message)
//line func.qtpl:17
qw422016.N().S(`"`)
//line func.qtpl:18
if len(data) > 0 {
//line func.qtpl:18
qw422016.N().S(`,"data":`)
//line func.qtpl:19
qw422016.N().Z(data)
//line func.qtpl:20
}
//line func.qtpl:20
qw422016.N().S(`}`)
//line func.qtpl:22
if len(id) > 0 {
//line func.qtpl:22
qw422016.N().S(`,"id":`)
//line func.qtpl:22
qw422016.N().Z(id)
//line func.qtpl:22
}
//line func.qtpl:22
qw422016.N().S(`}`)
//line func.qtpl:24
}
//line func.qtpl:24
func writenewError(qq422016 qtio422016.Writer, id []byte, code int, message string, data []byte) {
//line func.qtpl:24
qw422016 := qt422016.AcquireWriter(qq422016)
//line func.qtpl:24
streamnewError(qw422016, id, code, message, data)
//line func.qtpl:24
qt422016.ReleaseWriter(qw422016)
//line func.qtpl:24
}
//line func.qtpl:24
func newError(id []byte, code int, message string, data []byte) string {
//line func.qtpl:24
qb422016 := qt422016.AcquireByteBuffer()
//line func.qtpl:24
writenewError(qb422016, id, code, message, data)
//line func.qtpl:24
qs422016 := string(qb422016.B)
//line func.qtpl:24
qt422016.ReleaseByteBuffer(qb422016)
//line func.qtpl:24
return qs422016
//line func.qtpl:24
}
//line func.qtpl:28
func streamrpcError(qw422016 *qt422016.Writer, id, error []byte) {
//line func.qtpl:28
qw422016.N().S(`{"jsonrpc":"2.0","error":`)
//line func.qtpl:31
qw422016.N().Z(error)
//line func.qtpl:32
if len(id) > 0 {
//line func.qtpl:32
qw422016.N().S(`,"id":`)
//line func.qtpl:32
qw422016.N().Z(id)
//line func.qtpl:32
}
//line func.qtpl:32
qw422016.N().S(`}`)
//line func.qtpl:34
}
//line func.qtpl:34
func writerpcError(qq422016 qtio422016.Writer, id, error []byte) {
//line func.qtpl:34
qw422016 := qt422016.AcquireWriter(qq422016)
//line func.qtpl:34
streamrpcError(qw422016, id, error)
//line func.qtpl:34
qt422016.ReleaseWriter(qw422016)
//line func.qtpl:34
}
//line func.qtpl:34
func rpcError(id, error []byte) string {
//line func.qtpl:34
qb422016 := qt422016.AcquireByteBuffer()
//line func.qtpl:34
writerpcError(qb422016, id, error)
//line func.qtpl:34
qs422016 := string(qb422016.B)
//line func.qtpl:34
qt422016.ReleaseByteBuffer(qb422016)
//line func.qtpl:34
return qs422016
//line func.qtpl:34
}