From 431af32445562b389397f3ee7af90bf61455fff1 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 7 Feb 2017 15:23:57 +0100 Subject: package plumbing documentation improvements (#248) --- plumbing/format/idxfile/decoder.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plumbing/format/idxfile/decoder.go') diff --git a/plumbing/format/idxfile/decoder.go b/plumbing/format/idxfile/decoder.go index 835978b..020c997 100644 --- a/plumbing/format/idxfile/decoder.go +++ b/plumbing/format/idxfile/decoder.go @@ -17,18 +17,17 @@ var ( ErrMalformedIdxFile = errors.New("Malformed IDX file") ) -// A Decoder reads and decodes idx files from an input stream. +// Decoder reads and decodes idx files from an input stream. type Decoder struct { io.Reader } -// NewDecoder returns a new decoder that reads from r. +// NewDecoder builds a new idx stream decoder, that reads from r. func NewDecoder(r io.Reader) *Decoder { return &Decoder{r} } -// Decode reads the whole idx object from its input and stores it in the -// value pointed to by idx. +// Decode reads from the stream and decode the content into the Idxfile struct. func (d *Decoder) Decode(idx *Idxfile) error { if err := validateHeader(d); err != nil { return err -- cgit