Skip to content

Commit

Permalink
add omitempty field in package struct
Browse files Browse the repository at this point in the history
Signed-off-by: NitishKumar06 <[email protected]>
  • Loading branch information
nitishfy committed Oct 23, 2023
1 parent 90cfb2a commit efd2587
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions obs/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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, "", " ")
Expand Down

0 comments on commit efd2587

Please sign in to comment.