diff options
author | Robert Griesemer <gri@golang.org> | 2009-11-06 14:24:38 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-11-06 14:24:38 -0800 |
commit | 828334dd95ce8e4bf3662bd5c89d7c417f0741d0 (patch) | |
tree | fd7e0c9961bc3af2ddf105e9cc1943f2509ac584 /src/pkg/xml/xml.go | |
parent | eb5cdfd67ff6d32df4c4c27840eaee027c5e3512 (diff) | |
download | golang-828334dd95ce8e4bf3662bd5c89d7c417f0741d0.tar.gz |
- fine-tuning of one-line func heuristic (nodes.go)
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)
R=r, rsc
CC=go-dev
http://go/go-review/1026006
Diffstat (limited to 'src/pkg/xml/xml.go')
-rw-r--r-- | src/pkg/xml/xml.go | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/pkg/xml/xml.go b/src/pkg/xml/xml.go index 2f33f2d85..52ef78f2f 100644 --- a/src/pkg/xml/xml.go +++ b/src/pkg/xml/xml.go @@ -28,9 +28,7 @@ import ( // A SyntaxError represents a syntax error in the XML input stream. type SyntaxError string -func (e SyntaxError) String() string { - return "XML syntax error: " + string(e); -} +func (e SyntaxError) String() string { return "XML syntax error: " + string(e) } // A Name represents an XML name (Local) annotated // with a name space identifier (Space). @@ -73,17 +71,13 @@ func copy(b []byte) []byte { return b1; } -func (c CharData) Copy() CharData { - return CharData(copy(c)); -} +func (c CharData) Copy() CharData { return CharData(copy(c)) } // A Comment represents an XML comment of the form <!--comment-->. // The bytes do not include the <!-- and --> comment markers. type Comment []byte -func (c Comment) Copy() Comment { - return Comment(copy(c)); -} +func (c Comment) Copy() Comment { return Comment(copy(c)) } // A ProcInst represents an XML processing instruction of the form <?target inst?> type ProcInst struct { @@ -100,9 +94,7 @@ func (p ProcInst) Copy() ProcInst { // The bytes do not include the <! and > markers. type Directive []byte -func (d Directive) Copy() Directive { - return Directive(copy(d)); -} +func (d Directive) Copy() Directive { return Directive(copy(d)) } type readByter interface { ReadByte() (b byte, err os.Error); |