aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/index
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/format/index')
-rw-r--r--plumbing/format/index/encoder.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/plumbing/format/index/encoder.go b/plumbing/format/index/encoder.go
index 4699d43..bdb10c1 100644
--- a/plumbing/format/index/encoder.go
+++ b/plumbing/format/index/encoder.go
@@ -62,7 +62,7 @@ func (e *Encoder) encodeHeader(idx *Index) error {
}
func (e *Encoder) encodeEntries(idx *Index) error {
- sort.Sort(ByName(idx.Entries))
+ sort.Sort(byName(idx.Entries))
for _, entry := range idx.Entries {
if err := e.encodeEntry(&entry); err != nil {
@@ -143,8 +143,8 @@ func (e *Encoder) encodeFooter() error {
return binary.Write(e.w, e.hash.Sum(nil))
}
-type ByName []Entry
+type byName []Entry
-func (l ByName) Len() int { return len(l) }
-func (l ByName) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
-func (l ByName) Less(i, j int) bool { return l[i].Name < l[j].Name }
+func (l byName) Len() int { return len(l) }
+func (l byName) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
+func (l byName) Less(i, j int) bool { return l[i].Name < l[j].Name }