Commit 9149d918 authored by Christopher Wedgwood's avatar Christopher Wedgwood Committed by Rob Pike

xml: update documentation to match current coding style

R=rsc, r
CC=golang-dev
https://golang.org/cl/891048
parent 1ab15fac
...@@ -29,18 +29,18 @@ import ( ...@@ -29,18 +29,18 @@ import (
// For example, given these definitions: // For example, given these definitions:
// //
// type Email struct { // type Email struct {
// Where string "attr"; // Where string "attr"
// Addr string; // Addr string
// } // }
// //
// type Result struct { // type Result struct {
// XMLName xml.Name "result"; // XMLName xml.Name "result"
// Name string; // Name string
// Phone string; // Phone string
// Email []Email; // Email []Email
// } // }
// //
// result := Result{ Name: "name", Phone: "phone", Email: nil } // result := Result{Name: "name", Phone: "phone", Email: nil}
// //
// unmarshalling the XML input // unmarshalling the XML input
// //
...@@ -57,14 +57,13 @@ import ( ...@@ -57,14 +57,13 @@ import (
// //
// via Unmarshal(r, &result) is equivalent to assigning // via Unmarshal(r, &result) is equivalent to assigning
// //
// r = Result{ // r = Result{xml.Name{"", "result"},
// xml.Name{"", "result"}, // "Grace R. Emlin", // name
// "Grace R. Emlin", // name // "phone", // no phone given
// "phone", // no phone given
// []Email{ // []Email{
// Email{ "home", "gre@example.com" }, // Email{"home", "gre@example.com"},
// Email{ "work", "gre@work.com" } // Email{"work", "gre@work.com"},
// } // },
// } // }
// //
// Note that the field r.Phone has not been modified and // Note that the field r.Phone has not been modified and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment