File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -45,19 +45,20 @@ type StringMap map[string]string
45
45
// on the first line is initialize it.
46
46
func (m * StringMap ) UnmarshalXML (d * xml.Decoder , start xml.StartElement ) error {
47
47
* m = StringMap {}
48
- type xmlMapEntry struct {
49
- XMLName xml. Name
50
- Value string `xml:",chardata"`
48
+ type Item struct {
49
+ Key string
50
+ Value string
51
51
}
52
52
for {
53
- var e xmlMapEntry
53
+ var e Item
54
54
err := d .Decode (& e )
55
55
if err == io .EOF {
56
56
break
57
- } else if err != nil {
57
+ }
58
+ if err != nil {
58
59
return err
59
60
}
60
- (* m )[e .XMLName . Local ] = e .Value
61
+ (* m )[e .Key ] = e .Value
61
62
}
62
63
return nil
63
64
}
@@ -118,7 +119,7 @@ type ObjectInfo struct {
118
119
Metadata http.Header `json:"metadata" xml:"-"`
119
120
120
121
// x-amz-meta-* headers stripped "x-amz-meta-" prefix containing the first value.
121
- UserMetadata StringMap `json:"userMetadata"`
122
+ UserMetadata StringMap `json:"userMetadata,omitempty "`
122
123
123
124
// x-amz-tagging values in their k/v values.
124
125
UserTags map [string ]string `json:"userTags"`
You can’t perform that action at this time.
0 commit comments