diff options
author | Santiago M. Mola <santi@mola.io> | 2016-11-28 09:57:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-28 09:57:38 +0100 |
commit | 68893edf9ddc3de181431f1552e3b773cb66f080 (patch) | |
tree | f45e5fa18e10168a278b7d0ed7dea984ff9969f7 /plumbing/protocol/packp/ulreq_test.go | |
parent | f9adb3565b36ba1573102f954d0ee916009efac2 (diff) | |
download | go-git-68893edf9ddc3de181431f1552e3b773cb66f080.tar.gz |
remove old types from transport and use packp (#142)
* protocol: move UploadPackRequest to protocol.
* UploadPackRequest is now defined as an embedding of UploadRequest and
UploadHaves.
* Move http encoding specific code from UploadPackRequest to transport/http.
* rename UlReq to UploadRequest
* packp: move AdvRefs Encoder/Decoder to Encode/Decode methods.
* packp: move UploadRequest Encoder/Decoder to Encode/Decode methods.
* packp: Remove transport.UploadPackInfo in favor of packp. AdvRefs.
Diffstat (limited to 'plumbing/protocol/packp/ulreq_test.go')
-rw-r--r-- | plumbing/protocol/packp/ulreq_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/protocol/packp/ulreq_test.go b/plumbing/protocol/packp/ulreq_test.go index 19b6dd0..be02f9d 100644 --- a/plumbing/protocol/packp/ulreq_test.go +++ b/plumbing/protocol/packp/ulreq_test.go @@ -12,7 +12,7 @@ import ( func ExampleUlReqEncoder_Encode() { // Create an empty UlReq with the contents you want... - ur := NewUlReq() + ur := NewUploadRequest() // Add a couple of wants ur.Wants = append(ur.Wants, plumbing.NewHash("3333333333333333333333333333333333333333")) @@ -32,7 +32,7 @@ func ExampleUlReqEncoder_Encode() { ur.Depth = DepthSince(since) // Create a new Encode for the stdout... - e := NewUlReqEncoder(os.Stdout) + e := newUlReqEncoder(os.Stdout) // ...and encode the upload-request to it. _ = e.Encode(ur) // ignoring errors for brevity // Output: @@ -60,10 +60,10 @@ func ExampleUlReqDecoder_Decode() { input := strings.NewReader(raw) // Create the Decoder reading from our input. - d := NewUlReqDecoder(input) + d := newUlReqDecoder(input) // Decode the input into a newly allocated UlReq value. - ur := NewUlReq() + ur := NewUploadRequest() _ = d.Decode(ur) // error check ignored for brevity // Do something interesting with the UlReq, e.g. print its contents. |