diff options
author | KatolaZ <katolaz@freaknet.org> | 2018-01-10 23:23:10 +0000 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2018-01-10 23:23:10 +0000 |
commit | ae0b7ac7d3d8b10fe5862a9d7268f559c4a4e445 (patch) | |
tree | 2c2cf3eaf4d8d8fede0a960efcc161c449f57dcd /deb822 | |
parent | b3ca06d08f4bba7af522a085e942d523c697a684 (diff) |
added Recommends
Diffstat (limited to 'deb822')
-rw-r--r-- | deb822/package.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/deb822/package.go b/deb822/package.go index df444ea..3c1c172 100644 --- a/deb822/package.go +++ b/deb822/package.go @@ -16,6 +16,7 @@ type Package struct { Description string LongDescription string Depends []string + Recommends []string Maintainer string Filename string } @@ -41,7 +42,13 @@ func NewPackage(s Stanza) (Package, error) { } p.Maintainer = s["Maintainer"] p.Depends = strings.Split(s["Depends"], ",") - + if len(p.Depends) == 0 { + p.Depends = nil + } + p.Recommends = strings.Split(s["Recommends"], ",") + if len(p.Recommends) == 0 { + p.Recommends = nil + } return p, nil } |