Lines Matching refs:dst

12 func (Encoder) AppendNil(dst []byte) []byte {
13 return append(dst, "null"...)
17 func (Encoder) AppendBeginMarker(dst []byte) []byte {
18 return append(dst, '{')
22 func (Encoder) AppendEndMarker(dst []byte) []byte {
23 return append(dst, '}')
27 func (Encoder) AppendLineBreak(dst []byte) []byte {
28 return append(dst, '\n')
32 func (Encoder) AppendArrayStart(dst []byte) []byte {
33 return append(dst, '[')
37 func (Encoder) AppendArrayEnd(dst []byte) []byte {
38 return append(dst, ']')
42 func (Encoder) AppendArrayDelim(dst []byte) []byte {
43 if len(dst) > 0 {
44 return append(dst, ',')
46 return dst
51 func (Encoder) AppendBool(dst []byte, val bool) []byte {
52 return strconv.AppendBool(dst, val)
57 func (Encoder) AppendBools(dst []byte, vals []bool) []byte {
59 return append(dst, '[', ']')
61 dst = append(dst, '[')
62 dst = strconv.AppendBool(dst, vals[0])
65 dst = strconv.AppendBool(append(dst, ','), val)
68 dst = append(dst, ']')
69 return dst
74 func (Encoder) AppendInt(dst []byte, val int) []byte {
75 return strconv.AppendInt(dst, int64(val), 10)
80 func (Encoder) AppendInts(dst []byte, vals []int) []byte {
82 return append(dst, '[', ']')
84 dst = append(dst, '[')
85 dst = strconv.AppendInt(dst, int64(vals[0]), 10)
88 dst = strconv.AppendInt(append(dst, ','), int64(val), 10)
91 dst = append(dst, ']')
92 return dst
97 func (Encoder) AppendInt8(dst []byte, val int8) []byte {
98 return strconv.AppendInt(dst, int64(val), 10)
103 func (Encoder) AppendInts8(dst []byte, vals []int8) []byte {
105 return append(dst, '[', ']')
107 dst = append(dst, '[')
108 dst = strconv.AppendInt(dst, int64(vals[0]), 10)
111 dst = strconv.AppendInt(append(dst, ','), int64(val), 10)
114 dst = append(dst, ']')
115 return dst
120 func (Encoder) AppendInt16(dst []byte, val int16) []byte {
121 return strconv.AppendInt(dst, int64(val), 10)
126 func (Encoder) AppendInts16(dst []byte, vals []int16) []byte {
128 return append(dst, '[', ']')
130 dst = append(dst, '[')
131 dst = strconv.AppendInt(dst, int64(vals[0]), 10)
134 dst = strconv.AppendInt(append(dst, ','), int64(val), 10)
137 dst = append(dst, ']')
138 return dst
143 func (Encoder) AppendInt32(dst []byte, val int32) []byte {
144 return strconv.AppendInt(dst, int64(val), 10)
149 func (Encoder) AppendInts32(dst []byte, vals []int32) []byte {
151 return append(dst, '[', ']')
153 dst = append(dst, '[')
154 dst = strconv.AppendInt(dst, int64(vals[0]), 10)
157 dst = strconv.AppendInt(append(dst, ','), int64(val), 10)
160 dst = append(dst, ']')
161 return dst
166 func (Encoder) AppendInt64(dst []byte, val int64) []byte {
167 return strconv.AppendInt(dst, val, 10)
172 func (Encoder) AppendInts64(dst []byte, vals []int64) []byte {
174 return append(dst, '[', ']')
176 dst = append(dst, '[')
177 dst = strconv.AppendInt(dst, vals[0], 10)
180 dst = strconv.AppendInt(append(dst, ','), val, 10)
183 dst = append(dst, ']')
184 return dst
189 func (Encoder) AppendUint(dst []byte, val uint) []byte {
190 return strconv.AppendUint(dst, uint64(val), 10)
195 func (Encoder) AppendUints(dst []byte, vals []uint) []byte {
197 return append(dst, '[', ']')
199 dst = append(dst, '[')
200 dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
203 dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
206 dst = append(dst, ']')
207 return dst
212 func (Encoder) AppendUint8(dst []byte, val uint8) []byte {
213 return strconv.AppendUint(dst, uint64(val), 10)
218 func (Encoder) AppendUints8(dst []byte, vals []uint8) []byte {
220 return append(dst, '[', ']')
222 dst = append(dst, '[')
223 dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
226 dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
229 dst = append(dst, ']')
230 return dst
235 func (Encoder) AppendUint16(dst []byte, val uint16) []byte {
236 return strconv.AppendUint(dst, uint64(val), 10)
241 func (Encoder) AppendUints16(dst []byte, vals []uint16) []byte {
243 return append(dst, '[', ']')
245 dst = append(dst, '[')
246 dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
249 dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
252 dst = append(dst, ']')
253 return dst
258 func (Encoder) AppendUint32(dst []byte, val uint32) []byte {
259 return strconv.AppendUint(dst, uint64(val), 10)
264 func (Encoder) AppendUints32(dst []byte, vals []uint32) []byte {
266 return append(dst, '[', ']')
268 dst = append(dst, '[')
269 dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
272 dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
275 dst = append(dst, ']')
276 return dst
281 func (Encoder) AppendUint64(dst []byte, val uint64) []byte {
282 return strconv.AppendUint(dst, uint64(val), 10)
287 func (Encoder) AppendUints64(dst []byte, vals []uint64) []byte {
289 return append(dst, '[', ']')
291 dst = append(dst, '[')
292 dst = strconv.AppendUint(dst, vals[0], 10)
295 dst = strconv.AppendUint(append(dst, ','), val, 10)
298 dst = append(dst, ']')
299 return dst
302 func appendFloat(dst []byte, val float64, bitSize int) []byte {
308 return append(dst, `"NaN"`...)
310 return append(dst, `"+Inf"`...)
312 return append(dst, `"-Inf"`...)
314 return strconv.AppendFloat(dst, val, 'f', -1, bitSize)
319 func (Encoder) AppendFloat32(dst []byte, val float32) []byte {
320 return appendFloat(dst, float64(val), 32)
325 func (Encoder) AppendFloats32(dst []byte, vals []float32) []byte {
327 return append(dst, '[', ']')
329 dst = append(dst, '[')
330 dst = appendFloat(dst, float64(vals[0]), 32)
333 dst = appendFloat(append(dst, ','), float64(val), 32)
336 dst = append(dst, ']')
337 return dst
342 func (Encoder) AppendFloat64(dst []byte, val float64) []byte {
343 return appendFloat(dst, val, 64)
348 func (Encoder) AppendFloats64(dst []byte, vals []float64) []byte {
350 return append(dst, '[', ']')
352 dst = append(dst, '[')
353 dst = appendFloat(dst, vals[0], 32)
356 dst = appendFloat(append(dst, ','), val, 64)
359 dst = append(dst, ']')
360 return dst
365 func (e Encoder) AppendInterface(dst []byte, i interface{}) []byte {
368 return e.AppendString(dst, fmt.Sprintf("marshaling error: %v", err))
370 return append(dst, marshaled...)
375 func (Encoder) AppendObjectData(dst []byte, o []byte) []byte {
382 if len(dst) > 1 {
383 dst = append(dst, ',')
386 } else if len(dst) > 1 {
387 dst = append(dst, ',')
389 return append(dst, o...)
393 func (e Encoder) AppendIPAddr(dst []byte, ip net.IP) []byte {
394 return e.AppendString(dst, ip.String())
398 func (e Encoder) AppendIPPrefix(dst []byte, pfx net.IPNet) []byte {
399 return e.AppendString(dst, pfx.String())
404 func (e Encoder) AppendMACAddr(dst []byte, ha net.HardwareAddr) []byte {
405 return e.AppendString(dst, ha.String())