[go-nuts] Re: How to capture the bytes of stdin

2021-08-19 Thread hyogy hyogy
Thanks for your suggestin!(: Can you make an example here? https://play.golang.org/ Just to make the big picture more clear, this is what I'm trying to achieve: shell sends bytes on stdout, stderr —> Go tool does rot13 encode —> socat does rot13 decode --> ncat server // this part is fine nc

[go-nuts] Re: How to capture the bytes of stdin

2021-08-18 Thread Tamás Gulácsi
You have to io.Copy(cmdStdin, os.Stdin) to use your program's stdin, and pipe it to the subprocess. hyo...@gmail.com a következőt írta (2021. augusztus 18., szerda, 17:50:24 UTC+2): > The goal: I want to capture all the bytes of *cmd.Stdin* and process them > with this rot13 function: https://