From efd2587387c40725aa17fcd2175f42d9631e56ad Mon Sep 17 00:00:00 2001 From: NitishKumar06 Date: Mon, 23 Oct 2023 17:14:39 +0530 Subject: [PATCH] add omitempty field in package struct Signed-off-by: NitishKumar06 --- obs/packages.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/obs/packages.go b/obs/packages.go index ca03b0f..2e006f8 100644 --- a/obs/packages.go +++ b/obs/packages.go @@ -31,8 +31,7 @@ type Package struct { Name string `json:"name" xml:"name,attr"` Title string `json:"title,omitempty" xml:"title,omitempty"` Description string `json:"description,omitempty" xml:"description,omitempty"` - Devel Devel `json:"devel" xml:"devel"` - Entries []Entry `json:"entry" xml:"entry"` + Devel Devel `json:"devel" xml:"devel,omitempty"` } // Devel represents the development information @@ -41,11 +40,6 @@ type Devel struct { Package string `json:"package" xml:"package,attr"` } -// Entry is a struct representing an individual package entry. -type Entry struct { - Name string `json:"name" xml:"name,attr"` -} - // CreateUpdatePackage creates a new OBS package or updates an existing OBS package of a project func (o *OBS) CreateUpdatePackage(ctx context.Context, projectName string, pkg *Package) error { xmlData, err := xml.MarshalIndent(pkg, "", " ")