[go-nuts] Code coverage in error cases when compared to other languages

2020-12-07 Thread 'Charles Hathaway' via golang-nuts
Hi all, I'm looking for a good study/quantitative measure of how well-written Go code looks compared to other languages, such as Java, when it comes to test coverage. In particular, how handling errors may reduce the percentage of code covered by tests in Go relative to other languages. For

[go-nuts] golang paths

2020-12-07 Thread Dumitru Ungureanu
Hi. I'm currently using this directory tree for golang. Is there something I'm not taking into consideration, maybe? Thanks. ├─ go │ ├─ bin (GOBIN, where install command deploys binaries) │ ├─ cache (GOCACHE, where cached builds await reuse) │ ├─ modules │ ├─ path (GOPATH, first workspace,

Re: [go-nuts] on 'while'

2020-12-07 Thread Ian Lance Taylor
On Mon, Dec 7, 2020 at 11:18 AM Oliver Smith wrote: > > Recognizing this is likely to be a dead horse already flogged to infinity, > I've been unsuccessful trying to find discussions on the topic of why while > was nixed in-favor of the more verbose and error-prone for-based > implementations,

[go-nuts] on 'while'

2020-12-07 Thread Oliver Smith
Recognizing this is likely to be a dead horse already flogged to infinity, I've been unsuccessful trying to find discussions on the topic of why while was nixed in-favor of the more verbose and error-prone for-based implementations, hoped someone could furnish links? c.f // concise,

Re: [go-nuts] When does net/http's Client.Do return io.EOF?

2020-12-07 Thread Marcin Romaszewicz
It's uncommon to talk directly to a server these days, instead, we have proxies and load balancers along the way as well, and there are many reasons that a connection would get closed and you'd get an io.EOF. It's unlikely that the server received the request in this case, but it's possible,

Re: [go-nuts] When does net/http's Client.Do return io.EOF?

2020-12-07 Thread Robert Engels
Excellent analysis. Idempotence and exactly once delivery are often glossed over and yet it is usually critical to proper system design. The key for me is to remember that the request can fail at ANY point in the flow. XA transactions can solve this, but most systems these days rely on

Re: [go-nuts] When does net/http's Client.Do return io.EOF?

2020-12-07 Thread 'Axel Wagner' via golang-nuts
We recently had the same issue. On Mon, Dec 7, 2020 at 11:58 AM Gregor Best wrote: > Hi! > > We're using a 3rd party provider's API to handle some of our customer > requests. Interaction with their API consists of essentially POST'ing > a small XML document to them. > > From time to time,

[go-nuts] When does net/http's Client.Do return io.EOF?

2020-12-07 Thread Gregor Best
Hi! We're using a 3rd party provider's API to handle some of our customer requests. Interaction with their API consists of essentially POST'ing a small XML document to them. From time to time, `net/http`'s `Client.Do` returns an `io.EOF` when sending the request. For now, the provider always