Re: [go-nuts] HTTP client - streaming POST body?

2023-03-22 Thread burak serdar
On Wed, Mar 22, 2023 at 8:32 PM 'Christian Stewart' via golang-nuts < golang-nuts@googlegroups.com> wrote: > you can achieve this using an io.Pipe. The io.Pipe function returns a > connected pair of *PipeReader and *PipeWriter, where writes to the > *PipeWriter are directly read from the

Re: [go-nuts] HTTP client - streaming POST body?

2023-03-22 Thread 'Christian Stewart' via golang-nuts
you can achieve this using an io.Pipe. The io.Pipe function returns a connected pair of *PipeReader and *PipeWriter, where writes to the *PipeWriter are directly read from the *PipeReader. The Write call on the *PipeWriter will block until the data is read from the *PipeReader. pr, pw :=

Re: [go-nuts] HTTP client - streaming POST body?

2023-03-22 Thread 'Jim Smart' via golang-nuts
The issue here, isn’t that I am uploading a big file — that’s easy. As I said in my initial post: > The use case here is that I'm wishing to send very large UPDATE/INSERT > queries/commands to an HTTP endpoint, and the body content of those > queries/commands is actually generated from a

[go-nuts] httptest.ResponseRecorder and superfluous WriteHeader calls

2023-03-22 Thread TheDiveO
While maintaining my Go spaserve module for serving single-page applications with client-side DOM routing and on different routes simultaneously I noticed different logging behavior between http.timeoutWriter.WriteHeader

Re: [go-nuts] Issue with glog https://github.com/golang/glog/releases/tag/v1.1.0

2023-03-22 Thread 'Chressie Himpel' via golang-nuts
On Mon, Mar 20, 2023 at 6:07 PM Chressie Himpel wrote: > > On Mon, Mar 20, 2023 at 4:44 PM chandra sekhar > wrote: > > > > Hi, > > I see that you have already provided a fix for this issue > > https://github.com/golang/glog/commit/9c9801e69114b582b12aa7010c75fe2105ae23b3. > > Any idea when you

Re: [go-nuts] Can't capture stderr after upgrading to glog v1.1.0

2023-03-22 Thread 'Chressie Himpel' via golang-nuts
On Fri, Mar 17, 2023 at 3:08 PM Chressie Himpel wrote: > > On Fri, Mar 17, 2023 at 1:50 PM Stuart McLean wrote: > > > > I’m not sure where to add os.Stderr.Sync() so I tried in a few spots, > > including directly after my call to glog.Error > > > > Here’s playground version:

[go-nuts] Re: GLog library can't be used in Golang 1.18 due to "abortProcess redeclared in this block" error

2023-03-22 Thread Juan Antonio Cid Tomás
Understood! We are upgrading all our projects. Thanks a lot for your time Carla. On Wednesday, March 22, 2023 at 7:13:14 AM UTC+1 Carla Pfaff wrote: glog_file_other.go uses the "unix" build constraint, which was introduced in Go 1.19: https://tip.golang.org/doc/go1.19#go-unix Go 1.18 doesn't

Re: [go-nuts] Re: Gorilla toolkit - mux with http.FileServer returning 404

2023-03-22 Thread Marvin Renich
* zhiwei dong [230322 00:47]: > The 127.0.0.1:8084/apidoc/ return a 404 > > Demo > package main > > import ( > "fmt" > "github.com/gorilla/mux" > "net/http" > ) > > func main() { > router := mux.NewRouter() > router.PathPrefix("/apidoc/").Handler(http.StripPrefix("/apidoc/", >

Re: [go-nuts] Re: GLog library can't be used in Golang 1.18 due to "abortProcess redeclared in this block" error

2023-03-22 Thread 'Chressie Himpel' via golang-nuts
On Wed, Mar 22, 2023 at 7:13 AM 'Carla Pfaff' via golang-nuts wrote: > > glog_file_other.go uses the "unix" build constraint, which was introduced in > Go 1.19: https://tip.golang.org/doc/go1.19#go-unix > Go 1.18 doesn't know about it. Since Go 1.18 is no longer supported (only the > last two

[go-nuts] Re: GLog library can't be used in Golang 1.18 due to "abortProcess redeclared in this block" error

2023-03-22 Thread 'Carla Pfaff' via golang-nuts
glog_file_other.go uses the "unix" build constraint, which was introduced in Go 1.19: https://tip.golang.org/doc/go1.19#go-unix Go 1.18 doesn't know about it. Since Go 1.18 is no longer supported (only the last two main releases are supported) it's either time to update your Go version to 1.19