mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue