From d7df91e65e8a3fc1f15934853dfb643d71cf03a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 28 May 2015 21:03:02 +0200 Subject: [PATCH] Move appList closer to usage --- index.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.go b/index.go index fe45e55..8b6af73 100644 --- a/index.go +++ b/index.go @@ -172,12 +172,6 @@ func (app *App) prepareData() { app.calcCurApk() } -type appList []App - -func (al appList) Len() int { return len(al) } -func (al appList) Swap(i, j int) { al[i], al[j] = al[j], al[i] } -func (al appList) Less(i, j int) bool { return al[i].ID < al[j].ID } - func LoadIndexJar(r io.ReaderAt, size int64) (*Index, error) { reader, err := zip.NewReader(r, size) if err != nil { @@ -198,6 +192,12 @@ func LoadIndexJar(r io.ReaderAt, size int64) (*Index, error) { return LoadIndexXml(rc) } +type appList []App + +func (al appList) Len() int { return len(al) } +func (al appList) Swap(i, j int) { al[i], al[j] = al[j], al[i] } +func (al appList) Less(i, j int) bool { return al[i].ID < al[j].ID } + func LoadIndexXml(r io.Reader) (*Index, error) { var index Index decoder := xml.NewDecoder(r)