From 68893edf9ddc3de181431f1552e3b773cb66f080 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Mon, 28 Nov 2016 09:57:38 +0100 Subject: 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. --- plumbing/protocol/packp/ulreq_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plumbing/protocol/packp/ulreq_test.go') 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. -- cgit