summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/ionrock/procs/examples_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/ionrock/procs/examples_test.go')
-rw-r--r--vendor/github.com/ionrock/procs/examples_test.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/vendor/github.com/ionrock/procs/examples_test.go b/vendor/github.com/ionrock/procs/examples_test.go
deleted file mode 100644
index c9b43cc1c..000000000
--- a/vendor/github.com/ionrock/procs/examples_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package procs_test
-
-import (
- "fmt"
-
- "github.com/ionrock/procs"
-)
-
-func ExampleSplitCommand() {
- parts := procs.SplitCommand("echo 'hello world'")
- for i, p := range parts {
- fmt.Printf("%d %s\n", i+1, p)
- }
-
- // Output:
- // 1 echo
- // 2 hello world
-}
-
-func ExampleSplitCommandEnv() {
- env := map[string]string{
- "GREETING": "hello",
- "NAME": "world!",
- "PASSWORD": "secret",
- }
-
- getenv := func(key string) string {
- if v, ok := env[key]; ok && key != "PASSWORD" {
- return v
- }
- return ""
- }
-
- parts := procs.SplitCommandEnv("echo '$GREETING $NAME $PASSWORD'", getenv)
-
- for i, p := range parts {
- fmt.Printf("%d %s\n", i+1, p)
- }
-
- // Output:
- // 1 echo
- // 2 hello world!
-}