Fix some config Copy() things we had forgotten

This commit is contained in:
Jakob Borg
2015-10-27 11:53:42 +01:00
parent 724c1e297f
commit 679f0f9363
3 changed files with 14 additions and 0 deletions

View File

@@ -23,6 +23,15 @@ type InternalParam struct {
Val string `xml:"val,attr"`
}
func (c VersioningConfiguration) Copy() VersioningConfiguration {
cp := c
cp.Params = make(map[string]string, len(c.Params))
for k, v := range c.Params {
cp.Params[k] = v
}
return cp
}
func (c *VersioningConfiguration) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
var tmp InternalVersioningConfiguration
tmp.Type = c.Type