Skip to content

Why status.Stdout is empty in my code #58

@wejoy

Description

@wejoy
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions