mirror of
https://github.com/golang/go
synced 2024-11-22 01:24:42 -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() {
|
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.Stdout.Write(hello)
|
||||||
file, err := file.Open("/does/not/exist", 0, 0)
|
file, err := file.Open("/does/not/exist", 0, 0)
|
||||||
if file == nil {
|
if file == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user