diff options
author | Russ Cox <rsc@golang.org> | 2010-02-25 16:01:29 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-02-25 16:01:29 -0800 |
commit | 454796815f7f2e0e614b999f9cc1ef0e3e093b78 (patch) | |
tree | a0a5f67e4a643d3bdadd4e28cee9b0900401b62d /src/pkg/net | |
parent | 975cc91983c054595b22502d7b9271a3d3cb828e (diff) | |
download | golang-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/net')
-rw-r--r-- | src/pkg/net/dialgoogle_test.go | 3 | ||||
-rw-r--r-- | src/pkg/net/server_test.go | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/pkg/net/dialgoogle_test.go b/src/pkg/net/dialgoogle_test.go index dfcc8f01e..03641817d 100644 --- a/src/pkg/net/dialgoogle_test.go +++ b/src/pkg/net/dialgoogle_test.go @@ -7,7 +7,6 @@ package net import ( "flag" "io" - "strings" "syscall" "testing" ) @@ -18,7 +17,7 @@ var ipv6 = flag.Bool("ipv6", false, "assume ipv6 tunnel is present") // fd is already connected to the destination, port 80. // Run an HTTP request to fetch the appropriate page. func fetchGoogle(t *testing.T, fd Conn, network, addr string) { - req := strings.Bytes("GET /intl/en/privacy.html HTTP/1.0\r\nHost: www.google.com\r\n\r\n") + req := []byte("GET /intl/en/privacy.html HTTP/1.0\r\nHost: www.google.com\r\n\r\n") n, err := fd.Write(req) buf := make([]byte, 1000) diff --git a/src/pkg/net/server_test.go b/src/pkg/net/server_test.go index ae26e496a..8e3494588 100644 --- a/src/pkg/net/server_test.go +++ b/src/pkg/net/server_test.go @@ -65,7 +65,7 @@ func connect(t *testing.T, network, addr string, isEmpty bool) { var b []byte if !isEmpty { - b = strings.Bytes("hello, world\n") + b = []byte("hello, world\n") } var b1 [100]byte |