From 790d60537e0888464a1c8a6f98c20baf2eeacdf2 Mon Sep 17 00:00:00 2001 From: Daniel Martí Date: Mon, 22 Aug 2022 22:11:03 +0100 Subject: all: append(bytes, str...) works out of the box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ian Lance Taylor Reviewed-by: David Chase TryBot-Result: Gopher Robot Run-TryBot: Daniel Martí --- src/syscall/exec_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/syscall/exec_linux.go') diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go index 4ae7f33462..d9e9e6df44 100644 --- a/src/syscall/exec_linux.go +++ b/src/syscall/exec_linux.go @@ -590,7 +590,7 @@ func forkExecPipe(p []int) (err error) { func formatIDMappings(idMap []SysProcIDMap) []byte { var data []byte for _, im := range idMap { - data = append(data, []byte(itoa.Itoa(im.ContainerID)+" "+itoa.Itoa(im.HostID)+" "+itoa.Itoa(im.Size)+"\n")...) + data = append(data, itoa.Itoa(im.ContainerID)+" "+itoa.Itoa(im.HostID)+" "+itoa.Itoa(im.Size)+"\n"...) } return data } -- cgit v1.3