Lines Matching refs:dst

11 func (Encoder) AppendNil(dst []byte) []byte {
12 return append(dst, "null"...)
16 func (Encoder) AppendBeginMarker(dst []byte) []byte {
17 return append(dst, '{')
21 func (Encoder) AppendEndMarker(dst []byte) []byte {
22 return append(dst, '}')
26 func (Encoder) AppendLineBreak(dst []byte) []byte {
27 return append(dst, '\n')
31 func (Encoder) AppendArrayStart(dst []byte) []byte {
32 return append(dst, '[')
36 func (Encoder) AppendArrayEnd(dst []byte) []byte {
37 return append(dst, ']')
41 func (Encoder) AppendArrayDelim(dst []byte) []byte {
42 if len(dst) > 0 {
43 return append(dst, ',')
45 return dst
50 func (Encoder) AppendBool(dst []byte, val bool) []byte {
51 return strconv.AppendBool(dst, val)
56 func (Encoder) AppendBools(dst []byte, vals []bool) []byte {
58 return append(dst, '[', ']')
60 dst = append(dst, '[')
61 dst = strconv.AppendBool(dst, vals[0])
64 dst = strconv.AppendBool(append(dst, ','), val)
67 dst = append(dst, ']')
68 return dst
73 func (Encoder) AppendInt(dst []byte, val int) []byte {
74 return strconv.AppendInt(dst, int64(val), 10)
79 func (Encoder) AppendInts(dst []byte, vals []int) []byte {
81 return append(dst, '[', ']')
83 dst = append(dst, '[')
84 dst = strconv.AppendInt(dst, int64(vals[0]), 10)
87 dst = strconv.AppendInt(append(dst, ','), int64(val), 10)
90 dst = append(dst, ']')
91 return dst
96 func (Encoder) AppendInt8(dst []byte, val int8) []byte {
97 return strconv.AppendInt(dst, int64(val), 10)
102 func (Encoder) AppendInts8(dst []byte, vals []int8) []byte {
104 return append(dst, '[', ']')
106 dst = append(dst, '[')
107 dst = strconv.AppendInt(dst, int64(vals[0]), 10)
110 dst = strconv.AppendInt(append(dst, ','), int64(val), 10)
113 dst = append(dst, ']')
114 return dst
119 func (Encoder) AppendInt16(dst []byte, val int16) []byte {
120 return strconv.AppendInt(dst, int64(val), 10)
125 func (Encoder) AppendInts16(dst []byte, vals []int16) []byte {
127 return append(dst, '[', ']')
129 dst = append(dst, '[')
130 dst = strconv.AppendInt(dst, int64(vals[0]), 10)
133 dst = strconv.AppendInt(append(dst, ','), int64(val), 10)
136 dst = append(dst, ']')
137 return dst
142 func (Encoder) AppendInt32(dst []byte, val int32) []byte {
143 return strconv.AppendInt(dst, int64(val), 10)
148 func (Encoder) AppendInts32(dst []byte, vals []int32) []byte {
150 return append(dst, '[', ']')
152 dst = append(dst, '[')
153 dst = strconv.AppendInt(dst, int64(vals[0]), 10)
156 dst = strconv.AppendInt(append(dst, ','), int64(val), 10)
159 dst = append(dst, ']')
160 return dst
165 func (Encoder) AppendInt64(dst []byte, val int64) []byte {
166 return strconv.AppendInt(dst, val, 10)
171 func (Encoder) AppendInts64(dst []byte, vals []int64) []byte {
173 return append(dst, '[', ']')
175 dst = append(dst, '[')
176 dst = strconv.AppendInt(dst, vals[0], 10)
179 dst = strconv.AppendInt(append(dst, ','), val, 10)
182 dst = append(dst, ']')
183 return dst
188 func (Encoder) AppendUint(dst []byte, val uint) []byte {
189 return strconv.AppendUint(dst, uint64(val), 10)
194 func (Encoder) AppendUints(dst []byte, vals []uint) []byte {
196 return append(dst, '[', ']')
198 dst = append(dst, '[')
199 dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
202 dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
205 dst = append(dst, ']')
206 return dst
211 func (Encoder) AppendUint8(dst []byte, val uint8) []byte {
212 return strconv.AppendUint(dst, uint64(val), 10)
217 func (Encoder) AppendUints8(dst []byte, vals []uint8) []byte {
219 return append(dst, '[', ']')
221 dst = append(dst, '[')
222 dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
225 dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
228 dst = append(dst, ']')
229 return dst
234 func (Encoder) AppendUint16(dst []byte, val uint16) []byte {
235 return strconv.AppendUint(dst, uint64(val), 10)
240 func (Encoder) AppendUints16(dst []byte, vals []uint16) []byte {
242 return append(dst, '[', ']')
244 dst = append(dst, '[')
245 dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
248 dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
251 dst = append(dst, ']')
252 return dst
257 func (Encoder) AppendUint32(dst []byte, val uint32) []byte {
258 return strconv.AppendUint(dst, uint64(val), 10)
263 func (Encoder) AppendUints32(dst []byte, vals []uint32) []byte {
265 return append(dst, '[', ']')
267 dst = append(dst, '[')
268 dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
271 dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
274 dst = append(dst, ']')
275 return dst
280 func (Encoder) AppendUint64(dst []byte, val uint64) []byte {
281 return strconv.AppendUint(dst, uint64(val), 10)
286 func (Encoder) AppendUints64(dst []byte, vals []uint64) []byte {
288 return append(dst, '[', ']')
290 dst = append(dst, '[')
291 dst = strconv.AppendUint(dst, vals[0], 10)
294 dst = strconv.AppendUint(append(dst, ','), val, 10)
297 dst = append(dst, ']')
298 return dst
301 func appendFloat(dst []byte, val float64, bitSize int) []byte {
307 return append(dst, `"NaN"`...)
309 return append(dst, `"+Inf"`...)
311 return append(dst, `"-Inf"`...)
313 return strconv.AppendFloat(dst, val, 'f', -1, bitSize)
318 func (Encoder) AppendFloat32(dst []byte, val float32) []byte {
319 return appendFloat(dst, float64(val), 32)
324 func (Encoder) AppendFloats32(dst []byte, vals []float32) []byte {
326 return append(dst, '[', ']')
328 dst = append(dst, '[')
329 dst = appendFloat(dst, float64(vals[0]), 32)
332 dst = appendFloat(append(dst, ','), float64(val), 32)
335 dst = append(dst, ']')
336 return dst
341 func (Encoder) AppendFloat64(dst []byte, val float64) []byte {
342 return appendFloat(dst, val, 64)
347 func (Encoder) AppendFloats64(dst []byte, vals []float64) []byte {
349 return append(dst, '[', ']')
351 dst = append(dst, '[')
352 dst = appendFloat(dst, vals[0], 64)
355 dst = appendFloat(append(dst, ','), val, 64)
358 dst = append(dst, ']')
359 return dst
364 func (e Encoder) AppendInterface(dst []byte, i interface{}) []byte {
367 return e.AppendString(dst, fmt.Sprintf("marshaling error: %v", err))
369 return append(dst, marshaled...)
374 func (Encoder) AppendObjectData(dst []byte, o []byte) []byte {
381 if len(dst) > 1 {
382 dst = append(dst, ',')
385 } else if len(dst) > 1 {
386 dst = append(dst, ',')
388 return append(dst, o...)
392 func (e Encoder) AppendIPAddr(dst []byte, ip net.IP) []byte {
393 return e.AppendString(dst, ip.String())
397 func (e Encoder) AppendIPPrefix(dst []byte, pfx net.IPNet) []byte {
398 return e.AppendString(dst, pfx.String())
403 func (e Encoder) AppendMACAddr(dst []byte, ha net.HardwareAddr) []byte {
404 return e.AppendString(dst, ha.String())