Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
text/template: add support for io.Reader #29165
What version of Go are you using (
Sounds reasonable, given that there's no simple way to currently work around buffering all the data in memory.
I wonder how often this comes up, though. I've used templates for multiple years and I've never had the need to print an
Sadly, none that I can link, but I've encountered this problem in several situations, mostly because I dealt a lot with net conns and external data sources that my code was just transforming (wrapping readers).
I ended up writing my own kind of templates that interleaved
I just found the previous bug and created a small patch to support this use case for me and other people that might incur in the same issue.
Also, since most of the stdlib passes