From 828334dd95ce8e4bf3662bd5c89d7c417f0741d0 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 6 Nov 2009 14:24:38 -0800 Subject: - 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 --- src/pkg/xml/xml.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/pkg/xml/xml.go') 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 . // The bytes do not include the 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 type ProcInst struct { @@ -100,9 +94,7 @@ func (p ProcInst) Copy() ProcInst { // The bytes do not include the 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); -- cgit v1.2.3