From eb6140663c35cd0088279c6f0f86bc1d4b11561b Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sat, 10 Mar 2018 14:41:41 -0300 Subject: [PATCH] fix: fixed empty lists on deb closes #16 --- deb/deb.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/deb/deb.go b/deb/deb.go index 24fdc442..6f6c7362 100644 --- a/deb/deb.go +++ b/deb/deb.go @@ -257,12 +257,24 @@ Architecture: {{.Info.Arch}} Maintainer: {{.Info.Maintainer}} Vendor: {{.Info.Vendor}} Installed-Size: {{.InstalledSize}} -Replaces: {{join .Info.Replaces}} -Provides: {{join .Info.Provides}} -Depends: {{join .Info.Depends}} -Recommends: {{join .Info.Recommends}} -Suggests: {{join .Info.Suggests}} -Conflicts: {{join .Info.Conflicts}} +{{- with .Info.Replaces}} +Replaces: {{join .}} +{{- end }} +{{- with .Info.Provides}} +Provides: {{join .}} +{{- end }} +{{- with .Info.Depends}} +Depends: {{join .}} +{{- end }} +{{- with .Info.Recommends}} +Recommends: {{join .}} +{{- end }} +{{- with .Info.Suggests}} +Suggests: {{join .}} +{{- end }} +{{- with .Info.Conflicts}} +Conflicts: {{join .}} +{{- end }} Homepage: {{.Info.Homepage}} Description: {{.Info.Description}} `