aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/example_test.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net> 2018-07-06 21:18:14 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net> 2018-07-06 21:18:14 -0700
commit459bb4531f92f8663afb6f36aa9be5b789bd591f (patch)
treef14e6c06b8e5c63612d1ff36f8cab40ae8a99d20 /vendor/golang.org/x/sys/unix/example_test.go
parent34a3fe426b33a63f2d8e02d4a70c88f137fa5410 (diff)
downloadv2-459bb4531f92f8663afb6f36aa9be5b789bd591f.tar.gz
v2-459bb4531f92f8663afb6f36aa9be5b789bd591f.tar.zst
v2-459bb4531f92f8663afb6f36aa9be5b789bd591f.zip
Update vendor dependencies
Diffstat (limited to 'vendor/golang.org/x/sys/unix/example_test.go')
-rw-r--r--vendor/golang.org/x/sys/unix/example_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/example_test.go b/vendor/golang.org/x/sys/unix/example_test.go
new file mode 100644
index 00000000..10619afd
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/example_test.go
@@ -0,0 +1,19 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package unix_test
+
+import (
+ "log"
+ "os"
+
+ "golang.org/x/sys/unix"
+)
+
+func ExampleExec() {
+ err := unix.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ())
+ log.Fatal(err)
+}