diff options
author | Alberto Cortés <alcortesm@gmail.com> | 2016-10-19 22:08:59 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-10-19 22:08:59 +0200 |
commit | 8cd772a53e8ecd2687b739eea110fa9b179f1e0f (patch) | |
tree | 37911e19713b8f562c801efc172244795655cb8e /storage | |
parent | 176cdac72c9c6eb8d875c90664a433d94e968438 (diff) | |
download | go-git-8cd772a53e8ecd2687b739eea110fa9b179f1e0f.tar.gz |
Fix pktline api (#89)v4.0.0-rc1
* 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 reader
Diffstat (limited to 'storage')
0 files changed, 0 insertions, 0 deletions