diff options
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 } |