Did stdin problem solved?
yakuter opened this issue · 0 comments
yakuter commented
Hello. Did stdin problem solved? How can I do this without using exec.Command
out, err := sh.OutputWith(envMap, filepath.Join(GOBIN, "gocov"), "convert", coverFile)
if err != nil {
return fmt.Errorf("failed to convert coverage error: %v", err)
}
reportCmd := exec.Command("gocov", "report")
reportCmd.Stdin = strings.NewReader(out)
reportOutput, err := reportCmd.Output()
if err != nil {
return fmt.Errorf("failed to run report error: %v", err)
}
println(string(reportOutput))