From 5990aeb7198a4961a363eeb422a3faa57c8dc029 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 6 Dec 2016 23:17:16 +0100 Subject: revision based on goreportcard.com --- plumbing/protocol/packp/advrefs.go | 2 +- plumbing/protocol/packp/advrefs_decode.go | 4 ++-- plumbing/protocol/packp/advrefs_encode.go | 4 ++-- plumbing/protocol/packp/sideband/demux.go | 6 +++--- plumbing/protocol/packp/sideband/muxer.go | 2 +- plumbing/protocol/packp/ulreq_test.go | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plumbing/protocol') diff --git a/plumbing/protocol/packp/advrefs.go b/plumbing/protocol/packp/advrefs.go index 4e031fb..7d644bc 100644 --- a/plumbing/protocol/packp/advrefs.go +++ b/plumbing/protocol/packp/advrefs.go @@ -24,7 +24,7 @@ type AdvRefs struct { // Moreover, some (all) git HTTP smart servers will send a flush-pkt // just after the first pkt-line. // - // To accomodate both situations, the Prefix field allow you to store + // To accommodate both situations, the Prefix field allow you to store // any data you want to send before the actual pktlines. It will also // be filled up with whatever is found on the line. Prefix [][]byte diff --git a/plumbing/protocol/packp/advrefs_decode.go b/plumbing/protocol/packp/advrefs_decode.go index c42c589..fddd69b 100644 --- a/plumbing/protocol/packp/advrefs_decode.go +++ b/plumbing/protocol/packp/advrefs_decode.go @@ -119,8 +119,8 @@ func isPrefix(payload []byte) bool { return len(payload) > 0 && payload[0] == '#' } -// If the first hash is zero, then a no-refs is comming. Otherwise, a -// list-of-refs is comming, and the hash will be followed by the first +// If the first hash is zero, then a no-refs is coming. Otherwise, a +// list-of-refs is coming, and the hash will be followed by the first // advertised ref. func decodeFirstHash(p *advRefsDecoder) decoderStateFn { // If the repository is empty, we receive a flush here (HTTP). diff --git a/plumbing/protocol/packp/advrefs_encode.go b/plumbing/protocol/packp/advrefs_encode.go index 05a9c8e..e981120 100644 --- a/plumbing/protocol/packp/advrefs_encode.go +++ b/plumbing/protocol/packp/advrefs_encode.go @@ -12,8 +12,8 @@ import ( // Encode writes the AdvRefs encoding to a writer. // -// All the payloads will end with a newline character. Capabilities, -// references and shallows are writen in alphabetical order, except for +// All the payloads will end with a newline character. Capabilities, +// references and shallows are written in alphabetical order, except for // peeled references that always follow their corresponding references. func (a *AdvRefs) Encode(w io.Writer) error { e := newAdvRefsEncoder(w) diff --git a/plumbing/protocol/packp/sideband/demux.go b/plumbing/protocol/packp/sideband/demux.go index 09fe57d..1669ed4 100644 --- a/plumbing/protocol/packp/sideband/demux.go +++ b/plumbing/protocol/packp/sideband/demux.go @@ -20,17 +20,17 @@ type Progress interface { // Demuxer demultiplex the progress reports and error info interleaved with the // packfile itself. // -// A sideband has three diferent channels the main one call PackData contains +// A sideband has three different channels the main one call PackData contains // the packfile data, the ErrorMessage channel, that contains server errors and // the last one ProgressMessage channel containing information about the ongoing -// tast happening in the server (optinal, can be suppressed sending NoProgress +// task happening in the server (optinal, can be suppressed sending NoProgress // or Quiet capabilities to the server) // // In order to demultiplex the data stream, method `Read` should be called to // retrieve the PackData channel, the incoming data from the ProgressMessage is // stored and can be read from `Progress` field, if any message is retrieved // from the ErrorMessage channel an error is returned and we can assume that the -// conection has been closed. +// connection has been closed. type Demuxer struct { t Type r io.Reader diff --git a/plumbing/protocol/packp/sideband/muxer.go b/plumbing/protocol/packp/sideband/muxer.go index 2ab7da8..45fecc2 100644 --- a/plumbing/protocol/packp/sideband/muxer.go +++ b/plumbing/protocol/packp/sideband/muxer.go @@ -19,7 +19,7 @@ const chLen = 1 // // If t is equal to `Sideband` the max pack size is set to MaxPackedSize, in any // other value is given, max pack is set to MaxPackedSize64k, that is the -// maximum lenght of a line in pktline format. +// maximum length of a line in pktline format. func NewMuxer(t Type, w io.Writer) *Muxer { max := MaxPackedSize64k if t == Sideband { diff --git a/plumbing/protocol/packp/ulreq_test.go b/plumbing/protocol/packp/ulreq_test.go index 53626ee..177cf0e 100644 --- a/plumbing/protocol/packp/ulreq_test.go +++ b/plumbing/protocol/packp/ulreq_test.go @@ -112,7 +112,7 @@ func (s *UlReqSuite) TestValidateConflictMultiACK(c *C) { c.Assert(err, NotNil) } -func ExampleUlReqEncoder_Encode() { +func ExampleUploadRequest_Encode() { // Create an empty UlReq with the contents you want... ur := NewUploadRequest() @@ -147,7 +147,7 @@ func ExampleUlReqEncoder_Encode() { // 0000 } -func ExampleUlReqDecoder_Decode() { +func ExampleUploadRequest_Decode() { // Here is a raw advertised-ref message. raw := "" + "005bwant 1111111111111111111111111111111111111111 ofs-delta symref=HEAD:/refs/heads/master\n" + -- cgit