From 6a1390d1004ea05a43b57ac05d3b0884d23af16e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 23 Sep 2015 19:28:02 -0700 Subject: [PATCH] Link back to apps from apks --- index.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.go b/index.go index 397e657..858dffa 100644 --- a/index.go +++ b/index.go @@ -196,7 +196,9 @@ type Apk struct { Perms CommaList `xml:"permissions"` Feats CommaList `xml:"features"` Hash HexHash `xml:"hash"` - Repo *Repo `xml:"-"` + + App *App `xml:"-"` + Repo *Repo `xml:"-"` } func (a *Apk) URL() string { @@ -233,6 +235,7 @@ func LoadIndexXml(r io.Reader) (*Index, error) { sort.Sort(ApkList(app.Apks)) for j := range app.Apks { apk := &app.Apks[j] + apk.App = app apk.Repo = &index.Repo } }