]> Cypherpunks repositories - gostls13.git/commitdiff
doc: Use byte("...") over byte{...}
authorChristopher Wedgwood <cw@f00f.org>
Fri, 26 Feb 2010 04:06:41 +0000 (20:06 -0800)
committerRob Pike <r@golang.org>
Fri, 26 Feb 2010 04:06:41 +0000 (20:06 -0800)
R=rsc, r
CC=golang-dev
https://golang.org/cl/224069

doc/progs/helloworld3.go

index 5655c7489df914988e3b75535d73b97434dfa4aa..e065f02e6bf2e13817f7dca45523e06c66189b7a 100644 (file)
@@ -11,7 +11,7 @@ import (
 )
 
 func main() {
-       hello := []byte{'h', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '\n'}
+       hello := []byte("hello, world\n")
        file.Stdout.Write(hello)
        file, err := file.Open("/does/not/exist",  0,  0)
        if file == nil {