summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrey Mirtchovski <mirtchovski@gmail.com>2010-03-02 11:18:22 +1100
committerAndrey Mirtchovski <mirtchovski@gmail.com>2010-03-02 11:18:22 +1100
commit488428d25a8ef9cfd09cce718956406b7c8b5904 (patch)
treeb45fd7a8410e0820c27f203dd754aea946033eaf /src
parent629eba4cbbab8ec1abcef3993e259fbd79f5e1cd (diff)
downloadgolang-488428d25a8ef9cfd09cce718956406b7c8b5904.tar.gz
strings.Bytes -> []byte for documentation example, src/pkg/* comments, and htmlgen.go
R=rsc, adg CC=golang-dev http://codereview.appspot.com/224087 Committer: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/pkg/compress/zlib/reader.go2
-rw-r--r--src/pkg/websocket/client.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/compress/zlib/reader.go b/src/pkg/compress/zlib/reader.go
index 357a8a337..c541a8d50 100644
--- a/src/pkg/compress/zlib/reader.go
+++ b/src/pkg/compress/zlib/reader.go
@@ -12,7 +12,7 @@ to a buffer:
var b bytes.Buffer
w, err := zlib.NewDeflater(&b)
- w.Write(strings.Bytes("hello, world\n"))
+ w.Write([]byte("hello, world\n"))
w.Close()
and to read that data back:
diff --git a/src/pkg/websocket/client.go b/src/pkg/websocket/client.go
index 9060f8b29..7bf53d840 100644
--- a/src/pkg/websocket/client.go
+++ b/src/pkg/websocket/client.go
@@ -57,7 +57,7 @@ func newClient(resourceName, host, origin, location, protocol string, rwc io.Rea
if err != nil {
panic("Dial: ", err.String())
}
- if _, err := ws.Write(strings.Bytes("hello, world!\n")); err != nil {
+ if _, err := ws.Write([]byte("hello, world!\n")); err != nil {
panic("Write: ", err.String())
}
var msg = make([]byte, 512);