mirror of
https://github.com/golang/go
synced 2024-11-21 20:04:44 -07:00
doc: Use byte("...") over byte{...}
R=rsc, r CC=golang-dev https://golang.org/cl/224069
This commit is contained in:
parent
8fbd5f8a82
commit
5de2e1c5bb
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user