aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/idxfile/decoder.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-02-07 15:23:57 +0100
committerGitHub <noreply@github.com>2017-02-07 15:23:57 +0100
commit431af32445562b389397f3ee7af90bf61455fff1 (patch)
tree11ad4dfafd66e7f499307afb99a267d5d8763140 /plumbing/format/idxfile/decoder.go
parentd0cf20797464ab12b41ccb5c603f67884a6e8e17 (diff)
downloadgo-git-431af32445562b389397f3ee7af90bf61455fff1.tar.gz
package plumbing documentation improvements (#248)
Diffstat (limited to 'plumbing/format/idxfile/decoder.go')
-rw-r--r--plumbing/format/idxfile/decoder.go7
1 files changed, 3 insertions, 4 deletions
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