Golang get command tty output
问题 I'm using go's exec Run command to get command output, which works great when the command 'Stdout' field is set to os.Stdout , and the error is sent to os.Stderr . I want to display the output and the error output to the console, but I also want my program to see what the output was. I then made my own Writer type that did just that, wrote both to a buffer and printed to the terminal. Here's the problem—some applications change their output to something much less readable by humans when it