From 36c85bf2993343fd4cbf5da94e94791d5121a130 Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Sun, 6 Nov 2016 11:18:26 -0800 Subject: [PATCH] properly name method receiver --- sort.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sort.go b/sort.go index c5018c5..d853e94 100644 --- a/sort.go +++ b/sort.go @@ -9,8 +9,8 @@ func (r results) Less(i, j int) bool { return r[i].h[0].count > r[j].h[0].count } -func (n histogram) Len() int { return len(n) } -func (n histogram) Swap(i, j int) { n[i], n[j] = n[j], n[i] } -func (n histogram) Less(i, j int) bool { - return n[i].count > n[j].count +func (h histogram) Len() int { return len(h) } +func (h histogram) Swap(i, j int) { h[i], h[j] = h[j], h[i] } +func (h histogram) Less(i, j int) bool { + return h[i].count > h[j].count }