mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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 https://golang.org/cl/224062
This commit is contained in:
parent
dfaa6eaa76
commit
9750adbbad
65 changed files with 239 additions and 310 deletions
|
|
@ -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(""") // 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue