doc: Use byte("...") over byte{...}

R=rsc, r
CC=golang-dev
https://golang.org/cl/224069
This commit is contained in:
Christopher Wedgwood 2010-02-25 20:06:41 -08:00 committed by Rob Pike
parent 8fbd5f8a82
commit 5de2e1c5bb

View 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 {