Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(62)

Unified Diff: src/pkg/xml/xml.go

Issue 224062: code review 224062: strings: delete Runes, Bytes (Closed)
Patch Set: code review 224062: strings: delete Runes, Bytes Created 15 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/xgb/xgb.go ('k') | src/pkg/xml/xml_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/xml/xml.go
===================================================================
--- a/src/pkg/xml/xml.go
+++ b/src/pkg/xml/xml.go
@@ -815,7 +815,7 @@
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 (
- esc_quot = strings.Bytes(""") // shorter than """
- esc_apos = strings.Bytes("'") // shorter than "'"
- esc_amp = strings.Bytes("&")
- esc_lt = strings.Bytes("<")
- esc_gt = strings.Bytes(">")
+ esc_quot = []byte(""") // shorter than """
+ esc_apos = []byte("'") // shorter than "'"
+ esc_amp = []byte("&")
+ esc_lt = []byte("<")
+ esc_gt = []byte(">")
)
// Escape writes to w the properly escaped XML equivalent
« no previous file with comments | « src/pkg/xgb/xgb.go ('k') | src/pkg/xml/xml_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b