]> Cypherpunks repositories - gostls13.git/commitdiff
xml: update documentation to match current coding style
authorChristopher Wedgwood <cw@f00f.org>
Mon, 12 Apr 2010 17:28:50 +0000 (10:28 -0700)
committerRob Pike <r@golang.org>
Mon, 12 Apr 2010 17:28:50 +0000 (10:28 -0700)
R=rsc, r
CC=golang-dev
https://golang.org/cl/891048

src/pkg/xml/read.go

index e3ae2c402d8729c2655b10568d8f04fe73a6cd1a..9eb0be2538ba0f635405dc7d5456a7af8a1e6925 100644 (file)
@@ -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