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
|
|
@ -42,7 +42,7 @@ func Clean(path string) string {
|
|||
// writing to buf; w is index of next byte to write.
|
||||
// dotdot is index in buf where .. must stop, either because
|
||||
// it is the leading slash or it is a leading ../../.. prefix.
|
||||
buf := strings.Bytes(path)
|
||||
buf := []byte(path)
|
||||
r, w, dotdot := 0, 0, 0
|
||||
if rooted {
|
||||
r, w, dotdot = 1, 1, 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue