Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
9149d918
Commit
9149d918
authored
Apr 12, 2010
by
Christopher Wedgwood
Committed by
Rob Pike
Apr 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xml: update documentation to match current coding style
R=rsc, r CC=golang-dev
https://golang.org/cl/891048
parent
1ab15fac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
read.go
src/pkg/xml/read.go
+13
-14
No files found.
src/pkg/xml/read.go
View file @
9149d918
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment