]> Cypherpunks repositories - gostls13.git/commit
all: append(bytes, str...) works out of the box
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 22 Aug 2022 21:11:03 +0000 (22:11 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 23 Aug 2022 21:04:06 +0000 (21:04 +0000)
commit790d60537e0888464a1c8a6f98c20baf2eeacdf2
tree04f7ff2b3e67f3850440dd57a92e4265f8e7e44e
parent44d057d5818e11982b679a83d54e9a4eac4f823f
all: append(bytes, str...) works out of the box

From the append docs in the builtin package:

As a special case, it is legal to append a string to a byte slice, like this:

slice = append([]byte("hello "), "world"...)

Change-Id: Ib14039a7476873b12a3aefccd8863e8d628b9249
Reviewed-on: https://go-review.googlesource.com/c/go/+/425102
Reviewed-by: hopehook <hopehook@qq.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
src/cmd/go/internal/modindex/write.go
src/cmd/internal/quoted/quoted.go
src/syscall/exec_linux.go
src/time/format.go