summaryrefslogtreecommitdiff
path: root/deb822
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2018-06-03 23:45:03 +0100
committerKatolaZ <katolaz@freaknet.org>2018-06-03 23:45:03 +0100
commite1751ab0a8d8ef7fbc5c69bfd1a14573e6aa080a (patch)
tree5713403cb6a5faa51067e31d0ec9a1975bf685e4 /deb822
parentabb6d2e7e6c0b2567cae220de463bd054e399bb9 (diff)
added Origin: in package page
Diffstat (limited to 'deb822')
-rw-r--r--deb822/package.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/deb822/package.go b/deb822/package.go
index 525f112..f7352a7 100644
--- a/deb822/package.go
+++ b/deb822/package.go
@@ -24,6 +24,7 @@ type Package struct {
Component string
Section string
Priority string
+ Origin string
}
var regexpRemove = regexp.MustCompile("(DEVUAN/|DEBIAN/|[0-9]+:)")
@@ -61,6 +62,8 @@ func NewPackage(s Stanza) (Package, error) {
}
p.Section = s["Section"]
p.Priority = s["Priority"]
+ p.Origin = strings.Title(strings.ToLower(strings.Split(s["Filename"], "/")[1]))
+ fmt.Printf("p.Origin: %s\n", p.Origin)
return p, nil
}