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
diff --git a/src/pkg/io/io.go b/src/pkg/io/io.go
index 4357d5c..dcdc883 100644
--- a/src/pkg/io/io.go
+++ b/src/pkg/io/io.go
@@ -8,10 +8,7 @@
// abstract the functionality, plus some other related primitives.
package io
-import (
- "os"
- "strings"
-)
+import "os"
// Error represents an unexpected I/O behavior.
type Error struct {
@@ -160,7 +157,7 @@
// WriteString writes the contents of the string s to w, which accepts an array of bytes.
func WriteString(w Writer, s string) (n int, err os.Error) {
- return w.Write(strings.Bytes(s))
+ return w.Write([]byte(s))
}
// ReadAtLeast reads from r into buf until it has read at least min bytes.