You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As for the performance ... superfluous memory allocation when returning the byte slice from bytes.Buffer. The memory allocation could be avoided if Render() could accept io.Writer to write template output to.`
Can we just use io.Writer instead of []byte in Render() method?
The text was updated successfully, but these errors were encountered:
Although he's correct, the main reason for this to exist is to enable a JSON renderer which doesn't accept an io.Writer anywhere. I'm really not opposed to the change, but it would have to be a RenderWriter interface we upgrade to from a Renderer otherwise it'd break backwards compatability. I'd accept a PR for this, will not implement it myself.
Discussing with the great developer @valyala in thread valyala/quicktemplate#58 about the amazing
Authboss
he gave us a suggestion to optimize a bit: valyala/quicktemplate#58 (comment)Can we just use
io.Writer
instead of[]byte
inRender()
method?The text was updated successfully, but these errors were encountered: