Hey guys, I am not quite sure whether the following behavior is intended or not. Therefore, I am seeking for your advice.
Using DotReader's Read() function from the textproto package requires me to provide an predefined buffer to fill in processed data (as usual for Read() functions). Let's consider the case I provided a small buffer (in my case for a smtp server only supporting small mails) but we receive a big mail. The Read() function of DotReader terminates it's foor loop providing no error (nil). The textproto Reader still has it's DotReader initialized (net/textproto line 20). As a result of this, all other Read functions of the textproto reader now try finalize the DotReader operation fist (by calling closeDot()). CloseDot() calls Read() of the DotReader which will only finish successfully (and setting dotReader to nil) when it detects an dot. So, no other operation on the textproto Reader is possible until an dot has been detected. I am wondering whether this is intended behavior? Isn't the assumption valid to just read a certain amount of data and cancel the entire operation if an certain threshold is reached, still being able to use the reader for other operations afterwords? I would be grateful for any input concerning this topic. Cheers, Julian -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.