Documentation
¶
Overview ¶
Package zexec runs external commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Readlines ¶
Readlines calls cmd.Start sends every line of output on the returned channel.
Example usage:
cmd := exec.Command("long-running-process")
ch, err := zexec.Readlines(cmd)
for {
line, ok := <-ch
if !ok {
break
}
if line.Error != nil {
fmt.Fprintln(os.Stderr, "error reading:", line.Error)
break
}
fmt.Println(line)
}
Types ¶
Click to show internal directories.
Click to hide internal directories.