Totally not go-ish experiment about piping streams with go https://github.com/mh-cbon/poc-pipe
I don t like that is breaks the static type check in one-two places like Piper.Pipe, besides that it was very interesting and educative. Also, after nth attempt on that matter, i m happy it can mix various data types. I was specifically interested to have []byte -> Object and Object -> [] byte While working on this i had to create an async io writer, so io.Reader.Read won t block. I like that to change this behavior for a stream it is a simple as a one line modification. Literally, `t.NewByteReaderCloser(os.Stdin)` to `t.NewByteReader(os.Stdin)` and you got a non-blocking reader on any io.Reader. I added a last example around a tcp server, it will read your stdin sends those messages to connected peers, it will read peers message prints them to stdout and other peers. Not sure how that would look like in really go ish way, in this example, it took < 100 lines. use nc to try this last one. Only some ideas! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
