1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
10 XMLName: Name{"http://www.w3.org/2005/Atom", "feed"},
11 Title: "Example Feed",
12 Link: []Link{{Href: "http://example.org/"}},
13 Updated: ParseTime("2003-12-13T18:30:02Z"),
14 Author: Person{Name: "John Doe"},
15 Id: "urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6",
19 Title: "Atom-Powered Robots Run Amok",
20 Link: []Link{{Href: "http://example.org/2003/12/13/atom03"}},
21 Id: "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a",
22 Updated: ParseTime("2003-12-13T18:30:02Z"),
23 Summary: NewText("Some text."),
29 `<feed xmlns="http://www.w3.org/2005/Atom" updated="2003-12-13T18:30:02Z">` +
30 `<title>Example Feed</title>` +
31 `<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>` +
32 `<link href="http://example.org/"></link>` +
33 `<author><name>John Doe</name><uri></uri><email></email></author>` +
35 `<title>Atom-Powered Robots Run Amok</title>` +
36 `<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>` +
37 `<link href="http://example.org/2003/12/13/atom03"></link>` +
38 `<updated>2003-12-13T18:30:02Z</updated>` +
39 `<author><name></name><uri></uri><email></email></author>` +
40 `<summary>Some text.</summary>` +
44 func ParseTime(str string) time.Time {
45 t, err := time.Parse(time.RFC3339, str)
52 func NewText(text string) Text {