This repository was archived by the owner on Sep 11, 2020. It is now read-only.
Commit 8cd772a
Fix pktline api (#89)
* Change pktline API so you can add payloads
The old pktline API only had one method: New, that receives the
payloads and return the new PktLine, that was an io.Reader. This means
you have to prepare the contents beforehand, in a [][]byte and then
call the ctor to build the pktlines.
Now, the construction of the pktlines and the method to add payloads are
separated:
New() // creates an empty PktLines
AddFlush()
Add(pp ...[]byte)
AddString(pp ...string)
and a PktLines has a public member R, which is the io.Reader of the
pktlines added.
* metalinter
* change package name from pktlines to pktline
* change package name from pktlines to pktline for true
* make pktlines a reader instead of have a reader1 parent 176cdac commit 8cd772a
File tree
6 files changed
+408
-349
lines changed- clients/common
- formats/packp/pktline
6 files changed
+408
-349
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | | - | |
| 296 | + | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | | - | |
| 314 | + | |
| 315 | + | |
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
| |||
338 | 337 | | |
339 | 338 | | |
340 | 339 | | |
341 | | - | |
| 340 | + | |
342 | 341 | | |
343 | 342 | | |
344 | | - | |
| 343 | + | |
345 | 344 | | |
346 | 345 | | |
347 | 346 | | |
348 | | - | |
| 347 | + | |
349 | 348 | | |
350 | 349 | | |
351 | 350 | | |
352 | | - | |
| 351 | + | |
353 | 352 | | |
354 | 353 | | |
355 | | - | |
356 | | - | |
| 354 | + | |
| 355 | + | |
357 | 356 | | |
358 | | - | |
359 | | - | |
| 357 | + | |
360 | 358 | | |
361 | 359 | | |
362 | 360 | | |
This file was deleted.
This file was deleted.
0 commit comments