diff options
author | Christopher Wedgwood <cw@f00f.org> | 2010-04-12 10:28:50 -0700 |
---|---|---|
committer | Christopher Wedgwood <cw@f00f.org> | 2010-04-12 10:28:50 -0700 |
commit | 561ba3b677f43ed2ff93e2a6100f902534ead562 (patch) | |
tree | 1060703bd919ec49bfbb6c06319b795cd8e9b9c5 /src | |
parent | e2999f34536f2e18de3aad5e328608678323d6b1 (diff) | |
download | golang-561ba3b677f43ed2ff93e2a6100f902534ead562.tar.gz |
xml: update documentation to match current coding style
R=rsc, r
CC=golang-dev
http://codereview.appspot.com/891048
Committer: Rob Pike <r@golang.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pkg/xml/read.go | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/pkg/xml/read.go b/src/pkg/xml/read.go index e3ae2c402..9eb0be253 100644 --- a/src/pkg/xml/read.go +++ b/src/pkg/xml/read.go @@ -29,18 +29,18 @@ import ( // For example, given these definitions: // // type Email struct { -// Where string "attr"; -// Addr string; +// Where string "attr" +// Addr string // } // // type Result struct { -// XMLName xml.Name "result"; -// Name string; -// Phone string; -// Email []Email; +// XMLName xml.Name "result" +// Name string +// Phone string +// Email []Email // } // -// result := Result{ Name: "name", Phone: "phone", Email: nil } +// result := Result{Name: "name", Phone: "phone", Email: nil} // // unmarshalling the XML input // @@ -57,14 +57,13 @@ import ( // // via Unmarshal(r, &result) is equivalent to assigning // -// r = Result{ -// xml.Name{"", "result"}, -// "Grace R. Emlin", // name -// "phone", // no phone given +// r = Result{xml.Name{"", "result"}, +// "Grace R. Emlin", // name +// "phone", // no phone given // []Email{ -// Email{ "home", "gre@example.com" }, -// Email{ "work", "gre@work.com" } -// } +// Email{"home", "gre@example.com"}, +// Email{"work", "gre@work.com"}, +// }, // } // // Note that the field r.Phone has not been modified and |