diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-02-07 15:23:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 15:23:57 +0100 |
commit | 431af32445562b389397f3ee7af90bf61455fff1 (patch) | |
tree | 11ad4dfafd66e7f499307afb99a267d5d8763140 /plumbing/format/idxfile/idxfile.go | |
parent | d0cf20797464ab12b41ccb5c603f67884a6e8e17 (diff) | |
download | go-git-431af32445562b389397f3ee7af90bf61455fff1.tar.gz |
package plumbing documentation improvements (#248)
Diffstat (limited to 'plumbing/format/idxfile/idxfile.go')
-rw-r--r-- | plumbing/format/idxfile/idxfile.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plumbing/format/idxfile/idxfile.go b/plumbing/format/idxfile/idxfile.go index ee014e5..b39295a 100644 --- a/plumbing/format/idxfile/idxfile.go +++ b/plumbing/format/idxfile/idxfile.go @@ -11,7 +11,7 @@ var ( idxHeader = []byte{255, 't', 'O', 'c'} ) -// An Idxfile represents an idx file in memory. +// Idxfile is the in memory representation of an idx file. type Idxfile struct { Version uint32 Fanout [255]uint32 @@ -21,14 +21,14 @@ type Idxfile struct { IdxChecksum [20]byte } -// An Entry represents data about an object in the packfile: its hash, -// offset and CRC32 checksum. +// Entry is the in memory representation of an object entry in the idx file. type Entry struct { Hash plumbing.Hash CRC32 uint32 Offset uint64 } +// Add adds a new Entry with the given values to the Idxfile. func (idx *Idxfile) Add(h plumbing.Hash, offset uint64, crc32 uint32) { idx.Entries = append(idx.Entries, Entry{ Hash: h, |