simplify bucket metadata lookups for versioning/object locking (#17253)

This commit is contained in:
Harshavardhana authored and GitHub committed 2023-05-22 12:05:14 -07:00
1 parent b1b00a5055
commit fc03be7891
5 files changed
+21 -8

No files matched your search

+5
View File
@@ -229,6 +229,11 @@ type Config struct {
} `xml:"Rule,omitempty"`
}
// Enabled returns true if config.ObjectLockEnabled is set to Enabled
func (config *Config) Enabled() bool {
return config.ObjectLockEnabled == Enabled
}
// UnmarshalXML - decodes XML data.
func (config *Config) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
// Make subtype to avoid recursive UnmarshalXML().