Skip to content

Commit

Permalink
Add missing JSON tags for NoncurrentVersionExpiration struct (#1823)
Browse files Browse the repository at this point in the history
The omission of the missing JSON tags on the NoncurrentVersionExpiration
struct was causing the default value of NoncurrentDays to be shown even
when it was not being entered
  • Loading branch information
kaankabalak authored May 17, 2023
1 parent 60f5f05 commit 78f1dd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/lifecycle/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func (n AbortIncompleteMultipartUpload) MarshalXML(e *xml.Encoder, start xml.Sta
// specific period in the object's lifetime.
type NoncurrentVersionExpiration struct {
XMLName xml.Name `xml:"NoncurrentVersionExpiration" json:"-"`
NoncurrentDays ExpirationDays `xml:"NoncurrentDays,omitempty"`
NewerNoncurrentVersions int `xml:"NewerNoncurrentVersions,omitempty"`
NoncurrentDays ExpirationDays `xml:"NoncurrentDays,omitempty" json:"NoncurrentDays,omitempty"`
NewerNoncurrentVersions int `xml:"NewerNoncurrentVersions,omitempty" json:"NewerNoncurrentVersions,omitempty"`
}

// MarshalXML if n is non-empty, i.e has a non-zero NoncurrentDays or NewerNoncurrentVersions.
Expand Down

0 comments on commit 78f1dd8

Please sign in to comment.