Change-Id: Ic47198bc8bf5baabfcf4d0599825eab30d7b126c
Reviewed-on: https://go-review.googlesource.com/48853
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
fmt.Printf("The date is %s\n", out)
}
+func ExampleCmd_Run() {
+ cmd := exec.Command("sleep", "1")
+ log.Printf("Running command and waiting for it to finish...")
+ err := cmd.Run()
+ log.Printf("Command finished with error: %v", err)
+}
+
func ExampleCmd_Start() {
cmd := exec.Command("sleep", "5")
err := cmd.Start()