From d8e400bc7db4870d786864138af681469693d18c Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Mon, 19 Mar 2018 08:24:36 -0700 Subject: [PATCH] unix: fix example This should call unix.Exec, not syscall.Exec. Thanks Tobias Klauser for the spot. Change-Id: Iddae390891a66652b071e05c1a5a25bbfdb19e52 Reviewed-on: https://go-review.googlesource.com/101435 Run-TryBot: Kevin Burke Reviewed-by: Tobias Klauser TryBot-Result: Gobot Gobot --- unix/example_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/unix/example_test.go b/unix/example_test.go index 3ddf90fe..10619afd 100644 --- a/unix/example_test.go +++ b/unix/example_test.go @@ -2,15 +2,18 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package unix +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix_test import ( "log" "os" - "syscall" + + "golang.org/x/sys/unix" ) func ExampleExec() { - err := syscall.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ()) + err := unix.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ()) log.Fatal(err) }