// An UnmarshalError represents an error in the unmarshalling process.
type UnmarshalError string
+
func (e UnmarshalError) String() string {
return string(e);
}
}
var (
- data []byte;
- saveData reflect.Value;
- comment []byte;
- saveComment reflect.Value;
- sv *reflect.StructValue;
- styp *reflect.StructType;
+ data []byte;
+ saveData reflect.Value;
+ comment []byte;
+ saveComment reflect.Value;
+ sv *reflect.StructValue;
+ styp *reflect.StructType;
)
switch v := val.(type) {
case *reflect.BoolValue:
ns := "";
i := strings.LastIndex(tag, " ");
if i >= 0 {
- ns, tag = tag[0:i], tag[i+1:len(tag)];
+ ns, tag = tag[0:i], tag[i+1 : len(tag)];
}
if tag != start.Name.Local {
return UnmarshalError("expected element type <" + tag + "> but have <" + start.Name.Local + ">");
</summary></entry></feed>`
type Feed struct {
- XMLName Name "http://www.w3.org/2005/Atom feed";
- Title string;
- Id string;
- Link []Link;
- Updated Time;
- Author Person;
- Entry []Entry;
+ XMLName Name "http://www.w3.org/2005/Atom feed";
+ Title string;
+ Id string;
+ Link []Link;
+ Updated Time;
+ Author Person;
+ Entry []Entry;
}
type Entry struct {
- Title string;
- Id string;
- Link []Link;
- Updated Time;
- Author Person;
- Summary Text;
+ Title string;
+ Id string;
+ Link []Link;
+ Updated Time;
+ Author Person;
+ Summary Text;
}
type Link struct {
- Rel string "attr";
- Href string "attr";
+ Rel string "attr";
+ Href string "attr";
}
type Person struct {
- Name string;
- URI string;
- Email string;
+ Name string;
+ URI string;
+ Email string;
}
type Text struct {
- Type string "attr";
- Body string "chardata";
+ Type string "attr";
+ Body string "chardata";
}
type Time string
Id: "http://codereview.appspot.com/",
Updated: "2009-10-04T01:35:58+00:00",
Author: Person{
- Name: "rietveld"
+ Name: "rietveld",
},
Entry: []Entry{
Entry{
},
Updated: "2009-10-04T01:35:58+00:00",
Author: Person{
- Name: "email-address-removed"
+ Name: "email-address-removed",
},
Id: "urn:md5:134d9179c41f806be79b3a5f7877d19a",
Summary: Text{
the top of feeds.py marked NOTE(rsc).
-`
+`,
},
},
Entry{
},
Updated: "2009-10-03T23:02:17+00:00",
Author: Person{
- Name: "email-address-removed"
+ Name: "email-address-removed",
},
Id: "urn:md5:0a2a4f19bb815101f0ba2904aed7c35a",
Summary: Text{
not being used from outside intra_region_diff.py.
-`
- }
+`,
+ },
},
- }
+ },
}