func main() {
findCmd := cmd.NewCmd("dir")
statusChan := findCmd.Start()
go func() {
for {
fmt.Println("-------")
status := findCmd.Status()
fmt.Println(status.Stdout)
}
}()
<-statusChan
fmt.Println("=======")
}
I run this program on Win10, and get something like that:
-------
[]
-------
[]
-------
[]
-------
[]
-------
[]
-------
[]
-------
[]
So, what's the problem of it.