summaryrefslogtreecommitdiff
path: root/src/pkg/xml/xml.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-02-25 16:01:29 -0800
committerRuss Cox <rsc@golang.org>2010-02-25 16:01:29 -0800
commit454796815f7f2e0e614b999f9cc1ef0e3e093b78 (patch)
treea0a5f67e4a643d3bdadd4e28cee9b0900401b62d /src/pkg/xml/xml.go
parent975cc91983c054595b22502d7b9271a3d3cb828e (diff)
downloadgolang-454796815f7f2e0e614b999f9cc1ef0e3e093b78.tar.gz
strings: delete Runes, Bytes
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
Diffstat (limited to 'src/pkg/xml/xml.go')
-rw-r--r--src/pkg/xml/xml.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/xml/xml.go b/src/pkg/xml/xml.go
index 67cbb824f..1ddb896de 100644
--- a/src/pkg/xml/xml.go
+++ b/src/pkg/xml/xml.go
@@ -815,7 +815,7 @@ Input:
p.err = SyntaxError("invalid character entity &" + s + ";")
return nil
}
- p.buf.Write(strings.Bytes(text))
+ p.buf.Write([]byte(text))
b0, b1 = 0, 0
continue Input
}
@@ -1508,11 +1508,11 @@ var htmlAutoClose = []string{
}
var (
- esc_quot = strings.Bytes("&#34;") // shorter than "&quot;"
- esc_apos = strings.Bytes("&#39;") // shorter than "&apos;"
- esc_amp = strings.Bytes("&amp;")
- esc_lt = strings.Bytes("&lt;")
- esc_gt = strings.Bytes("&gt;")
+ esc_quot = []byte("&#34;") // shorter than "&quot;"
+ esc_apos = []byte("&#39;") // shorter than "&apos;"
+ esc_amp = []byte("&amp;")
+ esc_lt = []byte("&lt;")
+ esc_gt = []byte("&gt;")
)
// Escape writes to w the properly escaped XML equivalent