[go-nuts] Re: Possible to stream database/sql rows to text/template?

2018-02-16 Thread Matt R.
Oh nice! I was using it with github.com/gin-gonic/gin which was giving me an error about writing bytes exceeding Content-Length, which the library was setting for me. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this grou

[go-nuts] Re: Possible to stream database/sql rows to text/template?

2018-02-15 Thread Matt R.
Ah! Should have thought of that. After implementing it, however, I realized that it's not very conducive to HTTP requests, in which the Content-Size header is expected to be sent, and thus, how can I know the content size of a response until I've rendered the whole thing? Thanks anyways! --

[go-nuts] Possible to stream database/sql rows to text/template?

2018-02-14 Thread Matt R.
I'm interested in streaming results from a *database/sql* query to a template rendered with *html/template*. More specifically, for performance reasons, I'm interested in streaming an array of results from the database straight to text/template without allocating a slice beforehand. My idea is

Re: [go-nuts] Cross-compiling error for runtime package in go1.9.4 (works in go1.9.2)

2018-02-13 Thread Matt R.
Yes, without setting GOROOT was how I initially ran into this problem. I double checked with printenv GOROOT to make sure it wasn't set. I've wiped and reinstalled both my go installation (Archlinux package go 1.9.4) and GOPATH to the same result. I tried to isolate the problem further by using

Re: [go-nuts] Cross-compiling error for runtime package in go1.9.4 (works in go1.9.2)

2018-02-12 Thread Matt R.
I have a simple way to reproduce this with GOROOT defined for each golang version. 1. Install gb. https://getgb.io/ 2. Create a project with the structure: - src - app - main.go (fill with contents of runtime example from documentation https://golang.

[go-nuts] Re: Cross-compiling error for runtime package in go1.9.4 (works in go1.9.2)

2018-02-12 Thread Matt R.
I specifically need CGO disabled to make a statically linked binary, unfortunately. -- 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...@googl